query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
84406928fffebfd1473f5c0f83a9a5e2
Triggered on thank you hook, it will delete currency session.
[ { "docid": "16f837a9495a2e93ce90344d6f2d2a99", "score": "0.7407249", "text": "public function delete_currency_session() {\n\t\tWC()->session->__unset( self::ORIGINAL_CURRENCY_SESSION );\n\t\tWC()->session->__unset( self::CURRENCY_TIMES_SWITCHED_SESSION );\n\t\tWC()->session->__unset( self::CURRENCY_BYPASS_SESSION );\n\t}", "title": "" } ]
[ { "docid": "ae57811d28eafd9eb0a7d309bcd947c3", "score": "0.66348195", "text": "public function removeCCGV(){\n\t\tif (Session::exists('credit_covers') === true) Session::remove('credit_covers');\n\t\tif (Session::exists('cot_gv') === true) Session::remove('cot_gv');\n\t\t// End - CREDIT CLASS Gift Voucher Contribution\n\t}", "title": "" }, { "docid": "be5514a0825144ca82502881ce57bcc6", "score": "0.66171867", "text": "public function destroy()\n {\n session()->forget('coupon');\n\n return redirect()->route('checkout.index')->with('success_message', 'Kod za popust je uklonjen.');\n }", "title": "" }, { "docid": "3d83de0a641882e3fc72cdd406f5860a", "score": "0.651871", "text": "function accountDelete(){\n $ls = new BudgetService();\n $this->registry->template->success = $ls->accountDelete( $_SESSION['user_id'] );\n $this->registry->template->user = $ls->getUserbById($_SESSION['user_id']);\n $_SESSION['flag'] = 1;\n\n\n if( !isset($_SESSION['lang']) || $_SESSION['lang'] == 'ENG' ){\n $this->registry->template->smessage = \"Account has been successfully deleted.\";\n $this->registry->template->show( 'login_index' );\n }\n else if( $_SESSION['lang'] == 'CRO' ){\n $this->registry->template->smessage = \"Račun je uspiješno izbrisan.\";\n $this->registry->template->show( 'login_indexCRO' );\n }\n exit();\n }", "title": "" }, { "docid": "222f86eaeb5a045f005ddba2796559ee", "score": "0.6466766", "text": "function pmprovat_pmpro_after_checkout() {\t\t\n\tif(isset($_SESSION['eucountry']))\n\t\tunset($_SESSION['eucountry']);\n\tif(isset($_SESSION['show_vat']))\n\t\tunset($_SESSION['show_vat']);\n\tif(isset($_SESSION['bcountry']))\n\t\tunset($_SESSION['bcountry']);\n\tif(isset($_SESSION['bstate']))\n\t\tunset($_SESSION['bstate']);\n\tif(isset($_SESSION['vat_number']))\n\t\tunset($_SESSION['vat_number']);\n\tif(isset($_SESSION['vat_number_verified']))\n\t\tunset($_SESSION['vat_number_verified']);\n}", "title": "" }, { "docid": "f3ff295c077c779ab5959888a86380d9", "score": "0.64426595", "text": "public function unsetGiftCardsSession()\n {\n if (Mage::getSingleton('checkout/session')->getData('sezzleGiftCards')) {\n Mage::getSingleton('checkout/session')->unsetData('sezzleGiftCards');\n Mage::getSingleton('checkout/session')->unsetData('sezzleGiftCardsAmount');\n }\n }", "title": "" }, { "docid": "8da185b60ecf4d82ed7070ec9f3b5aca", "score": "0.62996405", "text": "function wp_destroy_current_session() {}", "title": "" }, { "docid": "e3cef765ebbf803dce73dc1431edee27", "score": "0.62797576", "text": "public function thanks()\n\t{\n\n\t\t$this->cart->destroy();\n\t\t$this->data['active'] = \"Cart\";\n\t\t$this->data['subview'] = \"public/Cart/thanks\";\n\t\t$this->load->view('public/_layout_main', $this->data);\n\t}", "title": "" }, { "docid": "dea5315af41802f4e2e684e678be1003", "score": "0.6248379", "text": "public function destroy()\n {\n session()->forget('coupon');\n\n return redirect()->route('cart.index')->withErrors(trans('main.message.Coupon has been removed'));\n }", "title": "" }, { "docid": "cf4ef8f64a5435e0dca3611b9199e3f3", "score": "0.62226754", "text": "public function dismiss_premium_deactivated_notice()\n {\n }", "title": "" }, { "docid": "d7e694d69b51abbeaeabab89de31a478", "score": "0.6187619", "text": "function fLogout()\r\n\t{\r\n\t\t$this->phpsession->clear();\r\n\t\techo ('1/Thank you');\r\n\t}", "title": "" }, { "docid": "d5fba6e985e40e1d898986689bd54a33", "score": "0.61591214", "text": "public function viderpanier(){\n $this->cart->destroy();\n redirect($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "5f980671a74a0230d59f88b4a11e7bae", "score": "0.61319906", "text": "public function removeFromSession() {\n $_SESSION['__shop']['cart'] = 0;\n }", "title": "" }, { "docid": "7723996be4e3d582a073471cea748788", "score": "0.6116716", "text": "function shop_remove_from_basket_post(){\n if ($_SESSION['orderID'] != 0) {\n $purchaseManager = new PurchaseManager();\n\n if (isset($_GET['purchaseID']) && !empty($_GET['purchaseID'])) {\n $cleaned_purchaseID = htmlspecialchars($_GET['purchaseID']);\n\n $purchase_deletion_succeeded = $purchaseManager->deletePurchase($cleaned_purchaseID);\n $purchase_deletion_succeeded ? $signal_post_remove_from_basket = 'succeeded' : $signal_post_remove_from_basket = 'failed';\n\n $order_total_update = shop_update_total_price_order($_SESSION['orderID']);\n } else {\n $signal_post_remove_from_basket = 'invalid_purchaseID';\n }\n } else {\n $signal_post_remove_from_basket = 'no_order';\n }\n \n if (empty($order_total_update)) {\n header('Location: index.php?action=cancel_order');\n } else {\n header('Location: index.php?action=basket&signal_post_remove_from_basket=' . $signal_post_remove_from_basket);\n }\n \n}", "title": "" }, { "docid": "e69ee7d83c705583262f7df0170341cd", "score": "0.6068665", "text": "public function destroy($cur_id)\n {\n Currency::where('id', '=', $cur_id)->delete();\n return redirect::to('currency')->with('success','Deleted Successfully !!');\n }", "title": "" }, { "docid": "fac2866df0e3109bca5b439371c3afbe", "score": "0.60494643", "text": "public function dismiss_old_premium_notice()\n {\n }", "title": "" }, { "docid": "828fcaaf41b1eec7813053715d9aeb8e", "score": "0.6020636", "text": "function cur_deactivate() {\n\tdelete_option( 'dismiss-spop-msg' );\n}", "title": "" }, { "docid": "28350201996716595c3e8ef863fd9f39", "score": "0.6005628", "text": "function cleanSession_()\n{\n\n \n\n }", "title": "" }, { "docid": "0071311ac0612645e93b69eb2eb71c93", "score": "0.59975517", "text": "function doLogout()\n{\n\tif (isset($_SESSION['hlbank_admin_user'])) {\n\t\tunset($_SESSION['hlbank_admin_user']);\n\t//\tsession_unregister('auction_user_id');\n\t}\n\t\t\n\theader('Location: login.php');\n\texit;\n}", "title": "" }, { "docid": "5a54ed1517604cfb627729e175a40a43", "score": "0.5995364", "text": "function clear_my_cart(){\n\n\t\t\t\t\t\t\t\t\t\tunset($_SESSION['product_chain']);\n\n\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "881cda9e32fd077be0c1cbfe2a265b00", "score": "0.5976198", "text": "public function destroy(){\n\t\t\t$this->cartDestroy();\n\t\t\t//quay tro lai trang gio hang\n\t\t\theader(\"location:index.php?controller=cart\");\n\t\t}", "title": "" }, { "docid": "9503ddfe67c34da1087ace64d3fe9e2c", "score": "0.5976043", "text": "public function destroy($id)\n {\n if (! Gate::allows('currency_delete')) {\n return prepareBlockUserMessage();\n }\n if ( isDemo() ) {\n return prepareBlockUserMessage( 'info', 'crud_disabled' );\n }\n $currency = Currency::findOrFail($id);\n $currency->delete();\n\n flashMessage( 'success', 'delete' );\n\n updateLocalSettings();\n\n if ( isSame(url()->current(), url()->previous()) ) {\n return redirect()->route('admin.currencies.index');\n } else {\n if ( ! empty( $request->redirect_url ) ) {\n return redirect( $request->redirect_url );\n } else {\n return back();\n }\n }\n }", "title": "" }, { "docid": "faf191cb8326e174163cb5b65e208cee", "score": "0.5970226", "text": "public function deconnexion()\n {\n\n $aViewHeader = $this->usersModel->getUser();\n $aViewHeader = [\"title\" => \"Déconnexion\", \"user\" => $aViewHeader];\n $this->load->view('header', $aViewHeader);\n //removing session \n $this->load->view('deconnexion');\n if (\n !empty($this->input->post('confirm'))\n &&\n $this->input->post('confirm') == 'yes'\n ) {\n\n unset($_COOKIE[\"jt_jarditou\"]);\n setcookie(\"jt_jarditou\", '', time() - 4200, '/');\n $_SESSION['login'] = \"\";\n $_SESSION['jeton'] = \"\";\n session_destroy();\n redirect(\"produits/liste\");\n }\n $this->load->view('footer');\n }", "title": "" }, { "docid": "1df1cbcc3c8e475d0bcbadfadb0a8228", "score": "0.596392", "text": "public function hapus_keranjang()\n {\n $this->cart->destroy();\n redirect('toko/dashboard/index'); //redirect fungsi index pada dashboard.php \n }", "title": "" }, { "docid": "6c4a9289c3c0648dcea4964a65ffb3b5", "score": "0.5959087", "text": "function cancel_order(){\n $orderManager = new OrderManager();\n\n $deletion_succeeded = $orderManager->deleteOrder($_SESSION['orderID']);\n $deletion_succeeded ? $signal_post_order_cancel = 'succeeded' : $signal_post_order_cancel = 'failed';\n\n $_SESSION['orderID'] = 0;\n setcookie(\"orderID\", \"\", time() - 3600);\n\n header('Location: index.php?action=shop&signal_post_order_cancel=' . $signal_post_order_cancel);\n}", "title": "" }, { "docid": "d77cc081c0062b8723ead917e72b227e", "score": "0.5931246", "text": "public function customer_logout(){\n\t\t$this->session->sess_destroy();\n\t\t$this->customer_login();\n\t}", "title": "" }, { "docid": "d8f512d61b157cc9762edb25e307ab2e", "score": "0.59145474", "text": "public function killSession()\n {\n unset($_SESSION[\"shoppingCart\"]);\n }", "title": "" }, { "docid": "2651348aa4e70c4e826ae21519632dd3", "score": "0.5911153", "text": "public function removeWalletDataFromCheckout()\n {\n // unset wallet data from session\n if ($session = Mage::getSingleton('checkout/session')) {\n $session->unsHcdWallet();\n }\n }", "title": "" }, { "docid": "04d51e7401ebc83e80bffc19809428cf", "score": "0.5909403", "text": "public static function delete()\n {\n $GLOBALS['TSFE']->fe_user->removeSessionData();\n }", "title": "" }, { "docid": "f52fb16e166f7cca0ff57430b306e8f8", "score": "0.59023947", "text": "public function cancel()\n {\n $token = SCMUtility::stripTags( (isset($_GET['token'])) ? $_GET['token'] : '');\n $courseID = SCMUtility::stripTags( (isset($_GET['courseID'])) ? $_GET['courseID'] : '');\n\n // make sure the scm_ec_token token is present before processing things\n if( Session::get('scm_ec_token') )\n {\n // check if token matched\n if( $token == Session::get('scm_ec_token') )\n {\n\n $course = Course::find($courseID);\n $message = 'You have canceled your registration payment for this course.';\n View::make('templates/front/payments/cancel.php',compact('course','message'));\n\n } else {\n\n $course = Course::find($courseID);\n $message = 'An error has occurred while paying for this course.';\n View::make('templates/front/payments/error.php',compact('course','message'));\n\n }\n } else {\n\n // show something fishy\n SCMUtility::setFlashMessage('Ops! looks like something went wrong!','info');\n\n }\n\n // remove session for this transaction\n Session::forget('scm_ec_token');\n }", "title": "" }, { "docid": "b7521612b02b97e1e6145433410339aa", "score": "0.58825034", "text": "function Delete_Order()\n {\n // Call Models\n unset($_SESSION['cart_update']);\n unset($_SESSION['cart_update_2']);\n header(\"location:../home\");\n }", "title": "" }, { "docid": "db41966e1369802cd040c6037c616f87", "score": "0.5874249", "text": "function deleteCartItem(){\n $locale = getRequest(\"locale\");\n $lang['cart_empty'] = ($locale == \"vn\") ? \"Bạn chưa chọn khoá học nào\" : \"Your cart is empty\";\n $lang['removed'] = ($locale == \"vn\") ? \"Đã xóa khoá học khỏi danh sách\" : \"Product removed from cart\";\n \n if (isset($_SESSION['cart']) and !empty($_SESSION['cart'])) {\n $product_id = intval(getRequest('id'));\n if($product_id > 0){\n $cart = $_SESSION['cart'];\n $totalAmount = 0;\n foreach ($cart as $key => $product) {\n if($product['id'] == $product_id){\n unset($cart[$key]);\n }else{\n $totalAmount += $product['amount'];\n }\n }\n array_values($cart);\n $_SESSION['cart'] = $cart;\n\n Response(json_encode(array(\n 'status' => 'success',\n 'totalAmount' => number_format($totalAmount,0,',','.') . \" đ\",\n 'message' => $lang['removed'],\n )));\n }\n }else{\n Response(json_encode(array(\n 'status' => 'error',\n 'message' => $lang['cart_empty'],\n )));\n }\n exit();\n}", "title": "" }, { "docid": "b118aed81a1e0ffe8bca16618132eb99", "score": "0.5867079", "text": "function deconnexion() {\r\n session_start_once();\r\n unset($_SESSION[\"userConnected\"]);\r\n}", "title": "" }, { "docid": "2a2baece1ce4bd7c2da2257fdd8f8d09", "score": "0.586242", "text": "public function checkoutSuccess()\r\n\t{\r\n\t\tMage::getSingleton('checkout/session')->unsetData('reward_points');\r\n\t\tMage::getSingleton('checkout/session')->unsetData('discount');\r\n\t}", "title": "" }, { "docid": "33fe5ef601501c78583479c7748c601b", "score": "0.5842886", "text": "function pmproaffl_pmpro_after_checkout() {\n\t$vars = array( 'bfirstname', 'blastname', 'baddress1', 'baddress2', 'bcity', 'bstate', 'bzipcode', 'bphone', 'bemail', 'bcountry' );\n\tforeach($vars as $var)\n\t{\n\t\tif(isset($_SESSION[$var]))\n\t\t\tpmpro_unset_session_var( $var );\n\t}\n}", "title": "" }, { "docid": "8bcb8572127e60edfadda22556bfcf7b", "score": "0.5808636", "text": "public function destroycart()\n\t{\n\n\t\t$this->cart->destroy();\n\t\t$this->session->unset_userdata('discountamount');\n\t\t$url = base_url();\n\n\t\tredirect($url);\n\t}", "title": "" }, { "docid": "4d00c3ce4d80018a60654fff8a759eb0", "score": "0.5797142", "text": "public function _unsetSessionVars()\n {\n \tunset($_SESSION[\"cybersource_currency\"]);\n\t unset($_SESSION[\"cybersource_total\"]);\n\t unset($_SESSION[\"cyberscoure_cardtype\"]);\n\t \t$mSession=Mage::getSingleton('core/session');\n \t$mSession->unsetData('billing');\n \t$mSession->unsetData('shipping');\n \t$mSession->unsetData('purchase_totals');\n \tMage::getSingleton('checkout/session')->unsetData('additional_data');\n \tMage::getSingleton('checkout/session')->unsetData('cyber_source_last_request_id');\n \tMage::getSingleton('checkout/session')->unsetData('cyber_source_last_request_token');\n \tMage::getSingleton('checkout/session')->unsetData('merchant_reference_code');\n }", "title": "" }, { "docid": "e59ea50554f3207cc46ad0f8b4c56fcc", "score": "0.5795664", "text": "public function deleteBuy($cle){\n\t\tunset($_SESSION['panier'][$cle]);\n\t\trequire_once($_SERVER['DOCUMENT_ROOT'].'/fantasy/views/items/basket.php');\n\t}", "title": "" }, { "docid": "c48cb810ad1ee84b52bc0e7842803c2d", "score": "0.5793569", "text": "public static function destroy()\n\t{\n\t\t\\Session::delete('cart_contents');\n\t\tstatic::_init(false);\n\t}", "title": "" }, { "docid": "3bdda12989d576148c3fa90dd21c1bb3", "score": "0.57871014", "text": "function wp_destroy_other_sessions() {}", "title": "" }, { "docid": "215d80b273d63f4bac5dd19fe175b9a2", "score": "0.57852167", "text": "function deleteCartItem(){\n $locale = getRequest(\"locale\");\n $lang['cart_empty'] = ($locale == \"vn\") ? \"Bạn không có sản phẩm nào trong giỏ hàng\" : \"Your cart is empty\";\n $lang['removed'] = ($locale == \"vn\") ? \"Đã xóa sản phẩm khỏi giỏ hàng\" : \"Product removed from cart\";\n \n if (isset($_SESSION['cart']) and !empty($_SESSION['cart'])) {\n $product_id = intval(getRequest('id'));\n if($product_id > 0){\n $cart = $_SESSION['cart'];\n $totalAmount = 0;\n foreach ($cart as $key => $product) {\n if($product['id'] == $product_id){\n unset($cart[$key]);\n }else{\n $totalAmount += $product['amount'];\n }\n }\n array_values($cart);\n $_SESSION['cart'] = $cart;\n\n Response(json_encode(array(\n 'status' => 'success',\n 'countCart' => count($cart),\n 'totalAmount' => number_format($totalAmount,0,',','.') . \" đ\",\n 'message' => $lang['removed'],\n )));\n }\n }else{\n Response(json_encode(array(\n 'status' => 'error',\n 'message' => $lang['cart_empty'],\n )));\n }\n exit();\n}", "title": "" }, { "docid": "1c0c75322a637c4a5c12b1b4091fb522", "score": "0.5781431", "text": "private function killConfirm(){\n $_SESSION[\"_orongoauth_confirm_uid\"] = null;\n $_SESSION[\"_orongoauth_confirm_action\"] = null;\n $_SESSION[\"_orongoauth_confirm_expire\"] = null;\n }", "title": "" }, { "docid": "7209aad00a13d1e68aa62dce4c90dc2b", "score": "0.5780135", "text": "function energyfolks_logout() {\n $wp_session = WP_Session::get_instance();\n if(get_option('energyfolks_plugin_enabled') != '1') return;\n $wp_session['energyfolks_logged']=false;\n $wp_session['energyfolks_blog_error'] = \"<script language=javascript>\n window.location.href = EnergyFolks.server_url + '/users/logout?'+EnergyFolks.urlhash()+'&aid=\" . get_option('energyfolks_affiliate_id') . \"&no_callback=true';\n </script>\";\n}", "title": "" }, { "docid": "db64e7864c9f71fce5e2a4179dc93b24", "score": "0.57799286", "text": "public function destroy()\n {\n unset($_SESSION['token']);\n }", "title": "" }, { "docid": "0e04d4dbbdb04245146c102af6b19062", "score": "0.5774953", "text": "private function removeIsConsolidateAccount()\n {\n $this->get('session')->remove('client.accounts.is_consolidate_account');\n }", "title": "" }, { "docid": "9404e92b4559474f8d1b17923a6af04d", "score": "0.57723963", "text": "public function keluar()\r\n {\r\n session_destroy();\r\n header('location:' . url . 'masuk.php');\r\n }", "title": "" }, { "docid": "8d9fedbf4096b615fa2b1f313d005c2a", "score": "0.5766639", "text": "function removeProductBasket($key) {\n //calculateBasket(false, $_SESSION[\"basket\"][$key][\"price\"]);\n //On retire ce produit du tableau\n unset($_SESSION[\"basket\"][$key]);\n //On calcule le nouveau montant du panier\n calculateBasket();\n //On renvoie vers la page panier avec un message de succès pour confirmer le retrait du panier\n header(\"Location: basket.php?success=produits retiré du panier\");\n}", "title": "" }, { "docid": "5c6ed16a407a94b76c057c286d790967", "score": "0.57525074", "text": "function logout(){\n\tif(isset($_SESSION['buddyexpressdesk.user.admin'])){\n unset($_SESSION['buddyexpressdesk.user.admin']);\n\t\t\tsession_destroy();\n }\n}", "title": "" }, { "docid": "e533175afc9be286e2181f24cd0454bf", "score": "0.5735968", "text": "public function bypass_currency_session() {\n\t\tWC()->session->set( self::CURRENCY_BYPASS_SESSION, true );\n\t}", "title": "" }, { "docid": "fc93b8d1e0b7f20eb3969ac1504e3b33", "score": "0.57235944", "text": "public function deconnexion()\n {\n\n\n if (\n !empty($this->input->post('confirm'))\n &&\n $this->input->post('confirm') == 'yes'\n ) {\n\n unset($_COOKIE[\"jt_jarditou\"]);\n $cookie = array(\n 'name' => 'jarditou',\n 'value' => '',\n 'expire' => '-4200',\n 'domain' => '' . $_SERVER['HTTP_HOST'] . '',\n 'path' => '/',\n 'prefix' => 'jt_',\n 'secure' => false\n );\n $this->input->set_cookie($cookie);\n $_SESSION['login'] = \"\";\n $_SESSION['jeton'] = \"\";\n $this->load->helper('cookie');\n delete_cookie(\"jt_jarditou\");\n session_destroy();\n redirect(\"produits/liste\");\n }\n\n }", "title": "" }, { "docid": "381845a5ec524a863784326f957891c6", "score": "0.5717785", "text": "private function closeCurrentSession(){\n if (isset($this->pstring2)) {\n if($this->pstring2 === 'logout'){\n if (isset($_SESSION['email_pr']) AND isset($_SESSION['keyuniqid_pr'])){\n $this->closeSession();\n session_unset();\n $_SESSION = array();\n session_destroy();\n session_start();\n $uriparams = array('level'=>'login');\n header('location: '. $this->seoURLProfil(frontend_model_template::current_Language(),$uriparams));\n }\n }\n }\n }", "title": "" }, { "docid": "d277988467846bc1a9768876eb949789", "score": "0.5712799", "text": "protected function clearSessionMageworxDonation()\n {\n $this->donationHelper->getCurrentSession()->setMageworxDonationDetails(null);\n }", "title": "" }, { "docid": "6eb3ac6ace41881973938781713e1731", "score": "0.57047", "text": "public function deco(){\n $this->session->unset_userdata('userco');\n }", "title": "" }, { "docid": "35ae0f36c222e2677c48cfbfc154eb6d", "score": "0.5675967", "text": "function destroyStatementData() {\r\n unset($_SESSION['email_pdf_statement']);\r\n }", "title": "" }, { "docid": "c3ca0e259736e9d6f15c1d2633226a10", "score": "0.567125", "text": "function destroy() {\n //TODO:refactor \n $this->cart->destroy();\n }", "title": "" }, { "docid": "f94a9ebb8b99ec952a54cb6035f8cbb7", "score": "0.5662914", "text": "public function deleteSessionCarrito(){\n unset($_SESSION[\"carrito\"]);\n\n //redirigimos al home \n header(\"Location:http://localhost/labotadenoel/?nombre_del_controlador=home&action=home\");\n }", "title": "" }, { "docid": "8040734517d05ffd157f0fcdedaa2128", "score": "0.56604236", "text": "public function emptyCart()\n {\n unset($_SESSION['cart']);\n }", "title": "" }, { "docid": "f644c4d6869f58470de6267a51829823", "score": "0.5660098", "text": "public static function destroyLoggedInData()\n {\n if (isset($_COOKIE['idyl_tkn'])) {\n // echo \"cookies deleted <br>\";\n $tkn = $_COOKIE['idyl_tkn'];\n $deleteQuery = \"DELETE FROM cookietable WHERE cookieID='$tkn'\";\n\n parent::checkConnection();\n if (parent::returnConnection()->query($deleteQuery)) {\n parent::returnConnection()->close();\n\n // delete cookie data if cookie data is deleted from the database\n setcookie('idyl_qni', \"\", time() - 86400, \"/\");\n setcookie('idyl_tkn', \"\", time() - 86400, \"/\");\n setcookie('idyl_unm', \"\", time() - 86400, \"/\");\n setcookie('idyl_uem', \"\", time() - 86400, \"/\");\n\n\n // exit(json_encode($msg));\n $message = array(\n 'status'=>true,\n 'cookieCode'=>$tkn\n );\n\n $final = json_encode($message, true);\n return $final;\n\n }else {\n $message = array(\n 'status'=>true,\n 'cookieCode'=>$tkn\n );\n\n $final = json_encode($message, true);\n return;\n }\n\n\n } elseif (isset($_SESSION)) {\n session_unset();\n session_destroy();\n\n // header('location: /');\n $msg = array(\n 'status'=>array(\n \t\t\t\t\t'code'=> 101,\n 'code_status'=>'success'\n ),\n 'data'=>array(\n 'msg'=>'session data destroyed successfully'\n )\n );\n\n return json_encode($msg);\n\n }\n }", "title": "" }, { "docid": "27778e50b46e5f40b08928e831795a92", "score": "0.56557983", "text": "public function deconnexion()\n {\n\n $aViewHeader = $this->usersModel->getUser();\n $aViewHeader = [\"title\" => \"Déconnexion\", \"user\" => $aViewHeader];\n \n //removing session \n\n if (\n !empty($this->input->post('confirm'))\n &&\n $this->input->post('confirm') == 'yes'\n ) {\n\n unset($_COOKIE[\"jt_wazaaimmo\"]);\n setcookie(\"jt_wazaaimmo\", '', time() - 4200, '/');\n $_SESSION['login'] = \"\";\n $_SESSION['jeton'] = \"\";\n session_destroy();\n redirect(\"annonces/liste\");\n }\n return $aViewHeader;\n }", "title": "" }, { "docid": "0d9f150dfa721f3aaba1d395e43efc1e", "score": "0.5651403", "text": "public function deduct_account_credits ()\r\n\t{\r\n\t\t$url = \"userdata/\".$this->accountId.\"/transactions\";\r\n\t\t$request = \"\";\r\n\t\t$return = $this->submit_api_request ($request, $url);\r\n\t\t$response = json_decode ($return, true);\r\n\t}", "title": "" }, { "docid": "162a44660f60867cc74abcbd608aeb2c", "score": "0.5650911", "text": "public function cancelPayment()\n {\n\n }", "title": "" }, { "docid": "c8d76d1cc8a225c955b09efe7b8a6a2c", "score": "0.5634726", "text": "public function destroytoken() {\n $_SESSION[\"token\"] = \"\";\n\n // Redirecionar e apresentar a mensagem de sucesso\n $this->message->setMessage(\"Você fez o logout com sucesso!\", \"success\", \"index.php\");\n\n }", "title": "" }, { "docid": "5815fdd92166c0153286f78abd57c3c3", "score": "0.5634286", "text": "public function clearCart(){\n $name = \"cart\";\n $now = time();\n $expiry = $now - 1;\n $cid = new Token(8);\n setcookie($name, $cid, $expiry , \"/\");\n }", "title": "" }, { "docid": "8050b6c11b1fc2f95be7980872f88773", "score": "0.5631728", "text": "public function deconnexionAction(){\n $session = $this->container->get('session');\n $session->invalidate();\n return $this->redirectToRoute(\"bl_bi_connexion\");\n }", "title": "" }, { "docid": "4c203b55d6ba54b028474f0deecfcaf3", "score": "0.5631094", "text": "public function remove()\n {\n $json = array();\n\n $this->session->data['voucher'] = null;\n\n $this->response->addHeader('Content-Type: application/json');\n $this->response->setOutput(json_encode($json));\n }", "title": "" }, { "docid": "a5c74fc4bbc3bfd898631ef0607dd1bf", "score": "0.56219727", "text": "private function removeFromCart()\n {\n $response = array();\n if (isset($this->domain)) {\n foreach ($_SESSION[\"cart\"][\"domains\"] as $index => $domain) {\n if (in_array($this->domain, $domain)) {\n unset($_SESSION[\"cart\"][\"domains\"][$index]);\n $response[\"feedback\"] = $this->i18n->getText(\"remove_from_cart\");\n }\n }\n }\n $this->response = json_encode($response);\n }", "title": "" }, { "docid": "0154fbb1507b2e41a3922817e213d3d1", "score": "0.561905", "text": "public function postClose()\n {\n $redirectUrl = $this->url->getUrl('checkout/cart', ['_query' => 'reload=1']);\n /** @var \\Magento\\Framework\\App\\Response\\Http $response */\n $response = $this->responseFactory->create();\n try {\n $orderID = $this->request->getParam('orderID', null);\n $order = $this->orderInterface->loadByIncrementId($orderID);\n $orderData = $order->getData();\n $quoteID = $orderData['quote_id'];\n $quote = $this->quoteFactory->create()->loadByIdWithoutStore($quoteID);\n if ($quote->getId()) {\n $quote->setIsActive(1)->setReservedOrderId(null)->save();\n $this->checkoutSession->replaceQuote($quote);\n $this->coreRegistry->register('isSecureArea', 'true');\n $order->delete();\n $this->coreRegistry->unregister('isSecureArea');\n $response->setRedirect($redirectUrl)->sendResponse();\n\n return;\n }\n\n $response->setRedirect($redirectUrl)->sendResponse();\n } catch (\\Exception $exception) {\n $this->logger->error($exception->getMessage());\n $response->setRedirect($redirectUrl)->sendResponse();\n }\n }", "title": "" }, { "docid": "6d5c2eb1f4a709da93bd7fa21f112c05", "score": "0.561889", "text": "private function _clearSession() {\n //getData and then remove (2nd variable)\n $this->checkoutSession->getData( self::ADDITIONAL_INFORMATION_KEY_MONY_TOKEN, true );\n $this->checkoutSession->getData( self::ADDITIONAL_INFORMATION_KEY_MONY_DIGIT, true );\n $this->checkoutSession->getData( self::ADDITIONAL_INFORMATION_KEY_MONY_CC_ENC, true );\n $this->checkoutSession->getData( self::ADDITIONAL_INFORMATION_KEY_MONY_SAVE_CARD, true );\n }", "title": "" }, { "docid": "0f7d8077da68372dde28a8e9789607ca", "score": "0.5617924", "text": "function paymentCancel()\n\t\t{\t\t\t\t\t\n\t\t\t$message = \"Payment not done.\";\n\t\t\theader(\"location:index.php?stage=subscriber&mode=MyProfile&sErrorMessage=\".$message);\n\t\t}", "title": "" }, { "docid": "6f6aeab8cc700b93b97efd9df2f89d66", "score": "0.5611479", "text": "static public function ctrClientDelete(){\n\t\tif (session('id')) {\n\t\t\tif (isset($_POST['idCliente'])) {\n\t\t\t$answer = App\\Client::find($_POST['idCliente']);\n\t\t\t$answer->delete();\n\t\t\t$answer->subscriptions()->delete();\n\t\t\t}\n\t\t}else{\n\t\t \treturn view('layouts.permisions_error');\n\t\t}\n\t}", "title": "" }, { "docid": "73aaf53a31e1c5e42edd458facb1ec37", "score": "0.56074786", "text": "function tep_exit() {\n tep_session_close();\n exit();\n }", "title": "" }, { "docid": "73aaf53a31e1c5e42edd458facb1ec37", "score": "0.56074786", "text": "function tep_exit() {\n tep_session_close();\n exit();\n }", "title": "" }, { "docid": "a70905f99d160a17ebb7b57d9fec4589", "score": "0.5606336", "text": "public function clearCart(){\r\n $_SESSION['products'] = array();\r\n }", "title": "" }, { "docid": "577bf800e21fb35dcd583c719b16f079", "score": "0.56057227", "text": "public function destroy(GiftCardPurchase $card)\n {\n }", "title": "" }, { "docid": "47fb2550aed9b1c5d4af7af3e95e1132", "score": "0.56042355", "text": "function delete_currency($currency_code){\n $db = new DB();\n $sql=$db->row(\"DELETE FROM digitulus_currency WHERE currency_code= :c\", array(\"c\" => $currency_code)); \n return($sql);\n }", "title": "" }, { "docid": "b82d9c7c54e5f95b74fdce72c4ccf4db", "score": "0.560406", "text": "static function do_on_deactivation() {\n\n\t\t//delete_option('RTLOSU_reference_site' );\n\t}", "title": "" }, { "docid": "a56f3b22f382833c7fe4aa69e31c4fc7", "score": "0.5601866", "text": "public function destroySession()\n {\n }", "title": "" }, { "docid": "2c16a28d2d3e92acc9c4735d74a15b62", "score": "0.5599193", "text": "function deactivate()\r\n\t\t{\r\n\t\t\t$wpsc_plugin_dir = dirname(dirname(__file__)) . '/wp-e-commerce/merchants';\r\n\t\t\tif(file_exists($wpsc_plugin_dir . '/cheque-virement.merchant.php'))\r\n\t\t\t{\r\n\t\t\t\tunlink($wpsc_plugin_dir.'/cheque-virement.merchant.php');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "8f9ba45b6f99d20dc7956d2fb5504d79", "score": "0.559875", "text": "public function destroy()\n {\n $cart = session()->get('cart');\n\n if ($cart == true) {\n session()->forget('cart');\n session()->forget('coupon');\n }\n session()->save();\n\n return view('pages.cart.show_cart_ajax');\n }", "title": "" }, { "docid": "0f4809ac52b29921125310f99845e166", "score": "0.5593353", "text": "public function delete()\n {\n session_destroy();\n $_SESSION = null;\n }", "title": "" }, { "docid": "09c38aff6ea6bd877097e8740f49fc15", "score": "0.55922127", "text": "public function deconnexion(){\n\t\tunset($_SESSION['neozorus']);\n\t\theader('Location:.');\n\t\texit;\n\t}", "title": "" }, { "docid": "b9fbc83f8f8f236ec14931b89764dd1b", "score": "0.5591477", "text": "public function debit()\n {\n }", "title": "" }, { "docid": "69489c6a4b216601eb0587e1e994e9b2", "score": "0.55897945", "text": "function deletePaymentMember(){\n\t}", "title": "" }, { "docid": "0c5fa97e657f1405f572d000ae7efb78", "score": "0.558616", "text": "public function index()\n {\n $this->session->sess_destroy();\n $this->session->unset_userdata('customerNameSess');\n echo \"<script> window.location = 'home';</script>\";\n }", "title": "" }, { "docid": "d93d5d1a74bf3585b6110fb74b858b99", "score": "0.557964", "text": "public static function closeTransactionSession(){\n\t //if guest session exists, unset it\n\t if(Zend_Session::sessionExists('payment')){\n\t\tZend_Session::start();\n\t\tZend_Session:: namespaceUnset('payment');\n\t\tZend_Session::destroy(true);\n\t\t//Zend_Session::expireSessionCookie();\n\t\t}\n }", "title": "" }, { "docid": "eb735ee3ac5117283c4ab045dc190b3b", "score": "0.55773056", "text": "public function payCancel()\n {\n if( ($this->isPaymentSessionActive()) && (Session::isLoggedIn()) )\n {\n\n $this->paymentSessionDeactivate();\n\n SCMUtility::setFlashMessage('You have cancelled your payment.','info');\n\n } else {\n\n SCMUtility::setFlashMessage('Ops! looks like something went wrong!','info');\n\n }\n\n // debugging\n if( Settings::isPayPalLoggingEnabled() )\n {\n $log = new Log();\n $log->payPalLog('--------Start PayPal logging debug--------');\n $log->payPalLog('Pay Pal Advanced Cancel Handle was triggered!');\n $log->payPalLog('--------End PayPal logging debug--------');\n }\n }", "title": "" }, { "docid": "11a60ea072af11098b3f45f53d48a5c2", "score": "0.5577128", "text": "function remove_from_cart(){\n\t\tglobal $conn;\n\t\t$product_id = $_GET('remove_cart');\n\t\t$user_ip = getIp();\n\t\t$isLogg = isLogg();\n\t\tif ($isLogg)\n\t\t{\n\t\t\t$user_id = $_SESSION['email'];\n\t\t\t$is_active = 1;\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "4f85fb6a34690b395876853c9c15c151", "score": "0.5573796", "text": "public function retireDeLaSession()\n {\n $this->session->set('commande', null);\n }", "title": "" }, { "docid": "7939ee50170a67f044e0299b4e687d62", "score": "0.55722183", "text": "public function _rationingLoginLogout() {\n $this->session->sess_destroy();\n echo 'success';\n }", "title": "" }, { "docid": "23faf94bcdfc5a41ac40576d76465c3c", "score": "0.5566887", "text": "public function destroy(Currency $currency)\n {\n $currency->delete();\n\n return redirect()->back()->with('success', 'Валюта успешно удалена');\n }", "title": "" }, { "docid": "e490b6055a67b87af1f5bdc600e9b6df", "score": "0.55662256", "text": "public function cartKill()\n\t{\n\t\tunset($_SESSION[$this->_sessionKey]);\n\t\tunset($_SESSION['aaCartProd']);\n\t}", "title": "" }, { "docid": "bef2ef5dc6e40c9556168f2465f4395b", "score": "0.5551598", "text": "public function customerLogout($observer)\n {\n $helper = Mage::helper(\"loyalty\");\n $model = Mage::getModel(\"loyalty/points\");\n\n if($helper->isActive()) {\n Mage::helper(\"loyalty\")->resetLoyaltyDiscount();\n }\n }", "title": "" }, { "docid": "d8c3c104f1de248325870efbdf215ad9", "score": "0.5550912", "text": "function deactivate_onepay() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-onepay-deactivator.php';\n\tOnepay_Deactivator::deactivate();\n}", "title": "" }, { "docid": "1ba09a6a76b9468433ea5a48e30a7f81", "score": "0.5546798", "text": "public function currency_destory($id)\n {\n if(!hasTask('admin/settings/general'))\n {\n return view('errors.404');\n }\n $data = Currencies::find($id);\n $data->delete();\n Session::flash('message', trans('messages.Currency has been deleted successfully!'));\n return Redirect::to('admin/localisation/currency');\n }", "title": "" }, { "docid": "66f27d6695bd4bfa69b543a1675c9d1a", "score": "0.55427456", "text": "function delete_Session() {\r\n\t\tsession_unset(); // détruire toutes les variables SESSION\r\n\t\tsetcookie(\"POKER\", $_SESSION['user'], time() - 3600, \"/\"); // permettre de détruire bien comme il faut le cookie du user\r\n\t\tsession_destroy();\r\n\t\tsession_write_close(); // https://stackoverflow.com/questions/2241769/php-how-to-destroy-the-session-cookie-correctly\r\n\t}", "title": "" }, { "docid": "4a6e6c983b6f684e6c09dda1426fbde6", "score": "0.5524786", "text": "function cancel() {\n $this->session->unset_userdata('flight');\n redirect('/flights');\n }", "title": "" }, { "docid": "a82fc03ec9cd428ed0f4aaa7d9504e14", "score": "0.5523973", "text": "private function action_purgesession() {\n $this->_tab_state->clear();\n }", "title": "" }, { "docid": "e775202a8d265967456a1996206d4912", "score": "0.55232054", "text": "public function destroy()\n {\n $Messages = CustomUtils::language_pack(session()->get('multi_lang'));\n auth()->logout();\n return redirect()->route('main.index')->with('alert_messages', $Messages::$logout_chk['logout']['message']['logout']);\n exit;\n }", "title": "" }, { "docid": "2b26d9762659d3574d4f80897fd0a32d", "score": "0.5503328", "text": "function handleLogout(){\n // remove that session >:3\n session_destroy();\n }", "title": "" }, { "docid": "209bb963b4f9dc6bf56414473c676a1e", "score": "0.5502774", "text": "function logout()\n\t{\n\t\t$this->CI->carpool_session->unset_userdata('travel');\n\t\t$this->CI->carpool_session->sess_destroy();\n\t}", "title": "" }, { "docid": "72959a4c530b37d213e137deb0efe4b7", "score": "0.550235", "text": "function media_credit_uninstall() {\n\tdelete_option(MEDIA_CREDIT_OPTION);\n}", "title": "" } ]
51f1faf4b741d4b79b426ac190c71952
///////////////////// Utility functions. ///////////////////// Creates a frontend user in the mapper (in memory), a city in the database and a object in the database with that user as owner and that city.
[ { "docid": "e4e6c61bfdcf970f1b8e83aaba56cb0f", "score": "0.61929053", "text": "private function createObjectWithOwner(array $userData = array()) {\n\t\t$owner = tx_oelib_MapperRegistry::get('tx_realty_Mapper_FrontEndUser')\n\t\t\t->getLoadedTestingModel($userData);\n\t\t$this->ownerUid = $owner->getUid();\n\t\t$this->cityUid\n\t\t\t= $this->testingFramework->createRecord('tx_realty_cities');\n\t\t$this->objectUid = $this->testingFramework->createRecord(\n\t\t\t'tx_realty_objects',\n\t\t\tarray(\n\t\t\t\t'title' => self::OBJECT_TITLE,\n\t\t\t\t'pid' => $this->systemFolderPid,\n\t\t\t\t'city' => $this->cityUid,\n\t\t\t\t'owner' => $this->ownerUid,\n\t\t\t)\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "4df557281eec63b86647a4b935ff2f8b", "score": "0.60644984", "text": "private function buildUserObject ()\n\t{\n\t\tif (!isset($_SESSION[config::APP_NAMESPACE]))\n\t\t\t\t$this->reloadTarget(config::LOGIN_URL);\n\t\t\t$id = $_SESSION[config::APP_NAMESPACE];\n\t\t\t$this->user = (object) $this->query(\"SELECT * from users WHERE id='{$id}'\")[0];\n\t\t\tif ($this->user->company_id > 0)\n\t\t\t\t$this->company = (object) $this->query(\"SELECT * from companies WHERE id='{$this->user->company_id}'\")[0];\n\t\t\tif (!$this->user) die(); // At this point we should have an id because the modal would've died.. \n\t}", "title": "" }, { "docid": "4668339d2e47c237e036c3d4e774fe73", "score": "0.60434496", "text": "public function setUserObject()\n {\n $inUserObject = new \\lwIntranetuser\\Model\\UserObject();\n $inUserObject->setUserId($this->in_auth->getUserData(\"id\"));\n $inUserObject->setUsername($this->in_auth->getUserData(\"name\"));\n $inUserObject->setPassword($this->in_auth->getUserData(\"password\"));\n $inUserObject->setIntranetId($this->in_auth->getUserData(\"intranet_id\"));\n $inUserObject->setEmail($this->in_auth->getUserData(\"email\"));\n $inUserObject->setFirstName($this->in_auth->getUserData(\"opt1text\"));\n $inUserObject->setLastName($this->in_auth->getUserData(\"opt2text\"));\n \n return $inUserObject;\n }", "title": "" }, { "docid": "2dfe4e9e88e3951b202f74115b53148f", "score": "0.60121495", "text": "static function createUser()\n\t{\n\t\t$class = new ReflectionClass(self::$db . 'User');\n\t\treturn $class->newInstance();\n\t}", "title": "" }, { "docid": "0fa5be462f175e18b482f897119f1210", "score": "0.59884655", "text": "protected function generateUser()\n {\n $oServer = \\Limbonia\\Input::singleton('server');\n\n if (!empty($oServer['http_auth_token']))\n {\n return $this->userByAuthToken($oServer['http_auth_token']);\n }\n\n if (!empty($oServer['http_api_key']))\n {\n return $this->userByApiKey($oServer['http_api_key']);\n }\n\n return $this->modelFactory('user');\n }", "title": "" }, { "docid": "2f035d63386b9d2335fda0adcb959256", "score": "0.59504575", "text": "public static function createCity($data)\n {\n $city = new City();\n $city->name = $data['name'];\n $city->timezone_id = $data['timezone_id'];\n $city->save();\n\n /** Link city to the user */\n $city_user = new CitiesUser();\n $city_user->user_id = auth()->user()->id;\n $city_user->city_id = $city->id;\n $city_user->save();\n\n return $city_user;\n }", "title": "" }, { "docid": "5d53edad37bbc570cbdc1d9a7ca68256", "score": "0.59319603", "text": "function _create_user($oc_user) {\n $password = $this->_get_password();\n\n $user_data = array(\n 'user_pass' => $password,\n 'user_login' => $oc_user->email,\n 'first_name' => $oc_user->first_name,\n 'last_name' => $oc_user->last_name,\n 'display_name' => $oc_user->first_name . ' '. $oc_user->last_name,\n 'email' => $oc_user->email\n );\n \n require_once(WPINC . DIRECTORY_SEPARATOR . 'registration.php');\n $user_id = wp_insert_user($user_data);\n update_usermeta($user_id, 'onlyconnect_id', $oc_user->id);\n return get_userdatabylogin($oc_user->email);\n }", "title": "" }, { "docid": "a9f19149a4d5c2581a11edafd16515da", "score": "0.59101146", "text": "function create_user_object(){\n\t\t\t$_User_ = User();\n\n\t\t}", "title": "" }, { "docid": "8ab50e0174649098332304de2fa7912b", "score": "0.5886924", "text": "function createUserAccount(){\n\n\t\t\t}", "title": "" }, { "docid": "0faf716a1269936f3ad23a754f2a15d3", "score": "0.5880847", "text": "function make_dummy_user() {\n $u = new stdClass;\n $u->id = 0;\n $u->first_name = '';\n $u->last_name = '';\n $u->username = '';\n $u->password = '';\n $u->reset = '';\n $u->reset_time = 0;\n $u->isadmin = 0;\n $u->email = '';\n $u->oauth2_login = '';\n $u->created_time = 0;\n $u->last_login = 0;\n $u->warning_sent = 0;\n $u->isteacher = 0;\n $u->preflang = '';\n $u->prefvariant = '';\n $u->family_name_first = 0;\n $u->istranslator = 0;\n $u->accept_policy = 0;\n $u->policy_lang = '';\n $u->acc_code = '';\n $u->acc_code_time = 0;\n\n return $u;\n}", "title": "" }, { "docid": "a8f023436b2502c8a1bb2addb384d846", "score": "0.5858772", "text": "public function createUser(){\n $user = new User();\n $user->persist();\n $user->save();\n \n return $this->instanciateUser($user);\n }", "title": "" }, { "docid": "69169f42fc35c1642b3be6b15449a12f", "score": "0.5845225", "text": "function create_user_account($user_name, $password, $user_type)\r\n{\r\n create_user($user_name, $password);\r\n\r\n if(is_student_user($user_type))\r\n create_student($user_name);\r\n else if(is_instructor_user($user_type))\r\n create_instructor($user_name);\r\n \r\n\r\n}", "title": "" }, { "docid": "44330e58827bb2f1775341db64325a79", "score": "0.58342105", "text": "public function createUser() {\n $this->params = $this->dbFields;\n $this->appRESTMethod = \"POST\";\n return $this->doCallDynamoDB();\n }", "title": "" }, { "docid": "a19044b66c73f5c59a3450b4c74ca45e", "score": "0.5829284", "text": "function insertUser( $userObj )\n { \n // 1. create user\n $userCreatedObject=$this->fundamentalInsertUser($userObj);\n\n // 2. add a user platform ... \n // create the user domain\n\n $userDomain=new TextObjectDomainUser();\n $userDomain->setArgument($userObj->userAvatar);\n $userDomain->textobjectUserRef= $userObj->userId;\n $userNewDomain=$this->insertTextObject($userDomain,$userCreatedObject->userId); \n\n // add admin\n $this->insertRuleByValueFor(\"admin\",$userNewDomain->textobjectId,$userCreatedObject->userId,$userCreatedObject->userId); \n\n return $userObj; \n }", "title": "" }, { "docid": "27b098700a02fb7cdc71fe68e27bf79d", "score": "0.5789869", "text": "abstract protected function create(User $user, $code);", "title": "" }, { "docid": "0cdeac199ae2667780dc7e8bc34dd15d", "score": "0.5779404", "text": "function MakeUser($username, $email, $password, $birth)\n {\n\n }", "title": "" }, { "docid": "9d15a7b03984d2e8755cb08e6c6e86b0", "score": "0.57633454", "text": "abstract protected function user();", "title": "" }, { "docid": "3b57c23e3194ef82bd04008b8f58a7db", "score": "0.57540816", "text": "public function createUser($firstName, $lastName, $email, $password, $phone, $mobile, $clientID, $clientRole, $roleID, $isAdministrator=false)\n {\n }", "title": "" }, { "docid": "3ba6009ccaf68345eb499b5bdc206ae9", "score": "0.5749037", "text": "public function setCreator(UserInterface $user);", "title": "" }, { "docid": "08f3617cb050d27c65e69a02edf2c849", "score": "0.5746279", "text": "public function create()\n\t{\n\t\t$this->date_created = time();\n\t\t\n\t\t$user = Dc_Auth::instance()->get_user(\n\t\t\tSprig::factory('user'),\n\t\t\tSprig::factory('usertoken')\n\t\t);\n\t\t\n\t\tif ($user)\n\t\t{\n\t\t\t$this->created_by = $user->id;\n\t\t}\n\t\t\n\t\treturn parent::create();\n\t}", "title": "" }, { "docid": "0320543a027d9d5cd4dd6c79e7efc93f", "score": "0.57325673", "text": "function createUserRegistrated()\n {\n $friendObj=$this->createSpecialUser( \"Registrated Platform Users\", \"registrated\", 0 );\n return $friendObj;\n }", "title": "" }, { "docid": "a20362e36a797b5142bba6528e25c765", "score": "0.5723491", "text": "public function createUser()\n {\n $class = $this->getClass();\n $user = new $class;\n\n foreach(Phone::getValidTypes() as $phoneType){\n if(!$user->hasPhoneType($phoneType)){\n $phone = new PhoneUser();\n $phone->setType($phoneType);\n $user->addPhone($phone);\n }\n }\n\n return $user;\n }", "title": "" }, { "docid": "4e62ad3961c3d00978ddff192f60502e", "score": "0.5721438", "text": "private function create_admin_user()\n\t{\n\t\t$admin_username = $this->handler_vars['admin_username'];\n\t\t$admin_email = $this->handler_vars['admin_email'];\n\t\t$admin_pass = $this->handler_vars['admin_pass1'];\n\n\t\tif ( $admin_pass{0} == '{' ) {\n\t\t\t// looks like we might have a crypted password\n\t\t\t$password = $admin_pass;\n\n\t\t\t// but let's double-check\n\t\t\t$algo = strtolower( substr( $admin_pass, 1, 3 ) );\n\t\t\tif ( ( 'ssh' != $algo ) && ( 'sha' != $algo ) ) {\n\t\t\t\t// we do not have a crypted password\n\t\t\t\t// so let's encrypt it\n\t\t\t\t$password = Utils::crypt( $admin_pass );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$password = Utils::crypt( $admin_pass );\n\t\t}\n\n\t\t// Insert the admin user\n\t\t$user = User::create( array (\n\t\t\t'username' => $admin_username,\n\t\t\t'email' => $admin_email,\n\t\t\t'password' => $password\n\t\t) );\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "897e807b072afe9b16966110659ef29a", "score": "0.57127994", "text": "public function test_mapping_applied_during_user_create() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/core/lib/data/customfield.class.php');\n require_once($CFG->dirroot.'/elis/program/accesslib.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n $this->init_mapping();\n\n $customfieldid = $this->create_custom_field();\n\n // Clear the cached custom field list.\n $usertoclearcustomfieldlist = new user;\n $usertoclearcustomfieldlist->reset_custom_field_list();\n\n // Run the user create action.\n $record = new stdClass;\n $record->customaction = 'create';\n $record->customusername = 'testuserusername';\n $record->custompassword = 'Testpassword!0';\n $record->customidnumber = 'testuseridnumber';\n $record->customfirstname = 'testuserfirstname';\n $record->customlastname = 'testuserlastname';\n $record->custommi = 'testusermi';\n $record->customemail = 'testuser@email.com';\n $record->customemail2 = 'testuser@email2.com';\n $record->customaddress = 'testuseraddress';\n $record->customaddress2 = 'testuseraddress2';\n $record->customcity = 'testusercity';\n $record->customstate = 'testuserstate';\n $record->custompostalcode = 'testuserpostalcode';\n $record->customcountry = 'CA';\n $record->customphone = 'testuserphone';\n $record->customphone2 = 'testuserphone2';\n $record->customfax = 'testuserfax';\n $record->custombirthdate = 'Jan/01/2012';\n $record->customgender = 'M';\n $record->customlanguage = 'en';\n $record->customtransfercredits = '1';\n $record->customcomments = 'testusercomments';\n $record->customnotes = 'testusernotes';\n $record->custominactive = '0';\n $record->customtestfieldshortname = '1';\n\n $this->run_user_import((array)$record);\n\n // Validation.\n $data = array(\n 'username' => 'testuserusername',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'mi' => 'testusermi',\n 'email' => 'testuser@email.com',\n 'email2' => 'testuser@email2.com',\n 'address' => 'testuseraddress',\n 'address2' => 'testuseraddress2',\n 'city' => 'testusercity',\n 'state' => 'testuserstate',\n 'postalcode' => 'testuserpostalcode',\n 'country' => 'CA',\n 'phone' => 'testuserphone',\n 'phone2' => 'testuserphone2',\n 'fax' => 'testuserfax',\n 'birthdate' => '2012/01/01',\n 'gender' => 'M',\n 'language' => 'en',\n 'transfercredits' => 1,\n 'inactive' => 0\n );\n\n $this->assertTrue($DB->record_exists(user::TABLE, $data));\n\n // Validate password.\n $userrec = $DB->get_record('user', array('username' => $data['username']));\n $this->assertTrue(validate_internal_user_password($userrec, 'Testpassword!0'));\n\n $record = $DB->get_record(user::TABLE, array('username' => 'testuserusername'));\n $this->assertEquals('testusercomments', $record->comments);\n $this->assertEquals('testusernotes', $record->notes);\n\n $instance = context_elis_user::instance(1);\n\n $this->assertTrue($DB->record_exists(field_data_int::TABLE, array(\n 'fieldid' => $customfieldid,\n 'contextid' => $instance->id,\n 'data' => 1\n )));\n }", "title": "" }, { "docid": "11d32ab60fe32ee6f13115f3ba23fe3b", "score": "0.570197", "text": "protected function getNewUserObject(){\n\t\treturn new User();\n\t}", "title": "" }, { "docid": "fa497df0e0dd27b5e985928c2bdca681", "score": "0.57009304", "text": "public function userCreate(){\r\n $userdata = $this->getUserData();\r\n $check = $this->userCheck();\r\n if($check == 0){\r\n if(strstr($userdata['name'], \" \") !== false){\r\n $firstname = strstr($userdata['name'], \" \", true);\r\n $lastname = ltrim(strstr($userdata['name'], \" \"));\r\n }\r\n else{\r\n $firstname = $lastname = $userdata['name'];\r\n }\r\n $user_data = array('user' => array('login' => $userdata['user'], \r\n 'firstname' => $firstname, \r\n 'lastname' => $lastname, \r\n 'mail' => $userdata['email'], \r\n 'password' => chili_passCreate()\r\n ));\r\n $this->request($this->url . 'users.json', 'POST', json_encode($user_data));\r\n }\r\n }", "title": "" }, { "docid": "6dec2c7c72ef19300a75a26054923d18", "score": "0.5687381", "text": "public static function populate()\n {\n Capsule::beginTransaction();\n try {\n $user1 = User::firstOrCreate([\n 'username' => 'tester1'\n ], [\n 'password' => password_hash('test', PASSWORD_DEFAULT),\n 'role' => 'member'\n ]);\n $user2 = User::firstOrCreate([\n 'username' => 'tester2'\n ], [\n 'password' => password_hash('test', PASSWORD_DEFAULT),\n 'role' => 'member'\n ]); \n \n self::createPostOwnedBy($user1);\n self::createPostOwnedBy($user2);\n Capsule::commit();\n # all good\n } catch (\\Exception $e) {\n Capsule::rollback();\n throw $e;\n # something went wrong\n }\n \n # create user\n return $user1;\n }", "title": "" }, { "docid": "e51d8fc791ea71eefd7e13a7cf96fc0b", "score": "0.5678416", "text": "public static function saveOrdinaryUser(){\n\t\t$user = new self;\n\t\t$user->username = e(Input::get('username'));\n\t\t$user->password = Hash::make(e(Input::get('password')));\n\t\t$user->role_id = 1;\n\t\t$user->status_id = 1;\n\t\t$user->save();\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "a6332c6c5a3e3c5087611efec7715f01", "score": "0.56720227", "text": "function shop_create_customer_user(&$data, &$customer, &$newuser) {\n global $CFG, $DB;\n\n // Create Moodle User but no assignation.\n $newuser = new StdClass();\n $newuser->username = shop_generate_username($customer, true); // Unique username\n $newuser->city = $customer->city;\n $newuser->country = (!empty($customer->country)) ? $customer->country : $CFG->country;\n $newuser->lang = (!empty($customer->lang)) ? $customer->lang : $CFG->lang;\n $newuser->firstname = $customer->firstname;\n $newuser->lastname = $customer->lastname;\n $newuser->email = $customer->email;\n\n $newuser->auth = 'manual';\n $newuser->confirmed = 1;\n $newuser->lastip = getremoteaddr();\n $newuser->timemodified = time();\n $newuser->mnethostid = $CFG->mnet_localhost_id;\n\n $params = array('lastname' => $newuser->lastname, 'email' => $newuser->email);\n if (!$olduser = $DB->get_record('user', $params)) {\n $newuser->id = $DB->insert_record('user', $newuser);\n } else {\n $newuser->id = $olduser->id;\n $DB->update_record('user', $newuser);\n }\n\n if (!$newuser->id) {\n return false;\n }\n\n /*\n * We have a real new customer here. We setup in bill's construct for next steps.\n * @see /front/produce.controller.php\n */\n $data->bill->customeruser = get_complete_user_data('username', $newuser->username);\n\n // Passwords will be created and sent out on cron.\n /*\n if (!$oldrec = $DB->get_record('user_preferences', array('userid' => $newuser->id, 'name' => 'create_password'))) {\n $pref = new StdClass();\n $pref->userid = $newuser->id;\n $pref->name = 'create_password';\n $pref->value = 1;\n $DB->insert_record('user_preferences', $pref);\n } else {\n $oldrec->value = 1;\n $DB->update_record('user_preferences', $oldrec);\n }\n */\n\n shop_set_and_send_password($data->bill->customeruser);\n\n if (!$oldrec = $DB->get_record('user_preferences', array('userid' => $newuser->id, 'name' => 'auth_forcepasswordchange'))) {\n $pref = new StdClass();\n $pref->userid = $newuser->id;\n $pref->name = 'auth_forcepasswordchange';\n $pref->value = 0;\n $DB->insert_record('user_preferences', $pref);\n } else {\n $oldrec->value = 0;\n $DB->update_record('user_preferences', $oldrec);\n }\n\n // Bind customer record to Moodle userid.\n $customer->hasaccount = $newuser->id;\n $DB->update_record('local_shop_customer', $customer);\n\n shop_trace(\"[{$data->transactionid}] GENERIC : New user created {$newuser->username} with ID {$newuser->id}.\");\n\n if ($data->actionparams['customersupport']) {\n shop_trace(\"[{$data->transactionid}] GENERIC : Registering Customer Support\");\n shop_register_customer_support($data->actionparams['customersupport'], $newuser, $data->transactionid);\n }\n\n return $newuser->id;\n}", "title": "" }, { "docid": "a7f4d8f7e8377a0e79cfd6e7aaaf3919", "score": "0.56694055", "text": "function createUserInLocalDatabase($identity, array $facebookData)\n {\n }", "title": "" }, { "docid": "6c6e04acdd938cd796b7715ba59209d6", "score": "0.5659439", "text": "public function createUser(User $user);", "title": "" }, { "docid": "1b6547babc3c76b648935c0949130d09", "score": "0.5656584", "text": "public function createUser($user);", "title": "" }, { "docid": "7b9525c9bdc4263961d7b8c6e9eb86a8", "score": "0.56476015", "text": "public function createObjectWithOwnerCreatesObjectInDatabase() {\n\t\t$this->createObjectWithOwner();\n\n\t\t$this->assertTrue(\n\t\t\t$this->testingFramework->existsRecordWithUid(\n\t\t\t\t'tx_realty_objects', $this->objectUid\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "a613eb61e0f48958038012fc7197ed21", "score": "0.5630837", "text": "function createNewUser($app, $cleaned_parameters) {\n $create_user['error'] = true;\n\n $database_settings = $app->getContainer()->get('doctrine_settings');\n $database_connection = \\Doctrine\\DBAL\\DriverManager::getConnection($database_settings);\n $queryBuilder = $database_connection->createQueryBuilder();\n $doctrine_queries = $app->getContainer()->get('doctrineSqlQueries');\n $result = $doctrine_queries::queryCreateNewUser($database_connection, $queryBuilder, $cleaned_parameters);\n\n if($result) {\n $create_user['error'] = false;\n }\n\n return $create_user;\n\n}", "title": "" }, { "docid": "588ed2b15a474987f16992d79e6e07b1", "score": "0.5613343", "text": "public abstract function create(string $username, string|Secret $password): User;", "title": "" }, { "docid": "a830c242ee1534e384bc510c8184c258", "score": "0.560285", "text": "public function createUser(){\n\t\t//new user db connection\n\t\t$userDB = new UserDB();\n\t\t\n\t\t//check if user already exists in database, if set error to true, else create new user\n\t\t$query = $userDB->getSpecificUser(strtolower($this->username));\n\t\tif($query->num_rows == 0){\n\t\t\t$userDB->insertUser($this->username, $this->password, $this->firstname, $this->lastname, $this->street, $this->streetNo, $this->zip, $this->city, $this->phone, $this->email);\n\t\t}else{\n\t\t\t$this->userRegError=TRUE;\n\t\t}\t\n\t}", "title": "" }, { "docid": "c9749b82126292c0b165dbd5b4cc8922", "score": "0.55974436", "text": "function createOrUpdate($params = array())\n\t {\n\t \tglobal $user;\n\t\t\n\t\t// If the user is already loggedin, we automatically\n\t\t// assume the user wants to update his/her own info.\n\t\tif($user->getUsername() != \"Guest\")\n\t\t\t$params = $user->getID();\n\t\t\n\t \t$page_parameters = array();\n\t\t\n\t\t///////////////////////////////////////////////\n\t\t/* ADD CHECK FOR USERS PERMISSION LEVEL HERE */\n\t\t///////////////////////////////////////////////\n\t\t\n\t \t// Check if the parameters passed is an array, and if it has any elements\n\t \t// because if it is, it should contain a user ID. Then we can just take it out,\n\t \t// and put it in to the $page_parameters array as a new userobject, \n\t \tif(is_array($params) && count($params) > 0 && is_numeric($params[0]))\n\t\t\t$page_parameters[\"user\"] = new User(array_shift($params));\n\t\t\n\t\t// But if it's a user object, we can use it straight away \n\t\telse if(gettype($params) == \"User\")\n\t\t\t$page_parameters[\"user\"] = $params;\n\t\t\n\t\t// However ... if it's a string or an integer, we use that to try to find the post and create a\n\t\t// post object from its ID :)\n\t\telse if((gettype($params) == \"string\" || gettype($params) == \"integer\") && (int) $params > 0)\n\t\t\t$page_parameters[\"user\"] = new User((int) $params);\n\t\t\n\t\t// Otherwise, we dont have a user object, which means we're creating a new user\n\t\telse \n\t\t\t$page_parameters[\"user\"] = NULL;\n\t\t\n\t\t// Set the page title depending on whether we got a user object yet or not\n\t\tif($page_parameters[\"user\"] != NULL)\n\t\t\t$page_title = $page_parameters[\"page_title\"] = \"Settings\";\n\t\telse \n\t\t{\n\t\t\t$page_title = $page_parameters[\"page_title\"] = \"Sign Up\";\n\t\t\t$page_parameters[\"user\"] = new User();\n\t\t}\n\t\t\n\t\t\n\t \treturn array(\"page_title\" => $page_title, \"view\" => \"create.user\", \"params\" => $page_parameters);\n\t }", "title": "" }, { "docid": "6ffc5b6f44060a8b9a46027b075a3880", "score": "0.5592178", "text": "public function showUserCreator(array $data);", "title": "" }, { "docid": "dc5829d3693791a06192149849ee178f", "score": "0.55824435", "text": "public function createMobiler($name, $sex, $city, $graduate, $job, $age, $phone, $email, $activate, $facebook, $facebookUsers, $twitter, $twitterUsers, $blog, $blogAddress, $app, $bio, $date) {\r\n $rowUser = $this->createRow();\r\n if ($rowUser) {\r\n // update the row values\r\n $rowUser->name = $name;\r\n $rowUser->sex = $sex;\r\n $rowUser->city = $city;\r\n $rowUser->graduate = $graduate;\r\n $rowUser->job = $job;\r\n $rowUser->age = $age;\r\n $rowUser->phone = $phone;\r\n $rowUser->email = $email;\r\n $rowUser->activate = $activate;\r\n $rowUser->facebook = $facebook;\r\n $rowUser->facebookUsers = $facebookUsers;\r\n $rowUser->twitter = $twitter;\r\n $rowUser->twitterUsers = $twitterUsers;\r\n $rowUser->blog = $blog;\r\n $rowUser->blogAddress = $blogAddress;\r\n $rowUser->app = $app;\r\n $rowUser->bio = $bio;\r\n $rowUser->date = $date;\r\n $rowUser->save();\r\n //return the new user\r\n return $rowUser;\r\n } else {\r\n throw new Zend_Exception(\"Could not create user! \");\r\n }\r\n }", "title": "" }, { "docid": "85b8448c2a935af8b8a7b2b0057e2005", "score": "0.5576542", "text": "public function createUserAction(Request $request) {\n \treturn $this->createEntity($request,'user','user_manager');\n }", "title": "" }, { "docid": "3a95d3fd22c4db84ded04b745857ad46", "score": "0.55671287", "text": "function userNew($user_name='', $user_mail='', $user_password='') { return null; }", "title": "" }, { "docid": "bd97a4d4f13578475ba16b0610851d17", "score": "0.55624944", "text": "private function makeUser()\n {\n return factory(User::class)->make();\n }", "title": "" }, { "docid": "a7459b4e46b747deb54248397dc04557", "score": "0.5536895", "text": "public function createNewUser($username, $password, $fname, $lname, $aid=null, $accountRole=2){\n\n\t\t//set this user type\n\t\t$userType = sfConfig::get('app_user-type_user');\n\n\t\t//TODO: fix user-type for domain\n\n\t\t$newUser = new sfGuardUser();\n\t\t$newUser->setUsername($username);\n\t\t$newUser->setPassword($password);\n\t\t$newUser->setCreatedAt(date(\"Y-m-d H:i:s\"));\n\t\t$newUser->save();\n\n\t\t$guardUserGroup = new sfGuardUserGroup();\n\t\t$guardUserGroup->setGroupId($userType);\n\t\t$guardUserGroup->setUserId($newUser->getId());\n\t\t$guardUserGroup->save();\n\n\t\t$address = new Address();\n\t\t$address->setCreated(date(\"Y-m-d H:i:s\"));\n\t\t$address->save();\n\n\t\t$userAddress = new UserAddress();\n\t\t$userAddress->setUserId($newUser->getId());\n\t\t$userAddress->setAddressId($address->getAddressId());\n\t\t$userAddress->setType('PRIMARY');\n\t\t$userAddress->setCreated(date(\"Y-m-d H:i:s\"));\n\t\t$userAddress->save();\n\n\t\t$email = new Email();\n\t\t$email->setEmail($username);\n\t\t$email->setUserId($newUser->getId());\n\t\t$email->setCreated(date(\"Y-m-d H:i:s\"));\n\t\t$email->save();\n\n\n\t\t$profile = new Profile( );\n\t\t$profile->setAddressId($userAddress->getAddressId());\n\t\t$profile->setUserId( $newUser->getId() );\n\t\t$profile->setFirstName($fname);\n\t\t$profile->setLastName($lname);\n\t\t$profile->setCreated(date(\"Y-m-d H:i:s\"));\n\t\t$profile->save();\n\n\t\tif ($aid){\n\t\t\t$accountUser = new AccountUser();\n\t\t\t$accountUser->setAccountId($aid);\n\t\t\t$accountUser->setUserId($newUser->getId());\n\t\t\t$accountUser->setCreated(date(\"Y-m-d H:i:s\"));\n\t\t\t$accountUser->save();\n\n\n\t\t\t$aur = new AccountUserRole();\n\t\t\t$aur->setAccountId($aid);\n\t\t\t$aur->setRoleId($accountRole); //sfConfig::get('app_account-role_owner')\n\t\t\t$aur->setUserId($newUser->getId());\n\t\t\t$aur->setCreated(date(\"Y-m-d H:i:s\"));\n\t\t\t$aur->save();\n\t\t}\n\n\t\treturn $newUser;\n\t}", "title": "" }, { "docid": "fb838ad461e7704c7715a5cfeddd6730", "score": "0.553538", "text": "private function createUser($smarty) {\r\n\t\t$userByRegistrationPeer = new UserByRegistrationPeer();\r\n\t\t$userByRegistrationPeer->create($_POST[\"username\"],$_POST[\"name\"],$_POST[\"surname\"],$_POST[\"password\"],$_POST[\"email\"]); \r\n\t\t$smarty->assign(\"message\",\"created\");\r\n\t}", "title": "" }, { "docid": "26614d68101144ea8c07a78572ba1709", "score": "0.5534501", "text": "private function create(){\n\t\t\n\t\t$usr = $this->model->createUser($_POST['username'],\n\t\t\t\t\t\t\t\t\t\t$_POST['email'],\n\t\t\t\t\t\t\t\t\t\t$_POST['password']);\n\t\tif($usr != null){\n\t\t\t$this->session->createUserSession($usr);\n\t\t} \n\n\t\n\t}", "title": "" }, { "docid": "501f698a2c4c531c29b44edc45da8b35", "score": "0.5532641", "text": "function &create($isNew = true)\n\t{\n\t\t$user = new XoopsUser();\n\t\tif($isNew)\n\t\t{\n\t\t\t$user->setNew();\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "f02423066394deb884e5d051f642e0ec", "score": "0.5524084", "text": "public function create($user);", "title": "" }, { "docid": "093e610ef56e3909a18bc709eff9fc23", "score": "0.55205286", "text": "function newUser()\n { \n return new ResourceView(\"admin/UserAdmin.xml\",[\"user\"=>null]);\n \n }", "title": "" }, { "docid": "1d1836380b099d2f2c5b7537720fe9d1", "score": "0.5510913", "text": "public function create($data)\n {\n $alias = $data['alias'] ?: Transliterate::make($data['full_name'], ['type' => 'url', 'lowercase' => true]);\n $alias = $this->getUnique($alias, 'users', 'alias');\n $user = $this->model->make([\n 'alias' => $alias,\n 'email' => $data['email'],\n // 'password' => bcrypt('123'),\n 'role' => 'author',\n 'orcid' => (isset($data['orcid'])) ? $data['orcid'] : null,\n 'avatar' => (isset($data['avatar'])) ? $data['avatar'] : null,\n ]);\n\n $user->save();\n\n $user->meta()->create([\n 'lang' => 'ru',\n 'full_name' => $data['full_name'],\n 'first_name' => $data['first_name_ru'],\n 'last_name' => $data['last_name_ru'],\n 'patronymic' => $data['patronymic_ru'],\n 'initials' => $data['initials_ru'],\n 'short_name' => $data['short_name_ru'],\n 'degree' => $data['degree_ru'],\n 'redcol_info' => $data['redcol_info_ru'],\n 'jobs' => (isset($data['jobs_ru'])) ? $data['jobs_ru'] : [],\n 'description' => (isset($data['description_ru'])) ? $data['description_ru'] : '',\n ]);\n\n $en_name = $data['last_name_en'];\n $en_name .= ($data['first_name_en']) ? \" \" . $data['first_name_en'] : \"\";\n $en_name .= ($data['patronymic_en']) ? \" \" . $data['patronymic_en'] : \"\";\n\n $user->meta()->create([\n 'lang' => 'en',\n 'full_name' => $en_name,\n 'first_name' => $data['first_name_en'],\n 'last_name' => $data['last_name_en'],\n 'patronymic' => $data['patronymic_en'],\n 'initials' => $data['initials_en'],\n 'short_name' => $data['short_name_en'],\n 'degree' => $data['degree_en'],\n 'redcol_info' => $data['redcol_info_en'],\n 'jobs' => (isset($data['jobs_en'])) ? $data['jobs_en'] : [],\n 'description' => (isset($data['description_en'])) ? $data['description_en'] : '',\n ]);\n\n return [\n 'status' => 'success',\n 'message' => 'Новый автор добавлен',\n ];\n }", "title": "" }, { "docid": "1a6352c5f630756698e221de834ac72c", "score": "0.55051935", "text": "protected function createUserClient()\n {\n $this->login($this->getAdmin());\n }", "title": "" }, { "docid": "b8e5c83c946a20eb958a6a72f32cd9ba", "score": "0.55033666", "text": "public static function newUser($username, $phone, $password) {\n $user = parent::newUser($username, $phone, $password);\n $userId = $user->id();\n\n require_once 'libs/DB.php';\n\n $conn = DB::connect();\n\n $conn->exec(\"INSERT INTO volunteer(id) VALUES('$userId')\");\n\n $volunteer = new Volunteer($userId);\n return $volunteer;\n }", "title": "" }, { "docid": "1e60dcc61ec209ba047aef55547961b7", "score": "0.54986626", "text": "public function createAction()\n {\n $request = $this->getRequest();\n $act = $request->getParam('Act');\n $customerAccountId = $request->getParam('CustomerAccountId'); //creator account id\n $customerUserId = $request->getParam('CustomerUserId'); //creator user id\n \n $pagination['CurrentPage'] = $request->getParam('CurrentPage', SwIRS_Web_Request::CURRENT_PAGE);\n $pagination['ItemsPerPage'] = $request->getParam('ItemsPerPage', SwIRS_Web_Request::ITEMS_PER_PAGE);\n \n if ('create' == $act) {\n Streamwide_Web_Log::debug('create a user actual');\n\n $defaults = array(\n 'Name' => '',\n 'EmailAddress' => '',\n 'Password' => '',\n 'ParentUserId' => $customerUserId\n );\n $user = SwIRS_Web_Request::getParam($request, $defaults);\n $user['CustomerAccountId'] = $request->getParam('AssignedCustomerAccountId');\n $user['ProfileId'] = $request->getParam('AssignedProfileId');\n\n $userId = Streamwide_Web_Model::call('User.Create', array($user));\n Streamwide_Web_Log::debug(\"user $userId is created\");\n \n $this->view->assign(\n array(\n 'Name' => $user['Name'],\n 'CustomerAccountId' => $customerAccountId,\n 'Pagination' => $pagination\n )\n );\n $this->getHelper('viewRenderer')->direct('create-ack');\n } else {\n Streamwide_Web_Log::debug('create user modal window');\n $profiles = Streamwide_Web_Model::call('User.GetProfiles', array());\n $customerAccounts = array();\n\n if (SwIRS_Web_Request::isSuperAdmin($request)) {\n $customerAccounts = Streamwide_Web_Model::call('Customer.GetAll', array());\n $profiles = $this->_restrict($profiles,array('AgentCapability'=>1));\n } else {\n $customerAccount = Streamwide_Web_Model::call('Customer.GetById', array($customerAccountId));\n $customerAccounts = array($customerAccount);\n $profiles = $this->_restrict($profiles,array('AgentCapability'=>1,'SuperAdmin'=>1));\n }\n $this->view->assign(\n array(\n 'Profiles' => $profiles,\n 'CustomerAccounts' => $customerAccounts\n )\n );\n }\n }", "title": "" }, { "docid": "15b842739f7f4d9cc470126201fb0365", "score": "0.54862446", "text": "private function createUsersView() {\n $this->database->query(\n \"CREATE OR REPLACE VIEW `?users` AS\n SELECT\n o.object_id,\n o.object_uri,\n MAX(IF(p.property_name = 'first_name', v.value_data, null)) AS first_name,\n MAX(IF(p.property_name = 'middle_name', v.value_data, null)) AS middle_name,\n MAX(IF(p.property_name = 'last_name', v.value_data, null)) AS last_name,\n MAX(IF(p.property_name = 'password', v.value_data, null)) AS password,\n MAX(IF(p.property_name = 'api_key', v.value_data, null)) AS api_key,\n MAX(IF(p.property_name = 'email', v.value_data, null)) AS email\n FROM ?property_values v\n LEFT JOIN ?properties p ON p.property_id = v.property_id\n LEFT JOIN ?objects o ON o.object_id=v.object_id\n WHERE o.object_type='user' GROUP BY o.object_id\"\n );\n }", "title": "" }, { "docid": "eb8b356eebc7f0d08db2c415cda88cad", "score": "0.54792416", "text": "function db_create_user($user){\n\t\t$hide_array=array(\":username\"=>$user->username, \":hash\"=>$user->hash, \":salt\"=>$user->salt);\n\t\t$this->db_exec_esc(\"INSERT INTO Kayttaja (kayttaja_id, kayttajanimi, tiiviste, suola) VALUES ( NULL, :username, :hash, :salt )\", $hide_array);\n\t}", "title": "" }, { "docid": "297812206ac849fd03f70c1a2f3afb3f", "score": "0.54735386", "text": "function newuser( $username, $pw, $email, $firstname='', $lastname='', $city='', $state='', $country='', $description='' ) {\n\t\n\t\t// There is a 6 character minimum on the username and 8 characters on the password\n\t\tif ( strlen($username) > 5 && strlen($pw) > 7 ) {\n\t\t\t\n\t\t\t// Use the secure server for new user submit\n\t\t\t$url = $this->server(true) . \"/users/new\";\n\t\t\t\n\t\t\t// Set up the submit\n\t\t\t$request['username'] = $username;\n\t\t\t$request['pw'] = $pw;\n\t\t\t$request['email'] = $email;\n\t\t\t$request['firstname'] = $firstname;\n\t\t\t$request['lastname'] = $lastname;\n\t\t\t$request['city'] = $city;\n\t\t\t$request['state'] = $state;\n\t\t\t$request['country'] = $country;\n\t\t\t$request['description'] = $description;\n\t\t\n\t\t\t$response = $this->sendRequest($url, $request);\n\t\t\treturn ($response == 'ok');\t\n\t\t} else {\n\t\t\t// Username or password is too short.\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "730abd1a260847230fd2a9c2cbb7c886", "score": "0.5470861", "text": "abstract function getUser();", "title": "" }, { "docid": "c0365603b68e1683169289a7b4798fa0", "score": "0.546333", "text": "public function makeUser()\n\t{\n\t\t$user = new User();\n\t\t$user->email = 'tiger@zoo.com';\n\t\t$user->password = Hash::make('1234');\n\t\t$user->save();\n\n\t\treturn \"user ready to access\";\n\t}", "title": "" }, { "docid": "9e9b394b327d030455430ff9bfde25ae", "score": "0.5455889", "text": "function createUser($username, $password, $email, $card_number, $cvc, $expDate, $address, $zipcode){\n\n\n $sql = \"SELECT * FROM users WHERE username = '\" . $username . \"'\";\n $result = mysql_query($sql, $this -> conn);\n\n if(mysql_num_rows($result) > 0){\n return \"User Already Exists\";\n }\n\n //long series of insert statements\n $sql = \"INSERT into users VALUES(NULL, '\" . $username . \"', '\" . $password . \"', '')\";\n\n $result = mysql_query($sql, $this -> conn);\n $user_id = mysql_insert_id();\n\n\n $sql = \"INSERT into emails VALUES(NULL, '\" . $email . \"', '\" . $user_id . \"')\";\n\n $result = mysql_query($sql, $this -> conn);\n $email_id = mysql_insert_id();\n\n $sql = \"INSERT into credit_cards VALUES(NULL, '\" . $card_number . \"', '\" . $cvc . \"', '\" . $expDate . \"')\";\n\n $result = mysql_query($sql, $this -> conn);\n $card_id = mysql_insert_id();\n\n $sql = \"INSERT into user_cards VALUES(NULL, '\" . $user_id . \"', '\" . $card_id . \"')\";\n mysql_query($sql, $this -> conn);\n\n $sql = \"INSERT into addresses VALUES(NULL, '\" . $zipcode . \"', '\" . $address . \"', '\" . $user_id . \"' )\";\n\n mysql_query($sql, $this -> conn);\n\n\n //Select User and login the user\n return $this -> login($username, $password);\n\n }", "title": "" }, { "docid": "dbf3b8d89be6cc802fd5775ad0db00b4", "score": "0.5452394", "text": "function _map_xml_user(&$stories, $op) {\n // manage created user\n if (isset($stories->{$op}) && !empty($stories->{$op})) {\n\n $created_uid = (string) $stories->{$op};\n try {\n $orignal_crated_uid = get_itg_destination_id('migrate_map_itguser', $created_uid);\n }\n catch (Exception $ex) {\n drupal_set_message($ex->getMessage(), 'error');\n }\n $stories->{$op} = $orignal_crated_uid;\n }\n else {\n $stories->{$op} = 0;\n }\n}", "title": "" }, { "docid": "88dd9c942d05daafcb97cdd6d0b7cd9e", "score": "0.54522306", "text": "public function create()\n {\n $data = [\n 'user' => [\n 'name' => filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING),\n 'phone' => filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING),\n 'document_number' => filter_input(INPUT_POST, 'document_number', FILTER_SANITIZE_STRING),\n 'dob' => filter_input(INPUT_POST, 'dob', FILTER_SANITIZE_STRING),\n 'password' => filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING)\n ],\n 'address' => [\n 'country' => filter_input(INPUT_POST, 'country', FILTER_SANITIZE_STRING),\n 'region' => filter_input(INPUT_POST, 'region', FILTER_SANITIZE_STRING),\n 'postcode' => filter_input(INPUT_POST, 'postcode', FILTER_SANITIZE_STRING),\n 'city' => filter_input(INPUT_POST, 'city', FILTER_SANITIZE_STRING),\n 'street' => filter_input(INPUT_POST, 'street', FILTER_SANITIZE_STRING),\n ]\n ];\n\n $result = Helper::getApiConnection('/users/create', $data);\n\n if(!empty($data) && Helper::request()->getMethod() == 'post'){\n unset($data);\n }\n\n $this->showCreateAccPage([\n 'acc_number' => $result->acc_number,\n 'message' => $result->message\n ]);\n }", "title": "" }, { "docid": "ae5b166a45c77817ec280fda4e42c0e0", "score": "0.54516566", "text": "public function createLocalUser()\n {\n $flag = false;\n if($this->validate());\n {\n $user = new User();\n $user->username = $this->username;\n $user->realname = $this->realname;\n $user->password = User::encrypt($this->password);\n $user->email = $this->email;\n $flag = true;\n if(!$user->save())\n {\n foreach($user->getErrors() as $key => $val)\n {\n $this->addError($key, join(',', $val));\n }\n $flag = false;\n }\n else\n {\n $this->id = $user->id;\n }\n }\n if(!$flag)\n {\n $this->password = $this->password2 = null;\n }\n return $flag;\n }", "title": "" }, { "docid": "98cf0c4cddff088ced20a6100514d9da", "score": "0.5446543", "text": "public function newUser(){\n\t\t\t$new=new UserRepository;\n\t\t\t\t$new->id=$this->id;\n\t\t\t\t$new->name=$this->name;\n\t\t\t\t$new->surname=$this->surname;\n\t\t\t\t$new->password=$this->password;\n\t\t\t\t$new->email=$this->email;\n\t\t\t\t$new->status=$this->status;\n\t\t\t\t$new->save();\n\t\t}", "title": "" }, { "docid": "a41504db5df32c92270924d429bdacce", "score": "0.54457814", "text": "public function createdUser()\n {\n return $this->hasOne(config('core.acl.user'), 'id', 'create_user_id');\n }", "title": "" }, { "docid": "116b6cb29f664ce811d0fed3d87cc2aa", "score": "0.5445211", "text": "public function create() {\n\t\t$this->allow(\"admin\");\n\t\t$this->load->view(\"user/create\", $this->data);\n\t}", "title": "" }, { "docid": "1b455aee7facd8b9bcd16904a04b4f83", "score": "0.5443428", "text": "function createUser($username, $password)\n{\n}", "title": "" }, { "docid": "11b6ccfae6e4b92d992bb1b4067656c8", "score": "0.5443006", "text": "public function createAuthUser($data)\n {\n $user = new AuthUser();\n $user->setUsername($data['username']);\n\n if (count($data['databases']) > 0) {\n foreach ($data['databases'] as $databases) {\n if ($databases instanceof Database) {\n $user->addDatabase($databases);\n }\n }\n }\n\n $password = $this->encodePassword($user, $data['password']);\n $user->setPassword($password);\n\n $this->entityManager->persist($user);\n $this->entityManager->flush();\n\n return $user;\n }", "title": "" }, { "docid": "e720180899d6138407fe2a6d308306b1", "score": "0.5438426", "text": "public function createBackendUser()\n {\n $userId = 0;\n $database = $this->getDatabaseConnection();\n\n $result = $database->exec_SELECTquery('uid', 'be_users', 'username = \\'_fe_commerce\\'');\n if (!$database->sql_num_rows($result)) {\n $data = array(\n 'pid' => 0,\n 'username' => '_fe_commerce',\n 'password' => 'MD5(RAND())',\n 'tstamp' => $GLOBALS['EXEC_TIME'],\n 'crdate' => $GLOBALS['EXEC_TIME'],\n );\n\n $database->exec_INSERTquery(\n 'be_users',\n $data,\n array(\n 'password',\n 'tstamp',\n 'crdate',\n )\n );\n $userId = $this->getDatabaseConnection()->sql_insert_id();\n }\n\n return $userId;\n }", "title": "" }, { "docid": "4f9fd680b340701e7fa71dd1a30dbeca", "score": "0.5434347", "text": "protected function createFrontendUser($importData, $pidFeUsers) {\n /** @var $frontendUser \\TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUser */\n\n $frontendUser = $this->objectManager->get(\\TYPO3\\CMS\\Extbase\\Domain\\Model\\FrontendUser::class);\n $frontendUser->setUsername($importData['login']);\n $frontendUser->setFirstName($importData['vorname']);\n $frontendUser->setLastName($importData['nachname']);\n $frontendUser->setName($importData['vorname'] . ' ' . $importData['nachname']);\n $frontendUser->setEmail($importData['mailok']);\n\n // use storagefolder if given\n if (!empty($pidFeUsers)) {\n $frontendUser->setPid($pidFeUsers);\n }\n return $frontendUser;\n }", "title": "" }, { "docid": "c65ceca8a72a32f28a55913f5d42c70d", "score": "0.54309034", "text": "function createUser($user,$pwd,$name,$mail,$grps=null){\n }", "title": "" }, { "docid": "0b8ab197a804840c7cf46eb952957532", "score": "0.5430106", "text": "public abstract function getUser();", "title": "" }, { "docid": "cf1c1be8a7a50a6941eecbae1e9a7487", "score": "0.54223526", "text": "function create_user(){\n\tif(isset($_POST['user_name']) && isset($_POST['user_password']) && isset($_POST['user_email']) && isset($_POST['user_address'])){ // Checks if all of the required information is attached in the ajax-request\n\t\t$mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE); // Then create a new mysqli-object used for connection against the database.\n\t\t$options = array('salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM)); // Generates a new salt that will be stored in the members table along with the hashed password etc.\n\t\t$password_hash = password_hash($_POST['user_password'], PASSWORD_BCRYPT, $options); // The entered password is encrypted by using Blowfish-algorithm together with the random salt generated in previous step.\n\t\tif(createuser($_POST['user_name'], $password_hash, $_POST['user_email'], $_POST['user_address'],$options['salt'], $mysqli)){ // Try to save inforamtion to the members table.\n\t\t\tlogin($_POST['user_name'] , $_POST['user_password'], $mysqli); // At the same time we can perform the login-procedure.\n\t\t}\n\t}\n\techo \"created_account_error\";\n\tdie();\n}", "title": "" }, { "docid": "70cc2b230dec7d1d23f72e800913ce68", "score": "0.541516", "text": "public function create($user) {\r\n $this->persistence->user = $user;\r\n $this->persistence->insert();\r\n }", "title": "" }, { "docid": "4986a94e984f1be2e4cf17a123ccc5c2", "score": "0.5413797", "text": "public function createUser($email, $pwd,$agent=0,$name,$lname,$birth,$sex,$tel,$city,$live,\n\t$height,$weight,$ethics,$rel,$drink,$smoke,$marriage,$child,$job,$pay,$nation,\n\t\t\t$edu,$english,$chinese,$hobby,$animal,$star,$title,$me,$love) \n\t{\n \t// create a new row\n\t\t$rowUser = $this->createRow ();\n\t\tif ($rowUser) {\n\t\t\t// update the row values\n\t\t\t$rowUser->email = $email;\n\t\t\t$rowUser->password = md5 ( $pwd );\n\t\t\t$rowUser->role_id = Model_Role::USER;\n\t\t\t$rowUser->agent_id =$agent;\n\t\t\t$rowUser->name=$name;\n\t\t\t$rowUser->lname=$lname;\n\t\t\t$rowUser->birth=$birth;\n\t\t\t$rowUser->sex=$sex;\n\t\t\t$rowUser->tel=$tel;\n\t\t\t$rowUser->city=$city;\n\t\t\t$rowUser->country=$live;\n\t\t\t$rowUser->height=$height;\n\t\t\tif ($weight!='') {\n\t\t\t\t$rowUser->weight=$weight;\n\t\t\t}\n\t\t\t$rowUser->ethics=$ethics;\n\t\t\t$rowUser->religion=$rel;\n\t\t\t$rowUser->drink=$drink;\n\t\t\t$rowUser->smoke=$smoke;\n\t\t\t$rowUser->marriage=$marriage;\n\t\t\t$rowUser->child=$child;\n\t\t\t$rowUser->job=$job;\n\t\t\tif ($pay=='') {$pay=0;}\n\t\t\t$rowUser->pay=$pay;\n\t\t\t$rowUser->nationality=$nation;\n\t\t\t$rowUser->edu=$edu;\n\t\t\t$rowUser->english=$english;\n\t\t\t$rowUser->chinese=$chinese;\n\t\t\t$rowUser->hobby=$hobby;\n\t\t\t$rowUser->animal=$animal;\n\t\t\t$rowUser->star=$star;\n\t\t\t$rowUser->title=$title;\n\t\t\t$rowUser->me=$me;\n\t\t\t$rowUser->love=$love;\n\t\t\t$rowUser->created_date=date(\"Y-m-d\", time());\n\t\t\t\n\t\t\t\n\t\t//\t$rowUser->status =self::STATUS_INACTIVE;\n\t\t if ($agent!=0) {\n $rowUser->status =self::STATUS_ACTIVE;\n\t\t } \n\t\t\t$rowUser->save ();\n\t\t\t//return the new user\n\t\t\treturn $rowUser;\n\t\t} else {\n\t\t\tthrow new Zend_Exception ( \"Could not create user! \" );\n\t\t}\n\t}", "title": "" }, { "docid": "bcb09a66fa25e134bc0cbc7304422222", "score": "0.54108846", "text": "function createUser()\n {\n return $this->usr->save();\n }", "title": "" }, { "docid": "f948153f4cf596ed81c59c45c70422b6", "score": "0.54074675", "text": "function get_user_info($user_name)\r\n{\r\n if(sizeOf($user = get_student($user_name)) == 1)\r\n return new logged_in_user($user_name, $user[0]['student_id'], STUDENT_USER, STUDENT_USER_PORTAL);\r\n if(sizeOf($user = get_instructor($user_name)) == 1)\r\n return new logged_in_user($user_name, $user[0]['instructor_id'], INSTRUCTOR_USER, INSTRUCTOR_USER_PORTAL);\r\n\r\n return NULL;\r\n}", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.54073775", "text": "public function user();", "title": "" }, { "docid": "b574c971a24865c02552c92afcb6d401", "score": "0.5401919", "text": "protected function _createOrGetUser($info)\n {\n $personId = $info['googlePersonId'];\n $existing = $this->Googleauth_User->getByGooglePersonId($personId);\n\n if (!$existing) {\n $user = $this->User->getByEmail($info['email']);\n if (!$user) {\n // Only create new user this way if registration is not closed.\n $closeRegistration = Zend_Registry::get('configGlobal')->closeregistration;\n if ($closeRegistration == '1') {\n throw new Zend_Exception(\n 'Access to this instance is by invitation '.'only, please contact an administrator.'\n );\n }\n $user = $this->User->createUser($info['email'], null, $info['firstName'], $info['lastName'], 0, '');\n } else {\n $user->setFirstname($info['firstName']);\n $user->setLastname($info['lastName']);\n $this->User->save($user);\n }\n\n $this->Googleauth_User->createGoogleUser($user, $personId);\n } else {\n $user = $this->User->load($existing->getUserId());\n $user->setFirstname($info['firstName']);\n $user->setLastname($info['lastName']);\n $this->User->save($user);\n }\n\n $userapi = $this->Userapi->getByAppAndUser('Default', $user);\n $request = $this->getRequest();\n $date = new DateTime();\n $interval = new DateInterval('P1M');\n setcookie(\n MIDAS_USER_COOKIE_NAME,\n 'googleauth:'.$user->getKey().':'.md5($userapi->getApikey()),\n $date->add($interval)->getTimestamp(),\n '/',\n $request->getHttpHost(),\n (int) Zend_Registry::get('configGlobal')->get('cookie_secure', 1) === 1,\n true\n );\n\n return $user;\n }", "title": "" }, { "docid": "a03f0cbcf1eb3ee40f0b48bea89124d3", "score": "0.5401436", "text": "private static function seed()\n {\n //create a default user if there is none that exists\n }", "title": "" }, { "docid": "d78ba4d103415cb96dbcf170aa620d3f", "score": "0.53996056", "text": "public function createAction()\n {\n $this->requiresCurrentOffice();\n\n $user = new User();\n $form = $this->createForm(new UserType(), $user);\n $form->bind($this->getRequest());\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n\n $factory = $this->get('security.encoder_factory');\n $encoder = $factory->getEncoder($user);\n $user->setPassword($encoder->encodePassword($user->getPassword(), $user->getSalt()));\n\n $officeUser = new OfficeUser($this->getCurrentOffice(), $user);\n\n $salesPerson = $form->get('salesperson')->getData();\n if ($salesPerson) {\n $salesPerson = new Salesperson($officeUser);\n $user->addGroup($em->getRepository('OrkestraApplicationBundle:Group')->findOneBy(array('role' => 'ROLE_SALESPERSON')));\n $em->persist($salesPerson);\n }\n\n $em->persist($user);\n $em->persist($officeUser);\n $em->flush();\n\n $this->get('session')->setFlash('success', 'The user has been created.');\n\n return $this->redirect($this->generateUrl('orkestra_users'));\n }\n\n return array(\n 'user' => $user,\n 'form' => $form->createView()\n );\n }", "title": "" }, { "docid": "7ee8566be05697bce2625ae0a0055ac1", "score": "0.5396556", "text": "public function create()\n {\n //Create a new usergroup(company) -- maybe add a register page for new clients to register themselves?\n }", "title": "" }, { "docid": "d9b80d4a58366f0eef1403adde3a9ef7", "score": "0.53960425", "text": "function &create_user($username, $password){\n global $users;\n if(!$username) return 1;\n if(!$password) return 2;\n $new_user = new User($username, $password);\n $users[$new_user->id] =& $new_user;\n if(!$new_user) return 3;\n return $users[$id];\n }", "title": "" }, { "docid": "36881a17e368a21cada973a174d1844c", "score": "0.53927624", "text": "public static function createNew()\n\t{\n\t\t$user = new User;\n\n\n\t\tif (Auth::check()) \n\t\t{\n\t\t\t$user->account_id = Auth::user()->account_id;\n\t\t}else\n\t\t{\n\t\t\t$user->account_id = Session::get('account_id');\t\n\t\t}\n\n\t\t$last_user = User::PublicId()->orderBy('public_id', 'DESC')->select('public_id')->first();\n\t\t$nextPublicId = $last_user->public_id;\n\n\t\tif($nextPublicId)\n\t\t{\n\t\t\t$nextPublicId= $nextPublicId + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nextPublicId = 1;\n\t\t}\n\n\t\t$user->public_id = $nextPublicId;\n\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "b84fc6685f08459ebe2bf22d0092481e", "score": "0.5388588", "text": "public function createUser($username,$email,$name,$password,$contactNumber,$dateOfBirth,$technologies,$userRoles){\n\t\t$isInvent=$userRoles[0];\n\t\t$isResource=$userRoles[1];\n\t\tif($this->dbUser->create_user($username,$email,$name,$password,$dateOfBirth,$isInvent,$isResource)){\n\t\t\t$this->login($username,$password);\n\t\t}\n\t}", "title": "" }, { "docid": "76cefa888534cc756b8b55f40b1dace6", "score": "0.53876346", "text": "public function createMemberForUser()\n\t{\n\t\tif ($this->Input->get('key') != 'createMemberForUser')\n\t\t{\n\t\t\t$this->redirect(str_replace('&key=createMemberForUser', '', $this->Environment->request));\n\t\t}\n\n\t\t$this->Template = new \\BackendTemplate('be_createMemberForUser');\n\n\t\t$this->Template->user = $this->getUsersWidget();\n\t\t$this->Template->hrefBack = ampersand(str_replace('&key=createMemberForUser', '', $this->Environment->request));\n\t\t$this->Template->goBack = $GLOBALS['TL_LANG']['MSC']['goBack'];\n\t\t$this->Template->headline = $GLOBALS['TL_LANG']['tl_member']['createMemberForUser'][1];\n\t\t$this->Template->request = ampersand($this->Environment->request, ENCODE_AMPERSANDS);\n\t\t$this->Template->submitAndBack = specialchars($GLOBALS['TL_LANG']['MSC']['createUserMemberAndBack']);\n\t\t$this->Template->submitAndEdit = specialchars($GLOBALS['TL_LANG']['MSC']['createUserMemberAndEdit']);\n\t\t$this->Template->submitAndNew = specialchars($GLOBALS['TL_LANG']['MSC']['createUserMemberAndNew']);\n\n\t\tif ($GLOBALS['TL_CONFIG']['userMemberBridgeSyncFields'] == null || $GLOBALS['TL_CONFIG']['userMemberBridgeUsernameFormat'] == null)\n\t\t{\n\t\t\t$this->Template->hasError = true;\n\t\t\t$this->Template->errorMessage = $GLOBALS['TL_LANG']['ERR']['settingsNotCorrect'];\n\t\t}\n\t\telse if (strrpos($this->Template->user->class, \"empty\") > -1)\n\t\t{\n\t\t\t$this->Template->hasError = true;\n\t\t\t$this->Template->errorMessage = $GLOBALS['TL_LANG']['ERR']['noUnassignedUsersFound'];\n\t\t}\n\n\t\t// Create member for user\n\t\tif ($this->Input->post('FORM_SUBMIT') == 'tl_member_createMemberForUser')\n\t\t{\n\t\t\t$userId = $this->Template->user->value;\n\t\t\t$objUser = $this->Database->prepare(\"SELECT * FROM tl_user WHERE id = ?\")->execute($userId);\n\t\t\t\n\t\t\t$arrSet = $this->getSyncFields($objUser->username, $objUser->name, '', $objUser->email, $objUser->password, false);\n\t\t\tif (count($arrSet) > 0) {\n\t\t\t\t\n\t\t\t\t//TODO for Buttons \"saveAndBack\" and \"saveAndNew\" all mandatory fields must be set !!!\n\t\t\t\t\n\t\t\t\tif (strlen($arrSet['username']) > 0 || strlen($arrSet['password']) > 0) {\n\t\t\t\t\t$arrSet['login'] = 1;\n\t\t\t\t}\n\t\t\t\t$arrSet['tstamp'] = time();\n\t\t\t\t$arrSet['dateAdded'] = time();\n\t\t\t\t$insertId = $this->Database->prepare(\"INSERT INTO tl_member %s\")->set($arrSet)->execute()->insertId;\n\t\t\t\t\n\t\t\t\t$this->Database->prepare(\"UPDATE tl_user set assignedMember = ? WHERE id = ?\")->execute($insertId, $userId);\n\t\t\t\t\n\t\t\t\tif (strlen($this->Input->post('saveAndBack')) > 0) {\n\t\t\t\t\t$this->redirect(str_replace('&key=createMemberForUser', '', $this->Environment->request));\n\t\t\t\t} else if (strlen($this->Input->post('saveAndEdit')) > 0) {\n\t\t\t\t\t$this->redirect(str_replace('&key=createMemberForUser', '&act=edit&id=' . $insertId, $this->Environment->request));\n\t\t\t\t} else {\n\t\t\t\t\t$this->redirect($this->Environment->request);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->redirect(str_replace('&key=createMemberForUser', '' . $insertId, $this->Environment->request));\n\t\t}\n\t\treturn $this->Template->parse();\n\t}", "title": "" }, { "docid": "8084d46e1025f4d936f90a17a2f3bd5d", "score": "0.53867775", "text": "public function make_user_object($user_id) {\n\n global $vce;\n\n // create array to contain values\n $user_object = array();\n\n // clear user session\n if (isset($_SESSION)) {\n unset($_SESSION['user']);\n }\n\n // clear user object properties\n foreach ($this as $key => $value) {\n unset($this->$key);\n }\n\n // get user_id,role_id, and vector\n $query = \"SELECT user_id,vector,role_id FROM \" . TABLE_PREFIX . \"users WHERE user_id='\" . $user_id . \"' LIMIT 1\";\n $results = $vce->db->get_data_object($query);\n\n if ($results) {\n\n // loop through results\n foreach ($results[0] as $key => $value) {\n //add values to user object\n $user_object[$key] = $value;\n }\n\n // grab all user meta data that has no minutia\n $query = \"SELECT meta_key,meta_value FROM \" . TABLE_PREFIX . \"users_meta WHERE user_id='\" . $user_object['user_id'] . \"'\";\n $metadata = $vce->db->get_data_object($query);\n\n if ($metadata) {\n\n // look through metadata\n foreach ($metadata as $array_key => $each_metadata) {\n\n // decrypt the values using vi/vector for decrypting user meta data\n $value = self::decryption($each_metadata->meta_value, $user_object['vector']);\n\n // add the values into the user object\n $user_object[$each_metadata->meta_key] = $vce->db->clean($value);\n }\n\n // we can then remove vector from the user object\n unset($user_object['vector'], $user_object['lookup'], $user_object['persistent_login']);\n\n // add user meta data specific to site roles.\n $roles = json_decode($vce->site->roles, true);\n\n // check if role associated info is an array\n if (is_array($roles[$user_object['role_id']])) {\n // add key=>value to user object if they don't already exist.\n // user_meta key=>value takes precidence over role key=>value\n // this allows for user specific granulation of permissions, et cetera\n foreach ($roles[$user_object['role_id']] as $role_meta_key => $role_meta_value) {\n // check if the value is an array\n if (is_array($role_meta_value)) {\n $suffix = '_' . $role_meta_key;\n foreach ($role_meta_value as $sub_meta_key => $sub_meta_value) {\n // add simple key=>value to user object\n if (!isset($user_object[$sub_meta_key . $suffix])) {\n $user_object[$sub_meta_key . $suffix] = $sub_meta_value;\n } else {\n // add on to existing\n $user_object[$sub_meta_key . $suffix] .= ',' . $sub_meta_value;\n }\n }\n } else {\n // add simple key=>value to user object\n if (!isset($user_object[$role_meta_key])) {\n $user_object[$role_meta_key] = $role_meta_value;\n } else {\n $user_object[$role_meta_key] .= ',' . $role_meta_value;\n }\n }\n }\n }\n\n // create a session vector\n // this is used to create an edit / delete token for components\n $user_object['session_vector'] = self::create_vector();\n\n // rekey user object\n foreach ($user_object as $key => $value) {\n $this->$key = $value;\n }\n\n // hook\n if (isset($vce->site->hooks['user_make_user_object'])) {\n foreach ($vce->site->hooks['user_make_user_object'] as $hook) {\n call_user_func($hook, $this, $vce);\n }\n }\n\n return self::store_session($this, $vce);\n\n }\n\n } else {\n\n // user is not logged-in, role_id is set to x, because x is fun and \"I want to believe.\"\n $this->role_id = \"x\";\n $this->session_vector = self::create_vector();\n\n return self::store_session($this, $vce);\n\n }\n\n }", "title": "" }, { "docid": "8cf908a1bfb4df796397471c6aa943f8", "score": "0.5385011", "text": "public function getOwner()\n {\n new User($this->getOwnerId());\n }", "title": "" }, { "docid": "438d525e6c34cac31a93797117ffdfe7", "score": "0.5384651", "text": "public function createUser() \n {\n $request_content = json_decode(file_get_contents('php://input'));\n $allUsers = $this->user->selectAllData();\n\n try {\n // Checking all attributes length\n foreach($request_content->user as $param => $value) {\n if(strlen($value) > 256) {\n http_response_code(400);\n\n throw new Exception('O número de caracteres no campo ' . $param . ' não deve ser maior que 256.');\n }\n }\n\n foreach($request_content->address as $param => $value) {\n if(strlen($value) > 256) {\n http_response_code(400);\n\n throw new Exception('O número de caracteres no campo ' . $param . ' não deve ser maior que 256.');\n }\n }\n\n $accNumber = md5(openssl_random_pseudo_bytes(4));\n\n $uniqueAttributes = [\n $accNumber,\n $request_content->user->document_number,\n ];\n\n // If there were any users previously created, checks wether the given unique attributes does not exist in the database already \n if(!empty($allUsers)) {\n foreach($uniqueAttributes as $uniqueAttribute) {\n $isValid = $this->user->validateUniqueData($uniqueAttribute);\n \n if($isValid != $this->user::USER_VALID_DATA) {\n http_response_code(400);\n \n throw new Exception($isValid);\n }\n }\n }\n \n $password = password_hash($request_content->user->password, PASSWORD_ARGON2I);\n\n $this->user->setAccNumber($accNumber);\n $this->user->setPassword($password);\n $this->user->setName(Helper::encrypt_data($request_content->user->name));\n $this->user->setDob(Helper::encrypt_data($request_content->user->dob));\n $this->user->setPhone(Helper::encrypt_data($request_content->user->phone));\n $this->user->setDocumentNumber(Helper::encrypt_data($request_content->user->document_number));\n $this->user->setBalance(0);\n\n $userData = [\n 'acc_number' => $this->user->getAccNumber(),\n 'password' => $this->user->getPassword(),\n 'name' => $this->user->getName(),\n 'dob' => $this->user->getDob(),\n 'phone' => $this->user->getPhone(),\n 'document_number' => $this->user->getDocumentNumber(),\n 'balance' => $this->user->getBalance()\n ];\n\n $this->user->insertData($userData);\n\n $this->userAddress = Helper::getContainer('UserAddressModel');\n\n $this->userAddress->setCountry(Helper::encrypt_data($request_content->address->country));\n $this->userAddress->setRegion(Helper::encrypt_data($request_content->address->region));\n $this->userAddress->setPostcode(Helper::encrypt_data($request_content->address->postcode));\n $this->userAddress->setCity(Helper::encrypt_data($request_content->address->city));\n $this->userAddress->setStreet(Helper::encrypt_data($request_content->address->street));\n\n $addressData = [\n 'acc_number' => $this->user->getAccNumber(),\n 'country' => $this->userAddress->getCountry(),\n 'region' => $this->userAddress->getRegion(),\n 'postcode' => $this->userAddress->getPostcode(),\n 'city' => $this->userAddress->getCity(),\n 'street' => $this->userAddress->getStreet(),\n ];\n\n $this->userAddress->insertData($addressData);\n\n http_response_code(201);\n\n $message = $this->user::USER_CREATION_SUCCESS;\n } catch (Exception $e) {\n $message = $e->getMessage();\n Helper::apiResponse($message);\n }\n\n Helper::apiResponse(\n $message,\n 'acc_number',\n $this->user->getAccNumber()\n );\n }", "title": "" }, { "docid": "aadb5f71d6aecfea2452dc72a2f05b38", "score": "0.53762174", "text": "protected function getUserObjectFromData($data, $initObjects = self::INIT_ALL, $cacheMinutes = MemcacheWrapper::MEMCACHE_OFF, $cacheTag = null){\n\t\t$user = $this->getNewUserObject();\n\t\t\n\t\t$user->id = $data['id'];\n\t\t$user->enabled = $data['enabled'];\n\t\t$user->creationDate = $data['creation_date'];\n\t\t$user->creationTime = $data['creation_time'];\n\t\t$user->login = $data['login'];\n\t\t$user->password = $data['password'];\n\t\t$user->salt = $data['salt'];\n if($this->config->saveLastLoginDateIP) {\n $user->lastLoginIP = $data['last_login_ip'];\n $user->lastLoginDate = $data['last_login_date'];\n }\n\t\t$user->email = $data['email'];\n\t\t$user->emailConfirmed = $data['email_confirmed'];\n\t\t\n\t\tif(($initObjects & self::INIT_PROPERTIES) != 0){\n\t\t\t$user->props = $this->getPropertiesObject($user->id, $cacheMinutes, $cacheTag);\n\t\t}\n\t\tif(($initObjects & self::INIT_PERMISSIONS) != 0){\n\t\t\t$user->perms = $this->getPermissionsObject($user->id, $cacheMinutes, $cacheTag);\n\t\t}\n\t\t\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "56fef6f5641518d30f23dc2ec69ef9f8", "score": "0.53758264", "text": "private function createAdminUser()\n {\n SRUser::createRole('admin', 'Top administrative role.');\n SRUser::createUser('admin', '1234', array('admin',));\n }", "title": "" }, { "docid": "92719441d12bcbc3589eb4a947881fdf", "score": "0.5374789", "text": "function create( $args ) {\n\t\tglobal $wp_users_object;\n\t\tif ( isset( $args['id'] ) ) {\n\t\t\t$args['ID'] = $args['id'];\n\t\t\tunset( $args['id'] );\n\t\t}\n\t\treturn $this->coerce( $wp_users_object->new_user( $args ) );\n\t}", "title": "" }, { "docid": "6ac8a175baa0f4da7c00f4caa42e65ec", "score": "0.536886", "text": "private function newUser(){\n $username = $this->request['username'];\n $password = $this->request['password'];\n $displayname = $username;\n $email = $username;\n\n $user = new User($username,$displayname,$password,$email);\n\n //Checking this flag tells us whether there were any errors such as possible data duplication occured\n if(!$user->status){\n if($user->username_taken){\n $this->response['message'] = lang(\"ACCOUNT_USERNAME_IN_USE\",array($username));\n $this->response['code'] = 400;\n } \n } else {\n //Attempt to add the user to the database, carry out finishing tasks like emailing the user (if required)\n if(!$user->userCakeAddUser()){\n if($user->sql_failure){\n $this->response['code'] = 400; \n $this->response['message'] = lang(\"SQL_ERROR\");\n } \n }\n }\n\n //log the user in now\n return $this->usersNameAuth();\n }", "title": "" }, { "docid": "32c05a118499234764398b7a6b363517", "score": "0.5368266", "text": "function create( $obj )\n\t{\n\t\t$data = array(\n\t\t\t'user_email' => $obj->user_email,\n\t\t\t'user_password' => $obj->user_password,\n\t\t\t'user_display' => $obj->user_display,\n\t\t\t'user_invited' => (int)$obj->user_invited,\n\t\t\t'user_created' => getNow(),\n\t\t\t'user_updated' => getNow()\n\t\t);\n\n\t\t// Insert the data\n\t\tif ( $this->db->insert( 'users', $data ) )\n\t\t{\n\t\t\t$objUser = new stdClass();\n\t\t\t$objUser->user_id = $this->db->insert_id();\n\t\t\t\n\t\t\treturn $objUser;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$objResponse = new response( false );\n\t\t\t$objResponse->setError( 300, $this->lang->line( 'error_300' ) );\n\t\t\t\n\t\t\treturn $objResponse;\n\t\t}\n\t}", "title": "" }, { "docid": "2070f1b3d34bdc1f9f14a70c83ebc2f3", "score": "0.5362851", "text": "public function prepareUser($request, $object = null) {\n\n if($object != null) {\n $user = $object;\n } else {\n $userManager = $this->requestService('fos_user.user_manager');\n $user = $userManager->createUser();\n }\n\n $user->setUsername($request['zing_user_name']);\n $user->setEmail($request['zing_user_email']);\n $user->setPlainPassword($request['zing_user_password']);\n $user->setEnabled(true);\n $user->setRoles(array($request['zing_user_role']));\n\n $user->setGravatar($request['zing_user_gravatar']);\n $user->setLanguage($request['zing_user_language']);\n $user->setTheme($request['zing_user_theme']);\n $user->setStatus($request['zing_user_status']);\n $user->setEnabled($request['zing_user_status']);\n //$userManager->updateUser($user, true);\n return $user;\n }", "title": "" }, { "docid": "ccce197513d734f4401846652502bd51", "score": "0.53598666", "text": "function addUser($user)\n{\n\t$conn = createConnection();\n\tif(is_null($user->getWho()))\n\t$sql = \"INSERT INTO user (name,username,password,phonenumber,access,date,state) VALUES ('\" \n\t\t\t\t. $user->getName() . \"','\"\n\t\t\t\t. $user->getUserName() . \"','\" \n\t\t\t\t. $user->getPassword(). \"' , '\"\n\t\t\t\t. $user->getPhoneNumber().\"' , '\"\n\t\t\t\t. $user->getAccess(). \"' ,'\"\n\t\t\t\t. $user->getDate() . \"' , '\"\n\t\t\t\t. $user->getState() .\"' )\";\n\t\t\t\telse\n\t$sql = \"INSERT INTO user (name,username,password,phonenumber,access,date,state,ps_id) VALUES ('\" \n\t\t\t\t. $user->getName() . \"','\"\n\t\t\t\t. $user->getUserName() . \"','\" \n\t\t\t\t. $user->getPassword(). \"' , '\"\n\t\t\t\t. $user->getPhoneNumber().\"' , '\"\n\t\t\t\t. $user->getAccess(). \"' ,'\"\n\t\t\t\t. $user->getDate() .\"' , '\"\n\t\t\t\t. $user->getState() .\"' , '\"\n\t\t\t\t. $user->getWho() . \"')\";\n\n\t$result = executeQuery($conn,$sql);\n\treturn $result;\n}", "title": "" }, { "docid": "edaa15a54d046a62576f6b7d68a67c96", "score": "0.5355329", "text": "public function createAction()\n {\n\n\t\t$form = new Application_Form_UserRegister();\n\n\t\t$this->view->form = $form;\n\n // action body\n\n\t\t// if is NOT logged in - then he can registrate\n\t\t// and create a new user\n\t\t// otherwise he is logged in: then redirect to user dashboard or wherever you want\n\t\tif($this->_thisUser) $this->_redirect($this->getHelper('url')->url(array('controller' => 'user', 'action' => 'dashboard', null), 'default', true));\n }", "title": "" } ]
760f59914ff2e90ce387dcc6b19f0b6c
Don't show the date in the Google preview for WooCommerce products, since Google does not show dates for product pages in the search results.
[ { "docid": "05b58b50fd3f74249aa8bbca39825492", "score": "0.0", "text": "public function remove_meta_description_date($values, $post)\n {\n }", "title": "" } ]
[ { "docid": "6ed2580a3dc8c0f7b38f86f25b4c0f17", "score": "0.62187123", "text": "function my_epl_display_sold_date() {\n\tglobal $property;\n\n\t$sold_date = $property->get_property_price_sold_date( '' );\n\n\tif ( $sold_date ) {\n\t\t?>\n\t\t<div class=\"sold-date\">\n\t\t\t<span><?php echo esc_html( $sold_date); ?></span>\n\t\t</div>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "fa41e75a5f65da33a0db9746ff2a1209", "score": "0.5757172", "text": "function ib_add_availability_date() {\n\n\tif ( get_field( 'ib_pre_order' ) ) {\n\n\t\tglobal $product;\n\t\t$pre_order_variations = get_field( 'ib_pre_order_product_id' );\n\t\t$date = get_field( 'ib_availability_date' );\n\n\t\tif ( $product->is_type( 'variable' ) ) {\n\n\t\t\tif ( empty( $pre_order_variations ) && ! empty( $date ) ) {\n\t\t\t\techo '<span class=\"ib-pre-order-inscrip\">Available since: ' . $date . '</span>';\n\n\t\t\t\treturn;\n\t\t\t} ?>\n\n <script>\n jQuery(document).ready(function ($) {\n\n\n $('input.variation_id').change(function () {\n\n var $variation_id = $('input.variation_id').val();\n\n\t\t\t\t\t\t<?php foreach ( $pre_order_variations as $pre_order_variation_id ) { ?>\n\n if ($variation_id === '<?php echo $pre_order_variation_id; ?>') {\n\n $(\".single_variation_wrap\").append(\"<p class='available'>Available since: <?php echo $date; ?></p>\");\n\n } else if ($variation_id === '') {\n $(\"p.available\").remove();\n }\n\t\t\t\t\t\t<?php } ?>\n });\n\n\n });\n </script>\n\t\t\t<?php\n\n\t\t} else {\n\t\t\techo '<span class=\"ib-pre-order-inscrip\">Available since: ' . $date . '</span>';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3855acea30adf406c75927372bc93ad3", "score": "0.57046986", "text": "function wcvv_hide_obsolete_fields_from_customizer_products() {\n\tif( wcvv_is_variable() ) {\n\t\tremove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );\n\t\tremove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );\n\t\tremove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );\n\t}\n}", "title": "" }, { "docid": "a2db70e20f10e4c7e194a406710eb3b9", "score": "0.56269246", "text": "function rc_woocommerce_recently_viewed_products( $atts, $content = null ) {\n // Get shortcode parameters\n\textract(shortcode_atts(array(\n\t\t\"per_page\" => '5'\n\t), $atts));\n // Get WooCommerce Global\n\tglobal $woocommerce , $product;\n // Get recently viewed product cookies data\n\t$viewed_products = ! empty( $_COOKIE['woocommerce_recently_viewed'] ) ? (array) explode( '|', $_COOKIE['woocommerce_recently_viewed'] ) : array();\n\t$viewed_products = array_filter( array_map( 'absint', $viewed_products ) );\n // If no data, quit\n\tif ( empty( $viewed_products ) )\n\t\treturn __( 'You have not viewed any product yet!', 'rc_wc_rvp' );\n // Create the object\n\tob_start();\n // Get products per page\n\tif( !isset( $per_page ) ? $number = 4 : $number = $per_page )\n // Create query arguments array\n\t\t$query_args = array(\n\t\t\t'posts_per_page' => 4,\n\t\t\t'no_found_rows' => 1,\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'product',\n\t\t\t'post__in' => $viewed_products,\n\t\t\t'orderby' => 'rand',\n\t\t\t'meta_query' => array(\n 'order_clause' => array(\n 'key' => '_custom_product_text_field_yes_no',\n 'value' => ''\n\t\t)));\n // Add meta_query to query args\n\t$query_args['meta_query'] = array();\n // Check products stock status\n\t$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();\n // Create a new query\n\t$r = new WP_Query($query_args);\n\n // ----\n\tif (empty($r)) {\n\t\treturn __( 'You have not viewed any product yet!', 'rc_wc_rvp' );\n\n\t}?>\n\t<?php while ( $r->have_posts() ) : $r->the_post(); \n\t\t$url= wp_get_attachment_url( get_post_thumbnail_id($post->ID) );\n\n\t\t$asd = get_the_ID();\n\t\t$product = wc_get_product($asd);\n\n\t\t$check_product = get_post_meta( $asd, '_custom_product_text_field_yes_no', true );\n\n\t\t\t\t\t//echo $check_product;\n\n\t\t\t\t\tif($check_product!='no')\n\t\t\t\t\t{\n\n\t\t?>\n\n\t\t<!-- //put your theme html loop hare -->\n\t\t<div class=\"col-lg-3 col-md-3 col-sm-6\">\n\t\t\t<div class=\"remediesboxcol\">\n\t\t\t\t<a class=\"remediesimg\" href=\"<?php echo get_post_permalink(); ?>\" title=\"Show details for Watches\">\n\t\t\t\t\t<img alt=\"Picture of Watches\" src=\"<?php echo $url;?>\" title=\"Show details for Watches\" />\n\t\t\t\t</a>\n\t\t\t\t<div class=\"remediescntbx\">\n\n\t\t\t\t\t<span class=\"star_reviewtxt\">\n\t\t\t\t\t\t <?php $average = $product->get_average_rating();\n \n if($average!=0)\n {\n echo wc_get_rating_html( $product->get_average_rating() );\n }\n else\n {\n ?>\n <div class=\"star-rating\">\n </div>\n <?php \n }\n ?> \n\t\t\t\t <!-- <i class=\"fas fa-star\"></i>\n\t\t\t\t <i class=\"fas fa-star\"></i>\n\t\t\t\t <i class=\"fas fa-star\"></i>\n\t\t\t\t <i class=\"fas fa-star\"></i>\n\t\t\t\t <i class=\"fas fa-star\"></i> -->\n\t\t\t\t</span>\n\t\t\t\t<?php\n\t\t\t\t$contenttitle = mb_strimwidth(get_the_title(), 0, 60, '...');\n\t\t\t\t?>\n\t\t\t\t<a class=\"product-name\" href=\"<?php echo get_post_permalink(); ?>\"><?php echo $contenttitle;?></a>\n\t\t\t\t<span class=\"pricetxt\"><!-- $ --><?php echo $product->get_price_html();?> <!-- AUD --></span>\n\n\n\t\t\t\t<?php\n\t\t\t\tif( $product->is_type('variable'))\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t<a href=\"<?php the_permalink() ?>\" class=\"btn-main\">View Product</a> \n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t<!-- <a href=\"<?php echo wc_get_cart_url();?>?add-to-cart=<?php echo $product->id?>\" class=\"btn-main\">Add To Cart</a> -->\n\t\t\t\t\t<!-- <a href=\"<?php the_permalink() ?>\" class=\"btn-main\">View Product</a> --> \n\t\t\t\t\t<a href=\"<?php echo wc_get_cart_url();?>?add-to-cart=<?php echo $product->id?>\" class=\"btn-main\">Add To Cart</a>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div> \n\t\t</div>\n\t</div> \n\t<!-- end html loop -->\n<?php } endwhile; ?>\n\n\n\n<?php wp_reset_postdata();\n\n // ----\n // Get clean object\n$content .= ob_get_clean();\n // Return whole content\nreturn $content;\nexit();\n}", "title": "" }, { "docid": "c9541466e50c7c2253955db27610a0e5", "score": "0.55817646", "text": "function perfmatters_hide_wp_version() {\n\treturn '';\n}", "title": "" }, { "docid": "0ac116f6262f9dd1464e49094615171a", "score": "0.5534954", "text": "function simplecart_postmeta_entrydate() {\n\n $entrydate = '<span class=\"meta-prep meta-prep-entry-date\">' . __('Published: ', 'simplecart') . '</span>';\n $entrydate .= '<span class=\"entry-date\"><abbr class=\"published\" title=\"';\n $entrydate .= get_the_time(simplecart_time_title()) . '\">';\n $entrydate .= get_the_time(simplecart_time_display());\n $entrydate .= '</abbr></span>';\n \n return apply_filters('simplecart_post_meta_entrydate', $entrydate);\n \n}", "title": "" }, { "docid": "9899fdd210b8f25779d6be02f74c58da", "score": "0.5533677", "text": "function qclinics_product_expiration() {\r\n wc_get_template( 'single-product/expiration.php' );\r\n}", "title": "" }, { "docid": "1d0009fb350c5c1ed67d6b0cdda28bff", "score": "0.5510697", "text": "function np_post_date(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'p_postdisplaydate','1');\n}", "title": "" }, { "docid": "e570f80c7733db8b37045fa369231a8f", "score": "0.5504556", "text": "function onesie_pro_pub_date() {\n printf( __( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\" >%4$s</time></a>', 'onesie_pro' ),\n esc_url( get_permalink() ),\n esc_attr( get_the_time() ),\n esc_attr( get_the_date( 'c' ) ),\n esc_html( get_the_date() )\n );\n}", "title": "" }, { "docid": "67de67d5c78e667f3877887a534a5c86", "score": "0.5486896", "text": "function kapee_template_single_portfolio_date() {\n\t\t\t\t\n\t\tkapee_get_template( 'template-parts/single-portfolio/date');\n\t}", "title": "" }, { "docid": "537d35845573fc7e0dc9ea547bcb58da", "score": "0.54515964", "text": "function df_posted_on() {\r\n if ( get_theme_mod( 'df_hide_date', 0 ) == 1 ) return;\r\n\r\n \t$post_date = sprintf( '<meta itemprop=\"datePublished\" content=\"%1$s\">%1$s', get_the_date() );\r\n\r\n\t\t$post_date = sprintf(\r\n\t\t\t'<time ' . dahz_get_attr( 'entry-published' ) . '><a href=\"%1$s\">%2$s</a></time>',\r\n\t\t\tget_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ),\r\n\t\t\t$post_date\r\n\t\t);\r\n\r\n \treturn $post_date;\r\n }", "title": "" }, { "docid": "04b03543523545731add3aff75c38542", "score": "0.5408999", "text": "function is_post_date_preserved($id) {\n return OESEPREVIEW_PRESERVE_DATE;\n}", "title": "" }, { "docid": "51bc143b911e9af7252cc7718b700f7d", "score": "0.54064196", "text": "function prism_postmeta_entrydate() {\n\t\n\t $entrydate = '<span class=\"meta-prep meta-prep-entry-date\">' . __('Published:', 'prism') . ' </span>';\n\t $entrydate .= '<span class=\"entry-date\"><abbr class=\"published\" title=\"';\n\t $entrydate .= get_the_time(prism_time_title()) . '\">';\n\t $entrydate .= get_the_time(prism_time_display());\n\t $entrydate .= '</abbr></span>';\n\t \n\t return apply_filters('prism_postmeta_entrydate', $entrydate);\n\t \n\t}", "title": "" }, { "docid": "afde38973a35a6291db88e358d68740e", "score": "0.54034203", "text": "function osc_latest_search_date() {\n return osc_field(osc_latest_search(), 'd_date', '');\n }", "title": "" }, { "docid": "524fac197261ac49736bc8e7378c8f35", "score": "0.5398628", "text": "function kapee_template_loop_post_fancy_date() {\n\t\tget_template_part( 'template-parts/post-loop/fancy-date' );\t\t\n\t}", "title": "" }, { "docid": "ded73eaba5577e3d54cc8dfbbfcd1248", "score": "0.5375726", "text": "function np_page_date(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'pagedisplaydate','1');\n}", "title": "" }, { "docid": "cc1c280f3eec779d1c497163a66cea65", "score": "0.53675944", "text": "function monk_hide_wordpress_version() {\n return '';\n }", "title": "" }, { "docid": "e711907290370b655abe3de5cde6ba3d", "score": "0.5366227", "text": "function date_hookyOP() {\n \techo '<p><?php the_date(); ?>' . 'does not exist</p>' ; \n\n }", "title": "" }, { "docid": "d89d8911fdde0bff6fdcf5c0b924288f", "score": "0.5360216", "text": "public function publish_date() {\n\t\t_deprecated_function( __METHOD__, 'WPSEO 14.0' );\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4294d7cd20289a4600c8f4d08ec1ac8d", "score": "0.53128946", "text": "function childtheme_override_postmeta_entrydate() {\n $entrydate = '<span class=\"entry-date\">';\n $entrydate .= get_the_time(thematic_time_display());\n $entrydate .= '</span>';\n return apply_filters('thematic_postmeta_entrydate', $entrydate);\n}", "title": "" }, { "docid": "57a9525744bbea7dddbf0cc6d9f6622e", "score": "0.5281707", "text": "function kapee_template_single_post_fancy_date() {\n\t\tget_template_part( 'template-parts/single-post/fancy-date' );\t\t\n\t}", "title": "" }, { "docid": "ac9e111976464e3cfaf98970e17f71b3", "score": "0.52414256", "text": "function amado_woocommerce_show_page_title(){\n\n return;\n }", "title": "" }, { "docid": "6eb32f77037d131bf15254b0fd4c5895", "score": "0.52206284", "text": "private function get_metadesc_date()\n {\n }", "title": "" }, { "docid": "7a057edf5c9f6e8bc23e4fd97f804ab6", "score": "0.5201663", "text": "function hide_wordpress_version() {\n\treturn '';\n}", "title": "" }, { "docid": "35dde8613cfb6f750727da768c7e4722", "score": "0.518722", "text": "function oceanwp_edd_product_details_price(){\n\t$output = '<div itemprop=\"price\" class=\"edd_price\">';\n\tif ( ! edd_has_variable_prices( get_the_ID() ) ) :\n\t$output .= edd_price( get_the_ID() );\n\telse:\n\t$output .= edd_price_range( get_the_ID() );\n\tendif;\n\t$output .= '</div>';\n\n\treturn $output;\n}", "title": "" }, { "docid": "586789b408995bba2c9f2e6fbd88811f", "score": "0.51802856", "text": "function genesis_woocommerce(){\n if ( class_exists( 'WooCommerce' ) && ( is_woocommerce() || is_shop() || is_product_category() || is_product_tag() || is_product() || is_cart() || is_checkout() || is_account_page() ) ) {\n \n //* Force full-width-content layout setting\n add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n \n //* http://gasolicious.com/remove-tabs-keep-product-description-woocommerce/\n // Location: add to functions.php\n // Output: removes woocommerce tabs\n \n // remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );\n \n //* http://gasolicious.com/remove-tabs-keep-product-description-woocommerce/\n // Location: add to functions.php\n // Output: adds full description to below price\n \n // function woocommerce_template_product_description() {\n // woocommerce_get_template( 'single-product/tabs/description.php' );\n // }\n add_action( 'woocommerce_single_product_summary', 'woocommerce_template_product_description', 20 );\n \n add_filter('woocommerce_product_description_heading', '__return_null');\n \n }\n \n}", "title": "" }, { "docid": "cb6fc8d339a2167cb1fc3904f5704bd0", "score": "0.5177398", "text": "public function bkap_remove_date_drop() {\n \t \t\n \t $screen = get_current_screen();\n \t \t\n \t if ( !is_null( $screen ) && 'bkap_gcal_event' == $screen->post_type ){\n \t add_filter( 'months_dropdown_results', '__return_empty_array' );\n \t }\n \t}", "title": "" }, { "docid": "3001bcf7ea94cee188a3e0f1cef9c782", "score": "0.51510906", "text": "private static function info_date() {\n $output = sprintf('<span class=\"meta__item\"><time datetime=\"%1$s\">%2$s</time></span>',\n get_the_time('c'),\n get_the_date('Y') === date('Y') ? get_the_time('j F') : get_the_time('j F Y')\n );\n\n return $output;\n }", "title": "" }, { "docid": "e6041353a2a695a99692109f6cf16bc8", "score": "0.5139457", "text": "public function getSpecialFromDate()\n {\n return $this->product->getSpecialFromDate();\n }", "title": "" }, { "docid": "47de3b8845d99aa6601587101c646966", "score": "0.51300657", "text": "function google_review_creator_shortcode() {\n\t$output = '';\n\n\t$reviews = get_transient( 'google_review_widget_contents' );\n\n\tforeach ($reviews as $review) {\n\t\t$review_date = (new DateTime($review->review_date))->format('Y-M-d');\n\t\t$output .= '\n\t\t<p style=\"text-align: justify;\">\n\t\t\t<strong>'. $review->review_name .'</strong>, rated <big>'.$review->review_rating.'</big>, on <small><strong>'. $review_date.'</strong></small>.<br>'.stripslashes($review->review_text).'<br> </p> ';\n\t}\n\n\treturn $output;\n}", "title": "" }, { "docid": "a5868aa73179be581e421a2ad14b7688", "score": "0.5127104", "text": "function minileven_posted_on() {\n\tprintf( __( '<span class=\"entry-date\"><a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time datetime=\"%3$s\" pubdate>%4$s</time></a></span>', 'jetpack' ),\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_time() ),\n\t\tesc_attr( get_the_date( 'c' ) ),\n\t\tesc_html( get_the_date() )\n\t);\n}", "title": "" }, { "docid": "0bc469990e168228e57e555a8b841a7f", "score": "0.5122056", "text": "function np_if_show_homedate(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'h_postdisplaydate','1');\n}", "title": "" }, { "docid": "d709bb463b9398e684e8c02c5aa4abdf", "score": "0.50738114", "text": "function wbbm_create_hidden_event_product($post_id, $title)\n {\n $new_post = array(\n 'post_title' => $title,\n 'post_content' => '',\n 'post_name' => uniqid(),\n 'post_category' => array(),\n 'tags_input' => array(),\n 'post_status' => 'publish',\n 'post_type' => 'product'\n );\n\n\n $pid = wp_insert_post($new_post);\n\n update_post_meta($post_id, 'link_wc_product', $pid);\n update_post_meta($pid, 'link_wbbm_bus', $post_id);\n update_post_meta($pid, '_price', 0.01);\n\n update_post_meta($pid, '_sold_individually', 'yes');\n update_post_meta($pid, '_virtual', 'yes');\n $terms = array('exclude-from-catalog', 'exclude-from-search');\n wp_set_object_terms($pid, $terms, 'product_visibility');\n update_post_meta($post_id, 'check_if_run_once', true);\n }", "title": "" }, { "docid": "ba3a27c2a9a5265b87721fad5d29faef", "score": "0.5072637", "text": "function jacqueline_woocommerce_show_product_title() {\n\t\tif (jacqueline_get_custom_option('show_post_title')=='yes' || jacqueline_get_custom_option('show_page_title')=='no') {\n\t\t\twc_get_template( 'single-product/title.php' );\n\t\t}\n\t}", "title": "" }, { "docid": "577bf6c8d32444228f52ab530c7f54a9", "score": "0.5065424", "text": "function df_posted_on_portfolio() {\n $time_string = '<time class=\"entry-date published\" datetime=\"%1$s\">%2$s</time>';\n $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));\n\n printf(__('<span class=\"posted-on\">%1$s</span>', 'dahztheme'), sprintf('<a href=\"%1$s\" rel=\"bookmark\">%2$s</a>', esc_url(get_permalink()), $time_string));\n }", "title": "" }, { "docid": "648cec4cc3a7209eab071b25e866ac6f", "score": "0.50627345", "text": "public function disable_date_queries()\n {\n }", "title": "" }, { "docid": "f8eff35013f6ada256ac7fb5412f0863", "score": "0.50541675", "text": "function woobits_display_product_reviews() {\n global $product;\n \n if ( ! comments_open() )\n return;\n?>\n <div class=\"product-reviews\">\n <h2 class=\"review-title\" itemprop=\"headline\">\n <?php printf( __( 'Reviews (%d)', 'woocommerce' ), $product->get_review_count() ); ?>\n </h2>\n <?php comments_template();; ?>\n </div>\n <div class=\"clearfix clear\"></div>\n<?php\n}", "title": "" }, { "docid": "bc2cada55007036695b94b1b78c0585b", "score": "0.50349486", "text": "function comicpress_copyright() {\nglobal $wpdb;\n$copyright_dates = $wpdb->get_results(\"\nSELECT\nYEAR(min(post_date_gmt)) AS firstdate,\nYEAR(max(post_date_gmt)) AS lastdate\nFROM\n$wpdb->posts\nWHERE\npost_status = 'publish'\n\");\n$output = '';\nif($copyright_dates) {\n$copyright = \"&copy; \" . $copyright_dates[0]->firstdate;\nif($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {\n$copyright .= '-' . $copyright_dates[0]->lastdate;\n}\n$output = $copyright;\n}\nreturn $output;\n}", "title": "" }, { "docid": "d458afb3f41d6451c579c5fff353311c", "score": "0.50227046", "text": "function shop_isle_recent_products( $args ) {\n\n\t\tif ( is_woocommerce_activated() ) {\n\n\t\t\t$args = apply_filters(\n\t\t\t\t'shop_isle_recent_products_args',\n\t\t\t\tarray(\n\t\t\t\t\t'limit' => 4,\n\t\t\t\t\t'columns' => 4,\n\t\t\t\t\t'title' => __( 'Recent Products', 'shop-isle' ),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\techo '<section class=\"shop-isle-product-section shop-isle-recent-products\">';\n\n\t\t\tdo_action( 'shop_isle_homepage_before_recent_products' );\n\n\t\t\techo '<h2 class=\"section-title\">' . esc_attr( $args['title'] ) . '</h2>';\n\t\t\techo do_shortcode( '[recent_products per_page=\"' . intval( $args['limit'] ) . '\" columns=\"' . intval( $args['columns'] ) . '\"]' );\n\n\t\t\tdo_action( 'shop_isle_homepage_after_recent_products' );\n\n\t\t\techo '</section>';\n\n\t\t}\n\t}", "title": "" }, { "docid": "f88d8f7d7c2d77658abf2c7a4b879911", "score": "0.5022351", "text": "public function preview_published_at($_post) {\n // this fixes this for the API so the external system gets a slug\n if (empty($_post['date'])) {\n $_post['date'] = $_post['modified'];\n }\n\n return $_post;\n }", "title": "" }, { "docid": "12c92170839cb9d824d7d3e1e7c81e69", "score": "0.5013364", "text": "function wiStarter_copyright() {\r\n\t\tglobal $wpdb;\r\n\t\t$copyright_dates = $wpdb->get_results(\"\r\n\tSELECT\r\n\t\tYEAR(min(post_date_gmt)) AS firstdate,\r\n\t\tYEAR(max(post_date_gmt)) AS lastdate\r\n\tFROM\r\n\t\t$wpdb->posts\r\n\tWHERE\r\n\t\tpost_status = 'publish'\r\n\t\");\r\n\t$output = '';\r\n\t\tif($copyright_dates) {\r\n\t\t\t$copyright = \"&copy; \" . $copyright_dates[0]->firstdate;\r\n\t\tif($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {\r\n\t\t\t$copyright .= '-' . $copyright_dates[0]->lastdate;\r\n\t\t}\r\n\t$output = $copyright;\r\n\t}\r\n\treturn $output;\r\n\t}", "title": "" }, { "docid": "027089de948702968b514fce276c67e5", "score": "0.5007498", "text": "function simplecart_time_display() {\n\n $time_display = get_option('date_format');\n\n\t// Filters should return correct \n\t$time_display = apply_filters('simplecart_time_display', $time_display);\n\t\n\treturn $time_display;\n}", "title": "" }, { "docid": "571d77ea3ec0fd3a2cc80990a0e389da", "score": "0.50049675", "text": "function evf_date_format() {\n\treturn apply_filters( 'everest_forms_date_format', get_option( 'date_format' ) );\n}", "title": "" }, { "docid": "0e64f1ed30adbac851162b91330fd641", "score": "0.499397", "text": "function gb_entry_meta() {\n\techo '<time class=\"updated\" datetime=\"'. get_the_time('c') .'\" pubdate>'. sprintf(__('Posted on %s', 'reverie'), get_the_time('l, F jS, Y'), get_the_time()) .'</time>';\n}", "title": "" }, { "docid": "63687239315b8c63a7b111990d8a3362", "score": "0.49768433", "text": "function pewc_hidden_fields_product_page( $post_id, $product, $summary_panel ) {\n\n\t// Hidden fields with product data\n\tif( $product->is_type( 'variable' ) ) {\n\t\t$default_price = 0;\n\t} else {\n\t\t$default_price = $product->get_price();\n\t}\n\n\t// Look for anything that might have changed the price\n\t$default_price = apply_filters( 'pewc_filter_default_price', $default_price, $product );\n\n\t// Fields used for pricing\n\techo '<input type=\"hidden\" id=\"pewc-product-price\" name=\"pewc-product-price\" value=\"' . pewc_maybe_include_tax( $product, $default_price ) . '\">';\n\techo '<input type=\"hidden\" id=\"pewc_calc_set_price\" name=\"pewc_calc_set_price\" data-calc-set value=\"\">';\n\techo '<input type=\"hidden\" id=\"pewc_total_calc_price\" name=\"pewc_total_calc_price\" value=\"' . pewc_maybe_include_tax( $product, $default_price ) . '\">';\n\techo '<input type=\"hidden\" id=\"pewc_variation_price\" name=\"pewc_variation_price\" value=\"\">';\n\n\t// Fields used for product dimensions\n\tprintf(\n\t\t'<input type=\"hidden\" id=\"pewc_product_length\" name=\"pewc_product_length\" value=\"%s\">',\n\t\t$product->get_length()\n\t);\n\tprintf(\n\t\t'<input type=\"hidden\" id=\"pewc_product_width\" name=\"pewc_product_width\" value=\"%s\">',\n\t\t$product->get_width()\n\t);\n\tprintf(\n\t\t'<input type=\"hidden\" id=\"pewc_product_height\" name=\"pewc_product_height\" value=\"%s\">',\n\t\t$product->get_height()\n\t);\n\tprintf(\n\t\t'<input type=\"hidden\" id=\"pewc_product_weight\" name=\"pewc_product_weight\" value=\"%s\">',\n\t\t$product->get_weight()\n\t);\n\n\tprintf(\n\t\t'<input type=\"hidden\" id=\"pewc_product_id\" name=\"pewc_product_id\" value=\"%s\">',\n\t\t$product->get_id()\n\t);\n\n\t// Variations grid\n\techo '<input type=\"hidden\" name=\"pewc-grid-total-variations\" id=\"pewc-grid-total-variations\" value=\"\">';\n\n\t// Nonces\n\twp_nonce_field( 'pewc_file_upload', 'pewc_file_upload' );\n\twp_nonce_field( 'pewc_total', 'pewc_total' );\n\n}", "title": "" }, { "docid": "a43801565dd125776fb5d5520833ccee", "score": "0.49752173", "text": "public function hide_wp_version() {\n add_filter('script_loader_src', [$this, 'remove_url_version_strings']);\n add_filter('style_loader_src', [$this, 'remove_url_version_strings']);\n add_filter('the_generator', [$this, 'remove_wordpress_version']);\n }", "title": "" }, { "docid": "ee572369d69c6c398b4aaa40425e7662", "score": "0.49740762", "text": "function nr_format_date( $date ) {\r\n $options = get_option(NOW_READING_OPTIONS);\r\n if ( !is_numeric($date) )\r\n $date = strtotime($date);\r\n if ( empty($date) )\r\n return '';\r\n return apply_filters('nr_format_date', date($options['formatDate'], $date));\r\n}", "title": "" }, { "docid": "70a7df9a3c1a8b116f03923e54d01eb6", "score": "0.4966633", "text": "function amado_wc_loop_product_title(){ ?>\n <div class=\"single-product-wrapper\">\n <!-- Product Image -->\n <div class=\"product-img\">\n\n <?php woocommerce_template_loop_product_thumbnail();?>\n <!-- Hover Thumb -->\n\n <img class=\"hover-img\" src=\"<?php the_field('products_hover_image');?>\" alt=\"\">\n\n </div>\n\n <!-- Product Description -->\n <div class=\"product-description d-flex align-items-center justify-content-between\">\n <!-- Product Meta Data -->\n <div class=\"product-meta-data\">\n <div class=\"line\"></div>\n <?php woocommerce_template_loop_price(); ?>\n <a href=\"<?php the_permalink(); ?>\">\n <h6><?php the_title(); ?></h6>\n </a>\n </div>\n <!-- Ratings & Cart -->\n <div class=\"ratings-cart text-right\">\n <div class=\"ratings\">\n <?php woocommerce_template_loop_rating(); ?>\n </div>\n <div class=\"cart\">\n <?php woocommerce_template_loop_add_to_cart(); ?>\n </div>\n </div>\n </div>\n </div>\n <?php }", "title": "" }, { "docid": "50f3c3d3f94d120ce991fcd1d2ed4bc2", "score": "0.4964478", "text": "function tokopress_shop_description() {\n\t$output = '';\n\tob_start();\n if ( of_get_option( 'tokopress_wc_hide_products_header' ) ) {\n\t\techo '<h1 class=\"page-title\">';\n\t\twoocommerce_page_title();\n\t\techo '</h1>';\n }\n\tdo_action( 'woocommerce_archive_description' );\n\t$output .= ob_get_clean();\n\tif ( $output ) {\n\t\techo '<div class=\"shop_description\">'.$output.'</div>';\n\t}\n}", "title": "" }, { "docid": "a7a9a77ba5822585852dd82d14ea69f7", "score": "0.49607235", "text": "function get_meta_date($before = '%s') {\n\t\treturn '<span class=\"entry-meta-date\">'.sprintf($before, '<a href=\"'.get_permalink().'\">'.get_the_time(get_option('date_format')).'</a></span>').'</span>';\n\t}", "title": "" }, { "docid": "b311d9d31e2be96a3d471593e2153d70", "score": "0.496048", "text": "protected function get_non_cached_date_archive_permalink()\n {\n }", "title": "" }, { "docid": "2657735d188111996dc65f3bae472416", "score": "0.49486876", "text": "public function removeGeneratedDate($html)\n {\n // removes the date in the episode being translated\n $html = preg_replace('~^ +<input id=\"rdr-translation-in-progress-date\" type=\"hidden\" value=\".+?\"/>$~m', '', $html);\n $html = preg_replace('~^\\s*Generated.+?$~m', '', $html);\n $html = preg_replace('~^\\s*@copyright.+?$~m', '', $html);\n $html = str_replace(\"\\r\\n\", \"\\n\", $html);\n\n return $html;\n }", "title": "" }, { "docid": "a3ae6e88a9d7b9d48db8ebb5d6248823", "score": "0.4942033", "text": "function wpcampus_print_article_time() {\n\n\t$time_string = '<time class=\"entry-date published updated\" datetime=\"%1$s\">%2$s</time>';\n\n\tif ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {\n\t\t$time_string = '<time class=\"entry-date published\" datetime=\"%1$s\">%2$s</time>';\n\t}\n\n\techo sprintf(\n\t\t$time_string,\n\t\tget_the_date( DATE_W3C ),\n\t\tget_the_date()\n\t);\n}", "title": "" }, { "docid": "21e34e06d5a43fb15509eee703fa9216", "score": "0.49409896", "text": "public function getPublish_dateOriginal(){\n\t\treturn $this->publish_date;\n\t}", "title": "" }, { "docid": "1d6597475ba8d10b4fd233151f686dca", "score": "0.4927641", "text": "public function getProductPriceDate() {\n return $this->productPriceDate;\n }", "title": "" }, { "docid": "f4d154692bbaef1a0e95322d710035be", "score": "0.49267885", "text": "function flaton_template_single_price() {\n\t add_filter(\"woocommerce_get_price_html_from_to\", \"flaton_get_price_html_from_to\", 10 , 4);\n add_filter( 'woocommerce_sale_price_html', 'woocommerce_custom_sales_price', 10, 2 );\n\t\twc_get_template( 'single-product/price.php' );\n remove_filter( \"woocommerce_get_price_html_from_to\", \"flaton_get_price_html_from_to\", 10 , 4);\n remove_filter( 'woocommerce_sale_price_html', 'woocommerce_custom_sales_price', 10, 2 );\n\t}", "title": "" }, { "docid": "b71473ccf4a6e3ef5e65f2821d6a7099", "score": "0.49192017", "text": "function qclinics_product_price_custom() {\r\n wc_get_template( 'single-product/price-custom.php' );\r\n}", "title": "" }, { "docid": "eb86ea63c59b3bc8207d83f0e13b449f", "score": "0.49186593", "text": "function ox_posted_on($echo = true)\n{\n $time_tag = sprintf(\n '<time class=\"entry-date published\" datetime=\"%1$s\">%2$s</time>',\n esc_attr(get_the_date(DATE_W3C)),\n esc_html(get_the_date())\n );\n\n if ($echo) {\n echo $time_tag;\n } else {\n return $time_tag;\n }\n}", "title": "" }, { "docid": "7a1a0c001fe91090655c063a1a976217", "score": "0.49154598", "text": "public static function render_commerce_fields( \\WC_Product $product ) {\n\n\t\t?>\n\t\t<p class=\"form-field <?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>_field\">\n\t\t\t<label for=\"<?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>\">\n\t\t\t\t<?php echo esc_html_e( 'Sell on Instagram', 'facebook-for-woocommerce' ); ?>\n\t\t\t\t<span class=\"woocommerce-help-tip\"\n\t\t\t\t\t data-tip=\"<?php echo esc_attr_e( 'Enable to sell this product on Instagram. Products that are hidden in the Facebook catalog can be synced, but won’t be available for purchase.', 'facebook-for-woocommerce' ); ?>\"></span>\n\t\t\t</label>\n\t\t\t<input type=\"checkbox\" class=\"enable-if-sync-enabled\"\n\t\t\t\t name=\"<?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>\"\n\t\t\t\t id=\"<?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>\" value=\"yes\"\n\t\t\t\t checked=\"<?php echo Products_Handler::is_commerce_enabled_for_product( $product ) ? 'checked' : ''; ?>\">\n\t\t</p>\n\n\t\t<div id=\"product-not-ready-notice\" style=\"display:none;\">\n\t\t\t<p>\n\t\t\t\t<?php esc_html_e( 'This product does not meet the requirements to sell on Instagram.', 'facebook-for-woocommerce' ); ?>\n\t\t\t\t<a href=\"#\" id=\"product-not-ready-notice-open-modal\"><?php esc_html_e( 'Click here to learn more.', 'facebook-for-woocommerce' ); ?></a>\n\t\t\t</p>\n\t\t</div>\n\n\t\t<div id=\"variable-product-not-ready-notice\" style=\"display:none;\">\n\t\t\t<p>\n\t\t\t<?php\n\t\t\techo sprintf(\n\t\t\t\t/* translators: Placeholders %1$s - strong opening tag, %2$s - strong closing tag */\n\t\t\t\tesc_html__( 'To sell this product on Instagram, at least one variation must be synced to Facebook. You can control variation sync on the %1$sVariations%2$s tab with the %1$sFacebook Sync%2$s setting.', 'facebook-for-woocommerce' ),\n\t\t\t\t'<strong>',\n\t\t\t\t'</strong>'\n\t\t\t);\n\t\t\t?>\n\t\t\t</p>\n\t\t</div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "02d9afca4fd986eca83c15681729b1f7", "score": "0.48988876", "text": "function aswb_custom_filter_product_display( $product_id ) {\n\t$product = wc_get_product( $product_id );\n\n\t$name = $product->get_name();\n\t$raw_price = $product->get_price();\n\t$display_cost = $product->get_display_cost();\n\n\t// Show display price otherwise fall back to normal price\n\t$price = ! empty( $display_cost ) ? wc_price( $display_cost ) : wc_price( $raw_price );\n\n\t$description = $product->get_short_description();\n\t$thumbnail = woocommerce_get_product_thumbnail( $product->get_id() );\n\t$link = get_permalink( $product->get_id() );\n\t// Create the add to cart button. Style stops a weird border tag from appearing.\n\t$shortcode = \"[add_to_cart style='' show_price='false' id='$product_id']\";\n\t// Shortcode for add to cart button inherits your theme styling\n\t$button = do_shortcode( $shortcode );\n\n\t// Translatable\n\t$price_from = __( 'Book from', 'availability-search-custom-product-display' );\n\n\t// Let's make an html template. Data must be variable!\n\t$output = \"<div class='aswb-custom-product-wrapper'>\n\n\t\t\t\t\t<div class='aswb-custom-product-left'>\n\t\t\t\t\t\t<a href='$link'>\n\t\t\t\t\t\t$thumbnail\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class='aswb-custom-product-right'>\n\t\t\t\t\t<a href='$link'>\n\t\t\t\t\t\t<h4> $name </h4>\n\t\t\t\t\t\t<span class='price'>\n\t\t\t\t\t\t$price_from $price\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t$description\n\t\t\t\t\t\t</p>\n\t\t\t\t\t$button\n\t\t\t\t\t</div>\n\t\t\t\t</div>\";\n\n\treturn $output; // The html must be returned\n}", "title": "" }, { "docid": "14fefb2ea706ba54a9d0ed2221005f8e", "score": "0.48888466", "text": "function install_wp_coming_soon() {\r\n // do not generate any output here\r\n}", "title": "" }, { "docid": "e9129fa9e52ff9edeae53671153bcd5c", "score": "0.48883113", "text": "function startertheme_remove_meta_version() {\n return '';\n}", "title": "" }, { "docid": "4fb2a1a23317e2778d8e286a319d9672", "score": "0.48850557", "text": "function jacqueline_woocommerce_wrapper_start() {\n\t\tif (is_product() || is_cart() || is_checkout() || is_account_page()) {\n\t\t\t?>\n\t\t\t<article class=\"post_item post_item_single post_item_product\">\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"list_products shop_mode_<?php echo !jacqueline_storage_empty('shop_mode') ? jacqueline_storage_get('shop_mode') : 'thumbs'; ?>\">\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "0e3333b27f346f6b5342196b59e8e0f7", "score": "0.4883573", "text": "function woo_custom_hide_sales_flash(){\n return false;\n }", "title": "" }, { "docid": "796d912acc4cc910da16d15069a36328", "score": "0.48797065", "text": "function indonez_latestproducts($num=2,$title=\"\") { \n global $post;\n \n if ($title!=\"\") echo $title;\n \n query_posts(array( 'post_type' => 'products', 'showposts' => $num,'orderby'=>'date'));\n ?>\n <ul class=\"list2\">\n <?php \n $counter = 0;\n while (have_posts()) : the_post();\n $product_url = get_post_meta($post->ID,\"_product_url\",true);\n $product_highlights = get_post_meta($post->ID,'_product_highlight',true);\n $product_highlights = explode(\",\",$product_highlights);\n $counter++;\n $thumb = get_post_thumbnail_id();\n $img_url = wp_get_attachment_url( $thumb,'full' ); //get full URL to image (use \"large\" or \"medium\" if the images too big)\n $image = aq_resize( $img_url, 92,92, true ); //resize & crop the image\n ?>\n \t <li <?php if ($counter %2 == 0) echo 'class=\"marginoff\"';?>>\n <img src=\"<?php echo $image;?>\" alt=\"\" class=\"imgleft shadow\" />\n <h5 class=\"heading-green\"><a href=\"<?php the_permalink();?>\"><?php the_title();?></a></h5>\n <span><?php echo get_the_excerpt();?></span>\n <span class=\"but-details\"><a href=\"<?php the_permalink();?>\"><?php echo __('Details','tucana');?></a></span>\n <?php if ($product_url !=\"\") { ?>\n <span class=\"but-buynow\"><a href=\"#\"><?php echo __('Buy Now','tucana');?></a></span>\n <?php } ?>\n <?php if ($counter %2 == 0) echo '<br/><br/>';?>\n </li>\n <?php endwhile;wp_reset_query();?>\n </ul>\n <?php\n}", "title": "" }, { "docid": "4dc42df72d20a95a38012afb34b8fe6f", "score": "0.48544285", "text": "public static function clear_products_cache() {\n\t\tglobal $woocommerce;\n\t\tif(version_compare($woocommerce->version, '2.4', '>=')) {\n\t\t\t\\WC_Cache_Helper::get_transient_version('product', true);\n\t\t}\n\t}", "title": "" }, { "docid": "73fd338b547992b6d0a8a38585088191", "score": "0.4847447", "text": "function prism_time_display() {\n\n\t$time_display = get_option('date_format');\n\t\n\t// Filters should return correct \n\t$time_display = apply_filters('prism_time_display', $time_display);\n\t\n\treturn $time_display;\n}", "title": "" }, { "docid": "547291bebc9d6714eb4b7b9c06b8d182", "score": "0.48473638", "text": "function woocommerce_related_products( $args = array() ) {\n\t\tglobal $product;\n\n\t\tif ( ! $product ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$defaults = array(\n\t\t\t'posts_per_page' => 2,\n\t\t\t'columns' => 2,\n\t\t\t'orderby' => 'rand', // @codingStandardsIgnoreLine.\n\t\t\t'order' => 'desc',\n\t\t);\n\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\t// Get visible related products then sort them at random.\n\t\t$related_products = wc_get_related_products( $product->get_id(), $args['posts_per_page'], $product->get_upsell_ids() );\n\n\t\t// Verifica si existe polylang y lo usa para filtrar los posts recomendados\n\t\t// que son traducciones o corresponden a otro idioma\n\t\tif ( function_exists( 'pll_current_language' ) ) {\n\t\t $language_code = pll_current_language();\n echo \"<br>\";\n\t\t foreach ($related_products as $i => $product_id) {\n $translation = pll_get_post($product_id, $language_code);\n if( $translation == $product->get_id() ) {\n // Ignorar el producto si es una traducción del producto actual\n // echo \"Ignorando el producto: \" . get_the_title( $product_id );\n unset( $related_products[$i] );\n break;\n }\n\n // Ignorar el producto si está en otro idioma\n if ( pll_get_post_language( $product_id ) != $language_code ) {\n unset( $related_products[$i] );\n break;\n }\n }\n\t\t}\n\t\t$args['related_products'] = array_filter( array_map( 'wc_get_product', $related_products ), 'wc_products_array_filter_visible' );\n\n\t\t// Handle orderby.\n\t\t$args['related_products'] = wc_products_array_orderby( $args['related_products'], $args['orderby'], $args['order'] );\n\n\t\t// Set global loop values.\n\t\twc_set_loop_prop( 'name', 'related' );\n\t\twc_set_loop_prop( 'columns', apply_filters( 'woocommerce_related_products_columns', $args['columns'] ) );\n\n\t\twc_get_template( 'single-product/related.php', $args );\n\t}", "title": "" }, { "docid": "f49affd555bafadfbb05b7d6aef5721b", "score": "0.48419893", "text": "function wd_template_single_review(){\n\tglobal $product;\n\n\tif ( get_option( 'woocommerce_enable_review_rating' ) == 'no' )\n\t\treturn;\t\t\n\t\t\n\tif ( $rating_html = $product->get_rating_html() ) {\n\t\techo \"<div class=\\\"review_wrapper\\\">\";\n\t\techo $rating_html; \n\t\techo '<span class=\"review_count\">'.$product->get_rating_count(),\" \";\n\t\t_e(\"Review(s)\",'wpdance');\n\t\techo \"</span>\";\n\t\techo '<span class=\"add_new_review\"><a href=\"#review_form\" class=\"inline show_review_form\" title=\"Review for '. esc_attr($product->get_title()) .' \">' . __( 'Add Your Review', 'wpdance' ) . '</a></span>';\n\t\techo \"</div>\";\n\t}else{\n\t\techo '<p><span class=\"add_new_review\"><a href=\"#review_form\" class=\"inline show_review_form\" title=\"Review for '. esc_attr($product->get_title()) .' \">' . __( 'Be the first to review this product', 'wpdance' ) . '</a></span></p>';\n\n\t}\n\n\t\n}", "title": "" }, { "docid": "1e2525fca55b7ccc14e9bbee3336a3ba", "score": "0.48392853", "text": "protected function get_product_title()\n {\n }", "title": "" }, { "docid": "1e2525fca55b7ccc14e9bbee3336a3ba", "score": "0.48392853", "text": "protected function get_product_title()\n {\n }", "title": "" }, { "docid": "a925846bfe5a0eabe0ed28d634dc3414", "score": "0.4832404", "text": "function cb_std_sys_copyright() {\n global $wpdb;\n $copyright_dates = $wpdb->get_results(\"\n SELECT YEAR(min(post_date_gmt)) AS firstdate, YEAR(max(post_date_gmt)) AS lastdate\n FROM $wpdb->posts WHERE post_status = 'publish'\");\n if( $copyright_dates ) {\n $copyright = $copyright_dates[0]->firstdate;\n if ( cbstdsys_opts('c_first_pub') !='' )\n \t\t$copyright = cbstdsys_opts('c_first_pub');\n\n\t\t\t\t\t\tif( $copyright != $copyright_dates[0]->lastdate )\n $copyright .= '-' . $copyright_dates[0]->lastdate;\n\n }\n return '<span class=\"copy-time\">' .$copyright. '</span> '.apply_filters( 'cb_std_sys_copyright', get_bloginfo(\"name\").\". \".__('All rights reserved', 'cb-std-sys').\".\" );\n }", "title": "" }, { "docid": "63442fad03d6e3a7fe95de6d66a56527", "score": "0.48231804", "text": "public function sr_single_product_display()\n\t\t{\n\t\t\t//remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);\t\t\t\t// [1.1] Remove price from summary\n\t\t\tadd_action('woocommerce_single_product_pricing', 'woocommerce_template_single_add_to_cart', 30);\t\t\t// [2.2] Move add to cart input to right\n\t\t\tremove_action(\"woocommerce_before_single_product_summary\", \"woocommerce_show_product_images\", 20);\t\t\t// [1.0] Remove Product Image\n\t\t\tremove_action('woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);\t// Remove tabs\n\t\t\tremove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);\t // [2.1] Remove add to cart input\n\t\t\tremove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);\t\t\t\t\t// Remove category\n\t\t\tremove_action('woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10); \t// Remove star reviews under title\n\t\t\tadd_filter('wc_add_to_cart_message_html', [$this, 'sr_added_cart_notice'], 10, 3);\n\t\t}", "title": "" }, { "docid": "e099f3a1a468510509e6596ce1deb747", "score": "0.4821066", "text": "public function getSpecialToDate()\n {\n return $this->product->getSpecialToDate();\n }", "title": "" }, { "docid": "56d8c24b8fd07730456f48a51774f6c6", "score": "0.48198003", "text": "function wpsc_admin_product_listing($parent_product = null) {\n\tglobal $wp_query;\n\tadd_filter('the_title','esc_html');\n\t$args = array_merge( $wp_query->query, array( 'posts_per_page' => '-1' ) );\n\t$GLOBALS['wpsc_products'] = get_posts( $args );\n\n\tforeach ( (array)$GLOBALS['wpsc_products'] as $product ) {\n\t\twpsc_product_row($product, $parent_product);\n\t}\n}", "title": "" }, { "docid": "67a94d71b6407d96516fce46ef9d1b54", "score": "0.48162624", "text": "function is_customize_preview() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e16757b192e5c43981395a505132bc10", "score": "0.480293", "text": "function mts_remove_wpversion() {\n\treturn '<!--Theme by MyThemeShop.com-->';\n}", "title": "" }, { "docid": "729d407836ed2e89b64165612d1f8592", "score": "0.48005283", "text": "function prolingua_trx_addons_get_post_date($dt='') {\n\n\t\tif ( defined('TRX_ADDONS_CPT_COURSES_PT') && get_post_type()==TRX_ADDONS_CPT_COURSES_PT) {\n\t\t\t$meta = get_post_meta(get_the_ID(), 'trx_addons_options', true);\n\t\t\t$dt = $meta['date'];\n\t\t\t// Translators: Add formatted date to the output\n\t\t\t$dt = sprintf($dt < date('Y-m-d') ? esc_html__('Started on %s', 'prolingua') : esc_html__('Starting %s', 'prolingua'), \n\t\t\t\t\tdate_i18n(get_option('date_format'), strtotime($dt)));\n\n\t\t} else if ( defined('TRX_ADDONS_CPT_COMPETITIONS_PT') && in_array(get_post_type(), array(TRX_ADDONS_CPT_COMPETITIONS_PT, TRX_ADDONS_CPT_ROUNDS_PT, TRX_ADDONS_CPT_MATCHES_PT))) {\n\t\t\t$meta = get_post_meta(get_the_ID(), 'trx_addons_options', true);\n\t\t\t$dt = $meta['date_start'];\n\t\t\t// Translators: Add formatted date to the output\n\t\t\t$dt = sprintf($dt < date('Y-m-d').(!empty($meta['time_start']) ? ' H:i' : '') ? esc_html__('Started on %s', 'prolingua') : esc_html__('Starting %s', 'prolingua'), \n\t\t\t\t\tdate_i18n(get_option('date_format') . (!empty($meta['time_start']) ? ' '.get_option('time_format') : ''), strtotime($dt.(!empty($meta['time_start']) ? ' '.trim($meta['time_start']) : ''))));\n\n\t\t} else if ( defined('TRX_ADDONS_CPT_COMPETITIONS_PT') && get_post_type() == TRX_ADDONS_CPT_PLAYERS_PT) {\n\t\t\t// Uncomment (remove) next line if you want to show player's birthday in the page title block\n\t\t\tif (false) {\n\t\t\t\t$meta = get_post_meta(get_the_ID(), 'trx_addons_options', true);\n\t\t\t\t// Translators: Add formatted date to the output\n\t\t\t\t$dt = !empty($meta['birthday']) ? sprintf(esc_html__('Birthday: %s', 'prolingua'), date_i18n(get_option('date_format'), strtotime($meta['birthday']))) : '';\n\t\t\t} else\n\t\t\t\t$dt = '';\n\t\t}\n\t\treturn $dt;\n\t}", "title": "" }, { "docid": "7818d0c6dd52cdbd15c5f3f5cbe0ccb4", "score": "0.47975028", "text": "function woocommerce_init() {\r\n\t\t\tremove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );\r\n\t\t\tremove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );\r\n\t\t\tremove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );\r\n\t\t\tremove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );\r\n\t\t\tremove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );\r\n\t\t\tremove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );\r\n\t\t\tremove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );\r\n\t\t}", "title": "" }, { "docid": "5d2b7a52993a3f90b52bc4065926120d", "score": "0.47946504", "text": "public function getPrintStartDate();", "title": "" }, { "docid": "3c008a29eb285285cbcd696e2345a1d6", "score": "0.47877148", "text": "protected function dates() {\n $dates = $this->crud\n ->content(false)\n ->filter(function(Field $field) {\n return $field->isDate();\n })\n ->keys();\n\n if ($this->crud->softDeletes() && !$dates->contains('deleted_at')) {\n $dates->prepend('deleted_at');\n }\n\n return 'protected $dates = ' . $this->compileArrayForPhp($dates->toArray()) . ';';\n }", "title": "" }, { "docid": "967bd773c0b5a8785d6c66e5b8e4200c", "score": "0.47866917", "text": "function kloe_qodef_get_woocommerce_out_of_stock(){\n\n\t\tglobal $product;\n\n\t\tif (!$product->is_in_stock()) {\n\t\t\tprint '<span class=\"qodef-out-of-stock-button\"><span class=\"qodef-out-of-stock-button-inner\">' . esc_html__(\"Out of stock!\", \"kloe\") . '</span></span>';\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "c962c83a5e04fcb6a5deff7afc41f7b8", "score": "0.47751603", "text": "function alm_woo_hide_orderby(){\n\t$hide_ordering = apply_filters('alm_woocommerce_hide_orderby', false);\n\t$classname = apply_filters('alm_woocommerce_orderby_class', 'woocommerce-ordering');\n\treturn ($hide_ordering) ? '.'. $classname .'{display:none;}' : '';\n\n}", "title": "" }, { "docid": "adb710aaf1171624d3019c6e3810ebf3", "score": "0.4775093", "text": "public function column_date(/**\n * Filters the published time of the post.\n *\n * @since 2.5.1\n * @since 5.5.0 Removed the difference between 'excerpt' and 'list' modes.\n * The published time and date are both displayed now,\n * which is equivalent to the previous 'excerpt' mode.\n *\n * @param string $t_time The published time.\n * @param WP_Post $post Post object.\n * @param string $column_name The column name.\n * @param string $mode The list display mode ('excerpt' or 'list').\n */\n$post) {}", "title": "" }, { "docid": "44339ffa940e2becbbcffddc56dd4df9", "score": "0.47732827", "text": "public function getDropDownsDateHtml()\n {\n $fieldsSeparator = '&nbsp;';\n $fieldsOrder = $this->_catalogProductOptionTypeDate->getConfigData('date_fields_order');\n $fieldsOrder = str_replace(',', $fieldsSeparator, $fieldsOrder);\n\n $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);\n $daysHtml = $this->_getSelectFromToHtml('day', 1, 31);\n\n $yearStart = $this->_catalogProductOptionTypeDate->getYearStart();\n $yearEnd = $this->_catalogProductOptionTypeDate->getYearEnd();\n $yearsHtml = $this->_getSelectFromToHtml('year', $yearStart, $yearEnd);\n\n $translations = ['d' => $daysHtml, 'm' => $monthsHtml, 'y' => $yearsHtml];\n return strtr($fieldsOrder, $translations);\n }", "title": "" }, { "docid": "4b0fa67b24edd96e1bd67e186e432288", "score": "0.4765873", "text": "function magazinevibe_edge_post_info_date($config){\n\t\t$default_config = array(\n\t\t\t'date' => '',\n 'date_format' => ''\n\t\t);\n\n\t\t$params = (shortcode_atts($default_config, $config));\n\n\t\tif($params['date'] == 'yes'){\n\t\t\tmagazinevibe_edge_get_module_template_part('templates/parts/single-function/post-info-date-single', 'blog', '', $params);\n\t\t}\n\t}", "title": "" }, { "docid": "26529770d5e84cbdc20ff0495fc4d0f0", "score": "0.47549218", "text": "public function getDisplayDate();", "title": "" }, { "docid": "8a3bafa1a874e7b2efcf9f124db09352", "score": "0.47531626", "text": "public function getLiquidationDate()\n {\n $value = $this->get(self::LIQUIDATIONDATE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "a3f0b05f268ab6816e4be51677543614", "score": "0.47478926", "text": "function woocommerce_template_loop_product_title() {\n\t\techo '<div class=\"ef5-heading ef5-loop-product-title text-small\"><a href=\"'.get_the_permalink().'\">' . get_the_title() . '</a></div>';\n\t}", "title": "" }, { "docid": "1d7a7281545421c2cc06416e9c215ec1", "score": "0.47447065", "text": "function woo_chatbot_track_product_view()\r\n{\r\n if (!is_singular('product')) {\r\n return;\r\n }\r\n global $post;\r\n woo_chatbot_view_track_product_by_id($post->ID);\r\n}", "title": "" }, { "docid": "6160faa6b0c1f05a2f9a0eebc0ecd7db", "score": "0.47409016", "text": "function Show_NoProducts()\n\t\t{\n\t\t\tglobal $Captions_arr;\n\t\t?>\n\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"shelfBtable\">\n \t<tr>\n\t \t<td colspan=\"3\" class=\"shelfBheader\"><?php echo $Captions_arr['SHOP_DETAILS']['NO_PROD']?></td>\n \t</tr>\n \t<tr>\n \t \t<td align=\"left\" valign=\"middle\" class=\"shelfBtabletd\"><h1 class=\"shelfBprodname\" ><?php echo $Captions_arr['SHOP_DETAILS']['NO_PROD_MSG']?></h1>\n\t\t\t \t</td>\n\t\t\t</tr>\t \n\t\t\t</table>\n\t\t<?php\t\n\t\t}", "title": "" }, { "docid": "933343036ec6e3db7a909e008136b10e", "score": "0.47402734", "text": "function edd_incentives_render_content( $content ) {\n global $post;\n \n if( is_object( $post ) && edd_get_option( 'purchase_page' ) == $post->ID ) {\n $content .= '<div style=\"display: none;\">';\n $content .= '<div id=\"edd-incentives-display\">';\n\n $content .= '</div>';\n $content .= '</div>';\n }\n\n return $content;\n}", "title": "" }, { "docid": "386c62bc35445df75b3829a3fcd41002", "score": "0.47398615", "text": "function woocommerce_template_loop_product_title() {\n\t\techo '<span class=\"h4 text-uppercase\">' . get_the_title() . '</span>';\n\t}", "title": "" }, { "docid": "fae2dbb12db37bff737322e674bb24be", "score": "0.47385833", "text": "public function getProductCollectionInitial() {\n $storeIdData = Mage::app()->getStore()->getId();\n $todaysDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);\n $tomorrow = mktime(0, 0, 0, date('m'), date('d') + 1, date('y'));\n $dateTomorrow = date('m/d/y', $tomorrow);\n $fromDate = Mage::getModel('core/date')->date('Y-m-d');\n $toDate = date('Y-m-d', $tomorrow); \n $products = Mage::getResourceModel('reports/product_collection')\n ->addAttributeToSelect('*')\n ->setStoreId($storeIdData)\n ->addStoreFilter($storeIdData)\n ->addViewsCount($fromDate, $toDate)\n ->addAttributeToFilter('special_price', array('neq' => ''))\n ->addAttributeToFilter('special_from_date', array('date' => true, 'to' => $todaysDate))\n ->addAttributeToFilter('special_to_date', array('or' => array(0 => array('date' => true, 'from' => $dateTomorrow), 1 => array('is' => new Zend_Db_Expr('null')))), 'left')\n ->addAttributeToFilter('status', '1');\n Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);\n Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);\n return $products;\n }", "title": "" }, { "docid": "1df4b7fd34716be5b06c03af2a469a1e", "score": "0.47365928", "text": "function wpbeginner_remove_version() {\n return '';\n}", "title": "" }, { "docid": "1921c754937965748e1debc08283fa02", "score": "0.47302228", "text": "public function viewed_product() {\n\n\t\t// bail if tracking is disabled\n\t\tif ( $this->do_not_track() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->not_page_reload() ) {\n\n\t\t\t// add Enhanced Ecommerce tracking\n\t\t\t$product_id = get_the_ID();\n\n\t\t\t// JS add product\n\t\t\t$js = $this->get_ec_add_product_js( $product_id );\n\n\t\t\t// JS add action\n\t\t\t$js .= $this->get_funnel_js( 'viewed_product' );\n\n\t\t\t// enqueue JS\n\t\t\t$this->enqueue_js( 'event', $js );\n\n\t\t\t// set event properties - EC data will be sent with the event\n\t\t\t$properties = array(\n\t\t\t\t'eventCategory' => 'Products',\n\t\t\t\t'eventLabel' => esc_js( get_the_title() ),\n\t\t\t\t'nonInteraction' => true,\n\t\t\t);\n\n\t\t\t$this->js_record_event( $this->event_name['viewed_product'], $properties );\n\t\t}\n\t}", "title": "" }, { "docid": "2a3a0393f33d74e10f68fbbf36f56c0f", "score": "0.4728031", "text": "public function date()\n\t{\n\t\treturn 'Never';\n\t}", "title": "" }, { "docid": "50adf63d37e41935e368aa23c7803371", "score": "0.47253788", "text": "function startertheme_remove_version() {\nreturn '';\n}", "title": "" }, { "docid": "00eb722b15ebd0d637ce25f8a92ad599", "score": "0.47212735", "text": "function shop_isle_featured_products( $args ) {\n\n\t\tif ( is_woocommerce_activated() ) {\n\n\t\t\t$args = apply_filters(\n\t\t\t\t'shop_isle_featured_products_args',\n\t\t\t\tarray(\n\t\t\t\t\t'limit' => 4,\n\t\t\t\t\t'columns' => 4,\n\t\t\t\t\t'orderby' => 'date',\n\t\t\t\t\t'order' => 'desc',\n\t\t\t\t\t'title' => __( 'Featured Products', 'shop-isle' ),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\techo '<section class=\"shop-isle-product-section shop-isle-featured-products\">';\n\n\t\t\tdo_action( 'shop_isle_homepage_before_featured_products' );\n\n\t\t\techo '<h2 class=\"section-title\">' . esc_attr( $args['title'] ) . '</h2>';\n\t\t\techo do_shortcode( '[featured_products per_page=\"' . intval( $args['limit'] ) . '\" columns=\"' . intval( $args['columns'] ) . '\" orderby=\"' . esc_attr( $args['orderby'] ) . '\" order=\"' . esc_attr( $args['order'] ) . '\"]' );\n\n\t\t\tdo_action( 'shop_isle_homepage_after_featured_products' );\n\n\t\t\techo '</section>';\n\n\t\t}\n\t}", "title": "" }, { "docid": "bcdc3df385e0ceb32dcbe55d35bcf91b", "score": "0.47202364", "text": "function custom_woocommerce_pagination() {\n if( wc_get_loop_prop( 'total' ) <= 0 ) {\n return false;\n }\n\n $context = array(\n 'pagination' => Timber::get_pagination()\n );\n Timber::render( '/partials/_pagination.twig', $context );\n }", "title": "" }, { "docid": "2574459bc6688c8f9056313b171ca51a", "score": "0.47158438", "text": "function the_date_xml() {}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "cb2be71498e33b4889b92af1f0833fb7", "score": "0.0", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$accion = Accion::find($id);\n\n\t\t$actuador = $accion->actuador()->first();\n\n\t\t$habitacion = $actuador->nodo()->first();\n\n\t\t$dia_sem = array();\n\t\t$dias = DB::table('acciones_dias')->where('accion_id', $accion->id)->get();\n\n\t\tforeach($dias as $dia){\n\t\t\t$dia_sem[$dia->dia_sem] = 'on';\n\t\t}\n\n\t\treturn view('config.accionEdit')->with(array( 'habitacion' => $habitacion,\n\t\t\t\t\t\t\t\t\t\t\t\t 'actuador' => $actuador,\n\t\t\t\t\t\t\t\t\t\t\t\t 'accion' => $accion,\n\t\t\t\t\t\t\t\t\t\t\t\t 'dia_sem' => $dia_sem,\n\t\t\t\t\t\t\t\t\t\t\t\t 'title' => $accion->nombre));\n\t}", "title": "" } ]
[ { "docid": "d7ce48ce019e0bea04d049b9105b5e4d", "score": "0.7734901", "text": "public function edit(Resource $resource)\n {\n return view('dashboard.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "84ff2076d8b6fd70c23777380e8adaff", "score": "0.71830827", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "69c216f7c250a093fe39e8866f35d42b", "score": "0.7131727", "text": "public function editAction()\n\t{\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Check to see if they specified id in the url and its a valid id\n\t\tif($id == null || !intval($id)) {\n\t\t\t// Redirect because to view a project, they have to specify one in the url\n\t\t\t$this->_redirect($this->view->baseUrl('/resources/'));\n\t\t\texit();\n\t\t}\n\n\t\t$resource = Application_Model_Document_Resource::find($id);\n\n\t\t// Define the form\n\t\t$form = new Application_Form_Resource(\n\t\t\t\tarray(\n\t\t\t\t\t\t'action' => $this->view->baseUrl('/resources/edit/id/'.$id),\n\t\t\t\t\t\t'submitLabel' => 'Update'\n\t\t));\n\n\t\t//Check to see if the user has submited the form or just requesting it\n\t\tif ($this->_request->getPost()) { // Form is submited, now we populate proper database object to reflect changes\n\t\t\t// Check if form is valid\n\t\t\tif ($form->isValid($this->_request->getPost())) {\n\t\t\t\t// Assign all the form values to our updateProject to save\n\t\t\t\t$resource->name->first = $form->getValue('first_name');\n\t\t\t\t$resource->name->middle = $form->getValue('middle_name');\n\t\t\t\t$resource->name->last = $form->getValue('last_name');\n\t\t\t\t$resource->phone->capgemini = $form->getValue('phone_number');\n\t\t\t\t$resource->email->capgemini = $form->getValue('email');\n\n\t\t\t\t$resource->address = new Shanty_Mongo_Document();\n\t\t\t\t$resource->address->line1 = $form->getValue('address1');\n\t\t\t\t$resource->address->line2 = $form->getValue('address2');\n\t\t\t\t$resource->address->city = $form->getValue('city');\n\t\t\t\t$resource->address->state = $form->getValue('state');\n\t\t\t\t$resource->address->country = $form->getValue('country');\n\n\t\t\t\t$resource->office_base = Application_Model_Document_OfficeBase::find($form->getValue('office_base'));\n\n\t\t\t\t$resource->resource_type= Application_Model_Document_ResourceType::find($form->getValue('resource_type'));\n\t\t\t\t$resource->title = Application_Model_Document_ResourceTitle::find($form->getValue('title'));\n\t\t\t\t$resource->save();\n\t\t\t\t// Redirect to the resource profile\n\t\t\t\t//$this->_redirect($this->view->baseUrl('/resources/view/id/'.$id));\n\t\t\t\t$this->_redirect('/resources/view/id/'.$id);\n\t\t\t\texit();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$form->populate($formData);\n\t\t\t}\n\t\t}\n\n\t\t$formData = array(\n\t\t\t\t'first_name' => $resource->name->first,\n\t\t\t\t'middle_name' => $resource->name->middle,\n\t\t\t\t'last_name' => $resource->name->last,\n\t\t\t\t'phone_number' => $resource->phone_number,\n\t\t\t\t'email' => $resource->email->capgemini,\n\t\t\t\t'resource_type' => $resource->resource_type->_id,\n\t\t\t\t'title' => $resource->title->_id,\n\t\t\t\t'address1' => $resource->address->line1,\n\t\t\t\t'address2' => $resource->address->line2,\n\t\t\t\t'city' => $resource->address->city,\n\t\t\t\t'state' => $resource->address->state,\n\t\t\t\t'country' => $resource->address->country,\n\t\t\t\t'office_base' => $resource->office_base->_id\n\t\t);\n\t\t$form->populate($formData);\n\t\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "522c839636c7afd00a2fe6a013af3288", "score": "0.7100264", "text": "public function editAction()\r\n {\r\n $id = (int) $this->params()->fromRoute('id', 0);\r\n if (!$id) {\r\n return $this->redirect()->toRoute('resources', array(\r\n 'action' => 'add'\r\n ));\r\n }\r\n $resources = $this->getResourcesTable()->getResources($id);\r\n\r\n $form = new ResourcesForm();\r\n $form->bind($resources);\r\n\r\n $request = $this->getRequest();\r\n if ($request->isPost()) {\r\n $form->setInputFilter($resources->getInputFilter());\r\n $form->setData($request->getPost());\r\n\r\n if ($form->isValid()) {\r\n $confirm = $this->getResourcesTable()->saveResources($form->getData());\r\n\r\n $redirect = false;\r\n if (!empty($confirm['status'])) {\r\n switch ($confirm['status']) {\r\n case '1':\r\n $redirect = true;\r\n $this->flashMessenger()->addMessage(array('success' => $this->message->success));\r\n break;\r\n default:\r\n $this->flashMessenger()->addMessage(array('error' => $this->message->error));\r\n break;\r\n }\r\n }\r\n\r\n if ($redirect) {\r\n // Redirect to list of resourcess\r\n return $this->redirect()->toRoute('resources');\r\n }\r\n }\r\n }\r\n $this->vm->setVariables(array(\r\n 'flashMessages' => $this->flashMessenger()->getMessages(),\r\n 'id' => $id,\r\n 'form' => $form,\r\n ));\r\n\r\n return $this->vm;\r\n }", "title": "" }, { "docid": "da99e35334c7018154ed595f09e0337d", "score": "0.7089427", "text": "public function edit()\n {\n $this->form_data = ['route' => [self::$prefixRoute.'update', $this->company->id], 'method' => 'PUT', 'files' => true];\n\n return $this->getFormView();\n }", "title": "" }, { "docid": "787234d6f7dee1b56f411f3e6e54bcfb", "score": "0.7033331", "text": "public function editForm() {\n\t\t$data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$this->parent->urlPathParts[2]));\n\t\n\t\t$this->getView(\"editform\", $data);\n\t}", "title": "" }, { "docid": "e465503e79b8b4032e36d093e233408b", "score": "0.70309556", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HarmonyVisualizerMainBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('HarmonyVisualizerMainBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a096f3cd2e5784ea3a48675da26784cc", "score": "0.70097554", "text": "public function edit()\n {\n $parameters = func_get_args();\n $id = end($parameters);\n\n $this->getPermissionClass()->canEditOrFail();\n $entry = $this->getEntry($id);\n\n $urlBuilder = $this->getUrlBuilderClass($parameters);\n\n /** @var HorizontalFormBuilder $form */\n $form = app('bootform.horizontal');\n $form->setColumnSizes($this->getColumnSizes());\n $form->bind($entry);\n\n /** @var FormOpen $formStart */\n $formStart = $form->open();\n $formStart->action($urlBuilder->getUrlUpdate($entry->getKey()));\n $formStart->put();\n\n $formFields = $this->getForm($form, $entry);\n\n /** @var FormBuilder $formClose */\n $formClose = $form->close();\n $title = $this->getUrlEditText();\n SEO::setTitle($title);\n\n return view($this->getViewEdit(), compact('title', 'formStart', 'formClose', 'formFields'));\n }", "title": "" }, { "docid": "55e536ea6ad0a0b81445c206780c630d", "score": "0.69938177", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->administration_route->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['administration_route' => $this->administration_route]);\n\t}", "title": "" }, { "docid": "b663c6d8125fb6314c3a0e4886cb4291", "score": "0.6975116", "text": "public function edit($id)\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->get($id);\n }\n\n return view('admin.' . $this->resource . '.edit')\n ->with('resource', $this->resource)\n ->with('id', $id);\n }", "title": "" }, { "docid": "a0cf5deb0843bc2a9372021f983bd7df", "score": "0.69728345", "text": "public function edit(Form $form)\n\t{\n\t\t$form->load('customer');\n\t\treturn view('forms.edit', compact('form'));\n\t}", "title": "" }, { "docid": "73dff086054dea68e61138da96c78b9d", "score": "0.69669014", "text": "public function edit(Form $form)\n {\n //\n return view('edit', compact('form'));\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "d8d18a53a00c5863abebafd6f478f9af", "score": "0.6936903", "text": "public function edit($id)\n {\n // $data = array_merge([\n // // 'tabs' => TabManager::get($this->getModel()->getTable()),\n // $this->getResourceName() => $this->getEntity($id),\n // ], $this->getFormData('edit', $id));\n\n $data = $this->getFormData('edit', $id);\n return view(\"{$this->viewPath}.edit\", $data);\n }", "title": "" }, { "docid": "af7e0ad74f788224046bea8997ba82fd", "score": "0.691101", "text": "function edit(Form $form);", "title": "" }, { "docid": "ddb6541ea87bc5a805d84b200c4d3330", "score": "0.6900641", "text": "private function editForm()\n {\n $m = $this->getViewModel();\n\n $blog = $m->blog;\n\n $m->isApprover = true; // isApprover()\n\n $stylelist = BlogView::getStyleList();\n\n $id = $blog->id;\n \n \n if ($m->revid === 0) {\n $m->revid = intval($blog->revision);\n }\n\n $m->revision = BlogRevision::findFirst('blog_id='.$id.' and revision='.$m->revid);\n \n // submit choices\n $m->rev_list = [\n 'Save' => 'Save',\n 'Revision' => 'Save as new revision',\n ];\n\n $m->title = '#' . $id;\n $m->stylelist = $stylelist;\n $m->catset = BlogView::getCategorySet($id);\n $m->events = BlogView::getEvents($id);\n $m->metatags = BlogView::getMetaTags($id);\n $m->content = $m->url = $this->url;\n\n return $this->render('blog', 'edit');\n }", "title": "" }, { "docid": "d71dc82427564ebcbc73816305ddda53", "score": "0.68749857", "text": "public function edit()\n {\n preg_match('/form\\/(.+?)\\//', \\request()->getPathInfo(), $result);\n $form = Form::find($result[1]);\n $questions = Question::all()->where(\"form_id\", $form->id);\n return view('forms.edit', ['form'=>$form, 'questions'=>$questions]);\n }", "title": "" }, { "docid": "96961bd907d99d27e65861299053bb83", "score": "0.6873502", "text": "public function edit($id)\n {\n $id = Crypt::decrypt($id);\n $form = Preenrolment::find($id);\n\n return view('form.edit', compact('form'));\n }", "title": "" }, { "docid": "111fd948639561f549e94ea39624e591", "score": "0.686892", "text": "function edit()\n\t{\n\t\t$data['title'] = 'Offer.com || Restaurant Edit Form';\n\t\t$data['user_id']\t= $this->tank_auth->get_user_id();\n\t\t$data['username']\t= $this->tank_auth->get_username();\n\t\t\n\t\t// view page data\n\t\t$data['extrastyle'] = 'inc/_vuestyle';\n\t\t$data['extrascript'] = 'inc/_vuescript';\n\t\t$data['vuecomponent'] = 'components/restaurant/edit';\n\n\t\t$data['content'] = 'admin/restaurant/edit';\n\t\t$this->load->view('layouts/master', $data);\n\t}", "title": "" }, { "docid": "2cba2dba9adbc964e4cb8e1c1f507bf7", "score": "0.6857282", "text": "public function edit()\n\t{\n $this->auth->restrict('Capacity_Building.Content.Create');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif(empty($id)) {\n // New record\n\t\t\tTemplate::set('formView', $this->showEditor());\n\t\t} else {\n // Existing record\n Template::set('formView', $this->showEditor($id));\n }\n\n\t\tTemplate::set('toolbar_title', lang('capacity_building_edit') .' Capacity Building');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "325f44881b3255ac6dd832a42a816449", "score": "0.6856997", "text": "public function edit($id)\n\t{\n\t\t//Para ver el formulario\n\t}", "title": "" }, { "docid": "a70140d47a90876608810916289f5eaa", "score": "0.68449825", "text": "public function edit(){\n $employee = Employee::find($_GET['id']);\n view('employees/edit', compact('employee'));\n }", "title": "" }, { "docid": "2ac287f33a0b22cd658add9d932bfb54", "score": "0.68442357", "text": "public function edit(Product $product)\n {\n // not gonna use it since it need to show edit form\n }", "title": "" }, { "docid": "0debc65108a59def3fde6af05e845c8c", "score": "0.6840725", "text": "public function edit($id)\n {\n // get the employee\n $employees = Employee::find($id);\n $titles = Title::pluck('name', 'id');\n\n\n // show the edit form and pass the resource\n return view('employees.edit', compact('employees','titles'))\n ->with('returnUrl', $this->getReturnUrl());\n }", "title": "" }, { "docid": "62e42345b14e64136dff3140e21a14fa", "score": "0.6817548", "text": "public function edit($id)\n {\n $categories = Category::all('id', 'name');\n return view('resource.form',\n [\n 'resource' => Resources::where('id', $id)->first(),\n 'categories' => $categories\n ]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "541d1f2618e436d250647dd398cc2808", "score": "0.67858773", "text": "public function edit($id)\n {\n // return view('layouts.backend.rm.edit');\n }", "title": "" }, { "docid": "a6c265fe7d46510a444ee3ca44d074cb", "score": "0.6784809", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n $formTitle = 'Edit employee';\n return View('employees.form', compact('employee', 'formTitle'));\n }", "title": "" }, { "docid": "0eb0be7ab668a0fb1d38349f0f9700b4", "score": "0.67784214", "text": "public function edit($id) {\r\n\t\t$data['professor'] = Professor::findOrFail ( $id );\r\n\t\t$data['page_title'] = 'Editar professor';\r\n\t\treturn view ( 'paginas.cadastro.professor.create-edit' )->with($data); \r\n\t}", "title": "" }, { "docid": "02d61c145821a4db89ebb2edb8182595", "score": "0.67633945", "text": "public function edit($resource, $id)\n {\n $model = ConfigHelper::getModel($resource);\n $isColor = $model->isColor || false;\n $lists = $model->all();\n $data = $model->find($id);\n return view('config::config.index', compact('resource', 'lists', 'data', 'isColor'));\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "14e65bd23934edb208798714d1293877", "score": "0.6752648", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = Ticket::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "38affe6ba77ce934dc4daf49e3046892", "score": "0.67456263", "text": "public function edit($entityId)\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n $model = $this->getModel($resource);\n $entity = $model::find($entityId);\n $hasWysiwyg = false;\n\n foreach($resource->fields as $field)\n {\n if($field['type'] == 'wysiwyg') $hasWysiwyg = true;\n\n if($field->type == 'relational')\n {\n $model = $field->data('model');\n $options[$field->slug] = $model::all()->lists($field->data('title'), $field->data('key'));\n }\n }\n\n return view('laramanager::resource.edit', compact('resource', 'hasWysiwyg', 'entity', 'options'));\n }", "title": "" }, { "docid": "5ad58678a9066ea479d1b7c0fa455bba", "score": "0.673845", "text": "public function edit()\n {\n return view('parking::edit');\n }", "title": "" }, { "docid": "98a958a2e5d3e8b986777a8e2b310e63", "score": "0.67342156", "text": "public function editAction()\n {\n $id = $this->getRequest()->getParam('id',null);\n $this->view->formResponse = '';\n $this->view->assign('title', 'Edit Address');\n $mapper = new Application_Model_AddressbookMapper();\n $form = $mapper->getEditEntryForm($this->getRequest()->getPost(),$id);\n // Did the form get submitted?\n if ($form === true) {\n $this->view->formResponse = 'Address Updated!';\n $this->_forward('index');\n }\n $this->view->form = $form;\n }", "title": "" }, { "docid": "271f2dc8be841343df336c673a3822d9", "score": "0.6727125", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SigFichasocialBundle:Persona')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se pudo encontrar la entidad Persona.');\n }\n\n $editForm = $this->createEditForm($entity);\n// $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SigFichasocialBundle:Persona:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n// 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.67227334", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "3db1f9e1d14b74d354375731730e7d9f", "score": "0.6711498", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\t \n\t \n\t\treturn view('admin.employee.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "200c93ae2e89a33f61e6a8e125e532c6", "score": "0.67104954", "text": "public function edit()\n {\n return view('userfi::edit');\n }", "title": "" }, { "docid": "1985c1d26ba692cc0ae1082412ed00f6", "score": "0.6703955", "text": "public function edit($id)\n {\n $this->isEditing = true;\n $this->user = User::find($id);\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "25a6a14192997386614057ef4361e13a", "score": "0.6697028", "text": "public function edit(Question $question)\n {\n \tif ($this->authorize('update', $question)) {\n\t\t return view('questions.edit', compact('question'));\n\t }\n }", "title": "" }, { "docid": "7f1157c2e01c887c017258c8594e0eb2", "score": "0.66793597", "text": "public function edit ($id) {\n $data = Opf::findOrFail($id);\n\n return view('administrator.opf.edit', compact('data'));\n }", "title": "" }, { "docid": "64638440e568f9ca6de0639b2af35fe2", "score": "0.6676964", "text": "public function edit($id)\n\t{\n\t\t$settingInformation = SettingInformation::find($id);\n \n return view('settingInformation.form')->with('settingInformation', $settingInformation);\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "348ffa202eb8b306feb83bea05fd6cb2", "score": "0.66630423", "text": "public function edit($id)\n\t{\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, array('route' => $this->resource, 'options' => $this->options));\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, array('route' => $this->resource, 'options' => $this->options))->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "ac13bda5ea80a720996d3ec33ec2cd6e", "score": "0.66462505", "text": "public function edit($id)\n {\n $professor = Professor::find($id);\n return view('professor.formulario', compact('professor'));\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "b602a98dc36a4b6f42a161024a5f0dfa", "score": "0.66383743", "text": "public function edit()\n {\n return view('account::edit');\n }", "title": "" }, { "docid": "d0628008c21c857e6203f02c16d81776", "score": "0.6632226", "text": "public function edit(Request $request, $id)\n {\n $form = Form::find($id);\n \n return view('Admin.Form.edit',compact('form'));\n }", "title": "" }, { "docid": "ef5915c02eeea16e51e99a01379267fe", "score": "0.6629325", "text": "public function editAction()\n\t{\n\t\t$param = $this->data->getParams();\n\t\t$param = $this->valid->numCheck($param['id']);\n\t\t$this->event->setData($param);\n\t\t$this->event->userRole($this->userRole);\n\t\t$arrayToDetails = $this->event->detailsEvent();\n\t\t$this->view->addToReplace($arrayToDetails);\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->setTemplateFile('details')->templateRender();\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.66259205", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "d8a01a21dfccea9d724a478283a065e0", "score": "0.6622511", "text": "public function editForm(){\n\n return $this->newForm();\n }", "title": "" }, { "docid": "93d69beeb626332ef3ec9ff66c8a0e6f", "score": "0.6616668", "text": "public function edit()\n {\n return view('project/edit');\n }", "title": "" }, { "docid": "70adb5a3151ff0ad7f56b3e02f53ecfb", "score": "0.6613304", "text": "public function edit($id)\n {\n return view('module::edit');\n }", "title": "" }, { "docid": "99e23749f00156a5b49244d4edd09993", "score": "0.66091233", "text": "public function edit(Person $person)\n {\n return $this->form_ele('Edit', $person);\n }", "title": "" }, { "docid": "6feec614262027cb92d91e0b34bc1b6e", "score": "0.6608389", "text": "public function edit($id)\n {\n abort_unless($this->property('editable'), 404);\n $model = $this->property('model');\n $item = $model::where('id', $id);\n // customize query by query scope\n $this->queryScope($item);\n $item = $item->firstOrFail();\n // authorization\n $this->authorize('update'.static::property('permissionsKey'), $item);\n $this->initCrud('edit', $item);\n // convert item to response object.\n $item = $this->itemResponse($item);\n\n return view(\n 'sanjab::crud.form',\n [\n 'widgets' => $this->widgets,\n 'properties' => $this->properties(),\n 'item' => $item,\n ]\n );\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "7bbd86e4602ee9db03f7cc35a32da3d8", "score": "0.6600377", "text": "public function edit()\n {\n $property = Property::find(1);\n\n return view('property.edit')\n ->with('property', $property);\n }", "title": "" }, { "docid": "da4ddf957e485a3b006cdf1e4bcbe98c", "score": "0.65984637", "text": "public function edit($id)\n { \n $item = $this->model->findOrFail($id);\n $products = $this->product::all();\n $companies = $this->company::all();\n return view($this->path_view.'.form',compact('item','products','companies'));\n }", "title": "" }, { "docid": "a9d3eb00cc0697100005ac0145dc0796", "score": "0.65982985", "text": "public function edit($id)\n {\n\n \t$decode = Hashids::decode($id)[0];\n $role = Role::find($decode);\n $permission = Permission::all();\n $formAction = action('RoleController@update', $id);\n return view(\"roles/form\", compact('role', 'formAction','permission'));\n\n }", "title": "" }, { "docid": "ed9a6010eb59e900fbfaa0474bf6d261", "score": "0.6596132", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('BackendBundle:Requerimiento')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No existe el requerimiento solicitado.');\n }\n\n $editForm = $this->createForm(new RequerimientoType(), $entity);\n\n return $this->render('BackendBundle:Requerimiento:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "b7036cf9285e9d8affd3f7710b3215e1", "score": "0.65944123", "text": "public function edit($id)\n {\n return view($this->entity.'.frm', [\n 'id' => $id, # id registro\n 'entity' => $this->entity, # Entidade\n 'title' => 'Alterar perfil', # título página\n 'method' => 'put', # método frm principal\n 'route_list' => route('role.datajson',[$id]), # endereço requisição ajax principal\n ]);\n }", "title": "" }, { "docid": "83316aa545e5b62d61cc26508009018d", "score": "0.65920705", "text": "public function edit($id)\n {\n $job = $this->job_model->findOrFail($id);\n $companies = $this->company_model->all();\n $data = [\n 'title' => \"Job Form\",\n 'job' => $job,\n 'companies' => $companies,\n 'method' => \"PUT\",\n ];\n return view('job.job_form', $data);\n }", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "b2eaacc677a317a7edc60ecfa33f9345", "score": "0.6585427", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppUserBundle:CarteEdinar')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CarteEdinar entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppUserBundle:CarteEdinar:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f191333894e0ca371f3ae777ad938dd1", "score": "0.65830725", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_atleta\n\t\t$fbf_atleta = FbfAtleta::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_atleta\n\t\t$this->layout->content = View::make('fbf_atleta.edit')\n->with('fbf_atleta', $fbf_atleta);\n\t}", "title": "" }, { "docid": "39bf69fa126c43f7e7a9b30980f6a80f", "score": "0.6581154", "text": "public function editAction()\n {\n // Get incident id from url.\n \t$id = $this->_request->getParam('id');\n \t\n\t\tif ($this->getRequest()->isPost()) {\n\t $form = $this->getForm();\n\t \n \t// If validation failed, redisplay form. Also the isValid() method is needed to repopulate $form with posted values.\n\t if (!$form->isValid($_POST)) {\n\t $this->view->form = $form;\n\t return $this->render('edit');\n\t }\n\t \n\t // Get the model.\n\t $mapper = new Application_Model_UserMapper();\n\t $model = $mapper->find($id);\n\t \n\t // Put values from form in the model.\n\t $values = $form->getValues();\n\t $model->setValuesFromArray($values);\n\t \t\n\t // Save the model.\n\t $mapper->save($model);\n\t \n\t // Flash and redirect\n\t $this->_helper->flashMessenger()->addMessage('Details Saved');\n $this->_helper->redirector->gotoUrlAndExit('user/view/id/' . $id);\n\t \n\t\t}\n\t\t\n\t\t// Fetch data for form\n\t\t$mapper = new Application_Model_UserMapper();\n\t\t$model = $mapper->find($id);\n\t\t$model_array = Application_Model_UserMapper::createArrayFromModel($model);\n\t\t\n\t\t// Create, populate and remove password from, form\n\t\t$this->view->form = $this->getForm();\n\t\tunset($model_array['password']);\n\t\t$this->view->form->populate($model_array);\n\t\t\n\t\t// Signal to javascript component about which map to display\n $this->view->jsInitParameters = \"'edit'\";\n }", "title": "" }, { "docid": "c107060b4dbba94b41a5c4077a7c279f", "score": "0.6580328", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/venues/index');\n\n \t$venue_id = $_POST['venue_id'];\n\n\t\t# Transfer POST data to Venue object\n\t\t$venue = new Venue();\n\t\t$venue->findInDb ($venue_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_venues_edit');\n\t\t$this->template->title = \"Edit Venue\";\n\t\t$this->template->client_files_body = \"<script src='/js/hide-category-navigation.js' type='text/javascript'></script>\";\n\n\t\t$this->template->content->venue = $venue;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "7c4a03ced51aa8433c83f3f04c571b16", "score": "0.6579726", "text": "public function editAction() {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "777cf215463e622ffb776eb0f22dcc71", "score": "0.6578481", "text": "public function actionEdit()\n {\n if(!in_array('edit',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n if (isset($_POST['ajax']))\n $this->validateAjax($this->getModel(),strtolower($this->modelName).'-form');\n\n if (isset($_POST[$this->modelName]))\n {\n $model = $this->getModel();\n $model->attributes = $_POST[$this->modelName];\n if ($model->save())\n {\n $key = $this->modelName.($model->isNewRecord ? '-created' : '-updated');\n Yii::app()->user->setFlash($key,true);\n $this->redirect($this->returnUrl);\n }\n }\n $this->render($this->formView);\n }", "title": "" }, { "docid": "daf481e79a69ad0bc7a9ba48b4d825bc", "score": "0.6572825", "text": "public function edit($id)\n {\n $paraferme = Paraferme::find($id);\n\n $elements = $this->editForm(model: $paraferme, json: 'formParaferme.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n 'id' => $id,\n 'routeAnnule' => route('paraferme.index'),\n ]);\n\n }", "title": "" }, { "docid": "6a9e1e18ba5587525f99a19b50b90a0e", "score": "0.65684664", "text": "public function edit($id)\n\t{\n\n\t\t$form = DB::collection('form')->where('data.objectId',$id);\n\t\t$form = $form->pluck('data');\n\n\t\treturn view('forms.edit',compact('form'));\n\n\t}", "title": "" }, { "docid": "bd3e6096136eae4b4640e64c781e5215", "score": "0.65683043", "text": "public function edit($id)\n {\n return view('projectmanagement::edit');\n }", "title": "" }, { "docid": "7b12a5aa4591ae1d2710a1496c517b58", "score": "0.6567222", "text": "public function edit($id)\n {\n $offre = \\App\\Offre::find($id);\n return view('edit-professor',compact('offre','id'));\n }", "title": "" }, { "docid": "c7e85eff7c1947945cf5348933eb83fd", "score": "0.6566555", "text": "public function edit($id)\n\t{\n $formateur = Formateur::find($id);\n\n return View::make('admin/formateurs/edit')\n ->with('formateur', $formateur);\n\t}", "title": "" }, { "docid": "4c1baaf4b5d21ff53cd15c1fdbd7a93f", "score": "0.6560379", "text": "public function editAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$viewId = $this->_request->getParam('viewid'); \n\t\t$this->view->objView = $model->getView($viewId);\n\t }", "title": "" }, { "docid": "ea156ffc25feb0e2e685c6a8f7557c15", "score": "0.65479046", "text": "public function edit($id)\n {\n $model = AdminSystemPermission::with([\"permissionGroup\"])->find($id);\n\n if($model)\n {\n $record = $model;\n $formMode = \"edit\";\n $formSubmitUrl = \"/\".request()->path();\n\n return view('academic::admin_system_permission.create', compact('formMode', 'formSubmitUrl', 'record'));\n }\n else\n {\n abort(404, \"Requested record does not exist.\");\n }\n }", "title": "" }, { "docid": "829ba9227d293e46ba684b3f0cd579db", "score": "0.65453607", "text": "public function edit($id)\n\t\t\t{\n\t\t\t\tif(Auth::User()->hasSysRole('Admin') || Auth::User()->hasSysRole('Resource Provider'))\n\t\t\t\t{\n\t\t\t\t\t$venue = Venue::find($id);\n\t\t\t\t\t// show the edit form and pass the venue\n\t\t\t\t\treturn View::make('venue.edit')\n\t\t\t\t\t->with('venue', $venue);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::to('/dashboard')->with('message', 'You do not have access to this page!');\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "2c16bdeb3085fda5a688682fae7140dc", "score": "0.6544247", "text": "public function edit($id)\n\t{\n\t\treturn $this->show($id);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "1945103cf79b00401e4a1d1b2f762101", "score": "0.65411687", "text": "public function editAction( $id ) {\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entity = $em->getRepository( 'PersonasBundle:Persona' )->find( $id );\n\n\t\tif ( ! $entity ) {\n\t\t\tthrow $this->createNotFoundException( 'Unable to find Persona entity.' );\n\t\t}\n\n\t\t$editForm = $this->createEditForm( $entity );\n\n\n\t\treturn $this->render( 'PersonasBundle:Persona:edit.html.twig',\n\t\t\tarray(\n\t\t\t\t'entity' => $entity,\n\t\t\t\t'form' => $editForm->createView(),\n\t\t\t) );\n\t}", "title": "" }, { "docid": "0bd14cbe814fbc55e43aec513633b5bc", "score": "0.65401965", "text": "public function edit($id)\n\t{\n\t\t$agente = Agente::find($id);\n if (is_null($id))\n {\n App::abort(404);\n }\n\n return View::make('agente.form')\n \t->with('agente', $agente);\n\t}", "title": "" }, { "docid": "cd0e818bdd7ade4dd0c44de0dd0c1d8e", "score": "0.65400016", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('user', array('action' => 'new')));\n\t\t} // if\n\n\t\tif ($id != $this->auth->get_user()->id && ! in_array('admin', $this->user_roles))\n\t\t{\n\t\t\tthrow new HTTP_Exception_403('You are not allowed to view the page \":page\"', array(':page' => __('User')));\n\t\t} // if\n\n\t\t$model = ORM::factory('user')->where('id', '=', $id)->find();\n\t\t$is_admin = in_array('admin', $this->user_roles);\n\n\t\t$this->content = View::factory('user/form', array(\n\t\t\t'title' => __('Update user \":username\"', array(':username' => $model->username)),\n\t\t\t'user_model' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'is_admin' => $is_admin,\n\t\t\t'copy_n_paste' => $this->config->get('password_prevent_copynpaste', true),\n\t\t\t'ajax_url' => Route::url('user', array('action' => 'save', 'id' => $id))\n\t\t));\n\n\t\tif ($is_admin)\n\t\t{\n\t\t\t$this->content->roles = ORM::factory('role')->find_all();\n\t\t} // if\n\t}", "title": "" }, { "docid": "2161eaa538e430e31556a81d74eca198", "score": "0.65394217", "text": "public function edit($id)\n {\n $Option = Option::find($id);\n return view('backend.options.form', [\n 'item' => $Option,\n\n 'nameAction' => $Option->name,\n 'idEntity' => $Option->id,\n 'controllerPathList' => '/home/options/',\n 'controllerAction' => 'edit',\n 'controllerEntity' => new Option(),\n ]);\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "4ee65564ca132744616bf10c0755fe98", "score": "0.65375626", "text": "public function edit($id)\n {\n return view('employees::edit');\n }", "title": "" }, { "docid": "53fd61f8c77c49fa57d89bd9839407c2", "score": "0.65345657", "text": "public function edit($id)\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "ecd32fc705283cc0e1ddec209c43aec8", "score": "0.6532995", "text": "public function displayResourceForm($resource)\n {\n $childServices = new Setting('child_services');\n\n ob_start();\n include(VIEW_PATH . '/child-resources-edit.phtml');\n $resource_content = ob_get_contents();\n ob_end_clean();\n\n print $resource_content;\n }", "title": "" }, { "docid": "07ed8b37e3defd0062904a7718865626", "score": "0.65308374", "text": "public function edit(Employee $employee)\n {\n //\n return view('employee.form', [\n 'action' => '/employees/' . $employee->id,\n 'method' => 'PUT',\n 'firstName' => $employee->firstName,\n 'lastName' => $employee->lastName,\n 'lastName' => $employee->lastName,\n 'email' => $employee->email,\n 'phone' => $employee->phone,\n 'companyName' => $employee->company->name,\n ]);\n }", "title": "" }, { "docid": "0ce9853ad8530923530976f2391d2510", "score": "0.65294826", "text": "public function edit($id)\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "e48aa4e6edf769dcff5f1f1cdaddcf9f", "score": "0.65233994", "text": "public function showEdit($id)\n {\n //\n }", "title": "" }, { "docid": "41a790dfedf55c0319d312ab7845572c", "score": "0.6520173", "text": "public function edit($id)\n\t{\n\t\t$entity = CustomerHire::find($id);\n\t\treturn view('partner.customer-hire.edit', ['entity' => $entity]);\n\t}", "title": "" }, { "docid": "8dbb90d7fff91cd25d058baa2b103486", "score": "0.6517904", "text": "public function edit($id)\n {\n $soforModel = SoforModel::with('company')->findOrFail($id);\n return view('Sofor.edit', compact('soforModel'));\n }", "title": "" }, { "docid": "be7e6c271a5b5cd1f1e4af5e5ba8ba3d", "score": "0.65162235", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\n\t\treturn View::make('admin.employees.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "9ba959cf41c08e6925661954de22eacc", "score": "0.65150225", "text": "public function edit(Entity $entity)\n {\n return view('entities.edit', compact('entity'));\n }", "title": "" } ]
f122f3f1d676d2b3e5b1942fa1f00663
returns scripts used by this module
[ { "docid": "574b3d4a013040593309d604eb9f74e4", "score": "0.82016724", "text": "function getScripts () {\r\n\r\n }", "title": "" } ]
[ { "docid": "638a48df111ce695b82cf4b9f068ec96", "score": "0.82958966", "text": "public function getScripts();", "title": "" }, { "docid": "29f820815255cf5eb3d909245d37450d", "score": "0.7913342", "text": "protected static function getScripts() {\n return [];\n }", "title": "" }, { "docid": "696659d1fe404e71c122dbc83ef4096b", "score": "0.77582544", "text": "public static function getScripts()\r\n\t\t{\r\n\t\t\t$sql = new DBQuery();\r\n\t\t\t$sql->select('*');\r\n\t\t\t$sql->from(self::$moduleDb);\r\n\t\t\t$scripts = Db::getInstance()->executeS($sql);\r\n\t\t\treturn $scripts;\r\n\t\t}", "title": "" }, { "docid": "c7643f9c7e28b7ffa345bcdc02bd4b1b", "score": "0.7708058", "text": "public function get_scripts() {\n $admin = [\n \"{$this->plugin_name}-admin-script\" => [\n 'src' => $this->assets_url . '/js/admin-script.js',\n 'dependency' => [ 'jquery' ],\n 'version' => filemtime( $this->assets_path . '/js/admin-script.js' ),\n ],\n ];\n $frontend = [\n \"{$this->plugin_name}-script\" => [\n 'src' => $this->assets_url . '/js/script.js',\n 'dependency' => [ 'jquery' ],\n 'version' => filemtime( $this->assets_path . '/js/script.js' ),\n ],\n ];\n\n return is_admin() ? $admin : $frontend;\n }", "title": "" }, { "docid": "460e388991fb26eebdec290e9676ea0b", "score": "0.75855094", "text": "public function getScripts()\n {\n return $this->m_scriptfiles;\n }", "title": "" }, { "docid": "90a9b995b33ec927ff29ee3d22ea4068", "score": "0.7568944", "text": "public function getScripts()\n {\n return $this->scripts;\n }", "title": "" }, { "docid": "1fe4c08803d3b6ff455a1da9407aedee", "score": "0.7554368", "text": "public function get_scripts() {\n\t\treturn array(\n\t\t\t'admin-menu-js' => array(\n\t\t\t\t'file' => TMPLUGIN_ASSETS . '/admin/js/admin-menu.js',\n\t\t\t\t'version' => filemtime( TMPLUGIN_PATH . '/assets/admin/js/admin-menu.js' ),\n\t\t\t\t'deps' => array( 'jquery' )\n\t\t\t),\n\n\t\t\t'enquiry-js' => array(\n\t\t\t\t'file' => TMPLUGIN_ASSETS . '/public/js/enquiry.js',\n\t\t\t\t'version' => filemtime( TMPLUGIN_PATH . '/assets/public/js/enquiry.js' ),\n\t\t\t\t'deps' => array( 'jquery' )\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "88040c4748a9c5a6701ec4c52a71a0c4", "score": "0.7515577", "text": "protected function getScripts() { return \"\"; }", "title": "" }, { "docid": "41b0d1be5119b08e20144f1eeba1c058", "score": "0.74808323", "text": "public function getScript();", "title": "" }, { "docid": "6d5084c574fd6a22e88533548844c649", "score": "0.74286646", "text": "protected function getScripts()\n {\n return implode( \"\\n\", array(\n '<script type=\"text/javascript\" src=\"lib/plugins/image.js\"></script>',\n '<script type=\"text/javascript\" src=\"lib/plugins/ajaxfileupload.min.js\"></script>',\n ) );\n }", "title": "" }, { "docid": "384b12a8da83a3de4dfbc5c1ec04cf73", "score": "0.73831916", "text": "protected function getScripts() { return ''; }", "title": "" }, { "docid": "b69704308934efd2ac01df2d77d572c9", "score": "0.72614026", "text": "public function scripts() {\n\n\t\t$scripts = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'pods_gutenberg',\n\t\t\t\t'src' => PODS_GUTENBERG_URL . 'js/blocks/core.min.js',\n\t\t\t\t'deps' => array( 'wp-blocks', 'wp-element' ),\n\t\t\t\t'version' => filemtime( PODS_GUTENBERG_DIR . 'js/blocks/core.min.js' ),\n\t\t\t\t'callback' => array( $this, 'localize_script' ),\n\t\t\t),\n\t\t);\n\n\t\tforeach ( self::$_blocks as $block ) {\n\t\t\t$block_scripts = $block->scripts();\n\n\t\t\tforeach ( $block_scripts as $script ) {\n\t\t\t\t$scripts[] = $script;\n\t\t\t}\n\t\t}\n\n\t\treturn $scripts;\n\n\t}", "title": "" }, { "docid": "c403f0b22635a4ec3296426fe114dd1f", "score": "0.7239451", "text": "public function getScripts()\n {\n return $this->getConfigurationKey('scripts', true);\n }", "title": "" }, { "docid": "ae47ad02edaa7098e25b2cc73ee3cd4c", "score": "0.7221093", "text": "private function loadScripts()\r\n\t{\r\n\t//load jQuery by default unless minimal javascript is used in the page\r\n\t//\r\n\t\t$this->scripts = NULL;\r\n\t\t$this->scripts .= $this->loader->loadScripts('jquery.js');\r\n\t\t$this->scripts .= $this->loader->loadScripts('front.js');\r\n\t\treturn $this->scripts;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "22385b8bfaea32341086f971c41fb060", "score": "0.7209375", "text": "private function getStandardScripts()\r\n {\r\n //@TODO: factor in scrip directory or at least webroot\r\n return '<script src=\"/source/jquery.js\" type=\"text/javascript\"></script>\r\n <script src=\"/source/json2.js\" type=\"text/javascript\"></script>\r\n <script src=\"/source/machine.js\" type=\"text/javascript\"></script>\r\n <script src=\"/source/php.min.js\" type=\"text/javascript\"></script>';\r\n\r\n }", "title": "" }, { "docid": "f63d4254032d84312bf66daba11b86fc", "score": "0.7163295", "text": "public function getFrontendScripts() {\n }", "title": "" }, { "docid": "65ed6b20bb491ef2233a19b641400a0a", "score": "0.716326", "text": "abstract public function getScript();", "title": "" }, { "docid": "674ec2332e443feb09653de295769541", "score": "0.7141942", "text": "public function scripts() {\n return array('/js/croppictures.js', '/js/jquery.carouFredSel-6.1.0-packed.js');\n }", "title": "" }, { "docid": "2108ada44ad78621f73c57e0909aa069", "score": "0.71254265", "text": "public function scripts() {\n\t\t$scripts = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'my_script_js',\n\t\t\t\t'src' => $this->get_base_url() . '/js/my_script.js',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'deps' => array( 'jquery' ),\n\t\t\t\t'strings' => array(\n\t\t\t\t\t'first' => esc_html__( 'First Choice', 'vinaudit' ),\n\t\t\t\t\t'second' => esc_html__( 'Second Choice', 'vinaudit' ),\n\t\t\t\t\t'third' => esc_html__( 'Third Choice', 'vinaudit' )\n\t\t\t\t),\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'admin_page' => array( 'form_settings' ),\n\t\t\t\t\t\t'tab' => 'vinaudit'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\n\t\t);\n\n\t\treturn array_merge( parent::scripts(), $scripts );\n\t}", "title": "" }, { "docid": "227b1468ae3011ba9bc87c84f941a758", "score": "0.7084811", "text": "public function getScripts()\n {\n return array_merge($this->scripts, $this->lastScripts);\n }", "title": "" }, { "docid": "b0ebdd144663f55ee8188723b45161ef", "score": "0.70611167", "text": "public function getScripts()\n\t{\n\t\treturn $this->simplify($this->findInfo('Scripts', 'Languages'));\n\t}", "title": "" }, { "docid": "c20c600d66ad6c3acfa2d131da3e806e", "score": "0.70301205", "text": "public function get_script_depends()\n {\n return [\n 'jquery-swiper',\n 'sa_el_scripts'\n ];\n }", "title": "" }, { "docid": "12f12c2112c50c7efba85e1b689f0872", "score": "0.6929413", "text": "public function get_script_depends() {\n\t\treturn [ \n\t\t\t'widgetkit-main',\n\t\t ];\n\t}", "title": "" }, { "docid": "912597aaea0aeb74e73cff6ba0c94a98", "score": "0.6928563", "text": "private function getJs()\n {\n return [\n 'silab-vendor/js/silab.app.js' . (($this->ScriptVersion != 0) ? (\"?v=\" .$this->ScriptVersion) : \"\"),\n 'silab-vendor/js/silab-helper-registerCss.js'\n ];\n }", "title": "" }, { "docid": "de001b92afc0892d0f1066cd79294d2d", "score": "0.6914355", "text": "public function set_scripts() {\n\n\t\treturn array(\n\t\t\t'shush_toolkit_admin_page' => array(\n\t\t\t\t'src' => $this->scripts_dir . 'admin-pages/smush-toolkit/main.js',\n\t\t\t\t'deps' => array( 'react', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill' ),\n\t\t\t\t'ver' => SMUSHTOOLKIT_SCIPTS_VERSION,\n\t\t\t\t'in_footer' => true,\n\t\t\t\t'localize' => array(\n\t\t\t\t\t'smush_toolkit' => array(\n\t\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t\t'rest_url' => esc_url_raw( rest_url() ),\n\t\t\t\t\t\t\t'rest_namespace' => '/smush_toolkit/v1/fetch_images',\n\t\t\t\t\t\t\t'unique_id' => $this->unique_id,\n\t\t\t\t\t\t\t'nonce' => wp_create_nonce( 'wp_rest' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'labels' => array(\n\t\t\t\t\t\t\t'page_title' => $this->page_title,\n\t\t\t\t\t\t\t'fetch_images' => __( 'Fetch Images', 'shush-toolkit' ),\n\t\t\t\t\t\t\t'error_messages' => array(\n\t\t\t\t\t\t\t\t'general' => __( 'Something went wrong here.', 'shush-toolkit' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "39400c5135bd098c8ff0e076c392f167", "score": "0.688641", "text": "public function scripts()\n {\n return $this->view->make('datepicker::script');\n }", "title": "" }, { "docid": "3031286228adf4c25232c2a37c6064e1", "score": "0.68461066", "text": "protected abstract function getScriptIncludes();", "title": "" }, { "docid": "3d03a823aba2c3549599cc6e9d5b1b63", "score": "0.6793625", "text": "public function scripts()\n {\n return [\n [\n 'handle' => 'app',\n 'src' => \\App\\asset_path('scripts/app.js'),\n 'dependencies' => [],\n 'version' => false,\n 'inline' => [\n 'js_key' => 'appData',\n 'data' => [\n 'endpoints' => [\n 'page' => esc_url(rest_url('wp/v2/pages')),\n 'data' => esc_url(rest_url('5euros/v1/data')),\n 'search' => esc_url(rest_url('5euros/v1/search')),\n ],\n 'worker' => \\App\\asset_path('scripts/worker.js'),\n 'serviceWorker' => \\App\\asset_path('scripts/serviceworker.js'),\n 'worklets' => [\n 'bitCrusher' => \\App\\asset_path('scripts/bit-crusher-worklet.js'),\n ],\n 'nonce' => wp_create_nonce('wp_rest')\n ],\n 'position' => 'before'\n ],\n 'preload' => true,\n 'defer' => true\n ]\n ];\n }", "title": "" }, { "docid": "eeff8b22cedc5d7aa84c4fcc2937aac7", "score": "0.6770843", "text": "public function get_script_depends() {\n\t\treturn [ \n\t\t\t'owl-carousel',\n\t\t\t'widgetkit-main',\n\t\t ];\n\t}", "title": "" }, { "docid": "a40b5a20f14238d018b0a879a4ffdb2e", "score": "0.6740198", "text": "public function getJavaScripts()\n {\n return array(\n '/rtCorePlugin/vendor/jquery/js/jquery.min.js',\n '/rtCorePlugin/vendor/jquery/js/jquery.tools.min.js',\n '/rtCorePlugin/js/main.js',\n '/rtCorePlugin/vendor/markitup/jquery.markitup.pack.js',\n '/rtCorePlugin/js/markitup-settings.js'\n );\n }", "title": "" }, { "docid": "0f8f33b5f78ea581d6ca725e183a9978", "score": "0.6739791", "text": "public function get_script_depends()\n {\n return ['jquery-slick', 'gnje-script'];\n }", "title": "" }, { "docid": "9274791139269b4e06cf319a7f7a5ccb", "score": "0.6707463", "text": "public function getScript() {\n\t return $this->root->script;\n\t}", "title": "" }, { "docid": "8ccf399471764960ef30ea4dc58826a1", "score": "0.67038906", "text": "public function listScripts()\n {\n return array(\n array('js/whitelist.php', 'var PMA_gotoWhitelist'),\n array('js/messages.php', 'var PMA_messages = new Array();'),\n );\n }", "title": "" }, { "docid": "5ee9db25e2743f2a43837703fa5780db", "score": "0.6699686", "text": "public function getJsSources() {\n $uri = $this->_uri;\n $sources = \"<script type=\\\"text/javascript\\\" src=\\\"\" . $uri . \"bower_components/jquery/dist/jquery.min.js\\\"></script>\";\n $sources .= \"<script type=\\\"text/javascript\\\" src=\\\"\" . $uri . \"bower_components/jquery-ui/jquery-ui.min.js\\\"></script>\";\n $sources .= \"<script type=\\\"text/javascript\\\" src=\\\"\" . $uri . \"bower_components/jquery.scrollTo/jquery.scrollTo.min.js\\\"></script>\";\n $sources .= \"<script type=\\\"text/javascript\\\" src=\\\"\" . $uri . \"prettify/prettify.js\\\"></script>\";\n $sources .= \"<script type=\\\"text/javascript\\\" src=\\\"\" . $uri . \"pretty.js\\\"></script>\";\n\n return $sources;\n }", "title": "" }, { "docid": "800aaeb51b58d816d7fda48ba3174acc", "score": "0.6694096", "text": "public function getScriptPaths()\n {\n return array($this->_smarty->template_dir);\n }", "title": "" }, { "docid": "800aaeb51b58d816d7fda48ba3174acc", "score": "0.6694096", "text": "public function getScriptPaths()\n {\n return array($this->_smarty->template_dir);\n }", "title": "" }, { "docid": "d1f43d6c81dacbd792d7971b0cd4835e", "score": "0.6677948", "text": "public function _replyToGetScripts() { return $this->getScripts(); }", "title": "" }, { "docid": "98ac366250d0c3d756131a6e97a3df75", "score": "0.66688716", "text": "public function getLoadScripts()\n {\n return $this->m_loadscripts;\n }", "title": "" }, { "docid": "0549bc6bf2f3d0833d29c6bd0986aaea", "score": "0.66528964", "text": "public static function getScriptStrings()\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn Application::getInstance()->getDocument()->getScriptOptions('akeeba.text');\n\t\t}\n\t\tcatch (App $e)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\t}", "title": "" }, { "docid": "ee17c52d4fd240db161e5edfdfd23fde", "score": "0.6642187", "text": "public function get_script_depends() {\n\t\treturn array( 'imagesloaded' );\n\t}", "title": "" }, { "docid": "ffd41e5f7d0eb748df682fc6765bb650", "score": "0.66375816", "text": "protected function setScripts () {\n\t\treturn $this->set('scripts', $this->filterPageFiles('scripts'));\n\t}", "title": "" }, { "docid": "7340765a9386ad978ccb94541ebc7ea0", "score": "0.66373193", "text": "public function getAccountScripts()\n {\n $this->authorizationChecker->check(AccountPermissions::GET_ACCOUNT_SCRIPTS);\n return $this->accountManager->getAccountScripts();\n }", "title": "" }, { "docid": "9df62a7009c3345a2a43c0c4c23b4f7b", "score": "0.6620977", "text": "public function getScript()\n {\n return $this->getDir('/index.php');\n }", "title": "" }, { "docid": "90ee6cffad8c5661bd320439730848bb", "score": "0.662069", "text": "public function get_global_scripts() {\n $config = json_decode(file_get_contents(\"config.json\"), true);\n $global_folders = $config['globalFolder'];\n foreach ($global_folders as $folder) {\n foreach ($config['globalScripts'] as $script) {\n $script_path = $folder.\"/\".$script;\n if (file_exists($script_path)) {\n $this->add_script(file_get_contents($script_path));\n }\n }\n }\n }", "title": "" }, { "docid": "4426784444ff6bb58c71b2f14505747b", "score": "0.66083986", "text": "protected function setup_assets() {\n\t\t$base_url = $this->context->url( 'dist/assets/' );\n\n\t\treturn array(\n\t\t\tnew Script(\n\t\t\t\t'googlesitekit-modules-optimize',\n\t\t\t\tarray(\n\t\t\t\t\t'src' => $base_url . 'js/googlesitekit-modules-optimize.js',\n\t\t\t\t\t'dependencies' => array(\n\t\t\t\t\t\t'googlesitekit-vendor',\n\t\t\t\t\t\t'googlesitekit-api',\n\t\t\t\t\t\t'googlesitekit-data',\n\t\t\t\t\t\t'googlesitekit-modules',\n\t\t\t\t\t\t'googlesitekit-datastore-site',\n\t\t\t\t\t\t'googlesitekit-datastore-forms',\n\t\t\t\t\t\t'googlesitekit-components',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "3e3f8a2c2db27cbd61fefd009f245726", "score": "0.6593365", "text": "public function getScript()\n {\n return '';\n }", "title": "" }, { "docid": "c1193cc6b44e26b90a45ac77e2e1b47f", "score": "0.65789306", "text": "protected function getScriptTags() {\n return $this->mink->getSession()->getPage()->findAll('css', 'script');\n }", "title": "" }, { "docid": "ad9a3c0ba043a1ecae5e53ed88fd00a8", "score": "0.6562064", "text": "public function getScript()\n {\n return self::$scripts['converter'];\n }", "title": "" }, { "docid": "130097c1416adb117f0e169a5f5c8966", "score": "0.6558988", "text": "protected function setup_assets() {\n\t\t$base_url = $this->context->url( 'dist/assets/' );\n\n\t\treturn array(\n\t\t\tnew Script(\n\t\t\t\t'googlesitekit-modules-idea-hub',\n\t\t\t\tarray(\n\t\t\t\t\t'src' => $base_url . 'js/googlesitekit-modules-idea-hub.js',\n\t\t\t\t\t'dependencies' => array(\n\t\t\t\t\t\t'googlesitekit-vendor',\n\t\t\t\t\t\t'googlesitekit-api',\n\t\t\t\t\t\t'googlesitekit-data',\n\t\t\t\t\t\t'googlesitekit-modules',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "7545b474d35c8b6dfb06550dc5694fac", "score": "0.6538075", "text": "public function get_script_depends() {\n\t\treturn [ 'zsln-widget-js' ];\n\t}", "title": "" }, { "docid": "f51c1a248843f13b5a003c2a72bbf031", "score": "0.6533351", "text": "protected function default_scripts()\n {\n $develop_src = false !== strpos( \\ecjia::VERSION, '-src' );\n\n if ( ! config('system.script_debug') ) {\n $suffix = '.min';\n } else {\n $suffix = '';\n }\n\n $dev_suffix = $develop_src ? '' : '.min';\n\n // 添加 ecjia-js\n $this->scripts->add( 'ecjia', \t\t\t\t \"/lib/ecjia_js/ecjia$suffix.js\", array('jquery') );\n $this->scripts->add( 'ecjia-ui', \t\t\t\t \"/lib/ecjia_js/ecjia.ui$suffix.js\", array('ecjia') );\n $this->scripts->add( 'ecjia-collect', \t\t \"/lib/ecjia_js/ecjia.collect.js\", array('ecjia'), false, 1 );\n $this->scripts->add( 'ecjia-hook', \t\t \"/lib/ecjia_js/ecjia.hook$suffix.js\", array('ecjia'), false, 1 );\n $this->scripts->add( 'ecjia-utils', \t\t\t \"/lib/ecjia_js/ecjia.utils$suffix.js\", array('ecjia'), false, 1 );\n $this->scripts->add( 'ecjia-region', \t\t\t \"/lib/ecjia_js/ecjia.region$suffix.js\", array('ecjia'), false, 1 );\n\n // 添加jquery\n $this->scripts->add( 'jquery', \t\t\t\t \"/js/jquery$suffix.js\", array(), '2.1.0' );\n $this->scripts->add( 'jquery-pjax', \t\t\t \"/js/jquery-pjax.js\", array('jquery') );\n $this->scripts->add( 'jquery-peity', \t\t\t \"/js/jquery-peity$suffix.js\", array('jquery'), '0.6.0', 1 );\n $this->scripts->add( 'jquery-mockjax', \t\t \"/js/jquery-mockjax$suffix.js\", array('jquery'), '1.5.1', 1 );\n $this->scripts->add( 'jquery-wookmark', \t\t \"/js/jquery-wookmark$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-migrate', \t\t \"/js/jquery-migrate$suffix.js\", array('jquery'), '1.0.0', 1 );\n $this->scripts->add( 'jquery-cookie', \t\t \"/js/jquery-cookie$suffix.js\", array('jquery'), true, 1 );\n $this->scripts->add( 'jquery-actual', \t\t \"/js/jquery-actual$suffix.js\", array('jquery'), '1.0.6', 1 );\n $this->scripts->add( 'jquery-debouncedresize', \"/js/jquery-debouncedresize$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-easing', \t\t \"/js/jquery-easing$suffix.js\", array('jquery'), '1.3', 1 );\n $this->scripts->add( 'jquery-mediaTable', \t \"/js/jquery-mediaTable$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-imagesloaded', \t \"/js/jquery-imagesloaded$suffix.js\", array('jquery'), '2.0.1', 1 );\n $this->scripts->add( 'jquery-gmap3', \t\t\t \"/js/jquery-gmap3$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-autosize', \t\t \"/js/jquery-autosize$suffix.js\", array('jquery'), '1.7', 1 );\n $this->scripts->add( 'jquery-counter', \t\t \"/js/jquery-counter$suffix.js\", array('jquery'), '2.1', 1 );\n $this->scripts->add( 'jquery-inputmask', \t\t \"/js/jquery-inputmask$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-progressbar',\t \"/js/jquery-anim_progressbar$suffix.js\", array('jquery'), false, 1 );\n\n $this->scripts->add( 'js-json', \t\t\t\t \"/js/json2.js\", array(), false, 1 );\n $this->scripts->add( 'js-sprintf', \t\t\t \"/lib/sprintf_js/sprintf$suffix.js\", array(), '1.1.2', 1 );\n\n // 添加jquery-ui\n $this->scripts->add( 'jquery-ui-touchpunch',\t \"/js/ui/jquery-ui-touchpunch$suffix.js\", array('jquery-ui'), false, 1 );\n $this->scripts->add( 'jquery-ui-totop',\t\t \"/js/ui/jquery-ui-totop$suffix.js\", array(), false, 1 );\n\n\n // 添加ecjia-admin\n $this->scripts->add( 'ecjia-admin', \t\t\t '/ecjia/ecjia-admin.js', array('ecjia', 'jquery-pjax', 'jquery-cookie', 'jquery-quicksearch', 'jquery-mousewheel', 'jquery-ui-totop') );// 'nicescroll',\n $this->scripts->add( 'ecjia-front', \t\t\t '/ecjia/ecjia-front.js', array('ecjia') );\n\n // 添加ecjia admin lib\n $this->scripts->add( 'ecjia-admin_cache', '/ecjia/ecjia-admin_cache.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_logs', '/ecjia/ecjia-admin_logs.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_message_list', '/ecjia/ecjia-admin_message_list.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_region', '/ecjia/ecjia-admin_region.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_role', '/ecjia/ecjia-admin_role.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_upgrade', '/ecjia/ecjia-admin_upgrade.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_application', '/ecjia/ecjia-application.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_dashboard', '/ecjia/ecjia-dashboard.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_team', \t '/ecjia/ecjia-about_team.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_plugin', '/ecjia/ecjia-plugin_list.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_privilege', '/ecjia/ecjia-privilege.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_shop_config', '/ecjia/ecjia-shop_config.js', array('ecjia-admin'), false, 1 );\n $this->scripts->add( 'ecjia-admin_license', '/ecjia/ecjia-admin_license.js', array('ecjia-admin'), false, 1 );\n\n //对lib的扩展js\n $this->scripts->add( 'jquery-chosen', \t\t\t \"/js/ecjia.chosen.js\", array('ecjia-jquery-chosen'), false, 1 );\n $this->scripts->add( 'ecjia-jquery-chosen', \t\t\"/lib/chosen/chosen.jquery$suffix.js\", array('jquery'), false, 1 );\n\n // 添加lib\n $this->scripts->add( 'bootstrap', \t\t\t\t \"/lib/bootstrap/js/bootstrap$suffix.js\" );\n $this->scripts->add( 'jquery-ui',\t\t\t\t\t\"/lib/jquery-ui/jquery-ui$suffix.js\", array('jquery') );\n $this->scripts->add( 'jquery-validate',\t\t\t \"/lib/validation/jquery.validate$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-uniform',\t\t\t \"/lib/uniform/jquery.uniform$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'smoke',\t\t\t\t\t\t\"/lib/smoke/smoke$suffix.js\", array(), false, 1 );\n\n $this->scripts->add( 'bootstrap-placeholder', \"/lib/jasny-bootstrap/js/bootstrap-placeholder$suffix.js\", array('bootstrap'), false, 1 );\n $this->scripts->add( 'bootstrap-colorpicker', \"/lib/colorpicker/bootstrap-colorpicker$suffix.js\", array(), false, 1 );\n\n $this->scripts->add( 'jquery-flot', \t\t\t\t\"/lib/flot/jquery.flot$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-flot-curvedLines', \t\"/lib/flot/jquery.flot.curvedLines$suffix.js\", array('jquery-flot'), false, 1 );\n $this->scripts->add( 'jquery-flot-multihighlight', \"/lib/flot/jquery.flot.multihighlight$suffix.js\", array('jquery-flot'), false, 1 );\n $this->scripts->add( 'jquery-flot-orderBars', \t \"/lib/flot/jquery.flot.orderBars$suffix.js\", array('jquery-flot'), false, 1 );\n $this->scripts->add( 'jquery-flot-pie', \t\t\t\"/lib/flot/jquery.flot.pie$suffix.js\", array('jquery-flot'), false, 1 );\n $this->scripts->add( 'jquery-flot-pyramid', \t\t\"/lib/flot/jquery.flot.pyramid$suffix.js\", array('jquery-flot'), false, 1 );\n $this->scripts->add( 'jquery-flot-resize', \t\t \"/lib/flot/jquery.flot.resize$suffix.js\", array('jquery-flot'), false, 1 );\n\n $this->scripts->add( 'antiscroll', \t\t\t\t \"/lib/antiscroll/antiscroll$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-mousewheel', \t\t \"/lib/antiscroll/jquery-mousewheel.js\", array('jquery','antiscroll'), false, 1 );\n $this->scripts->add( 'nicescroll', \t\t\t\t \"/lib/nicescroll/jquery.nicescroll$suffix.js\", array('jquery'), false, 1 );\n\n $this->scripts->add( 'jquery-colorbox', \t\t\t\"/lib/colorbox/jquery.colorbox$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-qtip', \t\t\t\t\"/lib/qtip2/jquery.qtip$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-sticky', \t\t\t \"/lib/sticky/sticky$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-jBreadCrumb', \t\t \"/lib/jBreadcrumbs/js/jquery.jBreadCrumb$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-form', \t\t\t\t\"/lib/jquery-form/jquery.form$suffix.js\", array('jquery'), false, 1 );\n\n $this->scripts->add( 'ios-orientationchange',\t\t\"/lib/ios-fix/ios-orientationchange-fix$suffix.js\", array(), false, 1 );\n $this->scripts->add( 'google-code-prettify',\t\t\"/lib/google-code-prettify/prettify$suffix.js\", array(), false, 1 );\n $this->scripts->add( 'selectnav',\t\t\t\t\t\"/lib/selectnav/selectnav$suffix.js\", array(), false, 1 );\n\n $this->scripts->add( 'jquery-dataTables', \t\t\t\"/lib/datatables/jquery.dataTables$suffix.js\", array('jquery'), false, 1 );\n $this->scripts->add( 'jquery-dataTables-sorting',\t\"/lib/datatables/jquery.dataTables.sorting$suffix.js\", array('jquery-dataTables'), false, 1 );\n $this->scripts->add( 'jquery-dataTables-bootstrap',\t\"/lib/datatables/jquery.dataTables.bootstrap$suffix.js\", array('jquery-dataTables'), false, 1 );\n\n\n $this->scripts->add( 'jquery-stepy',\t\t\t\t\"/lib/stepy/js/jquery.stepy$suffix.js\", array(), false, 1 );\n\n $this->scripts->add( 'jquery-quicksearch',\t\t\t\"/lib/multi-select/js/jquery.quicksearch.js\", array(), false, 1);\n\n $this->scripts->add( 'bootstrap-datepicker',\t\t\"/lib/datepicker/bootstrap-datepicker.min.js\", array(), false, 1);\n\n\n // 添加vendor\n $this->scripts->add( 'tinymce',\t RC_Uri::vendor_url('tinymce/tinymce/tinymce') . \"$suffix.js\", array(), false, 1 );\n\n //js语言包调用\n $this->scripts->localize('ecjia-ui', 'admin_lang', config('system::jslang.loader_page'));\n }", "title": "" }, { "docid": "a9f7a11ac06786e79ef59b4efc2bccc6", "score": "0.6514653", "text": "public function getScript()\r\n {\r\n if (!empty($this->script)) {\r\n $script = '';\r\n \r\n foreach($this->script as $value) {\r\n $script .= '<script src=\"' . $value['src'] . '\"';\r\n \r\n if (!empty($value['attributes'])) {\r\n foreach($value['attributes'] as $atrKey => $atrValue) {\r\n $script .= ' ' . $atrKey . '=\"' . $atrValue . '\"';\r\n }\r\n }\r\n \r\n $script .= \"></script>\\n\";\r\n }\r\n }\r\n\r\n return $script;\r\n }", "title": "" }, { "docid": "230e5abdd092de32dc61a1d9821617f3", "score": "0.6505176", "text": "public function getScript(){\n $script = '';\n foreach($this->rows() as $row=>$x){\n $script.=$this->{$row}->getScript().PHP_EOL;\n }\n\n return $script;\n }", "title": "" }, { "docid": "28f142d935d240fbfa09ead24e5e3784", "score": "0.6484859", "text": "public function getInsertScripts()\n {\n $scripts = '';\n $js = [\n '//cdnjs.cloudflare.com/ajax/libs/prism/1.5.0/prism.min.js'\n ];\n\n foreach ($js as $src) {\n $scripts .= '<script style=\"text/javascript\" src=\"' . $src . '\"></script>' . PHP_EOL;\n }\n\n return $scripts;\n }", "title": "" }, { "docid": "ea22509aec2e66ff2f721fc1943e3dd9", "score": "0.64751625", "text": "protected function getScriptUrls() {\n $current_url = $this->mink->getSession()->getCurrentUrl();\n $host = parse_url($current_url, PHP_URL_HOST);\n $protocol = parse_url($current_url, PHP_URL_SCHEME);\n\n $js_urls = array(\n 'internal' => array(),\n 'external' => array(),\n );\n\n foreach ($this->getScriptTags() as $script) {\n if ($script->hasAttribute('src')) {\n $js_src = $script->getAttribute('src');\n $js_protocol = parse_url($js_src, PHP_URL_SCHEME);\n\n if (parse_url($js_src, PHP_URL_HOST) === $host) {\n // Request internal scripts with current protocol as local and testing environments might not support https.\n $js_urls['internal'][] = ($js_protocol ? '' : $protocol . ':') . $js_src;\n }\n else {\n // Always fetch 3rd party scripts over https:// if src is protocol-relative.\n $js_urls['external'][] = ($js_protocol ? '' : 'https:') . $js_src;\n }\n }\n else {\n // Extract require paths if available.\n if (preg_match('~requirejs.config\\({\"paths\":(.*?})~', $script->getHtml(), $matches)){\n $paths = json_decode($matches[1]);\n foreach ($paths as $path) {\n // Swap https with requested protocol (http), until https is enabled on VM/CI.\n $js_urls['internal'][] = str_replace('https://', $protocol . '://', $path) . '.js';\n }\n }\n }\n }\n\n return $js_urls;\n }", "title": "" }, { "docid": "398594cb6eb1e7a036a7d81783b5c480", "score": "0.64578277", "text": "public function rel_include_scripts() {\n \n }", "title": "" }, { "docid": "cc0dcbfe0c29f004bd0e55175575aeab", "score": "0.64556605", "text": "public function getScript()\r\n\t{\r\n\t\treturn $this->script;\r\n\t}", "title": "" }, { "docid": "8a74a2a23cdac1a6ac6127757c12cfa4", "score": "0.6454391", "text": "public function scripts()\n\t{\n\t\tforeach ($this->scripts as $script): ?>\n\t\t\t<script src=\"<?= $script ?>\"></script>\n\t\t<?php endforeach;\n\t\t$this->scripts = [];\n\t}", "title": "" }, { "docid": "7bb482af83c572d70fa4932616d7d6bd", "score": "0.64524937", "text": "protected function setup_assets() {\n\t\t$base_url = $this->context->url( 'dist/assets/' );\n\n\t\treturn array(\n\t\t\tnew Script(\n\t\t\t\t'googlesitekit-modules-subscribe-with-google',\n\t\t\t\tarray(\n\t\t\t\t\t'src' => $base_url . 'js/googlesitekit-modules-subscribe-with-google.js',\n\t\t\t\t\t'dependencies' => array(\n\t\t\t\t\t\t'googlesitekit-api',\n\t\t\t\t\t\t'googlesitekit-data',\n\t\t\t\t\t\t'googlesitekit-datastore-site',\n\t\t\t\t\t\t'googlesitekit-modules',\n\t\t\t\t\t\t'googlesitekit-vendor',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "1a3baab21e32143ccde5f65a9439a49f", "score": "0.6410298", "text": "abstract public function getCompletedScripts(): array;", "title": "" }, { "docid": "d881dbdd4d996f399c25483572e096e1", "score": "0.64058614", "text": "public static function compiles()\r\n {\r\n $dir = static::guessPackageClassPath('royalcms/script');\r\n\r\n return [\r\n $dir . '/Script.php',\r\n $dir . '/HandleScripts.php',\r\n $dir . '/Dependency.php',\r\n $dir . '/Dependencies.php',\r\n $dir . '/Style.php',\r\n $dir . '/HandleStyles.php',\r\n $dir . '/ScriptServiceProvider.php',\r\n ];\r\n }", "title": "" }, { "docid": "ff8f39567aa0cf7faf460960a9cc09a3", "score": "0.6393933", "text": "public function get_script_depends() {\n\t\t\n\t\treturn [ 'core-style' ];\t\n\t\t\n\t}", "title": "" }, { "docid": "0db7641fde0b8ffc24aa7bfad3bce7a0", "score": "0.6383359", "text": "public function getScript()\n {\n return $this->script;\n }", "title": "" }, { "docid": "ce77efe436f43a18f7c5f5d7c1df2fac", "score": "0.6381493", "text": "public function Js()\n {\n return [\n 'auth-assets/js/jquery-3.5.0.min.js',\n 'auth-assets/js/popper.min.js',\n 'auth-assets/js/bootstrap.min.js',\n 'auth-assets/js/imagesloaded.pkgd.min.js',\n 'auth-assets/js/validator.min.js',\n 'auth-assets/node_modules/jquery-toast-plugin/dist/jquery.toast.min.js',\n 'auth-assets/node_modules/jquery.buttonloadingindicator/dist/jquery.buttonloadingindicator.js',\n 'auth-assets/js/main.js',\n ];\n }", "title": "" }, { "docid": "2f7e185145c25230817777a2c35257b4", "score": "0.6373064", "text": "public function getScript(): string\n {\n return $this->script;\n }", "title": "" }, { "docid": "1d8bb1e3cd1fa0fea253d2736c5f3ca4", "score": "0.63694376", "text": "public function getScript() {\n\n\t\treturn $this->script;\n\n\t}", "title": "" }, { "docid": "6cd518cfdb25731c8404b4f4cda9ca0e", "score": "0.6332727", "text": "public static function getJS()\n {\n return implode(\"\\n\", self::$renderedScripts);\n }", "title": "" }, { "docid": "236bfafbf212e7cad7d03ad0b10bfb00", "score": "0.62458974", "text": "public function getScriptElements()\r\n\t{\r\n\t\treturn $this->scriptElements;\r\n\t}", "title": "" }, { "docid": "0284acf0f0cfdaea484da36d7a47863c", "score": "0.62448347", "text": "public function initScripts()\n {\n }", "title": "" }, { "docid": "d245237087edccf5e91b5c5c6250c1b0", "score": "0.6233712", "text": "public function script()\n {\n if ($this->script === '') {\n $this->split();\n }\n\n return $this->script;\n }", "title": "" }, { "docid": "38ac4155b655bb52e04bc51d956c9750", "score": "0.6208628", "text": "public function loadScript(){\n \t\treturn null;\n \t}", "title": "" }, { "docid": "97c38d2db2eb74bfcdd0acec60fc744b", "score": "0.62007314", "text": "public function get_scriptServers() {\n\t return $this->scriptServer;\n\t}", "title": "" }, { "docid": "eab1255f3aa7291c098c88218ad8d71f", "score": "0.6194893", "text": "public function get_script_depends() {\n return [ 'step-box-js' ];\n }", "title": "" }, { "docid": "dee208759bc32883ed7afaaa309235ff", "score": "0.6183203", "text": "public function getJavaScripts()\n {\n //check if jquery is loaded\n $js = array();\n return $js;\n }", "title": "" }, { "docid": "303ff8c82a49cd91863cbf317a50894c", "score": "0.61758804", "text": "public function get_script()\n\t{\n\t\t$st = '';\n\t\tforeach ( $this->items as $it ){\n\t\t\t$st .= $it->get_script();\n\t\t}\n\t\t$st .= '$(\"#'.$this->id.'\").validate();';\n\t\treturn $st;\n\t}", "title": "" }, { "docid": "f2e5c5a953d84a9684aa5414ee3f9e34", "score": "0.6170263", "text": "public function getJavaScripts()\n {\n $javascripts = array(\"http://maps.google.com/maps/api/js?sensor=false\",\n \"/js/jquery-1.4.4.min.js\",\n \"/js/jquery-ui-1.8.7.min.js\",\n \"/js/jquery.ui.addresspicker.js\");\n\n return array_merge($javascripts,parent::getJavaScripts());\n }", "title": "" }, { "docid": "193c9487ce3d80c706fbb4c221438957", "score": "0.6158327", "text": "public function get_script_depends() {\r\n\t\treturn [ 'simple_modal' ];\r\n\t}", "title": "" }, { "docid": "600c474fdb6adb42e5c973db0288a794", "score": "0.6155165", "text": "function listScriptFiles()\n {\n $hsf = &Horde_Script_Files::singleton();\n return $hsf->listFiles();\n }", "title": "" }, { "docid": "5ed29a685f6d947dbe6ca63072e2593d", "score": "0.6152524", "text": "public function getJavaScripts()\n {\n return array_merge(parent::getJavascripts(), array('//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js'));\n }", "title": "" }, { "docid": "54692c1496c11837327bd2c15463b8cc", "score": "0.6123241", "text": "public function getFooterScripts(App\\Request $request)\n\t{\n\t\t$moduleName = $request->getModule();\n\t\t$jsFileNames = [\n\t\t\t'~libraries/lodash/lodash.js',\n\t\t\t'~libraries/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js',\n\t\t\t'~libraries/gridstack/dist/gridstack.js',\n\t\t\t'~libraries/gridstack/dist/gridstack.jQueryUI.js',\n\t\t\t'~libraries/css-element-queries/src/ResizeSensor.js',\n\t\t\t'~libraries/css-element-queries/src/ElementQueries.js',\n\t\t\t'~libraries/chart.js/dist/Chart.js',\n\t\t\t'~libraries/hammerjs/hammer.js',\n\t\t\t'~libraries/chartjs-plugin-funnel/dist/chart.funnel.js',\n\t\t\t'~libraries/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.js',\n\t\t\t'~libraries/jquery-lazy/jquery.lazy.js',\n\t\t\t'modules.Vtiger.resources.DashBoard',\n\t\t\t'modules.' . $moduleName . '.resources.DashBoard',\n\t\t\t'modules.Vtiger.resources.dashboards.Widget',\n\t\t\t'~libraries/fullcalendar/dist/fullcalendar.js',\n\t\t];\n\n\t\treturn array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts($jsFileNames));\n\t}", "title": "" }, { "docid": "70ad7f9b1e98e5838305c93a604ad418", "score": "0.6119396", "text": "private function getCoresJs() {\n return [\n\t\t\t\t'bower_components/jquery/dist/jquery.min.js',\n\t\t\t\t'bower_components/bootstrap/dist/js/bootstrap.min.js',\n ];\n }", "title": "" }, { "docid": "03dfc35bfe1284e4f7c0b516c540d021", "score": "0.61081845", "text": "function getDataTableScripts() {\n return \" \n <link rel='stylesheet' href='css/CSSReset.css'>\n <link rel='stylesheet' href='css/t-table.css'>\n\t<link rel='stylesheet' href='jquery/DataTables/media/css/ColVis.css'>\t\n\t<link rel='stylesheet' href='jquery/DataTables/media/css/ColReorder.css'>\t\t\t\n\t\t\t\n\t<!--<script type='text/javascript' src='jquery/DataTables/media/js/jquery.js'></script>--> \n\t<script class='jsbin' src='jquery/DataTables/media/js/jquery.dataTables.js'></script>\n\t<script type='text/javascript' src='jquery/DataTables/media/js/ColVis.js'></script>\n\t<script type='text/javascript' src='jquery/DataTables/media/js/ColReorder.js'></script>\n <script type='text/javascript' src='jquery/DataTables/EuroDateSort.js'></script>\n\t\";\n}", "title": "" }, { "docid": "d86deaa03f6250ff638cf90e64bcfa50", "score": "0.60920733", "text": "private function getAppScript() {\n\n\t\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\n\t\treturn $this->manifest['app.js'];\n\t}", "title": "" }, { "docid": "38e0504b1b5789b81ade942933c7fb18", "score": "0.60886765", "text": "protected function getInternalScriptUrls() {\n $script_urls = $this->getScriptUrls();\n return (array) $script_urls['internal'];\n }", "title": "" }, { "docid": "9e36facc687d10639fe2ba4d65712fba", "score": "0.6088454", "text": "public function register_scripts() {\n\t\t}", "title": "" }, { "docid": "fa3b241ef2026d378d4215639b21d5a4", "score": "0.60853875", "text": "public function register_scripts() {\n\n\t}", "title": "" }, { "docid": "8d23976ca4fed736529b906648691a59", "score": "0.60765314", "text": "public function get_script_depends() {\r\n\t\treturn [ 'gmap-api', 'gmap3' ];\r\n\t}", "title": "" }, { "docid": "658c96784091146549b05bdc19b04e14", "score": "0.6064122", "text": "function get_artism_script() {\n\t$manifest = get_artism_manifest();\n\treturn get_template_directory_uri() . '/frontend/build/' . $manifest['main.js'];\n}", "title": "" }, { "docid": "66c1128bb6eb431e51bc9bc2f38fd568", "score": "0.60513735", "text": "static public function scripts() {\n\t\twp_enqueue_script( 'glutton-lib',\n\t\t\tget_stylesheet_directory_uri() . '/static/app/lib.js',\n\t\t\tarray(),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script( 'glutton-main',\n\t\t\tget_stylesheet_directory_uri() . '/static/app/app.js',\n\t\t\tarray( 'glutton-lib' ),\n\t\t\tnull,\n\t\t\ttrue\n\t\t);\n\n\t\t$glutton_data = array(\n\t\t\t'revision' => static::revision(),\n\t\t\t'env' => WP_ENV,\n\t\t);\n\t\twp_localize_script( 'glutton-main', 'Glutton', $glutton_data );\n\t}", "title": "" }, { "docid": "61f6ea2b60fd2dbd6c46851c91dcbf55", "score": "0.60430175", "text": "public function injectScripts()\n {\n }", "title": "" }, { "docid": "9f291e8f8af39c3ef588225e6aef77f8", "score": "0.60330904", "text": "public function getAssets()\n {\n return [\n 'base_path' => '/' . DebugBar::moduleResource('javascript')->getRelativePath(),\n 'base_url' => Director::makeRelative(DebugBar::moduleResource('javascript')->getURL()),\n 'css' => 'config/widget.css',\n 'js' => 'config/widget.js'\n ];\n }", "title": "" }, { "docid": "05718fe6ec231db42c03f0e75dea20b2", "score": "0.6027962", "text": "public function widget_scripts() {}", "title": "" }, { "docid": "f04b810ccb476701e8995e5ac9ec0085", "score": "0.6019256", "text": "public function scripts() {\n\n\t\t$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\t\t$version = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? time() : WMBOX_VERSION;\n\n\t\t/* Admin styles */\n\t\twp_enqueue_style( 'wmbox-admin', WMBOX_URI . '/assets/css/admin/admin' . $suffix . '.css', array(), $version );\n\n\t\t/* Admins scripts */\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\twp_enqueue_script( 'wmbox-admin', WMBOX_URI . '/assets/js/admin/admin.js', array( 'jquery', 'jquery-ui-sortable', 'wp-color-picker' ), $version, true );\n\n\t\twp_localize_script( 'wmbox-admin', 'WolfMetaboxesAdminParams', array(\n\t\t\t'chooseImage' => esc_html__( 'Select an image', 'wolf-metaboxes' ),\n\t\t\t'chooseMultipleImage' => esc_html__( 'Select a set of images', 'wolf-metaboxes' ),\n\t\t\t'chooseFile' => esc_html__( 'Select a file', 'wolf-metaboxes' ),\n\t\t\t'confirmRemoveAllImages' => esc_html__( 'This will remove the entire image set', 'wolf-metaboxes' ),\n\t\t) );\n\n\t}", "title": "" }, { "docid": "dc804c98e5284b7be0805491eb422655", "score": "0.6017143", "text": "public function getScriptPath () {\n\t$data = $this->scriptPath;\n\t return $data;\n}", "title": "" }, { "docid": "ce8893c43b0601546e366a36028c816b", "score": "0.60153437", "text": "public function includeScriptAssets()\n {\n $assetsUrl = $this->getOption('assetsUrl');\n $jsUrl = $this->getOption('jsUrl') . 'mgr/';\n $jsSourceUrl = $assetsUrl . '../../../source/js/mgr/';\n\n if ($this->getOption('debug') && $assetsUrl != MODX_ASSETS_URL . 'components/toggletvset/') {\n $this->modx->controller->addLastJavascript($jsSourceUrl . 'toggletvset.js?v=v' . $this->version);\n } else {\n $this->modx->controller->addLastJavascript($jsUrl . 'toggletvset.js?v=v' . $this->version);\n }\n\t\t\t\t$this->modx->controller->addHtml('<script type=\"text/javascript\">' .\n 'var ToggleTVSet = ' . json_encode(array('options' => array(\n 'debug' => $this->getOption('debug'),\n 'toggleTVs' => $this->getOption('toggletvs'),\n 'toggleTVsClearHidden' => $this->getBooleanOption('toggletvs_clearhidden'),\n 'hideTVs' => $this->getOption('hidetvs'),\n 'showTVs' => $this->getOption('showtvs'),\n\t\t\t\t\t\t\t\t'showOptionTvs' => $this->getOption('showOptionTvs')\n )), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . ';' . '</script>');\n }", "title": "" }, { "docid": "d5ca290b95fa96736a743e1b13b6ed19", "score": "0.6013118", "text": "public static function js(){\n return array(new \\SYSTEM\\PSAI('modules/saimod_sys_docu/js/saimod_sys_docu.js'));}", "title": "" }, { "docid": "65ea327081181a60b5ffca6a2c991195", "score": "0.60128814", "text": "function getFooterScripts(Vtiger_Request $request) {\n $headerScriptInstances = parent::getFooterScripts($request);\n $moduleName = $request->getModule();\n \n $jsFileNames = array(\n \"libraries.jquery.ZeroClipboard.ZeroClipboard\",\n \"modules.$moduleName.resources.PDFUtils\",\n \"modules.$moduleName.resources.utils\",\n\t\t\t\"modules.$moduleName.resources.Condition\",\n \"modules.$moduleName.resources.ckeditor.ckeditor\",\n \"modules.$moduleName.resources.ckeditor.adapters.jquery\",\n \"libraries.jquery.jquery_windowmsg\"\n );\n $jsScriptInstances = $this->checkAndConvertJsScripts($jsFileNames);\n $headerScriptInstances = array_merge($headerScriptInstances, $jsScriptInstances);\n return $headerScriptInstances;\n }", "title": "" }, { "docid": "fadb35bc6f2d7fbf8d4845de559f4225", "score": "0.59927016", "text": "public function getScriptUrl();", "title": "" }, { "docid": "32ae4076f8461fa667977c57b285a47d", "score": "0.59840155", "text": "function getJavaScript() {\n\t?>\n\t<script type=\"text/javascript\" src=\"js/jquery-2.2.1.min.js\"></script>\n\t<script type=\"text/javascript\" src=\"js/jquery-ui-1.11.4.min.js\"></script>\n\t\n\t<script type=\"text/javascript\" src=\"js/jquery.validate.min.js\"></script>\n\t<script type=\"text/javascript\" src=\"js/additional-methods.min.js\"></script>\n\t\n\t<script type=\"text/javascript\" src=\"js/jquery.visible.min.js\"></script>\n\t<script type=\"text/javascript\" src=\"js/jquery.sticky.js\"></script>\n\t<script type=\"text/javascript\" src=\"js/bjqs-1.3.min.js\"></script>\n\t\n\t<script type=\"text/javascript\" src=\"js/script.js\"></script>\n\t<?php\n}", "title": "" }, { "docid": "02f60142bc490aa673b81c5885160c23", "score": "0.59731096", "text": "function init_scripts_method() {\n \n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "eabbb193d9e49e01601ceefd39ab6ec8", "score": "0.0", "text": "public function create()\n {\n return view('sponsorship.create');\n }", "title": "" } ]
[ { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.7393118", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.7328834", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208485", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.71638685", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.7073722", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.7072655", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.70215225", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.6994326", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69885707", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.6958746", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6954809", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.693502", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.6919321", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.6918515", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.6876466", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6874666", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" }, { "docid": "f4672fc37d04d0e3bef9bc80e57323e9", "score": "0.6860329", "text": "public function create()\n {\n //\n $question= new Question();\n return view('dashboard.question.form', [\n \"question\" => $question\n ]);\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6860251", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "95a4952039c4b40b058cc67fba7cd2d7", "score": "0.68573785", "text": "public function create () {\n $course = new Course();\n $btnText = __(\"Enviar curso para revisión\");\n\n return view('courses.form', compact('course', 'btnText'));\n }", "title": "" }, { "docid": "ca80651480f4bbbd35305ceefd136182", "score": "0.6853353", "text": "public function newAction()\n {\n $entity = new Alumni();\n $form = $this->createForm(new AlumniType(), $entity);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "d58534453dca5d05eb6bf9759a643eaa", "score": "0.68512565", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t}", "title": "" }, { "docid": "783d7ee63b2e492087fc641fa43b1ef1", "score": "0.684831", "text": "public function create()\n\t{\n\t\treturn View::make('fornecedors.create');\n\t}", "title": "" }, { "docid": "2d13aa784138fe895746ebaa36bda96f", "score": "0.6847265", "text": "public function create()\n {\n return view('hr.create');\n }", "title": "" }, { "docid": "1406c82292b4f07e3eecfee633a3f557", "score": "0.68437195", "text": "public function create()\n {\n return view('admin.company.form', [\n 'company' => null,\n 'route' => 'admin.company.store',\n 'method' => 'POST'\n ]);\n }", "title": "" }, { "docid": "b1d677deef4bb08323db61d502e8dcee", "score": "0.6843096", "text": "public function create()\n {\n return view('backend.book.create');\n }", "title": "" } ]
1e98f9e3c7b41ec988d845049d1addeb
Returns whether the object has ever been saved. This will be false, if the object was retrieved from storage or was created and then saved.
[ { "docid": "ce65f6c0fec1bd772db7c28262d67b99", "score": "0.0", "text": "public function isNew()\n {\n return $this->new;\n }", "title": "" } ]
[ { "docid": "ca338f7bbe3ca1008d6ec6169d6e4760", "score": "0.83735126", "text": "public function isSaved(): bool\n {\n return $this->saved;\n }", "title": "" }, { "docid": "aa529043a4171c668b4176ce7afc1687", "score": "0.83015186", "text": "public function isSaved(): bool\n {\n return ! is_null($this->getValue()) ? true : false;\n }", "title": "" }, { "docid": "4fc3cfc9dcceb2fa0a742a636bab0b39", "score": "0.8075497", "text": "public function isSaved() {\n return $this->_isSaved;\n }", "title": "" }, { "docid": "4fc3cfc9dcceb2fa0a742a636bab0b39", "score": "0.8075497", "text": "public function isSaved() {\n return $this->_isSaved;\n }", "title": "" }, { "docid": "03a43cc5471b8f40bdcb15cefc18323d", "score": "0.8069576", "text": "public function isSaved()\n {\n return null !== $this->savedName;\n }", "title": "" }, { "docid": "be2e2e0eaa640ba1fbaf0d5f04191422", "score": "0.785106", "text": "public function is_valid_save() {\n\t\tif ( ! $this->verified_nonce_in_request() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $this->is_valid_attach_for_object( null );\n\t}", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "2ec005273dd4669b7d61d4b6b6e1d6e9", "score": "0.7579836", "text": "public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }", "title": "" }, { "docid": "dde3709f1a983517497f394b7c571e9b", "score": "0.75376236", "text": "public function save()\r\n {\r\n $this->isSaving = true;\r\n\r\n if ($this->exists) {\r\n $saved = $this->isDirty() ?\r\n $this->performUpdate() : true;\r\n } else {\r\n $saved = $this->performInsert();\r\n }\r\n\r\n $this->isSaving = false;\r\n\r\n return $saved;\r\n }", "title": "" }, { "docid": "3806fb7c5c5a02f4b222d31f0b7a5a77", "score": "0.73944503", "text": "public function saveObject()\n {\n return false;\n }", "title": "" }, { "docid": "3806fb7c5c5a02f4b222d31f0b7a5a77", "score": "0.73944503", "text": "public function saveObject()\n {\n return false;\n }", "title": "" }, { "docid": "08481e1ce82f387ae667f826573b8984", "score": "0.7382747", "text": "public function isSave ()\r\n\t{\r\n\t\treturn $this->formSave;\r\n\t}", "title": "" }, { "docid": "f457387bea894801f600ad669a66a908", "score": "0.7221997", "text": "public function isNew(): bool\n {\n return !Validate::isLoadedObject($this);\n }", "title": "" }, { "docid": "2a113a977e52b258d77b8faaacbf37c3", "score": "0.71490544", "text": "public function save() {\n $retVal = parent::save();\n \n $this->_isSaved = true;\n \n return $retVal;\n }", "title": "" }, { "docid": "ab49bb88598b60c502287165aa36657b", "score": "0.7134787", "text": "public function save()\n {\n return true;\n }", "title": "" }, { "docid": "386bdebd455c1af7489ca76a299c846b", "score": "0.71095854", "text": "public function saveState(): bool\n {\n $fieldsForUpdate = $this->getNewFieldsFromArrayCompare(\n $this->objState,\n $this->dbState\n );\n\n $fieldsForDelete = $this->getNewFieldsFromArrayCompare(\n $this->dbState,\n $this->objState\n );\n\n $d = true;\n if (count($fieldsForDelete) > 0) {\n $d = $this->getDBManager()->rmvFromProcessStateById($this->getId(), $fieldsForDelete);\n }\n\n $u = true;\n if (count($fieldsForUpdate) > 0) {\n $u = $this->getDBManager()->updProcessStateById($this->getId(), $fieldsForUpdate);\n }\n\n if ($u && $d) {\n $this->dbState = $this->objState;\n }\n\n return $u && $d;\n }", "title": "" }, { "docid": "5e652d03d1506af3619eecc0c3f95e81", "score": "0.70952296", "text": "final public function isPersisting()\n {\n return $this->persists;\n }", "title": "" }, { "docid": "33bd53d015c681457f3a57d89f03d3f0", "score": "0.70315313", "text": "public function save(): bool\n {\n if ($this->preSave() === false) {\n return false;\n }\n\n $this->setLinkedData();\n $saved = $this->upstream_model->save();\n\n if ($saved) {\n $this->postSave();\n }\n\n return $saved;\n }", "title": "" }, { "docid": "68dc400c45af54ef489abe3722656d52", "score": "0.70190275", "text": "public function isAutosave(){\n\t\tif(!isset($this->autosave)){\n\t\t\t$this->reloadAutosave();\n\t\t}\n\t\treturn $this->autosave;\n\t}", "title": "" }, { "docid": "b3c83fb3e7a56348e250a9b456295acc", "score": "0.7008784", "text": "public function save(): bool\n {\n if ($this->repositoryManager == null) {\n return false;\n }\n\n return $this->getRepository()->insertOnDuplicateKeyUpdate($this);\n }", "title": "" }, { "docid": "55eedb91f59710d8cce735339035cf07", "score": "0.69625354", "text": "public function isPersisted(): bool\n {\n if (!\\property_exists($this, static::getPrimaryKey())) {\n throw new RuntimeException('PK property does not exist');\n }\n\n /* @phpstan-ignore-next-line */\n return isset($this->{static::getPrimaryKey()});\n }", "title": "" }, { "docid": "8858f2c65c47f16e618f43373a10b36a", "score": "0.69388777", "text": "public function isDirty()\n\t{\n\t\treturn $this->isDirty;\n\t}", "title": "" }, { "docid": "ba65b8f8b0babe33009b398e0c17b2b4", "score": "0.6924764", "text": "public function isDirty()\n {\n return true === $this->dirty;\n }", "title": "" }, { "docid": "2460e8556254906fc09e678f5abb3c6e", "score": "0.6924063", "text": "public function save() {\n\n if (!($this->success = $this->model->save())) {\n return $this->success = $this->model->getFirstErrors();\n } else {\n return true;\n }\n\n }", "title": "" }, { "docid": "d5c5c2045b7fc678efe79dc109295948", "score": "0.6918086", "text": "public function preSave(): bool\n {\n return $this->every->preSave();\n }", "title": "" }, { "docid": "9993f7b0943bd652b3e9d2d69a3531b3", "score": "0.69159", "text": "private function _shouldSaveRevision(): bool\n {\n return (\n $this->id &&\n !$this->propagating &&\n !$this->resaving &&\n !$this->getIsDraft() &&\n !$this->getIsRevision() &&\n $this->getSection()->enableVersioning\n );\n }", "title": "" }, { "docid": "5c3887760c226491b7b29dce33bd728e", "score": "0.689953", "text": "public function IsDirty()\r\n {\r\n return count($this->_dirty) > 0;\r\n }", "title": "" }, { "docid": "b1c9c04e5ebb066bd4239ad338622275", "score": "0.68962044", "text": "public function save() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "013720d04ad7f83df63cfff46494038a", "score": "0.6885109", "text": "public function isDirty()\n {\n return $this->isDirty;\n }", "title": "" }, { "docid": "355ec5ee1be4969b34160e696b208860", "score": "0.68836397", "text": "public function isPersistent(): bool\n {\n return $this->persistent;\n }", "title": "" }, { "docid": "98731b252ec0bd46fb6e719cbcaa77d8", "score": "0.68716574", "text": "public function save(): bool\n {\n }", "title": "" }, { "docid": "62b62a45d97411e9c03c3cdbf4858506", "score": "0.6868133", "text": "protected function willSave($entry) {\n if (is_null($entry)) {\n return false;\n }\n\n $this->meta->isValidEntry($entry);\n\n if (isset($this->saveStack[$entry->getId()])) {\n return false;\n }\n\n $state = $entry->getEntryState();\n if ($state === Entry::STATE_CLEAN || $state === Entry::STATE_DELETED) {\n return false;\n }\n\n return $state;\n }", "title": "" }, { "docid": "77577b9581f12cb430358044abb9e693", "score": "0.6866165", "text": "function isDirty() {\n\t\treturn (bool) $this->dirty;\n\t}", "title": "" }, { "docid": "50ceb8cc47fe3d24d3f50a7918301294", "score": "0.68600166", "text": "public function isDirty(): bool\n {\n return $this->_isDirty;\n }", "title": "" }, { "docid": "4723a72dda6a33a9b8038c84126d0cca", "score": "0.68508995", "text": "public function save(): bool\n {\n $data = json_encode($this->getData());\n $bytes_written = file_put_contents($this->file_name, $data);\n\n return $bytes_written !== false;\n }", "title": "" }, { "docid": "a2bb2cde0ad40868c5cddd3c8480bcba", "score": "0.6846213", "text": "public function isDirty()\n {\n return $this->getCurrentContext()->isDirty();\n }", "title": "" }, { "docid": "eec37b58cf01a66fdb730c104cedfda8", "score": "0.68294775", "text": "public function save()\n {\n if ($this->validate()) {\n if ($this->isNewRecord()) {\n return $this->insert();\n } else {\n return $this->update();\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "c62ec24afaa8ae3742583248d0ac7b60", "score": "0.68223166", "text": "public function hasChanges () {\n return !!$this->dirty;\n }", "title": "" }, { "docid": "2ce3968c8b0e10156e5e54b113c12414", "score": "0.677361", "text": "final public function hasSuccessor()\n {\n return $this->objectSuccessor ? true : false;\n }", "title": "" }, { "docid": "029ee78b476a10917ea66e9ef0a2cbf9", "score": "0.6750183", "text": "public function save()\n {\n return false;\n }", "title": "" }, { "docid": "ac94716d1ff741ed67d3d3e371b47de8", "score": "0.6738541", "text": "final public function is_dirty()\n {\n return $this->_dirty;\n }", "title": "" }, { "docid": "d8b30777dcea97d5603edebb97223108", "score": "0.6706968", "text": "public function save()\n {\n $query = array();\n $values = array_values($this->dirty_fields);\n\n if (!$this->is_new) { // UPDATE\n // If there are no dirty values, do nothing\n if (count($values) == 0) {\n return true;\n }\n $query = $this->buildUpdate();\n $values[] = $this->id();\n } else { // INSERT\n $query = $this->buildInsert();\n }\n\n self::logQuery($query, $values);\n $statement = self::$database->prepare($query);\n $success = $statement->execute($values);\n\n // If we've just inserted a new record, set the ID of this object\n if ($this->is_new) {\n $this->is_new = false;\n if (is_null($this->id())) {\n $this->data[$this->getIdColumnName()] = self::$database->lastInsertId();\n }\n }\n\n $this->dirty_fields = array();\n return $success;\n }", "title": "" }, { "docid": "01052add8a4034783ab52c5978803c19", "score": "0.6706363", "text": "public function dirty(){\n return ($this->_dirtyKeys && count($this->_dirtyKeys) > 0);\n }", "title": "" }, { "docid": "ff7393b39cf88b91b4965d7e2036f694", "score": "0.66948175", "text": "public function isDirty(): bool;", "title": "" }, { "docid": "ff7393b39cf88b91b4965d7e2036f694", "score": "0.66948175", "text": "public function isDirty(): bool;", "title": "" }, { "docid": "ff7393b39cf88b91b4965d7e2036f694", "score": "0.66948175", "text": "public function isDirty(): bool;", "title": "" }, { "docid": "106d496ba6940c4b447119ccd455d374", "score": "0.6675935", "text": "public function isDirty()\n {\n return !empty($this->added) || !empty($this->removed);\n }", "title": "" }, { "docid": "d162920e2aa6b4f993007ad571423420", "score": "0.6666291", "text": "public function forceSaveCard()\n {\n return $this->methods[static::CODE]->getConfigData('allow_unsaved') ? false : true;\n }", "title": "" }, { "docid": "05e88f91882bd424dde16e6c44cf6aea", "score": "0.6655591", "text": "public function save(): bool\n {\n $data = json_encode($this->data);\n $file = file_put_contents($this->file_name, $data);\n\n if ($file === false) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "8fe7a92c18b5fd14bf13fae9aeee73ea", "score": "0.6654703", "text": "public function isDirty()\n {\n $o = $this->original;\n\n if (!$this->dirty) {\n foreach ($this->data as $key => $d) {\n if (//$d === null ||\n $d instanceof LazyInterface ||\n (array_key_exists($key, $o) && $o[$key] === $d)\n ) {\n continue;\n }\n $this->dirty = true;\n break;\n }\n }\n return (boolean)$this->dirty;\n }", "title": "" }, { "docid": "d37c72e5c5116d12d135a4d4833360e1", "score": "0.66443616", "text": "public function save()\n {\n if (!$this->_modified) {\n return true;\n }\n if (!empty($this->_eid) && !empty($this->_key)) {\n $st = $this->execute(\n 'INSERT INTO '. self::$prefix .'metadata \n (`eid`, `revisionid`, `key`, `value`, `created`, `ip`) \n VALUES \n (?, ?, ? ,?, ?, ?);',\n array(\n $this->_eid,\n $this->_revisionid,\n $this->_key,\n $this->_value,\n date('c'),\n $_SERVER['REMOTE_ADDR']\n )\n );\n\n if ($st === false) {\n return false;\n }\n } else {\n return false;\n }\n\n return $st;\n }", "title": "" }, { "docid": "c83e2b74fd7e3ba65cab856e06e85fe8", "score": "0.6635399", "text": "public function save() {\n // Invoke validation.\n if ($this->validate()) {\n // Save the entity.\n // Entity presave/update/insert hooks will be invoked by the entity API\n // controller.\n // @see hook_vinculum_received_presave()\n // @see hook_vinculum_received_insert()\n // @see hook_vinculum_received_update()\n return parent::save();\n }\n return FALSE;\n }", "title": "" }, { "docid": "a90bd9e49ff31d80d131fe751ce24db8", "score": "0.66342646", "text": "public function is_autosaving() {\n\t\treturn (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE);\n\t}", "title": "" }, { "docid": "6e07f548a1bd29fb8a3a782afb937e71", "score": "0.6615033", "text": "function save() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "823af1dc6085dc0b1387370c6fadf942", "score": "0.6609829", "text": "public function isPersistent()\n {\n return $this->root->isPersistent();\n }", "title": "" }, { "docid": "f32b6a80c3e5f4ced520563547b5976f", "score": "0.6596009", "text": "public function isPersistent(){}", "title": "" }, { "docid": "f32b6a80c3e5f4ced520563547b5976f", "score": "0.6596009", "text": "public function isPersistent(){}", "title": "" }, { "docid": "f32b6a80c3e5f4ced520563547b5976f", "score": "0.6596009", "text": "public function isPersistent(){}", "title": "" }, { "docid": "68e5aae2e586eb2f94acc00899306936", "score": "0.65840316", "text": "public function isDirty()\n {\n if (count($this) != $this->_original) {\n return true;\n }\n if (count($this->_deleted)) {\n return true;\n }\n foreach ($this as $model) {\n if (is_object($model)\n && ($model->isDirty() || $model->isNew())\n ) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "1d6870f8ee76fd28176c54152862a099", "score": "0.65747404", "text": "public function isPersistent() {\n\t\treturn hypeInbox()->config->getRuleset($this->msgType)->isPersistent();\n\t}", "title": "" }, { "docid": "4cbc017d352d2e29b312f0f91dc6a6b8", "score": "0.6568003", "text": "public function isDirty()\n {\n return $this->original != $this->properties;\n }", "title": "" }, { "docid": "ee4d13839a5d0193c248a4784987cf54", "score": "0.65552485", "text": "protected function beforeSave() {\n if (parent::beforeSave()) {\n if ($this->isNewRecord)\n $this->create_time = time();\n return true;\n }\n else\n return false;\n }", "title": "" }, { "docid": "2704fa5d99c242f88b30d39b20ed02b4", "score": "0.6547118", "text": "public function isChanged(): bool\n {\n return count($this->savePreview()) !== 0;\n }", "title": "" }, { "docid": "5b62ec669e34f48017f6bace615e8251", "score": "0.6499622", "text": "public function isSavedCard()\n {\n return isset($this->params['publicHash'])\n && !empty($this->params['publicHash'])\n && isset($this->params['cvv'])\n && !empty($this->params['cvv']);\n }", "title": "" }, { "docid": "a2711d3adf160b481723f14f7bca90ac", "score": "0.6498486", "text": "protected function beforeSave()\n\t{\n\t\tif(parent::beforeSave())\n\t\t{\n\t\t\tif($this->isNewRecord)\n\t\t\t{\n\t\t\t\t$this->create_time=$this->update_time=time();\n\t\t\t\t$this->author_id=Yii::app()->user->id;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->update_time=time();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "d90816f97f28a46da6ef85c5b4a63606", "score": "0.6489352", "text": "public function isNew(): bool\n {\n return $this->isNew;\n }", "title": "" }, { "docid": "d90816f97f28a46da6ef85c5b4a63606", "score": "0.6489352", "text": "public function isNew(): bool\n {\n return $this->isNew;\n }", "title": "" }, { "docid": "fdacefda3f3b7c1c2f95b7a880e0d90d", "score": "0.6483522", "text": "public function hasPendingChanges() {\r\n\t\tif (count($this->aSaveTasks) > 0) {\r\n\t\t\treturn (TRUE);\r\n\t\t}\r\n\t\treturn (FALSE);\r\n\t}", "title": "" }, { "docid": "9792945eb6836616b2898959b53ce1e4", "score": "0.6471953", "text": "public function isDirty(): bool\n {\n return count($this->getDirtyRawAttributes()) > 0;\n }", "title": "" }, { "docid": "fbf871e2d6d4e6c6e03bdc401febb333", "score": "0.6468743", "text": "public function hasDataChanges () {\n return !!$this->dataDirty;\n }", "title": "" }, { "docid": "7018b9a267ee343297e063fb1a4d46c9", "score": "0.64479923", "text": "function save()\n {\n if( $result = parent::save() )\n {\n $this->save_unrelayed_changes();\n }\n\n return $result;\n }", "title": "" }, { "docid": "aef8462598ffcd35a0164b40aa11f3cf", "score": "0.643131", "text": "function saveAll() {\n foreach ($this as $I)\n if (!$I->save())\n return false;\n return true;\n }", "title": "" }, { "docid": "2f37638e478e9b867f55c7511000dc77", "score": "0.6418067", "text": "public function save()\n\t\t{\n\t\t\t// Save generic stuff\n\t\t\tif (!parent::save())\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t// Now save specific stuff\n\t\t\treturn create_object_entity($this->get('guid'), $this->get('title'), $this->get('description'), $this->get('container_guid'));\n\t\t}", "title": "" }, { "docid": "c6dfb0c277784babaa6b50ba4f990ac5", "score": "0.64077586", "text": "protected function saveCache()\n\t{\n\t\tif (!$this->isWriteable() || parent::saveCache()) {\n\t\t\t$this->saveMemCache();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9ad6d5824dd5aa8c2883192196b51647", "score": "0.6405912", "text": "public function Save()\n\t{\n\t\t$q = DB::BuildSaveQuery($this, get_object_vars($this), false);\n\t\t$r = DB::Run($q);\n\t\tif (!$this->ID)\n\t\t\t$this->ID = mysql_insert_id();\n\t\treturn $r ? true : false;\n\t}", "title": "" }, { "docid": "2e13547df95cf144ab0aee3d37b40d0e", "score": "0.64006823", "text": "public function isNew()\n {\n return $this->_content['datas'] === FALSE;\n }", "title": "" }, { "docid": "23776ce4888d2a0f546f3e35ef6e9235", "score": "0.6381824", "text": "public function save(User $user)\n {\n return $this->hasPermission($user, 'save');\n }", "title": "" }, { "docid": "956d9f61911862993b20978ce256babc", "score": "0.6378943", "text": "public function isNew(): bool\n {\n return true;\n }", "title": "" }, { "docid": "76f465401bd594d5e57faeec925410b8", "score": "0.6375359", "text": "public function save()\n {\n foreach ($this->attributes as $key => $value) {\n if ($this->hasSetMutator($key)) {\n $this->attributes[$key] = $this->setAttribute($key, $value);\n }\n }\n if (!$this->exists) {\n $result = $this->performInsert();\n } else {\n $result = $this->performUpdate();\n }\n\n return $result->toArray()['@metadata']['statusCode'] === 200;\n }", "title": "" }, { "docid": "97d204b0094ac71c1c9c9177d2a428e7", "score": "0.63728213", "text": "public function beforeSave()\n {\n\t if (parent::beforeSave())\n\t {\n $this->created = date('Y-m-d',strtotime($this->created));\n \n return true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n }", "title": "" }, { "docid": "57923e213eab62b7e78d1a1e6f38b754", "score": "0.63722587", "text": "public function isDirty(){\n\n if (!$this->data) return true;\n\n $now = new \\DateTime('now');\n $timeout = new \\DateTime($this->data['last_refresh']);\n $timeout->add( new \\DateInterval(YTPlaylist::$RefreshInterval) );\n return ($now > $timeout);\n }", "title": "" }, { "docid": "86fb72b5baf028717e6c03a237bdf129", "score": "0.6370604", "text": "public function is_synced()\n {\n return (Bool)$this->isSynced;\n }", "title": "" } ]
2e0a94e7ebebe7cd8649d70c1a584965
Prepare a value for INI.
[ { "docid": "2ebdcda856fa359e1efcec33e774215d", "score": "0.47987574", "text": "protected function prepareValue($value)\n {\n if (is_int($value) || is_float($value)) {\n return $value;\n }\n\n if (is_bool($value)) {\n return $value ? 'true' : 'false';\n }\n\n if (false === strpos($value, '\"')) {\n return '\"' . $value . '\"';\n }\n\n throw new Exception\\RuntimeException('Value can not contain double quotes');\n }", "title": "" } ]
[ { "docid": "b2c54fdc893f3303bacd77a9034d0459", "score": "0.6059945", "text": "public static function prep_value($value)\r\n\t{\r\n\t\treturn static::$instance->prep_value($value);\r\n\t}", "title": "" }, { "docid": "d806862f37ee320ce48ef6cd663c5eeb", "score": "0.57789856", "text": "function prepareValue ($data)\n {\n }", "title": "" }, { "docid": "09faaeb0e67a62f96915e6b60cba524d", "score": "0.5585563", "text": "function prepare_value( $value, $field = null ) {\n return $value[0];\n }", "title": "" }, { "docid": "90f97148b6a643710155cd1e1e9213df", "score": "0.5375893", "text": "function prepareValue( $value ) {\r\n\t\t\r\n\t\tif( $this->TableLink->DBLink->statement )\r\n\t\t\treturn $value;\r\n\t\t\r\n\t\tif( is_string( $value ) && strlen( $value ) > 0 && $value{0} == '&' ) {\r\n\t\t\t$value = substr( $value,1 );\r\n\t\t\treturn $value;\r\n\t\t} else if( stristr( $this->columnType, 'int' ) ) {\r\n\t\t\treturn (int)$value;\r\n\t\t} else {\r\n\t\t\treturn '\\'' . $this->TableLink->escape( $value ) . '\\'';\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "175470fe8b933aedcbb6ed9eedab5e99", "score": "0.53329754", "text": "public function prepareFrontendValue($val)\r\n {\r\n return $val;\r\n }", "title": "" }, { "docid": "fcc190feea14f5d8b88624a14a2c1ca0", "score": "0.5327133", "text": "function jos_cfg_clean($a) {\n\tif($a['value']) {\n\n\t\treturn $value;\n\t}\n}", "title": "" }, { "docid": "1282b27622e916f6fbc8fc1af8143c63", "score": "0.52835107", "text": "public abstract function prepare_value($expr, $escape = NULL);", "title": "" }, { "docid": "e402b1c2ce1feea0e0a3d95a42e9d756", "score": "0.52698755", "text": "public static function convertIniShorthandValue($value)\n {\n $value = trim($value);\n $last = strtolower($value[strlen($value) - 1]);\n switch ($last) {\n //go from top to bottom and multiply every time\n case 'g':\n $value *= 1024;\n //no break multipliers\n case 'm':\n $value *= 1024;\n //no break multipliers\n case 'k':\n $value *= 1024;\n }\n\n return $value;\n }", "title": "" }, { "docid": "be41f9e89a945eff32a2c94d7da1dab1", "score": "0.52281046", "text": "private function prepareValue($value)\n {\n if (is_string($value)) {\n $string = strtolower($value);\n\n switch ($string) {\n case 'true':\n case 'yes':\n return true;\n case 'false':\n case 'no':\n return false;\n default:\n return $value;\n }\n }\n\n return $value;\n }", "title": "" }, { "docid": "bbe3d3998649f04986bc38167c8a2b49", "score": "0.5215709", "text": "public function setSearchIn($value) {\n\t\tif($value !== NULL && $value != self::SEARCHIN_TITLE && $value != self::SEARCHIN_URL) {\n\t\t\t$value = self::SEARCHIN_ANY;\n\t\t}\n\t\t$this->paramValues[self::PARAM_SEARCHIN] = $value;\n\t}", "title": "" }, { "docid": "7799306271c9914e6fa939d0c5435145", "score": "0.50481355", "text": "abstract protected function prepareVars();", "title": "" }, { "docid": "5250669db397d6d605480b57f7400999", "score": "0.5045662", "text": "public function realizeValue($value);", "title": "" }, { "docid": "3d3359b464a090c039874f14895392a3", "score": "0.50323284", "text": "function Option_Value($value)\n {\n return preg_replace('/\"/',\"\",$value);\n\n }", "title": "" }, { "docid": "ffd1b15e9689a213ab0ebd022f893e14", "score": "0.5006498", "text": "public function prepareVars()\n {\n $this->vars['inputType'] = $this->pattern;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['table'] = $this->table;\n $this->vars['model'] = $this->model;\n $this->vars['value'] = $this->getLoadValue();\n }", "title": "" }, { "docid": "573ed15429481d3f19621e5526f942c5", "score": "0.49460623", "text": "function pre_value($pre_value) {\n if (substr($pre_value, 0, 1) != \"\\n\") {\n $pre_value = \"\\n\" . $pre_value;\n }\n if (substr($pre_value, -1) != \"\\n\") {\n $pre_value = $pre_value . \"\\n\";\n }\n $this->pre_value = $pre_value;\n }", "title": "" }, { "docid": "34224449cd7db9ba9ddbe75eb3006cf3", "score": "0.49392962", "text": "private static function prepareDbValues(&$item){\n\t\t$extra_obj = new Extra();\n\t\t$item = \"'\".$extra_obj->escape($item).\"'\";\n\t}", "title": "" }, { "docid": "41c91869a1f862380cf8b1a9082e2ddd", "score": "0.4930679", "text": "public function setASINPrepInstructions($value)\n {\n if ( !$this->_isNumericArray($value)) {\n $value = [ $value ];\n }\n $this->_fields['ASINPrepInstructions']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "233ce89fe0827bbfe793649138c7c461", "score": "0.49256453", "text": "protected static function prepareValue($value)\n {\n return trim($value, \" \\t\\n\\r\\0\\x0B\");\n }", "title": "" }, { "docid": "6626009f84d9d3d382f5a3d22b319b3f", "score": "0.49214", "text": "public function setASINPrepInstructions($value)\n {\n if (!$this->_isNumericArray($value)) {\n $value = array ($value);\n }\n $this->_fields['ASINPrepInstructions']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "c16e8121cffe1aecc8a85652eee6f115", "score": "0.48986927", "text": "public function transformValueToParameter($value);", "title": "" }, { "docid": "d069fb431e81e6d7b09bf0d3be3edef2", "score": "0.48750228", "text": "function __construct($value) {\n if ($value != self::PARAM_LANGUAGE_BG && $value != self::PARAM_LANGUAGE_EN ) {\n $this->_value = self::PARAM_LANGUAGE_BG;\n } else {\n $this->_value = $value;\n }\n }", "title": "" }, { "docid": "e18ddfd2a350e14624e68091bdc509d1", "score": "0.48443696", "text": "function set_hammerOID_config_option($config_name, $value) {\n// include_once($config['base_path'] . '/lib/functions.php');\n// cacti_log('hammerOID - setting config option: '.$config_name.' value: '.$value);\n db_execute_prepared('REPLACE INTO hammerOID_settings SET name = ?, value = ?', array($config_name, $value));\n}", "title": "" }, { "docid": "c43b95708cdc51d27ad8e0e07cf826ef", "score": "0.48182684", "text": "function getValueSetValue($ind) { /* {{{ */\n\t\tif(strlen($this->_valueset) > 1) {\n\t\t\t$tmp = explode($this->_valueset[0], substr($this->_valueset, 1));\n\t\t\tif(isset($tmp[$ind]))\n\t\t\t\treturn trim($tmp[$ind]);\n\t\t\telse\n\t\t\t\treturn false;\n\t\t} else\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "9cd1ea0ea3c6b1d5a3048eb477f59b0c", "score": "0.47691524", "text": "protected function sanitize_value( $value ) {\n\t\treturn ( wpo_is_option( $value ) ) ? $value->get() : $value;\n\t}", "title": "" }, { "docid": "985bd65c76d476bf9c4f66447505d7b3", "score": "0.47642282", "text": "function set_extra_values_as_string($extra_values) {\n \t$this->extra_values = array();\n \t\n \t\t$extra_values = explode(\"\\n\", $extra_values);\n \t\tforeach($extra_values as $value) {\n \t\t\tif(strpos($value, \"=\")) {\n \t\t\t\t$parts = explode(\"=\", $value);\n \t\t\t\t$this->extra_values[$parts[0]] = trim($parts[1]);\n \t\t\t}\n \t\t}\n }", "title": "" }, { "docid": "a57682cd31ae2378d0534c9ab62e713a", "score": "0.4758823", "text": "private function process_name_value($line) {\r\n\r\n\t\t$line_split = explode(\"=\",$line);\r\n\t\t$name = trim($line_split[0]);\r\n\t\t$value = trim($line_split[1]);\r\n\r\n\t\t$this->config_array[$name]=$this->process_value($value);\r\n\t}", "title": "" }, { "docid": "7e94f385c3630c0d0a51bcf4bfd9f4e8", "score": "0.47514823", "text": "protected function prepareFilterVal($value)\n\t{\n\t\t$values = $this->getSubOptionValues();\n\t\t$labels = $this->getSubOptionLabels();\n\t\tfor ($i = 0; $i < count($labels); $i++)\n\t\t{\n\t\t\tif (JString::strtolower($labels[$i]) == JString::strtolower($value))\n\t\t\t{\n\t\t\t\treturn $values[$i];\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "c1312316520f620f08cf15c81480c853", "score": "0.47332418", "text": "protected function initValueField()\n {\n $this->arValueList = array_get($this->arImportData, 'value');\n array_forget($this->arImportData, 'value');\n }", "title": "" }, { "docid": "cd21a95f4d3101f6845ed628352f98a1", "score": "0.47310653", "text": "protected function _filterParam($value) {\n if (is_array($value)) foreach($value as $key => $val) $this->params[$value[$key] = self::PREFIX. ++self::$count] = $val;\n else if (is_string($value)){\n $this->params[$ph = self::PREFIX. ++self::$count] = $value;\n $value = $ph;\n }\n return $value;\n }", "title": "" }, { "docid": "72c823357171b12345a090553526dd26", "score": "0.46931708", "text": "public function __construct($_val) {\t//!< Constructs the object from the static text.\n\t\t$this->value=$_val;\n\t}", "title": "" }, { "docid": "66a2936b5cded0e263ca4ba052cab9fa", "score": "0.46862042", "text": "private function _prepareData($key, $value, $data = array ()){\n\t\tswitch($key){\n\t\t\tcase 'extension_txt_id':\n\t\t\t\t$value = strtolower(preformatTextID($value));\n\t\t\t\tbreak;\n\t\t\tcase 'copy_default':\n\t\t\t\t$value = in_array($data['extension_type'], array ('template', 'language')) && $value == 1 ? true : false;\n\t\t\t\tbreak;\n\t\t\tcase 'header_comment':\n\t\t\t\t$value = trim($value);\n\t\t\t\t$value = ltrim($value, \"<?php\\n\");\n\n\t\t\t\t$value = str_replace(\"\\n\\nif (! defined ( 'DIR_CORE' )) {\\nheader ( 'Location: static_pages/' );\\n}\\n\\n\", '', $value);\n\t\t\t\t$value = trim($value);\n\n\t\t\t\t$value = str_replace(array ('<?php', '?>'), '', $value);\n\t\t\t\tif ($value){\n\t\t\t\t\tif (substr($value, 0, 2) != '/*'){\n\t\t\t\t\t\t$value = '/*' . $value;\n\t\t\t\t\t}\n\t\t\t\t\tif (substr($value, -2) != '*/'){\n\t\t\t\t\t\t$value = $value . '*/';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'extension_admin_language_files':\n\t\t\tcase 'extension_storefront_language_files':\n\t\t\t\tforeach ($value as &$val){\n\t\t\t\t\t$val = strtolower($val);\n\t\t\t\t}\n\t\t\t\tunset($val);\n\t\t\t\tbreak;\n\t\t\tcase 'hook_file':\n\t\t\t\t$value = trim($value);\n\t\t\t\tif ($value){\n\t\t\t\t\t$value = substr($value, -4) != '.php' ? $value . '.php' : $value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "4b60252f3d8733eefbaf518c6833eca1", "score": "0.46776733", "text": "static function getConfigValueAttr( $value ) {\n\t\tif ( ! empty( $value ) ) {\n\t\t\treturn \"value='$value'\";\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "4e23376b90792faa39dff3fe66956870", "score": "0.46656576", "text": "abstract public function replace_value($value);", "title": "" }, { "docid": "c4e2f062b6472f8e9fd546a6e3471cf8", "score": "0.46645328", "text": "function plugin_sanitize_settings($input) {\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "7f2f2fa1564ba422526b0f1760436e4c", "score": "0.46430904", "text": "function my_set_value($field = '', $input) {\n\t\t$CI = & get_instance();\n\n\t\tif ($CI->input->post()) {\n\t\t\treturn set_value($field, $input, true);\n\t\t} else {\n\n\t\t\treturn html_entity_decode($input);\n\t\t}\n\t}", "title": "" }, { "docid": "d449e49bea158b024e18c48308553248", "score": "0.46216464", "text": "function setBibid($value) {\n $this->_bibid = trim($value);\n }", "title": "" }, { "docid": "566fc320bbac3c5b47705371771787fb", "score": "0.4620894", "text": "function prepareFilterVal( $val )\r\n\t{\r\n\t\t$element =& $this->getElement();\r\n\t\t$arVals = explode( \"|\", $element->sub_values );\r\n\t\t$arTxt \t= explode( \"|\", $element->sub_labels );\r\n\t\tfor ($i=0; $i<count($arTxt); $i++) {\r\n\t\t\tif (strtolower( $arTxt[$i] ) == strtolower( $val )) {\r\n\t\t\t\t$val = $arVals[$i];\r\n\t\t\t\treturn $val;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $val;\r\n\t}", "title": "" }, { "docid": "36d9a5ecd45f2eb53084124e03a528e9", "score": "0.461686", "text": "static public function insertRequestParam($key,$value){\tself::setREQUEST($key,$value);\t}", "title": "" }, { "docid": "592b0d29694a6530414e10717a708db8", "score": "0.45944977", "text": "public function SQLPrep($value) {\n\t\treturn (string) $value;\n\t}", "title": "" }, { "docid": "79a270b48b5a4ef02ac027d562fb4b37", "score": "0.45935458", "text": "function wrtToUserconfig($varName,$value)\n{\n\t$value=strval($value);\n//\techo $varName.'=\"'.$value.'\"';\n//\t$shell_exec_ret=exec('cardmount rw');\n\t$file=\"/boot/userconfig.txt\";\n\t$pattern='/'.$varName.'=\\\".*\\\"/';\n\t$content=file_get_contents($file);\n\t$content=preg_replace($pattern, $varName.'=\"'.$value.'\"', $content);\n\tfile_put_contents($file, $content);\n//\t$shell_exec_ret=exec('cardmount ro');\n}", "title": "" }, { "docid": "b5b9bf6fba8b1be1c30dd3afcf75bbb3", "score": "0.45897067", "text": "public function withValue(string $value);", "title": "" }, { "docid": "b5cc2d9bc8fa9b4b2966256a9d00923f", "score": "0.4584841", "text": "function setInitParam($tname,$tvalue){\r\n \r\n\t\t$trimName= strtolower(str_replace(\" \",\"\",$tname));\r\n $this->JSC[$trimName]=$tvalue;\r\n\r\n\t }", "title": "" }, { "docid": "e19e5e6cf9f7be4081f6e067dd8eb67b", "score": "0.45755607", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "e19e5e6cf9f7be4081f6e067dd8eb67b", "score": "0.45755607", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "050ea25ab927c113b81c77a8f927df11", "score": "0.45739588", "text": "public function in($value) {\n return $this->_('id', $value)->_('name', $value);\n }", "title": "" }, { "docid": "ffbcec2d7522f7806e767bb70691ec35", "score": "0.45598954", "text": "function setValue( $value );", "title": "" }, { "docid": "7c0a32aaf511857cd7572c44be15fa03", "score": "0.45530123", "text": "public function prepValueFromPost($value)\n {\n return $value;\n }", "title": "" }, { "docid": "caf848c9d29fcbbd447192d2a861797e", "score": "0.4550441", "text": "protected function resolveConstraintValue($value) {\n\t\tif ($value === NULL) {\n\t\t\tthrow new Exception\\CannotResolveConstraintValue(1448552781);\n\t\t}\n\n\t\t// if not already a parameter\n\t\tif ($value[0] !== ':') {\n\t\t\t$specialValue = strtoupper($value);\n\t\t\tif (in_array($specialValue, $this->specialValues, TRUE)) {\n\t\t\t\t// special values can be function-names or e.g. NULL\n\t\t\t\treturn $specialValue;\n\t\t\t}\n\t\t\t// not a special value or a parameter, means it needs to converted to one\n\t\t\t$parameterKey = ':AutoConstraintParameter' . $this->parameterCount++;\n\t\t\t$this->addParameters[$parameterKey] = $value;\n\t\t\treturn $parameterKey;\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "c29ce4bb64c75e2368a620dc2dcab621", "score": "0.45501858", "text": "public function __construct($value)\n {\n $this->raw_value = $value;\n }", "title": "" }, { "docid": "2b0cd4411b9af1c4cc40f5f7f2871bfc", "score": "0.4546988", "text": "function setValue($value)\n\t{\n\t\t$tmp=(is_string($value) ? $value : $value . \"\");\n\t\t$this->da[\"value\"]=$tmp;\n\t}", "title": "" }, { "docid": "7c8c64bb19cdb8ce07317d2386571baf", "score": "0.45459008", "text": "function setSetting( $name, $value, $uname ){\n if ($uname==\"\") $uname=\"ebm\";\n\tdb_exec( \"INSERT OR REPLACE INTO settings VALUES (?,?,?);\", array( $name, $value, $uname ) );\n return $value;\n}", "title": "" }, { "docid": "bbc78cbe60a3892813dedbe91ce24402", "score": "0.45384288", "text": "abstract protected function getInitialValueField();", "title": "" }, { "docid": "192f44ff91ecffbf42ec0113c11be8a6", "score": "0.4535193", "text": "function cot_config_import($name, $source = 'POST', $filter = 'NOC', $defvalue = null)\n{\n\tglobal $cot_import_filters;\n\n\tif (!$name) {\n return null;\n }\n\tif (!is_array($name)) {\n\t\t$name = array($name);\n\t\t$single_value = true;\n\t}\n\t$res = array();\n\tforeach ($name as $idx => $var_name) {\n\t\t$filter_type = (is_array($filter)) ? ($filter[$var_name] ? $filter[$var_name] : ($filter[$idx] ? $filter[$idx] : 'NOC')) : $filter;\n\n\t\t$not_filtered = cot_import($var_name, $source, 'NOC');\n\t\t$value = cot_import($var_name, $source, $filter_type);\n\t\t// addition filtering by varname\n\t\tif (\n !empty($cot_import_filters[$var_name]) &&\n is_array($cot_import_filters[$var_name]) &&\n sizeof($cot_import_filters[$var_name])\n ) {\n\t\t\t$value = cot_import($value, 'DIRECT', $var_name);\n\t\t}\n\n\t\t// if invalid value is used\n\t\tif (is_null($value)) {\n\t\t\t$value_to_show = (in_array($filter_type, array('INT', 'NUM', 'TXT', 'ALP')))\n\t\t\t\t? htmlspecialchars(cot_cutstring(strip_tags($not_filtered), 15))\n\t\t\t\t: '';\n\t\t\tlist($field_title) = cot_config_titles($var_name);\n\t\t\t$error_msg = cot_rc('adm_invalid_input', array('value' => $value_to_show, 'field_name' => $field_title));\n\t\t\tif (!is_null($defvalue)) {\n\t\t\t\t$value = !is_array($defvalue) ? $defvalue : (isset($defvalue[$var_name]) ? $defvalue[$var_name] : (isset($defvalue[$idx]) ? $defvalue[$idx] : null));\n\t\t\t\t$error_msg .= $value_to_show ? '. '.cot_rc('adm_set_default', htmlspecialchars(strip_tags($value))) : '';\n\t\t\t}\n\t\t\tcot_message($error_msg, 'error', $var_name);\n\t\t}\n\t\t$res[$var_name] = $value;\n\t}\n\treturn $single_value ? $value : $res;\n}", "title": "" }, { "docid": "ff0e573cbb7b7caeace5c3c7cec4573f", "score": "0.45339996", "text": "public function setValueId($vi){\n\t\t$this->valueId = $vi;\n\t}", "title": "" }, { "docid": "d1f253f68e9fd0538c8f1b3ea71755e1", "score": "0.45336485", "text": "function prepareInputForAdd($input) {\n if (!self::getNumberOfServers()) {\n $input['is_default'] = 1;\n }\n\n if (isset($input[\"rootdn_passwd\"]) && !empty($input[\"rootdn_passwd\"])) {\n $input[\"rootdn_passwd\"] = Toolbox::sodiumEncrypt(stripslashes($input[\"rootdn_passwd\"]));\n }\n\n return $input;\n }", "title": "" }, { "docid": "a0ab5402522944c17c05cfd652ba2aac", "score": "0.4532023", "text": "public function setASIN($value)\n {\n $this->_fields['ASIN']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "a0ab5402522944c17c05cfd652ba2aac", "score": "0.4532023", "text": "public function setASIN($value)\n {\n $this->_fields['ASIN']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "af6f3c33e12fce017e4979ee80e4626f", "score": "0.45189518", "text": "public function __construct($value){\n\t\t$this->value = is_string($value) ? $value : $value->value;\n\t}", "title": "" }, { "docid": "a1422b2f857a9e84910514d4743446b3", "score": "0.451858", "text": "function fn_settings_wizard_prepare_args($args, $haystack)\n{\n foreach ($args as $arg_id => $arg_data) {\n if (strpos($arg_data, '%') === 0) {\n $var_name = str_replace('%', '', $arg_data);\n if (isset($haystack[$var_name])) {\n $args[$arg_id] = $haystack[$var_name];\n } else {\n $args[$arg_id] = null;\n }\n }\n }\n\n return $args;\n}", "title": "" }, { "docid": "da0f0dfb55b0be82c81306c753dc02ec", "score": "0.4517867", "text": "function ip_config_value ($what)\n{\n\tglobal $db_prefix;\n\treturn session_param ($db_prefix.'_'.$what);\n}", "title": "" }, { "docid": "44cc8f69ad0fa7da7413020c8148a683", "score": "0.45142758", "text": "function ifnset($getName, $defaultValue){\n\treturn isset($_GET[$getName]) ? trim($_GET[$getName]) : $defaultValue;\n}", "title": "" }, { "docid": "0911ecdf983bcaff155ca7f0eb1d357b", "score": "0.45121393", "text": "public function setDynamicValue($value) {\n\t\tif (!$value) {\n\t\t\treturn;\n\t\t}\n\n\t\t$currentValue = $this->getValue();\n\t\tif ($value === array()) {\n\t\t\tnotify_user_error(\"You made a mistake, writing a dynamic value <code class='r hljs'>\" . h($currentValue) . \"</code> that returns an element of length 0. The most common reason for this is to e.g. refer to data that does not exist, e.g. misspell an item. Valid values need to have a length of one.\", \" There are programming problems related to zero-length dynamic values in this survey.\");\n\t\t\t$this->openCPU_errors[$value] = _('Incorrectly defined value (zero length).');\n\t\t\t$this->alwaysInvalid();\n\t\t\t$value = null;\n\t\t} elseif ($value === null) {\n\t\t\tnotify_user_error(\"You made a mistake, writing a dynamic value <code class='r hljs'>\" . h($currentValue) . \"</code> that returns NA (missing). The most common reason for this is to e.g. refer to data that is not yet set, i.e. referring to questions that haven't been answered yet. To circumvent this, add a showif to your item, checking whether the item is answered yet using is.na(). Valid values need to have a length of one.\", \" There are programming problems related to null dynamic values in this survey.\");\n\t\t\t$this->openCPU_errors[$value] = _('Incorrectly defined value (null).');\n\t\t\t$this->alwaysInvalid();\n\t\t} elseif (is_array($value) && array_key_exists(0, $value)) {\n\t\t\t$value = $value[0];\n\t\t}\n\n\t\t$this->input_attributes['value'] = $value;\n\t}", "title": "" }, { "docid": "321844d80fa8e48441c3a15fc44e20e1", "score": "0.4509753", "text": "public function preProcess($value)\n\t{\n\t\tif (is_string($value)) {\n\t\t\t$value = explode(',', $value);\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "b451c23adf65493d0cef6558a7f3dcd6", "score": "0.44981894", "text": "function level_omega_preprocess_user_profile_item(&$variables) {\n if ($variables['value'] == NULL) {\n $variables['value'] = \"N/A\";\n } \n}", "title": "" }, { "docid": "1332e3a39add395ce8d666474ce809a4", "score": "0.44968918", "text": "protected final function __construct($value)\n\t{\n\t $this->value = (string)$value;\n\t}", "title": "" }, { "docid": "8af3eb6e25a42549f1b9c059fdbbcfc7", "score": "0.44944686", "text": "private function get_prepare_type($value){\n switch (gettype($value)) {\n case 'string':\n return 's';\n case 'integer':\n return 'i';\n case 'double':\n return 'd';\n }\n }", "title": "" }, { "docid": "ddea085dce073ba292381ace4cbd2ce0", "score": "0.44904032", "text": "protected function prepareForValidation()\n {\n if ($this->has('code')) {\n $this->merge(['code' => strtoupper($this->input('code'))]);\n }\n }", "title": "" }, { "docid": "82ee5b1a2477d18c4c55cfa688a2ef70", "score": "0.44825974", "text": "public function __construct($value) {\n\t\t$this->value = $value;\n $this->getString();\n\t}", "title": "" }, { "docid": "82866ed1010d5a2838fe05a0db8f3211", "score": "0.44781446", "text": "protected function prepareForValidation()\n {\n $this->merge([\n 'numero' => str_replace(\"-\", \"\", $this->numero),\n ]);\n }", "title": "" }, { "docid": "e9635129784f8cdef58c1c1b726375d8", "score": "0.44748044", "text": "function fu_Obtener_Ini_Valor($key)\n{\n global $filename;\n $array_ini = parse_ini_file($filename);\n $value = '';\n \n if(is_array($array_ini) && array_key_exists($key, $array_ini))\n {\n $value = $array_ini[$key]; \n } \n \n return $value;\n}", "title": "" }, { "docid": "e1c663a7ad58270a79915b0bd2ba65c8", "score": "0.4472765", "text": "public function setinstitutionName($value) {\n if (! is_object ( $this->_root ))\n $this->_root = &$this->readConfig ( '', 'XML' );\n $Settings = & $this->_root->getItem ( \"section\", \"Settings\" );\n //Now onto the directive node\n $SettingsDirective = & $Settings->getItem ( \"directive\", \"KEWL_INSTITUTION_NAME\" );\n //finally save value\n $SettingsDirective->setContent ( $value );\n $bool = $this->_objPearConfig->writeConfig ();\n return $bool;\n // KEWL_INSTITUTION_NAME;\n }", "title": "" }, { "docid": "18fb781e036d70b65bb8ac2fd3976f52", "score": "0.44698593", "text": "protected function prepareConditionalSqlValue(&$value, $operator)\n {\n // Is this neccessary?\n if ($operator === DFieldSearch::OPERATOR_LIKE) {\n $value = addcslashes($value, '\\\\');\n }\n if (($operator === DFieldSearch::OPERATOR_IN\n || $operator === DFieldSearch::OPERATOR_NOT_IN)\n ) {\n $value = (array)$value;\n }\n // Escape and quote the value.\n $value = DQuery::escapeValue($value, true);\n }", "title": "" }, { "docid": "8f64b69c8d71f70c8bc4ab0dee05121b", "score": "0.44645956", "text": "public static function prepareSectionName($value) {\n\t\treturn html_entity_decode($GLOBALS['LANG']->getLL($value));\n\t}", "title": "" }, { "docid": "5c86adee33999102c4d5a9be77365859", "score": "0.44586304", "text": "function to_config($value) {\n return $value;\n }", "title": "" }, { "docid": "aa33e0213211b1ebb12aa1ee4fa01d51", "score": "0.44472003", "text": "protected function createValueFromInput($inputValue)\n {\n if (is_string($inputValue)) {\n $inputValue = new Value($inputValue);\n }\n\n return $inputValue;\n }", "title": "" }, { "docid": "96835e7d62c7222cf3f3b45d032fa582", "score": "0.4443519", "text": "function mysql_prep($value)\n {\n $magic_quotes=get_magic_quotes_gpc();\n\t $new_enough=function_exists(\"mysql_real_escape_string\");\n\t if($new_enough)\n\t {\n\t if($magic_quotes){$value=stripslashes($value);}\n\t $value=mysql_real_escape_string($value);\n\t }\n\t else\n\t {\n\t if(!$magic_quotes){$value=addslashes($value);};\n\t }\n\t return $value;\n\t }", "title": "" }, { "docid": "742fe24c4b25bf97a41c44bb7be3b5ca", "score": "0.44433546", "text": "function mysql_prep($value)\n\t{\n\t\t//provjera da li su aktivni magic_quotes\n\t\t$magic_quotes_active= get_magic_quotes_gpc();\n\t\t$enough_php = function_exists(\"mysql_real_escape_string\");\n\n\t\tif($enough_php) //ukoliko je verzija php-a iznad v4.3.0\n\t\t{\n\t\t\t//ponisti efekte magic_quotes-a kako bi funkcija \n\t\t\t//mysql_real_escape_string mogla raditi\n\t\t\tif($magic_quotes_active)\n\t\t\t{\n\t\t\t\t$value=stripslashes($value);\n\t\t\t}\n\t\t\t$value=mysql_real_escape_string($value);\n\t\t}else //ukoliko je verzija php-a ispod v4.3.0\n\t\t{\n\t\t\t//ukoliko magic_quotes nisu vec aktivni dodaj slash rucno\n\t\t\tif(!$magic_quotes_active) { $value=addslashes($value);}\n\t\t\t// ako magic_quotes nisu aktivni onda slash-evi vec postoje\n\t\t}\n\t\treturn $value;\n\t\t\t\n\t}", "title": "" }, { "docid": "ce2fb009207b1807353c0f30d1969ced", "score": "0.4437348", "text": "private function _prepareInteger($value)\n\t{\n\t\treturn (string) ($value >= 0 ? '+' . $value : $value);\n\t}", "title": "" }, { "docid": "af5755d85daf370baf8be027aab0f04d", "score": "0.4437147", "text": "function createCustomValue(){\n\n // sanitize\n $this->id=htmlspecialchars(strip_tags($this->id));\n $this->type=htmlspecialchars(strip_tags($this->type));\n $this->id_conf=htmlspecialchars(strip_tags($this->id_conf));\n $this->value=htmlspecialchars(strip_tags($this->value));\n \n $this->table_value=$tableArrayByType.$this->type.$this->table_value;\n $this->key_conf=$tableArrayByType.$this->type.$this->key_conf;\n\n // query to insert record\n $query = \"INSERT INTO\n \" . $this->table_value . \"\n SET\n \" . $this->key_conf . \" = :id_conf\n id=:id, value=:value\";\n \n // prepare query\n $stmt = $this->conn->prepare($query);\n \n // bind values\n $stmt->bindParam(\":id\", $this->id);\n $stmt->bindParam(\":id_conf\", $this->id_conf);\n $stmt->bindParam(\":value\", $this->value);\n \n // execute query\n if($stmt->execute()){\n return true;\n }\n \n return false;\n\n }", "title": "" }, { "docid": "79eeabc91ea43b664059797aa4f868ad", "score": "0.44368583", "text": "public function __construct($value, $setting);", "title": "" }, { "docid": "c831e8e60bfd225da3ac85d0a96c9391", "score": "0.44349548", "text": "public function setIpnAttribute($value)\n {\n $this->attributes['ipn'] = serialize($value);\n }", "title": "" }, { "docid": "d10b0c1c8c1ca7a0a049a085c0e690bd", "score": "0.4426223", "text": "private static function _normalize_form_args( $name, $value ) {\n return $value;\n }", "title": "" }, { "docid": "faccdc34e23a1c79a7f1f89e9f7adbe8", "score": "0.44183248", "text": "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new File(self::FILE_CONFIG);\n\n $match = $file->replace_lines(\"/^$key\\s+/\", \"$key $value\\n\");\n\n if ($match === 0) {\n $match = $file->replace_lines(\"/^#$key\\s+/\", \"$key $value\\n\");\n if ($match === 0)\n $file->add_lines(\"$key = $value\\n\");\n }\n\n $this->is_loaded = FALSE;\n }", "title": "" }, { "docid": "2862caf0209440afee9404ed868ef53c", "score": "0.44175282", "text": "private function getParameterIfFormattedOrDefault($value)\n {\n if (!\\is_string($value)) {\n return $value;\n }\n\n return $this->hasParameterFormat($value)\n ? new Parameter(trim($value, '%'))\n : $value;\n }", "title": "" }, { "docid": "73ccfe6189560f3d92ccb91cddc84aaf", "score": "0.4408699", "text": "public function translateFancyValues($inKey, $inValue)\n\t{\n\t\treturn($inValue);\n\t}", "title": "" }, { "docid": "05e9eedfff31b10dcb9162702fde7ddf", "score": "0.4404626", "text": "private function prepare()\n {foreach ($this->values as $key => $vlr) {$this->JPDO->bindParam(\":\" . $key, $this->values[$key], PDO::PARAM_STR);}}", "title": "" }, { "docid": "5f0baab64aa74deee41e544ba816b52e", "score": "0.44023994", "text": "public function prepareVars()\n {\n $this->prepareBlocks();\n $this->vars['placeholder'] = $this->placeholder;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->vars['toolSettings'] = e(json_encode($this->toolSettings));\n $this->vars['scripts'] = $this->scripts;\n }", "title": "" }, { "docid": "050e904dbb38e1fee88fafc096c20f25", "score": "0.44018394", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $this->project = $this->vars['project'] = $this->controller->vars['formModel'];\n\n $this->vars['options'] = $this->getOptions();\n }", "title": "" }, { "docid": "3b11a25aecb705f7f649d1ba5311f62c", "score": "0.4401493", "text": "public function GetValuePreparedForQuery($val)\n\t{\n\t\t$val = parent::GetValuePreparedForQuery($val);\n\t\treturn htmlspecialchars_decode($val);\n\t}", "title": "" }, { "docid": "230388d87d95406c751740fb2995a2a6", "score": "0.43943113", "text": "protected function getInitValue()\r\n\t{\r\n\t\treturn 1;\r\n\t}", "title": "" }, { "docid": "ad4acb714d5df332ff0100a0b44a6cf5", "score": "0.43828222", "text": "function general_convert( $section, $value_field = '', $value = '' ) {\n\n\tglobal $data_conv;\n\n\t# Note we're returning the string FALSE so we can see it in the db.\n\tif ( ! isset( $data_conv[$section] ) ) return 'FALSE';\n\n\t$value_field = ( empty( $value_field ) )\n\t\t? 'value'\n\t\t: $value_field;\n\n\t# Lookup\n\tforeach ( $data_conv[$section] as $key => $entry ) {\n\t\tif ( $entry['id'] == $value ) {\n\t\t\treturn strtolower($entry[ $value_field ]);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8b3d6bd5b5c3a6443a948d2f07e950b2", "score": "0.4379312", "text": "private function process_config_line($line) {\r\n\t\t$line = trim($line);\r\n\r\n\t\t// blank\r\n\t\tif ($line==\"\") {\r\n\t\t\treturn;\r\n\r\n\t\t// comment\r\n\t\t} elseif (substr($line,0,1)==$this->comment_marker) {\r\n\t\t\treturn;\r\n\r\n\t\t// actual value\r\n\t\t} else {\r\n\t\t\t$this->process_name_value($line);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dad20a5e6c7399fa555aa589bf4ff4ec", "score": "0.43694252", "text": "function format_value_for_input( $value, $field = null ) {\n return $value;\n }", "title": "" }, { "docid": "dff512298097336b6aa831f049227487", "score": "0.43583655", "text": "protected function _set_parameter($key, $value)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new File(self::FILE_CONFIG);\n\n $match = $file->replace_lines(\"/^$key\\s+/\", \"$key $value\\n\");\n\n if ($match === 0) {\n $match = $file->replace_lines(\"/^#\\s*$key\\s+/\", \"$key $value\\n\");\n if ($match === 0)\n $file->add_lines(\"$key = $value\\n\");\n }\n\n $this->is_loaded = FALSE;\n }", "title": "" }, { "docid": "5bde67ad2878674a6f98964aae4a4f23", "score": "0.43554142", "text": "function request_input_value( $field ) {\r\n\tif ( isset($_REQUEST[ $field ]) && !empty($_REQUEST[ $field ]) ) {\r\n\t\t?>value=\"<?= $_REQUEST[$field]; ?>\"<?\r\n\t}\r\n}", "title": "" }, { "docid": "e81496d48430fda12f1ef3214d52aa8f", "score": "0.43538547", "text": "function mysql_prep($value)\n\t{\n\t\t$magic_quote_active = get_magic_quotes_gpc();\n\t\t$new_enough_php = function_exists(\"mysql_real_escape_string\");\n\t\tif($new_enough_php)\n\t\t{\n\t\t\tif($magic_quote_active)\n\t\t\t{\n\t\t\t\t$value = stripslashes($value);\n\t\t\t}\n\t\t\t$value = mysql_real_escape_string($value);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(!$magic_quote_active)\n\t\t\t{\n\t\t\t\t$value=addslashes($value);\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "458da3b1e661a471f05e377f4c8ce6a4", "score": "0.43524987", "text": "function configpath_to_value($configpath, $institution)\n{\n\tglobal $config;\n\n\t$c = $config;\n\n\tforeach ( $configpath as $a )\n\t{\n\t\tif ($a == '$ID') { $a = $institution; }\n\t\t$c = $c[$a];\n\t}\n\n\treturn $c;\n}", "title": "" }, { "docid": "2a846a80f89c0943f6907af22319b1d8", "score": "0.43489268", "text": "function lnVarPrepForStore()\r\n{\r\n $resarray = array();\r\n foreach (func_get_args() as $ourvar) {\r\n\r\n // Prepare var\r\n if (!get_magic_quotes_runtime()) {\r\n $ourvar = addslashes($ourvar);\r\n }\r\n\r\n // Add to array\r\n array_push($resarray, $ourvar);\r\n }\r\n\r\n // Return vars\r\n if (func_num_args() == 1) {\r\n return $resarray[0];\r\n } else {\r\n return $resarray;\r\n }\r\n}", "title": "" }, { "docid": "1158995b8a617132c74e02ded58618a5", "score": "0.43487254", "text": "function setOrEmpty($inp){\n\tif (empty($inp)){\n\t\treturn \"EMPTY\";\n\t}\n\telseif (isset($inp)){\n\t\treturn \"SET\";\n\t}\n}", "title": "" }, { "docid": "07fcedb226126d0ca3dea86df2406c74", "score": "0.43460283", "text": "public function from($value);", "title": "" } ]
94fcc7fbaea0c24a9b15c268fdc9be64
WordPress pre 4.5 we need to make sure that uicore|widget|mouse are loaded before sortable.
[ { "docid": "debf1454bc5c288126c258007a50130f", "score": "0.73514", "text": "function fl_before_sortable_enqueue_callback() {\n\n\tif ( version_compare( get_bloginfo( 'version' ), '4.5', '<' ) ) {\n\t\twp_deregister_script( 'jquery-ui-widget' );\n\t\twp_deregister_script( 'jquery-ui-mouse' );\n\t\twp_deregister_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-core', site_url( '/wp-includes/js/jquery/ui/core.min.js' ), array( 'jquery' ), '1.8.12' );\n\t\twp_enqueue_script( 'jquery-ui-widget', site_url( '/wp-includes/js/jquery/ui/widget.min.js' ), array( 'jquery' ), '1.8.12' );\n\t\twp_enqueue_script( 'jquery-ui-mouse', site_url( '/wp-includes/js/jquery/ui/mouse.min.js' ), array( 'jquery' ), '1.8.12' );\n\t}\n}", "title": "" } ]
[ { "docid": "ae42aacfcb84c3b75b2a65b03e0fee2b", "score": "0.7472995", "text": "function init_sortable_widgets(){\n add_action( 'admin_enqueue_scripts', array( $this, '_sortable_widgets_js' ) );\n add_action( 'admin_head', array( $this, '_admin_css' ) );\n }", "title": "" }, { "docid": "94f239fcca5f2a5025a8b58afb6b9bd0", "score": "0.6870318", "text": "function _sortable_widgets_js(){\n wp_enqueue_script('ww-sortable-widgets',\n WW_PLUGIN_URL.'admin/js/sortable-widgets.js',\n array('jquery-ui-core', 'jquery-ui-sortable', 'wp-util'),\n WW_SCRIPT_VERSION,\n true);\n $data = $this->_json_data();\n wp_localize_script( 'ww-sortable-widgets', 'WidgetWrangler', array('l10n_print_after' => 'WidgetWrangler = '.$data.';') );\t\n }", "title": "" }, { "docid": "95479e93e56e604bf57d02d925a8c6ca", "score": "0.63210225", "text": "function click_sortable() {\n if (empty($this->definition['click sortable'])) {\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "073049155b457d0c4ef754eb217a0626", "score": "0.6276744", "text": "function cp_ajax_sortable_js() {\n?>\n<script type=\"text/javascript\" >\njQuery(document).ready(function($) {\n\n\t// Return a helper with preserved width of cells\n\tvar fixHelper = function(e, ui) {\n\t\tui.children().each(function() {\n\t\t\t$(this).width($(this).width());\n\t\t\t//ui.placeholder.html('<!--[if IE]><td>&nbsp;</td><![endif]-->');\n\t\t});\n\t\treturn ui;\n\t};\n\n\t$(\"tbody.sortable\").sortable({\n\t\thelper: fixHelper,\n\t\topacity: 0.7,\n\t\tcursor: 'move',\n\t\t// connectWith: 'table.widefat tbody',\n\t\tplaceholder: 'ui-placeholder',\n\t\tforcePlaceholderSize: true,\n\t\titems: 'tr',\n\t\tupdate: function() {\n\t\t\tvar results = $(\"tbody.sortable\").sortable(\"toArray\"); // pass in the array of row ids based off each tr css id\n\n\t\t\tvar data = { // pass in the action\n\t\t\taction: 'cp_ajax_update',\n\t\t\trowarray: results\n\t\t\t};\n\n\t\t\t$(\"span#loading\").html('<i class=\"fa fa-cog fa-spin fa-fw\"></i>');\n\t\t\t$.post(ajaxurl, data, function(theResponse){\n\t\t\t\t$(\"span#loading\").html(theResponse);\n\t\t\t});\n\t\t}\n\t}).disableSelection();\n\n\n});\n\n</script>\n<?php\n}", "title": "" }, { "docid": "d3c2bcb81b9d6c8ba1fdf695c98fae23", "score": "0.6224657", "text": "abstract protected function set_sortable();", "title": "" }, { "docid": "fb28ddb44a7f082aa65a60ad9f70f6a5", "score": "0.61819714", "text": "function load_lambda_jquery_ui_core() {\r\n\r\n\twp_enqueue_script( 'jquery-ui' );\r\n\twp_enqueue_script( 'jquery-ui-widget' );\r\n\twp_enqueue_script( 'jquery-ui-sortable' );\r\n\twp_enqueue_script( 'jquery-ui-selectable' );\r\n wp_enqueue_script('jquery-ui-sortable');\r\n\twp_enqueue_script( 'jquery-ui-dialog' );\r\n\t\r\n}", "title": "" }, { "docid": "9d58c2e585636386289567da54a5e3f6", "score": "0.6178062", "text": "function admin_init()\n\t{\n\t\tif( is_admin() ) {\n\t\t\t// Load only if in a Post or Page Manager\t\n\t\t\tif ('edit.php' == basename($_SERVER['PHP_SELF'])) {\n\t\t\t\t//wp_enqueue_script('jquery-ui-sortable');\n\t\t\t\twp_enqueue_script('thickbox');\n\t\t\t\twp_enqueue_style('thickbox');\n\t\t\t\twp_enqueue_style( 'mtheme-photostory-sorter-CSS', plugin_dir_url( __FILE__ ) . '/css/style.css', false, '1.0', 'all' );\n\t\t\t\tif ( isSet($_GET[\"page\"]) ) {\n\t\t\t\t\tif ( $_GET[\"page\"] == \"photostory-post-sorter.php\" ) {\n\t\t\t\t\t\twp_enqueue_script(\"post-sorter-JS\", plugin_dir_url( __FILE__ ) . \"js/post-sorter.js\", array( 'jquery' ), \"1.0\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c6fdc3c1bb45ad427e6245ef7b3f785d", "score": "0.59545416", "text": "function _sortable_widgets_meta_box($post = NULL){\n\t$sortable = new WW_Admin_Sortable();\n\tprint $sortable->box_wrapper( $this->ww->page_widgets );\n }", "title": "" }, { "docid": "9a19f0609a131768f5317edf925adfca", "score": "0.5929888", "text": "function wp_maybe_load_widgets() {\n\t/**\n\t * Filter whether to load the Widgets library.\n\t *\n\t * Passing a falsey value to the filter will effectively short-circuit\n\t * the Widgets library from loading.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param bool $wp_maybe_load_widgets Whether to load the Widgets library.\n\t * Default true.\n\t */\n\tif ( ! apply_filters( 'load_default_widgets', true ) ) {\n\t\treturn;\n\t}\n\n\trequire_once( ABSPATH . WPINC . '/default-widgets.php' );\n\n\tadd_action( '_admin_menu', 'wp_widgets_add_menu' );\n}", "title": "" }, { "docid": "9a19f0609a131768f5317edf925adfca", "score": "0.5929888", "text": "function wp_maybe_load_widgets() {\n\t/**\n\t * Filter whether to load the Widgets library.\n\t *\n\t * Passing a falsey value to the filter will effectively short-circuit\n\t * the Widgets library from loading.\n\t *\n\t * @since 2.8.0\n\t *\n\t * @param bool $wp_maybe_load_widgets Whether to load the Widgets library.\n\t * Default true.\n\t */\n\tif ( ! apply_filters( 'load_default_widgets', true ) ) {\n\t\treturn;\n\t}\n\n\trequire_once( ABSPATH . WPINC . '/default-widgets.php' );\n\n\tadd_action( '_admin_menu', 'wp_widgets_add_menu' );\n}", "title": "" }, { "docid": "fee67f6f1fa3be88e19e17374e65b03b", "score": "0.57871974", "text": "function pilau_admin_interface_init() {\n\t//remove_filter( 'pre_user_description', 'wp_filter_kses' );\n\n\t/* Disable captions */\n\t//add_filter( 'disable_captions', '__return_true' );\n\n\t/* Disable post format UI\n\t * @link\thttp://wordpress.org/extend/plugins/disable-post-format-ui/\n\t */\n\tadd_filter( 'enable_post_format_ui', '__return_false' );\n\n\t/* Set up inline hints for image sizes */\n\t//add_filter( 'admin_post_thumbnail_html', 'pilau_inline_image_size_featured', 10, 2 );\n\n\t/* Customize list columns\n\t *\n\t * For the most part these should be handled by the Codepress Admin Columns plugin.\n\t * Include any necessary overrides here.\n\t */\n\tadd_filter( 'manage_edit-post_columns', 'pilau_admin_columns', 100000, 1 );\n\tadd_filter( 'manage_edit-page_columns', 'pilau_admin_columns', 100000, 1 );\n\tforeach ( get_post_types( array( 'public' => true ), 'names' ) as $pt ) {\n\t\tadd_filter( 'manage_' . $pt . '_posts_columns', 'pilau_admin_columns', 100000, 1 );\n\t}\n\n}", "title": "" }, { "docid": "47ab66d350197acc62237d15397d051f", "score": "0.5766269", "text": "function gantry_widgets_admin_page_init()\n{\n\tglobal $pagenow;\n\tif ($pagenow == \"widgets.php\") {\n\t\tadd_action(\"admin_notices\", 'gantry_widgets_admin_insert_override_header', 100);\n\t\tif (isset($_REQUEST['override_id'])) {\n\t\t\tadd_action('widgets_admin_page', 'gantry_widgets_admin_add_filter_for_sidebar_title');\n\t\t\tadd_action('sidebar_admin_setup', 'gantry_widgets_admin_add_page_title_filter');\n\t\t\tadd_action('register_sidebar', 'gantry_widgets_admin_add_checkbox_to_sidebars');\n\t\t\tadd_filter('sidebars_widgets', 'gantry_widget_admin_combined_sidebars_widgets_filter', -10000);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d4e3e20fa6b12094da7907c3e34af6cc", "score": "0.57293105", "text": "private function hooks(){\r\n\t\t// add_action( 'widgets_init', array( $this, 'include_widgets' ), 20 ); # After Div Library (10)\r\n\t\tadd_action( 'init', array( $this, 'init' ), 0 );\r\n\t}", "title": "" }, { "docid": "21bc6f324e387f94035fb9aec9561f90", "score": "0.56784207", "text": "function videogallery_admin_init() {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_register_script( 'videogallery_jscss', plugins_url( 'admin/js/admin.min.js', __FILE__ ) );\n\t\twp_enqueue_script( 'videogallery_jscss' );\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\twp_register_style( 'videogallery_css1', plugins_url( 'admin/css/adminsettings.min.css', __FILE__ ) );\n\t\twp_enqueue_style( 'videogallery_css1' );\n}", "title": "" }, { "docid": "c844634ad98f9c5c67a0a61ad9410e23", "score": "0.5669687", "text": "public function isSortable()\n {\n return ($this->hasTemplate('yaSortable') || $this->hasTemplate('Sortable'));\n }", "title": "" }, { "docid": "85e52e64b2f3c61671eb22a0819a683a", "score": "0.5656421", "text": "public function admin_head(){\n\t\twp_register_script('wp_html5_category_selector', WP_PLUGIN_URL . '/wp-html5-category-selector/wp-html5-category-selector.js', false, false, true);\n\t\twp_register_style('wp_html5_category_selector', WP_PLUGIN_URL . '/wp-html5-category-selector/admin.css');\n\t\t\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('wp_html5_category_selector');\n\t\twp_enqueue_style('wp_html5_category_selector');\n\t}", "title": "" }, { "docid": "85c6cb3790d3924688c4ab45f6c64c16", "score": "0.5623583", "text": "function layout_elements_callback( $al_post ) {\n\n\t\t$this->setup_layout_elements();\n\t\t//container for blank LE's\n\t\t?>\n\t\t<h2>Available</h2>\n\t\t<div class=\"ae-sortable source\" style=\"min-height: 20px;\">\n\t\t<?php\n\t\t// render one each of blank LEs for users to drag into into active area\n\t\tforeach ( $this->_layout_elements as $layout_element ) {\n\t\t\t$layout_element->form_container( array() );\n\t\t}\n\t\t// container for active LE's\n\t\t?>\n\t\t</div>\n\t\t<h2>Active</h2>\n\t\t<div class=\"ae-sortable target\" style=\"min-height: 40px; border: 1px dashed #999;\">\n\t\t\t<div class=\"placeholder\">Drop here to activate.</div>\n\t\t\t<?php\n\t\t\t// render any active LEs\n\n\t\t\t?>\n\t\t</div>\n\t\t<?php\nwp_enqueue_script( 'jquery-ui-droppable' );\t\t\n?><script>\n\tjQuery(function(){\n\t\tjQuery( \".ae-sortable .widget\" ).draggable({\n\t\t\tappendTo: \"body\",\n\t\t\thelper: \"clone\"\n\t\t});\n\t\tjQuery( \".ae-sortable.target\" ).css('background','#f00;').droppable({\n\t\t\tactiveClass: \"ui-state-default\",\n\t\t\thoverClass: \"ui-state-hover\",\n\t\t\taccept: \":not(.ui-sortable-helper)\",\n\t\t\tdrop: function( event, ui ) {\n\t\t\t\tjQuery( this ).find( \".placeholder\" ).remove();\n\t\t\t\tjQuery( \"<div class=\\\"widget\\\"></div>\" ).html( ui.draggable.html() ).appendTo( this );\n\t\t\t}\n\t\t})\n\t\t.sortable({\n\t\t\titems: \".widget\",\n\t\t\tsort: function() {\n\t\t\t\t// gets added unintentionally by droppable interacting with sortable\n\t\t\t\t// using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options\n\t\t\t\tjQuery( this ).removeClass( \"ui-state-default\" );\n\t\t\t}\n\t\t});\n\n\t\tjQuery('.ae-sortable.target').click(function(e){\n\t\t\t//console.log(e);\n\t\t\t//console.log(jQuery(e.target).parent().siblings('.widget-inside'));\n\t\t\tjQuery(e.target).parents('.widget-top').siblings('.widget-inside').toggle();\n\t\t\treturn false;\n\t\t});\n\t/*\tjQuery('.ae-sortable').sortable({\n\t\t\tconnectWith: \".ae-sortable\",\n\t\t\tplaceholder: \"ui-state-highlight\"\n\t\t});*/\n\t});\n</script>\n<style>\n\t.ae-sortable.source .widget {display:inline;margin:3px;}\n\t.ae-sortable.source .ui-state-highlight,\n\t.ae-sortable.source .widget-top,\n\t.ae-sortable.source .widget-title,\n\t.ae-sortable.source .widget-title h4 {display:inline}\n\t.ae-sortable.source .widget-title-action {display:none}\n\t.ui-state-highlight {min-height: 20px; background: #999;}\n</style>\n\t<?php\n\t}", "title": "" }, { "docid": "ff75af59cfc66c0287924c0a3d446ae7", "score": "0.5594721", "text": "function dschool_widgets() {\n\t\t//require_if_theme_supports( 'widget-featured-articles', DSCHOOL_DIR . '/widgets/featured-articles.php' );\n\t\n\t}", "title": "" }, { "docid": "7edce59e622522787904e74f08e59ca6", "score": "0.55924165", "text": "function wpseo_initialize_admin_bar()\n {\n }", "title": "" }, { "docid": "200dd67c06969afc6c8d7862d9d16c40", "score": "0.55811197", "text": "public function load_plugin()\n\t{\n\t\tif ($this->type)\n\t\t{\n\t\t\tadd_action('admin_print_scripts', array(&$this, 'admin_scripts'));\n\t\t\tadd_action('admin_print_styles', array(&$this, 'admin_styles'));\n\t\t}\n\t\tadd_action('wp_ajax_wpa_pagination', array(&$this, 'pagination'));\n\t}", "title": "" }, { "docid": "4147a4a436bd53842a858d991ef45901", "score": "0.5566781", "text": "function njimedia_init(){\n include_once( plugin_dir_path( __FILE__ ) . 'nji-configs/nji-admin-utilities.php' );\n // add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );\n add_action( 'pre_get_posts', 'njimedia_pre_get_posts_hook' );\n}", "title": "" }, { "docid": "acc34ab7368fc9e0cf07e7fc9dd815db", "score": "0.555251", "text": "public function plugins_loaded() {\n\n\t\t\tif ( WPS\\is_doing_ajax() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->remove_allowed_tags();\n\n\t\t\tadd_action( 'add_meta_boxes', array( $this, 'reset_excert_metabox' ), 10 );\n\n\t\t\t// Yoast WP SEO.\n\t\t\tadd_filter( 'wpseo_metabox_prio', array( $this, 'wpseo_metabox_priority' ) );\n\t\t\tif ( ! WPS\\is_plugin_active( 'remove-yoast-seo-comments/remove-yoast-seo-comments.php' ) && ! is_admin() ) {\n\t\t\t\tadd_action( 'wp_head', array( $this, 'remove_yoast_comments' ), ~PHP_INT_MAX );\n\t\t\t}\n\n\t\t\t// RCP.\n\t\t\tadd_action( 'rcp_metabox_priority', array( $this, 'rcp_metabox_priority' ) );\n\n\t\t\t// Envira Gallery.\n\t\t\tadd_action( 'envira_gallery_loaded', array( $this, 'envira_gallery_loaded' ), 9999 );\n\n\t\t\t// Soliloquy.\n\t\t\tadd_action( 'soliloquy_init', array( $this, 'soliloquy_init' ), 9999 );\n\n\t\t\t// Remove version numbering.\n\t\t\tadd_filter( 'script_loader_src', array( $this, 'remove_wp_version_strings' ) );\n\t\t\tadd_filter( 'style_loader_src', array( $this, 'remove_wp_version_strings' ) );\n\n\t\t}", "title": "" }, { "docid": "af61543c027449a415b4767e49a2c0b9", "score": "0.55506355", "text": "public function pluginsLoaded() {\n\n\t\t\tadd_action( 'restrict_manage_posts', array($this,'eventsFilter') );\n\n\t\t\tif( class_exists( 'Tribe__Events__Main' ) and defined( 'RHPTRIBE_ACTIVE' ) ) {\n\t\t\t\tadd_action( 'manage_edit-'.Tribe__Events__Main::POSTTYPE.'_columns', array($this,'removeColumns'), 100, 1 );\n\t\t\t\tadd_action( 'manage_edit-'.Tribe__Events__Main::POSTTYPE.'_sortable_columns', array($this,'removeColumns'), 100, 1 );\n\t\t\t\tadd_action( 'manage_'.Tribe__Events__Main::POSTTYPE.'_posts_columns', array($this,'removeColumns'), 100, 1 );\n\n\t\t\t\tadd_filter( 'posts_orderby', array($this,'sortOrder'), 5, 2 );\n\t\t\t\tadd_filter( 'posts_where', array($this,'sortWhere'), 500, 2 );\n\n\n\t\t\t\t// Skip filtering if needed\n\t\t\t\tif( is_admin() and $_SERVER['SCRIPT_NAME'] == '/wp-admin/edit.php' and isset( $_GET['post_type'] ) and $_GET['post_type'] == Tribe__Events__Main::POSTTYPE ) {\n\n\t\t\t\t\t// Bulk Requests\n\t\t\t\t\tif( isset( $_GET['bulk_edit'] ) and !empty( $_GET['bulk_edit'] ) ) {\n\t\t\t\t\t\t$this->skipFilter = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Viewing trash\n\t\t\t\t\tif( isset( $_GET['post_status'] ) and $_GET['post_status'] == 'trash' ) {\n\t\t\t\t\t\t$this->skipFilter = true;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "998a04fdb93c93ae7717162307c18ace", "score": "0.5549238", "text": "function loadSorting()\r\n{\r\n require_once 'manipulation/sorting.php';\r\n}", "title": "" }, { "docid": "d1830104d82123e9cdefb7c12262dacd", "score": "0.5546388", "text": "function import_widgets() {\r\n do_action('foodbakery_import_widgets', $this);\r\n }", "title": "" }, { "docid": "0fffd45b9b9bb79b3021e25dd9245937", "score": "0.55320174", "text": "function of_load_only() {\n\n\t\n\twp_enqueue_script('jquery-ui-core');\n\twp_enqueue_script('jquery-ui-sortable');\n\twp_enqueue_script('jquery-ui-slider');\n\twp_enqueue_script('jquery-ui-button');\n\t\n\t// Needed for image upload\n\twp_enqueue_script('media-upload');\n\twp_enqueue_script('thickbox');\n\t\n\t\n\twp_register_script('jquery-input-mask', ADMIN_MASTER_ADMIN_DIR .'js/jquery.maskedinput-1.2.2.js', array( 'jquery' ));\n\twp_enqueue_script('jquery-input-mask');\n\twp_enqueue_script('jquery-ui-datepicker');\n\twp_enqueue_script('color-picker', ADMIN_MASTER_ADMIN_DIR .'js/colorpicker.js', array('jquery'));\n\twp_enqueue_script('time-picker', ADMIN_MASTER_ADMIN_DIR .'js/jquery.timepicker.min.js', array('jquery'));\n\twp_enqueue_script('ajaxupload', ADMIN_MASTER_ADMIN_DIR .'js/ajaxupload.js', array('jquery'));\n\twp_enqueue_script('cookie', ADMIN_MASTER_ADMIN_DIR . '/js/jquery.cookie.js', 'jquery');\n\twp_enqueue_script('tipsy', ADMIN_MASTER_ADMIN_DIR . '/js/jquery.tipsy.js', 'jquery');\n\twp_enqueue_script('asmselect', ADMIN_MASTER_ADMIN_DIR . '/js/jquery.asmselect.js', 'jquery');\n\twp_enqueue_script('zn-admin-scripts', ADMIN_MASTER_ADMIN_DIR . '/js/zn-admin-scripts.js', 'jquery');\n\twp_enqueue_script('zn-ajax-options', ADMIN_MASTER_ADMIN_DIR . '/js/zn-ajax-options.js', 'jquery');\n\t\t// Registers custom scripts for the Media Library AJAX uploader.\n}", "title": "" }, { "docid": "f4ca239a64ee20a6b849ddcefc92664e", "score": "0.5504631", "text": "static function sidebar_admin_setup() {\n\t\tglobal $wp_registered_widget_controls;\n\t\n\t\tforeach ($wp_registered_widget_controls as $widget_id => $options) {\n\t\t\tif (is_array($options['callback'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$wp_registered_widget_controls[$widget_id]['_params'] = $wp_registered_widget_controls[$widget_id]['params'];\n\t\t\t$wp_registered_widget_controls[$widget_id]['_callback'] = $wp_registered_widget_controls[$widget_id]['callback'];\n\t\t\t$wp_registered_widget_controls[$widget_id]['params'] = $widget_id;\n\t\t\t$wp_registered_widget_controls[$widget_id]['callback'] = array(__CLASS__, 'intercept');\n\t\t}\n\t}", "title": "" }, { "docid": "96ddd33e1d0b4c59642a750edd7d58d6", "score": "0.5502723", "text": "function noizetier_jqueryui_forcer($plugins){\n\t$plugins[] = \"jquery.ui.core\";\n\t$plugins[] = \"jquery.ui.widget\";\n\t$plugins[] = \"jquery.ui.mouse\";\n\t$plugins[] = \"jquery.ui.sortable\";\n\treturn $plugins;\n}", "title": "" }, { "docid": "b8cc6475af9c17ad7c958e631311e5df", "score": "0.5501062", "text": "private function init_hooks() {\r\n\t\tadd_action( 'admin_menu', array( $this, 'admin_menu' ), 60 );\r\n\t\tadd_filter( 'plugin_action_links_' . WPDUI_BASENAME\t, array( $this, 'plugin_action_links' ) );\r\n\t}", "title": "" }, { "docid": "fb6fecea0a45511f1fea5aacc02e8ae5", "score": "0.54932684", "text": "function yz_public_scripts() {\r\n\r\n // Get Data.\r\n $jquery = array( 'jquery' );\r\n $extra_args = array( 'jquery-ui-sortable', 'jquery-ui-draggable' );\r\n\r\n // Youzer Global Script\r\n wp_enqueue_script( 'youzer', YZ_PA . 'js/youzer.min.js', $jquery, YZ_Version, true );\r\n\r\n wp_enqueue_style( 'yz-opensans', 'https://fonts.googleapis.com/css?family=Open+Sans:400,600', array(), YZ_Version );\r\n\r\n // Youzer Css.\r\n wp_enqueue_style( 'youzer', YZ_PA . 'css/youzer.min.css', array(), YZ_Version );\r\n\r\n // Get Youzer Script Variables\r\n $youzer_vars = youzer_scripts_vars();\r\n\r\n if ( ! is_user_logged_in() ) {\r\n $youzer_vars['ajax_enabled'] = yz_options( 'yz_enable_ajax_login' );\r\n $youzer_vars['login_popup'] = yz_options( 'yz_enable_login_popup' );\r\n }\r\n\r\n wp_localize_script( 'youzer', 'Youzer', $youzer_vars );\r\n\r\n // Tag Editor Script\r\n wp_register_script( 'yz-scrolltotop', YZ_PA .'js/yz-scrolltotop.min.js', $jquery, YZ_Version, true );\r\n\r\n // Call Fonts.\r\n wp_enqueue_style( 'yz-roboto', 'https://fonts.googleapis.com/css?family=Roboto:400', array(), YZ_Version );\r\n wp_enqueue_style( 'yz-lato', 'https://fonts.googleapis.com/css?family=Lato:400', array(), YZ_Version );\r\n\r\n // Wall Form Uploader CSS.\r\n wp_register_style( 'yz-bp-uploader', YZ_PA . 'css/yz-bp-uploader.min.css', array(), YZ_Version );\r\n\r\n // Headers Css\r\n wp_enqueue_style( 'yz-headers', YZ_PA . 'css/yz-headers.min.css', array(), YZ_Version );\r\n\r\n // Profile Css.\r\n wp_register_style( 'yz-profile', YZ_PA . 'css/yz-profile-style.min.css', array(), YZ_Version );\r\n \r\n // Get Plugin Scheme.\r\n $youzer_scheme = yz_options( 'yz_profile_scheme' );\r\n\r\n // Profile Color Schemes Css.f\r\n wp_enqueue_style( 'yz-scheme', YZ_PA . 'css/schemes/' . $youzer_scheme .'.min.css', array(), YZ_Version );\r\n\r\n // Group Pages CSS\r\n if ( bp_is_groups_component() && ! bp_is_groups_directory() ) {\r\n wp_enqueue_style( 'yz-groups', YZ_PA .'css/yz-groups.min.css', array( 'yz-bp-uploader' ), YZ_Version );\r\n }\r\n \r\n // Member Pages CSS\r\n if ( ! bp_is_members_directory() && ! bp_is_groups_directory() ) {\r\n wp_enqueue_style( 'yz-social', YZ_PA .'css/yz-social.min.css', array( 'dashicons' ), YZ_Version );\r\n }\r\n\r\n // Members & Groups Directories CSS\r\n if ( bp_is_members_directory() || bp_is_groups_directory() ) {\r\n wp_enqueue_script( 'masonry' );\r\n wp_enqueue_style( 'yz-directories', YZ_PA . 'css/yz-directories.min.css', array( 'dashicons' ), YZ_Version );\r\n wp_enqueue_script( 'yz-directories', YZ_PA .'js/yz-directories.min.js', $jquery, YZ_Version, true );\r\n }\r\n \r\n if ( bp_current_component() ) {\r\n yz_common_scripts();\r\n }\r\n\r\n\r\n if ( bp_is_messages_conversation() || bp_is_messages_compose_screen() ) {\r\n wp_enqueue_script( 'yz-messages', YZ_PA .'js/yz-messages.min.js', $jquery, YZ_Version, true );\r\n }\r\n \r\n\r\n // Global Youzer JS\r\n wp_enqueue_style( 'yz-icons' );\r\n\r\n}", "title": "" }, { "docid": "2fe5589897aac561ac1cb3da98a1abe6", "score": "0.5485374", "text": "function wpseo_admin_init()\n {\n }", "title": "" }, { "docid": "d823828c0d4337a1eeb3ec7e24b3c0d8", "score": "0.5478997", "text": "private function define_admin_hooks() {\n\n\t\t$plugin_social \t\t\t= Social_Links::get_instance();\n\t\t$plugin_category \t\t\t= CategoryAcf::get_instance();\n\t\t$plugin_cpt_listings \t\t= PostTypeListings::get_instance();\n\t\t$plugin_tax_service \t\t= TaxonomyService::get_instance();\n\t\t$plugin_tax_municipality \t= TaxonomyMunicipality::get_instance();\n\t\t$plugin_tax_country \t\t= TaxonomyCountry::get_instance();\n\n\t\t$this->loader->add_action( 'admin_menu', $plugin_social, 'add_plugin_page' );\n\t\t$this->loader->add_action( 'admin_init', $plugin_social, 'page_init' );\n\t\t$this->loader->add_action( 'init', $plugin_cpt_listings, 'create_cpt' );\n\t\t$this->loader->add_action( 'init', $plugin_tax_service, 'create_tax' );\n\t\t$this->loader->add_action( 'init', $plugin_tax_country, 'create_tax' );\n\t\t$this->loader->add_action( 'init', $plugin_tax_municipality, 'create_tax' );\n\t\t\n\t}", "title": "" }, { "docid": "5b1f2500bb06b7ccc5d987015b9a714d", "score": "0.54680574", "text": "static function init() {\r\n global $wpdb;\r\n\r\n if (!$wpdb->get_var(\"show tables like 'bb_posts'\")) {\r\n return;\r\n }\r\n\r\n add_action('wp_crm_user_loaded', array('WPC_BB_Press', 'wp_crm_user_loaded'));\r\n\r\n add_filter('wp_crm_overview_columns', array('WPC_BB_Press', 'wp_crm_overview_columns'));\r\n add_filter('wp_crm_overview_cell', array('WPC_BB_Press', 'wp_crm_overview_cell'), 10, 2);\r\n }", "title": "" }, { "docid": "635359edb735086ebaebfd1f27e56e97", "score": "0.54646605", "text": "function contact_jqueryui_forcer($plugins){\n\t$plugins[] = \"jquery.ui.core\";\n\t$plugins[] = \"jquery.ui.widget\";\n\t$plugins[] = \"jquery.ui.mouse\";\n\t$plugins[] = \"jquery.ui.sortable\";\n\treturn $plugins;\n}", "title": "" }, { "docid": "20c48fd5d864f0dc80107c0c1839d90e", "score": "0.54609764", "text": "public function init() {\n\n\t\t\t// Widgets.\n\t\t\tif ( ! empty( $this->widgets ) ) {\n\t\t\t\tadd_action( 'widgets_init', array( $this, 'remove_default_wp_widgets' ), 15 );\n\t\t\t}\n\n\t\t\t// Dashboard.\n\t\t\tif ( ! empty( $this->dashboard ) ) {\n\t\t\t\tadd_action( 'admin_menu', array( $this, 'remove_dashboard_widgets' ), 11 );\n\t\t\t}\n\n\t\t\t// Admin Menu Items.\n\t\t\tif ( ! empty( $this->menu ) ) {\n\t\t\t\tadd_action( 'admin_menu', array( $this, 'remove_admin_menus' ), 11 );\n\t\t\t}\n\n\t\t\t// Admin Bar.\n\t\t\tif ( ! empty( $this->admin_bar ) ) {\n\t\t\t\tadd_action( 'wp_before_admin_bar_render', array( $this, 'remove_admin_bar_items' ) );\n\t\t\t}\n\n\t\t\t// Links.\n\t\t\tif ( ! empty( $this->links ) ) {\n\t\t\t\tadd_action( 'plugins_loaded', array( $this, 'remove_links' ) );\n\t\t\t}\n\n\t\t\tadd_action( 'plugins_loaded', array( $this, 'plugins_loaded' ), 99 );\n\n\t\t}", "title": "" }, { "docid": "cd8b88bbcb332669fc021ad769f2e1e2", "score": "0.54583526", "text": "static function td_init() {\r\n //add_filter('the_content', array(__CLASS__, 'hook_the_content'), 5, 2);\r\n //add_filter('td_part_page_home_slider', array(__CLASS__, 'hook_the_content'), 5, 2); //also hook parts/page-homepage-slider.php - the slider is called before the content\r\n\r\n add_filter('td_wp_booster_after_header', array(__CLASS__, 'hook_td_wp_booster_after_header'));\r\n\r\n add_filter('td_wp_boost_new_module', array(__CLASS__, 'hook_td_wp_boost_new_module'), 5, 2);\r\n\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "fe02f07db973d1e78c42883108b61be4", "score": "0.5451907", "text": "public function load_dependencies_support() {\n\t\t\trequire_once( 'woo-includes/woo-functions.php' );\n\t\t}", "title": "" }, { "docid": "5acb23ef2aba9af3d63874e00a4fe35c", "score": "0.54336387", "text": "function sith() { \n\t\t\t\tglobal $BF;\n\t\t\t\tinclude($BF .'components/list/sortlistjs.php');\n\t\t\t}", "title": "" }, { "docid": "c99c652fadc44c0d056ee81d6dda7a45", "score": "0.542098", "text": "public static function load_wp()\n\t{\n\t\tglobal $wp_taxonomies, $_wp_submenu_nopriv, $wp_local_package, $wp_registered_sidebars, $wp_version, $wp_dashboard_sidebars, $wp_user_roles, $wpdb, $wp_scripts;\n\t\tglobal $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks;\n\t\tglobal $wp_roles, $wp_registered_widget_controls, $wp_db_version, $_wp_admin_css_colors, $wp_http_referer, $_wp_real_parent_file, $admin_page_hooks, $taxonomy;\n\t\tglobal $menu, $submenu, $parent_file, $submenu_file, $current_user, $unique_filename_callback, $link, $cat_id, $action, $tag, $comment, $comment_status, $allowedposttags;\n\t\tglobal $pagenow, $user_email, $type, $post_mime_type, $tab, $revision, $diff, $left, $right, $listtag, $body_id, $user_id, $plugin_page, $tableposts;\n\t\tglobal $query_string, $posts, $post, $request, $more, $single, $post_ID, $temp_ID, $link_id, $tinymce_version, $manifest_version, $author_name, $author;\n\t\tglobal $file, $plugin_page, $mode, $user_identity, $sidebars_widgets, $in_comment_loop, $title, $is_trash, $required_php_version, $required_mysql_version;\n\t\tglobal $wp_embed, $theme, $text_direction, $wp_queries, $table_prefix, $wp_widget_factory, $wp;\n\t\tglobal $is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE, $is_apache, $is_IIS, $is_iis7, $base, $blogname, $blog_title, $errors, $domain, $path, $multipage, $numpages, $page;\n\t\tglobal $wp_the_query, $wp_query, $wp_rewrite, $wp_locale, $allowedtags, $_wp_nav_menu_max_depth, $_nav_menu_placeholder, $wp_meta_boxes, $nav_menu_selected_id, $current_blog, $JOOMLA_CONFIG;\n\n\t\tif (!defined('WP_MEMORY_LIMIT'))\n\t\t{\n\t\t\tdefine('WP_MEMORY_LIMIT', '32M');\n\t\t}\n\n\t\tif( !defined( 'DS' ) ) {\n\t\t\tdefine('DS', DIRECTORY_SEPARATOR);\n\t\t}\n\n\t\tglobal $mainframe, $option, $task, $component_name, $component_real_name, $wp_path;\n\t\tif (!isset($component_name))\n\t\t{\n\t\t\t$component_name = 'com_wordpress';\n\t\t}\n\t\t$component_real_name = 'com_wordpress';\n\n\t\tif (!$wp_path)\n\t\t{\n\t\t\t// Check to see if we are using multisite\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = \"SELECT option_value FROM #__wp_options WHERE option_name = 'wpj_multisite_path'\";\n\t\t\t$db->setQuery($query);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$wp_path = $db->loadResult();\n\t\t\t}\n\t\t\tcatch (EXCEPTION $e)\n\t\t\t{\n\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if we are in multisite or not\n\t\tif (!$wp_path || 'components' . DS . 'com_wordpress' . DS . 'wp' == $wp_path)\n\t\t{\n\t\t\t$component_abs_path = 'components' . DS . 'com_wordpress' . DS . 'wp';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$component_abs_path = $wp_path;\n\t\t}\n\n\t\twpj_loader::$component_abs_path = $component_abs_path;\n\t\twpj_loader::$working_directory = getcwd();\n\n\t\tchdir(JPATH_ROOT . DS . $component_abs_path);\n\t\trequire_once(JPATH_ROOT . DS . $component_abs_path . DS . 'wp-load.php');\n\n\t\t// Load language files\n\t\t$language = &JFactory::getLanguage();\n\t\t$language->load('com_wordpress');\n\n\t\t// Make theme available for translation\n\t\t// Translations can be filed in the /languages/ directory\n\t\tload_theme_textdomain('twentyten', TEMPLATEPATH . '/languages');\n\n\t\t$locale = get_locale();\n\t\t$locale_file = TEMPLATEPATH . \"/languages/$locale.php\";\n\t\tif (is_readable($locale_file))\n\t\t\trequire_once($locale_file);\n\t}", "title": "" }, { "docid": "03d68eb82eac1baba35b34067d9a8e66", "score": "0.54003453", "text": "public function sidebar_admin_setup() {\n\t\t// Clear the registered groups, the necessary ones will be registered following this\n\t\t$this->plugin->widgets->registeredGroups = array();\n\t\t// REGISTER THIS GROUP\n\t\t$this->plugin->widgets->registerGroup( array(\n\t\t\t'id' => $this->sessionData['id'],\n\t\t\t'name' => $this->sessionData['instance']['group_name'],\n\t\t\t'before_widget' => $this->sessionData['instance']['before_widget'],\n\t\t\t'after_widget' => $this->sessionData['instance']['after_widget'],\n\t\t\t'before_title' => $this->sessionData['instance']['before_title'],\n\t\t\t'after_title' => $this->sessionData['instance']['after_title'],\n\t\t\t'description' => 'Drag widgets here to add them to this scope. Widgets can be moved to another scope by dragging them to Inactive Widgets below.' // 2.9\n\n\t\t) );\n\t\t// add the admin notice that we are editing a widget group locally\n\t\t$this->addAction('admin_notices', 'admin_notices_session');\n\t}", "title": "" }, { "docid": "686711f7e50d7782424ecadda96105dc", "score": "0.53929096", "text": "function events_widgets_init() {\r\n register_sidebar( array(\r\n 'name' => 'Events List',\r\n 'id' => 'events-list',\r\n 'orderby' => 'post_date',\r\n 'before_widget' => '',\r\n 'after_widget' => '',\r\n 'before_title' => '',\r\n 'after_title' => '',\r\n ) );\r\n}", "title": "" }, { "docid": "6e6a01142820dcf90c3fc433c45f434c", "score": "0.5389575", "text": "function ib_slider_back_scripts( $hook ) {\n\tif ( 'toplevel_page_IB-Slider/inc/ib-slider-settings-page' !== $hook ) {\n\t\treturn;\n\t}\n\n\t// Register and enqueue of admin side JQuery Sortable file.\n\twp_register_script( 'js_sortable_1', 'https://code.jquery.com/jquery-1.12.4.js', array(), '1.0', true );\n\twp_register_script( 'js_sortable_2', 'https://code.jquery.com/ui/1.12.1/jquery-ui.js', array(), '1.0', true );\n\twp_enqueue_script( 'js_sortable_1' );\n\twp_enqueue_script( 'js_sortable_2' );\n\n\t// Register and enqueue of admin side JQuery Sortable Stylesheet.\n\twp_register_style( 'js_sortable_style', '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css', array(), '1.0' );\n\twp_enqueue_style( 'js_sortable_style' );\n\n\t// Register and enqueue of admin side JS file.\n\twp_register_script( 'admin_js', plugins_url() . '/IB-Slider/admin/admin-js.js', array(), '1.0', true );\n\twp_enqueue_script( 'admin_js' );\n\n\t// Register and enqueue of admin side STYLESHEET file.\n\twp_register_style( 'admin_style', plugins_url() . '/IB-Slider/admin/admin-style.css', array(), '1.0' );\n\twp_enqueue_style( 'admin_style' );\n\n}", "title": "" }, { "docid": "855d00fc430402b9f6ea02cb53f69ba0", "score": "0.5388655", "text": "public function init () {\n\t\t// Register and enqueue JavaScript files and style sheets only on the public area\n\t\tif (!is_admin()) {\n\t\t\twp_enqueue_script('jquery');\n wp_enqueue_script(self::SLUG . '-autocomplete-script', plugins_url('/js/jquery.autocomplete.min.js', dirname(__FILE__)), array('jquery'));\n wp_enqueue_script(self::SLUG . '-common-script', plugins_url('/js/script.js', dirname(__FILE__)), array(self::SLUG . '-autocomplete-script'));\n wp_enqueue_style(self::SLUG . '-autocomplete-style', plugins_url('/css/jquery.autocomplete.css', dirname(__FILE__)));\n wp_enqueue_style(self::SLUG . '-common-style', plugins_url('/css/style.css', dirname(__FILE__)));\n\n\t\t\t// Load tooltip Javascript and style sheet if it is enabled\n\t\t\tif ($this->WPOptions['linking'] == 'tooltip') {\n wp_enqueue_script(self::SLUG . '-unitip-script', plugins_url('/js/unitip.js', dirname(__FILE__)), array('jquery'));\n wp_enqueue_style(self::SLUG . '-unitip-style', plugins_url('/js/unitip/unitip.css', dirname(__FILE__)));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5261741f6c5bd3aa7ce74c2858f1e280", "score": "0.53860116", "text": "public static function init() {\n\t\tadd_action( 'admin_menu', __CLASS__ . '::simple_qtips_create_menu' );\n\n\t}", "title": "" }, { "docid": "65d4da879f2393a1e41390f88f3343c6", "score": "0.53854275", "text": "protected function load_wordpress_classes()\n {\n }", "title": "" }, { "docid": "b29f1c0212810602622316c01438ca36", "score": "0.538456", "text": "public function load()\n {\n add_action('init', [ $this, 'init_action' ]);\n add_filter( 'manage_event_posts_columns', array( $this, 'filter_admin_columns' ) );\n add_filter( 'manage_edit-event_sortable_columns', array( $this, 'admin_sortable_columns' ));\n add_action( 'pre_get_posts', array( $this, 'posts_orderby' ) );\n add_action( 'manage_event_posts_custom_column', array( $this, 'admin_column' ), 10, 2);\n }", "title": "" }, { "docid": "65d4da879f2393a1e41390f88f3343c6", "score": "0.53845024", "text": "protected function load_wordpress_classes()\n {\n }", "title": "" }, { "docid": "9d97cc1f52dcb2c7680672d9599a9c69", "score": "0.5381982", "text": "function init_hooks() {\n if (!function_exists('disable_update_notification_none_admin_user')) {\n add_action('init', [$this, 'disable_update_notification_none_admin_user']);\n }\n\n // None Administrator have limited functionalities of WP capabilites \n if (!function_exists('disable_none_admin_capabilities')) {\n add_action('after_setup', [$this, 'disable_none_admin_capabilities']);\n }\n\n // Hide administrator account from the none administator user role table\n if (!function_exists('hide_user_role_administrator')) {\n add_action('pre_user_query', [$this, 'hide_user_role_administrator']);\n }\n\n // Hide administrator role from dropdown User list\n if (!function_exists('hide_admin_user_role_dropdown_list')) {\n add_action('admin_head', [$this, 'hide_admin_user_role_dropdown_list']);\n }\n\n if (!function_exists('hide_admin_menu_control_update_core')) {\n add_action('admin_menu', [$this, 'hide_admin_menu_control_update_core']);\n }\n }", "title": "" }, { "docid": "ca9293076aa034af959e3af98ae8ab60", "score": "0.53819484", "text": "private function define_admin_hooks()\n { \n $this->plugin_admin = new WordPress_Store_Locator_Admin($this->get_plugin_name(), $this->get_version());\n $this->loader->add_action('init', $this->plugin_admin, 'init', 1);\n $this->loader->add_action('admin_enqueue_scripts', $this->plugin_admin, 'enqueue_styles', 999);\n $this->loader->add_action('admin_enqueue_scripts', $this->plugin_admin, 'enqueue_scripts', 999);\n $this->loader->add_action('plugins_loaded', $this->plugin_admin, 'load_extensions');\n \n $this->plugin_post_type = new WordPress_Store_Locator_Post_Type($this->get_plugin_name(), $this->get_version());\n $this->loader->add_action('init', $this->plugin_post_type, 'init', 90);\n $this->loader->add_action('add_meta_boxes', $this->plugin_post_type, 'add_custom_metaboxes', 10, 2);\n $this->loader->add_action('save_post', $this->plugin_post_type, 'save_custom_metaboxes', 1, 2);\n $this->loader->add_filter('posts_join', $this->plugin_post_type, 'admin_meta_search_join', 10, 1);\n $this->loader->add_filter('posts_where', $this->plugin_post_type, 'admin_meta_search_where', 10, 1);\n $this->loader->add_filter('posts_groupby', $this->plugin_post_type, 'admin_meta_search_limits', 10, 1);\n\n $this->plugin_importer = new WordPress_Store_Locator_Importer($this->get_plugin_name(), $this->get_version());\n $this->loader->add_action('init', $this->plugin_importer, 'init');\n\n $this->plugin_exporter = new WordPress_Store_Locator_Exporter($this->get_plugin_name(), $this->get_version());\n $this->plugin_delete = new WordPress_Store_Locator_Delete($this->get_plugin_name(), $this->get_version());\n\n if(isset($_GET['export-stores']))\n {\n $this->loader->add_action( 'init', $this->plugin_exporter, 'init', 100 );\n }\n if(isset($_GET['delete-stores']))\n {\n $this->loader->add_action( 'init', $this->plugin_delete, 'init' );\n }\n if(isset($_GET['get-import-file']))\n {\n $this->loader->add_action( 'init', $this->plugin_exporter, 'getSampleImportFile', 100 );\n }\n }", "title": "" }, { "docid": "8565104c79b001282cf5d1a2d90c9cd8", "score": "0.537091", "text": "function action_admin_init() {\n\t\t$this->wp_list_table = new $this->providers->{$this->current_provider_slug}['table'];\n\t}", "title": "" }, { "docid": "5f387dcf0a6f013510782feef81ea3f0", "score": "0.5364605", "text": "function override_woocommerce_widgets() {\n \n if ( class_exists( 'WC_Widget_Layered_Nav' ) ) {\n unregister_widget( 'WC_Widget_Layered_Nav' );\n\n \n register_widget( 'Custom_WC_Widget_Layered_Nav' );\n }\n\n if ( class_exists( 'WC_Widget_Product_Categories' ) ) {\n unregister_widget( 'WC_Widget_Product_Categories' );\n \n register_widget( 'Custom_WC_Widget_Product_Categories' );\n }\n \n}", "title": "" }, { "docid": "7ee9ac4c0aa04694fea519c116b5942c", "score": "0.53628033", "text": "function get_sortable_columns() {\n\t return $sortable = array(\n\t 'id'=> array('id', false),\n\t 'name'=> array('name', false),\n\t 'url'=> array('url', false),\n\t 'public_library' => array('public_library', false)\n\t );\n\t}", "title": "" }, { "docid": "29718aa6e408725f5a4d40fb52f20def", "score": "0.5361514", "text": "public function setup()\n {\n $this->blacklistMethod('isSortable');\n\n // url-name?sort=created_at?dir=desc\n $noSort = ($this->input('sort', '') === '');\n if ($noSort) {\n $this->orderBy('created_at', 'DESC');\n }\n }", "title": "" }, { "docid": "767bacf9f02f2acdeaa4f1dfe47abe25", "score": "0.5352169", "text": "public function init()\n {\n add_action('wp_insert_post_data', [$this, 'removeEmptyTags'], 99, 2);\n add_action('enqueue_block_editor_assets', [$this, 'editorStyles']);\n\n // Remove Audio and Video Playlists\n add_filter('media_library_show_audio_playlist', [$this, 'removePlaylist']);\n add_filter('media_library_show_video_playlist', [$this, 'removePlaylist']);\n\n add_filter('media_view_strings', [$this, 'removeMediaStrings']);\n }", "title": "" }, { "docid": "f799a250d013747d95e8fe3046b786ac", "score": "0.53465647", "text": "public function init() {\n if (!did_action('elementor/loaded')) {\n add_action('admin_notices', [$this, 'admin_notice_missing_main_plugin']);\n return;\n }\n\n // Check for required Elementor version\n if (!version_compare(ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=')) {\n add_action('admin_notices', [$this, 'admin_notice_minimum_elementor_version']);\n return;\n }\n\n // Check for required PHP version\n if (version_compare(PHP_VERSION, self::MINIMUM_PHP_VERSION, '<')) {\n add_action('admin_notices', [$this, 'admin_notice_minimum_php_version']);\n return;\n }\n\n // Add Plugin actions\n add_action('elementor/widgets/widgets_registered', [$this, 'init_widgets']);\n // Register Widget Styles\n add_action( 'elementor/frontend/after_enqueue_styles', [ $this, 'widget_styles' ] );\n\n }", "title": "" }, { "docid": "24e5d4d213f713b81711339c1d07979c", "score": "0.5346142", "text": "protected function onLoad()\n\t\t{\n\t\t\tparent::onLoad();\n\n\t\t\t$page = $this->getParentByType('\\System\\Web\\WebControls\\Page');\n\t\t\t//$page->addLink(\\System\\Base\\ApplicationBase::getInstance()->getPageURI(__MODULE_REQUEST_PARAMETER__, array('id'=>'commoncontrols', 'type'=>'text/css')).'&asset=sortable/sortable.css');\n\t\t\t$page->onload .= \"$( \\\"#{$this->getHTMLControlId()}\\\" ).sortable();$( \\\"#{$this->getHTMLControlId()}\\\" ).disableSelection();$( \\\"#{$this->getHTMLControlId()}\\\" ).sortable({update:function(event,ui){Rum.sendAsync(null, '\".$this->getQueryString().\"',($('#{$this->getHTMLControlId()}').sortable('serialize')));}});\";\n\t\t}", "title": "" }, { "docid": "fbb9bf7ab9cb1a1de2a5ee22e19a976d", "score": "0.5344399", "text": "public function initialize()\r\n {\r\n if (is_admin()) {\r\n // Backend features\r\n add_action('wp_dashboard_setup', array($this, 'addWidgets'), 20);\r\n add_filter('upload_mimes', array($this, 'filterUploadableFileTypes'));\r\n add_filter('lbwp_settings_various_maintenancemode', array($this, 'flushFrontendCache'), 1);\r\n add_filter('wp_link_query_args', array($this, 'removeUnlinkablePosttypes'));\r\n add_filter('wp_link_query', array($this, 'filterAssetLinks'));\r\n add_action('admin_menu', array($this, 'removeAdminMetaboxes'));\r\n add_action('transition_post_status', array($this, 'addGuaranteedPublication'), 200, 3);\r\n add_action('media_view_settings', array($this, 'overrideGallerySettings'));\r\n // Sub module singletons (calling getInstance runs them at the specified filter)\r\n add_action('admin_menu', array('LBWP\\Module\\General\\Cms\\SystemLog', 'getInstance'));\r\n add_filter('admin_body_class', array($this, 'addAdminBodyClasses'));\r\n add_filter('mce_external_plugins', array($this, 'loadEditorPlugins'));\r\n add_filter('option_wpseo_titles', array($this, 'mergeYoastTitleDefaults'));\r\n // Allow yoast seo title overrides\r\n $this->yoastTitlesOverrides = apply_filters('lbwp_yoast_seo_title_override', $this->yoastTitlesOverrides);\r\n } else {\r\n // Frontend features\r\n $url = File::getResourceUri() . '';\r\n wp_enqueue_style('lbwp-frontend', $url . '/css/lbwp-frontend.css', array(), LbwpCore::REVISION);\r\n // Add global rss filter to add media images\r\n add_action('rss2_item', array($this, 'addRssMediaItems'));\r\n add_action('rss2_ns', array($this, 'addRssNamespace'));\r\n add_filter('the_excerpt_rss', array($this, 'fixFeedExcerpt'));\r\n add_action('wp', array($this, 'runAfterQueryHooks'));\r\n // Additional robots content, if given\r\n if (strlen($this->config['Various:RobotsTxt']) > 0) {\r\n add_filter('robots_txt', array($this, 'addAdditionalRobotsContent'), 50);\r\n }\r\n // Redirect attachment detail to its parent post if given\r\n if ($this->config['Various:RedirectAttachmentDetail'] == 1) {\r\n add_filter('wp', array($this, 'redirectAttachmentToParent'));\r\n }\r\n // Frontend comment notifications are extended with our own\r\n if (strlen($this->config['Various:AdditionalCommentNotifications']) > 0) {\r\n add_filter('comment_notification_recipients', array($this, 'addCommentNotificationRecipients'));\r\n }\r\n // Create a page speed instance with default settings\r\n PageSpeed::getInstance();\r\n // Print acme challenge for ssl domain validation, if given\r\n if (is_array(get_option('letsEncryptAcmeChallenge')) && stristr($_SERVER['REQUEST_URI'], '/acme-challenge/') !== false) {\r\n $this->printAcmeChallenge();\r\n }\r\n }\r\n\r\n // Features that are run only in logged in password protection mode of posts\r\n if (isset($_COOKIE['wp-postpass_' . COOKIEHASH])) {\r\n $this->validatePasswordProtectionCookie();\r\n add_filter('the_content', array($this, 'addPasswordProtectionLogoutLink'));\r\n }\r\n\r\n // Multilang features\r\n if (Multilang::isActive()) {\r\n // Add translation files of lbwp textdomain in frontend / backend\r\n load_plugin_textdomain('lbwp', false, 'lbwp/resources/languages');\r\n // Feed fix filters\r\n add_filter('wp_title_rss', array($this, 'fixMultilangFeedTitle')); //[&#8230;]\r\n // Option bridge, to have multilang capable options\r\n OptionBridge::getInstance()->addDefaultOptions();\r\n // Allow to use the \"language\" parameter on WP REST API\r\n add_action('rest_api_init', array($this, 'addPolylangRestApiParams'));\r\n }\r\n\r\n // General features\r\n $this->registerLibraries();\r\n $this->initGlobalFeatures();\r\n }", "title": "" }, { "docid": "685f41cc8c1974ef2c5c5d3923c067b2", "score": "0.53378457", "text": "private function define_hooks() {\n $options = new Kodeo_Admin_UI_Options();\n $pages = new Kodeo_Admin_UI_Pages($options);\n \t$menu = new Kodeo_Admin_UI_Menu($pages);\n $toolbar = new Kodeo_Admin_UI_Toolbar();\n $this->optionsInstance = $options;\n\n $this->loader->add_action( 'admin_enqueue_scripts', $this, 'action_enqueue_scripts', 1 );\n \n // this function also removes a wp action\n if(is_admin()) {\n $this->loader->add_action( 'admin_enqueue_scripts', $this, 'action_enqueue_styles' );\n } \n\n if(is_admin()) {\n $this->loader->add_filter( 'admin_body_class', $this, 'filter_add_admin_body_classes' );\n } else {\n $this->loader->add_filter( 'body_class', $this, 'filter_add_body_classes' );\n $this->loader->add_action( 'login_head', $this, 'action_apply_custom_login_css', 999 );\n }\n\n $this->loader->add_action( 'admin_menu', $menu, 'action_add_menu_entries', 500 );\n\n //счетчики меню \n if(animo_get_opt('menu-counters')): { \n $this->loader->add_action( 'admin_menu', $menu, 'action_add_counters', 501 );\n } endif;\n\n $this->loader->add_action( 'admin_bar_menu', $toolbar, 'action_add_notification_center', 90 );\n $this->loader->add_action( 'admin_bar_menu', $toolbar, 'action_add_toolbar_nodes', 0 );\n $this->loader->add_action( 'admin_bar_menu', $toolbar, 'action_move_updates_node', 80 );\n $this->loader->add_action( 'admin_bar_menu', $toolbar, 'action_remove_toolbar_nodes', 999 );\n $this->loader->add_action( 'init', $this, 'load_textdomain' );\n\t}", "title": "" }, { "docid": "c1d863a637c6bcac9fc484a6de55ca44", "score": "0.53321356", "text": "public function init()\n {\n wp_enqueue_script(\n 'related-posts',\n get_template_directory_uri() . '/assets/lib/js/related-posts.js' ,\n array('jquery', 'jquery-ui-sortable')\n );\n\n wp_enqueue_style(\n 'related-posts' ,\n get_template_directory_uri() . '/assets/lib/css/related-posts.css'\n );\n }", "title": "" }, { "docid": "8953dbadb247aceabe4f33132c3346fc", "score": "0.5327013", "text": "function wpplugin_admin_scripts() {\n\n wp_enqueue_script(\n 'wpplugin-admin',\n WPPLUGIN_URL . 'admin/js/site-pre-launch-checklist-admin.js',\n ['jquery'],\n time()\n );\n\n}", "title": "" }, { "docid": "66263e6d2605b913a7eccc147b9177fa", "score": "0.5326621", "text": "private function admin_init() {}", "title": "" }, { "docid": "1ac79123be3f09ad6cbfac69c1d8ef60", "score": "0.5303961", "text": "function CNS_admin_init(){\r\n\tadd_action( 'admin_menu' , 'CNS_admin__menu');\r\n\t// Enable admin scripts and styles\r\n\tif(function_exists(ciusan_admin__head)){\r\n\t\tadd_action( 'admin_enqueue_scripts' , 'ciusan_admin__head');\r\n\t}\r\n}", "title": "" }, { "docid": "c1b574b7c5d9049fc1b52cdd90ab2319", "score": "0.530188", "text": "private static function _add_actions() {\n\t\tadd_action( 'wp_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );\n\t}", "title": "" }, { "docid": "abb04ea73ad8029c2e01dc2c6a386403", "score": "0.5301315", "text": "private function load_dependencies() {\n if(!defined('PLUGIN_INC_PATH')) exit;\n\n\t\trequire PLUGIN_INC_PATH . 'classes/class-admin-ui-loader.php';\n require PLUGIN_INC_PATH . 'classes/class-admin-ui-options.php';\n require PLUGIN_INC_PATH . 'classes/class-admin-ui-pages.php';\n\t\trequire PLUGIN_INC_PATH . 'classes/class-admin-ui-menu.php';\n require PLUGIN_INC_PATH . 'classes/class-admin-ui-toolbar.php';\n\n\t\t$this->loader = new Kodeo_Admin_UI_Loader();\n\t}", "title": "" }, { "docid": "8c7d2e3c8c42d01868c82b18feba6e4c", "score": "0.52993554", "text": "function wpu_widgets_init() {\n\t\n\tregister_widget('WPU_Login_User_info_Widget');\n\tregister_widget('WPU_Latest_Phpbb_Topics_Widget');\n\tregister_widget('WPU_Latest_Phpbb_Posts_Widget');\n\tregister_widget('WPU_Forum_Stats_Widget');\n\tregister_widget('WPU_Forum_Users_Online_Widget');\n\tregister_widget('WPU_Useful_Forum_Links_Widget');\n\tregister_widget('WPU_Forum_Nav_Block_Widget');\n\tregister_widget('WPU_Forum_Nav_Block_Footer_Widget');\n\tregister_widget('WPU_Forum_Birthdays_Widget');\n\n}", "title": "" }, { "docid": "b3b4f2d5ed352d5e91934edc833bb7f6", "score": "0.5298551", "text": "function lsx_widget_entry_before() {\n\tdo_action( 'lsx_widget_entry_before' );\n}", "title": "" }, { "docid": "1d14a9b995ef733318926ab93f5e3885", "score": "0.52892625", "text": "public function soliloquy_init() {\n\t\t\tif ( ! self::is_plugin_page() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself::remove_soliloquy_updater();\n\t\t}", "title": "" }, { "docid": "9398b25e0bda37f0443500aab0757d46", "score": "0.52891076", "text": "public function initialize() {\n\t\t// This needs to be on priority 15 as that is after our options initialize.\n\t\t\\add_action( 'plugins_loaded', [ $this, 'maybe_disable_core_sitemaps' ], 15 );\n\t}", "title": "" }, { "docid": "4e7b7ef7013dc755235dae762c69c54c", "score": "0.52828443", "text": "function wli_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'twitter',\n 'id' => 'twitter',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ) \n );\n\n register_sidebar( array(\n 'name' => 'address',\n 'id' => 'address',\n 'before_widget' => '',\n 'after_widget' => '',\n 'class' => '',\n 'before_title' => '',\n 'after_title' => '',\n ) \n );\n\n\n \n }", "title": "" }, { "docid": "2e916915cd0a93b7831a56f14d3383e3", "score": "0.5279854", "text": "function sortable_columns() {\n\treturn array(\n\t\t'publication_id' => 'publication_id',\n\t\t'production_id' => 'production_id'\n\t);\n}", "title": "" }, { "docid": "696b68bab21c635a971377231424c556", "score": "0.527956", "text": "function admin_init() {\n\r\n\t\t\tparent::admin_init();\n\t\t\t\n\t\t\tif ( class_exists( 'Dev_Projects_Tabbed_Meta_Box' ) )\n\t\t\t\tnew Dev_Projects_Tabbed_Meta_Box( 'dev_project' );\n\t\n\t\t\tif ( class_exists( 'Dev_Networks_Tabbed_Meta_Box' ) )\n\t\t\t\tnew Dev_Networks_Tabbed_Meta_Box( 'dev_network' );\n\n\t\t}", "title": "" }, { "docid": "f47d76dce7d2d98b7cf45be815819028", "score": "0.5276324", "text": "function load_on_podcasts_admin() {\n\tglobal $my_admin_page;\n\t$screen = get_current_screen();\n\tif ( 'podcasts' != $screen->id ) {\n\t\treturn;\n\t} # Else Proceed\n\twp_enqueue_script( 'my_custom_script', plugin_dir_url( __FILE__ ) . '/includes/js/autopopulate.js' );\n}", "title": "" }, { "docid": "949a418e5047dfb1c3672911aa0092d3", "score": "0.5276304", "text": "function my_init() {\nif (!is_admin()) {\n\n\n// jQuery\nwp_deregister_script('jquery');\nwp_register_script('jquery', get_template_directory_uri() .'/assets/bower_components/jquery/dist/jquery.min.js');\nwp_enqueue_script('jquery');\n}\n}", "title": "" }, { "docid": "b558058fa1deed6b498d7e05e59721d4", "score": "0.52686465", "text": "public function __construct()\n {\n add_action('widgets_init', function(){register_widget('DatabaseSynchroWidget');});\n }", "title": "" }, { "docid": "cfc4eed0d08a28cacbafd7d1c1845f09", "score": "0.52678233", "text": "function handle_admin_menu_auto_upgrade() {\r\n \tinclude(self::$plugin_dir . '/includes/admin/auto_upgrade.php');\r\n }", "title": "" }, { "docid": "df7251fef55b7af88dff474f2cf6d451", "score": "0.52641064", "text": "function templatepack_kill_legacy_js_and_css() {\n\twp_dequeue_script( 'groups_widget_groups_list-js' );\n\twp_dequeue_script( 'bp_core_widget_members-js' );\n}", "title": "" }, { "docid": "93d7cb6a5136c69f915462b72480ee8b", "score": "0.52620214", "text": "private function load_admin_dependencies() {\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-create-cpt.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-create-tax.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-meta-box.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-tax-meta.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-setting-page.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-report.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'admin/class/class-export-report.php';\n\t\trequire_once CSMS_PLUGIN_DIR . 'lib/classes/class-pdf.php';\n\t}", "title": "" }, { "docid": "e1a1d92ad643bb457c61da13f99b2ca0", "score": "0.5261299", "text": "public function load_admin_filters() {\n\t\t\t// add js and css files, tabs, pages, php files.\n\t\t\tadd_filter( 'WPSCORE-scripts', array( $this, 'add_admin_scripts' ) );\n\t\t\tadd_filter( 'WPSCORE-tabs', array( $this, 'add_admin_navigation' ) );\n\t\t\tadd_filter( 'WPSCORE-pages', array( $this, 'add_admin_navigation' ) );\n\t\t}", "title": "" }, { "docid": "88563bacb6ba7f58a7c6cf893ad30767", "score": "0.5261298", "text": "function lovemymakeup_widget_init(){\r\n\tregister_sidebar(array(\r\n\t\t'name'\t=> __('Store Sidebar', NAME),\r\n\t\t'id'\t\t=>\t'store' ,\r\n\t\t'before_widget' => '<div class=\"store-widtget \">',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h3>',\r\n\t\t'after_title' => '</h3>'\r\n\t));\r\n\tregister_sidebar(array(\r\n\t\t'name'\t=> __('Product Search Page', NAME),\r\n\t\t'id'\t\t=>\t'product-search',\r\n\t\t'before_widget' => '<div class=\"product-search-widget \">',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h1 class=\"primary-h1\">',\r\n\t\t'after_title' => '</h1>'\r\n\t));\r\n\tregister_sidebar(array(\r\n\t\t'name'\t=> __('Product Tag bottom Page', NAME),\r\n\t\t'id'\t\t=>\t'product-tagcloud',\r\n\t\t'before_widget' => '<div class=\"product-search-widget \">',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '<h1 class=\"primary-h1\">',\r\n\t\t'after_title' => '</h1>'\r\n\t));\r\n\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "ff862fcec25dd27e5bbe069949c49bf3", "score": "0.5258296", "text": "function arphabet_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'sidebar',\n\t\t'id' => 'side_area',\n\t\t'before_widget' => '<div class=\"side_box\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"cont_ttl\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'header_widget',\n\t\t'id' => 'header_area',\n\t\t'before_widget' => '<div class=\"header_widget_box\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"cont_ttl\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "title": "" }, { "docid": "7c518f4469fc11689f844686686c1ccd", "score": "0.52557784", "text": "public function init_hooks() {\r\n\r\n\t\t\tspl_autoload_register(array(__CLASS__, '_autoload'));\r\n\r\n\t\t\tadd_action('admin_notices', array($this, 'admin_notices'));\r\n\r\n\t\t\tadd_action('wp_enqueue_scripts', array(__CLASS__, 'wp_enqueue_scripts'));\r\n\t\t\tadd_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));\r\n\r\n\t\t\tadd_filter('plugin_action_links_' . plugin_basename(__FILE__), array(__CLASS__, 'plugin_action_links'));\r\n\t\t\t/*add_action( 'matomo_schedule_event_hook' , array(__CLASS__, 'schedule_event_hook' ) );*/\r\n\r\n\t\t\t$this->load_general();\r\n\r\n\t\t\t$this->load_backend();\r\n\t\t\t//$this->load_frontend();\r\n\t\t\t//$this->load_api();\r\n\r\n\t\t}", "title": "" }, { "docid": "6947abdbd69cf15f82f4dadc158f6641", "score": "0.5253333", "text": "function yourls_plugins_sort_callback( $plugin_a, $plugin_b ) {\n $orderby = yourls_apply_filter( 'plugins_sort_callback', 'Plugin Name' );\n $order = yourls_apply_filter( 'plugins_sort_callback', 'ASC' );\n\n $a = isset( $plugin_a[ $orderby ] ) ? $plugin_a[ $orderby ] : '';\n $b = isset( $plugin_b[ $orderby ] ) ? $plugin_b[ $orderby ] : '';\n\n if ( $a == $b ) {\n return 0;\n }\n\n if ( 'DESC' == $order ) {\n return ( $a < $b ) ? 1 : -1;\n }\n else {\n return ( $a < $b ) ? -1 : 1;\n }\n}", "title": "" }, { "docid": "4fb50593e70ee2e34670347edb749f32", "score": "0.5247478", "text": "function arphabet_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Main Sidebar',\n\t\t'id' => 'main_sidebar',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "title": "" }, { "docid": "8935e79b490f76f679854d07bf28659e", "score": "0.5240078", "text": "function ipress_widgets_init() {\n\n // contruct widgets list\n $widgets = apply_filters( 'ipress_widgets', [] );\n\n // register widgets\n foreach ( $widgets as $widget ) {\n\n // load widget file... spl_autoload might be better\n if ( ! ipress_widget_autoload( $widget ) ) { continue; }\n\n // register widget\n register_widget( $widget );\n }\n}", "title": "" }, { "docid": "a3e37c9a66b95cc9f8c9703b09facd96", "score": "0.52263004", "text": "static function pre_init() {\n /* Add capability */\n add_filter( 'wpp_capabilities', array( 'class_admin_tools', \"add_capability\" ) );\n }", "title": "" }, { "docid": "59718bbee238b0169030f208cccf75bd", "score": "0.5223808", "text": "private function load_dependencies()\n {\n require_once plugin_dir_path(__FILE__) . 'class-csl-admin.php';\n require_once plugin_dir_path(__FILE__) . 'class-csl-post-template.php';\n }", "title": "" }, { "docid": "98e6a2f85fcadb919a279623765987eb", "score": "0.521897", "text": "function prepare_items() {\n global $wpdb; //This is used only if making any database queries\n\n $user = get_current_user_id();\n $screen = get_current_screen();\n\n $current_page = $this->get_pagenum();\n\n $option_name = $screen->get_option( 'per_page', 'option' ); //the core class name is WP_Screen\n\n $perpage = intval( get_user_meta( $user, $option_name, true ) );\n\n if ( $perpage == 0 ) {\n $perpage = intval( $screen->get_option( 'per_page', 'default' ) );\n }\n\n\n $columns = $this->get_columns();\n $hidden = array();\n $sortable = $this->get_sortable_columns();\n\n\n $this->_column_headers = array( $columns, $hidden, $sortable );\n\n\n $this->process_bulk_action();\n var_dump($_REQUEST['s']);\n\n $search = ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] != '' ) ? sanitize_text_field( $_REQUEST['s'] ) : '';\n $id = ( isset( $_REQUEST['id'] ) && $_REQUEST['id'] != 0 ) ? intval( $_REQUEST['id'] ) : 0;\n $object_id = ( isset( $_REQUEST['object_id'] ) && $_REQUEST['object_id'] != 0 ) ? intval( $_REQUEST['object_id'] ) : 0;\n $object_type = ( isset( $_REQUEST['object_type'] ) && $_REQUEST['object_type'] != '' ) ? esc_attr( $_REQUEST['object_type'] ) : '';\n $cat_id = ( isset( $_REQUEST['cat_id'] ) && $_REQUEST['cat_id'] != 0 ) ? intval( $_REQUEST['cat_id'] ) : 0;\n $user_id = ( isset( $_REQUEST['user_id'] ) && $_REQUEST['user_id'] != 0 ) ? intval( $_REQUEST['user_id'] ) : 0;\n $order = ( isset( $_REQUEST['order'] ) && $_REQUEST['order'] != '' ) ? $_REQUEST['order'] : 'DESC';\n $orderby = ( isset( $_REQUEST['orderby'] ) && $_REQUEST['orderby'] != '' ) ? $_REQUEST['orderby'] : 'logs.id';\n\n\n $data = $this->getLogData( $search, $id, $object_id, $object_type, $cat_id, $user_id, $orderby, $order, $perpage, $current_page );\n\n $total_items = intval( $this->getLogDataCount( $search, $id, $object_id, $object_type, $cat_id, $user_id) );\n\n $this->items = $data;\n\n /**\n * REQUIRED. We also have to register our pagination options & calculations.\n */\n $this->set_pagination_args( array(\n 'total_items' => $total_items, //WE have to calculate the total number of items\n 'per_page' => $perpage, //WE have to determine how many items to show on a page\n 'total_pages' => ceil( $total_items / $perpage ) //WE have to calculate the total number of pages\n ) );\n\n }", "title": "" }, { "docid": "fedef9fa0bb4be337a20bd5a06bd5bf6", "score": "0.5218402", "text": "public static function detect()\n\t{\n\t\tif ( defined('WOOCOMMERCE_VERSION') && defined('WPLISTER_VERSION') ) {\n\t\t\t// User reported this will sync correctly.\n\t\t\tadd_action('wplister_revise_inventory_status', array( LiteSpeed_Cache_ThirdParty_WooCommerce::get_instance(), 'backend_purge' ) ) ;\n\t\t\t// Added as a safety measure for WPLister Pro only.\n\t\t\tadd_action('wplister_inventory_status_changed', array( LiteSpeed_Cache_ThirdParty_WooCommerce::get_instance(), 'backend_purge' ) ) ;\n\t\t}\n\t}", "title": "" }, { "docid": "764ff302bfcb5c809a8a8188ac729d07", "score": "0.52145606", "text": "protected function _beforeToHtml()\n {\n $toolbar = $this->getToolbarBlock();\n\n // called prepare sortable parameters\n $collection = $this->_getVendorCollection();\n\n // use sortable parameters\n $cedorders = $this->getAvailableOrders();\n if ($cedorders) {\n $toolbar->setAvailableOrders($cedorders);\n }\n $cedsort = $this->getSortBy();\n if ($cedsort) {\n $toolbar->setDefaultOrder($cedsort);\n }\n $ceddir = $this->getDefaultDirection();\n if ($ceddir) {\n $toolbar->setDefaultDirection($ceddir);\n }\n $cedmodes = $this->getModes();\n if ($cedmodes) {\n $toolbar->setModes($cedmodes);\n }\n\n // set collection to toolbar and apply sort\n $toolbar->setCollection($collection);\n\n $this->setChild('toolbar', $toolbar);\n /*$this->_eventManager->dispatch(\n 'catalog_block_product_list_collection',\n ['collection' => $this->_getVendorCollection()]\n );*/\n\n $this->_getVendorCollection()->load();\n\n return parent::_beforeToHtml();\n }", "title": "" }, { "docid": "97c978558a9eff897000aaf6803798bf", "score": "0.52144027", "text": "function on_admin_init ()\n{\n}", "title": "" }, { "docid": "be711303e3f926d9b00db877fe5c6b14", "score": "0.521433", "text": "private function defineAdminHooks()\n {\n require_once dirname( __FILE__ ) . '/../admin/class-wbt-admin.php';\n \n $plugin = new WbtAdmin($this->container());\n $this->container()->get('loader')->add_action( 'admin_menu', $plugin, 'init_menu' );\n }", "title": "" }, { "docid": "a5e1402251f453cfb42525ba254772c6", "score": "0.52111334", "text": "private function define_admin_hooks(){\n\t\t$admin = new WPHelp_Admin ( $this->get_version() );\n\t\t$this->loader->add_action('admin_enqueue_scripts', $admin, 'enqueue_styles'); // load stylesheets\n\t\t$this->loader->add_action( 'admin_menu', $admin, 'load_options'); // add Help Page & Menu item\n\t}", "title": "" }, { "docid": "2068d13a56e27eb5b8b4ce5fb47f94e7", "score": "0.520633", "text": "function eager_EagerWordpressBasePlugin_cms_v2_1_pace_admin_init() {\n global $eagerAdminInit;\n global $eagerHighestVersion;\n\n // Don't add duplicate resources & ensure highest version of plugin adds resources\n if ($eagerAdminInit || ($eagerHighestVersion > EAGER_EagerWordpressBasePlugin_cms_v2_1_pace_VERSION)) {\n return;\n }\n\n $eagerAdminInit = true;\n\n wp_register_style('eager_css', EAGER_EagerWordpressBasePlugin_cms_v2_1_pace_URL.'styles/main.css');\n wp_enqueue_style('eager_css');\n\n wp_register_script('eager_js', EAGER_EagerWordpressBasePlugin_cms_v2_1_pace_URL.'scripts/main.js');\n wp_enqueue_script('eager_js');\n\n wp_register_script('eager_override_js', 'https://cms-br-' . EAGER_EagerWordpressBasePlugin_cms_v2_1_pace_VERSION_STRING . '.eager.io/js/override.js');\n wp_enqueue_script('eager_override_js');\n}", "title": "" }, { "docid": "c52b51f21027ae0340f8dbd33003cc83", "score": "0.52059495", "text": "function admin_load() {\n\t\t\n\t\t// remove prompt \n\t\tremove_action('admin_notices', array($this, 'admin_notices'));\n\t\t\n\t\t// load acf scripts\n\t\tacf_enqueue_scripts();\n\t}", "title": "" }, { "docid": "becc0020c8d727738a7c0c0495246a8b", "score": "0.52031815", "text": "public function admin_init()\n\t\t{\n\t\t\tadd_action('add_meta_boxes', array(&$this, 'add_meta_boxes'));\n\t\t}", "title": "" }, { "docid": "a0398e21522e1668adbedcb40abb7e4c", "score": "0.52026075", "text": "public static function init() {\n // Enable label hiding.\n add_action( 'admin_head', __CLASS__ . '::hide_labels' );\n\n // Add some actions for RediPress search if it's enabled.\n add_action( 'redipress/before_index_post', '\\\\Geniem\\\\ACF\\\\Field::redipress_get_fields', 10, 1 );\n add_action( 'redipress/before_index_user', '\\\\Geniem\\\\ACF\\\\Field::redipress_get_fields', 10, 1 );\n }", "title": "" }, { "docid": "1a8b762be20853b5a427d8b2eb645a8f", "score": "0.5201047", "text": "function cv_comp_action_before_query() {\n\tif ( function_exists( 'ksuce_exclude_categories' ) ) {\n\t\tremove_filter( 'pre_get_posts', 'ksuce_exclude_categories' );\n\t}\n\n\t/** Fix: woo-event-manager plugin sets DESC order for all Views query\n\t * @since 2.0.3\n\t */\n\tif ( function_exists( 'rc_modify_query_get_posts_by_date' ) ) {\n\t\tremove_action( 'pre_get_posts', 'rc_modify_query_get_posts_by_date' );\n\t}\n}", "title": "" }, { "docid": "cd248c2b63cdbd9a0f894110865cac82", "score": "0.5200704", "text": "public static function initialize() {\r\n\t\t// The filters are only useful for the admin section; exit in the front-end posts/pages\r\n\t\tif ( ! is_admin() )\r\n\t\t\treturn;\r\n\r\n\t\t// Defined in /media-library-assistant/includes/class-mla-main.php\r\n\t\tadd_filter( 'mla_list_table_new_instance', 'MLAUploadedOnExample::mla_list_table_new_instance', 10, 1 );\r\n\t}", "title": "" }, { "docid": "739bc86e983748092d9dc3bed06356cb", "score": "0.5198599", "text": "protected function _beforeToHtml()\n {\n $toolbar = $this->getToolbarBlock();\n\n // called prepare sortable parameters\n $collection = $this->_getPostCollection();\n\n // use sortable parameters\n if ($orders = $this->getAvailableOrders()) {\n $toolbar->setAvailableOrders($orders);\n }\n if ($sort = $this->getSortBy()) {\n $toolbar->setDefaultOrder($sort);\n }\n if ($dir = $this->getDefaultDirection()) {\n $toolbar->setDefaultDirection($dir);\n }\n if ($modes = $this->getModes()) {\n $toolbar->setModes($modes);\n }\n\n // set collection to toolbar and apply sort\n $toolbar->setCollection($collection);\n\n $this->setChild('toolbar', $toolbar);\n Mage::dispatchEvent('catalog_block_post_list_collection', array(\n 'collection' => $this->_getPostCollection()\n ));\n\n $this->_getPostCollection()->load();\n\n return parent::_beforeToHtml();\n }", "title": "" }, { "docid": "792ccf7b550bdc4ba36b296e04fd6c7a", "score": "0.51984805", "text": "static function init(){\n if(is_main_site() && !SD_Submenu_Assignment::get_all_wpuapc_admin_pages() ){\n add_action( 'admin_notices', array(__CLASS__, 'admin_notice_minimum_elementor_version') );\n }\n\n }", "title": "" } ]
bb2b35de5b5d9592434e7aaad10de5db
Zwraca daty z miesiecy ktore obejmuje ta kolekcja
[ { "docid": "5ae0c20bc53ad1ef831c44b760a74337", "score": "0.0", "text": "public function iterateMonths() {\n\t\t$used = array();\n\t\tforeach($this->days as $oDate) {\n\t\t\tfalse && $oDate = new Date();\n\t\t\t$k = $oDate->getMonth() . '-' . $oDate->getYear();\n\t\t\tif (!$used[$k]) {\n\t\t\t\tyield $oDate;\n\t\t\t\t$used[$k] = 1;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "0af116ae74f8180db3d094462d2c263b", "score": "0.63583195", "text": "public function zapocniKonverzaciju()\n\t{\n\t\t$text = $_POST['knjiga'];\n\n\t\t$korisnik1 = $this->session->get(\"korisnik\")->IdK;\n\t\t$korisnik2 = $_POST['primalac'];\n\n\t\t$razgModel = new ModelRazgovor();\n\n\t\t//insert or ignore insert if exists\n\t\t$razgModel->ignore(true)->insert([\n\t\t\t'Korisnik1' => $korisnik1,\n\t\t\t'Korisnik2' => $korisnik2,\n\t\t]);\n\n\t\t$razgModel->ignore(true)->insert([\n\t\t\t'Korisnik1' => $korisnik2,\n\t\t\t'Korisnik2' => $korisnik1,\n\t\t]);\n\n\n\t\t$porModel = new ModelPoruka();\n\n\t\t$porModel->save([\n\t\t\t'Korisnik1' => $korisnik1,\n\t\t\t'Korisnik2' => $korisnik2,\n\t\t\t'Tekst' => $text\n\t\t]);\n\t\t$_POST['korisnikPrimalac'] = $korisnik2;\n\t\t$this->otvoriKonverzaciju_action();\n\t}", "title": "" }, { "docid": "d7149cc06c7d4836b401f6b1412b989c", "score": "0.6340895", "text": "public function WyczyscKoszyk()\n\t{\n\t\t//{\n\t\t\tunset($this->towaryId);\n\t\t\tunset($this->ilosci);\n\t\t\tunset($this->ilosciFirm);\n\t\t\t\n\t\t//}\n\t\t//$this->towaryId = array_values($this->towaryId);\n\t\t//$this->ilosci = array_values($this->ilosci);\n\t\t\n\t}", "title": "" }, { "docid": "6b0e9b843aafd777591b3ea501a89aeb", "score": "0.62699515", "text": "public function dodajTacku(){\n\n \t}", "title": "" }, { "docid": "5fd38f994c8a88497f25ffea2508288d", "score": "0.6119099", "text": "private function izvucikontrolniBroj() {\r\n\r\n $this->K = self::$JMBG[12];\r\n }", "title": "" }, { "docid": "3a77b1f9d7c710d2c913cd05d1406176", "score": "0.60578203", "text": "public function predloziKorekciju() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n if(post(tekst) === false) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\",\n )) . \"?msg=2\");\n } else {\n $prijedlog = new \\model\\DBPrijedlozi();\n $prijedlog->idKorisnika = $_SESSION['auth'];\n $prijedlog->tekst = post(\"tekst\");\n if(post(\"v\") == 'E') {\n $prijedlog->idEksperimenta = post(\"id\");\n } else {\n $prijedlog->idRada = post(\"id\");\n }\n $prijedlog->save();\n $akcijeSustava = new \\model\\DBAkcijaSustava();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Predlaze korekciju - idPrijedloga je \" . $prijedlog->getPrimaryKey());\n \n preusmjeri(\\route\\Route::get(\"d2\")->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=1\");\n }\n }", "title": "" }, { "docid": "d2a9843daf313dc019d887629b9be72b", "score": "0.60356724", "text": "function proknjizi_kompenzaciju($id_kompenzacije, $datum_naloga) {\n\n require_once('../../../common/zakljucano.php');\n\n //SETOVANJE DATUMA DOSPECA NA DATUM NALOGA - ZBOG SLUCAJA KADA JE DATUM POTPISA KOMPENZACIJE U ZAKLJUCANOM PERIODU\n $datum_dospeva = $datum_naloga;\n\n //PROVERA I SETOVANJE DATUMA NALOGA U ODNOSU NA ZAKLJUCAN PERIOD\n $datum_naloga = proveriZDatum('KVART', $datum_naloga);\n\n //KREIRANJE OBJEKTA ZA SLANJE,FLAGA I PROMENJIVE ZA GRESKE\n $ret = new stdClass();\n $flag = true;\n $greske = '';\n \n \n //UKLJUCIVANJE KONEKCIJE KA AMSO BAZI\n $amso_konekcija = pg_connect(\"host=localhost dbname=amso user=zoranp\");\n\n //AKO DODJE DO GRESKE PRI KONEKCIJI KA BAZI\n if (!$amso_konekcija) {\n\n $greske .= 'Greška u konekciji sa bazom podataka.';\n $flag = false;\n }\n\n //AKO JE KONEKCIJA OK,NASTAVI DALJE\n if ($flag) {\n\n //UPIT ZA DOBIJANJE BROJA KOMPENZACIJE I PARTNERA\n $upit_podaci = \"SELECT kz.broj_kompenzacije, kz.partner, ks.konto, ks.brojdok, ks.opisdok, ks.duguje, ks.potrazuje, ks.kanal_prodaje, p.naziv AS naziv_partnera \n\n FROM kompenzacija_zaglavlje kz\n\n INNER JOIN kompenzacija_stavke ks on kz.kompenzacija_zaglavlje_id = ks.kompenzacija_zaglavlje_id\n\n INNER JOIN partneri p ON p.sifra = kz.partner \n\n WHERE kz.kompenzacija_zaglavlje_id = '$id_kompenzacije'\n\n ORDER BY ks.kompenzacija_stavke_id\";\n\n //IZVRSAVANJE UPITA\n $rezultat_podaci = pg_query($amso_konekcija, $upit_podaci);\n\n //AKO DODJE DO GRESKE PRI IZVRSAVANJU UPITA\n if (!$rezultat_podaci) {\n \n $greske .= 'Greška pri izvršavanju upita. Pokušajte ponovo.';\n $flag = false;\n }\n else {\n\n //UPISIVANJE PODATAKA IZ BAZE U NIZ\n $niz_podaci = pg_fetch_all($rezultat_podaci);\n\n //IZDVAJANJE GODINE IZ DATUMA NALOGA\n $godina = substr($datum_naloga, 0, 4);\n\n\n //ZAPOCINJANJE TRANSAKCIJE\n $sql_transakcija \t= \"BEGIN\";\n $rezultat_transakcija \t= pg_query($amso_konekcija, $sql_transakcija);\n\n\n //POCETAK UPITA ZA KNJIZENJE KOMPENZACJE U GLAVNOJ KNJIZI\n $upit_knjizenje = \"INSERT INTO g$godina (datknjiz, vrstadok, brdok, ff, partner, pib, ppsi, opisdok, brojdok, datdok,\n \n dospeva, duguje, potrazuje, opetnalog, konto, mnt, radnik, knjizdana, vremknjiz) VALUES \";\n\n\n //PROLAZAK KROZ NIZ SA SVIM STAVKAMA KOMPENZACIJE\n foreach($niz_podaci as $stavka_kompenzacije) {\n\n //SETOVANJE VREDNOSTI ZA UNOS U BAZU\n $brdok = $stavka_kompenzacije['broj_kompenzacije'];\n $brojdok = $stavka_kompenzacije['brojdok'];\n $pib_partnera = $stavka_kompenzacije['partner'];\n $konto = $stavka_kompenzacije['konto'];\n\n //KREIRANJE OPISA DOKUMENTA I DODAVANJE NAZIVA PARTNERA NA POCETKU\n $opis_dokumenta = $stavka_kompenzacije['naziv_partnera'] .' '. $stavka_kompenzacije['opisdok'];\n\n //AKO ZA STAVKU NIJE UNET KANAL PRODAJE, PODESI VREDNOST NA NULL\n if ($stavka_kompenzacije['kanal_prodaje'] == '' || $stavka_kompenzacije['kanal_prodaje'] == null) {\n\n $kanal_prodaje = 'NULL';\n }\n //U SUPROTNOM,UPISI VREDNOST IZ BAZE\n else {\n\n $kanal_prodaje = $stavka_kompenzacije['kanal_prodaje'];\n }\n\n //AKO JE STAVKA KOMPENZACIJE NA DUGOVNOJ STRANI\n if ($stavka_kompenzacije['duguje'] > 0) {\n\n $duguje = $stavka_kompenzacije['duguje'];\n $potrazuje = 0;\n }\n //AKO JE STAVKA KOMPENZACIJE NA POTRAZNOJ STRANI\n else {\n\n $duguje = 0;\n $potrazuje = $stavka_kompenzacije['potrazuje'];\n }\n\n \n //NASTAVAK UPITA,TJ. DODAVANJE VREDNOSTI ZA SVAKU STAVKU KOMPENZACIJE\n $upit_knjizenje .= \"('$datum_naloga', 'KM', '$brdok', 'F', '$pib_partnera', $kanal_prodaje, 'PP', '$opis_dokumenta','$brojdok', \n '$datum_naloga', '$datum_dospeva', '$duguje', '$potrazuje', '$brdok', '$konto', '111000', $radnik, current_date, current_time),\";\n\n }\n\n //UKLANJANJE ZAREZA SA KRAJA UPITA\n $upit_knjizenje = rtrim($upit_knjizenje, ',');\n\n //IZVRSAVANJE UPITA ZA KNJIZENJE\n $rezultat_knjizenje = pg_query($amso_konekcija, $upit_knjizenje);\n\n //AKO DODJE DO GRESKE PRI IZVRSAVANJU UPITA\n if (!$rezultat_knjizenje) {\n \n $flag = false;\n\n //SKLONITI NAKON TESTIRANJA\n $greske .= 'Greška u upitu za knjiženje u glavnoj knjizi: ' .$upit_knjizenje;\n }\n\n\n //UPIT ZA UNOS STATUSA PROKNJIZENO U TABELU KOMPENZACIJA_AKCIJE_LOG ZA ZELJENU KOMPENZACIJU \n $upit_status = \"INSERT INTO kompenzacija_akcije_log(kompenzacija_id, akcija, radnik, datum_promene_statusa) VALUES ('$id_kompenzacije', 'proknjizeno', '$radnik', 'now()')\";\n\n //IZVRSAVANJE UPITA\n $rezultat_status = pg_query($amso_konekcija, $upit_status);\n \n //AKO DODJE DO GRESKE PRI IZVRSAVANJU UPITA\n if (!$rezultat_status) {\n \n $flag = false;\n\n //SKLONITI NAKON TESTIRANJA\n $greske .= 'Greška u upitu za ažuriranje statusa kompenzacije: ' .$upit_status;\n }\n\n\n\n //AKO JE SVE OK,IZVRSI TRANSAKCIJU\n if ($flag) {\n\n $sql_transakcija = \"COMMIT\";\n $rezultat_transakcija = pg_query($amso_konekcija, $sql_transakcija);\n $poruka .= \"Uspešno ste proknjižili kompenzaciju broj: \" . $brdok;\n\n \n }\n //AKO DODJE DO GRESKE,PONISTI TRANSAKCIJU\n else {\n\n $sql_transakcija = \"ROLLBACK\";\n $rezultat_transakcija = pg_query($baza_amso, $sql_transakcija);\n $greske .= \"Knjiženje kompenzacije broj: \" .$brdok. \" nije uspelo.\";\n }\n }\n }\n\n //AKO POSTOJI GRESKA,UPISI GRESKU\n if (!$flag) {\n\n $ret->greske = $greske;\n }\n //AKO JE SVE OK,UPISI PORUKU\n else {\n\n $ret->poruka = $poruka;\n }\n\n $ret->flag = $flag;\n\n echo json_encode($ret);\n}", "title": "" }, { "docid": "116a2cfc3c2fec8c54aedd36554fec76", "score": "0.5975316", "text": "function pobierzKomentarze() {}", "title": "" }, { "docid": "8d2a920893b86468e3f90b433633ec82", "score": "0.5942227", "text": "function zapiszOpisZdjecia($tresc) {}", "title": "" }, { "docid": "adad34dcb75c9b14e4fbbe75b812de19", "score": "0.5874024", "text": "public function kontak()\n {\n }", "title": "" }, { "docid": "5653113bfb3f89cab850e5a6f34953e0", "score": "0.58690715", "text": "public function dodajEksperimentUPortfelj() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n $akcijeSustava = new \\model\\DBAkcijaSustava();\n $korisnik = new \\model\\DBKorisnik();\n if(!$korisnik->userExists($_SESSION['auth'])) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n \n if(get(\"id\") === false) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=3\");\n } else {\n $eksperiment = new \\model\\DBZnanstveniEksperiment();\n try {\n $eksperiment->load(get(\"id\"));\n } catch (\\opp\\model\\NotFoundException $e) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=3\");\n }\n \n $portfelj = new \\model\\DBPortfelj();\n if(!$portfelj->postojiZapis($_SESSION['auth'], get(\"id\"), NULL)) {\n $portfelj->idKorisnika = $_SESSION['auth'];\n $portfelj->idEksperimenta = get(\"id\");\n $portfelj->idRada = NULL;\n $portfelj->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodaje eksperiment u portfelj - id zapisa u portfelju je \" . $portfelj->getPrimaryKey());\n }\n \n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=8\");\n }\n }", "title": "" }, { "docid": "f4cf5a79dad150259313ff3110a2ca3e", "score": "0.5841042", "text": "public function tratarDados(){\r\n\t\r\n\t\r\n }", "title": "" }, { "docid": "75b5dc965b2ce21217effc56630dd4d4", "score": "0.58374274", "text": "function tb_kuesioner(){\n\t // ambil data barang dari tabel barang\n\t $pertanyaan = $this->db->query(\"SELECT tb_pertanyaan.id_construct, tb_pertanyaan.id_kuesioner, tb_pertanyaan.pertanyaan, construct.varconstruct FROM tb_pertanyaan LEFT JOIN construct ON tb_pertanyaan.id_construct=construct.id_construct WHERE id_metode='kue' \");\n\t return $pertanyaan;\n\t \t}", "title": "" }, { "docid": "2e9bc0beb772e8bbd5a75c775d1c8723", "score": "0.5827824", "text": "public function ocijeni() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n $ocjenjuje = new \\model\\DBOcjenjuje();\n $pov = $ocjenjuje->provjeraOcjene($_SESSION['auth'], post(\"id\"));\n $ocjena = new \\model\\DBOcjena();\n $akcijeSustava = new \\model\\DBAkcijaSustava();\n \n if($pov == false) {\n $ocjena->oznaka = post(\"oznaka\", NULL);\n $ocjena->ocjena = post(\"ocjena\", NULL);\n $ocjena->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Unosi novu ocjenu s id-em\" . $ocjena->getPrimaryKey());\n \n $ocjenjuje->idKorisnika = $_SESSION['auth'];\n $ocjenjuje->idOcjene = $ocjena->getPrimaryKey();\n $ocjenjuje->idEksperimenta = post(\"id\");\n $ocjenjuje->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Unosi zapis u tablicu ocjenjuje\" . $ocjenjuje->getPrimaryKey());\n \n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=5\");\n } else {\n try {\n $ocjena->load($pov->idOcjene);\n } catch (\\opp\\model\\NotFoundException $e) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n \n $ocjena->oznaka = post(\"oznaka\", NULL);\n $ocjena->ocjena = post(\"ocjena\", NULL);\n $ocjena->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Mijenja staru ocjenu s id-em\" . $ocjena->getPrimaryKey());\n \n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=5\");\n }\n }", "title": "" }, { "docid": "c885884531d224be68b54ff77f2eddf0", "score": "0.5769815", "text": "function kode_posisi() {\r\n }", "title": "" }, { "docid": "7e3d9a096b374332569f63ff62399064", "score": "0.57549787", "text": "public function otvoriKonverzaciju_action()\n\t{\n\t\t$korisnik = $this->session->get(\"korisnik\");\n\n\t\t$selected = $_POST['korisnikPrimalac'];\n\n\t\t$porModel = new ModelPoruka();\n\n\n\t\t$svePor = $porModel->dohvatiPoruke($korisnik->IdK, $selected);\n\n\t\t$niz = $this->getNizKorisnika($korisnik->IdK);\n\n\n\t\t$this->pozovi(\"poruke/main\", [\n\t\t\t\"korisnici\" => $niz,\n\t\t\t\"selected\" => $selected,\n\t\t\t\"currentPoruke\" => $svePor\n\t\t]);\n\t}", "title": "" }, { "docid": "c36c11adf0f2618a1c2f27c40f8dd370", "score": "0.5703048", "text": "function zaradaOdsustvoPraznik() {\n return round($this->karnet->getValue('satiOdsustvoPraznik') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "907491244e210f8da7cccfff69db15f4", "score": "0.56414646", "text": "function mussObjektUmfliegen($schiff_id) {\n $schiff_daten = @mysql_query(\"SELECT kox, koy, zielx, ziely, zielid FROM skrupel_schiffe \n\t\t\tWHERE id='$schiff_id'\");\n $schiff_daten = @mysql_fetch_array($schiff_daten);\n $schiff_x = $schiff_daten['kox'];\n $schiff_y = $schiff_daten['koy'];\n $schiff_ziel_x = $schiff_daten['zielx'];\n $schiff_ziel_y = $schiff_daten['ziely'];\n $schiff_ziel_id = $schiff_daten['zielid'];\n foreach(eigenschaften::$gesehene_wurmloecher_daten as $wurmloch) {\n if($wurmloch['x'] == $schiff_ziel_x && $wurmloch['y'] == $schiff_ziel_y) return false;\n }\n $anomalien_koords = array();\n $spiel_id = eigenschaften::$spiel_id;\n $comp_id = eigenschaften::$comp_id;\n $anomalien = @mysql_query(\"SELECT x_pos, y_pos, id, art FROM skrupel_anomalien \n\t\t\tWHERE (spiel='$spiel_id') AND (sicht_\".$comp_id.'=1) AND ((art=1) OR (art=2) OR (art=5))');\n while($anomalie = @mysql_fetch_array($anomalien)) {\n if($anomalie['art'] == 5) {\n $besitzer = ki_basis::ermittleMinenfeldBesitzer($anomalie['id']);\n if($besitzer == eigenschaften::$comp_id) continue;\n }\n $anomalien_koords[] = array('x' => $anomalie['x_pos'], 'y' => $anomalie['y_pos'], 'id' => $anomalie['id']);\n }\n //Erstmal wird die naechste Anomoalie gesucht, die ein Wurmloch, ein Sprungtor oder ein Minenfeld ist.\n $nahe_anomalie = ki_basis::ermittleNahesZiel($schiff_id, $anomalien_koords, null);\n //Wurde keine solche Anomalie gefunden, so wird auch keine umflogen.\n if($nahe_anomalie == null || $nahe_anomalie['id'] == 0) return false;\n $anomalie_x = $nahe_anomalie['x'];\n $anomalie_y = $nahe_anomalie['y'];\n $anomalie_art = @mysql_query(\"SELECT art FROM skrupel_anomalien WHERE (x_pos='$anomalie_x') AND \n\t\t\t(y_pos='$anomalie_y') AND (spiel='$spiel_id')\");\n $anomalie_art = @mysql_fetch_array($anomalie_art);\n $anomalie_art = $anomalie_art['art'];\n $abstand = 100;\n //Je nach Art des Objekts wird ein anderer Sicherheits-Abstand gewaehlt. Plasma-Stuerme werden\n //nicht umflogen.\n if($anomalie_art == 5) $abstand = eigenschaften::$schiffe_infos->mindest_minenfeld_abstand;\n elseif($anomalie_art == 1 || $anomalie_art == 2)\n $abstand = eigenschaften::$schiffe_infos->mindest_wurmloch_abstand;\n else return false;\n\n return $this->umfliegeObjekt($schiff_x, $schiff_y, $schiff_id, $nahe_anomalie['x'], $nahe_anomalie['y'],\n $schiff_ziel_x, $schiff_ziel_y, $schiff_ziel_id, $abstand);\n }", "title": "" }, { "docid": "0d773d8f5d8c35d40ba745bb9cd676b5", "score": "0.5621153", "text": "function getDataEditPengalamanKerja($r_key) {\n\t\t\t$sql = \"select r.*,coalesce(cast(r.masakerjathn as varchar),'0') as masakerjathn,coalesce(cast(r.masakerjabln as varchar),'0')as masakerjabln\n\t\t\t\t\tfrom \".self::table('pe_pengalamankerja').\" r \n\t\t\t\t\twhere nourutpk='$r_key'\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "90deca2c510d69d65386488f08fef45b", "score": "0.5613741", "text": "public function data_siswa()\n {\n }", "title": "" }, { "docid": "ccfe54670033323739f89152f400c7af", "score": "0.56099916", "text": "public function getRoditelji(){\n\t\t//primalac_id je u ovom slučaju id djaka na koga se poruka odnosi a ne na roditelja\n\t\t$poruke['poslate']=Poruke::join('roditelji as r','r.id','=','poruke.primalac_id')\n\t\t->where('poruke.posiljalac_id',Session::get('id'))\n\t\t->orderby('poruke.created_at','DESC')\n\t\t->get(['poruke.id','poruke.poruka','poruke.created_at as datum','poruke.posiljalac_id','r.ime','poruke.procitano'])->toArray();\n\t\t\n\t\t$djaciroditelji=Djaci::join('roditelji as rod','rod.id','=','djaci.id_roditelji')\n\t\t->whereIn('djaci.id',function($query){\n\t\t\t\t$query->select('p.primalac_id')->from('poruke as p')->where('p.posiljalac_id','=',Session::get('id'));\n\t\t})\n\t\t->get(['rod.ime as imeroditelja','rod.prezime as prezimeroditelja','rod.id as idroditelja','djaci.ime as imedjaka'])->toArray();\n\n\t\t$poruke['primljene']=Poruke::join('roditelji as r','r.id','=','poruke.posiljalac_id')\n\t\t->where('poruke.primalac_id',Session::get('id'))\n\t\t->orderby('poruke.created_at','DESC')\n\t\t->get(['poruke.id','poruke.poruka','poruke.created_at as datum','poruke.primalac_id','r.ime','poruke.procitano'])->toArray();\n\n\t\treturn Security::autentifikacija('roditelj.poruke',compact('poruke'),2);\n\t\t\n\t}", "title": "" }, { "docid": "e3e51f9c499dd8676420f2e4078df128", "score": "0.5608045", "text": "function kode_mentor(){\n $sql=\"select* from kode_mentor \";\n\t $a=new dbAkses;\n\t $data=$a->select($sql);\n\t for($i=0; $i<$a->baris; $i++){\n\t echo$data[$i][1]; \n\t }\n }", "title": "" }, { "docid": "7770fc8e3d5037fa24fc871a8bcfbd06", "score": "0.55908364", "text": "public function obtenerSaldotarjeta();", "title": "" }, { "docid": "a62c672c7caf863c4f47d76472bb1fad", "score": "0.55818015", "text": "public function dodajRadUPortfelj() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n $akcijeSustava = new \\model\\DBAkcijaSustava();\n $korisnik = new \\model\\DBKorisnik();\n if(!$korisnik->userExists($_SESSION['auth'])) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n \n if(get(\"id\") === false) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=7\");\n } else {\n $rad = new \\model\\DBZnanstveniRad();\n try {\n $rad->load(get(\"id\"));\n } catch (\\opp\\model\\NotFoundException $e) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=7\");\n }\n \n $portfelj = new \\model\\DBPortfelj();\n if(!$portfelj->postojiZapis($_SESSION['auth'], null, get(\"id\"))) {\n $portfelj->idKorisnika = $_SESSION['auth'];\n $portfelj->idEksperimenta = NULL;\n $portfelj->idRada = get(\"id\");\n $portfelj->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodaje rad u portfelj - id zapisa u portfelju je \" . $portfelj->getPrimaryKey());\n }\n \n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=8\");\n }\n }", "title": "" }, { "docid": "8a3631744170cc99b7a13e7f6509321d", "score": "0.5572155", "text": "function loadTraza(){\r\n\t\t$r = $this->obt->getObligacionTrazaById($this->id);\r\n\t\tif($r != -1){\r\n\t\t\t$this->obligacion\t= $r[\"ocs_id\"];\r\n\t\t\t$this->anio \t \t= $r[\"oct_anio\"];\r\n\t\t\t$this->mes \t \t\t= $r[\"oct_mes\"];\r\n\t\t\t$this->estado \t\t= $r[\"obe_id\"];\r\n\t\t\t$this->evidencia \t= $r[\"oct_evidencia\"];\r\n\t\t\t$this->gestion \t\t= $r[\"oct_gestion\"];\r\n\t\t\t$this->recomendacion= $r[\"oct_recomendacion\"];\r\n\t\t\t$this->archivo \t \t= $r[\"oct_archivo\"];\r\n\t\t}else{\r\n\t\t\t$this->obligacion\t= \"\";\r\n\t\t\t$this->anio \t \t= \"\";\r\n\t\t\t$this->mes \t \t\t= \"\";\r\n\t\t\t$this->estado \t\t= \"\";\r\n\t\t\t$this->evidencia \t= \"\";\r\n\t\t\t$this->gestion \t\t= \"\";\r\n\t\t\t$this->recomendacion= \"\";\r\n\t\t\t$this->archivo \t \t= \"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f0b08ad816903357a32e6b0ef09598eb", "score": "0.5516397", "text": "public function wypijEliksir (){\n\t\t\t\n\t\t\tif ($this->iloscEliksirow > 0){ //jeśli w ekwipunku znajdują się jakieś eliksiry to je wyświetla\n\t\t\t\n\t\t\t//funkcja sprawdza ilośc punktów akcji oraz poprawnośc wyboru\n\t\t\t\techo 'Jaki eliksir chcesz wypic?', PHP_EOL;\n\t\t\t\tfor ($i = 0; $i<$this->iloscEliksirow; $i++)\n\t\t\t\t\tif (isset($this->ekwipunek[$i])) //sprawdza, czy w ekwipunku znajduje się obiekt \n\t\t\t\t\t\techo \"$i. \".$this->ekwipunek[$i][1], PHP_EOL;\n\n\t\t\t\t$wybor = trim(fgets(STDIN));\n\t\t\t\t\n\t\t\t\tif ($wybor >= 0 && $wybor<=$i && is_numeric($wybor)){\t\t\t//funkcja is_numeric zwraca true jeśli wczytana zmienna jest liczbą\n\t\t\t\t\t$this->ekwipunek[$wybor][0]-> useElixir($this);\n\t\t\t\t\t$this->iloscEliksirow-=1; //dekrementacja ilości eliksirów\n\t\t\t\t\tunset($this->ekwipunek[$wybor]); //usuwanie objektu z ekwipunku\n\t\t\t\t\tsort($this->ekwipunek);\t\t //sortowanie tablicy na nowo\n\t\t\t\t\t\n\t\t\t\t\t$this->setPunktyAkcji($this->getPunktyAkcji()-1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo 'Podales niepoprawna wartosc!', PHP_EOL;\n\t\t\t}\n\t\t\telse\n\t\t\t\techo 'Nie posiadasz zadnego eliksiru do wypicia!', PHP_EOL;\n\t\t}", "title": "" }, { "docid": "634398da66b707189c25ae20d12eff63", "score": "0.54687965", "text": "function cl_db_cadattdinamicoatributos() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_cadattdinamicoatributos\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e656af4e1617926ee469b1dfd313b080", "score": "0.5464952", "text": "public function getKlasycznyOkresZwrotuSkumulowaneFCFE() {\n return $this->klasycznyOkresZwrotuSkumulowaneFCFE;\n }", "title": "" }, { "docid": "f974a21741ab04317bcb874d6c88a88c", "score": "0.54569614", "text": "public function dodajAlatIde() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n $akcijeSustava = new \\model\\DBAkcijaSustava(); \n \n if(post(\"naziv\") === false || post(\"skraceni\") === false || post(\"inacica\") === false || post(\"cijena\") === false || post(\"eksperiment\") === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeAlataIde\"\n )) . \"?msg=1\");\n }\n \n $pattern = '/^[A-Za-z0-9]{1,}$/u';\n $pov = $this->test_pattern($pattern, post(\"skraceni\"));\n if($pov === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeAlataIde\"\n )) . \"?msg=2\");\n }\n \n // format cijene;\n $pattern1 = '/^[0-9]{1,}\\.{0,1}[0-9]{0,}$/u';\n $pov1 = $this->test_pattern($pattern1, post(\"cijena\"));\n \n if($pov1 === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeAlataIde\"\n )) . \"?msg=4\");\n }\n \n if(post(\"checked\") == true) {\n // znaci da dodajem alat\n $alat = new \\model\\DBAlat();\n if($alat->loadSkraceniNaziv(post(\"skraceni\")) == true) {\n $id = $alat->dohvatiId(post(\"skraceni\"));\n $ostvaren = new \\model\\DBOstvaren();\n $ostvaren->idEksperimenta = post(\"eksperiment\");\n $ostvaren->idAlata = $id;\n $ostvaren->povezi($id, post(\"eksperiment\"));\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu ostvaren \" . $ostvaren->id);\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\",\n )) . \"?msg=15\");\n } else {\n $alat->naziv = post(\"naziv\");\n $alat->skraceniNaziv = post(\"skraceni\");\n $alat->inacica = post(\"inacica\");\n $alat->cijena = post(\"cijena\");\n $alat->vidljivost = 'I';\n $alat->link = NULL;\n $alat->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje alata \" . $alat->getPrimaryKey());\n \n $ostvaren = new \\model\\DBOstvaren();\n $ostvaren->idEksperimenta = post(\"eksperiment\");\n $ostvaren->idAlata = $alat->getPrimaryKey();\n $ostvaren->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu ostvaren \" . $ostvaren->id);\n }\n \n } else {\n // dodajem Ide\n // znaci da dodajem alat\n $alat = new \\model\\DBIde();\n if($alat->loadSkraceniNaziv(post(\"skraceni\")) == true) {\n $id = $alat->dohvatiId(post(\"skraceni\"));\n $uraden = new \\model\\DBUraden();\n $uraden->idEksperimenta = post(\"eksperiment\");\n $uraden->idIDE = $id;\n $uraden->povezi($id, post(\"eksperiment\"));\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu uraden \" . $uraden->id);\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\",\n )) . \"?msg=15\");\n } else {\n $alat->naziv = post(\"naziv\");\n $alat->skraceniNaziv = post(\"skraceni\");\n $alat->inacica = post(\"inacica\");\n $alat->cijena = post(\"cijena\");\n $alat->vidljivost = 'I';\n $alat->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje razvojnog okruzenja \" . $alat->getPrimaryKey());\n \n $uraden = new \\model\\DBUraden();\n $uraden->idIDE = $alat->getPrimaryKey();\n $uraden->idEksperimenta = post(\"eksperiment\");\n $uraden->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu uraden \" . $uraden->id);\n }\n }\n\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=14\");\n }", "title": "" }, { "docid": "a41470b114e174532840bf28aa1cd3ad", "score": "0.545321", "text": "public function kvaliteti_reci_pretrage()\n\t{\n\t\t\n\t\t// loop za svaku rec\n\t\tfor($kljuc_rec = 0; $kljuc_rec < count($this->niz_pretrage); $kljuc_rec++)\n\t\t{\n\t\t\t// svaka rec ima svoj kvalitet, restartovanje vrednosti\n\t\t\t$kvalitet = 0; \n\t\t\t$ukupan_broj_istih_sa_susedom = 0;\n\t\t\t$ukupan_broj_suglasnika_sa_susedom = 0;\n\n\t\t\t// loop za svako slovo reci, u istoj petlji mora da se uveceva i polje puta - $this->put_za_pretragu[$slovo] je polje \n\t\t\t$rec = $this->niz_pretrage[$kljuc_rec]['rec'];\n\n\t\t\t// loop za svako slovo reci, u istoj petlji mora da se uveceva i polje puta - $this->put_za_pretragu[$ciljano_polje] je polje \n\t\t\t// $slovo JE KLJUC SLOVA VEC BROJ SLOVA U TOJ RECI PODELJENO SA 2 jer je cirilcia dvobajtnog tipa kodiranja, ISPOD JE PRAVA VREDNOST SLOVA, TJ SPOJENI BAJTOVI \n\t\t\tfor($slovo = 0, $ciljano_polje = 0; $slovo < mb_strlen($rec, 'Windows-1251'); $slovo++, $ciljano_polje++ )\n\t\t\t{\n\t\t\t\t$slovo_sp_bajtovi = $rec[$slovo].$rec[++$slovo];\n\n\t\t\t\t// susedi tog slova, prolazi kroz svih 9, ali ne radi nista kad je 0,0 !\n\t\t\t\tfor($red = -1; $red <= 1; $red++)\n\t\t\t\t{\n\t\t\t\t\tfor($kolona = -1; $kolona <= 1; $kolona++)\n\t\t\t\t\t{\n\t\t\t\t\t\t// da li to polje uopste postoji ( kad su coskovi u pitanju)\n\t\t\t\t\t\tif(isset($this->osmosmerka_niz[$this->put_za_pretragu[$ciljano_polje][0] + $red] [$this->put_za_pretragu[$ciljano_polje][1] + $kolona]) ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// red i kolona nisu nula jer je to srednje polje kvadrata\n\t\t\t\t\t\t\tif( !($red == 0 AND $kolona == 0) ) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sused_red = $this->put_za_pretragu[$ciljano_polje][0] + $red; \n\t\t\t\t\t\t\t\t$sused_kolona = $this->put_za_pretragu[$ciljano_polje][1] + $kolona; \n\t\t\t\t\t\t\t\t$sused_polje = array ($sused_red, $sused_kolona);\n\n\t\t\t\t\t\t\t\t// slovo u susednom polju\n\t\t\t\t\t\t\t\t$posmatrano_susedno_polje = $this->osmosmerka_niz[$sused_red][$sused_kolona]; \n\n\t\t\t\t\t\t\t\tif( $posmatrano_susedno_polje === $slovo_sp_bajtovi )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$ukupan_broj_istih_sa_susedom = $ukupan_broj_istih_sa_susedom + 1;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} elseif( in_array($slovo_sp_bajtovi, $GLOBALS['suglasnici']) AND in_array($posmatrano_susedno_polje, $GLOBALS['suglasnici']) )\n\t\t\t\t\t\t\t\t{ // za slucaj gde je i slovo i sused neki od suglasnika\n\t\t\t\t\t\t\t\t\t$ukupan_broj_suglasnika_sa_susedom = $ukupan_broj_suglasnika_sa_susedom + 1;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$kvalitet = 3 * $ukupan_broj_istih_sa_susedom + 0.5 * $ukupan_broj_suglasnika_sa_susedom;\n\n\t\t\t// unos kvaliteta u niz slova\n\t\t\t$this->niz_pretrage[$kljuc_rec]['kvalitet'] = $kvalitet;\n\t\t}\n\n\t\t$najmanji_kvalitet = sortiranje_niza($this->niz_pretrage, 'kvalitet', TRUE);\n\n\t\treturn $najmanji_kvalitet; \n\t}", "title": "" }, { "docid": "c0c6676727680115f1b9c258873f0599", "score": "0.54449016", "text": "function loadOrden(){\r\n\t\t$r = $this->dr->getOrdenById($this->id);\r\n\t\tif($r != -1){\r\n\t\t\t$this->operador \t\t\t= $r['ope_id'];\r\n\t\t\t$this->fecha \t\t\t\t= $r['ord_fecha'];\r\n\t\t\t$this->numero \t\t\t\t= $r['ord_numero'];\r\n\t\t\t$this->rubro \t\t\t\t= $r['rub_id'];\r\n\t\t\t$this->concepto \t\t\t= $r['cnc_id'];\r\n\t\t\t$this->modalidad \t\t\t= $r['mod_id'];\r\n\t\t\t$this->tasa \t\t\t\t= $r['ord_tasa'];\r\n\t\t\t$this->valor_dolares \t\t= $r['ord_dolares'];\r\n\t\t\t$this->valor_pesos \t\t\t= $r['ord_pesos'];\r\n\r\n\t\t}else{\r\n\t\t\t$this->operador \t\t\t= \"\";\r\n\t\t\t$this->fecha \t\t\t\t= \"\";\r\n\t\t\t$this->numero \t\t\t\t= \"\";\r\n\t\t\t$this->rubro \t\t\t\t= \"\";\r\n\t\t\t$this->concepto \t\t\t= \"\";\r\n\t\t\t$this->modalidad \t\t\t= \"\";\r\n\t\t\t$this->tasa \t\t\t\t= \"\";\r\n\t\t\t$this->valor_dolares \t\t= \"\";\r\n\t\t\t$this->valor_pesos \t\t\t= \"\";\r\n\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cdd500d467917d79c628a21ecffd6b25", "score": "0.54364437", "text": "public function action_lekcje() {\n\t$isf = Isf2::Connect();\n\t$czaslek = App_Globals::getRegistryKey('dlugosc_lekcji');\n\n\t$isf->Delete('lek_godziny')->Execute();\n\t$isf->Update('rejestr', array('wartosc' => $_POST['czasRZH'] . ':' . $_POST['czasRZM']))\n\t\t->Where(array('opcja' => 'godz_rozp_zaj'))->Execute();\n\t$g1;\n\t$g2;\n\tforeach ($_POST['lekcja'] as $nrlek => $dlprz) {\n\t if ($nrlek == 1) {\n\t\t$g1 = $_POST['czasRZH'] . ':' . $_POST['czasRZM'];\n\t } else {\n\t\t$g1 = explode(':', $g2);\n\t\t$nl = $nrlek - 1;\n\t\t$cp = explode(':', $_POST['lekcja'][$nl]);\n\t\t$g1 = date('H:i', mktime($g1[0], $g1[1] + $cp[1]));\n\t }\n\t $g2 = explode(':', $g1);\n\t $g2 = date('H:i', mktime($g2[0], $g2[1] + $czaslek));\n\t $res = $g1 . ' - ' . $g2;\n\t $isf->Insert('lek_godziny', array(\n\t\t'lekcja' => $nrlek,\n\t\t'godzina' => $res,\n\t\t'dl_prz' => $dlprz,\n\t ))->Execute();\n\t}\n\tKohana_Request::factory()->redirect('godziny/index');\n }", "title": "" }, { "docid": "78eaa27da4520f290b39b99cce6acf5a", "score": "0.5432331", "text": "private function obtenerDatos(){\n\t\t$this->datos['lista_tipos_acciones'] = $this->DB_Accion->lista_Tipos();\n\t}", "title": "" }, { "docid": "f7682d30c9028155508b41dfc32ebdcb", "score": "0.542759", "text": "function topliObrok() {\n// return round($this->karnet->getValue('iznosTOPoDanu') *\n// $this->karnet->radniSatiOsnovnaZarada() / self::RADNI_SATI_U_DANU, 2);\n return round($this->karnet->getValue('iznosTOPoDanu') *\n $this->karnet->getValue('daniTO'), 2);\n }", "title": "" }, { "docid": "b558e5c242818683fe5e8ef0f7406416", "score": "0.5420625", "text": "public function dodavanjeVlastitogEksperimenta() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n $akcijeSustava = new \\model\\DBAkcijaSustava();\n \n if((post(\"naziv\") === false || post(\"vrijemePocetka\") === false || post(\"vrijemeZavrsetka\") === false || post(\"parametri\")=== false || post(\"rezultati\") === false) && files(\"tmp_name\", \"datoteka\") === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=1\");\n }\n \n // ako je poslana datoteka gledam samo nju\n if(files(\"tmp_name\", \"datoteka\") !== false) {\n if(function_exists('finfo_file')) {\n $finfo = \\finfo_open(FILEINFO_MIME_TYPE);\n $mime = finfo_file($finfo, files(\"tmp_name\", \"datoteka\"));\n } else {\n $mime = \\mime_content_type(files(\"tmp_name\", \"datoteka\"));\n }\n if($mime != 'text/plain') {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=2\");\n }\n \n $autori = array();\n $a = 0;\n $parametri = array();\n $p = 0;\n $rezultati = array();\n $r = 0;\n $tools = array();\n $ides = array();\n $platforms = array();\n $start = null;\n $end = null;\n $naslov = null;\n \n $handle = fopen(files(\"tmp_name\", \"datoteka\"), \"rt\");\n $naslov = fgets($handle);\n $naslov = substr($naslov, 0, strlen($naslov) - 1);\n if($naslov === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n \n while(($niz = fgets($handle)) !== FALSE) {\n $niz = substr($niz, 0, strlen($niz) - 1);\n $i = strpos($niz, \" \");\n $identifikator = substr($niz, 0, $i);\n \n switch ($identifikator) {\n case \"Author\":\n $pattern = '/^(Author) [A-ZČĆŽŠĐ][a-zčćžšđ]+ ([A-ZČĆŽŠĐ]\\. ){0,1}[A-ZČĆŽŠĐ][a-zčćžšđ]+$/u';\n if($this->test_pattern($pattern, $niz) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $s1 = strpos($niz, \" \");\n $s2 = strpos($niz, \" \", $s1 + 1);\n $s3 = strpos($niz, \" \", $s2 + 1);\n if($s3 === false) {\n $autori[$a][\"ime\"] = substr($niz, $s1 + 1, $s2 - $s1 - 1);\n $autori[$a][\"prezime\"] = substr($niz, $s2 + 1);\n } else {\n $autori[$a][\"ime\"] = substr($niz, $s1 + 1, $s2 - $s1 - 1);\n $autori[$a][\"prezime\"] = substr($niz, $s3 + 1);\n }\n $a = $a + 1;\n break;\n case \"Start\":\n $pattern = '/^Start (0[0-9]|[1-2][0-9]|3[01])\\.(0[0-9]|1[0-2])\\.([0-9]{4})\\. ([01][0-9]|2[0-4]):[0-5][0-9]$/';\n if($this->test_pattern($pattern, $niz) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $start = date(\"Y-m-d H:i:s\", strtotime($niz));\n break;\n case \"End\":\n $pattern = '/^End (0[0-9]|[1-2][0-9]|3[01])\\.(0[0-9]|1[0-2])\\.([0-9]{4})\\. ([01][0-9]|2[0-4]):[0-5][0-9]$/';\n if($this->test_pattern($pattern, $niz) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $end = date(\"Y-m-d H:i:s\", strtotime($niz));\n break;\n case \"Tool\":\n $skraceniNaziv = substr($niz, $i + 1);\n $alat = new \\model\\DBAlat();\n $idAlata = $alat->dohvatiId($skraceniNaziv);\n if($idAlata === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $tools[$idAlata] = $idAlata;\n break;\n case \"IDE\":\n $skraceniNaziv = substr($niz, $i + 1);\n $alat = new \\model\\DBIde();\n $idAlata = $alat->dohvatiId($skraceniNaziv);\n if($idAlata === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $ides[$idAlata] = $idAlata;\n break;\n case \"Platform\":\n $skraceniNaziv = substr($niz, $i + 1);\n $platforma = new \\model\\DBPlatforma();\n $pov = $platforma->select()->where(array(\n \"skraceniNaziv\" => $skraceniNaziv\n ))->fetchAll();\n\n if(count($pov)) {\n $idPlatforme = $pov[0]->idPlatforme;\n $platforms[$idPlatforme] = $idPlatforme;\n } else {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n break;\n case \"Parameter\":\n $j = strpos($niz, \" \", $i + 1);\n if($j === FALSE) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $naziv = substr($niz, $i + 1, $j - $i - 1);\n $ispitniSlucaj = substr($niz, $j + 1);\n $pattern = '/^[A-Za-z0-9]{1,}$/u';\n if($this->test_pattern($pattern, $naziv) === false || $this->test_pattern($pattern, $ispitniSlucaj) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n \n $parametri[$p][\"ispitniSlucaj\"] = $ispitniSlucaj;\n $parametri[$p][\"naziv\"] = $naziv;\n $p = $p + 1;\n break;\n case \"Value\":\n $j = strpos($niz, \" \", $i + 1);\n $k = strpos($niz, \" \", $j + 1);\n if($j === FALSE) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $naziv = substr($niz, $i + 1, $j - $i - 1);\n if($k !== false) {\n $iznos = substr($niz, $j + 1, $k - $j -1);\n $mjernaJedinica = substr($niz, $k + 1);\n $pat = '/^[A-Za-z]{1,10}$/u';\n if($this->test_pattern($pat, $mjernaJedinica) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n } else {\n $iznos = substr($niz, $j + 1);\n }\n $pattern = '/^[A-Za-z0-9]{1,}$/u';\n $pattern2 = '/^[0-9]{1,}\\.{0,1}[0-9]*$/u';\n if($this->test_pattern($pattern, $naziv) === false ||$this->test_pattern($pattern2, $iznos) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n $rezultati[$r][\"iznos\"] = $iznos;\n $parametri[$r][\"naziv\"] = $naziv;\n if ($k === false) {\n $parametri[$r][\"mjernaJedinica\"] = $mjernaJedinica;\n }else {\n $parametri[$r][\"mjernaJedinica\"] = NULL;\n }\n $r = $r + 1;\n break;\n default :\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=6\");\n }\n \n }\n fclose($handle);\n \n // unos podataka\n $autor = new \\model\\DBAutor();\n $idA = array();\n for($i = 0; $i < $a; $i = $i + 1) {\n $idA[$i] = $autor->dodajAutora($autori[$i][\"ime\"], $autori[$i][\"prezime\"]);\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje autora \" . $idA[$i]);\n }\n \n \n $eksperiment = new \\model\\DBZnanstveniEksperiment();\n $eksperiment->naziv = $naslov;\n $eksperiment->vrijemePocetka = $start;\n $eksperiment->vrijemeZavrsetka = $end;\n $eksperiment->vidljivost = \"I\";\n $eksperiment->save();\n \n $idEksperimenta = $eksperiment->getPrimaryKey();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje eksperimenta \" . $idEksperimenta);\n \n // sad zabiljezi autora\n $veza = new \\model\\DBAutorEksperimenta();\n for($j = 0; $j < $i; $j = $j + 1) {\n $veza->id = null;\n $veza->idAutora = $idA[$j];\n $veza->idEksperimenta = $idEksperimenta;\n $veza->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu autoreksperimenta \" . $veza->id);\n }\n \n // zabiljezi platformu\n if(count($platforms)) {\n foreach($platforms as $k => $v) {\n $koristi = new \\model\\DBKoristi();\n $koristi->id = null;\n $koristi->idPlatforme = $v;\n $koristi->idEksperimenta = $idEksperimenta;\n $koristi->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu koristi \" . $koristi->id);\n }\n }\n \n //zabiljezi parametre\n $parametar = new \\model\\DBParametar();\n $pripadaju = new \\model\\DBPripadaju();\n for ($i = 0; $i < $p; $i = $i + 1) {\n $idParametra = $parametar->dodajParametar($parametri[$i][\"naziv\"], $parametri[$i][\"ispitniSlucaj\"]);\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje parametra \" . $idParametra);\n $pripadaju->id = null;\n $pripadaju->idEksperimenta = $idEksperimenta;\n $pripadaju->idParametra = $idParametra;\n $pripadaju->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu pripadaju \" . $pripadaju->id);\n }\n \n // zabilježi rezultate\n $rezultat = new \\model\\DBRezultat();\n $ostvario = new \\model\\DBOstvario();\n \n for ($i = 0; $i < $r; $i = $i + 1) {\n $idRezultata = $rezultat->dodajRezultat($rezultati[$i][\"naziv\"], $rezultati[$i][\"iznos\"], $rezultati[$i][\"mjernaJedinica\"]);\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje rezultata \" . $idRezultata);\n $ostvario->id = null;\n $ostvario->idEksperimenta = $idEksperimenta;\n $ostvario->idRezultata = $idRezultata;\n $ostvario->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu ostvario \" . $ostvario->id);\n } \n \n // zabiljezi alate i ide\n if(count($tools)) {\n foreach($tools as $k => $v) {\n $ostvaren = new \\model\\DBOstvaren();\n $ostvaren->id = null;\n $ostvaren->idAlata = $v;\n $ostvaren->idEksperimenta = $idEksperimenta;\n $ostvaren->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu ostvaren \" . $ostvaren->id);\n }\n }\n \n if(count($ides)) {\n foreach($ides as $k => $v) {\n $ostvaren = new \\model\\DBUraden();\n $ostvaren->id = null;\n $ostvaren->idIDE = $v;\n $ostvaren->idEksperimenta = $idEksperimenta;\n $ostvaren->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu uraden \" . $ostvaren->id);\n }\n }\n \n // josh ga dodam u portfelj\n $portfelj = new \\model\\DBPortfelj();\n $portfelj->idKorisnika = $_SESSION['auth'];\n $portfelj->idEksperimenta = $idEksperimenta;\n $portfelj->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje eksperimenta u portfelj \" . $portfelj->idZapisa);\n } else {\n // provjera vremena:\n $pattern = '/^(0[0-9]|[1-2][0-9]|3[01])\\.(0[0-9]|1[0-2])\\.([0-9]{4})\\. ([01][0-9]|2[0-4]):[0-5][0-9]$/';\n $vrijeme1 = post(\"vrijemePocetka\");\n $vrijeme2 = post(\"vrijemeZavrsetka\");\n \n if($this->test_pattern($pattern, $vrijeme1) === false || $this->test_pattern($pattern, $vrijeme2) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=3\");\n }\n \n // provjera parametara naziv-ispitniSlucaj\n $pattern1 = '/^[A-Za-z0-9čćžđšČĆŽĐŠ]{1,}-[A-Za-z0-9čćžšđČĆŽŠĐ]{1,}$/u';\n $ispravno = true;\n $izraz = post(\"parametri\");\n if(strpos($izraz, \";\") === false) {\n if($this->test_pattern($pattern1, $izraz) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=4\");\n }\n } else {\n for($i = strpos($izraz, \";\"); $i !== false; $i = strpos($izraz, \";\")) {\n $ispravno = $this->test_pattern($pattern1, substr($izraz, 0, $i));\n $izraz = substr($izraz, $i + 1);\n if($ispravno === false) {\n break;\n }\n }\n $ispravno = $this->test_pattern($pattern1, $izraz);\n }\n \n if($ispravno === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=4\");\n }\n\n // provjera rezultata\n $pattern2 = '/^[A-Za-z0-9čćžđšČĆŽĐŠ]{1,}-[0-9]{1,}\\.{0,1}[0-9]*-[A-Za-z]{1,10}$/u';\n $ispravno = true;\n $izraz2 = post(\"rezultati\");\n if(strpos($izraz2, \";\") === false) {\n if($this->test_pattern($pattern2, $izraz2) === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=5\");\n }\n } else {\n for($i = strpos($izraz2, \";\"); $i !== false; $i = strpos($izraz2, \";\")) {\n $ispravno = $this->test_pattern($pattern2, substr($izraz2, 0, $i));\n $izraz2 = substr($izraz2, $i + 1);\n if($ispravno === false) {\n break;\n }\n }\n $ispravno = $this->test_pattern($pattern2, $izraz2);\n \n }\n \n if($ispravno === false) {\n preusmjeri(\\route\\Route::get('d3')->generate(array(\n \"controller\" => \"korisnik\",\n \"action\" => \"displayDodavanjeVlastitogEksperimenta\"\n )) . \"?msg=5\");\n }\n \n // sve provjereno sad dodajem u bazu\n $korisnik = new \\model\\DBKorisnik();\n try {\n $korisnik->load($_SESSION['auth']);\n } catch (opp\\model\\NotFoundException $e) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n \n $autor = new \\model\\DBAutor();\n $idAutora = $autor->dodajAutora($korisnik->ime, $korisnik->prezime);\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje autora \" . $idAutora);\n \n $eksperiment = new \\model\\DBZnanstveniEksperiment();\n $eksperiment->naziv = post(\"naziv\");\n $eksperiment->vrijemePocetka = date(\"Y-m-d H:i:s\", strtotime(post(\"vrijemePocetka\")));\n $eksperiment->vrijemeZavrsetka = date(\"Y-m-d H:i:s\", strtotime(post(\"vrijemeZavrsetka\")));\n $eksperiment->vidljivost = \"I\";\n $eksperiment->save();\n \n $idEksperimenta = $eksperiment->getPrimaryKey();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje eksperimenta \" . $idEksperimenta);\n \n // sad zabiljezi autora\n $veza = new \\model\\DBAutorEksperimenta();\n $veza->idAutora = $idAutora;\n $veza->idEksperimenta = $idEksperimenta;\n $veza->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu autoreksperimenta \" . $veza->id);\n \n // zabiljezi platformu\n if(post(\"platforma\") !== false) {\n $koristi = new \\model\\DBKoristi();\n $koristi->idPlatforme = post(\"platforma\");\n $koristi->idEksperimenta = $idEksperimenta;\n $koristi->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu koristi \" . $koristi->id);\n }\n \n //zabiljezi parametre\n $parametar = new \\model\\DBParametar();\n $pripadaju = new \\model\\DBPripadaju();\n $izraz = post(\"parametri\");\n for($i = strpos($izraz, \";\"); $i !== false; $i = strpos($izraz, \";\")) {\n $j = strpos($izraz, \"-\");\n $idParametra = $parametar->dodajParametar(substr($izraz, 0, $j), substr($izraz, $j + 1, $i - $j - 1));\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje parametra \" . $idParametra);\n $pripadaju->id = null;\n $pripadaju->idParametra = $idParametra;\n $pripadaju->idEksperimenta = $idEksperimenta;\n $pripadaju->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu pripadaju \" . $pripadaju->id);\n $izraz = substr($izraz, $i + 1);\n }\n $j = strpos($izraz, \"-\");\n $idParametra = $parametar->dodajParametar(substr($izraz, 0, $j), substr($izraz, $j + 1));\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje parametra \" . $idParametra);\n $pripadaju->id = null;\n $pripadaju->idParametra = $idParametra;\n $pripadaju->idEksperimenta = $idEksperimenta;\n $pripadaju->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu pripadaju \" . $pripadaju->id);\n \n // zabilježi rezultate\n $rezultat = new \\model\\DBRezultat();\n $ostvario = new \\model\\DBOstvario();\n \n $izraz = post(\"rezultati\");\n for($i = strpos($izraz, \";\"); $i !== false; $i = strpos($izraz, \";\")) {\n $j = strpos($izraz, \"-\");\n $k = strpos($izraz, \"-\", $j + 1);\n $idRezultata = $rezultat->dodajRezultat(substr($izraz, 0, $j), substr($izraz, $j + 1, $k - $j - 1), substr($izraz, $k + 1, $i - $k - 1));\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje rezultata \" . $idRezultata);\n $ostvario->id = null;\n $ostvario->idRezultata = $idRezultata;\n $ostvario->idEksperimenta = $idEksperimenta;\n $ostvario->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu ostvario \" . $ostvario->id);\n $izraz = substr($izraz, $i + 1);\n }\n $j = strpos($izraz, \"-\");\n $k = strpos($izraz, \"-\", $j + 1);\n $idRezultata = $rezultat->dodajRezultat(substr($izraz, 0, $j), substr($izraz, $j + 1, $k - $j - 1), substr($izraz, $k + 1));\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje rezultata \" . $idRezultata);\n $ostvario->id = null;\n $ostvario->idRezultata = $idRezultata;\n $ostvario->idEksperimenta = $idEksperimenta;\n $ostvario->save(); \n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje zapisa u tablicu ostvario \" . $ostvario->id);\n \n // josh ga dodam u portfelj\n $portfelj = new \\model\\DBPortfelj();\n $portfelj->idKorisnika = $_SESSION['auth'];\n $portfelj->idEksperimenta = $idEksperimenta;\n $portfelj->save();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Dodavanje eksperimenta u portfelj \" . $portfelj->idZapisa);\n }\n \n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=14\");\n }", "title": "" }, { "docid": "d113ddae286bace2d5ee3e862c4e68dd", "score": "0.53951347", "text": "function zobrazSeznam(){\n$seznam = $_GET['seznam'];\n$uzivatel = $_SESSION['prihlaseny_id'];\n$dotaz = dibi::select('*')\n->from('ukoly')\n->join('uzivatele')\n->on('ukol_uzivatel = uzivatel_id')\n->join('seznam')\n->on('ukol_seznam = seznam_id')\n->where('ukol_hotovo=%i', '0')\n->where('ukol_seznam=%i', $seznam) // podminka, ze ukol musi byt nesplneny. Jinak se nevypise\n->where('ukol_uzivatel=%i', $uzivatel)\n->fetchAll();\n$pocetU = count($dotaz);\n\nif($pocetU == 0) // zjisteni kolik je pridano ukolu. Pokud 0 vypise se hlaska\n{\necho '<div id=\"content\"><h2>Úkoly</h2>\n<strong>Žádné úkoly, nebyly zatím přidány</strong><br />';\nformularPridatU();\necho '</div>';\n}// Pokud je uz nejaky ukol pridan, tak se zobrazi tabulka s ukolama\nelse { \n?>\n<div id=\"content\"><h2>Úkoly</h2>\n<table>\n<tr>\n<th><strong>Jméno úkolu</strong></th><th><strong>Zpracovatel</strong></th><th><strong>Seznam</strong></th><th><strong>Termín</strong></th>\n</tr>\n<?php\nforeach ($dotaz as $radek) {\n?>\n<tr>\n<th><?php echo '<a href=\"index.php?ukoly=' . $radek['ukol_id'] . '\">' . htmlspecialchars($radek['ukol_jmeno']) . '</a>'; ?>\n\t<th><?php echo htmlspecialchars($radek['uzivatel_jmeno']); ?></th><th><?php echo $radek['seznam_jmeno'] ?></th><th><?php echo date(\"d.m.Y\", strtotime($radek['ukol_datumD'])); ?></th>\n</tr>\n<?php\n}\necho '</table>';\nformularPridatU(); // prida na stranku formular pro pridani ukolu (asi to do budoucna zmenim a bude to na nove strance)\necho '</div>';\n}\n}", "title": "" }, { "docid": "078e5dd9abef6bcd67f79ad02f1a3692", "score": "0.5389067", "text": "public function prijedlogRada() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n if((post(\"skup\") === false && post(\"casopis\") === false && post(\"tekst\") === false)){\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=11\");\n }\n \n if(post(\"url\") === false && files('tmp_name', \"datoteka\") === false) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=10\");\n }\n \n $prijedlog = new \\model\\DBPrijedlozi();\n \n //provjeri je li pdf\n if(files(\"tmp_name\", \"datoteka\") !== false) {\n if(function_exists('finfo_file')) {\n $finfo = \\finfo_open(FILEINFO_MIME_TYPE);\n $mime = finfo_file($finfo, files(\"tmp_name\", \"datoteka\"));\n } else {\n $mime = \\mime_content_type(files(\"tmp_name\", \"datoteka\"));\n }\n if($mime != 'application/pdf') {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=13\");\n }\n //$prijedlog->lokacija = ;\n // snimam ga nakon ovoga u formatu idPrijedloga.pdf\n } else {\n $prijedlog->lokacija = post(\"url\", null);\n }\n\n // spremi prijedlog\n $prijedlog->idKorisnika = $_SESSION['auth'];\n $prijedlog->naslov = post(\"naslov\", null);\n $prijedlog->sazetak = post(\"sazetak\", null);\n $prijedlog->autori = post(\"autori\", null);\n $prijedlog->kljucneRijeci = post(\"tag\", null);\n \n $prijedlog->idSkupa = post(\"skup\", null);\n $prijedlog->idCasopisa = post(\"casopis\", null);\n $prijedlog->tekst = post(\"tekst\", null);\n \n $prijedlog->save();\n $akcijeSustava = new \\model\\DBAkcijaSustava();\n $akcijeSustava->zabiljeziNovuAkciju($_SESSION['auth'], date(\"Y-m-d H:i:s\"), \"Predlaze rad - idPrijedloga je \" . $prijedlog->getPrimaryKey());\n \n if(files(\"tmp_name\", \"datoteka\") !== false) {\n $destination = \"./pdf/prijedlog\" . $prijedlog->getPrimaryKey() . \".pdf\";\n if(false === move_uploaded_file(files(\"tmp_name\", \"datoteka\"), $destination)) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=13\");\n }\n $prijedlog->lokacija = $destination;\n $prijedlog->save();\n }\n \n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=12\");\n }", "title": "" }, { "docid": "bccca7d6967de4a3f193faf59c289e10", "score": "0.5387649", "text": "public static function cari_kurir($param,$jenis=\"baru\"){\n // tidak pernah nolak id order ini sebelumnya dan\n // sedang aktif\n // outputnya id kurir\n $kurirs = [];\n if($jenis == \"baru\"){\n // untuk pesanan baru\n $kurirs = Kurir::where(\"mode\",\"aktif\")->where(\"sesi_login_aktif\",\"ya\")->get();\n }else{\n // untuk mencari kurir lagi setelah kurir yang dipilih sebelumnya menolak\n $kurir_penolak = Order_Kurir::where(\"id_order\",$param['id_order'])->where(\"aksi\",\"Tolak\")->pluck('id_kurir')->toArray();\n $kurirs = Kurir::where(\"mode\",\"aktif\")->where(\"sesi_login_aktif\",\"ya\")->whereNotIn('id_kurir',$kurir_penolak)->get();\n }\n\n $id_kurir_terdekat = -1; // tidak ada kurir\n $jarak_terdekat = 999999;\n $alamat = '';\n foreach ($kurirs as $key => $kurir) {\n foreach ($kurir->kordinat as $key_kordinat => $kordinat_value) {\n $latitude_kurir = doubleval(explode(',', $kordinat_value->kordinat)[0]);\n $longitude_kurir = doubleval(explode(',', $kordinat_value->kordinat)[1]);\n $jarak = Distance::haversine_circle_distance([$latitude_kurir,$longitude_kurir],[doubleval(explode(\",\", $param['kordinat_order'])[0]),doubleval(explode(\",\", $param['kordinat_order'])[1])]);\n if($jarak < $jarak_terdekat){\n $jarak_terdekat = $jarak;\n $id_kurir_terdekat = $kurir->id_kurir;\n $alamat = $kordinat_value->alamat;\n }\n }\n }\n\n return $id_kurir_terdekat; \n }", "title": "" }, { "docid": "79f281823df207ff0412b447f3a0c56c", "score": "0.5385101", "text": "public function todosLosDatos() {//funcion que muestra todos los datos....\n try {\n $sql = \"select * from usuarios;\"; //consulta\n $this->resultado = $this->cnx->query($sql) or die($sql); //el resultado de la consulta se lo metemos al atributo\n $this->resultado->setFetchMode(PDO::FETCH_ASSOC); //para mostrar solo los resultados asociativos y no los numericos\n foreach ($this->resultado as $fila) {// recorremos el array resultante\n /* aqui si quisieramos sabiendo que este foreach nos devuelve un array con todos los campos\n * es decir Array ( [usuario] => lito [pass] => 827ccb0eea8a706c4c34a16891f84e7b [estado] => A\n * [puntos] => 30 [regentrada] => 6 [regpalomitas]\n * => 12 [premios] => 18 [dni] => 234234234 [fecha] => 2012-11-23 ).\n * si aqui quisieramos ver los puntos hariamos lo siguiente:\n * echo($fila[puntos]); \n */\n foreach ($fila as $key => $value) {\n\n echo($key . \"=\" . $value . \"<br>\");\n /*\n * si quisieramos ver solo el usuario hariamos esto.... \n * if ($key == \"usuario\") {\n echo($key . \" = \" . $value . \"<br>\"); // imprimimos\n } */\n }\n }\n } catch (PDOException $ex) {\n echo (\"Conexion Error\" . $ex->getMessage());\n }\n }", "title": "" }, { "docid": "2814219cc195f12b2106cb23e546fc68", "score": "0.53845865", "text": "protected function obtenerDatos() { \n Misc::use_helper('Misc');\n \n //Iniciando Variables\n $alumno_id = -1;\n $cuenta_id = -1;\n $vista_id = 1; // default para vista DIARIO\n $division_id =0;\n $carrera_id = 0;\n $datos = array();\n $idxAlumno= array(); \n $aFeriado = array();\n $aIntervalo = array(); \n $optionsDivision = array();\n $optionsCarrera = array();\n $aTemp = array();\n $aFechaTemp = array();\n $aTipoasistencias = array();\n $aPorcentajeAsistencia = array();\n $flag_error = 0;\n $nombre_completo_archivo = \"\";\n $bool_gd = array_search(\"gd\", get_loaded_extensions());\n\n // Tomando los datos del formulario y completando variable\n $ciclolectivo_id = $this->getUser()->getAttribute('fk_ciclolectivo_id'); \n $ciclolectivo = CiclolectivoPeer::retrieveByPK($ciclolectivo_id);\n\n $ciclolectivo_fecha_inicio = strtotime($ciclolectivo->getFechaInicio());\n $ciclolectivo_fecha_fin = strtotime($ciclolectivo->getFechaFin());\n\n // Asigno la fecha de inicio del ciclo lectivo por defecto\n $aFechaActual = getdate($ciclolectivo_fecha_inicio);\n\n // Tomo el año de la fecha de inicio y de fin del ciclo lectivo\n $anio_desde = date(\"Y\",$ciclolectivo_fecha_inicio);\n $anio_hasta = date(\"Y\",$ciclolectivo_fecha_fin);\n \n if ($this->getRequestParameter('dia')) {\n $d = $this->getRequestParameter('dia');\n }\n else\n $d = $aFechaActual['mday'];\n \n if ($this->getRequestParameter('mes')) {\n $m = $this->getRequestParameter('mes');\n }\n else\n $m = $aFechaActual['mon'];\n\n if ($this->getRequestParameter('ano')) {\n $y = $this->getRequestParameter('ano');\n }\n else\n $y = $aFechaActual['year'];\n\n\n if ($this->getRequestParameter('alumno_id')) {\n $alumno_id = $this->getRequestParameter('alumno_id'); \n $a = AlumnoPeer::retrieveByPK($alumno_id);\n $cuenta_id = $a->getFkCuentaId();\n }\n\n if($this->getRequestParameter('carrera_id')) {\n $carrera_id = $this->getRequestParameter('carrera_id');\n }\n \n if ($this->getRequestParameter('vistas')) {\n $vista_id = $this->getRequestParameter('vistas'); \n }\n\n $establecimiento_id = $this->getUser()->getAttribute('fk_establecimiento_id');\n\n $criteria = new Criteria();\n $criteria->add(AnioPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);\n \n if ($this->getRequestParameter('alumno_id')) {\n $criteria->add(RelAlumnoDivisionPeer::FK_ALUMNO_ID, $alumno_id);\n $criteria->addJoin(RelAlumnoDivisionPeer::FK_DIVISION_ID, DivisionPeer::ID );\n }\n\n if($this->getRequestParameter('carrera_id')) {\n $criteria->add(AnioPeer::FK_CARRERA_ID, $carrera_id);\n }\n\n\n $criteria->addAscendingOrderByColumn(AnioPeer::DESCRIPCION);\n $criteria->addAscendingOrderByColumn(DivisionPeer::ORDEN); \n $criteria->addAscendingOrderByColumn(DivisionPeer::DESCRIPCION);\n $divisiones = DivisionPeer::doSelectJoinAnio($criteria); // divisiones a mostrar\n\n foreach ($divisiones as $division)\n $optionsDivision[$division->getId()] = $division->__toString();\n\n if ($this->getRequestParameter('division_id')) {\n $division_id = $this->getRequestParameter('division_id'); \n } else {\n if (count($optionsDivision) > 0){\n $aTemp = array_keys($optionsDivision); \n $division_id = $aTemp[0];\n } else {\n // Ver si se puede hacer desde el validate\n $this->getRequest()->setError('Division', 'No hay Ninguna División cargada');\n $flag_error = 1;\n }\n }\n\n $cCarrera = new Criteria();\n $cCarrera->add(CarreraPeer::FK_ESTABLECIMIENTO_ID, $establecimiento_id);\n $carreras = CarreraPeer::doSelect($cCarrera);\n foreach($carreras as $carrera) {\n $optionsCarrera[$carrera->getId()] = $carrera->getDescripcion();\n }\n\n\n if(!checkdate($m,$d,$y)) {\n // Ver si se puede hacer desde el validate\n $this->getRequest()->setError('Fecha', 'La fecha ingresada es erronea');\n $flag_error = 1;\n } \n \n if($flag_error == 0) {\n // devuelve un intervalo de dias según vista y fecha seleccionada\n $aIntervalo = diasxintervalo($d, $m, $y, $vista_id); \n\n // chequeo si el intervalo de fechas generados esta o no dentro de las fechas validas del ciclo lectivo\n foreach($aIntervalo as $fecha) {\n $fecha_intervalo = strtotime($fecha);\n if($fecha_intervalo >= $ciclolectivo_fecha_inicio AND $fecha_intervalo <= $ciclolectivo_fecha_fin) {\n $aFechaTemp[] = $fecha;\n }\n }\n $aIntervalo = $aFechaTemp;\n }\n\n // obteniendo los feriados actuales\n $criteria = new Criteria();\n $feriados = FeriadoPeer::doSelect($criteria); \n foreach($feriados as $feriado) {\n $aFeriado[$feriado->getFecha()] = $feriado->getNombre(); \n }\n\n // esto deberia estar hecho muy diferente guardar en un /tmp con archivo aleatorio\n if(file_exists(sfConfig::get('sf_upload_dir_name').'/grafico_asistencias.png'))\n unlink(sfConfig::get('sf_upload_dir_name').'/grafico_asistencias.png');\n\n if(count($aIntervalo) > 0 ) {\n //Obtener los alumnos de la division y asistencias en el rango de fecha\n //$con = sfContext::getInstance()->getDatabaseConnection($connection='propel');\n $con = Propel::getConnection();\n $s = \"SELECT alumno.id, alumno.nombre, alumno.apellido, alumno.apellido_materno,\";\n $s .= \"tipoasistencia.descripcion, tipoasistencia.nombre AS asistencia, asistencia.fecha,\";\n $s .= \"asistencia.fk_tipoasistencia_id \";\n $s .= \"FROM alumno, rel_alumno_division \";\n $s .= \"LEFT JOIN asistencia ON ( rel_alumno_division.FK_ALUMNO_ID = asistencia.FK_ALUMNO_ID \";\n $s .= \"AND asistencia.FECHA \";\n $s .= \"IN (\";\n\n for($i=0, $max = count($aIntervalo); $i < $max ;$i++) { \n $s .= \"'\".$aIntervalo[$i].\" 00:00:00'\";\n if ($i < count($aIntervalo)-1 ) {\n $s .= \",\";\n }\n }\n\n $s .= \") ) \";\n $s .= \"LEFT JOIN tipoasistencia ON ( asistencia.FK_TIPOASISTENCIA_ID = tipoasistencia.ID ) \";\n $s .= \"WHERE \";\n\n if ($alumno_id >= 0) {\n $s .= \"alumno.ID =\".$alumno_id;\n } else {\n $s .= \"rel_alumno_division.FK_DIVISION_ID =\". $division_id;\n }\n\n $s .= \" AND rel_alumno_division.FK_ALUMNO_ID = alumno.ID\"; \n $s .= \" ORDER BY alumno.apellido,alumno.apellido_materno,alumno.nombre,asistencia.FECHA\";\n \n $stmt = $con->prepare($s);\n $alumnos = $stmt->execute();\n \n $totales = array(); \n $tot = 0;\n while($alumno = $stmt->fetch(PDO::FETCH_ASSOC)) { \n\n $idxAlumno[$alumno['id']] = $alumno['apellido'].\" \".$alumno['apellido_materno'].\" \". $alumno['nombre'];\n if ($alumno['fecha']) { \n $datos[$alumno['id']][$alumno['fecha']] = $alumno['asistencia'];\n @$totales[$alumno['asistencia']]++;\n }\n }\n $aTipoasistencias = $this->getTiposasistencias();\n $aPorcentajeAsistencia = array();\n $flag = 0;\n\n // cantidad de fechas sin fines de semana\n $cantFechas = 0;\n foreach($aIntervalo as $fecha) {\n if( !(date(\"w\",strtotime($fecha)) == 6) AND !(date(\"w\",strtotime($fecha)) == 0) ) {\n $cantFechas++;\n }\n }\n\n $dias = $cantFechas*count($idxAlumno);\n foreach($aTipoasistencias as $idx => $Tipoasistencia) {\n $aPorcentajeAsistencia[$idx] = isset($totales[$idx])?number_format($totales[$idx]*100/$dias,2):number_format(0,2);\n $tot += isset($totales[$idx])?number_format($totales[$idx],2):number_format(0,2);\n if($aPorcentajeAsistencia[$idx] != 0) $flag = 1;\n }\n\n if($flag == 1) {\n\n $aTitulo = array_keys($aTipoasistencias);\n $aTitulo[] = \"No Cargado\";\n\n if($bool_gd) { // Si no tiene cargado la GD no muestra el grafico\n\n // Genera nombre de archivo único\n $nombre_archivo = uniqid();\n $nombre_completo_archivo = $nombre_archivo.'.jpg';\n\n // nueva clase para grafico de tortas\n $graph = new ezcGraphPieChart();\n\n // uso driver GD pero podria ser SVG o Ming\n $graph->driver = new ezcGraphGdDriver();\n $graph->driver->options->supersampling = 1;\n $graph->driver->options->jpegQuality = 100;\n $graph->driver->options->imageFormat = IMG_JPEG;\n\n\n // Color de fondo del grafico\n $graph->background->color = '#FFFFFF';\n\n // De donde sacar la letra\n $graph->options->font = realpath(sfConfig::get('sf_lib_dir').\"/font/FreeSerifBold.ttf\");\n $graph->options->font->maxFontSize = 9;\n\n // $graph->title = \"Asistencia\";\n\n // Cargo datos de la asistencia\n $graph->data['Asistencia'] = new ezcGraphArrayDataSet( $aPorcentajeAsistencia );\n\n // tamaño del symbolo de la lista\n $graph->legend->symbolSize = 10;\n\n // se selecciona las opciones graficas\n $graph->renderer = new ezcGraphRenderer3d();\n $graph->renderer->options->moveOut = .01;\n $graph->renderer->options->pieChartShadowSize = 10;\n // $graph->renderer->options->pieChartGleam = .5;\n $graph->renderer->options->dataBorder = false;\n $graph->renderer->options->pieChartHeight = 16;\n $graph->renderer->options->legendSymbolGleam = .5;\n\n //graba archivo de imagen\n $graph->render( 400, 250, sfConfig::get('app_alba_tmpdir').DIRECTORY_SEPARATOR.$nombre_completo_archivo );\n } \n }\n } \n\n //Asignacion de variables para el template\n\n $this->bool_tmp = is_writable(sfConfig::get('app_alba_tmpdir'));\n $this->bool_gd = $bool_gd;\n $this->nombre_completo_archivo = $nombre_completo_archivo;\n $this->d = $d;\n $this->m = $m;\n $this->y = $y;\n $this->aTipoasistencias = $aTipoasistencias;\n $this->aAlumnos = $idxAlumno;\n $this->aDatos = $datos;\n $this->optionsDivision = $optionsDivision;\n $this->optionsCarrera = $optionsCarrera;\n $this->aVistas = repeticiones();\n $this->aMeses = Meses();\n $this->aIntervalo = $aIntervalo;\n $this->aPorcentajeAsistencia = $aPorcentajeAsistencia;\n $this->aFeriado = $aFeriado;\n $this->alumno_id = $alumno_id;\n $this->cuenta_id = $cuenta_id;\n $this->vista_id = $vista_id;\n $this->division_id = $division_id;\n $this->carrera_id = $carrera_id;\n $this->anio_desde = $anio_desde;\n $this->anio_hasta = $anio_hasta;\n }", "title": "" }, { "docid": "8ada5db26654796cd4e5369f063da8a5", "score": "0.53811336", "text": "public function uloz()\n\t{\n\t\t$dbh = Projektor_Container::getDbh(Framework_Config::DATABAZE_PROJEKTOR);\n\n\t\tif($this->id == null)\n\t\t{\n\t\t\t$query = \"INSERT INTO ~1 (~2, ~3, ~4, ~5, ~6, ~7, ~8, ~9) VALUES (:10, :11, :12, :13, :14, :15, :16, :17)\";\n\t\t\treturn $dbh->prepare($query)->execute(\n\t\t\tself::TABULKA, self::JMENO, self::PRIJMENI, self::TELEFON_PRACE, self::TELEFON_MOBIL, self::NAZEV_ODBORU, self::INFO_PUBLIC, self::INFO_MANAGER, self::ID_S_FIRMA_FK,\n\t\t\t$this->jmeno, $this->prijmeni, $this->telefonPrace, $this->telefonMobil, $this->nazevOdboru, $this->infoPublic, $this->infoManager, $this->idSFirmaFK\n\t\t\t)->last_insert_id();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"UPDATE ~1 SET ~2=:3, ~4=:5, ~6=:7, ~8=:9, ~10=:11, ~12=:13, ~14=:15, ~16=:17, WHERE ~18=:19\";\n\t\t\t$dbh->prepare($query)->execute(\n\t\t\tself::TABULKA, self::JMENO, $this->jmeno,\n\t\t\tself::PRIJMENI, $this->prijmeni,\n\t\t\tself::TELEFON_PRACE, $this->telefonPrace,\n\t\t\tself::TELEFON_MOBIL, $this->telefonMobil,\n\t\t\tself::NAZEV_ODBORU, $this->nazevOdboru,\n\t\t\tself::ID_S_FIRMA_FK, $this->idSFirmaFK,\n\t\t\tself::INFO_PUBLIC, $this->infoPublic,\n\t\t\tself::INFO_MANAGER, $this->infoManager,\n\t\t\tself::ID, $this->id\n\t\t\t);\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "8d0cf854d20a147dfdfdc5e6c13c160d", "score": "0.5375103", "text": "function obtenerMetodosSinLogin(){\n $query =\"select id_metodo,id_objeto,objeto,metodo,loggin,id_perfil,clave_perfil,perfil,id_componente,componente\n from vj_acceso_metodos where loggin=0\";\n $accesoMetodos = $this->bd->obtenerDataCompleta($query);\n\t\t\n\t\tforeach ($accesoMetodos as $key => $valores) {\n\t\t\t$valores = Arrays::convertirAObjeto($valores);\n\t\t\t$this->acl[$valores->componente]['objetos'][$valores->objeto]['nombre']=$valores->objeto;\n\t\t\t$this->acl[$valores->componente]['objetos'][$valores->objeto]['metodos'][$valores->metodo]=$valores->metodo;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4313d0f86ec29efb07e9601ad6719998", "score": "0.53732246", "text": "function ExibeDados(){\r\n\t\t\r\n\t\techo 'Codigo: ' . $this->Codigo .\"<br>\\n\";\r\n\t\techo 'Descricao: ' . $this->Descricao .\"<br>\\n\";\r\n\t\techo 'Preco: ' . $this->Preco .\"<br>\\n\";\r\n\t\techo 'Fornecedor: '. $this->Fornecedor->Nome .\"<br>\\n\";\r\n\t\t\r\n\t\t//atribui a um fornecedor ao produto \r\n\t\tfunction setFornecedor(Fornecedor $fornecedor){\r\n\t\t\t\r\n\t\t\t$this->Fornecedor = $fornecedor; //associação interna \r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "340e0f0c8a5df8d8a5545bff2ef10eea", "score": "0.535386", "text": "function zaradaVojnaVezba() {\n return round($this->karnet->getValue('satiVojnaVezba') * $this->karnet->getValue('prosek3Meseca'), 2);\n }", "title": "" }, { "docid": "41529a884bfca50cf34698383dca3d23", "score": "0.53500855", "text": "public function getSkole(){\n\t\t\t/**\n\t\t\t*\t@var array $result - rezultat selekcije tabele skola\n\t\t\t*/\n\t\t\t$result = $this->db->get(\"skola\");\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "d3944c8a74ca09471f7420274da45a32", "score": "0.5348254", "text": "function tampil_data2()\n {\n return $this->db->get('tb_penulis');\n }", "title": "" }, { "docid": "7531c7f9a7328dd8ce15b6fecd5a7db3", "score": "0.53465855", "text": "function getObjectif() {\n\n $bdd = parent::getBdd();\n\t\t\n\t\t$sql =parent:: SELECT('* ');\n\t\t$sql .= parent::FROM('objectif_specifique');\n\t\t$sql .= parent::ORDERBY('id');\n\t\t\n $datas = $bdd->query($sql);\n\t\t\n\t\t$resultat = $datas->fetchAll(PDO::FETCH_OBJ);\n \n\t\t\n return $resultat ; // Accès au résultat\n }", "title": "" }, { "docid": "1a72dcb8cbe09cc3d2927f1de54da58a", "score": "0.5345596", "text": "function __construct() {\n // Construct = fungsi yang otomatis kepanggil\n // Membuat koneksi turunan dari class (file) KoneksiModel.php\n $bukaKoneksi = new KoneksiModel(); // << class dari file KoneksiModel.php\n $this->panggilKoneksi = $bukaKoneksi->KoneksiDatabase();\n return $this->panggilKoneksi;\n }", "title": "" }, { "docid": "aa2094811513ba7c49bf4fb1a50c05e6", "score": "0.5343078", "text": "public static function getAndSavePrzesylkiZagraniczne() {\n\n $przesylka_pocztowa_pozstale_kraje = PrzesylkiZagraniczne::getPrzesylkaPocztowaPozstaleKraje();\n foreach ($przesylka_pocztowa_pozstale_kraje as $rest_country) {\n PrzesylkaPoleconaZagraniczna::insert([\n 'unique_id' => $rest_country->unique_id,\n 'masa' => $rest_country->masa,\n 'kraj' => $rest_country->kraj,\n 'usluga' => $rest_country->usluga,\n 'date' =>$rest_country->date,\n ]);\n }\n $przesylka_pocztowa_zagraniczna = PrzesylkiZagraniczne::getPrzesylkaPocztowaZagraniczna();\n foreach ($przesylka_pocztowa_zagraniczna as $row) {\n PrzesylkaPoleconaZagraniczna::insert([\n 'unique_id' => $row->unique_id,\n 'masa' => $row->masa,\n 'kraj' => $row->kraj,\n 'usluga' => $row->usluga,\n 'date' =>$row->date,\n ]);\n }\n }", "title": "" }, { "docid": "1ad97549d1b49c6a2c892ce073c38d5e", "score": "0.5341384", "text": "function ukupnoObustave() {\n $mesec = $this->payment->getValue('mesec');\n $godina = $this->payment->getValue('godina');\n $tipObracuna = $this->payment->getValue('tipObracuna');\n $employeID = $this->employe->getValue('id');\n \n $nizObustava = DeductionDB::ucitajSveZaObracun($employeID, $mesec, $godina, $tipObracuna);\n return $this->sumObustave($nizObustava, $mesec, $godina, $tipObracuna);\n }", "title": "" }, { "docid": "c7fd304acb7aa1a44a4ab1b90976fba2", "score": "0.5338427", "text": "public function ambil_data_lokasi_penjual()\n\t{\n\t\t$data_penjual = $this->penjual->ambil_lokasi_usaha();\n\t\t// echo $this->db->last_query();\n\t\t// exit();\n\t\theader(\"Content-type: application/json\");\n\t\techo json_encode($data_penjual->result_array(), JSON_PRETTY_PRINT);\n\t}", "title": "" }, { "docid": "325784c9865adefdd44cf47024067ead", "score": "0.5332972", "text": "function dataPangkat() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM jabatan WHERE jenis ='pangkat'\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}", "title": "" }, { "docid": "8c13f7b38f8c05e9315047354c7aaf52", "score": "0.5331403", "text": "private function affiche()\n\t{\n\t}", "title": "" }, { "docid": "6a42ba63afe3c1847e02ffc92943ae3b", "score": "0.53290325", "text": "function TurDatum ()\n {\n $this->tablename = 'TurDatum';\n $this->dbname = 'expabtrans_se';\n $this->rows_per_page = 10;\n $this->fieldlist = array('TurID', 'StartDatum', 'SlutDatum');\n //$this->fieldlist['TurID'] = array('ukey' => 'y');\n $this->fieldlist['TurID'] = array('pkey' => 'y');\n // $this->fieldlist['SlutDatum'] = array('pkey' => 'y');\n }", "title": "" }, { "docid": "495d15b1a1600c380ebc265619bfdc68", "score": "0.5328703", "text": "function tim_kiem ($tu_khoa)\r\n\t{\r\n\t\t//$this->setQuery($sql);\r\n\t\treturn $this->loadAllRow();\t\r\n\t}", "title": "" }, { "docid": "81c1e9f90eaa6c71db716c4f52acc746", "score": "0.5326509", "text": "public function setRynkowaWartoscKapitaluWlasnegoProcent() {\n $this->rynkowaWartoscKapitaluWlasnegoProcent = $this->szacunekWartosciKapitaluWlasnegoSuma / ($this->szacunekWartosciKapitaluWlasnegoSuma + $this->bilansTablica[$this->rok0][105]);\n }", "title": "" }, { "docid": "75e6184b0dd520f39a44a98aba8cf10b", "score": "0.5316446", "text": "public function posalji($idKli){\n $model = new MenadzerModel();\n $menadzer = $model->getManagersByUsername($this->session->get('username'))[0];\n $kormodel=new \\App\\Models\\KorisnikModel();\n $klijent=$kormodel->getUsersByUsername($idKli)[0];\n $txt = $this->request->getVar('porukica');\n if ($txt==null || $txt==\"\"){\n $greska = \"Greska! Prazna poruka.\";\n return $this->chat($idKli);\n }\n \n $caskanjeModel=new \\App\\Models\\CaskanjeModel();\n \n if($caskanjeModel->checkIfExists($klijent->idKor, $menadzer->idKor)==false){\n $caskanje=[\n 'idKli'=>$klijent->idKor,\n 'idMen'=>$menadzer->idKor\n ];\n // return $klijent->idKor.$idMen;\n $caskanjeModel->insert($caskanje);\n }\n \n \n \n \n $date = new \\DateTime();\n $string = $date->format('Y-m-d H:i:s');\n $mess = [\n 'idMen'=>$menadzer->idKor,\n 'idKli'=>$klijent->idKor,\n 'tekst'=>$txt,\n 'status_poruke'=>'Poslata',\n \"poslata_od\"=>\"Menadzera\",\n 'datum_vreme_slanja'=>$string\n ];\n $porukaModel=new \\App\\Models\\PorukaModel();\n $porukaModel->insert($mess);\n \n return $this->chat($idKli);\n }", "title": "" }, { "docid": "a285273ae344d14255f52abaf926a624", "score": "0.53147346", "text": "public function displayPredlaganjeKorekcije() {\n if (!\\model\\DBKorisnik::isLoggedIn() || $_SESSION['vrsta'] != 'K') {\n preusmjeri(\\route\\Route::get('d1')->generate());\n }\n \n if(get(\"id\") === false) {\n if(get(\"v\") == 'E') {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=3\");\n } else if(get(\"v\") == 'R') {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=7\");\n } else {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n } else {\n if(get(\"v\") === FALSE) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n \n $id = null;\n $vrsta = null;\n $error = null;\n \n if(get(\"v\") == 'R') {\n try {\n $rad = new \\model\\DBZnanstveniRad();\n $rad->load(get(\"id\"));\n $id = get(\"id\");\n $vrsta = 'R';\n } catch (opp\\model\\NotFoundException $e) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=7\");\n }\n } else if(get(\"v\") == 'E') {\n try {\n $rad = new \\model\\DBZnanstveniEksperiment();\n $rad->load(get(\"id\"));\n $id = get(\"id\");\n $vrsta = 'E';\n } catch (opp\\model\\NotFoundException $e) {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=3\");\n }\n } else {\n preusmjeri(\\route\\Route::get('d2')->generate(array(\n \"controller\" => \"korisnik\"\n )) . \"?msg=6\");\n }\n \n echo new \\view\\Main(array(\n \"body\" => new \\view\\PredlaganjeKorekcije(array(\n \"errorMessage\" => $error,\n \"id\" => $id,\n \"v\" => $vrsta\n )),\n \"title\" => \"Predlaganje korekcije\"\n ));\n }\n }", "title": "" }, { "docid": "5009bb045d3e2c9477b098c13aa02906", "score": "0.5313614", "text": "public function ausgebenDatensaetze()\n {\n // oeffnen der Datenbankverbindung\n $this->oeffneVerbindung();\n // erstellen der DB Abfrage\n $Abfrage = \"SELECT * FROM bedemi_data ORDER BY id desc\";\n // ausfuehren der DB Abfrage\n $ergebnisAbfrage = $this->connection->query($Abfrage);\n\n /**\n * Hilsmethode zum erstellen eines IMG HTML Strings\n *\n * @param data: Bildpfad\n *\n * @return HTML String\n */\n\n function bildAusgaben($data)\n {\n $hilf = \"<img src=\";\n $hilf1 = '\"';\n $hilf2 = \"height = '100px' >\";\n // Stringkombination erstellen\n $bild = $hilf . $hilf1 . $data . $hilf1 . $hilf2;\n // Stringrueckgabe\n return $bild;\n }\n\n //Datenausgabe\n while ($zeile = $ergebnisAbfrage->fetch_assoc()) {\n\n //Zeilen ausgeben\n echo\n /* --------------- AUSGABE KOPF ---------------*/\n \"<div class=\\\"eintragsDatum\\\">\n <label class=\\\"ausgabeDatum\\\">\".$zeile[\"create\"].\"</label>\".\n \"</div>\".\n\n /* --------------- AUSGABE INHALT ---------------*/\n \"<div class=\\\"eintrag_feld\\\">\".\n\n /*HEADLINE*/\n \"<div class=\\\"headline\\\">\".\n \"<label class=\\\"ausgabe_headline\\\">\".$zeile[\"headline\"].\"</label>\".\n \"</div>\"./*ENDE headline*/\n\n \"<div class=\\\"user_daten\\\">\".\n /*BILD*/\n \"<div>\".\n \"<span class=\\\"bilder\\\">\".bildAusgaben($zeile[\"image\"]).\"</span>\".\n \"</div>\"./*ENDE bilder*/\n\n \"<div class=\\\"user_datenContainer\\\">\".\n /*VORNAME/NAME*/\n \"<div>\".\n \"<label class=\\\"ausgabe\\\">Vorname:</label>\".$zeile[\"vorname\"].\n \"</div>\".\n \"<div>\".\n \"<label class=\\\"ausgabe\\\">Name:</label>\".$zeile[\"nachname\"].\n \"</div>\".\n\n /*JOB/ORT*/\n \"<div>\".\n \"<label class=\\\"ausgabe\\\">Job:</label>\".$zeile[\"job\"].\n \"</div>\".\n \"<div>\".\n \"<label class=\\\"ausgabe\\\">Ort:</label>\".$zeile[\"ort\"].\n \"</div>\".\n \"</div>\"./*ENDE user_datenContainer*/\n\n \"</div>\"./*ENDE user_daten*/\n\n /*KOMMENTAR*/\n \"<div class=\\\"kommentar\\\">\".\n \"<label class=\\\"ausgabe\\\">Kommentar:</label><br>\".$zeile[\"kommentar\"].\n \"</div>\"./*ENDE kommentar*/\n\n /*BEWERTUNG*/\n \"<div class=\\\"kommentar\\\">\".\n \"<label class=\\\"ausgabe_user\\\">Bewertung:</label>\".\"<span class=\\\"sternchen\\\">\".$zeile[\"bewertung\"].\"</span>\".\n \"</div>\"./*ENDE kommentar*/\n\n \"</div>\"./*ENDE eintrag_feld*/\n\n\n /* --------------- AUSGABE UNTEN ---------------*/\n \"<div class=\\\"verfasserEintrag\\\">\".\n\n /*VERFASSER ANGABEN*/\n \"<div>\".\n \"<label class=\\\"ausgabe_user\\\">Beschwerde an:</label>\".$zeile[\"verfasser_vorname\"].\" \".$zeile[\"verfasser_nachname\"].\n \"</div>\".\n \"<div>\".\n \"<label class=\\\"ausgabe_user\\\"></label>\".$zeile[\"email\"].\n \"</div>\".\n\n \"</div>\";/*ENDE verfasserEintrag*/\n }\n // schliessen der Datenbankverbindung\n $this->schliesseVerbindung();\n }", "title": "" }, { "docid": "ac10efba3e9a5b0440bbb60742387cb4", "score": "0.5312899", "text": "function cl_turmamedicaodidaticopedagogica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"turmamedicaodidaticopedagogica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "37fc296726b93e8c9b901c0ac779ed22", "score": "0.530704", "text": "function suara1()\n\t{\n\t\treturn $this->db->query(\"SELECT * FROM kandidat_terpilih WHERE kandidat = 'D' ORDER BY suara DESC\")->result();\n\t}", "title": "" }, { "docid": "0e033352af87931ec3102a528ca45d6e", "score": "0.53057295", "text": "function EFICACIA($cant,$dato,$ID,$op,$llave,$cod,$tarea){\n \n echo \"TIEMPO EN HORAS QUE SE DEBE DEMORAR EN HACER LA OP: \".$dato;\n \n $d = new entradasalida();\n $d->totaltime($ID,$dato,$op,$cant,$llave,$cod,$tarea);\n }", "title": "" }, { "docid": "2f9ec3083f4c707133e5e6a99d93e3c2", "score": "0.5304556", "text": "public function mostrarVentanaTesoreriaAperturaDeDocumentos() {\r\n $oLOrden = new LOrden();\r\n\r\n $codPerCajero = $_SESSION['id_persona']; //c_cod_per de persona logueada //se muestra en la vista\r\n $nomCompletoCajero = htmlentities($_SESSION['nombre']); //Nombre completo del usuario logueado //se muestra en la vista\r\n//$c_cod_per=\"0151860\";//njaimes caja 34 serie 034 para recibos\r\n//$c_cod_per=\"0364835\";//Patty caja 28 serie 028 para recibos\r\n//$codCaja=$oLOrden->spListaCaja($c_cod_per);\r\n $codCaja = $_SESSION[\"iIdCaja\"]; //se muestra en la vista\r\n//$numFormato=103;\r\n $numFormato = 121;\r\n $rs = $oLOrden->spListaFechaServidor($numFormato);\r\n $fechaActualServidor = $rs[0][\"fechaServidor\"]; //se muestra en la vista\r\n\r\n $rptaCrearCierreTesoreria = $oLOrden->spCrearCierreTesoreria();\r\n\r\n $indSeleccionado = \"\";\r\n $opcionesCboTipoComprobante = $this->listarOpcionesCboTipoComprobante($codCaja, $fechaActualServidor, $indSeleccionado);\r\n require_once(\"../../cvista/orden/vistaAperturaDeDocumentos.php\");\r\n }", "title": "" }, { "docid": "271a48e6bcfaed0646c566de2aa0fb1f", "score": "0.53031933", "text": "function osnovnaZarada() {\n return round($this->karnet->radniSatiOsnovnaZarada() * $this->vrednostSata(), 2);\n }", "title": "" }, { "docid": "ec4dc1f07072d14a4bf9a695ca3196b7", "score": "0.5302924", "text": "function generujObrazki() {\n $this->obrazekPrzod .= \n 'img/'.$this->wartosc.$this->kolor.'.png';\n $this->obrazekTyl = 'img/tyl.png';\n }", "title": "" }, { "docid": "9b78e3545f93baa77439bfe19f323b92", "score": "0.5290838", "text": "function vrijeme() {\r\n \t\tif (!($file = @fopen(\"virtualno_vrijeme/fijandrij_pomak.xml\",'r'))) {\r\n \t\t\t$pomak = 0;\r\n \t\t}else{\r\n \t\t\t$xml = fread($file, 10000);\r\n \t\t\tfclose($file);\r\n \t\t\t$dat = new DOMDocument;\r\n \t\t\t$dat->loadXML($xml);\r\n \t\t\t$pom = $dat->getElementsByTagName('pomak');\r\n \t\t\tforeach ($pom as $p) {\r\n \t\t\t\t$atribut = $p->attributes;\r\n \t\t\t\tforeach ($atribut as $attr => $vrijednost) {\r\n \t\t\t\tif ($attr == \"brojSati\") {\r\n \t\t\t$pomak = $vrijednost->value;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t$pomak = time() + ($pomak*60*60);\r\n \r\n \t\treturn $pomak;\r\n\t}", "title": "" }, { "docid": "937b4d81dd7def6222c379aec0fe2adb", "score": "0.5289871", "text": "public function change()\r\n\t{\r\n\t\t$vazby = $this->fetchAll(\r\n\t\t\t'SELECT\n\t\t\t\t pp.id, p.platba_id, f.`klient_id`, f.`om_id`, f.`vystaveno`, f.`cis`, f.`preplatek`, f.`uhrazeno`, p.`platba`\n\t\t\t\tFROM\n\t\t\t\t tx_pv_par_fz AS pp, tx_platby AS p, tx_faktury AS f\n\t\t\t\tWHERE pp.`platba_id` = p.`platba_id`\n\t\t\t\t AND pp.`faktura_id` = f.`id`\n\t\t\t\t AND pp.`zaloha_id` IS NULL\n\t\t\t\tORDER BY cis DESC');\r\n\r\n\t\t$items = collection($vazby)->groupBy('platba_id')->toArray();\r\n\r\n\t\t$ins = [];\r\n\t\tforeach($items as $platbaId => $i){\r\n\t\t\tif(count($i) == 1){\r\n\t\t\t\t$ins[] = [\r\n\t\t\t\t\t'platba_id' => $i[0]['platba_id'],\r\n\t\t\t\t\t'klient_id' => $i[0]['klient_id'],\r\n\t\t\t\t\t'om_id' => $i[0]['om_id']\r\n\t\t\t\t];\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t$ic = collection($i);\r\n\t\t\t$klis = array_unique($ic->extract('klient_id')->toList());\r\n\t\t\t$oms = array_unique($ic->extract('om_id')->toList());\r\n\r\n\t\t\tif(count($klis) > 1){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif(count($oms) > 1){\r\n\t\t\t\t$ins[] = [\r\n\t\t\t\t\t'platba_id' => $platbaId,\r\n\t\t\t\t\t'klient_id' => $i[0]['klient_id'],\r\n\t\t\t\t\t'om_id' => null\r\n\t\t\t\t];\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t$ins[] = [\r\n\t\t\t\t'platba_id' => $platbaId,\r\n\t\t\t\t'klient_id' => reset($klis),\r\n\t\t\t\t'om_id' => reset($oms)\r\n\t\t\t];\r\n\t\t}\r\n\r\n\t\tforeach($ins as $i){\r\n\t\t\t$this->execute('DELETE FROM tx_pv_par_fz WHERE platba_id = ' . $i['platba_id'] . ';');\r\n\t\t\t$this->execute('UPDATE tx_platby SET type = \\'f\\' WHERE platba_id = ' . $i['platba_id'] . ';');\r\n\t\t}\r\n\r\n\t\t$this->table('platby_zarazeni')\r\n\t\t\t->insert($ins)\r\n\t\t\t->save();\r\n\t}", "title": "" }, { "docid": "b6752a635171a00467345df085f10ee8", "score": "0.5286757", "text": "public function setSredniWazonyKosztKapitalu() {\n $this->sredniWazonyKosztKapitalu = $this->rynkowaWartoscDluguWACC + $this->rynkowaWartoscKapitaluWlasnegoWACC;\n }", "title": "" }, { "docid": "fe6e0c0a40d12ca74c331e0978e37afa", "score": "0.52786356", "text": "public function data_pasien_sebelumnya()\n\t{\n\n\t\t$data['daftar_pasien'] = $this->Kucing_model->get_data_kucing()->result();\n\t\t$this->load->view('daftar_pasien', $data);\n\t\t\n\t}", "title": "" }, { "docid": "f9f7fdbed8424149e85cf4382c714029", "score": "0.5277722", "text": "public function getKodeJadwalPelajaran()\n {\n $autoIncrementServices = new AutoIncrementServices();\n $mappingJadwalPelajaranModel = new MappingJadwalPelajaranModel();\n count($mappingJadwalPelajaranModel::all()) == 0 ? $jadwalPelajaran = 0 : $jadwalPelajaran = $mappingJadwalPelajaranModel->latest('kd_mapping_jadwal_pelajaran')->first()->kd_mapping_jadwal_pelajaran;\n $kd_jadwal_pelajaran = $autoIncrementServices->handleIncrement(['data' => $jadwalPelajaran, 'prefix' => 'JDWL-', 'length' => 5]);\n return $kd_jadwal_pelajaran;\n }", "title": "" }, { "docid": "4fe9df9218f5d97abe7349ed78743ed0", "score": "0.52764076", "text": "public function select_data_struktur_dpo(){\n return $this->db->get('table_dpo')->result();\n }", "title": "" }, { "docid": "5e0a994248f3c99c4ead20ece074e9f2", "score": "0.52701956", "text": "public function daftar()\n {\n \tif($_SESSION['akses_level'] == \"Admin\")\n \t{\n \t\t$this->_dts['data_list'] = $this->pemesanan->ambilData(); // Proses pengambilan data dari database\t\n \t}\n \telse\n \t{\n \t\t$this->_dts['data_list'] = $this->pemesanan->ambilDataDenganKondisi([\"id_user\" => $_SESSION['id']]); // Proses pengambilan data dari database\n \t}\n \n $this->_dts['data_user'] = $this->user->ambilData(); // Proses pengambilan data dari database\n $this->view('pemesanan', $this->_dts); // Oper data dari database ke view\n }", "title": "" }, { "docid": "86b8241a1c36cc7bf0f93f210eb84f68", "score": "0.52661395", "text": "function Add_Transaksi()\n\t\t{\n\t\t\t$t=$this->db->query(\"select * from tbl_obat where id_obat\");\n\t\t\treturn $t;\n\t\t}", "title": "" }, { "docid": "36fea511a7847418b0715426bc0b8427", "score": "0.5264985", "text": "function compactData( $dane ) {\n // w $dane[0] jest nagłowek tabeli \n \n $daneWy = [];\n $now = 1;\n $row = formIt($dane[$now]); // zkompaktowany wiersz wyłuskany z dane, w tym momencie to pierwszy wiersz\n $arrlen = count($dane);\n while( $now < $arrlen ) {\n $now++; \n if( $row['3'] == $dane[$now]['3'] ) { // takie samo id zamowienia\n $row['6'] = (string)((int)$row['6'] + (int)$dane[$now]['6']); // dodajemy karty\n } else { // kolejne zmowienie\n $daneWy[] = $row; // gotowy wiersz do danych wy \n $row = formIt($dane[$now]); \n }\n }\n return $daneWy;\n}", "title": "" }, { "docid": "49270548758520adf6ee706d096665a3", "score": "0.52629024", "text": "function prikaz_za_select()\n {\n // $date->modify('+3 month');\n // $date = $date->format('Y-m-d h:i:s');\n include ('konekcija.php');\n\n $upit = \"SELECT svi_sektori FROM sektori /*datum iz baze +3 meseca < danasnjeg datuma*/\";\n $rezultat = $konekcija->prepare($upit);\n $rezultat->execute();\n $rezultat->bind_result($svi_sektori);\n\n $rezultat_niz = array();\n\n while ($rezultat->fetch())\n {\n $rezultat_niz[]=array($svi_sektori);\n }\n $konekcija->close();\n exit(json_encode($rezultat_niz));\n }", "title": "" }, { "docid": "7cd31b2d913b17957e7b2602db1f640a", "score": "0.52611476", "text": "function getDataEditPangkat($r_key) {\n\t\t\t$sql = \"select r.*,js.namajenissk,'('||p.golongan||') '||p.namapangkat as namagolongan,coalesce(cast(r.masakerjathn as varchar),'0') as masakerjathn,coalesce(cast(r.masakerjabln as varchar),'0') as masakerjabln\n\t\t\t\t\tfrom \".self::table('pe_rwtpangkat').\" r \n\t\t\t\t\tleft join \".self::table('ms_jenissk').\" js on js.jenissk = r.jenissk\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" p on p.idpangkat = r.idpangkat\n\t\t\t\t\twhere nourutrp='$r_key'\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "65667e5389f7b7e9929b538613ffba02", "score": "0.5253155", "text": "private function izvuciDan() {\r\n $this->DD = self::$JMBG[0] . self::$JMBG[1];\r\n }", "title": "" }, { "docid": "5aeb31a846de96778b2bea88cf3fad1d", "score": "0.5245787", "text": "public function downloadrekonsiliasigajipetra()\n {\n }", "title": "" }, { "docid": "a96fe265cf58f7942416cf2748c54e68", "score": "0.52455753", "text": "function zaradaUkupno() {\n return ( $this->zaradaZaObavljeniRad() + $this->zaradaDoprinosPoslovnomUspehu() + $this->drugaPrimanja() );\n }", "title": "" }, { "docid": "e195b50e7e220da054e2576c099ee399", "score": "0.5242522", "text": "public function getDatos(){\n return $this ->_datos;\n }", "title": "" }, { "docid": "cbaee7de806ae8ac885914844b9250a4", "score": "0.52311206", "text": "public function actionPokazZestawy()\n {\n Yii::app()->session['id_zespolu_zestawy'] = $_POST['id_zespolu_zestawy'];\n Yii::app()->session['nazwa_zespolu_zestawy'] = $_POST['nazwa_zespolu_zestawy'];\n Yii::app()->end();\n }", "title": "" }, { "docid": "64a1c203178e90140f5557b615430407", "score": "0.522039", "text": "public function kadarGulaSaya(){\n\t\treturn $this->kadar_gula;\n\t}", "title": "" }, { "docid": "d55889e15edd756c6bfe7208684f77b0", "score": "0.5220377", "text": "function llenarMatrizSaldosConc(){\n\t\t\t\n\t\t\tunset($matriz); \n\t\t\tglobal $matriz;\t\n\t\t\t$res = llamarRegistrosMySQLSaldosConc();\n\t\t\t$posicion=0;\n\t\t\t\t\n\t\t\t\twhile ($fila = mysql_fetch_array($res))\n\t\t\t\t{\t\n\t\t\t\t\t$matriz[\"cuenta\"][$posicion] = $fila[\"Cuenta\"];\n\t\t\t\t\t$matriz[\"anio\"][$posicion] = $fila[\"Anio\"];\n\t\t\t\t\t$matriz[\"mes\"][$posicion] = $fila[\"Mes\"];\n\t\t\t\t\t$matriz[\"saldoextracto\"][$posicion] = $fila[\"SaldoExtracto\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$posicion++;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "e61c71a1eabed3576e92da2c57d18607", "score": "0.5217811", "text": "function cl_turmaacmatricula() {\n\t\t//classes dos rotulos dos campos\n\t\t$this->rotulo = new rotulo(\"turmaacmatricula\");\n\t\t$this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n\t}", "title": "" }, { "docid": "7a4c9d92819871392b7820f0e5fdb204", "score": "0.5215707", "text": "function lazaAction()\r\n {\r\n $p = new DattecnicaModel();\r\n $arreglo = $p->buscardatosTecnica(100000);\r\n //echo json_encode( array( 'cant' => count( $arreglo ),'datos' => $arreglo) );\r\n echo '<pre>';\r\n print_r($arreglo);\r\n\r\n\r\n }", "title": "" }, { "docid": "a5b542a3f3b0bb5e581374338e93e9cd", "score": "0.5213872", "text": "public function cetakdaftardoktanahAction() {\n $session = $this->getServiceLocator()->get('EtaxService')->getStorage()->read();\n $ar_pemda = $this->getPemda()->getdata();\n $form = new \\Bphtb\\Form\\Setting\\DokTanahFrm();\n $datadoktanah = $this->getTbl()->getdaftardoktanah();\n $view = new \\Zend\\View\\Model\\ViewModel(array(\n 'datadoktanah' => $datadoktanah\n ));\n $data = array(\n 'menu_setting' => 'active',\n 'side_setting' => 'active',\n 'side_dokumen_tanah' => 'active',\n 'role_id' => $session['s_akses'],\n 'data_pemda' => $ar_pemda,\n 'aturgambar' => 1\n );\n $this->layout()->setVariables($data);\n return $view;\n// $pdf = new \\DOMPDFModule\\View\\Model\\PdfModel();\n// $pdf->setOption('filename', 'daftardoktanah');\n// $pdf->setOption('paperSize', 'legal');\n// $pdf->setOption('paperOrientation', 'potrait');\n// $pdf->setVariables(array(\n// 'datadoktanah' => $datadoktanah\n// ));\n// return $pdf;\n }", "title": "" }, { "docid": "3cd30d3e74da55ec75a6637954e4e3fd", "score": "0.52130866", "text": "function ambil_data()\n \t{\n \t\t$data['customer'] = $this->db->order_by($this->id, $this->order);\n \t\treturn $this->db->get($this->nama_table)->result();\n \t}", "title": "" }, { "docid": "9287ebcb4a5ae8d489db038222774d8a", "score": "0.52086526", "text": "private function initialize(){\n $data=new DBQuery(CDatabaza::getInstance());\n //zakladne nastavenie zobrazenia\n $this->orders['theme']['key']=\"tema_id\";\n $this->orders['theme']['order']=\"DESC\";\n $this->orders['topic']['key']=\"rubrika_id\";\n $this->orders['topic']['order']=\"DESC\";\n \n /*nastavi usporiadanie zaznamov v tabulke*/\n //pole zoradienia temy\n if(isset($_GET['theme_key'])){\n $key=$_GET['theme_key'];\n if(!strcmp($key, 'id'))\n $this->orders['theme']['key']=\"tema_id\";\n else if(!strcmp($key, 'name'))\n $this->orders['theme']['key']=\"nazov_temy\";\n }\n //poradie zoradenia temy\n if(isset($_GET['theme_order'])){\n if(!strcmp($_GET['theme_order'], \"ASC\"))\n $this->orders['theme']['order']=\"ASC\";\n }\n \n if(isset($_GET['topic_key'])){\n $key=$_GET['topic_key'];\n \n if(!strcmp($key, 'id'))\n $this->orders['topic']['key']=\"rubrika_id\";\n else if(!strcmp($key, 'name'))\n $this->orders['topic']['key']=\"nazov_rubriky\";\n else if(!strcmp($key, 'theme'))\n $this->orders['topic']['key']=\"tema_id\";\n \n }\n \n if(isset($_GET['topic_order'])){\n if(!strcmp($_GET['topic_order'], \"ASC\"))\n $this->orders['topic']['order']=\"ASC\";\n }\n \n $data->setTable(\"Tema\");\n $data->setOrder($this->orders['theme']['key'], $this->orders['theme']['order']);\n $themes=$data->queryDB(\"select\");\n while($theme=$themes->fetch_array()){\n $id=$theme['tema_id'];\n $name=$theme['nazov_temy'];\n $this->themes[$id]['id']=$id;\n $this->themes[$id]['name']=$name;\n }\n \n $data->setTable(\"Rubrika\");\n $data->setOrder($this->orders['topic']['key'], $this->orders['topic']['order']);\n $topics=$data->queryDB(\"select\");\n while($topic=$topics->fetch_array()){\n $id=$topic['rubrika_id'];\n $name=$topic['nazov_rubriky'];\n $theme=$topic['tema_id'];\n $this->topics[$id]['id']=$id;\n $this->topics[$id]['name']=$name;\n $this->topics[$id]['theme']=$theme;\n }\n }", "title": "" }, { "docid": "823e5a72884b4719c47470a31ec8ccdb", "score": "0.52046996", "text": "function KopirovaniStavuLigy( $id_ligy ){\n\tglobal $db;\n\t//smazani starych dat\n\t$query = \"DELETE FROM in_game_vcera_zeme WHERE id_ligy=$id_ligy\";\n\t$res = $db->DbQuery( $query );\n\t\n\t$query = \"INSERT INTO in_game_vcera_zeme \n\t\t\t(select * from in_game_zeme where id_ligy=$id_ligy)\";\n\t$res = $db->DbQuery( $query );\n\t\n\t$query = \"DELETE FROM in_game_vcera WHERE id_ligy=$id_ligy\";\n\t$res = $db->DbQuery( $query );\n\t\n\t$query = \"INSERT INTO in_game_vcera \n\t\t\t(select id, id_hrac, letecka_sila, id_liga from in_game_hrac where id_liga=$id_ligy)\";\n\t$res = $db->DbQuery( $query );\n\t\t\t\n\t//vygenerujeme mapu\n\tGenerujMapu( $id_ligy );\n\t\n\treturn \"OK\";\n}", "title": "" }, { "docid": "4679ef9a04a3fa62f4445b80b52dceb6", "score": "0.5202507", "text": "public function getZdyskontowanyOkresZwrotuSkumulowaneFCFE() {\n return $this->zdyskontowanyOkresZwrotuSkumulowaneFCFE;\n }", "title": "" }, { "docid": "361f659fcf0ae630f87bea477bf5b50f", "score": "0.5201735", "text": "public function datapegawai_finger()\n {\n $mesin = new mesinFinger;\n return datatables()->of($mesin->cekdatapegawai_finger())->toJson();\n //dd($this->cekdatapegawai_finger());\n }", "title": "" }, { "docid": "f675787d8fd039db028ea44afd1122f0", "score": "0.5199697", "text": "function getDatosOrden()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'orden'));\n $oDatosCampo->setEtiqueta(_(\"orden\"));\n return $oDatosCampo;\n }", "title": "" }, { "docid": "a0fa13242b08cb3fbcfda837bb74c1c8", "score": "0.51991844", "text": "public function get_daftarmasak()\n\t{\n\t\t$query = \"SELECT transaksijual.*, invoice.bayar FROM transaksijual JOIN invoice ON transaksijual.no_nota = invoice.id_invoice WHERE transaksijual.masak = 0 AND invoice.bayar = 1 ORDER BY transaksijual.id_transaksijual ASC\";\n\t\treturn $this->db->query($query);\n\t}", "title": "" }, { "docid": "fbf18b6c6eb7c113bf1787185ae1725a", "score": "0.5193348", "text": "function Simpan_TransaksiObat($tabel,$data)\n\t\t{\n\t\t\t$s=$this->db->insert($tabel,$data);\n\t\t\treturn $s;\n\t\t}", "title": "" }, { "docid": "a666d5356645b9e23c6cbf6ce4ae62f7", "score": "0.5191913", "text": "function get_kkm($ajaran_id, $kelas_id, $id)\n {\n $CI =& get_instance();\n $get_kkm = $CI->db->get_where('kurikulum',[\n 'ajaran_id' => $ajaran_id,\n 'kelas_id' => $kelas_id,\n 'id_mapel' => $id,\n ])->row();\n $kkm = isset($get_kkm->kkm) && $get_kkm->kkm ? $get_kkm->kkm : '-';\n return $kkm;\n }", "title": "" }, { "docid": "ba8c2b33dfafa079f60fb5343b9aab67", "score": "0.519091", "text": "function getData(){\n\t\t//query mysql select data ke tb_mahasiswa\n\t\t$query = \"SELECT * FROM tb_mahasiswa\";\n\n\t\t// Mengeksekusi query\n\t\treturn $this->execute($query);\n\t}", "title": "" }, { "docid": "fc1869fd9d72dab995f5a241ada3d4ab", "score": "0.5190104", "text": "public function getTrabalhando()\n{\nreturn $this->trabalhando;\n}", "title": "" }, { "docid": "2dac9cb3e8eae5c1d76c7db2276059a9", "score": "0.5189034", "text": "public function dohvatiPostoveKorisnika($idKor) {\n $this->db->select('postdiskusija.tekst as tekst, postdiskusija.poslatoDatum as datum, diskusija.naziv as naziv');\n $this->db->from('postdiskusija');\n $this->db->join('diskusija', 'diskusija.idDis = postdiskusija.diskusija');\n $this->db->where('postdiskusija.posiljalac', $idKor);\n $this->db->group_by('postdiskusija.idPos');\n $this->db->order_by('postdiskusija.poslatoDatum', 'DESC');\n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "b8c833e9a1e533ab71ce6e8d8b33932e", "score": "0.5184889", "text": "function tampil_data()\n\t{\n\t\t# perintah join digunakan untuk menggabungkan 2 table, yaitu penduduk dan beda_nama, agar data yang tampil lebih detail, karena pada tabel beda nama hanya terdapat sedikit kolom, sehingga dengan menambah kolom nik, maka data yang ada di tabel penduduk juga otomatis terdeteksi karena perintah join, dengan aturan, nik harus sama antara tabel beda nama dan nik yang ada di penduduk.\n\t\treturn $this->db->query(\"SELECT*FROM `kelahiran` left join penduduk on kelahiran.nik = penduduk.nik\")->result();\n\t}", "title": "" }, { "docid": "4db7fe99b22357235ca8b3f270317c37", "score": "0.5184519", "text": "function proveri_status_kompenzacije($id_kompenzacije) {\n\n //KREIRANJE OBJEKTA ZA SLANJE,FLAGA I PROMENJIVE ZA GRESKE\n $ret = new stdClass();\n $flag = true;\n $greske = '';\n\n //UPIS ID-JA KOMPENZACIJE U PROMENJIVU\n $kompenzacija_id = $_POST['id_proknjizi'];\n\n\n //UKLJUCIVANJE KONEKCIJE KA AMSO BAZI\n $amso_konekcija = pg_connect(\"host=localhost dbname=amso user=zoranp\");\n\n //AKO DODJE DO GRESKE PRI KONEKCIJI KA BAZI\n if (!$amso_konekcija) {\n $greske .= 'Greška u konekciji sa bazom podataka.';\n $flag = false;\n }\n\n //AKO JE KONEKCIJA OK,NASTAVI DALJE\n if ($flag) {\n\n //UPIT ZA PROVERU POSLEDNJEG STATUSA KOMPENZACIJE SA ODREDJENIM ID-JEM\n $upit_provera = \"SELECT akcija FROM kompenzacija_akcije_log WHERE kompenzacija_id = '$kompenzacija_id' \n ORDER BY datum_promene_statusa DESC LIMIT 1\";\n \n //IZVRSAVANJE UPITA\n $rezultat_provera = pg_query($amso_konekcija, $upit_provera);\n \n //AKO DODJE DO GRESKE PRI IZVRSAVANJU UPITA\n if (!$rezultat_provera) {\n \n $greske .= 'Greška pri izvršavanju upita. Pokušajte ponovo.';\n $flag = false;\n }\n else {\n \n //UPISIVANJE DOBIJENOG REDA IZ BAZE U NIZ\n $red_provera = pg_fetch_array($rezultat_provera);\n \n //AKO JE DOKUMENT VEC PROKNJIZEN\n if ($red_provera['akcija'] == 'proknjizeno') {\n \n $greske .= 'Dokument je već proknjižen.';\n $flag = false;\n }\n \n //AKO JE DOKUMENT VEC STORNIRAN\n elseif ($red_provera['akcija'] == 'stornirano') {\n \n $greske .= 'Dokument je storniran. Ne možete izvršiti knjiženje.';\n $flag = false;\n }\n //AKO JE SVE OK\n else {\n \n //UPIT ZA DOBIJANJE PODATAKA O KOMPENZACIJI KOJI CE SE PRIKAZIVATI U ALERT CONFIRM BOXU\n $upit_podaci = \"SELECT kz.kompenzacija_zaglavlje_id, kz.broj_kompenzacije, kz.partner, p.naziv,\n \n SUM(ks.duguje) AS suma_duguje, kl.datum_promene_statusa \n \n FROM kompenzacija_zaglavlje kz\n\n INNER JOIN kompenzacija_stavke ks ON kz.kompenzacija_zaglavlje_id = ks.kompenzacija_zaglavlje_id\n\n INNER JOIN kompenzacija_akcije_log kl ON kl.kompenzacija_id = kz.kompenzacija_zaglavlje_id \n\n INNER JOIN partneri p ON p.sifra = kz.partner \n\n WHERE kz.kompenzacija_zaglavlje_id = '$kompenzacija_id' AND kl.akcija = 'kreirano'\n\n GROUP BY kz.kompenzacija_zaglavlje_id, kz.broj_kompenzacije, kz.partner, p.naziv, kl.datum_promene_statusa\";\n\n //IZVRSAVANJE UPITA\n $rezultat_podaci = pg_query($amso_konekcija, $upit_podaci);\n \n //AKO DODJE DO GRESKE PRI IZVRSAVANJU UPITA\n if (!$rezultat_podaci) {\n \n $greske .= 'Greška pri izvršavanju upita. Pokušajte ponovo.';\n $flag = false;\n }\n else {\n\n //UPISIVANJE DOBIJENOG REDA IZ BAZE U NIZ\n $red_podaci = pg_fetch_array($rezultat_podaci);\n\n //UPISIVANJE PODATAKA O KOMPENZACIJI U RET OBJEKAT\n $ret->id_kompenzacije = $red_podaci['kompenzacija_zaglavlje_id'];\n $ret->broj_kompenzacije = $red_podaci['broj_kompenzacije'];\n $ret->pravno_lice = $red_podaci['naziv'];\n $ret->pib = $red_podaci['partner'];\n $ret->iznos_kompenzacije = $red_podaci['suma_duguje'];\n $ret->datum_kompenzacije = substr($red_podaci['datum_promene_statusa'], 0, 10);\n }\n } \n }\n }\n \n $ret->flag = $flag;\n\n //AKO POSTOJI BILO KOJA GRESKA\n if (!$flag) {\n $ret->greske = $greske;\n }\n\n echo json_encode($ret);\n}", "title": "" }, { "docid": "f09d2dbe1f5be939cd926bacc65cc2c7", "score": "0.51844585", "text": "function get_data_dokter(){\r\n\t\t\t$list = $this->admin_model->get_list_dokter();\r\n\t\t\techo \"<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th>ID DOKTER</td>\r\n\t\t\t\t\t\t<th>NAMA</td>\r\n\t\t\t\t\t\t<th>ALAMAT</td>\r\n\t\t\t\t\t\t<th>NO. TELP</td>\r\n\t\t\t\t\t\t<th>ID POLI</td>\r\n\t\t\t\t\t\t<th>ACTION</td>\r\n\t\t\t\t\t</tr>\";\r\n\t\t\tforeach($list as $row){\r\n\t\t\t\techo \"<tr>\r\n\t\t\t\t\t\t<td>\".$row['ID_DOKTER'].\"</td>\r\n\t\t\t\t\t\t<td>\".$row['NAMA'].\"</td>\r\n\t\t\t\t\t\t<td>\".$row['ALAMAT'].\"</td>\r\n\t\t\t\t\t\t<td>\".$row['NO_TELP'].\"</td>\r\n\t\t\t\t\t\t<td>\".$row['NAMA_POLI'].\"</td>\";\r\n\t\t\t\t\techo \"<td><a href=\\\"\".base_url().\"admin/show_jadwal_dokter/\".$row['ID_DOKTER'].\"\\\">JADWAL</a>|<a href=\\\"\".base_url().\"admin/show_update_dokter/\".$row['ID_DOKTER'].\"\\\">EDIT</a>|<a href=\\\"\".base_url().\"admin/delete_data_dokter/\".$row['ID_DOKTER'].\"\\\" onclick=\\\"return confirm('Are you sure?')\\\">DELETE</a></td>\";\r\n\t\t\t\techo \"</tr>\";\r\n\t\t\t}\r\n\t\t\techo \"</table>\";\r\n\t\t}", "title": "" }, { "docid": "e8d81eacc28e4ee1f20e2fde966be729", "score": "0.5184187", "text": "public function proses_penjadwalan()\n {\n $tanggal = $_POST['tanggal_ambil']; // Tanggal ambil\n $kurir = $_POST['id_kurir']; // Kurir\n $start = $this->Master_model->get_start_point($_POST['id_start']); // Data start point\n $source = $start['longitude_start'] . ',' . $start['latitude_start']; // Start point coordinate\n // Get transaksi\n $this->db->limit(11); // Limit 11 transaksi\n $transaksi = $this->db->get_where('transaksi', ['tanggal_ambil' => $tanggal, 'id_kurir' => NULL, 'status' => 'confirmed'])->result_array();\n\n /* =================================================================================\n 2. Membagi transaksi ke masing-masing kurir yang dipilih\n ================================================================================= */\n $temp = 0;\n $pembagian = [];\n foreach ($transaksi as $key => $trans) {\n $pembagian[] = [\n 'id_kurir' => $kurir[$temp],\n 'id_transaksi' => $trans['id_transaksi'],\n 'coordinate' => $trans['longitude_transaksi'] . ',' . $trans['latitude_transaksi']\n ];\n if ($temp < count($kurir) - 1) {\n $temp++;\n } else {\n $temp = 0;\n }\n }\n\n /* =================================================================================\n 3. Membuat data penugasan\n ================================================================================= */\n // Membuat wadah penugasan kurir\n $penugasan = [];\n foreach ($kurir as $kur) {\n $penugasan[] = [\n 'id_kurir' => $kur,\n 'transaksi' => []\n ];\n }\n // Merangkai data pembagian ke wadah penugasan kurir\n foreach ($pembagian as $bagian) {\n foreach ($penugasan as $key => $tugas) {\n if ($bagian['id_kurir'] == $tugas['id_kurir']) {\n $penugasan[$key]['transaksi'][] = [\n 'id_transaksi' => $bagian['id_transaksi'],\n 'coordinate' => $bagian['coordinate']\n ];\n }\n }\n }\n\n /* =================================================================================\n 4. Update id_kurir dan id_start pada tabel transaksi\n ================================================================================= */\n $statusTransaksi = 0;\n foreach ($pembagian as $bagian) {\n $this->db->where('id_transaksi', $bagian['id_transaksi']);\n $this->db->update('transaksi', [\n 'id_start' => $_POST['id_start'],\n 'id_kurir' => $bagian['id_kurir']\n ]);\n // Cek status\n if ($this->db->affected_rows() > 0) {\n $statusTransaksi++;\n }\n }\n\n /* =================================================================================\n 5. Generate rute, detail rute\n ================================================================================= */\n if ($statusTransaksi == count($pembagian)) {\n\n foreach ($penugasan as $tugas) {\n\n if (count($tugas['transaksi']) > 0) {\n\n // 1. Buat rute\n $data_rute = [\n 'id_kurir' => $tugas['id_kurir'],\n 'id_start' => $_POST['id_start'],\n 'tanggal' => $tanggal,\n 'status_rute' => 'PENDING'\n ];\n $this->db->insert('rute', $data_rute);\n $id_rute = $this->db->insert_id();\n\n // Cek status pembuatan rute\n if ($this->db->affected_rows() > 0) {\n\n // 2. Set coordinates\n $coordinates = $source . ';';\n foreach ($tugas['transaksi'] as $trans) {\n $coordinates .= $trans['coordinate'] . \";\";\n }\n $coordinates = substr($coordinates, 0, -1);\n\n // 3. Create url\n $access_key = MAPKEY;\n $baseUrl = \"https://api.mapbox.com/optimized-trips/v1/mapbox/driving/\";\n $baseUrl .= $coordinates;\n $baseUrl .= \"?source=first&roundtrip=true&access_token=$access_key\";\n\n // 4. Optimize route\n $rute = $this->http_get($baseUrl);\n $rute = json_decode($rute, true);\n $rute = $rute['waypoints'];\n\n // 5. Buat detail rute\n $statusDetailRute = 0;\n foreach ($tugas['transaksi'] as $key => $trans) {\n $detail_rute = [\n 'id_transaksi' => $trans['id_transaksi'],\n 'id_rute' => $id_rute,\n 'urutan' => $rute[$key + 1]['waypoint_index']\n ];\n $this->db->insert('detail_rute', $detail_rute);\n // Cek status\n if ($this->db->affected_rows() > 0) {\n $statusDetailRute++;\n }\n }\n\n // Cek status generate detail rute\n if ($statusDetailRute == count($tugas['transaksi'])) {\n $this->session->set_flashdata('status', '\n <div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\">\n <strong>Penjadwalan berhasil !</strong> kurir sudah ditugaskan untuk melakukan penjemputan\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n ');\n } else {\n $this->session->set_flashdata('status', '\n <div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\">\n <strong>Penjadwalan gagal !</strong> terjadi kesalahan saat proses penjadwalan\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n ');\n }\n $this->session->keep_flashdata('status');\n }\n }\n }\n }\n }", "title": "" } ]
09ca35f969f2af4893e68f1d8e5a9b5c
Get a list of maps attached to the post
[ { "docid": "d9ea9280429248c9d025efe0b317e748", "score": "0.7634387", "text": "function get_post_map_list($postid) {\r\n\t\tglobal $wpdb;\r\n\t\t$posts_table = $wpdb->prefix . 'mappress_posts';\r\n\r\n\t\t$results = $wpdb->get_results($wpdb->prepare(\"SELECT postid, mapid FROM $posts_table WHERE postid = %d\", $postid));\r\n\r\n\t\tif ($results === false)\r\n\t\t\treturn false;\r\n\r\n\t\t// Get all of the maps\r\n\t\t$maps = array();\r\n\t\tforeach($results as $key => $result) {\r\n\t\t\t$maps[] = Mappress_Map::get($result->mapid);\r\n\t\t}\r\n\t\treturn $maps;\r\n\t}", "title": "" } ]
[ { "docid": "b1438d0661a92b66177a2dd34b5529cd", "score": "0.66991824", "text": "public function getMaps()\n {\n return $this->_maps;\n }", "title": "" }, { "docid": "b1438d0661a92b66177a2dd34b5529cd", "score": "0.66991824", "text": "public function getMaps()\n {\n return $this->_maps;\n }", "title": "" }, { "docid": "4133307cc922fd71db224d17f8138311", "score": "0.66083765", "text": "public function getMaps()\n {\n return array_column($this->maps, 'map');\n }", "title": "" }, { "docid": "33e1cdb6c81b22a2784d6d7863a0985a", "score": "0.65508896", "text": "public function getMaps()\n {\n return (isset($this->maps)) ? $this->maps : [];\n }", "title": "" }, { "docid": "745a8e1749f00c69170fc46cb52dbd38", "score": "0.62412596", "text": "function getMapsList()\r\n {\r\n $gpsCount = 0;\r\n $areaList= array();\r\n $mapsList= array();\r\n foreach ($this->points as $point)\r\n {\r\n $a = getAreaImageIdFromPoint($point['map'], $point['position_x'], $point['position_y'], $point['position_z']);\r\n if ($a>0) @$areaList[$a]++;\r\n @$mapsList[$point['map']]++;\r\n }\r\n $area_keys = array_keys($areaList);\r\n $maps_keys = array_keys($mapsList);\r\n\r\n $list = array();\r\n if ($area_keys)\r\n foreach($areaList as $id=>$count)\r\n $list['area'][]=array('id'=>$id, 'text'=>getAreaNameFromId($id).' - ('.$count.')');\r\n\r\n if ($mapsList)\r\n foreach($mapsList as $id=>$count)\r\n {\r\n if (getRenderGPSMapData($id)) $gpsCount+=$count;\r\n $list['map'][]=array('id'=>$id, 'text'=>getMapName($id).' - ('.$count.')');\r\n }\r\n if ($gpsCount)\r\n $list['gps'][]=array('text'=>'('.$gpsCount.')');\r\n\r\n return $list;\r\n }", "title": "" }, { "docid": "c00990a093e439f7a30c3b4a360bacb4", "score": "0.6226855", "text": "public function getMaps()\n {\n return 'Maps for Paper Tourism Book';\n }", "title": "" }, { "docid": "b0e252b5c6076c5b9e83bba471aecb15", "score": "0.61700934", "text": "public function maps() {\n\t\t$version = $this->version('map');\n\n\t\t$key = 'riot.static.' . $this->region . '.maps.' . $version;\n\t\t$maps = $this->cache->remember($key, self::$dataCache, function () use ($version) {\n\t\t\t// NOTE: Polyfilled!\n\t\t\t$maps = require(storage_path('polyfills/map.php'));\n\n\t\t\treturn $maps['data'];\n\t\t});\n\n\t\treturn $maps;\n\n\t}", "title": "" }, { "docid": "cf24b82aa3400e3b6b26acbb0e0baae3", "score": "0.61419904", "text": "function get_post_map ($postid, $mapid = null, $meta_key = null) {\r\n\t\tglobal $wpdb;\r\n\t\t$posts_table = $wpdb->prefix . 'mappress_posts';\r\n\r\n\t\t// Search by map ID\r\n\t\tif ($mapid) {\r\n\t\t\t$result = $wpdb->get_row($wpdb->prepare(\"SELECT postid, mapid FROM $posts_table WHERE postid = %d AND mapid = %d\", $postid, $mapid));\r\n\t\t\tif ($result !== false)\r\n\t\t\t\treturn Mappress_Map::get($mapid);\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Search by meta_key\r\n\t\t$results = $wpdb->get_results($wpdb->prepare(\"SELECT postid, mapid FROM $posts_table WHERE postid = %d\", $postid));\r\n\r\n\t\tif ($results === false)\r\n\t\t\treturn false;\r\n\r\n\t\t// Find which map, if any, has the given meta_key\r\n\t\tforeach($results as $key => $result) {\r\n\t\t\t$map = Mappress_Map::get($result->mapid);\r\n\t\t\tif ($map->metaKey == $meta_key)\r\n\t\t\t\treturn $map;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "10abce48ba0c97b6db95f49cb79e2930", "score": "0.6127027", "text": "public function getDataSiteMap();", "title": "" }, { "docid": "3a286c453baba1bea8736697342c0eab", "score": "0.61138564", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\t(new IntegerField(\"ID\", [\"primary\" => true, \"autocomplete\" => true])),\n\t\t\t(new IntegerField(\"FORUM_ID\", [\"required\" => true])),\n\t\t\t(new IntegerField(\"TOPIC_ID\")),\n\t\t\t(new StringField(\"TITLE\", [\"required\" => true, \"size\" => 255])),\n\t\t\t(new StringField(\"TITLE_SEO\", [\"size\" => 255])),\n\t\t\t(new StringField(\"TAGS\", [\"size\" => 255])),\n\t\t\t(new StringField(\"DESCRIPTION\", [\"size\" => 255])),\n\t\t\t(new StringField(\"ICON\", [\"size\" => 255])),\n\t\t\t(new EnumField(\"STATE\", [\"values\" => [Topic::STATE_OPENED, Topic::STATE_CLOSED, Topic::STATE_LINK], \"default_value\" => Topic::STATE_OPENED])),\n\t\t\t(new BooleanField(\"APPROVED\", [\"values\" => [Topic::APPROVED_DISAPPROVED, Topic::APPROVED_APPROVED], \"default_value\" => Topic::APPROVED_APPROVED])),\n\t\t\t(new IntegerField(\"SORT\", [\"default_value\" => 150])),\n\t\t\t(new IntegerField(\"VIEWS\")),\n\t\t\t(new IntegerField(\"USER_START_ID\")),\n\t\t\t(new StringField(\"USER_START_NAME\", [\"required\" => true, \"size\" => 255])),\n\t\t\t(new DatetimeField(\"START_DATE\", [\"required\" => true, \"default_value\" => function(){return new DateTime();}])),\n\t\t\t(new IntegerField(\"POSTS\")),\n\t\t\t(new IntegerField(\"POSTS_SERVICE\")),\n\t\t\t(new IntegerField(\"LAST_POSTER_ID\")),\n\t\t\t(new StringField(\"LAST_POSTER_NAME\", [\"required\" => true, \"size\" => 255])),\n\t\t\t(new DatetimeField(\"LAST_POST_DATE\", [\"required\" => true, \"default_value\" => function(){return new DateTime();}])),\n\t\t\t(new IntegerField(\"LAST_MESSAGE_ID\")),\n\t\t\t(new IntegerField(\"POSTS_UNAPPROVED\", [\"default_value\" => 0])),\n\t\t\t(new IntegerField(\"ABS_LAST_POSTER_ID\")),\n\t\t\t(new StringField(\"ABS_LAST_POSTER_NAME\", [\"size\" => 255])),\n\t\t\t(new DatetimeField(\"ABS_LAST_POST_DATE\", [\"required\" => true, \"default_value\" => function(){return new DateTime();}])),\n\t\t\t(new IntegerField(\"ABS_LAST_MESSAGE_ID\")),\n\t\t\t(new StringField(\"XML_ID\", [\"size\" => 255])),\n\t\t\t(new TextField(\"HTML\")),\n\t\t\t(new IntegerField(\"SOCNET_GROUP_ID\")),\n\t\t\t(new IntegerField(\"OWNER_ID\")),\n\t\t\t(new Reference(\"FORUM\", ForumTable::class, Join::on(\"this.FORUM_ID\", \"ref.ID\")))\n\t\t];\n\t}", "title": "" }, { "docid": "b2c5408b9b1146ba88db99210b688ea3", "score": "0.6088417", "text": "public function get_map_content(){\n\t\treturn $this->arr_map_content;\n\t}", "title": "" }, { "docid": "1557acf3964cfd956463abcdb9b8a580", "score": "0.6052038", "text": "static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'wiki_id' => array(\n 'type' => 'string',\n ),\n 'title' => array(\n 'type' => 'string',\n ),\n 'content' => array(\n 'type' => 'string',\n ),\n 'html_cache' => array(\n 'type' => 'string',\n ),\n 'mark' => array(\n 'type' => 'integer',\n ),\n 'screenshots' => array(\n 'type' => 'raw',\n ),\n 'guests' => array(\n 'type' => 'raw',\n ),\n 'year' => array(\n 'type' => 'string',\n ),\n 'month' => array(\n 'type' => 'string',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }", "title": "" }, { "docid": "58fc1f3941beffd48d108800682b2310", "score": "0.602318", "text": "public function getMap();", "title": "" }, { "docid": "da320cbea0ce60b305dcf6d7acc1e987", "score": "0.59774244", "text": "public function index()\n {\n $maps = Map::all();\n return $maps;\n }", "title": "" }, { "docid": "f67c8b2a57558a52299051e07e2d044a", "score": "0.59706837", "text": "function getMapFields() {\n return array(\n 'name',\n 'image',\n 'game',\n 'description'\n );\n}", "title": "" }, { "docid": "ed2f2924339b96c9f644e03274ade42d", "score": "0.5966709", "text": "public function getMap(): array\n {\n return $this->instances;\n }", "title": "" }, { "docid": "51faf7def449d5be500f3eddc7588d72", "score": "0.59377944", "text": "public function getMapFiles () \r\n\t{\r\n\t\treturn $this->_maps;\r\n\t}", "title": "" }, { "docid": "88e44c92a562d040c43541cd7292c7a1", "score": "0.58972436", "text": "public function getLoadedPostCollection()\n {\n return $this->_getPostCollection();\n }", "title": "" }, { "docid": "0265ccc00e2952aec99aee664d0f8a51", "score": "0.5803405", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'TASK_ID' => new Entity\\IntegerField('TASK_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'STAGE_ID' => new Entity\\IntegerField('STAGE_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'STAGE' => new Entity\\ReferenceField(\n\t\t\t\t'STAGE',\n\t\t\t\t'Bitrix\\Tasks\\Kanban\\StagesTable',\n\t\t\t\tarray('=this.STAGE_ID' => 'ref.ID')\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "2a8f435d350cf41198b1a0f4fa578896", "score": "0.580234", "text": "function pexeto_get_portfolio_items_map( $args=array() ) {\r\n\t\t$args['number']=-1;\r\n\t\t$args['page']=1;\r\n\t\t$args['slider_only']=true;\r\n\t\t$map_query = &pexeto_get_portfolio_gallery_query( $args );\r\n\t\t$items = array();\r\n\t\twhile ( $map_query->have_posts() ) {\r\n\t\t\t$map_query->the_post();\r\n\t\t\t$items[]=$map_query->post->ID;\r\n\t\t}\r\n\r\n\t\treturn $items;\r\n\t}", "title": "" }, { "docid": "972aec9b102251941a255651455421b7", "score": "0.57746434", "text": "public function getFieldMap();", "title": "" }, { "docid": "0bd754f5e304169ed38df1feec7ca39e", "score": "0.57673836", "text": "public function all() {\n return $this->postCollection;\n }", "title": "" }, { "docid": "09d65792033c696d18d487e7b245b11d", "score": "0.57490027", "text": "public function getDocMaps()\n {\n return $this->hasMany(DocMap::className(), ['cus_id' => 'uuid']);\n }", "title": "" }, { "docid": "574eef28835bcdd0dc7c0b9cf9a7935b", "score": "0.57447547", "text": "protected function getMap()\n {\n return [\n 'P' => [\n 'RECORD_IDENTITY' => 'TPKP',\n 'DATA_MAP' => [\n 'RECORD_TYPE' => 1,\n 'PACKAGE_CODE' => 3,\n 'END_DATE' => 8,\n 'START_DATE' => 8,\n 'QUOTE_DATE' => 8,\n 'RESTRICTION_CODE' => 2,\n 'ORIGIN_FACILITIES' => 26,\n 'DESTINATION_FACILITIES' => 26\n ]\n ],\n 'S' => [\n 'RECORD_IDENTITY' => 'TPKS',\n 'DATA_MAP' => [\n 'RECORD_TYPE' => 1,\n 'PACKAGE_CODE' => 3,\n 'END_DATE' => 8,\n 'SUPPLEMENT_CODE' => 3,\n 'DIRECTION' => 1,\n 'PACK_NUMBER' => 3,\n 'ORIGIN_FACILITY' => 1,\n 'DEST_FACILITY' => 1\n ]\n ],\n ];\n }", "title": "" }, { "docid": "f326131b97908c289c74c9433b8ebb59", "score": "0.57306087", "text": "function mcc_get_locations($post_type)\n{\n $post_args = array(\n 'post_type' => $post_type,\n 'numberposts' => -1\n );\n\n $posts = get_posts($post_args);\n\n $locations = array();\n\n foreach ($posts as $post) {\n $location = get_field('location', $post->ID);\n\n if (false !== $location) {\n $location['post'] = $post;\n\n $locations[] = $location;\n }\n }\n\n return $locations;\n}", "title": "" }, { "docid": "a5649426d01a7964184ac93139f9773b", "score": "0.57262915", "text": "public function allPost()\n {\n return $this->dataPost;\n }", "title": "" }, { "docid": "7c561f9b36a83b7bca6f614f0a1a2f10", "score": "0.57205975", "text": "public static function getMap()\n {\n return array(\n 'id' => IMGDUEL_DATATYPE_INT,\n 'image1' => IMGDUEL_DATATYPE_INT,\n 'image2' => IMGDUEL_DATATYPE_INT,\n 'user_id' => IMGDUEL_DATATYPE_INT,\n 'created' => IMGDUEL_DATATYPE_STRING,\n 'token' => IMGDUEL_DATATYPE_STRING\n );\n }", "title": "" }, { "docid": "eb8b33250576ebcb273df28593d49dfd", "score": "0.5713569", "text": "public function getPropertiesMap();", "title": "" }, { "docid": "5bac1379d071cb0efa8a1b152ae813cc", "score": "0.5698055", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Entity\\IntegerField('ID', ['primary' => true, 'autocomplete' => true]),\n\t\t\tnew Entity\\IntegerField('FORUM_GROUP_ID'),\n\t\t\tnew Entity\\StringField('LID', ['size' => 2]),\n\t\t\tnew Entity\\StringField('NAME', ['size' => 255]),\n\t\t\tnew Entity\\StringField('DESCRIPTION', ['size' => 255])\n\t\t];\n\t}", "title": "" }, { "docid": "5b267bd7ed634303a4df01ee2cb25198", "score": "0.56973994", "text": "private function get_listing_map() {\n\n\t\t// 1.) Nearby properties -- based off of the walking triangle?\n\t\t// 2.) Directions -- will be through the google directions api\n\t\t// 3.) NearBy places -- put the walkscore information there as well\n\t\t// most of this content is hard coded in the view because its so specialized\n\n\t\t$data = array(\n\n\t\t\t\"nearby_properties\" => array(\n\t\t\t\t\"properties\" => $this->CI->nearby_properties->get_content($this->property_id, $this->CI->general->config(\"max_nearby_properties\")),\n\t\t\t\t\"center\" => $this->CI->geographical_information->get_coordinates($this->property_id),\n\t\t\t\t\"thumbnail\" => $this->CI->thumbnail->general_thumbnail($this->property_id),\n\t\t\t),\n\n\t\t\t\"walkscore\" => $this->CI->walkscore->walkscore($this->property_id),\n\n\t\t\t\"directions\" => array(\n\t\t\t\t\"center\" => $this->CI->geographical_information->get_coordinates($this->property_id),\n\t\t\t\t\"address\" => $this->CI->general->get_category($this->property_id, \"formatted_address\"),//\n\t\t\t\t\"thumbnail\" => $this->CI->thumbnail->general_thumbnail($this->property_id),\n\t\t\t),\n\t\t);\n\n\t\t$html = $this->CI->load->view(\"bumpboxes/listing_map\",$data,true);//return the parsed html\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "ae042d03b21cf3f208c6299202a82699", "score": "0.5689308", "text": "public function getPostCollection()\n\t{\n\t\treturn $this->_factory->getFactory('Post')->create()->getCollection()->addPostTypeFilter($this->getPostType());\n\t}", "title": "" }, { "docid": "b9075909bf13e6164ffb7a073f716d6c", "score": "0.56852233", "text": "public function getRef_map()\n {\n return $this->ref_map;\n }", "title": "" }, { "docid": "4d0661ab79b03f015d699c18ca4c29ef", "score": "0.5645631", "text": "public function getMappings();", "title": "" }, { "docid": "0e975960f1972749ad31eefb0352e20c", "score": "0.56339633", "text": "public function getProperties(): Map\n {\n return $this->properties;\n }", "title": "" }, { "docid": "09ba793704bcc88fcd377815332d599d", "score": "0.5610587", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'EVENT_QUESTION_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'ANSWER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'MESSAGE' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "2650a07e6f9ec7ae7defc84096fe0802", "score": "0.5607903", "text": "public function getFields(){ return $this->field_map; }", "title": "" }, { "docid": "28a1363421c5c41f615568ef3c2ce9be", "score": "0.5606073", "text": "public function getProperties(): Map {\n\t\treturn $this->properties;\n\t}", "title": "" }, { "docid": "0e53ec32b402b7c624b4f9fc57f6f56e", "score": "0.5603987", "text": "function ajax_for_map()\n {\n global $post;\n \n// Query Arguments\n $args = array (\n 'post_type' => HADES_CPT,\n 'nopaging' => true,\n 'order' => 'DESC',\n 'category_name' => implode( \",\", $_POST['category_name'] ),\n );\n\n $query_hades = new WP_Query( $args );\n\n if( $query_hades->have_posts() )\n {\n $postes=array();\n while( $query_hades->have_posts() )\n {\n $query_hades->the_post();\n $p[\"id\"]=$post->ID;\n $p[\"title\"]=$post->post_title;\n $p[\"permalink\"]=get_post_permalink( $post->ID );\n $p[\"thumbnail\"]=get_post_thumbnail_id($post->ID);\n $p[\"contact\"]=get_post_meta( $post->ID, 'contact', true );\n $p[\"x\"]=get_post_meta( $post->ID, 'gps_x', true );\n $p[\"y\"]=get_post_meta( $post->ID, 'gps_y', true );\n $p[\"cat\"]=get_the_category()[0]->slug;\n array_push($postes,$p ) ;\n }\n echo json_encode($postes); \n }\n else\n {\n // no posts found\n }\n wp_reset_postdata();\n die();\n }", "title": "" }, { "docid": "c14f2f23a0d80b103c83b96f98e37829", "score": "0.55980235", "text": "function get_maps()\n{\n\theader('Content-Type: application/json');\n\t$db_connection = db_open();\n\n\t/*\n\t * Get the list of maps\n\t*/\n\tif ($result = $db_connection->query(\"SELECT * FROM maps\"))\n\t{\n\t\techo '[';\n\t\t$is_first = TRUE;\t\t\n\t\t/* fetch associative array */\n\t\twhile ($row = $result->fetch_assoc())\n\t\t{\n\t\t\tif (!$is_first)\n\t\t\t{\n\t\t\t\techo ',';\n\t\t\t}\n\t\t\t$is_first = FALSE;\n\t\t\t\t\n\t\t\tmap_row_to_response($row);\n\t\t}\n\n\t\t/* free result set */\n\t\t$result->free();\n\t\techo ']';\t\t\t\n\t}\n\telse \n\t{\n\t\thttp_response_code(400);\t\n\t\techo \"Failed query to MySQL: (\" . $db_connection->errno . \") \" . $db_connection->error;\n\t}\n\t\n\tdb_close($db_connection);\n}", "title": "" }, { "docid": "ff42da687b1179fc6bdfae163b0b9099", "score": "0.55969477", "text": "private function getFieldsMap()\n {\n return $this->fieldMapper->getFieldsMap();\n }", "title": "" }, { "docid": "299dcc7da0aa772b6af1a13b7089b298", "score": "0.5568584", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'PATH' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "b28334eef91e6e9be40709bb01380fe8", "score": "0.5565484", "text": "public function getPostTags()\n\t{\n\t\t$return = null;\n\t\tif(isset($this->postTag[$this->pageData[$this->arrayPosition][\"PrimaryKey\"]]))\n\t\t{\n\t\t\tforeach($this->postTag[$this->pageData[$this->arrayPosition][\"PrimaryKey\"]] as $key)\n\t\t\t{\n\t\t\t\t$return .= $key[\"Name\"] . \", \";\n\t\t\t}\n\t\t\n\t\t\t$return = substr($return, 0, -2);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "64b8a02e2310e27e4b76acc7fd79c8c0", "score": "0.55448705", "text": "public function getMap()\n {\n return $this->map;\n }", "title": "" }, { "docid": "29837175110f720c4629ddb1c5b10bc9", "score": "0.55312127", "text": "public function maps()\n {\n return $this->belongsToMany(Map::class, 'op_map_socialplaylist', 'socialplaylist_id');\n }", "title": "" }, { "docid": "4d523a0218f8d51e269b88b5c713e703", "score": "0.5530562", "text": "public function getMap()\n\t{\n\t\treturn $this->map;\n\t}", "title": "" }, { "docid": "d9877c5a16ccccc5e689c482b99df6d0", "score": "0.5521505", "text": "public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_ID_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_SORT_FIELD'),\n ),\n 'READ_ONLY' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_READ_ONLY_FIELD'),\n ),\n 'SERVICE_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateServiceId'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_SERVICE_ID_FIELD'),\n ),\n 'BUCKET' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateBucket'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_BUCKET_FIELD'),\n ),\n 'LOCATION' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateLocation'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_LOCATION_FIELD'),\n ),\n 'CNAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateCname'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_CNAME_FIELD'),\n ),\n 'FILE_COUNT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FILE_COUNT_FIELD'),\n ),\n 'FILE_SIZE' => array(\n 'data_type' => 'float',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FILE_SIZE_FIELD'),\n ),\n 'LAST_FILE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_LAST_FILE_ID_FIELD'),\n ),\n 'PREFIX' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validatePrefix'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_PREFIX_FIELD'),\n ),\n 'SETTINGS' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_SETTINGS_FIELD'),\n ),\n 'FILE_RULES' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FILE_RULES_FIELD'),\n ),\n 'FAILOVER_ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FAILOVER_ACTIVE_FIELD'),\n ),\n 'FAILOVER_BUCKET_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FAILOVER_BUCKET_ID_FIELD'),\n ),\n 'FAILOVER_COPY' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FAILOVER_COPY_FIELD'),\n ),\n 'FAILOVER_DELETE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FAILOVER_DELETE_FIELD'),\n ),\n 'FAILOVER_DELETE_DELAY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('FILE_BUCKET_ENTITY_FAILOVER_DELETE_DELAY_FIELD'),\n ),\n 'FAILOVER_BUCKET' => array(\n 'data_type' => 'Bitrix\\Clouds\\FileBucket',\n 'reference' => array('=this.FAILOVER_BUCKET_ID' => 'ref.ID'),\n ),\n );\n }", "title": "" }, { "docid": "fcaf3b65175f38985158b70883b0973c", "score": "0.55213684", "text": "public function add_map_details( $content ) {\n\t if ( ! function_exists('buddyblog_is_buddyblog_post' ) || ! buddyblog_is_buddyblog_post( get_the_ID() ) ) {\n\t return $content;\n }\n\t $geo = array();//we are using array as we may want to allow listing of maps on teh archive page too\n $geo[] = $this->get_geo_info( get_the_ID() );\n ob_start();\n\t ?>\n <div id=\"bblog-map-canvas-<?php the_ID(); ?>\" class=\"bblog-map-canvas\">\n\n </div>\n\n\t <script type=\"text/javascript\">\n bblog_posts_geo = '<?php echo json_encode( $geo ); ?>';\n </script>\n <style type=\"text/css\">\n .bblog-map-canvas {\n width: 100%;\n height: 400px;\n }\n </style>\n\n<?php\n\t\t$content = $content . ob_get_clean();\n return $content;\n }", "title": "" }, { "docid": "ff85788ad68b5dd4fe29374b2465cd33", "score": "0.5516796", "text": "public function getFieldMap()\n\t{\n\t\treturn $this->aFieldMap;\n\t}", "title": "" }, { "docid": "48d7f4f75b0ac2574cdc593af43191b6", "score": "0.55092543", "text": "public function getMap() {\n\t\treturn $this->map;\n\t}", "title": "" }, { "docid": "fcdaa81612eb6b85bf1aa958f530502a", "score": "0.5498474", "text": "function _site_map_items ($SITE_MAP_OBJ = false) {\n\t\t$OBJ = $this->_load_sub_module(\"blog_utils\");\n\t\treturn $OBJ->_site_map_items($SITE_MAP_OBJ);\n\t}", "title": "" }, { "docid": "c413fdd6430459ef9de19fa8add2431d", "score": "0.54681647", "text": "public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Entity\\IntegerField('ID', ['primary' => true, 'autocomplete' => true]),\n\t\t\tnew Entity\\IntegerField('SORT', ['default_value' => 150]),\n\t\t\tnew Entity\\IntegerField('PARENT_ID'),\n\t\t\tnew Entity\\IntegerField('LEFT_MARGIN'),\n\t\t\tnew Entity\\IntegerField('RIGHT_MARGIN'),\n\t\t\tnew Entity\\IntegerField('DEPTH_LEVEL'),\n\t\t\tnew Entity\\StringField('XML_ID', ['size' => 255]),\n\t\t\tnew Reference(\"LANG\", GroupLangTable::class, Join::on(\"this.ID\", \"ref.FORUM_GROUP_ID\"))\n\t\t];\n\t}", "title": "" }, { "docid": "8151f49dbf2dc351e248d79a57ad1955", "score": "0.5443226", "text": "function show_map( $atts, $content = '' ) {\r\n \r\n extract(shortcode_atts(array(\r\n 'id' => 0,\r\n 'w' => '',\r\n 'h' => '',\r\n 'zoom' => '13',\r\n 'maptype' => 'HYBRID',\r\n 'float' => '',\r\n 'template' => '',\r\n 'thumbw' => '250',\r\n 'thumbh' => '100',\r\n 'links' => 'ALL',\r\n 'mainlink' => 'PICTURE',\r\n 'caption' => ''\r\n ), $atts ));\r\n $out = nggpanoSingleMap($id, $w, $h, $zoom, $maptype, $float, $template, $content, $thumbw, $thumbh, $links, $mainlink, $caption);\r\n \r\n return $out;\r\n }", "title": "" }, { "docid": "99cb53ca129b2e385305635f29b6323e", "score": "0.5441668", "text": "public function map() {\n\t\t$item = $this->item;\n\n\t\t$map = [];\n\n\t\t$map['internal_id'] = $item['id'];\n\t\t$map['type'] = $this->getType();\n\t\t$map['property_type'] = $this->getPropertyType();\n\t\t$map['title'] = $this->translate($item['title']);\n\t\t$map['content'] = $this->translate($item['description']);\n\t\t$map['price'] = ceil($item['price']);\n\t\t$map['currency'] = $item['currency'];\n\t\t$map['country_code'] = $item['location']['country'];\n\t\t$map['location'] = $item['location']['state'];\n\t\t$map['city_area'] = $item['location']['city'];\n\t\t$map['region'] = $item['location']['district'];\n\t\t$map['street_name'] = $item['location']['address_parts']['street'];\n\t\t$map['street_number'] = $item['location']['address_parts']['number'];\n\n\t\t//Optional\n\t\t//$map['barter_enabled'] = '';\n\t\t//$map['video'] = '';\n\n\t\tif(!empty($item['commercial_enabled'])){\n\t\t\t$map['commercial_enabled'] = $item['commercial_enabled'] ? 'yes' : 'no';\n\t\t}\n\n\t\tif(!empty($item['professional_enabled'])){\n\t\t\t$map['professional_enabled'] = $item['professional_enabled'] ? 'yes' : 'no';\n\t\t}\n\n\t\tif (!empty($item['location']['address_parts']['floor'])) {\n\t\t\t$map['floor'] = $item['location']['address_parts']['floor'];\n\t\t}\n\n\t\tif (!empty($item['location']['address_parts']['door'])) {\n\t\t\t$map['flat_number'] = $item['location']['address_parts']['door'];\n\t\t}\n\n\t\tif (!empty($item['location']['lat'])) {\n\t\t\t$map['latitude'] = $item['location']['lat'];\n\t\t}\n\n\t\tif (!empty($item['location']['lng'])) {\n\t\t\t$map['longitude'] = $item['location']['lng'];\n\t\t}\n\n\t\tif (!empty($item['construction_year'])) {\n\t\t\t$map['year'] = $item['construction_year'];\n\t\t}\n\n\t\tif (!empty($item['rooms'])) {\n\t\t\t$map['rooms'] = $item['rooms'];\n\t\t}\n\n\t\tif (!empty($item['bedrooms'])) {\n\t\t\t$map['bedrooms'] = $item['bedrooms'];\n\t\t}\n\n\t\tif (!empty($item['baths'])) {\n\t\t\t$map['bathrooms'] = $item['baths'];\n\t\t}\n\n\t\tif (!empty($item['expenses'])) {\n\t\t\t$map['expenses'] = $item['expenses'];\n\t\t}\n\n\t\t$map['parking'] = !empty($item['features']['parking']) ? 1 : 0;\n\n\t\tif (!empty($item['size'])) {\n\t\t\t$map['total_area'] = $this->convertSize($item['size']);\n\t\t}\n\n\t\tif (!empty($item['balcony_area'])) {\n\t\t\t$map['balcony_area'] = $this->convertSize($item['balcony_area']);\n\t\t}\n\n\t\tif (!empty($item['lot_area'])) {\n\t\t\t$map['lot_area'] = $this->convertSize($item['lot_area']);\n\t\t}\n\n\t\tif (!empty($item['covered_area'])) {\n\t\t\t$map['covered_area'] = $this->convertSize($item['covered_area']);\n\t\t}\n\n\t\tif (!empty($item['semi_covered_area'])) {\n\t\t\t$map['semi_covered_area'] = $this->convertSize($item['semi_covered_area']);\n\t\t}\n\n\t\tif (!empty($item['uncovered_area'])) {\n\t\t\t$map['uncovered_area'] = $this->convertSize($item['uncovered_area']);\n\t\t}\n\n\t\tif (!empty($item['basement_area'])) {\n\t\t\t$map['basement_area'] = $this->convertSize($item['basement_area']);\n\t\t}\n\n\t\tif (!empty($item['mezzanine_area'])) {\n\t\t\t$map['mezzanine_area'] = $this->convertSize($item['mezzanine_area']);\n\t\t}\n\n\t\tif (!empty($item['usable_area'])) {\n\t\t\t$map['usable_area'] = $this->convertSize($item['usable_area']);\n\t\t}\n\n\t\tif (!empty($item['buildable_area'])) {\n\t\t\t$map['buildable_area'] = $this->convertSize($item['buildable_area']);\n\t\t}\n\n\t\tif (!empty($item['showcase_front'])) {\n\t\t\t$map['showcase_front'] = $item['showcase_front'];\n\t\t}\n\n\t\tif (!empty($item['property_disposal'])) {\n\t\t\t$map['property_disposal'] = $item['property_disposal'];\n\t\t}\n\n\t\tif (!empty($item['building_condition'])) {\n\t\t\t$map['building_condition'] = $item['building_condition'];\n\t\t}\n\n\t\tif (!empty($item['property_condition'])) {\n\t\t\t$map['property_condition'] = $item['property_condition'];\n\t\t}\n\n\t\t$map['pictures'] = $this->getImages();\n\n\t\t$map['contact']['contact_email'] = $this->config['email'];\n\t\t$map['contact']['contact_name'] = $this->config['name'];\n\t\t$map['contact']['contact_lastname'] = $this->config['lastname'];\n\t\t$map['contact']['contact_mobile'] = $this->config['phone'];\n\t\t//$map['contact']['contact_business_name'] = '';\n\t\t//$map['contact']['contact_landphone'] = '';\n\t\t//$map['contact']['contact_picture'] = '';\n\t\t//\n\t\t//$map['extras']['has_water'] = '';\n\t\t//$map['extras']['has_drain'] = '';\n\t\t//$map['extras']['has_gas'] = '';\n\t\t//$map['extras']['has_internet'] = '';\n\t\t//$map['extras']['has_electricity'] = '';\n\t\t//$map['extras']['has_pavement'] = '';\n\t\t//$map['extras']['has_landphone'] = '';\n\t\t//$map['extras']['has_cabletv'] = '';\n\n\t\tif(!empty($item['features']['pool'])){\n\t\t\t$map['extras']['has_pool'] = 'yes';\n\t\t}\n\n\t\treturn $map;\n\t}", "title": "" }, { "docid": "8dcd946450ef94d03003c726f86b6b72", "score": "0.54416466", "text": "public function getPostsArray(){\n $fields = [\n 'posts.title' => 'Title',\n 'posts.content' => 'Content',\n 'users.name' => 'Author',\n 'status' => 'Status',\n 'view' => 'View',\n 'categories.name' => 'Category',\n 'tags.name' => 'Tag',\n ];\n //DB::enableQueryLog();\n $posts = Post::export($fields)->get()->toArray();\n //dd(DB::getQueryLog());\n //dd($posts);\n return $posts;\n }", "title": "" }, { "docid": "28636301b604a590ca7852804991eb22", "score": "0.5435409", "text": "public function getLayerlistForTemplate()\n {\n $mapObject = $this->GetComponent('Map');\n $obj = new ViewableData();\n \n $result = array();\n if ($mapObject) {\n $overlayLayers = $mapObject->getComponents('Layers', \"Enabled = 1 AND LayerType = 'overlay'\", 'DisplayPriority DESC');\n $backgroundLayers = $mapObject->getComponents('Layers', \"Enabled = 1 AND LayerType = 'background'\", 'DisplayPriority DESC');\n \n $obj->setField(\"MapPage\", $this);\n $obj->setField(\"overlayLayers\", $overlayLayers);\n $obj->setField(\"backgroundLayers\", $backgroundLayers);\n }\n return $obj;\n }", "title": "" }, { "docid": "ff42cf84d01cff3110751e3e6dfbdb32", "score": "0.5418922", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'OBJECT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t),\n\t\t\t'ACCESS_CODE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateAccessCode'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "b230f7cb1bf66d8e9f799f7756ea2e39", "score": "0.5409527", "text": "protected function getParameterMap()\n {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "7784b1a29a0941d50d65b9999020bf08", "score": "0.5402887", "text": "public function getPosts()\r\n {\r\n //$this->getBdd();\r\n return $this->getAll('posts', 'Post');\r\n }", "title": "" }, { "docid": "d58cbb6d04e6f4c66aec90c1346411fa", "score": "0.540255", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t(new IntegerField('ID', ['primary' => true, 'autocomplete' => true])),\n\t\t\t(new IntegerField('VOTE_ID')),\n\t\t\t(new IntegerField('VOTE_USER_ID', [\"required\" => true])),\n\t\t\t(new DatetimeField('DATE_VOTE')),\n\t\t\t(new IntegerField('STAT_SESSION_ID')),\n\t\t\t(new StringField('IP', ['size' => 15])),\n\t\t\t(new BooleanField('VALID', ['values' => ['N', 'Y'], 'default_value' => 'Y'])),\n\t\t\t(new BooleanField('VISIBLE', ['values' => ['N', 'Y'], 'default_value' => 'Y'])),\n\t\t\t(new Reference('QUESTION', \\Bitrix\\Vote\\EventQuestionTable::class, Join::on('this.ID', 'ref.EVENT_ID'))),\n\t\t\t(new Reference('USER', \\Bitrix\\Vote\\UserTable::class, Join::on('this.VOTE_USER_ID', 'ref.ID'))),\n\t\t);\n\t}", "title": "" }, { "docid": "ed2109b52d80032e8eb9aaca8e3df121", "score": "0.5400024", "text": "public function postTypes()\n {\n return Collection::make($this->object_type)\n ->map(function ($post_type) {\n return PostType::load($post_type);\n });\n }", "title": "" }, { "docid": "a306095c6d571ca80fef45c6a9ca1f83", "score": "0.53947806", "text": "public function contentTypeMap()\n {\n $map = array($this->getMIMEId() => $this->getType());\n foreach ($this->_parts as $val) {\n $map += $val->contentTypeMap();\n }\n return $map;\n }", "title": "" }, { "docid": "3b3619b6a9e38f105627f8a5f18b7e95", "score": "0.53879285", "text": "function map_func( $ratts ){\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t\"cat\"=>\"storie\",\n\t\t\t\"center\" => \"45.4671,9.1646\",\n\t\t\t\"height\" => \"500px\",\n\t\t\t\"scroll\"=>false,\n\t\t), $ratts);\n\twp_enqueue_script(\"mbljs\", 'https://api.tiles.mapbox.com/mapbox.js/v2.1.6/mapbox.js');\n\twp_enqueue_style(\"mbls\", \"https://api.tiles.mapbox.com/mapbox.js/v2.1.6/mapbox.css\");\n\t\n\t$posts = get_posts(array(\"posts_per_page\"=>1000, \"category_name\"=>$atts[\"cat\"]));\n\t$val = array();\n\tforeach ($posts as $post) {\n\t\tif (get_post_meta($post->ID,\"unicatt_map\", true) != \"\")\n\t\t\t$val[] = array(\"text\"=>$post->post_excerpt, \"title\"=>$post->post_title, \"id\"=>$post->ID, \"coords\"=>explode(\",\", get_post_meta($post->ID,\"unicatt_map\", true)), \"color\"=>get_post_meta($post->ID, \"unicatt_color\", true), \"url\"=>get_permalink( $post->ID));\n\t}\n\tob_start();\n\t?>\n\t<div id=\"map\" style=\"width:100%; height:<?php echo $atts[\"height\"];?>\" ></div>\n\t<script>\n\tvar data = <?php echo json_encode($val);?>;\n\n\tjQuery(function(){\n\t\tL.mapbox.accessToken = \"pk.eyJ1Ijoic2lybW1vLXVuaWNhdHQiLCJhIjoiTVA3N0x4USJ9.ccVpbxWlHQe7ovfPoEBYkg\";\n\t\tvar mapboxTiles = L.tileLayer('https://{s}.tiles.mapbox.com/v3/examples.3hqcl3di/{z}/{x}/{y}.png?access_token=' + L.mapbox.accessToken, {\n\t \tattribution: '<a href=\"http://www.mapbox.com/about/maps/\" target=\"_blank\">Terms &amp; Feedback</a>'\n\t\t});\n\t\tvar map = L.map('map', {\"scrollWheelZoom\":<?php echo json_encode($atts[\"scroll\"]);?>})\n\t\t .addLayer(mapboxTiles)\n\t\t .setView(<?php echo json_encode(explode(\",\", $atts[\"center\"]));?>, 15);\n\n\t\tfunction create_marker(data){\n\t\t\tvar icon = L.mapbox.marker.icon({\"marker-size\":\"large\", \"marker-color\":data.color});\n\t\t\tL.marker(data.coords, {icon: icon}).bindPopup(\"<h2><a href='\"+data.url+\"'>\"+data.title+\"</a></h2><p>\"+data.text+\"</p>\").addTo(map);\n\t\t}\n\n\t\tfor (var x in data){\n\t\t\tcreate_marker(data[x]);\n\t\t}\n\n\n\t});\n\t</script>\n\n\n\t<?php\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "58e5a2f5b77356ec931f7b0faaf37486", "score": "0.53835183", "text": "public function all()\n {\n return $this->mapping;\n }", "title": "" }, { "docid": "c30177d6749a6609b6d4055caf9719cd", "score": "0.5371914", "text": "public function getAll()\n {\n return $this->post->orderBy('created_at', 'desc');\n }", "title": "" }, { "docid": "ccc6693d701509764c6b064ad200346c", "score": "0.537139", "text": "public function getPropertiesMap(){\n return $this->propertiesMap;\n }", "title": "" }, { "docid": "b4b78ebc0ce5e04140d99725ffcdbee8", "score": "0.53637224", "text": "public function get_post_type_container_data() {\n\t\t$post_types = array_keys( $this->linked_post_types );\n\t\t$data = array(\n\t\t\t'post_types' => array(),\n\t\t);\n\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\t$data['post_types'][ $post_type ] = $this->get_post_type_container( $post_type );\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "238093b12ac939ede8ca78539850b8e2", "score": "0.5349585", "text": "public function get_meta_fields_for_post_type() {\n\n\t\t$default = array(\n\t\t\t'label' => __( 'General', 'jet-engine' ),\n\t\t\t'options' => array(\n\t\t\t\t'_permalink' => __( 'Permalink', 'jet-engine' ),\n\t\t\t),\n\t\t);\n\n\t\t$result = array();\n\t\t$meta_fields = array();\n\n\t\tif ( jet_engine()->options_pages ) {\n\t\t\t$default['options']['options_page'] = __( 'Options', 'jet-engine' );\n\t\t}\n\n\t\tif ( jet_engine()->modules->is_module_active( 'maps-listings' ) ) {\n\t\t\t$default['options']['open_map_listing_popup'] = __( 'Open Map Listing Popup', 'jet-engine' );\n\t\t\t$default['options']['open_map_listing_popup_hover'] = __( 'Open Map Listing Popup on Hover', 'jet-engine' );\n\t\t}\n\n\t\tif ( jet_engine()->meta_boxes ) {\n\t\t\t$meta_fields = jet_engine()->meta_boxes->get_fields_for_select( 'plain' );\n\t\t}\n\n\t\treturn apply_filters(\n\t\t\t'jet-engine/listings/dynamic-link/fields',\n\t\t\tarray_merge( array( $default ), $meta_fields )\n\t\t);\n\n\t}", "title": "" }, { "docid": "1accc444b21e86b8df3eb8c23a3c791e", "score": "0.53491634", "text": "public static function getPosts() {\n global $wpdb;\n \n $post_type = array_key_exists('post_type', $_GET) ? $_GET['post_type'] : null;\n if(is_null($post_type)) { return false; exit; }\n \n $post_results = $wpdb->get_results(\"\n SELECT * FROM wp_posts \n WHERE post_type = '\" . $post_type .\"' \n AND post_status = 'publish'\"\n , ARRAY_A\n );\n $wpdb->flush();\n $post_meta_results = $wpdb->get_results(\"\n SELECT meta_id, post_id, meta_key, meta_value\n FROM wp_postmeta\n RIGHT JOIN wp_posts ON ( wp_posts.ID = wp_postmeta.post_id ) \n WHERE wp_posts.post_type = '\" . $post_type .\"'\n \", ARRAY_A\n );\n\n $combined = array();\n foreach($post_results as $post) {\n $post_cointainer = $post;\n $meta_container = array();\n foreach($post_meta_results as $meta) {\n if($meta['post_id'] == $post['ID']) $post[$meta['meta_key']] = $meta['meta_value'];\n }\n $combined[] = $post;\n }\n return $combined;\n }", "title": "" }, { "docid": "1a86dde417abc85cb016565560227d75", "score": "0.5348427", "text": "public function selectMap() {\n\t\t\n\t\t$db = Database::getDB();\n\t\t$query = 'SELECT * FROM Map ';\n\t\t$result = $db->query($query);//records of categories from category table\n\t\t$mapArray = array();//empty array to hold category objects \n\t\t\n\t\tforeach($result as $row) {\n\t\t\t$mapper = new MapColumns($row['MapID'], \t\n\t\t\t\t\t\t\t\t$row['name'],\n\t\t\t\t\t\t\t\t$row['address'],\n\t\t\t\t\t\t\t\t$row['lat'],\n\t\t\t\t\t\t\t\t$row['long'],\n\t\t\t\t\t\t\t\t$row['ActivityID']\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t\t//append category object to my array \n\t\t\t$mapArray[] = $mapper;\n\t\t}\n\t\treturn $mapArray;\n\t}", "title": "" }, { "docid": "9d84541727a89a487724d55e3ec7f271", "score": "0.5345873", "text": "abstract protected function getApiMap();", "title": "" }, { "docid": "042868dad7cd654de7199ef9ad4e02df", "score": "0.53442717", "text": "abstract protected function _getMap();", "title": "" }, { "docid": "a176c3e3dd0fbfe3331605559dd350c3", "score": "0.5342971", "text": "public function getDocumentMappings();", "title": "" }, { "docid": "6e8f1085aecb7c51e3ac62c68e3d102d", "score": "0.533827", "text": "public function getMapSupplied()\n {\n return $this->mapSupplied;\n }", "title": "" }, { "docid": "941c8581954b67f308668c3f159d4ce1", "score": "0.5334144", "text": "public function getAllPost()\n {\n return $this->postTable->fetchAll();\n }", "title": "" }, { "docid": "f4a5880f82b8ea9303ec2363b1e5a881", "score": "0.5333626", "text": "public function posts()\n {\n return $this->belongsToMany(\n Post::class,\n 'post_category_mappings',\n 'category_id',\n 'post_id'\n );\n }", "title": "" }, { "docid": "f963319fdcc43d6e6ab8d62b14d2f638", "score": "0.53333384", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t),\n\t\t\t'EVENT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'QUESTION_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t),\n\t\t\t'VOTE' => array(\n\t\t\t\t'data_type' => '\\Bitrix\\Vote\\EventTable',\n\t\t\t\t'reference' => array(\n\t\t\t\t\t'=this.EVENT_ID' => 'ref.ID',\n\t\t\t\t),\n\t\t\t\t'join_type' => 'RIGHT',\n\t\t\t),\n\t\t\t'ANSWER' => array(\n\t\t\t\t'data_type' => '\\Bitrix\\Vote\\EventAnswerTable',\n\t\t\t\t'reference' => array(\n\t\t\t\t\t'=this.ID' => 'ref.EVENT_QUESTION_ID',\n\t\t\t\t),\n\t\t\t\t'join_type' => 'LEFT',\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "5ca5f71702e22c70e3a6802794c653b9", "score": "0.53328264", "text": "public function getPosts();", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "dbe89d6c4f6e83664e91da7a11ccfda3", "score": "0.53328025", "text": "protected function getParameterMap() {\n return $this->_parameterMap;\n }", "title": "" }, { "docid": "d576a6a9b741ff1773b00ab2c0dca508", "score": "0.53289104", "text": "public function getFieldMap()\n {\n if (null === $this->_file) {\n $this->_openFile();\n }\n\n return $this->_fieldMap;\n }", "title": "" }, { "docid": "9b1e546762bfc451e03ec05726231067", "score": "0.5316475", "text": "function dot_createPostList(){\n\t$postList = array();\n\t$args = array(\n\t\t'posts_per_page' => -1\n\t);\n\t$results = get_posts( $args );\n\tforeach ( $results as $post ) {\n\t $postList[$post->ID] = array(\n\t\t\t'id' => $post->ID,\n\t\t\t'post_name' => $post->post_title,\n\t\t\t'thumbnail' => $post->post_date\n\t\t);\n\t}\n\treturn $postList;\n}", "title": "" }, { "docid": "3ef918c2f72e50583f07af8877018595", "score": "0.5293702", "text": "function cspm_get_all_map_styles(){\r\n\r\n\t\t\t$map_styles_array = array();\r\n\t\t\t\r\n\t\t\tif(file_exists($this->plugin_path . 'inc/cspm-map-styles.php')){\r\n\r\n\t\t\t\t$map_styles = include($this->plugin_path . 'inc/cspm-map-styles.php');\r\n\t\t\t\t\r\n\t\t\t\tarray_multisort($map_styles);\r\n\t\t\t\t\r\n\t\t\t\tforeach($map_styles as $key => $value){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$value_output = '';\r\n\t\t\t\t\t$value_output .= empty($value['new']) ? '' : ' <sup class=\"cspm_new_tag\" style=\"margin:0 5px 0 -2px;\">NEW</sup>';\t\t\r\n\t\t\t\t\t$value_output .= $value['title'];\t\t\t\t\r\n\t\t\t\t\t$value_output .= empty($value['demo']) ? '' : ' <span class=\"cspm_demo_tag\"><a href=\"'.$value['demo'].'\" target=\"_blank\" class=\"cspm_blank_link\"><small>Demo</small></a></span>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$map_styles_array[$key] = $value_output;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $map_styles_array;\r\n\r\n\t\t}", "title": "" }, { "docid": "2ac905ad783a0fd527747f5e423a983f", "score": "0.52890074", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'NAME' => new Main\\Entity\\StringField('NAME', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD')\n\t\t\t)),\n\t\t\t'PERCENTAGE' => new Main\\Entity\\FloatField('PERCENTAGE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t))\n\t\t);\n\t}", "title": "" }, { "docid": "efe14a7491f1b41379d03ebe8189cca4", "score": "0.52805823", "text": "public function posts()\n {\n return $this->_posts();\n }", "title": "" }, { "docid": "33537e7317c758fe9eeecc204b9beba1", "score": "0.5280321", "text": "final public function getFieldsMap(): array\n\t{\n\t\treturn $this->fieldsMap;\n\t}", "title": "" }, { "docid": "0f0e197b3b2894d994fada0df6b686ea", "score": "0.52758145", "text": "public function getTwigData()\n {\n global $post;\n $twigData = array();\n\n if ($post) {\n $meta = new Meta($post->ID);\n $twigData['menu'] = $meta->getMenu();\n $twigData['logo'] = $meta->getLogoUrl();\n }\n return $twigData;\n }", "title": "" }, { "docid": "b54855db9362f37ea2b3f807986fea23", "score": "0.52718556", "text": "public function load_map($content) {\n if (is_singular($this->post_types) && is_main_query() && get_post_meta(get_the_ID(), 'wpuinsertmaps__load_map', 1)) {\n $wpuinsertmaps__markers = json_encode(get_post_meta(get_the_ID(), 'wpuinsertmaps__markers', 1));\n $wpuinsertmaps__map_position = get_post_meta(get_the_ID(), 'wpuinsertmaps__map_position', 1);\n $content_map = '<div class=\"wpuinsertmaps-element\" data-map=\"' . esc_attr($wpuinsertmaps__markers) . '\"></div>';\n if ($wpuinsertmaps__map_position == 'over') {\n $content = $content_map . $content;\n } else {\n $content .= $content_map;\n }\n }\n return $content;\n }", "title": "" }, { "docid": "102eda592e665175fe3dd05b4c22428e", "score": "0.5268631", "text": "private function makePosts()\n {\n $content = [];\n $_tags = [];\n\n foreach ($this->posts as $post) {\n\n $_tags = $this->buildCustomtags($post['config'],$post['text']);\n $_tags['navigation'] = $this->navigation;\n $content[$post['config']['url']] = $this->bindParams($this->template['main'],$this->getTags($_tags));\n }\n\n return $content;\n }", "title": "" }, { "docid": "6410b5978924e918e5e99aa9088f284e", "score": "0.5266426", "text": "function GMapListingInfo(){\n\tGMAP::apply('gmap_listing_info');\n}", "title": "" }, { "docid": "032756e53bea6559ab0cbbb38baccc6a", "score": "0.5263296", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t)),\n\t\t\tnew Main\\Entity\\StringField('GUID', array('required' => true)),\n\t\t\tnew Main\\Entity\\IntegerField('STATUS', array('required' => true)),\n\t\t\tnew Main\\Entity\\StringField('COMMAND', array('required' => true)),\n\t\t\tnew Main\\Entity\\StringField('MODULE', array('required' => true)),\n\t\t\tnew Main\\Entity\\StringField('CALLBACK', array('required' => true)),\n\t\t\tnew Main\\Entity\\StringField('PARAMS', array('required' => true)),\n\t\t\tnew Main\\Entity\\StringField('FILE'),\n\t\t\tnew Main\\Entity\\StringField('ERROR'),\n\t\t\tnew Main\\Entity\\IntegerField('ERROR_CODE'),\n\t\t\tnew Main\\Entity\\DatetimeField('UPDATE_TIME', array('default_value' => function()\n\t\t\t{\n\t\t\t\t$date = new Main\\Type\\DateTime();\n\t\t\t\t$date->setTime($date->format('H'), $date->format('i'), $date->format('s'));\n\t\t\t\treturn $date;\n\t\t\t}\n\t\t\t)),\n\t\t);\n\t}", "title": "" }, { "docid": "02bd77a12eb639564b38081a28047ca5", "score": "0.5262119", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'PROFILE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_PROFILE_ID_FIELD'),\n\t\t\t),\n\t\t\t'UNIX_TIMESTAMP' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_UNIX_TIMESTAMP_FIELD'),\n\t\t\t),\n\t\t\t'TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateType'),\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_TYPE_FIELD'),\n\t\t\t),\n\t\t\t'STATE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateState'),\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_STATE_FIELD'),\n\t\t\t),\n\t\t\t'ENTITY_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateEntityId'),\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TRYING' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TASK_ENTITY_TRYING_FIELD'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "9a37dbb015d3118924e4c0fdc3a52cb3", "score": "0.52580196", "text": "public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'KEY' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('RESIZER_SET_FILE_ENTITY_KEY_FIELD'),\n\t\t\t),\n\t\t\t'SET_DIR' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('RESIZER_SET_FILE_ENTITY_SET_DIR_FIELD'),\n\t\t\t),\n\t\t\t'FILE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('RESIZER_SET_FILE_ENTITY_FILE_ID_FIELD'),\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "01d2171d0dc50364ced4881b0c6f9861", "score": "0.525401", "text": "public static function getMap()\r\n\t{\r\n\t\treturn [\r\n\t\t\tnew IntegerField(\r\n\t\t\t\t'ID',\r\n\t\t\t\t[\r\n\t\t\t\t\t'primary' => true,\r\n\t\t\t\t\t'autocomplete' => true,\r\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_NOINDEX_IBLOCK_SECTIONS_ENTITY_ID_FIELD')\r\n\t\t\t\t]\r\n\t\t\t),\r\n\t\t\tnew IntegerField(\r\n\t\t\t\t'NOINDEX_RULE_ID',\r\n\t\t\t\t[\r\n\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_NOINDEX_IBLOCK_SECTIONS_ENTITY_NOINDEX_RULE_ID_FIELD')\r\n\t\t\t\t]\r\n\t\t\t),\r\n\t\t\tnew IntegerField(\r\n\t\t\t\t'SECTION_ID',\r\n\t\t\t\t[\r\n\t\t\t\t\t'required' => true,\r\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_NOINDEX_IBLOCK_SECTIONS_ENTITY_SECTION_ID_FIELD')\r\n\t\t\t\t]\r\n\t\t\t),\r\n (new Reference('NOINDEX_RULE', SmartseoNoindexRuleTable::class, Join::on('this.NOINDEX_RULE_ID', 'ref.ID')))\r\n ->configureJoinType('left'),\r\n (new Reference('SECTION', \\Bitrix\\Iblock\\SectionTable::class, Join::on('this.SECTION_ID', 'ref.ID')))\r\n ->configureJoinType('left'),\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "be39cc492395f988ff4162dd101bbf40", "score": "0.52480066", "text": "public function getTags(){\n\t\t$tags = new Tagmap;\n\t\t$tags->tags = $this->tags;\n\t\t$tags->noparse_tags = $this->noparse_tags;\n\t\t$tags->singletags = $this->singletags;\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "11d6dd38aec65f560b97dc0995ce0e7c", "score": "0.5244788", "text": "protected function _getMapParams()\n {\n return array(\n 'album' => 'search_in',\n 'terms' => 'terms',\n 'is_color' => 'color',\n 'with_flash' => 'flash',\n 'aperture_value' => 'aperture',\n 'exposuretime' => 'exp_time',\n 'exposuremode' => 'exp_mode',\n 'exposureprogram' => 'exp_prod',\n 'lightsource' => 'light',\n 'whitebalance' => 'white',\n 'iso_speed_rating' => 'iso'\n );\n }", "title": "" } ]
5daff914b4b9dae35796d7de3babedf6
OneToMany (owning side) Remove ComprasOrdemItem
[ { "docid": "a17bfe6de10610e7e7426813fd835664", "score": "0.56751335", "text": "public function removeFkComprasOrdemItens(\\Urbem\\CoreBundle\\Entity\\Compras\\OrdemItem $fkComprasOrdemItem)\n {\n $this->fkComprasOrdemItens->removeElement($fkComprasOrdemItem);\n }", "title": "" } ]
[ { "docid": "61b42b4e585c9b83998313afe728312a", "score": "0.6253855", "text": "public function clearRelated();", "title": "" }, { "docid": "b4446eae315cf3236454f9c70f752666", "score": "0.6154292", "text": "public function remover() {\n\n $oDaoBpaMagnetico = new cl_lab_bpamagnetico();\n $oDaoFechaConferencia = new cl_lab_fechaconferencia();\n $oDaoFechamento = new cl_lab_fechamento();\n\n\n $oDaoBpaMagnetico->excluir(null, \" la55_i_fechamento = {$this->iCodigo}\");\n if ($oDaoBpaMagnetico->erro_status == 0) {\n throw new BusinessException(_M(MSG_COMPETENCIA.\"erro_ao_excluir_arquivo\"));\n }\n\n $oDaoFechaConferencia->excluir(null, \" la58_i_fechamento = {$this->iCodigo}\");\n if ($oDaoFechaConferencia->erro_status == 0) {\n throw new BusinessException(_M(MSG_COMPETENCIA.\"erro_ao_excluir_procedimentos\"));\n }\n\n $oDaoFechamento->excluir($this->iCodigo);\n\n if ($oDaoFechamento->erro_status == 0) {\n throw new BusinessException(_M(MSG_COMPETENCIA.\"erro_ao_excluir_fechamento\"));\n }\n\n\n }", "title": "" }, { "docid": "4bfe39e90d4c3481da90b0d02e64c4e3", "score": "0.60684425", "text": "public function getFKsToRemove();", "title": "" }, { "docid": "0a8c901afd4869ce8a492b906ce5d45b", "score": "0.60168654", "text": "public function deleteExpendablesRelationship(){\n\n $expendables = $this->expendables()->get();\n\n foreach ($expendables as $expendable) {\n $expendable->setWardrobeidNull();\n }\n }", "title": "" }, { "docid": "cee9e04f007b7720e9a32de97bd546de", "score": "0.59954965", "text": "function deleteByComprobante($id)\n {\n global $db;\n $items = $this->getListItems($id); \n for ($i=0; $i<count($items); $i++)\n { \n $this->deleteByItem($items[$i][\"ingresoId\"]);\n }\n $sql = \" delete from almacen_reception where itemId = $id \";\n $db->Execute($sql); \n }", "title": "" }, { "docid": "e4783984f4a8b4df6896192ceb43ec5c", "score": "0.5932531", "text": "public function deleteRelation(){\r\n\t\t$where = \"(uid_foreign=\".$this->getContentElementUid().\r\n \t\t\t\t \" AND uid_local=\".$this->getSelectionUid().\r\n \t\t\t\t \") OR (uid=\".$this->getUid().\")\";\r\n\r\n\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery($this->table,$where);\r\n\t}", "title": "" }, { "docid": "5c2a796cae084dc0002eb5e886c549e4", "score": "0.59190917", "text": "public function remove() {\n $em = new EntityManager($this);\n $em->remove();\n if ($em->getError() !== false) {\n // tratar retorno false\n echo $em->getMessage(); // mostra mensagem de erro\n }\n else {\n // zerar dados do objeto;\n $this->setDados(array());\n }\n \n }", "title": "" }, { "docid": "7724bc75a59426de954f24d00cd312c3", "score": "0.5900197", "text": "function removeItem($produto) {\r\n\t\t\t$this->getCarrinho();\r\n\t\t\t\r\n\t\t\t$codigo = $produto->getId();\r\n\t\t\tunset($this->carrinho[$codigo]);\r\n\t\t\t\r\n\t\t\t$this->atualizaDados();\r\n\t\t}", "title": "" }, { "docid": "49e6c6f78ad22fd0e89bb38b30c90c65", "score": "0.5898666", "text": "private function checkNegociateur()\n {\n $this->oLogger->info(\"Delete Negociateur without any annonce.\");\n $aNegociateurEntities = $this->oEm->getRepository('JLPCoreBundle:Negociateur')->getNegociateurWithoutAnnonce();\n foreach ($aNegociateurEntities as $oNegociateur) {\n $this->oEm->remove($oNegociateur);\n\n }\n $this->oEm->flush();\n }", "title": "" }, { "docid": "92eedab9d0115826da0c69ed7c3413f7", "score": "0.58581686", "text": "public function delete(){\r\n\t\t$this->traversAndDeleteChildren($this);\r\n\t\t$this->deleteRelation();\r\n\t}", "title": "" }, { "docid": "74499c5b6a4790c31233147184c0df22", "score": "0.5785186", "text": "public function removeFromDB()\n\t{\n\t\t\n\t\t$this->setModifList();\n\t\t$this->setTeacherOwner();\n\t\t$this->setSubject();\n\t\t$query = \"DELETE FROM \" . self::TABLENAME . \" WHERE id = \" . $this->sqlId . \";\";\n\n\t\tif (Database::currentDB()->executeQuery($query))\n\t\t{\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDatabase::currentDB()->showError(\"ligne n°\" . __LINE__ . \" classe :\" . __CLASS__);\n\t\t}\n\t\t/*\n\t\t$DB = new Database(\"davical_app\", \"davical\");\n\n\t\tif (!$DB->connect())\n\t\t{\n\t\t\techo (\"Pas de connexion vers davical.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"DELETE FROM calendar_item WHERE collection_id = \" . $this->idCollection . \";\";\n\t\t\t$DB->executeQuery($query, $params);\n\t\t\t$query = \"DELETE FROM collection WHERE collection_id = \" . $this->idCollection . \";\";\n\t\t\t$DB->executeQuery($query, $params);\n\t\t}\n\t\t*/\n\t}", "title": "" }, { "docid": "8dad976b4544e23c8bb07bc09fe408dc", "score": "0.57762074", "text": "public function deleteCRMEntityRel()\n\t{\n\t\t$db = PearDatabase::getInstance();\n\t\t$db->delete('vtiger_crmentityrel', '`module` = ? OR `relmodule` = ?', [$this->name, $this->name]);\n\t}", "title": "" }, { "docid": "b880f4944a67eda31bb6f33d1755748d", "score": "0.573925", "text": "public function onRemoveFromParentRenderable();", "title": "" }, { "docid": "661eceb0fc776e4e293bac06777253b0", "score": "0.5732522", "text": "public function onRemoveItem()\n {\n }", "title": "" }, { "docid": "6a4a7002171f758107c68a9ca84c1e5b", "score": "0.57309043", "text": "public function deleteSelfRelated();", "title": "" }, { "docid": "d118f036274f1b3b36254774ebefe4ab", "score": "0.56812495", "text": "public function detalleCompra(){\n // $this hace referencia al objeto que tengamos en ese momento de Compra.\n return $this->hasMany('App\\Models\\DetalleCompra', 'folio_compra', 'folio_compra');\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5651103", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5651103", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5651103", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5651103", "text": "public function remove();", "title": "" }, { "docid": "992d7f338bfc52b3eacdff315eac078e", "score": "0.56287926", "text": "function deleteByItem($id,$idComprobante=\"\")\n {\n global $db; \n $item = $this->getItemComprobante($id);\n $sql = \" delete from reception_product where ingresoId = $id\"; \n $db->Execute($sql); \n $this->calcular($item[\"productId\"]); \n \n \n }", "title": "" }, { "docid": "234d4898be66dcff6852127d00ba2270", "score": "0.5625179", "text": "public function clearComplaintsOperators()\n {\n $ci = &get_instance();\n foreach (AssocComplaintsOperators::getResponsible($this->getId()) as $complaintsOperators) {\n $complaintsOperators->setDeleted(true);\n $ci->doctrine->em->persist($complaintsOperators);\n $ci->doctrine->em->flush();\n }\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5610453", "text": "public function remove(){}", "title": "" }, { "docid": "4cc05dece931eb7684edd3aa4e578210", "score": "0.5607682", "text": "function clear() {\n\t\t$q = $this->dormio->getManager($this->source_spec['through']);\n\t\treturn $q->filter($this->source_spec['map_local_field'], '=', $this->bound_id)->delete();\n\t}", "title": "" }, { "docid": "b069357aacec0457199e10a7b0fb1a17", "score": "0.5606117", "text": "function removeAllRelations(IEntity $entity, string $relationName);", "title": "" }, { "docid": "da027e062e2bd571af430b254ed0b32d", "score": "0.55951273", "text": "public function indexRemove($entity);", "title": "" }, { "docid": "f843c8733a75493726e9262f9565b416", "score": "0.5591631", "text": "private function remove(){\n\n if ( $this->item_id ){\n\n $id = self::$_cart->id;\n\n $query = \"item_id='$this->item_id',shopping_cart_id='$id'\";\n\n if( $this->item_option_id && intval($this->item_option_id) != 0){\n $query = $query.\",item_option_id='$this->item_option_id'\";\n }\n\n $model = (new Model('shopping_cart_item'))\n\n ->find($query);\n\n\n if ( $model->delete() ){\n\n $this->is_removed = true;\n\n // Invalidate Cache for Factory to ensure fresh view\n Model_Factory::invalidate_cache();\n\n self::$_cart = $this->get_cart();\n\n // Refresh cart\n $this->cart = self::$_cart->as_array();\n\n\n\n }\n\n\n\n else\n\n $this->error = $model->error();\n\n } else\n\n $this->error = 'You must specify an Item id';\n\n\n }", "title": "" }, { "docid": "e123aa720a1c35eda5f9b31c6cc2caa6", "score": "0.55767727", "text": "function eliminaCompetencia($id){\n \tDB::beginTransaction ();\n \ttry {\n \t\t$competencia = $this->getCompetencia($id);\n \t\t$competenciaA = clone $competencia;\n \t\t$competencia->activo = 0;\n \t\t$competencia->update();\n \t\t//Bitacora\n \t\t$this->insertaBitacora(Constantes::ACCION_ELIMINAR, $competenciaA->getAttributes(), $competencia->getAttributes(), $competencia->idcompetencia,$this->controller,$this->moduloId,Session::get('idUser'),array(),$this->campoBase); \t\t \n \t\tDB::commit ();\n \t} catch ( \\Exception $e ) {\n \t\tDB::rollback ();\n \t\tthrow new \\Exception('Error al actualizar Competencia: ' . $e);\n \t} \t\t\n }", "title": "" }, { "docid": "2554c85c495452251ffa031cfa8204dd", "score": "0.55743885", "text": "function remove($obj) {\n\t\t$pk = is_object($obj) ? $obj->ident() : $obj;\n\t\t$q = $this->dormio->getManager($this->source_spec['through']);\n\t\treturn $q->filter($this->source_spec['map_remote_field'], '=', $pk)->filter($this->source_spec['map_local_field'], '=', $this->bound_id)->delete();\n\t}", "title": "" }, { "docid": "1e074f39f369283e80be189999f3a5cf", "score": "0.5572197", "text": "public function actionDelete(){\n $transaction = \\Yii::$app->db->beginTransaction();\n try { \n $invoiceRef = InvoiceTestRef::findAll($arrayName = array('item_no' => 1));\n foreach ($invoiceRef as $childInvocie)\n { \n $childInvocie->delete();\n }\n $invoice = InvoiceTest::findOne(1);\n $invoice->delete();\n $transaction->commit();\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n\n /* \n //Code for when there is no foreign key concept, but parent child relation is there\n $transaction = \\Yii::$app->db->beginTransaction();\n try { \n $invoice = InvoiceTest::findOne(1);\n $invoice->delete();\n $transaction->commit();\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n */ \n echo \"Delete Done successfully\";\n }", "title": "" }, { "docid": "def022ffc116c45e40c66b3ffe5f086c", "score": "0.5537476", "text": "public function remove(){\n\t\t$get = Zend_Registry::get('get');\n\t\tif(!isset($get->id)){\n\t\t\t$this->_redirect('/Professor/list');\n\t\t\texit;\n\t\t}\n\t\t$pk_professor = (int)$get->id;\n\t\t$where = $this->getAdapter()->quoteInto('pk_professor = ?', $pk_professor);\n\t\t$this->delete($where);\n\t}", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.553686", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.553686", "text": "public function remove($entity);", "title": "" }, { "docid": "ba145429ce79d6a2fc80ece2f1f85d51", "score": "0.5536439", "text": "public abstract function remove(): void;", "title": "" }, { "docid": "ca2b6668b93ab56d6423e1a4b61658c5", "score": "0.5516312", "text": "public function deleteObject()\n {\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n $this->removeFromParentCollection();\n }", "title": "" }, { "docid": "f63f58dede4f326572ea2dffd93b165e", "score": "0.55160016", "text": "public function deleteProductsRelationship(){\n\n $products = $this->products()->get();\n\n foreach ($products as $product) {\n $product->setWardrobeidNull();\n }\n }", "title": "" }, { "docid": "2e17c7d199eda39e03ec797697fda72a", "score": "0.54864466", "text": "public function remove() {\n\n // Remove route\n RouteHelper::removeRelation($this->get(\"id\"));\n $this->db->delete(XCMS_Tables::TABLE_ROUTES, array(\n \"id\" => $this->get(\"id\")\n ));\n\n }", "title": "" }, { "docid": "eccfad2a23f4700d509de31cfcb129ce", "score": "0.54608876", "text": "private function checkAgence()\n {\n $this->oLogger->info(\"Delete Agence without any Negociateur.\");\n $aAgenceEntities = $this->oEm->getRepository('JLPCoreBundle:Agence')->getAgenceWithoutNegociateur();\n foreach ($aAgenceEntities as $oAgence) {\n $this->oEm->remove($oAgence);\n\n }\n $this->oEm->flush();\n }", "title": "" }, { "docid": "145860c7adcad27b15d5cc5b170c0a98", "score": "0.5452658", "text": "public function delete($con = null)\n {\n if (!method_exists($this->getModel(), 'delete')) {\n throw new PropelException('Cannot delete objects on a read-only model');\n }\n if (null === $con) {\n $con = $this->getConnection(Propel::CONNECTION_WRITE);\n }\n $con->beginTransaction();\n try {\n foreach ($this as $element) {\n $obj = $this->getWorkerObject();\n $obj->setDeleted(false);\n $obj->fromArray($element);\n $obj->delete($con);\n }\n $con->commit();\n } catch (Exception $e) {\n $con->rollback();\n throw $e;\n }\n }", "title": "" }, { "docid": "b28466ef1cb41eb8372f79f0954e8989", "score": "0.5449006", "text": "public function executeRemove()\r\n\t{\r\n\t}", "title": "" }, { "docid": "c60dfc6f58b6965bb346da30bab34265", "score": "0.54479086", "text": "public function remove() {\n\t\t$this->app->zlfw->checkToken();\n\n\t\t// init vars\n\t\t$cid = $this->app->request->get('cid', 'array', array());\n\n\t\tif (count($cid) < 1) {\n\t\t\t$this->app->error->raiseError(500, JText::_('PLG_ZOOCART_ERROR_SELECT_A_ITEM_TO_DELETE'));\n\t\t}\n\n\t\ttry {\n\n\t\t\t// delete items\n\t\t\tforeach ($cid as $id) {\n\t\t\t\t$this->table->delete($this->table->get($id));\n\t\t\t}\n\n\t\t\t// set redirect message\n\t\t\t$msg = JText::_($this->resource_class . ' Deleted');\n\n\t\t} catch (AppException $e) {\n\n\t\t\t// raise notice on exception\n\t\t\t$this->app->error->raiseWarning(0, JText::_('PLG_ZOOCART_ERROR_DELETING', $this->resource_class).' ('.$e.')');\n\t\t\t$msg = null;\n\n\t\t}\n\n\t\t$this->setRedirect($this->component->link(array('controller' => $this->controller),false), $msg);\n\t}", "title": "" }, { "docid": "31f9d1475c732e10a69e7026e7097c90", "score": "0.5443807", "text": "public function remove($item);", "title": "" }, { "docid": "ada1fd86bc038e936de2d72446854014", "score": "0.5440416", "text": "public function deletePersisted();", "title": "" }, { "docid": "4bea02d236d12eaf57250bf5611c7e99", "score": "0.54264", "text": "protected function _afterDelete()\n\t{\n\t\t//supprime les lignes 'item'\n\t\t$collection = Mage::getModel('Orderpreparation/ordertoprepareitem')\n\t\t\t->getCollection()\n\t\t\t->addFieldToFilter('order_id', $this->getorder_id());\n\t\t\t\n\t\tforeach($collection as $item)\n\t\t{\n\t\t\t$item->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "1d1db5f9268fe590d17fc95295b56a47", "score": "0.5419198", "text": "public function remove(Entity $e){\n\t\tif(($ind=$this->indexOf($e))&&$ind!=-1){\n\t\t\t$this->entities[$ind]->setFlushAction(Container::FLUSH_ACTION_REMOVE);\n\t\t}\n\t\telse{\n\t\t\t$this->addToMap($e,Container::FLUSH_ACTION_REMOVE);\n\t\t}\n\t}", "title": "" }, { "docid": "83ed64322db530452847835e759395b9", "score": "0.5406166", "text": "public function testAssociationsRemove()\n {\n }", "title": "" }, { "docid": "d0529f074fce801161ca696997fc6353", "score": "0.5400699", "text": "function excluirItem() {\r\n //apaga todos os registros para se iniciar uma nova compra \r\n //$onexao = new Conexao();\r\n $mysqli = mysqli_connect(\"10.0.0.3\", \"aluno\", \"aluno\", \"alugaCarro\");\r\n $sql = \"Delete from aluguel\";\r\n mysqli_query($mysqli, $sql);\r\n }", "title": "" }, { "docid": "4233a8aa3b624886d9145b8881d757c8", "score": "0.5398341", "text": "public function remove() {\n\n\t}", "title": "" }, { "docid": "1d3dae269171e8f606eacf8159b70d3a", "score": "0.5398203", "text": "public function removeCriteria(){\n //TO DEVELOP\n }", "title": "" }, { "docid": "9d67f28b21cb7dab96512b065900080b", "score": "0.5397927", "text": "public function delete(){\n\n $this->db->deleteRecord($this->getId());\n\n //remove all references to this one in others models\n\n //remove this one in indexes\n\n //---$Type index\n //---$All index\n\n //remove from cache\n\n //remove xml file\n\n }", "title": "" }, { "docid": "9510ec586d86c66f861da00abe3b6fcb", "score": "0.5378697", "text": "private function eliminar_carritos_agregar_detalles(){\n $this->detailBillingController->eliminar_carritos();\n Cart::instance($this->docxpagar_otrabajo)->destroy();\n\n }", "title": "" }, { "docid": "1d61813ed6583d557c085398f3966ac0", "score": "0.5375836", "text": "public function eliminar($dispositivo){\n\n }", "title": "" }, { "docid": "7457b20bdb2d0d95b112bdb59a56b225", "score": "0.5374923", "text": "public function deletelembrete(){\n\n $connection = ConnectionManager::get('postgres');\n\n $sql = \"SELECT * FROM eventos\n INNER JOIN tipoevento ON tipoevento.id\n = eventos.id_evento\";\n $TipEvento = $connection->execute($sql)->fetchAll('assoc');\n \n $this->set(compact('TipEvento'));\n $this->set('_serialize',['TipEvento']);\n }", "title": "" }, { "docid": "1d60e5f2c71289830ae663e3a72f47f2", "score": "0.5365467", "text": "private function selfClearSpecial(){\n $specials = Ex_speceal::all();\n foreach ($specials as $item){\n $product = ExtremepcProduct::find($item->product_id);\n if ($product){\n if($product->product->quantity<1){\n $product->cleanSpecial();\n }\n }else{\n $item->delete();\n }\n\n }\n }", "title": "" }, { "docid": "347f0994784b31998b77a1d180fee9ff", "score": "0.535973", "text": "public function destroy(Compra $compra)\n {\n $detalles = Detallecompra::where('compra_id', $compra->id)->get();\n\n //dd($detalles);\n\n foreach ($detalles as $key => $detalle)\n {\n //dd($detalle);\n\n if($detalle->producto_id)\n {\n $stock_producto = Producto::where('id',$detalle->producto_id)->select('stock')\n ->first()->stock;\n\n $precio_compra_promedio_producto = Producto::where('id',$detalle->producto_id)->select('precio_compra_promedio')\n ->first()->precio_compra_promedio;\n\n $old_precio_compra_promedio = ( ($stock_producto*$precio_compra_promedio_producto)-($detalle->cantidad*$detalle->precio_unitario) )/($stock_producto-$detalle->cantidad);\n\n $old_stock = $stock_producto-$detalle->cantidad;\n\n //dd($old_precio_compra_promedio.'= ('.$stock_producto.'*'.$precio_compra_promedio_producto.')-('.$detalle->cantidad.'*'.$detalle->precio_unitario.')/('.$stock_producto.'+'.$detalle->cantidad.')');\n\n Producto::where('id',$detalle->producto_id)\n ->update\n ([\n 'precio_compra_promedio' => $old_precio_compra_promedio,\n 'stock' => $old_stock,\n ]);\n\n\n }\n }\n\n\n $this->compra->destroy($compra);\n\n flash()->success(trans('core::core.messages.resource deleted', ['name' => trans('compras::compras.title.compras')]));\n\n return redirect()->route('admin.compras.compra.index');\n }", "title": "" }, { "docid": "d2a3c98d3513b25a9559f6806c8cee4d", "score": "0.53536206", "text": "public function eliminar()\n\t{\n\t\t$descripcion=array(); //array para almacenar la informacion de la entidad\n\t\t//Concateno el where para eliminar los registros de la entidad\n\t\t$sql=\"DELETE FROM producto WHERE prd_id = \".$this -> getPrdId();\n\n\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla)\n\t\t{\n\t\t\t//Consulto la informacion que se registro luego de la actualizacion\n\t\t\t$producto = $this -> consultarId($this -> getPrdId());\n\t\t\t\t\t$descripcion[]=\"prd_id = \".$producto -> getPrdId();\n\t\t\t\t\t$descripcion[]=\"prd_nombre = \".$producto -> getPrdNombre();\n\t\t\t\t\t$descripcion[]=\"prd_descripcion = \".$producto -> getPrdDescripcion();\n\t\t\t\t\t$descripcion[]=\"prd_texto = \".$producto -> getPrdTexto();\n\t\t\t\t\t$descripcion[]=\"prd_imagen = \".$producto -> getPrdImagen();\n\t\t\t\t\t$descripcion[]=\"prd_activo = \".$producto -> getPrdActivo();\n\t\t\t$descripcion_antigua = implode(\", \", $descripcion);\n\t\t}\n\t\t\n\t\t//Si la ejecucion es exitosa entonces devuelvo el numero de registros borrados\n\t\tif($this -> getConexion() -> Execute($sql))\n\t\t{\n\t\t\t$registros_eliminados=$this -> getConexion() -> Affected_Rows();\n\t\t\t\n\t\t\t//Si se pudo eliminar el registro entonces registro la auditoria sobre la tabla\n\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla and $registros_eliminados)\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * instanciacion de la clase auditoria_tabla para la eliminacion de un registro\n\t\t\t\t */\n\t\t\t\t$objAuditoriaTabla = new AuditoriaTabla();\n\t\t\t\t$objAuditoriaTabla->crearBD(\"sisgot_adodb\");\n\t\t\t\t$objAuditoriaTabla->setAutTabla(\"producto\");\n\t\t\t\t$objAuditoriaTabla->setAutTablaId($this -> getPrdId());\n\t\t\t\t$objAuditoriaTabla->setAutUsuId($objAuditoriaTabla -> obtenerUsuarioActual());\n\t\t\t\t$objAuditoriaTabla->setAutFecha(\"NOW()\", \"sql\");\n\t\t\t\t$objAuditoriaTabla->setAutDescripcionAntigua($descripcion_antigua);\n\t\t\t\t$objAuditoriaTabla->setAutDescripcionNueva(\"\");\n\t\t\t\t$objAuditoriaTabla->setAutTransaccion(\"ELIMINAR\");\n\t\t\t\t$aut_id=$objAuditoriaTabla->insertar();\n\t\t\t\t\n\t\t\t\tif(!$aut_id)\n\t\t\t\t{\n\t\t\t\t\techo \"<b>Error al almacenar informacion en la tabla de auditoria_tabla</b><br/>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $registros_eliminados;\n\t\t}\n\t\t//Sino imprimo el mensaje de error\n\t\telse\n\t\t\techo $this -> getConexion() -> ErrorMsg().\" <strong>SQL: \".$sql.\"<br/>En la linea \".__LINE__.\"<br/></strong>\";\n\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "ac212accea5c43cb16675f35d10418cd", "score": "0.53334355", "text": "public function Complementarios()\n {\n return $this->hasOne(Complementario::class,'idpostulante','id');\n }", "title": "" }, { "docid": "ea878127811c1b834084a22bb253b51f", "score": "0.5332696", "text": "public function testRemove()\n {\n $this->createUsers(5);\n\n $users_in_afiveone = $this->accounts->usersBelongingTo(1);\n\n $users_in_afiveone->add(1, 2, 3, 5);\n $this->assertEquals([ 1, 2, 3, 5 ], $users_in_afiveone->get());\n\n $users_in_afiveone->remove(2);\n $users_in_afiveone->remove(3);\n\n $this->assertEquals([ 1, 5 ], $users_in_afiveone->get());\n\n $users_in_afiveone->clear();\n\n $this->assertEquals([], $users_in_afiveone->get());\n }", "title": "" }, { "docid": "d17eed307b249675dfc47a9a4bdb78a8", "score": "0.5330512", "text": "function supprimerCompte($rs,$app) {\n\n $user = User::where(\"idu\",\"=\",$_SESSION[\"profile\"]->idu)->first();\n\n $listes = Liste::where(\"user_id\",\"=\",$user->idu)->get();\n\n\n foreach($listes as $liste) {\n if($liste != null) {\n\n foreach(Item::where(\"liste_id\",\"=\",$liste->no)->get() as $item) {\n $item->delete();\n }\n\n foreach(Messagepublic::where(\"liste_id\",\"=\",$liste->no)->get() as $msg) {\n $msg->delete();\n }\n\n $liste->delete();\n\n }\n }\n\n $participations = Participation::where(\"user_id\",\"=\",$user->idu)->get();\n foreach ($participations as $part) {\n\n $item = Item::where(\"id\",\"=\",$part->item_id)->first();\n $liste = Liste::where(\"no\",\"=\",$item->liste_id)->first();\n $date = date(\"Y-m-d\");\n if($liste->expiration >= $date) {\n\n if($item->cagnotte != -1) {\n $item->cagnotte -= $part->montant;\n $item->save();\n }\n $part->delete($item->id,$user->username);\n }\n\n }\n\n $messages = Messagepublic::where(\"user_id\",\"=\",$user->idu)->get();\n\n foreach($messages as $m) {\n $m->delete();\n }\n\n unset($_SESSION[\"profile\"]);\n $user->delete();\n return $rs->withRedirect($app->router->pathFor(\"route_index\"));\n\n }", "title": "" }, { "docid": "f9860899b9fee88934748653d80e792a", "score": "0.5325701", "text": "public function excluirAction()\n {\n $this->modelCurso->delete($this->_getParam('id'));\n\n $this->_redirect('curso/index'); \n }", "title": "" }, { "docid": "d3ba2b34ef01c30cacf777ffcb1fcc21", "score": "0.5321829", "text": "function eliminar(){\n\t\t$this->fmt->class_modulo->eliminar_fila($this->id_item,\"modulo_categorias\",\"mod_cat_mod_id\");\n\t\t$sql=\"DELETE FROM modulo WHERE mod_id='\".$this->id_item.\"'\";\n\t\t$this->fmt->query->consulta($sql,__METHOD__);\n\t\t$up_sqr6 = \"ALTER TABLE modulo AUTO_INCREMENT=1\";\n\t\t$this->fmt->query->consulta($up_sqr6,__METHOD__);\n\t\t$this->fmt->class_modulo->script_location($this->id_mod,\"busqueda\");\n\t\t//header(\"location: modulos.adm.php?id_mod=\".$this->id_mod);\n\t}", "title": "" }, { "docid": "ce122afb3cbb0a3b896dd819c1a969f1", "score": "0.53199136", "text": "public function delete()\n {\n $repository = $this->getRepository();\n\n foreach ($this as $book) {\n $repository->delete($book);\n }\n }", "title": "" }, { "docid": "49f8cf761969cdba0ff2f78f8b1c8cd4", "score": "0.5315289", "text": "public function testCollection574RemoveOwnReferenceToTheModelsArray() {\r\n $col = new Backbone_Collection(array(array('id'=>1),array('id'=>2),array('id'=>3),array('id'=>4),array('id'=>5),array('id'=>6)));\r\n $this->assertEquals(6, $col->length());\r\n $col->remove($col->models());\r\n $this->assertEquals(0, $col->length());\r\n }", "title": "" }, { "docid": "7a0889117b9978d1013e2129e4fb7800", "score": "0.5312071", "text": "public function excluir()\n{\n$id = $_GET['id'];\n$contato = Contato::destroy($id);\nreturn $this->listar();\n}", "title": "" }, { "docid": "3be7acd55288a36461e23bf28788e00f", "score": "0.531055", "text": "function octopus_grade_item_delete($octopus) {\n global $CFG;\n require_once ($CFG->libdir . '/gradelib.php');\n\n return grade_update('mod/octopus', $octopus->course, 'mod', 'octopus', $octopus->id, 0, null, array('deleted' => 1));\n}", "title": "" }, { "docid": "ab673292856567417541465df806156e", "score": "0.53028464", "text": "public function deleteItems(Collection $collection): Collection;", "title": "" }, { "docid": "ab673292856567417541465df806156e", "score": "0.53028464", "text": "public function deleteItems(Collection $collection): Collection;", "title": "" }, { "docid": "5cdbe201f530945d38b3690d4d41941d", "score": "0.5292067", "text": "public function borrarAction()\n {\n $em= $this->getDoctrine()->getEntityManager();\n $em->createQuery(\"DELETE NetpublicCoreBundle:HorarioClase\")\n ->execute(); \n $em->createQuery(\"DELETE NetpublicCoreBundle:HorarioGrupo\")\n ->execute(); \n\n return new \\Symfony\\Component\\HttpFoundation\\Response(\"ok\") ;\n \n \n }", "title": "" }, { "docid": "e2d4ed28f482d314e71f8f81240f1694", "score": "0.52882564", "text": "public function Excluir(){\n $idInteracao = $_GET['id'];\n $interacao = new Interacao();\n $interacao->id = $idInteracao;\n\n $interacao::Delete($interacao);\n }", "title": "" }, { "docid": "54cbdad0138a6e433c7c587a58eb1b14", "score": "0.52835566", "text": "public function removed(): ListsEntityStates;", "title": "" }, { "docid": "dd8212cd5b03717e409e12fd2e3751dd", "score": "0.5278309", "text": "public function delete()\n {\n\n // si hay ventas ya hechas, el borrado es logico.\n if( $this->count_relations( 'compras' ) > 0 )\n {\n $this->borrado = time();\n $this->estado_id = Model_Producto_Estado::no_disponible();\n $this->save();\n return( true );\n }\n\n\n // anula la relacion de foto principal\n $this->principal_foto_id = null;\n $this->save();\n\n\n // borra las asignaciones a los grupos\n /*\n foreach( $this->grupo->find_all() as $grupo )\n {\n $this->remove( 'grupo', $grupo->id );\n }\n */\n $this->remove( 'grupo' );\n\n // borra las asignaciones con tipos de productos\n $this->remove( 'tipos' );\n\n\n\n // borra las fotos\n foreach( $this->fotos->find_all() as $foto )\n {\n $this->remove( 'fotos', $foto->id );\n $foto->delete();\n }\n\n\n return parent::delete();\n }", "title": "" }, { "docid": "209b5ad4ff7078befa654953037e4535", "score": "0.52762336", "text": "public function onAfterManyManyRelationRemove()\n {\n if ($this->getUseQueuedJobs()) {\n $this->queueReindex();\n } else {\n $this->updateDependentClasses();\n }\n }", "title": "" }, { "docid": "ca7ad2abf2237088f1960cc79d4ce803", "score": "0.52750057", "text": "function delete()\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\r\n\t\t// Delete current item\r\n\t\t$sql = \"\r\n\t\t\tdelete from Club\r\n\t\t\twhere Id = \" . $this->id;\r\n\t\t\r\n\t\tif ($debug)\r\n\t\t\tprint_r(\"SQL: \" . $sql);\r\n\t\t\t\r\n\t\tmysqli_query($dbh,$sql);\r\n\t\tif (mysqli_errno($dbh)!=0) {\r\n\t\t\tprint_r(mysqli_error($dbh));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->clear(); // Clear current object\r\n\r\n\t}", "title": "" }, { "docid": "9e4e249d70c255ab097b991c1f97181a", "score": "0.5274804", "text": "public function delete(){\n $p = $this->primary;\n return $this->remove($this->table , $this->primary , $this->$p );\n }", "title": "" }, { "docid": "a7d87f69fd6a8c9513cdedc78a8abcc5", "score": "0.52738607", "text": "public function deleteVraboteniWithSetter(){\n //delete from modeli where model_id = 7;\n parent::deleteRow($this->table_name,\"vraboteni_id\",$this->vraboteni_id);\n }", "title": "" }, { "docid": "c8c0245626dd9a19c3e98f9fd3df574a", "score": "0.52724844", "text": "public function del()\n\t{\n\t\t$param = array();\n\t\tforeach($this->_param->primary AS $row => $name)\n\t\t\t$param[':'.$name] = $this->_data[$name];\n\t\t\n\t\t\\He\\Trace::addTrace(\"Supression de la ligne \".print_r($param[':'.$name.$row], 1).\"...\", get_called_class());\n\t\t\n\t\t$this->_prepareDel()->execute($param);\n\t\t$this->_exist = false;\n\t\t\\He\\Trace::addTrace(\"Effectué !\", get_called_class());\n\t\tunset($this);\n\t}", "title": "" }, { "docid": "736ecbe26c6c360a3d6f8e122d632818", "score": "0.526105", "text": "function removeRelation(IEntity $entity, string $relationName, $id = null, $all = false, IEntity $relEntity = null);", "title": "" }, { "docid": "f46f151f902b2a3700fa3787879db14c", "score": "0.5252337", "text": "public function removeItem() {\n\t\t$productid = $_REQUEST['productid'];\n\t\tunset ($this->orders[$productid]);\n\t\tunset ($this->order_table[$productid]);\n\t}", "title": "" }, { "docid": "3b70f9f9e23e2d368c00c3829031af5e", "score": "0.5251258", "text": "public function removeData($id){\n\n try{\n\n if(!$this->_getHelper()->getCustomer()->isLoggedIn()){\n throw new Exception(Mage::helper('core')->__('Efetue seu login para adicionar o produto a sua lista Clique %s', '<a href=\"'.Mage::getUrl('listaCasamento/index/').'\">Aqui</a>'));\n }\n\n if(!$this->_getHelper()->getList()){\n throw new Exception(Mage::helper('core')->__('Você ainda não tem uma lista criada, crie primeiro a sua lista Clique %s', '<a href=\"'.Mage::getUrl('listaCasamento/index/').'\">Aqui</a>'));\n }\n\n if(in_array($id, $this->getAllIdOfProductsReceived())){\n throw new Exception(Mage::helper('core')->__('Este item não pode ser deletado da lista pois ele já foi processado.'));\n }\n\n $collection = $this->getCollection()\n ->addFieldToFilter('jbpgi_product_id', $id)\n ->addFieldToFilter('jbpgi_list_id', $this->_getHelper()->getList())\n ->getFirstItem()\n ->getData();\n\n if(!count($collection)){\n throw new Exception(Mage::helper('core')->__('Você não possui produtos a serem removidos'));\n }\n\n $this->load($collection['jbpgi_id'])->delete();\n Mage::getSingleton('core/session')->addSuccess('Produto removido com sucesso');\n }catch(Exception $e){\n Mage::getSingleton('core/session')->addError($e->getMessage());\n Mage::log($e->getMessage());\n return false;\n }\n }", "title": "" }, { "docid": "f97add6969bfda2114c3f1b1837540c7", "score": "0.52483505", "text": "public function delete() {\n\t\tforeach ($this->_ownedObjectCache as $ownedObjectArray) {\n\t\t\t/* @var $ownedEntity DBEntity */\n\t\t\tforeach ($ownedObjectArray as $ownedEntity)\n\t\t\t\t$ownedEntity->delete();\n\t\t}\n\t\tstatic::getStore()->delete($this);\n\t}", "title": "" }, { "docid": "b877b8f697336c3bb193c71da5621f31", "score": "0.5247741", "text": "public abstract function remove($pk);", "title": "" }, { "docid": "1d66c9452f6eb7865a176051d448ff32", "score": "0.5246811", "text": "function delete_all()\n\t{\n\t\t$all =& $this->find_all();\n\t\t\n\t\t$q = new IgnitedQuery();\n\t\t\n\t\tforeach($this->relations as $name => $data)\n\t\t{\n\t\t\tif($data->get_cascade_on_delete())\n\t\t\t{\n\t\t\t\tforeach($all as $object)\n\t\t\t\t{\n\t\t\t\t\t$data->build_query($object, $q);\n\t\t\t\t\t$q->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$q->empty_table($this->table);\n\t\t\n\t\t// unlink relations\n\t\tforeach($this->relations as $name => $data)\n\t\t{\n\t\t\tif(is_a($data, 'IR_RelProperty_habtm'))\n\t\t\t{\n\t\t\t\t$q->delete($data->get_join_table(), array($data->get_fk() => $object->__id));\n\t\t\t}\n\t\t\t\n\t\t\tif($data->get_cascade_on_delete())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telseif(is_a($data, 'IR_RelProperty_has') && ! is_a($data, 'IR_RelProperty_habtm'))\n\t\t\t{\n\t\t\t\t$data->build_query($object, $q);\n\t\t\t\t$q->set($data->get_fk(), null);\n\t\t\t\t$q->update();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e9260ead1b66c10753348e3b552d7dc7", "score": "0.5246333", "text": "public function destroy(Companie $companie)\n {\n //\n }", "title": "" }, { "docid": "a4198263c4f169413ec4682b1e05fd2d", "score": "0.52430445", "text": "public function delete()\n\t{\n\t\t$this->getRepository()->getNodeTypeService()->deleteAssociation($this);\n\t}", "title": "" }, { "docid": "cb3745c8bec12901d22b7e78b2df6150", "score": "0.5234661", "text": "public function delete_cascade()\n\t{\n\t\tif ( ! $this->loaded()) {\n\t\t\tthrow new LogicException(\"Não é possível apagar o registro.\");\n\t\t}\n\t\tforeach ($this->has_many() as $nome => $dados) {\n\t\t\tforeach ($this->get($nome)->find_all() as $filho) {\n\t\t\t\tif ($filho instanceof Model_Base) {\n\t\t\t\t\t$filho->delete_cascade();\n\t\t\t\t} elseif ($filho instanceof ORM) {\n\t\t\t\t\t$filho->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->delete();\n\t}", "title": "" }, { "docid": "dd6503366083cc0a5e23317ef0f00498", "score": "0.5230492", "text": "public function remove(ModelInterface $entity)\n {\n }", "title": "" }, { "docid": "c9800099215f53eb347f63451055a7fe", "score": "0.5227995", "text": "public function remove()\n {\n $group_id = $this->getGroupIDFromUser();\n\n if ($group_id > 0) {\n \\ORM::for_table('feeds_groups')->where('group_id', $group_id)->delete_many();\n \\ORM::for_table('groups')->where('id', $group_id)->delete_many();\n }\n }", "title": "" }, { "docid": "b73f2f392a46c95cc42f4a94f94fd39e", "score": "0.52257246", "text": "public function inverseRelation();", "title": "" }, { "docid": "98d98b59479f555d475c02cab5a6a812", "score": "0.52194446", "text": "public function remove(Item $item): void;", "title": "" }, { "docid": "3961705dba514bd08c9ac4898b3966b1", "score": "0.5216069", "text": "public function delete() {\n foreach($this->a_uclists as $l) {\n $l->delete();\n }\n foreach($this->a_reports as $r) {\n $r->delete();\n }\n foreach($this->a_servers as $s) {\n $s->delete();\n }\n \n parent::delete();\n }", "title": "" }, { "docid": "f96d398d343c8c9449f7c236ab4963cc", "score": "0.5210997", "text": "function Cancel($param)\n {\n try\n {\n // get the parameter $key\n $key = $param['key'];\n // open a transaction with database 'permission'\n TTransaction::open('ship');\n \n // instantiates object System_user\n $object = new Purshase($key);\n \n //if($object->existClientes())\n // throw new Exception(\"Existem clientes cadastrados para esta cidade! Remova-os antes de deletar a cidade\"); \n // deletes the object from the database\n $object->cancel();\n \n // close the transaction\n TTransaction::close();\n \n // reload the listing\n $this->onReload( $param );\n // shows the success message\n new TMessage('info', TAdiantiCoreTranslator::translate('Record deleted'));\n }\n catch (Exception $e) // in case of exception\n {\n // shows the exception error message\n new TMessage('error', '<b>Error</b> ' . $e->getMessage());\n \n // undo all pending operations\n TTransaction::rollback();\n }\n }", "title": "" }, { "docid": "e32767458893063242ba23edd43a5b40", "score": "0.52107316", "text": "function Excluir()\n\t\t{\n\t\t\t$sql = \"delete from noticia\t\n\t\t\t\t\twhere codnoticia = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array($this->codnoticia));\n\t\t}", "title": "" }, { "docid": "ac923984c5748df89491fee5e79fe66b", "score": "0.5209414", "text": "public function remove($commit=true)\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t// Check security\r\n\t\tif ($this->user)\r\n\t\t{\r\n\t\t\tif ($this->debug)\r\n\t\t\t{\r\n\t\t\t\t$this->dacl->debug = true;\r\n\t\t\t}\r\n\r\n\t\t\tif (!$this->dacl->checkAccess($this->user, \"Delete\", ($this->user->id==$this->owner_id)?true:false))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t$purge = true;\r\n \r\n\t\t\tif($this->getValue(\"f_deleted\") !='t')\r\n\t\t\t{\r\n\t\t\t\t// Keep from commiting changes on save.\r\n\t\t\t\t// This is usually used for batch updates or deletions\r\n\t\t\t\tif (!$commit)\r\n\t\t\t\t\t$this->indexCommit = false;\r\n\r\n\t\t\t\t$this->setValue(\"f_deleted\", 't');\r\n\r\n\t\t\t\t// First param false does not record activity or workflow\r\n\t\t\t\t$this->save(false);\r\n\r\n\t\t\t\t$purge = false;\r\n\r\n\t\t\t\t// Fire workflow after delete saved\r\n\t\t\t\t$this->processWorkflow(\"delete\");\r\n\r\n\t\t\t\t// Update sync stats\r\n\t\t\t\t$this->updateObjectSyncStat('d');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($purge)\r\n\t\t\t{\r\n\t\t\t\t// Remove revision history\r\n\t\t\t\t$this->dbh->Query(\"delete from object_revisions where object_id='\".$this->id.\"' and object_type_id='\".$this->object_type_id.\"'\");\r\n\r\n\t\t\t\t// Delete the record\r\n\t\t\t\t$dbh->Query(\"delete from \".$this->object_table.\" where id='\".$this->id.\"'\");\r\n\t\r\n\t\t\t\t// Remove unique DACL. Of course, we don't want to delete the dacl for all object types, just for this id\r\n\t\t\t\tif ($this->daclIsUnique && $this->dacl)\r\n\t\t\t\t\t$this->dacl->remove();\r\n\r\n\t\t\t\t// Remove associations\r\n\t\t\t\t$dbh->Query(\"delete from object_associations where \r\n\t\t\t\t\t\t\t\t(object_id='\".$this->id.\"' and type_id='\".$this->object_type_id.\"')\r\n\t\t\t\t\t\t\t\tor (assoc_object_id='\".$this->id.\"' and assoc_type_id='\".$this->object_type_id.\"')\");\r\n\r\n\t\t\t\t// Remove index\r\n\t\t\t\t$this->removeIndex();\r\n\r\n\t\t\t\t// Remove recurrance\r\n\t\t\t\tif ($this->def->recurRules!=null && !$this->recurrenceException)\r\n\t\t\t\t{\r\n\t\t\t\t\t$rid = $this->getValue($this->def->recurRules['field_recur_id']);\r\n\t\t\t\t\tif ($this->recurrencePattern==null && $rid)\r\n\t\t\t\t\t\t$this->getRecurrencePattern($rid);\r\n\r\n\t\t\t\t\tif ($this->recurrencePattern!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->recurrencePattern->removeSeries($this);\r\n\t\t\t\t\t\t$this->recurrencePattern->remove();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// TODO: delete groupings/foreign keys\r\n\t\t\t}\r\n\r\n\t\t\t// Purge unames\r\n\t\t\t// TMP: eventually this will be replaced with master objects table 'uname' field\r\n\t\t\t$dbh->Query(\"delete from object_unames where object_id='\".$this->id.\"' and object_type_id='\".$this->object_type_id.\"'\");\r\n\r\n\t\t\t$this->clearCache();\r\n\r\n\t\t\t// Mark recurrance as inactive\r\n\t\t\tif (!$purge && $this->def->recurRules!=null && !$this->recurrenceException)\r\n\t\t\t{\r\n\t\t\t\t$rid = $this->getValue($this->def->recurRules['field_recur_id']);\r\n\t\t\t\tif ($this->recurrencePattern==null && $rid)\r\n\t\t\t\t\t$this->getRecurrencePattern($rid);\r\n\r\n\t\t\t\tif ($this->recurrencePattern!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->recurrencePattern->removeSeries($this);\r\n\t\t\t\t\t$this->recurrencePattern->fActive = false;\r\n\t\t\t\t\t$this->recurrencePattern->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->removed($purge);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if ($this->requestedId)\r\n\t\t{ \r\n\t\t\t// Object has been deleted, clear from index\r\n\t\t\t$this->id = $this->requestedId;\r\n\t\t\t$this->removeIndex();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Can't delete an object that does not exist\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "088a535410982f689a08dc410233df7c", "score": "0.5209133", "text": "public function removeItem(OrderItemInterface $item);", "title": "" }, { "docid": "d422e3df7efdccec2c023d0cf2ccfc70", "score": "0.52077365", "text": "public function removeAction()\n {\n if (!$this->getAuthorizationService()->isGranted('proto.edit')) {\n throw new UnauthorizedException();\n }\n\n $supplyId = $this->getEvent()->getRouteMatch()->getParam('supplyId');\n $supply = $this->getEntityManager()->getRepository($this->options->getSuppliesEntityClass())->find($supplyId);\n\n if ($supply) {\n $this->suppliesMapper->remove($supply);\n $this->flashMessenger()->addSuccessMessage('La fornitura è stata eliminata');\n }\n\n //se provengo da scheda richiesta redirect lì.\n $redirectUrl = $url = $this->getRequest()->getHeader('Referer')->getUri();\n if (strpos($redirectUrl, 'proto/edit') !== false) {\n return $this->redirect()->toUrl($redirectUrl);\n }\n\n return $this->redirect()->toRoute('proto/supplies/list');\n }", "title": "" }, { "docid": "6f0871d1e89a841ce2a90a64ceaa5a21", "score": "0.520711", "text": "public function delete()\n {\n static::getRepository()->delete($this);\n }", "title": "" }, { "docid": "62ea06305bb7f2d23c58c7c3ae888f6b", "score": "0.51953095", "text": "public function actionDelete($bso) {\n if (!in_array($bso,\\Yii::$app->params['bsoList'])){\n throw new \\exception ('Faked delete bso :'.$bso);\n }\n $className='\\app\\models\\Storage'.ucfirst($bso);\n $className::deleteAll([ 'user_id'=>$this->user_id]);\n\n SyncUserCollections::deleteAll([ 'user_id'=>$this->user_id,'collection'=>$bso]);\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $tbl['modified']=decistamp();\n return $tbl;\n}", "title": "" }, { "docid": "0e49fe30ce9fe8929e94f3c4afe925f8", "score": "0.5185767", "text": "public function deleteItem(Item $item) {\n\t\t// Get primary key\n\t\t$id = $item->get_Person(); \n\t\t// Remove primary key\n\t\tif (isset($this->items[$id])) {\n\t\t\tunset($this->items[$id]);\n\t\t\t$index = array_search($id, $this->clients);\n\t\t\tunset($this->clients[$index]);\n\t\t\t// Recreate that array to prevent holes:\n$this->clients = array_values($this->clients);\n\t\t}\n\t}", "title": "" }, { "docid": "7f349c10e1c4e377dc762e0844d6e4e9", "score": "0.5177045", "text": "function remove()\r\r\n\t{\r\r\n\t\t$sql = array();\r\r\n\r\r\n\t\treturn $this->_remove($sql);\r\r\n\t}", "title": "" }, { "docid": "ec4e518dde237a3d5c7a8058a782daf9", "score": "0.5169763", "text": "public function deleteManyBy($key, $value);", "title": "" } ]
b5326d6296b10ade72a2da3774b30cf2
Fatal error: Access level to Cat::cry() must be public (as in class Animal)
[ { "docid": "1aa714958c0acb3f6c0580f3f8632282", "score": "0.46444193", "text": "public function cry()\n {\n echo '小猫喵喵叫~';\n }", "title": "" } ]
[ { "docid": "5a2aaa24dd7cb3bdc80e384aed880f0e", "score": "0.54289114", "text": "public function Con_Animal(){\n // TODO\n }", "title": "" }, { "docid": "da39b580dfbc0d512c5296e96f7ac044", "score": "0.5406416", "text": "abstract protected function category();", "title": "" }, { "docid": "27c38199352ec9588fe7691435ec2a90", "score": "0.52551794", "text": "public function __construct()\n {\n $this->cat = new Cat();\n }", "title": "" }, { "docid": "6e15173298c7dcebd167ae9068faf2ae", "score": "0.5165828", "text": "protected function MyProtected() { }", "title": "" }, { "docid": "3f9cb6eabae989f7b2b87f5bd6a73d54", "score": "0.5143787", "text": "private function MyPrivate() { }", "title": "" }, { "docid": "4d9db2070bce20a3ba5dab098c1fb13a", "score": "0.5041675", "text": "protected static function security()\n {\n }", "title": "" }, { "docid": "3d226f49c20cb1de4c69376b481e0467", "score": "0.500624", "text": "function miprimerclase(){}", "title": "" }, { "docid": "5252f000c3775e682e10bf038d1b0460", "score": "0.4783798", "text": "public function cats()\n {\n //\n return Animal::where('species', 'like', 'feline')->get();\n }", "title": "" }, { "docid": "1f234a845a177edf486d7f5181eb1ee2", "score": "0.4783217", "text": "protected function getVictimAnimal(): Animal\n {\n return CatsAviary::makeFatPetCat('\"Victim test fat pet cat\"', 10, new Food(20));\n }", "title": "" }, { "docid": "bfa7322c2910b8c378180cce611918d5", "score": "0.4754373", "text": "public function smell();", "title": "" }, { "docid": "dcc7394b11db5814d40aab6abd2f1dea", "score": "0.4749436", "text": "public function _constract(){\n\n }", "title": "" }, { "docid": "2329eb404a57075e675c03b0bc03f9e0", "score": "0.47212595", "text": "public function __construct(public Category $category)\n {\n //\n }", "title": "" }, { "docid": "36a717e1c49d7120545573f07847a750", "score": "0.46903685", "text": "public function publicMethod() {}", "title": "" }, { "docid": "a0e2f1b58cf08fbf223cfb777dd777c4", "score": "0.46858448", "text": "public function Crumbee()\n {\n self::__construct();\n }", "title": "" }, { "docid": "a8f7ad71713a3b9e14babe77f909f8ca", "score": "0.46775588", "text": "public final function __construct() {\n throw new dxCallerException('Type should never be instantiated. All methods and variables are publically statically accessible.');\n }", "title": "" }, { "docid": "95ec5f4562f77d02680d4789ff46f0bb", "score": "0.46652108", "text": "final protected function __construct() {}", "title": "" }, { "docid": "2dc19316f74b3c60d01487b56a170403", "score": "0.46635112", "text": "public function category($category)\n {\n// echo __METHOD__;\n echo $category;\n }", "title": "" }, { "docid": "efa8f27d8e571de69b95f0371e7c8781", "score": "0.46616486", "text": "abstract public function getCategory();", "title": "" }, { "docid": "70b69d079b0da787fcc0366c102d9f6e", "score": "0.46608406", "text": "private function foo() {\n\t}", "title": "" }, { "docid": "8b0e9775e3c3604022043fe31ff845c2", "score": "0.4644874", "text": "public function cat()\n {\n return $this->cat;\n }", "title": "" }, { "docid": "d04eab4f9f0e4db04c089cb9ab4b5264", "score": "0.46440336", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function invokingPrivateConstructorFromParentClass() {\n PrivateAccessibilityFixtureCtorChild::construct(self::$fixture);\n }", "title": "" }, { "docid": "0614d2cd5bdc1b02d2379d9cb00179e8", "score": "0.46273482", "text": "public function paintMyCar($newColor){\n // $this->color=$newColor;\n\n //If it is private in the main class and we want to overwrite it, we use:\n //parent::setColor($newColor);\n\n //If color is set as protected in the main class, we do not need setter:\n $this->color=$newColor;\n}", "title": "" }, { "docid": "276b66722b2d40295fd83ba449220125", "score": "0.46001783", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function invokingPrivateMethodFromParentClass() {\n PrivateAccessibilityFixtureChild::invoke(self::$fixture);\n }", "title": "" }, { "docid": "02d0a935629a429cad26fb1db433ca3b", "score": "0.45898646", "text": "public function access()\n\t{\n\t\tparent::access();\n\t}", "title": "" }, { "docid": "a125b23949ba2b1a953012658edafa2d", "score": "0.4586962", "text": "public function getCat($id){\n\n $cat = Patient::find($id)->cats()->first();\n \n\n return $cat;\n }", "title": "" }, { "docid": "a302431b1eb57201c0b21fb67a95f460", "score": "0.4583904", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function invokingPrivateConstructorFromChildClass() {\n PrivateAccessibilityFixtureCtorChild::construct(self::$fixtureChild);\n }", "title": "" }, { "docid": "d25f2583a13c0f6049dc56ceb728ce53", "score": "0.45827103", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function invokingPrivateStaticMethodFromParentClass() {\n PrivateAccessibilityFixtureChild::invokeStatic(self::$fixture);\n }", "title": "" }, { "docid": "0f429ec7f6043b87a15e20a51aa35c53", "score": "0.45654607", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function writingPrivateMemberFromParentClass() {\n PrivateAccessibilityFixtureChild::write(self::$fixture);\n }", "title": "" }, { "docid": "b65a728d8c37b47c28619ce5e646b412", "score": "0.45567867", "text": "public function __get($key) {\n\t\treturn $this->api_category($key);\n\t}", "title": "" }, { "docid": "9e8cf939987d550ce7a902be67a232ff", "score": "0.4535476", "text": "function printhello2()\n {\n echo $this->public;\n echo $this->protected;\n// echo $this->private;\n }", "title": "" }, { "docid": "a20e4c717d444ecd2f5584f66c083224", "score": "0.45338103", "text": "public function handel():mixed;", "title": "" }, { "docid": "b4a8e14793f2499d36ff65aa0150479d", "score": "0.45253122", "text": "public function check_the_facade_could_be_called()\n {\n Genderize::name('John');\n }", "title": "" }, { "docid": "e6b45a961d76b8c9bb4ee706a0e432a6", "score": "0.45195952", "text": "public function shielding();", "title": "" }, { "docid": "2e6e9ef1308deddd1041d3283f955473", "score": "0.4510212", "text": "public function getAnimal(){\n return $this->animal;\n }", "title": "" }, { "docid": "cf3523e7955e3c6806329a13c31a18cf", "score": "0.4493694", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function invokingPrivateStaticMethodFromChildClass() {\n PrivateAccessibilityFixtureChild::invokeStatic(self::$fixtureChild);\n }", "title": "" }, { "docid": "7daf34b368d2d0a65e7936a48d6d933f", "score": "0.44911426", "text": "function __constuct(){}", "title": "" }, { "docid": "a4e06d236882c32d0f0471f0d47066e6", "score": "0.4485211", "text": "private function samplePrivate(){\n\t\t\n\t}", "title": "" }, { "docid": "be9154f5ff6b397e492d8d47738598d3", "score": "0.4482607", "text": "public function __construct()\n {\n throw new BadMethodCallException('Not supposed to be called!');\n }", "title": "" }, { "docid": "ba4465321a2264d37f9ed43bc65a71d9", "score": "0.44814792", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function invokingPrivateMethodFromChildClass() {\n PrivateAccessibilityFixtureChild::invoke(self::$fixtureChild);\n }", "title": "" }, { "docid": "cbdc7ab45f576490557c0983ef8a04cf", "score": "0.44703823", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function writingPrivateStaticMemberFromParentClass() {\n PrivateAccessibilityFixtureChild::writeStatic(self::$fixture);\n }", "title": "" }, { "docid": "416227b0f6e675527634f8dc6e9d7385", "score": "0.44646734", "text": "private function foo()\n\t{\n\t}", "title": "" }, { "docid": "59d1146971f8854dc7381bde8027c7ac", "score": "0.4461392", "text": "abstract protected static function decoratedClass() : string;", "title": "" }, { "docid": "3b86eecdff92a1cd2673e8fa3dc0f439", "score": "0.4460644", "text": "public function access();", "title": "" }, { "docid": "3b86eecdff92a1cd2673e8fa3dc0f439", "score": "0.4460644", "text": "public function access();", "title": "" }, { "docid": "a8c9f19b678e75cda46530c9baf7baaf", "score": "0.44438988", "text": "public static function get( $key ) {\n\t\tthrow new \\Exception( 'Must be redefined in your child class!' );\n\t}", "title": "" }, { "docid": "4b81dc12b8febe2bc75446a3df018509", "score": "0.44334733", "text": "public static function getProtectedCategories()\n {\n return [self::ARCHIVED, self::LEARNING, self::LEARNED];\n }", "title": "" }, { "docid": "e195d34d7219a2b331a9634734836b2b", "score": "0.44214982", "text": "#[@test, @expect('lang.IllegalAccessException')]\n public function readingPrivateMemberFromParentClass() {\n PrivateAccessibilityFixtureChild::read(self::$fixture);\n }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.44183218", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.44183218", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.44183218", "text": "final private function __construct() {}", "title": "" }, { "docid": "6b2df1216dda27d07530db82df9ecac7", "score": "0.4413237", "text": "public function categoryAction() {\n if($this->_getParam('id', false)) {\n $id = (int)$this->_getParam('id');\n $this->view->categories = $this->_cats->getCategory($id);\n $types = new MedievalTypes();\n $this->view->types = $types->getCoinTypeCategory($id);\n $this->view->rulers = $this->_cats->getMedievalRulersToType($id);\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "title": "" }, { "docid": "5a103b1fec6cdf4a859ec56371b062f5", "score": "0.44086123", "text": "function __construct() {\n\t\tparent::__construct(\"Comic\");\n\t}", "title": "" }, { "docid": "6338ea1a747dc9ee20c5fb7bb27b7599", "score": "0.43973333", "text": "public function index()\n {\n abort_if(Gate::denies('category_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return new CategoryResource(Category::with('parent')->get());\n }", "title": "" }, { "docid": "0d9d168d18a5132a91184b0bd5164139", "score": "0.43952382", "text": "public function getCategory(){\n \tif(!Auth()->check()){\n \t\treturn \"You must login before!!\";\n \t}else{ \n \t\treturn Category::where('user_id',Auth()->user()->id)->get();\n \t}\n }", "title": "" }, { "docid": "982671813a2f650033fdaa8b94e9f6c1", "score": "0.43950847", "text": "abstract protected function redux();", "title": "" }, { "docid": "505c9a86f42e9ebc55050fce2a266f32", "score": "0.43867254", "text": "public function testCarIsPaintingDamaged()\n {\n $car = new Car([\n new Door(isBroken: false, isPaintDamaged: true),\n new Tyre(isBroken: true),\n ]);\n\n $this->assertTrue($car->isPaintingDamaged());\n }", "title": "" }, { "docid": "b962cdaff79b54afa2f86b157475fdb4", "score": "0.4377041", "text": "public function getCatType() : int{\n\t\treturn $this->catType;\n\t}", "title": "" }, { "docid": "2e73adcd3433fbf905d5d5be2f91080f", "score": "0.43730164", "text": "public function get_categories()\n {\n return ['careerfy'];\n }", "title": "" }, { "docid": "4c2e14839fdffdec5b4645845d057821", "score": "0.43670365", "text": "function getIdCat() {\n return $this->IdCat;\n }", "title": "" }, { "docid": "f1f93348db9211deab9e08cf4da9ccaa", "score": "0.43665856", "text": "public function checkAccess() {\n\n }", "title": "" }, { "docid": "13cf50c1fd4f7d5d0fb1abadbbf0b32a", "score": "0.4362355", "text": "public function classes_are_always_public()\n\t{\n\n\t\ttask('uncomment the following line');\n\t\t// class IllegalNestedClass{}\n\t}", "title": "" }, { "docid": "69bc0ef972f9742faddfe3b86f4f923e", "score": "0.43610555", "text": "public function annonces()\n {\n \n }", "title": "" }, { "docid": "7c09a06a88f98a7e7a05d7680ca00db8", "score": "0.43605924", "text": "protected function accessLevel()\n {\n // TODO: Implement accessLevel() method.\n }", "title": "" }, { "docid": "afe69b231e930cddf351369a92aa87ef", "score": "0.43526816", "text": "function Memcached()\n {\n trigger_error('The class \"memcached\" may only be invoked statically.', E_USER_ERROR);\n }", "title": "" }, { "docid": "0aed1fae47d8449e5eab53e200c854fa", "score": "0.43510896", "text": "public function _construct()\n {\n $this->_init('meetmyteam/category', 'meetmyteam_cat_id');\n }", "title": "" }, { "docid": "3d1c60caad13e77194edc7cf1d8e479b", "score": "0.43500078", "text": "private function internalMethod() {}", "title": "" }, { "docid": "8ccd48978c1ce18453986e114801b614", "score": "0.43475023", "text": "public function __construct()\n\t{\n\t\tparent::__construct(\"Category\",'Type');\n \n\t}", "title": "" }, { "docid": "514b2689c44ad562fdc1a280ed8a60eb", "score": "0.43419152", "text": "function __construct($_name, $_age, $_cri){\n\t\t$this->species = \"Chat\";\n\t\t// j'appelle le constructeur du parent pour ne pas avoir a bind les propriétés dans toutes les classes enfants\n\t\tparent::__construct($_name, $_age, $_cri);\t\n\t}", "title": "" }, { "docid": "dccee82fcf36437bd61fc86b267ab04d", "score": "0.4338251", "text": "public function __construct()\n {\n parent::__construct('Collection imutable can not be modify');\n }", "title": "" }, { "docid": "d9a0f6f17042263f418a7ba2a070047c", "score": "0.4331704", "text": "public function sanction() {\n \n }", "title": "" }, { "docid": "d0f354b28259f13cc05d46a25bf41f6c", "score": "0.433085", "text": "private function __construct()\n {}", "title": "" }, { "docid": "42385467a7799d036898d77e505f3c1a", "score": "0.43302268", "text": "abstract public function checkAccess();", "title": "" }, { "docid": "352f17f025a7e7191e2cf370e4df9b59", "score": "0.43127286", "text": "public function cobaClass()\n {\n // echo $foo->bar();\n\n $foo = new Foo();\n echo $foo->bar();\n }", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.43124104", "text": "private function __construct () {}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.43124104", "text": "private function __construct () {}", "title": "" }, { "docid": "2b3e0741b324da4c74fde553502c09dc", "score": "0.43112096", "text": "abstract public function permissions();", "title": "" }, { "docid": "1e4def354db7fc74ce87e401ed1549ba", "score": "0.43011492", "text": "public function AffectsCatNum() {\n\treturn ($this->CatKey() != '');\n }", "title": "" }, { "docid": "a2a822b546659ccbd8a85c060fdaf242", "score": "0.42984506", "text": "public function show(Cat $cat)\n {\n //\n }", "title": "" }, { "docid": "6508edcd7d6bf8de8cd75af7a9103e9a", "score": "0.4297467", "text": "public abstract function decorate(&$ch);", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.42967367", "text": "private final function __construct() {}", "title": "" }, { "docid": "579978d4b9943db121c2e9e849b4ce1c", "score": "0.42954418", "text": "public function category_init()\n {\n try\n {\n // Obtain necessary globals.\n $l_gets = $this->get_module_request()\n ->get_gets();\n $l_database = $this->get_module_request()\n ->get_database();\n\n // Deactivate all navbar buttons - These will be activated in \"handle_navmode()\"\n $this->get_module_request()\n ->get_navbar()\n ->set_active(false, C__NAVBAR_BUTTON__ARCHIVE)\n ->set_active(false, C__NAVBAR_BUTTON__DELETE)\n ->set_active(false, C__NAVBAR_BUTTON__RECYCLE)\n ->set_active(false, C__NAVBAR_BUTTON__DUPLICATE)\n ->set_active(false, C__NAVBAR_BUTTON__PURGE)\n ->set_active(false, C__NAVBAR_BUTTON__PRINT);\n\n /*\n * Warning!\n *\n * Only cateID is processed here by the distributor. There are situations where you can't use cateID,\n * because it's automatically initiating the list-fetching procedure in the category-factory.\n *\n * To skip this (thus you have to collect the data on your own)\n * use cat1ID -> cat6ID.\n */\n\n // Which category entry is chosen?\n $l_catentry = $_GET[C__CMDB__GET__CATLEVEL];\n $l_catmeta = $this->m_dao_cmdb->nav_get_current_category_data($l_gets);\n $l_cat_const = $l_gets[$l_catmeta[\"get\"]];\n\n /* Rights and category stuff */\n $this->m_categoryData = $this->m_dao_cmdb->gui_get_info_by_category($l_catmeta[\"type\"], $l_cat_const);\n if ($this->m_categoryData->count()) $this->m_categoryData = $this->m_categoryData->get_row();\n else $this->m_categoryData = [];\n\n $this->m_categoryConst = $this->m_categoryData[\"isysgui_\" . $l_catmeta[\"string\"] . \"__const\"];\n\n $this->m_rights = [\n isys_auth::VIEW => isys_auth_cmdb::instance()\n ->has_rights_in_obj_and_category(isys_auth::VIEW, $l_gets[C__CMDB__GET__OBJECT], $this->m_categoryConst),\n isys_auth::EDIT => isys_auth_cmdb::instance()\n ->has_rights_in_obj_and_category(isys_auth::EDIT, $l_gets[C__CMDB__GET__OBJECT], $this->m_categoryConst),\n isys_auth::DELETE => isys_auth_cmdb::instance()\n ->has_rights_in_obj_and_category(isys_auth::DELETE, $l_gets[C__CMDB__GET__OBJECT], $this->m_categoryConst),\n isys_auth::ARCHIVE => isys_auth_cmdb::instance()\n ->has_rights_in_obj_and_category(isys_auth::ARCHIVE, $l_gets[C__CMDB__GET__OBJECT], $this->m_categoryConst),\n isys_auth::SUPERVISOR => isys_auth_cmdb::instance()\n ->has_rights_in_obj_and_category(isys_auth::SUPERVISOR, $l_gets[C__CMDB__GET__OBJECT], $this->m_categoryConst),\n ];\n\n // Get all necessary data for the current category.\n $l_catdata = $this->m_categoryData;\n\n // Determine if it is multivalued.\n $l_is_multivalued = !empty($l_catdata['isysgui_' . $l_catmeta[\"string\"] . '__list_multi_value']);\n\n // Initialize distributor.\n $l_object_id = $l_gets[C__CMDB__GET__OBJECT];\n $l_strError = '';\n\n // Emit signal.\n isys_component_signalcollection::get_instance()\n ->emit(\"mod.cmdb.beforeCategoryInit\", $l_object_id, $l_catentry, $l_catmeta);\n\n if (!$l_object_id || $l_object_id == \"\")\n {\n throw new isys_exception_cmdb(\"Distributor couldn't determine object ID (id = '$l_object_id')\", C__CMDB__ERROR__CATEGORY_PROCESSOR);\n } // if\n\n // Foreign key id.\n $l_nFKID = null;\n\n if ($l_is_multivalued)\n {\n $l_nFKID = $l_catentry;\n } // if\n\n // Check for object existence.\n if ($this->m_dao_cmdb->obj_exists($l_object_id))\n {\n $l_dist = new isys_cmdb_dao_distributor(\n $l_database, $l_object_id, $l_catmeta[\"type\"], $l_nFKID, isys_cmdb_dao_distributor::make_category_filter($l_cat_const)\n );\n\n $l_nDCount = $l_dist->count();\n\n // Check distributor and count of fetched category access objects.\n if ($l_dist && $l_nDCount)\n {\n\n $l_cat_dao = $l_dist->get_category($l_cat_const);\n\n if (!$l_cat_dao)\n {\n throw new isys_exception_cmdb(\"Could not get category DAO for selected category (in \" . $l_strError . \")\", C__CMDB__ERROR__CATEGORY_PROCESSOR);\n } // if\n\n // Get UI class.\n $l_cat_ui = $l_cat_dao->get_ui();\n\n // Build cross-reference between DAO and UI (so that both reference each other in order to work together).\n $l_cat_ui->init($l_cat_dao);\n\n $this->m_cat_ui = $l_cat_ui;\n $this->m_cat_dao = $l_cat_dao->set_object_id($l_object_id)\n ->set_object_type_id(\n $l_cat_dao->get_type_by_object_id($l_object_id)\n ->get_row_value('isys_obj_type__id')\n );\n }\n else\n {\n if (class_exists($l_catdata[\"isysgui_{$l_catmeta[\"string\"]}__class_name\"]))\n {\n throw new isys_exception_cmdb(\n \"Your selected category '\" . _L(\n $l_catdata[\"isysgui_{$l_catmeta[\"string\"]}__title\"]\n ) . \"' with ID '{$l_cat_const}' does not work properly. The class exists, but your database table '{$l_catdata[\"isysgui_{$l_catmeta[\"string\"]}__source_table\"]}' may not.\",\n C__CMDB__ERROR__CATEGORY_PROCESSOR\n );\n }\n else\n {\n throw new isys_exception_cmdb(\n \"The class {$l_catdata[\"isysgui_{$l_catmeta[\"string\"]}__class_name\"]} for your selected category '\" . _L(\n $l_catdata[\"isysgui_{$l_catmeta[\"string\"]}__title\"]\n ) . \"' with ID '{$l_cat_const}' does not exist.\", C__CMDB__ERROR__CATEGORY_PROCESSOR\n );\n } // if\n } // if\n }\n else\n {\n $l_error = \"Object with ID: \" . $l_object_id . \" does not exist.\\nIf you clicked on a link to reach this page (e.g. a bookmarked page), it might be broken and should be deleted.\";\n\n throw new isys_exception_cmdb($l_error, 0, \"\", false);\n } // if\n\n isys_component_signalcollection::get_instance()\n ->emit(\"mod.cmdb.afterCategoryInit\", $l_object_id, $l_cat_dao, $l_dist);\n }\n catch (isys_exception_cmdb $e)\n {\n throw $e;\n }\n catch (Exception $e)\n {\n throw new isys_exception_cmdb($e->getMessage());\n } // try\n\n return true;\n }", "title": "" }, { "docid": "d9b9f9d6b0d7793424cdcf0bf7a5ec6f", "score": "0.42939386", "text": "public function getCatId(){\r\n\t\treturn $this->catId;\r\n\t}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.42895684", "text": "private function __construct() {}", "title": "" } ]
6970732bc770b3c105805b7115026b45
BUSCA FRETE DA API DOS CORREIOS
[ { "docid": "7140ebec153a5f731161313f23306592", "score": "0.54786485", "text": "private function getApiCorreios($transporte, $produto, $cep_destino){\n\n $array['nCdEmpresa'] = ($transporte['codAdministrativo']) ? $transporte['codAdministrativo'] : '';\n $array['sDsSenha'] = ($transporte['senha']) ? $transporte['senha'] : '';\n $array['sCepOrigem'] = str_replace(\"-\", \"\", $transporte['cepOrigem']);\n $array['sCepDestino'] = str_replace(\"-\", \"\", $cep_destino);\n $array['nVlPeso'] = bcdiv($produto['peso'], '1000', 3);\n $array['nCdFormato'] = 1;\n $array['nVlComprimento'] = $produto['profundidade'];\n $array['nVlAltura'] = $produto['altura'];\n $array['nVlLargura'] = $produto['largura'];\n $array['sCdMaoPropria'] = 'N';\n $array['nVlValorDeclarado'] = 0;\n $array['sCdAvisoRecebimento'] = 'S';\n $array['nCdServico'] = $transporte['codigo'];\n $array['nVlDiametro'] = 0;\n $array['StrRetorno'] = 'xml';\n $array['nIndicaCalculo'] = 3;\n\n $url = 'http://ws.correios.com.br/calculador/CalcPrecoPrazo.aspx?';\n \n //CRIA A URL (EX: valor=10&prazo=2)\n $url = $url . http_build_query($array);\n \n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/xml; charset=utf-8']);\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($curl);\n\n if ($result === false)\n throw new Exception(curl_error($curl), curl_errno($curl));\n \n curl_close($curl);\n\n $ar = simplexml_load_string($result);\n\n if($ar->cServico->Erro != '0')\n return ['erro' => $this->getMsgErro($ar->cServico->Erro), 'valor'=>0, 'prazo'=>0, 'PrazoEntrega'=>0];\n\n $data = (array) $ar->cServico;\n\n $res['nome'] = $transporte['nome'];\n $res['valor'] = bcadd(floatval($data['Valor']), $transporte['valorAdicional'], 2);\n $res['prazo'] = bcadd(intval($data['PrazoEntrega']), $transporte['prazoAdicional']);\n $res['erro'] = (isset($data['erro'])) ? $data['erro'] : '';\n\n return $res;\n\n }", "title": "" } ]
[ { "docid": "85c11255d273fb1c9ab703ce1a868088", "score": "0.64352584", "text": "function clonarOP(){\n $this->procedimiento='tes.ft_obligacion_pago_ime';\n $this->transaccion='TES_REPOP_IME';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago','id_obligacion_pago','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "3349206830a546974303a30b0ecfc794", "score": "0.62664497", "text": "Public function API(){\n \n header('Content-Type: application/JSON'); \n $method = $_SERVER['REQUEST_METHOD'];\n switch ($method) {\n case 'GET'://consulta\n $this->getOptotypes();\n break; \n case 'POST'://inserta\n //$this->getOptotypesAnswer();\n break; \n case 'PUT'://actualiza\n $this->putOptotypes();\n break; \n case 'DELETE'://elimina\n echo'delete';\n break;\n default://metodo NO soportado\n echo 'METODO NO SOPORTADO';\n break;\n }\n }", "title": "" }, { "docid": "6ddd28496717544103c8f5f6c34caade", "score": "0.62419343", "text": "public function API(){\n header('Content-Type: application/JSON'); //Definos que tipo respuesta va a generar nuestra API \n $method = $_SERVER['REQUEST_METHOD']; //Recoge el tipo \"metodo\" del que solicito a la API\n switch ($method) { \n case 'POST'://inserta telefono\n $this->insertNumber();\n break; \n default://metodo NO soportado\n echo 'METODO NO SOPORTADO';\n break;\n }\n }", "title": "" }, { "docid": "dbee7d1693614589f008ed1e28caa87c", "score": "0.61481476", "text": "function API_detalle_informacion($codigo){\n\t$ClsInfo = new ClsInformacion();\n\t\n\tif($codigo != \"\"){\n\t\t$result = $ClsInfo->get_informacion($codigo,\"\",\"\",\"\");\n\t\tif(is_array($result)){\n\t\t\t$i = 0;\t\n\t\t\tforeach ($result as $row){\n\t\t\t\t$arr_data[$i]['codigo'] = $row[\"inf_codigo\"];\n $imagen = trim($row[\"inf_imagen\"]);\n\t\t\t\t$imagen = ($imagen == \"\")?\"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/images/banersapp/baner_actividad.png\":\"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/Actividades/\".trim($row[\"inf_imagen\"]);\n\t\t\t\t$arr_data[$i]['imagen'] = $imagen;\n\t\t\t\t$url = trim($row[\"inf_link\"]);\n\t\t\t\t$arr_data[$i]['link'] = $url;\n\t\t\t\t/*if (preg_match('#^(https?://|www\\.)#i', $url) === 1){\n\t\t\t\t\t$arr_data[$i]['link'] = $url;\n\t\t\t\t} else {\n\t\t\t\t\t$arr_data[$i]['link'] = \"\";\n\t\t\t\t}*/\n\t\t\t\t$arr_data[$i]['ics'] = \"https://\" . $_SERVER['HTTP_HOST'] .\"/SISTEM/API/API_ICScalendario.php?codigo=\".trim($row[\"inf_codigo\"]);\n $arr_data[$i]['titulo'] = trim($row[\"inf_nombre\"]);\n\t\t\t\t$arr_data[$i]['descripcion'] = trim($row[\"inf_descripcion\"]);\n\t\t\t\t$fini = trim($row[\"inf_fecha_inicio\"]);\n\t\t\t\t$ffin = trim($row[\"inf_fecha_fin\"]);\n\t\t\t\t//--\t\t\t\t\n\t\t\t\t$fechaini = explode(\" \",$fini);\n\t\t\t\t$fini = cambia_fecha($fechaini[0]);\n\t\t\t\t$arr_data[$i]['fecha_inicio'] = $fini;\n\t\t\t\t$arr_data[$i]['hora_inicio'] = substr($fechaini[1], 0, -3);\n\t\t\t\t//--\n\t\t\t\t$fechafin = explode(\" \",$ffin);\n\t\t\t\t$fini = cambia_fecha($fechafin[0]);\n\t\t\t\t$arr_data[$i]['fecha_final'] = $fini;\n\t\t\t\t$arr_data[$i]['hora_final'] = substr($fechafin[1], 0, -3);\n\t\t\t\t//\n\t\t\t\tif(file_exists('../../CONFIG/images/logo.png')){ /// valida que tenga foto registrada\n\t\t\t\t\t$arr_data[$i]['url_logo'] = \"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/images/banersapp/logo_fondo.png\";\n\t\t\t\t}else{\n\t\t\t\t\t$arr_data[$i]['url_logo'] = \"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/images/noimage.png\";\n\t\t\t\t}\n\t\t\t\t//--\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\techo json_encode($arr_data);\n\t\t}else{\n\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t$arr_data = array(\n\t\t\t\t\"status\" => \"vacio\",\n\t\t\t\t\"message\" => \"No se registran datos...\");\n\t\t\t\techo json_encode($arr_data);\n\t\t}\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$arr_data = array(\n\t\t\t\"status\" => \"error\",\n\t\t\t\"message\" => \"Uno de los campos esta vacio...\");\n\t\t\techo json_encode($arr_data);\n\t}\n\t\n}", "title": "" }, { "docid": "2f91d65ace1c2efce5417f4a02281e03", "score": "0.614707", "text": "function enviarcorreo_interno($destinatario,$destinatario2,$cc,$cc2,$pagos,$fec_pag,$t_nombres,$t_apellido1,$t_apellido2,$rut,$t_fec_nac,$email,$telefono,$telefono2,$direccion,$comuna,$cod_plan,$estado,$nom_plan,$num_benef,$valor_plan_benef,$cod_pago,$tipo_pago,$cant_descuento,$valor_plan,$token,$buyorder,$authorizationcode,$creditcardtype,$last4carddigits,$tbkuser,$username,$fecha_tbk,$payment_type_code,$fec_fac,$clase,$observa,$responsecode,$campania,$camp_nombre){\n \n /* Estado del Cliente */\n if($estado == 'S'){\n $titulo = 'Transacción Exitosa';\n }elseif($estado == 'R'){\n $titulo = 'Rechaza Cobro';\n }elseif($estado == 'T'){\n $titulo = 'Rechazo TBK';\n }elseif($estado == 'I'){\n $titulo = 'Nueva Suscripción'; \n }else{\n $titulo = '';\n }\n /* Tipo de Cliente */\n if($clase == 'A'){\n $tipo_clase = '(A) Autocontratados';\n }elseif($clase == 'B'){\n $tipo_clase = '(B) Inscripción y Cobro';\n }elseif($clase == 'C'){\n $tipo_clase = '(C) Solo Inscripción'; \n }else{\n $tipo_clase = '';\n }\n /* Tipo de Error Clientes antiguos*/\n if($responsecode == '0'){\n $obs_error = ''; \n }elseif($responsecode == '-97'){\n $obs_error = '-97 máximo monto diario de pago excedido';\n }elseif($responsecode == '-98'){\n $obs_error = '-98 máximo monto de pago excedido';\n }elseif($responsecode == '-99'){\n $obs_error = '-99 máxima cantidad de pagos diarios excedido'; \n }elseif(substr($responsecode,0, 1) != 'i' && substr($responsecode,0, 1) != 'c'){\n if($responsecode < 0 && $responsecode > -9){\n $obs_error = 'Rechazo TBK'; \n }\n }\n /* Tipo de Error COBRO */\n elseif($responsecode == 'c-97'){\n $obs_error = '-97 máximo monto diario de pago excedido';\n }elseif($responsecode == 'c-98'){\n $obs_error = '-98 máximo monto de pago excedido';\n }elseif($responsecode == 'c-99'){\n $obs_error = '-99 máxima cantidad de pagos diarios excedido'; \n }elseif(substr($responsecode,0, 1) == 'c'){\n if(substr($responsecode,1) < 0 && substr($responsecode,1) > -9){\n $obs_error = 'Rechazo TBK'; \n } \n }\n /* Tipo de Error INSCRIPCION */\n elseif($responsecode == 'i-1'){\n $obs_error = '-1 máximo monto diario de pago excedido';\n }elseif($responsecode == 'i-2'){\n $obs_error = '-2 máximo monto de pago excedido';\n }elseif($responsecode == 'i-3'){\n $obs_error = '-3 máxima cantidad de pagos diarios excedido'; \n }elseif($responsecode == 'i-4'){\n $obs_error = '-4 máxima cantidad de pagos diarios excedido'; \n }elseif($responsecode == 'i-5'){\n $obs_error = '-5 Rechazo - Posible Fraude (Transacción con riesgo de posible fraude)'; \n }else{\n $obs_error = 'No especifica';\n }\n \n //FORMATO FECHA TBK\n $newDate_tbk = date(\"d-m-Y H:i:s\", strtotime($fecha_tbk));\n \n $mensaje = \"CODIGO: {$pagos}, FECHA REGISTRO: {$fec_pag}, NOMBRE TITULAR: {$t_nombres} {$t_apellido1} {$t_apellido2}, RUT: {$rut}, FECHA NAC: {$t_fec_nac}, EMAIL: {$email}, TELEFONO: {$telefono}, TELEFONO 2: {$telefono2}, DIRECCION: {$direccion}, COMUNA: {$comuna}, CODIGO PLAN: {$cod_plan}, NOMBRE PLAN: {$nom_plan}, CANT BENEFICIARIOS: {$num_benef}, VALOR PLAN: {$valor_plan_benef}, COD PAGO: {$cod_pago}, TIPO PAGO: {$tipo_pago}, DESCUENTO: {$cant_descuento}, VALOR FINAL: {$valor_plan}, ESTADO: {$titulo}, TOKEN: {$token}, ORDEN DE COMPRA: {$buyorder}, CODIGO AUTORIZACION TBK: {$authorizationcode}, TIPO DE TARJETA: {$creditcardtype}, ULTIMOS 4 DIGITOS: {$last4carddigits}, USUARIO TBK: {$username}, COD USUARIO TBK: {$tbkuser}, FECHA TBK: {$newDate_tbk}, COD TIPO DE PAGO: {$payment_type_code}, FECHA FACTURACION: {$fec_fac}, CODIGO CAMPAÑA: {$campania}, NOMBRE CAMPAÑA: {$camp_nombre} , OBSERVACION ERROR: {$obs_error}, TIPO DE CLIENTE: {$tipo_clase}, COMENTARIO: {$observa} \";\n \n $fechahoy = date(\"Y-m-d\");\n $asunto = $titulo.\" en Pagina Web el \".$fechahoy.\" Cliente \".$t_nombres.\" \".$t_apellido1.\" \".$t_apellido2.\" Tipo de cliente \".$clase.\" Rut \".$rut. \".\";\n\n // Datos de la cuenta de correo utilizada para enviar vía SMTP\n $smtpHost = \"pyme91.pymedns.net\"; // Dominio alternativo brindado en el email de alta \n $smtpUsuario = \"autocontrato@rest911.cl\"; // Mi cuenta de correo\n $smtpClave = \"%&auto&%web2020\"; // Mi contraseña\n $correo = ('autocontrato@rest911.cl'); // Email desde donde se envia el correo\n $nombre = \"REST911 WEB\";\n\n\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n $mail->Port = 465; \n $mail->IsHTML(true); \n $mail->CharSet = \"utf-8\";\n $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail\n\n // VALORES A MODIFICAR //\n $mail->Host = $smtpHost; \n $mail->Username = $smtpUsuario; \n $mail->Password = $smtpClave;\n \n //DEBUG\n //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n //$mail->SMTPDebug = 2;\n //$mail->Debugoutput = 'html';\n\n $mail->From = ($correo); // Email desde donde envío el correo.\n $mail->FromName = $nombre;\n $mail->AddAddress($destinatario); // Esta es la dirección a donde enviamos los datos del formulario\n $mail->AddAddress($destinatario2);\n $mail->addCC($cc); // Dirección de copia\n $mail->addCC($cc2); // Dirección de copia 2\n\n\n $mail->Subject = $asunto; // Este es el titulo del email.\n $mensajeHtml = nl2br($mensaje);\n $mail->Body = \"\n <html> \n\n <body> \n <TABLE BORDER=1;>\n <TR>\n <TD>CODIGO:</TD>\n <TD>{$pagos}</TD>\n </TR>\n <TR>\n <TD>FECHA REGISTRO:</TD>\n <TD>{$fec_pag}</TD>\n </TR>\n <TR>\n <TD>NOMBRE TITULAR:</TD>\n <TD>{$t_nombres} {$t_apellido1} {$t_apellido2}</TD>\n </TR>\n <TR>\n <TD>RUT:</TD>\n <TD>{$rut}</TD>\n </TR>\n <TR>\n <TD>FECHA NACIMIENTO:</TD>\n <TD>{$t_fec_nac}</TD>\n </TR>\n <TR>\n <TD>EMAIL:</TD>\n <TD>{$email}</TD>\n </TR>\n <TR>\n <TD>TELEFONO:</TD>\n <TD>{$telefono}</TD>\n </TR>\n <TR>\n <TD>TELEFONO 2:</TD>\n <TD>{$telefono2}</TD>\n </TR>\n <TR>\n <TD>DIRECCION:</TD>\n <TD>{$direccion}</TD>\n </TR>\n <TR>\n <TD>COMUNA:</TD>\n <TD>{$comuna}</TD>\n </TR>\n <TR>\n <TD>CODIGO PLAN:</TD>\n <TD>{$cod_plan}</TD>\n </TR>\n <TR>\n <TD>NOMBRE PLAN:</TD>\n <TD>{$nom_plan}</TD>\n </TR>\n <TR>\n <TD>CANT BENEFICIARIOS:</TD>\n <TD>{$num_benef}</TD>\n </TR>\n <TR>\n <TD>VALOR PLAN:</TD>\n <TD>{$valor_plan_benef}</TD>\n </TR>\n <TR>\n <TD>COD PAGO:</TD>\n <TD>{$cod_pago}</TD>\n </TR>\n <TD>TIPO PAGO:</TD>\n <TD>{$tipo_pago}</TD>\n </TR>\n <TR>\n <TD>DESCUENTO:</TD>\n <TD>{$cant_descuento}</TD>\n </TR>\n <TR>\n <TD>VALOR FINAL:</TD>\n <TD>{$valor_plan}</TD>\n </TR>\n <TR>\n <TD>ESTADO:</TD>\n <TD>{$titulo}</TD>\n </TR>\n <TR>\n <TD>TOKEN:</TD>\n <TD>{$token}</TD>\n </TR>\n <TR>\n <TD>ORDEN DE COMPRA:</TD>\n <TD>{$buyorder}</TD>\n </TR>\n <TR>\n <TD>CODIGO AUTORIZACION TBK:</TD>\n <TD>{$authorizationcode}</TD>\n </TR>\n <TR>\n <TD>TIPO DE TARJETA:</TD>\n <TD>{$creditcardtype}</TD>\n </TR>\n <TR>\n <TD>ULTIMOS 4 DIGITOS:</TD>\n <TD>{$last4carddigits}</TD>\n </TR>\n <TR>\n <TD>USUARIO TBK:</TD>\n <TD>{$username}</TD>\n </TR>\n <TR>\n <TD>COD USUARIO TBK:</TD>\n <TD>{$tbkuser}</TD>\n </TR>\n <TR>\n <TD>FECHA TBK:</TD>\n <TD>{$newDate_tbk}</TD>\n </TR>\n <TR>\n <TD>COD TIPO DE PAGO:</TD>\n <TD>{$payment_type_code}</TD>\n </TR>\n <TR>\n <TD>FECHA FACTURACION:</TD>\n <TD>{$fec_fac}</TD>\n </TR>\n <TR>\n <TD>OBSERVACION ERROR:</TD>\n <TD>{$obs_error}</TD>\n </TR>\n <TR>\n <TD>TIPO DE CLIENTE:</TD>\n <TD>{$tipo_clase}</TD>\n </TR>\n <TR>\n <TD>CODIGO CAMPAÑA:</TD>\n <TD>{$campania}</TD>\n </TR>\n <TR>\n <TD>NOMBRE CAMPAÑA:</TD>\n <TD>{$camp_nombre}</TD>\n </TR>\n <TR>\n <TD>COMENTARIO:</TD>\n <TD>{$observa}</TD>\n </TR>\n\n </TABLE>\n\n </body> \n\n </html>\n\n <br />\"; // Texto del email en formato HTML\n $mail->AltBody = \"{$mensaje} \\n\\n \"; // Texto sin formato HTML\n // FIN - VALORES A MODIFICAR //\n\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n\n return($mail->Send()); \n \n}", "title": "" }, { "docid": "d181239477daab4bb96cca8169d6ac28", "score": "0.608845", "text": "function api_melhor_oferta_request(){\n\t\n\n\t$server = $GLOBALS['server'];\n\t$authorization = $GLOBALS['authorization'];\n\n\t// para usar quando passar parametros para a api\n\t//$dados = http_build_query($att);\n\t//$getUrl = $server.\"?\".$dados;\n\n\t$getUrl = $server; //utilizar quando não houver parâmetros\n\n\t$curl = curl_init($getUrl);\n\tcurl_setopt($curl, CURLOPT_URL, $getUrl);\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array($authorization));\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n\n\t$r = json_decode(curl_exec($curl));\n\n\tcurl_close($curl);\n\n\treturn $r;\n\t\n}", "title": "" }, { "docid": "9ece8f884ae168e7f9e9ae3a23f60a73", "score": "0.60883427", "text": "public function AplicaOfertaEnJuegos(){\r\n \r\n }", "title": "" }, { "docid": "a5ee85d9181e6f2e922b4516e987fa36", "score": "0.60410523", "text": "function consignacion_obtenerDatosCONSIGNACION()\n{\n global $PRO_CONSIGNACION_HABILITADO;\n global $PRO_CONSIGNACION_MODO;\n \n $data = new stdClass();\n $data_detalles = new stdClass();\n $data_detalles->habilitado = $PRO_CONSIGNACION_HABILITADO;\n $data_detalles->modo = $PRO_CONSIGNACION_MODO;\n $data->resultado = 'OK';\n $data->mensaje = '¡Datos de CONSIGNACION disponibles!';\n $data->detalles = $data_detalles;\n return $data;\n}", "title": "" }, { "docid": "cd425cee591787156eb484299b6bf2af", "score": "0.6021848", "text": "public function statusReceita(){\n\t\tApp::import('Vendor', 'ToolsNFePHP', array('file' => 'Nfephp/libs/NFe/ToolsNFePHP.class.php'));\n\t\t$nfe = new ToolsNFePHP;\n\t\theader('Content-type: text/html; charset=UTF-8');\n\t\t$sUF = 'AC;AL;AM;AP;BA;CE;DF;ES;GO;MA;MG;MS;MT;PA;PB;PE;PI;PR;RJ;RN;RO;RR;RS;SC;SE;SP;TO';\n\t\t$sUF = 'RJ';\n\n\t\t//determina o ambiente 1-produção 2-homologação\n\t\t$tpAmb= '2';\n\t\t$aUF = explode(';', $sUF);\n\t\tif ($tpAmb == 1) {\n\t\t $sAmb='Produção';\n\t\t} else {\n\t\t $sAmb='Homologação';\n\t\t}\n\n\t\tforeach ($aUF as $UF) {\n\t\t echo '<BR><HR/><BR>';\n\t\t echo \"$UF [ $sAmb ] ==> $UF <BR>\";\n\t\t $resp = $nfe->statusServico($UF, $tpAmb, $retorno);\n\t\t echo print_r($retorno);\n\t\t echo '<BR>';\n\t\t echo $nfe->errMsg.'<BR>';\n\t\t echo '<PRE>';\n\t\t echo htmlspecialchars($nfe->soapDebug);\n\t\t echo '</PRE><BR>';\n\t\t echo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '<BR><BR><HR/><BR>';\n\t\t flush();\n\t\t}\n\n\t\t/*\n\t\t//Contignecia SVCAN\n\t\t$UF = 'SP';\n\t\t$nfe->ativaContingencia('SVCAN');\n\t\t$alias = 'SVCAN';\n\t\techo '<BR><HR/><BR>';\n\t\techo \"$UF [ $sAmb ] ==> $alias <BR>\";\n\t\t$resp = $nfe->statusServico($UF, $tpAmb, $retorno);\n\t\techo print_r($retorno);\n\t\techo '<BR>';\n\t\techo $nfe->errMsg.'<BR>';\n\t\techo '<PRE>';\n\t\techo htmlspecialchars($nfe->soapDebug);\n\t\techo '</PRE><BR>';\n\t\techo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '<BR><BR><HR/><BR>';\n\t\tflush();\n\n\t\t//Contingecia SVCRS\n\t\t$nfe->ativaContingencia('SVCRS');\n\t\t$alias = 'SVCRS';\n\t\techo '<BR><HR/><BR>';\n\t\techo \"$UF [ $sAmb ] ==> $alias <BR>\";\n\t\t$resp = $nfe->statusServico($UF, $tpAmb, $retorno);\n\t\techo print_r($retorno);\n\t\techo '<BR>';\n\t\techo $nfe->errMsg.'<BR>';\n\t\techo '<PRE>';\n\t\techo htmlspecialchars($nfe->soapDebug);\n\t\techo '</PRE><BR>';\n\t\techo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '<BR><BR><HR/><BR>';\n\t\tflush();\n\t\t*/\n\t}", "title": "" }, { "docid": "c5ffadca2e9d7fe661109df56e8e0307", "score": "0.5997765", "text": "function generarCodigoControl(){\r\n\t\t$this->procedimiento='param.f_utilidades_ime';\r\n\t\t$this->transaccion='PM_GENCC_IME';\r\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\r\n\t\t$this->tipo_conexion='seguridad';\r\n\t\t\r\n\t\t$this->arreglo['id_usuario'] = 1;\r\n\t\t\r\n\t\t$this->setParametro('id_usuario','id_usuario','integer');\r\n\t\t\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->setParametro('llave','varchar','varchar');\r\n\t\t$this->setParametro('nro_autorizacion','varchar','varchar');\r\n\t\t$this->setParametro('nro_factura','varchar','varchar');\r\n\t\t$this->setParametro('nit','varchar','varchar');\r\n\t\t$this->setParametro('fecha','varchar','varchar'); // formato YYYYMMDD\r\n\t\t$this->setParametro('monto','numeric','numeric');//tiene q ser numerico redondeado a 0 decimales\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "86b9396fca621122d5c85b3202eee51d", "score": "0.5991059", "text": "public function apiPagseguro() {\n $this->General = new extend\\General();\n\n //Instancia a classe de configurações\n $this->Config = new objects\\Configuracoes();\n\n //Obtem o valor do cep\n $usuario = $this->input->post( 'usuario_api' );\n $token = $this->input->post( 'token_api' );\n\n //Seta o valor na classe\n $this->Config->valor = $usuario;\n\n //Seta o ID da configuração\n $this->Config->idConfig = 5;\n\n //Grava a configuração\n $this->Config->gravarConfiguracao();\n\n $this->Config->valor = $token;\n\n //Seta o ID da configuração\n $this->Config->idConfig = 6;\n\n //Grava a configuração\n $this->Config->gravarConfiguracao();\n\n //Envia a mensagem para o usuário\n $this->Essentials->setMessage( 'Gravado com sucesso', 100 );\n\n }", "title": "" }, { "docid": "1a855d77a3b198bd58e0c666168f8271", "score": "0.59580106", "text": "function ferPeticio($cat, $novetats, $valorats, $buscador, $idLector, $idLlibre){\n $db=Database::conectar();\n $peticioMetode = $_SERVER[\"REQUEST_METHOD\"];\n $controller = new LlibreControllerApi($db, $peticioMetode, $cat, $novetats, $valorats, $buscador, $idLector, $idLlibre);\n $controller->processRequest();\n}", "title": "" }, { "docid": "de6d5a9a34693817d76d53de57eb7545", "score": "0.59040356", "text": "static public function ctrAltaCasoSeguimiento()\n {\n if(isset($_POST[\"rfc-cliente\"]) && isset($_POST[\"nombreRS-cliente\"]) )\n {\n $tabla = \"tbl_clientes_inbursa\";\n\n $datos = array(\n\n \"tci_cod_caso\" => $_POST[\"codCaso\"],\n \"tci_rfc\" => $_POST[\"rfc-cliente\"],\n \"tci_nombre_razon_social\" => $_POST[\"nombreRS-cliente\"],\n \"tci_id_persona\" => $_POST[\"id-cliente\"],\n \"tci_numero_cuenta\" => $_POST[\"numeroCuenta-cliente\"],\n \"tci_situacion_actual\" => $_POST[\"situacion-cliente\"],\n \"tci_seguimiento\" => $_POST[\"seguimiento-cliente\"],\n \"tci_observaciones\" => $_POST[\"observaciones-cliente\"]\n );\n\n $respuesta = ModeloSigai::mdlAltaCasoSeguimiento($tabla,$datos);\n\n return $respuesta;\n }\n\n }", "title": "" }, { "docid": "18a226e34ada98162812e200ba7742e2", "score": "0.58604634", "text": "function obtnerUosEpsDetalleObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_OBEPUO_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b5fb202dd44cd7af9fea870a457acbe7", "score": "0.58438915", "text": "function recuperarDetalleCotizacion(){\r\n\t\t\t\t$this->procedimiento='mat.ft_cotizacion_ime';\r\n\t\t\t\t$this->transaccion='MAT_REC_DET_SOL';\r\n\t\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n\t\t\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "c19a8fb31cc9edebb8fb73c2d59c3c67", "score": "0.58249956", "text": "function recuperarDatosFiltro()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_GETFILOP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "4a66945c31e66ff379d7af1312101a73", "score": "0.5823086", "text": "function listarContactos(){\r\n $this->procedimiento='mat.ft_cotizacion_sel';\r\n $this->transaccion='MAT_CONT_PROVE_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t\t\t$this->captura('id_proveedor_contacto','int4');\r\n $this->captura('id_proveedor_contacto_alkym','int4');\r\n $this->captura('nombre_contacto','varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "d3b9cbc0440712909d53331beea437e5", "score": "0.58130354", "text": "private function TccGrabarDespacho( $Destinatario, $Direccion, $Telefono, $Ciudad, $Observaciones, $ReclamaBodega,\n $KilosReales, $PesoVolumen,$VrMcia, $Boomerang, $FechaDespacho, $TipoDocumento,\n $NumeroDocumento, $FechaDocumento, $CodBarra ){\n // Pruebas\n //$url = 'http://clientes.tcc.com.co/preservicios/wsdespachos.asmx?wsdl';\n \n \n\n $url = TCC_SOAP_ENDPOINT;\n\n $DocumentoReferencia = array(\n array('tipodocumento' => $TipoDocumento,\n 'numerodocumento' => $NumeroDocumento,\n 'fechadocumento' => $FechaDocumento\n )\n );\n\n //Se configuran las unidades de la remesa para este ejemplo se envian dos unidades\n if ( $Boomerang == 0) {\n $unidad = array(\n array('tipounidad' => 'TIPO_UND_PAQ',\n 'claseempaque' => '',\n 'dicecontener' => $Observaciones,\n 'cantidadunidades' => '1',\n 'kilosreales' => $KilosReales,\n 'pesovolumen' => $PesoVolumen,\n 'valormercancia' => $VrMcia,\n 'codigobarras' => $CodBarra\n )\n );\n }else{\n $unidad = array(\n array('tipounidad' => 'TIPO_UND_DOCB',\n 'claseempaque' => 'CLEM_SOBRE',\n 'dicecontener' => $Observaciones,\n 'cantidadunidades' => '1',\n 'kilosreales' => '0',\n 'pesovolumen' => '0',\n 'valormercancia' => '0',\n 'codigobarras' => $CodBarra\n )\n );\n }\n \n $objDespacho = array(\n 'objDespacho' => array(\n 'clave' => TCC_SOAP_PASSWORD,\n 'fechahoralote' => '',\n 'numeroremesa' => '',\n 'numeroDepacho' => '',\n 'unidadnegocio' => '1',\n 'fechadespacho' => $FechaDespacho,\n 'cuentaremitente' => TCC_SOAP_CUENTA,\n 'sederemitente' => '',\n 'primernombreremitente' => '',\n 'segundonombreremitente' => '',\n 'primerapellidoremitente' => '',\n 'segundoapellidoremitente' => '',\n 'razonsocialremitente' => 'CRIPACK S.A.S.',\n 'naturalezaremitente' => 'J',\n 'tipoidentificacionremitente' => 'NIT',\n 'identificacionremitente' => '800149062',\n 'telefonoremitente' => '8298217',\n 'direccionremitente' => 'CARRERA 6 # 21 - 44 ',\n 'ciudadorigen' => '76001000',\n 'tipoidentificaciondestinatario' => '',\n 'identificaciondestinatario' => '',\n 'sededestinatario' => '',\n 'primernombredestinatario' => '',\n 'segundonombredestinatario' => '',\n 'primerapellidodestinatario' => '',\n 'segundoapellidodestinatario' => '',\n 'razonsocialdestinatario' => $Destinatario,\n 'naturalezadestinatario' => 'N',\n 'direcciondestinatario' => $Direccion,\n 'telefonodestinatario' => $Telefono,\n 'ciudaddestinatario' => $Ciudad,\n 'barriodestinatario' => '',\n 'totalpeso' => '',\n 'totalpesovolumen' => '',\n 'formapago' => '',\n 'observaciones' => $Observaciones,\n 'llevabodega' => '',\n 'recogebodega' => $ReclamaBodega,\n 'centrocostos' => '',\n 'totalvalorproducto' => '',\n 'unidad' => $unidad,\n 'documentoreferencia' => $DocumentoReferencia,\n 'generarDocumentos' => true\n ),'respuesta' => 0,\n 'remesa' => '',\n 'URLRelacionEnvio' => '',\n 'URLRotulos' => '',\n 'URLRemesa' => '',\n 'IMGRelacionEnvio' => null,\n 'IMGRotulos' => null,\n 'IMGRemesa' => null,\n 'respuesta' => 0,\n 'mensaje' => ''\n );\n \n\n\n $client = new SoapClient($url);\n $remesa = new \\StdClass;\n $remesa->remesa = '';\n $URLRelacionEnvio = new \\StdClass;\n $URLRelacionEnvio->URLRelacionEnvio ='';\n $URLRotulos = new \\StdClass;\n $URLRotulos->URLRotulos ='';\n $URLRemesa = new \\StdClass;\n $URLRemesa->URLRemesa ='';\n $IMGRelacionEnvio = new \\StdClass;\n $IMGRelacionEnvio->IMGRelacionEnvio = null;\n $IMGRotulos = new \\StdClass;\n $IMGRotulos->IMGRotulos =null;\n $IMGRemesa = new \\StdClass;\n $IMGRemesa->IMGRemesa =null;\n $respuesta = new \\StdClass;\n $respuesta->respuesta = 0;\n $mensaje = new \\StdClass;\n $mensaje->mensaje = '';\n \n\n try {\n\n //Despues de realizar la configuración del xml a enviar, se realiza el consumo del servicio web\n $resp = $client->GrabarDespacho4($objDespacho, $remesa,$URLRelacionEnvio,$URLRotulos,$URLRemesa,$IMGRelacionEnvio,$IMGRotulos,$IMGRemesa,$respuesta,$mensaje);\n \n //Aqui se hace el manejo de la excepción del consumo\n echo $client->__getLastRequest() .\"\\n\";\n\n }catch(Exception $e){\n echo 'Excepción capturada: ', $e->getMessage() , '<br>';\n }\n\n\n $NumeroRemesa = intval($resp->remesa);\n if ( $NumeroRemesa > 0 ) {\n $this->RespuestaTcc = substr( $resp->mensaje,0,45);\n //Se realiza la decodificación del string enviado por el servicio a base64 para su posterior grabación o descarga en un archivo binario.\n // $decoded = base64_decode($resp->IMGRelacionEnvio);\n //Se asigna el nombre del archivo\n // $file = \"$resp->remesa\".'.pdf';\n //Se realiza la descarga del archivo.\n // file_put_contents($file, $resp->IMGRelacionEnvio);\n //echo($file);\n return $NumeroRemesa;\n } else {\n var_dump($resp->mensaje);\n echo '<br>';\n return -1;\n }\n\n /* $arrayDe100Valores = array( array());\n for($i = 0; $i < 10; $i++) {\n $arrayDe100Valores[$i]['tipounidad'] = $i;\n $arrayDe100Valores[$i]['claseempaque'] = '525000';\n\n }\n\n\n Debug::Mostrar($unidad);\n Debug::Mostrar($arrayDe100Valores);\n\n return ;\n //Se configura la informacion de la remesa, IMPORTARTE ACLARAR QUE LA VARIABLE \"Clave\",\n //es la asignada por TCC para cada cliente, por tal motivo en el ejemplo se envia como XXXXXXXXXXXX la cual NO funcionará hasta tanto NO sea reemplazada.\n*/\n //var_dump($resp->URLRelacionEnvio);\n //var_dump($resp->URLRotulos);\n // var_dump($resp->respuesta);\n //echo '<br>';\n // var_dump($resp->mensaje);\n // echo '<br>';\n //var_dump($resp);\n\n }", "title": "" }, { "docid": "618fec855c3a40ce665f3a81ca59024b", "score": "0.5801897", "text": "private function get_api_psa_conn_car($param, $fields = null)\n {\n $session = curl_init();\n curl_setopt($session, CURLOPT_URL, $this->url_api_psa_conn_car.$param);\n curl_setopt($session, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Authorization: Bearer ' . $this->access_token[\"access_token2\"]));\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n if (isset($fields)) {\n curl_setopt($session, CURLOPT_POSTFIELDS, $fields);\n }\n $json = curl_exec($session);\n // Vérifie si une erreur survient\n if(curl_errno($session)) {\n $info = [];\n echo 'Erreur Curl : ' . curl_error($session);\n }\n else {\n $info = curl_getinfo($session);\n }\n curl_close($session);\n $ret_array[\"info\"] = $info;\n $ret_array[\"result\"] = json_decode($json);\n return $ret_array;\n }", "title": "" }, { "docid": "d259f16493c2010f2c88e7e5379ebc86", "score": "0.57956374", "text": "public function puxaCentrosCustoLucro(){ \n \n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/centros_custo_lucro?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->centros_custo_lucro = json_decode($result, true);\n\n curl_close($ch);\n }", "title": "" }, { "docid": "c55c66cbd73cd49d9be285e97c8d3588", "score": "0.5784577", "text": "function obtenerModalidad(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='adq.f_solicitud_ime';\n $this->transaccion='ADQ_RECUMOD_GET';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud','id_solicitud','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //echo $this->consulta;exit;\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "aa16a23c0d33ae302d65d52b14aa5437", "score": "0.5755566", "text": "function NuevoPresupuestoCLI($campos, $filtros, $items_std)\n\t\t{\n\t\t$this->con_sql = $this->GetConex();\n\t\t$this->LimpiarClase();\n\t\t\n\t\t$this->encabezado[NUM_OT] = 0;\n\t\t$this->encabezado[NUM_PRES] = 0;\t\t\n\t\t$this->encabezado[NUM_STD] = $campos[NUM_STD];\n\t\t$this->encabezado[NUM_MOTOR] = $this->GetNroMotor($this->encabezado[NUM_STD]);\n\t\t$this->encabezado[DESC_PRES] = $campos[DESC_PRES];\n\t\t$this->encabezado[CLIENTE] = $campos[CLIENTE];\n\t\t$this->encabezado[DIRECCION] = $campos[DIRECCION];\n\t\t$this->encabezado[TELEFONO] = $campos[TELEFONO];\n\t\t$this->encabezado[LOCALIDAD] = $campos[LOCALIDAD];\n\t\t$this->encabezado[DESC_MOTOR] = BuscarDescripcionMotor($this->con_sql, $this->encabezado[NUM_MOTOR]);\n\t\t$this->encabezado[DESCUENTO] = $campos[DESCUENTO];\n\t\t$this->encabezado[LISTA_MOB]=BuscarNroLista($this->con_sql, $this->encabezado[NUM_MOTOR]);\n\n\t\t$this->campos_enc=ENC_CLI;\n\t\t$this->tipo=CLI;\n\t\t$this->filtros=$filtros;\n\t\t$this->items_std=$items_std;\n\t\t$this->ArmarMOB(CLI, $this->nro, EDIT);\n\t\t$this->ArmarMAT(CLI, $this->nro, EDIT);\n\t\t$this->MostrarPresOT(CLI, $this->nro, EDIT, 1);\n\t\t}", "title": "" }, { "docid": "973a8b8c5dde8ff74b84017f735c0012", "score": "0.5754738", "text": "function procesa()\n {\n $this->inicio();\n $arguments = array();\n $arguments = $this->decodeGetData($this->argumentos);\n call_user_func_array(array($this,$this->funcion),$arguments);\n $this->termina();\n }", "title": "" }, { "docid": "ce990ce5fac7751645e342efb14f8989", "score": "0.5747082", "text": "function recuperarComite()\n {\n\n $this->procedimiento = 'adq.f_solicitud_sel';\n $this->transaccion = 'ADQ_RMEMOCOMDCR_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n\n //Definicion de la lista del resultado del query\n\n\n $this->captura('funcionario', 'text');\n $this->captura('proveedor', 'varchar');\n $this->captura('tramite', 'varchar');\n $this->captura('nombres', 'varchar');\n $this->captura('fecha_po', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "1469e284c6a3d4626fb710340a58c704", "score": "0.57444644", "text": "function abrirCerrarPeriodo(){\n\t\t$this->procedimiento='ccb.f_estado_periodo_ime';\n\t\t$this->transaccion='CCB_ABRCERAR_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_estado_periodo','id_estado_periodo','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "62f2839d37e205a352438ad9495a94b8", "score": "0.5715195", "text": "function getConturData($params_arr, $type = '/api3/req')\n{\n $answ_str = '';\n\n if(!is_array($params_arr) || count($params_arr) == 0)\n {\n $answ_str = 'error';\n }\n else\n {\n $options = array(\n CURLOPT_RETURNTRANSFER => true, // return web page\n CURLOPT_HEADER => false, // don't return headers\n CURLOPT_FOLLOWLOCATION => true, // follow redirects\n CURLOPT_ENCODING => \"\", // handle all encodings\n CURLOPT_AUTOREFERER => true, // set referer on redirect\n CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect\n CURLOPT_TIMEOUT => 120, // timeout on response\n CURLOPT_MAXREDIRS => 10, // stop after 10 redirects\n CURLOPT_SSL_VERIFYPEER => false // Disabled SSL Cert checks\n );\n\n $ch = curl_init('https://focus-api.kontur.ru' . $type . '?key=' . $GLOBALS['conturKey'] . '&pdf=False&' . http_build_query($params_arr));\n curl_setopt_array($ch, $options);\n $answ_str = curl_exec($ch);\n curl_close($ch);\n }\n\n return $answ_str;\n}", "title": "" }, { "docid": "6450c9589a4d14b3a549e0c4a2989aa2", "score": "0.57064664", "text": "private function getApi()\n\t{\n\t\t$this->getApiKeyWEB();\n\t\t//$this->getApiKeySEP();\n\t\t$respu = null;\n\t\t$respuesta = null;\n\t\tfor ($i = 0; $i < count($this->controllers); $i++)\n\t\t{\n\t\t\tswitch($this->controllers[$i]['tipo'])\n\t\t\t{\n\t\t\t\tcase 'GET':\n\t\t\t\tcase 'get':\n\t\t\t\t{\n\t\t\t\t\t$respu = $this->getApiGet($this->controllers[$i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'POST':\n\t\t\t\tcase 'post':\n\t\t\t\t{\n\t\t\t\t\t$respu = $this->getApiPost($this->controllers[$i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*\n\t\t\tif ($respu['success'] && !isset($respu['curlError']))\n\t\t\t{\n\t\t\t*/\n\t\t\t\t$this->dataPropagationControl(array(\n\t\t\t\t\t'controller'=>$this->controllers[$i],\n\t\t\t\t\t'response'=>$respu\n\t\t\t\t));\n\t\t\t\tif (isset($this->controllers[$i]['noSeLlama']) ? $this->controllers[$i]['noSeLlama'] : false)\n\t\t\t\t{\n\t\t\t\t\t$respuesta[\"{$this->controllers[$i]['nombre']}->{$this->controllers[$i]['metodo']}\"] = $respu;\n\t\t\t\t}\n\t\t\t/*\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->status = false;\n\t\t\t\t$respuesta = $respu;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\treturn $respuesta;\n\t}", "title": "" }, { "docid": "d3556c40610f8568796f40da2e40ded0", "score": "0.5693608", "text": "public function venta_rapida(){\n\t\t$parametros = json_decode($_POST['parametros']);\n\n\t\t$id_servicio = $parametros->idServicio;\n\t\t$pago = $parametros->pago;\n\t\t$id_sucursal = $parametros->idSucursal;\n\t\t$id_vendedor = $parametros->idVendedor;\n\n\t\tif($id_servicio == 'otro'){\n\t\t\t// agregamos la info del catalogo_servicio_rapido\n\t\t\t$datos_servicio = array(\n\t\t\t\t'nombre' => $parametros->nuevoServicio,\n\t\t\t\t'fecha_registro' => time()\n\t\t\t);\n\t\t\t$this->add_model->agregar($datos_servicio, 'catalogo_servicio_rapido');\n\t\t\t$id_servicio = $this->db->insert_id();\n\t\t}\n\n\t\t// agregamos la info del servicio rapido\n\t\t$data_info_servicio_rapido = array(\n\t\t\t'fk_id_catalogo_servicio_rapido' => $id_servicio,\n\t\t\t'monto' => $pago,\n\t\t\t'id_usuario' => $id_vendedor,\n\t\t\t'fk_id_sucursal' => $id_sucursal,\n\t\t\t'fecha_registro' => time()\n \t\t);\n\t\t$this->add_model->agregar($data_info_servicio_rapido, 'servicio_rapido');\n\t}", "title": "" }, { "docid": "4f4bd6374ca4158105a25ad3e1f828ff", "score": "0.5678532", "text": "public function proximocodigoAction() {\n\n // Desabilita a view. Estes comandos são utilizados sempre que a resposta for JSON\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout();\n\n try {\n\n // Busca o proximo codigo de cadastro e o atribui no formulario\n $this->_dataModule->camposForm['codigo'] = $this->_dataModule->qryBuscaProximoCodigo();\n\n // Recupera as permissoes dos botoes\n $this->_dataModule->atribuiPermissoesBotoes(FORM_ADD);\n\n // Adiciona a resposta de preenchimento de formulario\n JSONMessage::getInstance()->add(JSONMessageFactory::factoryForm($this->_dataModule->camposForm, 'descricao'));\n\n } catch(DSINWebAppsException $dwaex) {\n \n // Adiciona mensagem de excecao\n JSONMessage::getInstance()->add(JSONMessageFactory::factoryException($dwaex->getMessage()));\n\n }\n\n echo JSONMessage::getInstance();\n exit;\n\n }", "title": "" }, { "docid": "a237ed27493e91f4aec0f2a0d35a5f8f", "score": "0.56756836", "text": "function ejecutarAplicacionExterna($datos, $codigo, $metodo) {\n try {\n $this->conectar();\n $consultasDAO = new ConsultasDAO();\n $consultasDAO->setConexion($this->conexion);\n $aplicacion = $consultasDAO->getAplicacionExterna($codigo);\n if (is_null($aplicacion)) {\n return false;\n }\n $headers = null;\n if ($aplicacion->esAutenticable == 'SI') {\n $respuesta = $this->getAutenticar($aplicacion);\n if (is_null($respuesta)) {\n return false;\n }\n if (!is_null($aplicacion->tramaHederToken)) {\n $headers = $this->getHeaderAutenticar($aplicacion, $respuesta->data->token);\n }\n }\n if ($aplicacion->esRegistrable == 'SI') {\n $respuesta = $this->registrar($aplicacion, $headers, $datos);\n if (!$this->validarRespuesta($aplicacion, $respuesta)) {\n return false;\n }\n }\n\n $mailBO = new MailBO();\n $mailBO->setConexion($this->conexion);\n $data = $mailBO->getTramaJSON($datos->cod_trama, $datos);\n $ch = curl_init($aplicacion->api . \"/$metodo\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //establecemos el verbo http que queremos utilizar para la petición\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\n if (!is_null($headers))\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n //enviamos el array data\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n //obtenemos la respuesta\n $response = curl_exec($ch);\n // Se cierra el recurso CURL y se liberan los recursos del sistema\n curl_close($ch);\n if (!$response) {\n return false;\n } else {\n return $this->validarRespuesta($aplicacion, json_decode($response));\n }\n } catch (Exception $ex) {\n return false;\n } finally {\n $this->cerrarConexion();\n }\n }", "title": "" }, { "docid": "3306c9d199ba6218d5e4e3b288d8f521", "score": "0.5627823", "text": "function corredores(){\r\n\t$ck = arrumaCookie(cookieSecao());\r\n\treturn json_decode(do_get_request(urlSp.urlCorredor,$ck),true);\r\n}", "title": "" }, { "docid": "f07dcadb06b288c3ba2b8d37d3e15132", "score": "0.56275564", "text": "function gestionarWF(){\n $this->procedimiento='ven.ft_pedido_det_ime';\n $this->transaccion='VEN_DETPED_WF';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_pedido_det','id_pedido_det','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('operacion','operacion','varchar');\n $this->setParametro('id_funcionario','id_funcionario','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('obs','obs','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "a431781526333d386080ca7a5c632ce7", "score": "0.5625936", "text": "function getBasements(){\n\t\t$ch = curl_init();\n\t\t$dati = array();\n\t\t// imposto la URl del web-service remoto\n\t\tcurl_setopt($ch, CURLOPT_URL, 'localhost/server/api/basement/read.php');\n\t\t\n\t\t// Chiamo l'API tramite PUT\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\t\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\n\t\t// imposto gli header correttamente\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t 'Content-Type: application/json')\n\t\t);\n\n\t\t// eseguo la chiamata\n\t\t$response = json_decode(curl_exec($ch), true);\n\t\t\n\t\t// chiudo\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "dc71dabc56ae4af06d8b38fa4b22f1fe", "score": "0.5619985", "text": "public function contaLancamentosConta(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"conta_id=39820&data_inicio=\".$this->p_dia.\"&data_fim=\".$this->h_dia.\"&tipo_view=count\");\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->n_lancamentos_conta = json_decode($result, true);\n\n curl_close($ch);\n }", "title": "" }, { "docid": "f027f13af23e2ce7ae40104461ef452f", "score": "0.5619718", "text": "function extenderOp()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_EXTOP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('id_administrador', 'id_administrador', 'int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "74456da17d4d314b4a856677b4db050a", "score": "0.56115645", "text": "function siguienteEstadoObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_SIGESTOB_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('id_depto_lb', 'id_depto_lb', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n $this->setParametro('instruc_rpc', 'instruc_rpc', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "8016ea811716697ceca31c5434cb30d9", "score": "0.56111866", "text": "public function index(){\n $client = new SoapClient(\"http://test.analitica.com.co/AZDigital_Pruebas/WebServices/ServiciosAZDigital.wsdl\",$this->options);\n $client->__setLocation('http://test.analitica.com.co/AZDigital_Pruebas/WebServices/SOAP/index.php');\n \n// parametros de la consulta\n $params = [\n 'Condiciones' => \n [\n 'Condicion' => [\n 'Tipo' => 'FechaInicial',\n 'Expresion' => '2019-07-01 00:00:00',\n ]\n ]\n ];\n \n \n try { // funcion del soap para la consulta ( segun la prueba enviada )\n $response = $client->__soapCall('BuscarArchivo', array($params));\n\n //krumo($response->Archivo);\n\n // funcion que agrega los datos a la tabla de Archivos ( si sale ok en pantalla ya fue lleno las tablas SQL )\n if ($this->b2btic_model->addAll($response->Archivo)) {\n echo \"ok\";\n }\n\n else {\n echo \"Error\";\n }\n }\n catch(Exception $e) {\n print_r($e);\n echo \"Exception: \" . $e->getMessage();\n }\n \n \n \n}", "title": "" }, { "docid": "3d2b112c4780d0d4e65b6c3807d52008", "score": "0.5601828", "text": "public static function getWSClearView()\n {\n $procesado =2;\n $id=Input::get('id', '');//id de la tarea\n $sql =\"UPDATE tareas SET procesado=? WHERE id=?\";\n try {\n DB::update($sql, array($procesado,$id));\n } catch (Exception $e) {\n \n }\n $result = array();\n $msj=\"\";\n $telefono=Input::get('telefono', '');\n //$idConsulta=Input::get('idConsulta', '');\n $idConsulta = date('YmdHis'); // Debe enviar una fecha en este formato\n \n $url = \"http://10.226.88.214/WSASSIA/wsASSIA.php/RegistrarDiagnostico/\"\n .$telefono.\"/\".$idConsulta;\n try {\n $ch = curl_init();\n if (FALSE === $ch)\n throw new Exception('failed to initialize');\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, false);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n if( $result === false)\n $msj= 'no se pudo establecer conexion ' . curl_error($ch);\n \n $result = json_decode($result);\n curl_close($ch);\n } catch (Exception $e) {\n trigger_error(\n sprintf(\n 'Curl failed with error #%d: %s',\n $e->getCode(),\n $e->getMessage()\n ),\n E_USER_ERROR\n );\n }\n //$result = json_decode('[{\"id\":16,\"Desc\":\"No se obtiene respuesta. \n //Revisar linea o modem\",\"Tel\":\"12421836\",\"Ok\":0}]');\n \n if (count($result)>0) {\n $id = $result[0]->id;\n $Desc = $result[0]->Desc;\n $Tel = $result[0]->Tel;\n $Ok = $result[0]->Ok;\n if ($Ok==1) {\n $msj = $Tel.\": Linea OK\";\n } elseif ($Ok==0) {\n $msj = $Tel.\": No OK\";\n }\n $procesado=1;\n\n try {\n DB::update($sql, array($procesado,$id));\n } catch (Exception $e) {\n \n }\n }\n \n return\n array(\n 'rst'=>'1',\n 'datos'=> $msj,\n 'msj'=>$msj,\n );\n }", "title": "" }, { "docid": "fc6f75293513b8395954324831959fad", "score": "0.5600897", "text": "function obtenerIdsExternos()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_IDSEXT_GET';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('sistema', 'sistema', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "f7498efafa1effda34b211bdca0abe0c", "score": "0.5576825", "text": "static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdPedido\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición de Pedido Laboratorio',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdPedido\"]);\r\n\r\n\t\t$respuesta = ModeloLaboratorio::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a7d57e72b0e01622fbf4bdc52691e0ae", "score": "0.5566543", "text": "function API_semanas($usuario,$anio){\n\t$ClsPro = new ClsProgramacionPPM();\n\t$ClsAct = new ClsActivo();\n\t$ClsUsu = new ClsUsuario();\n\tif($usuario != \"\" && $anio != \"\"){\n\t\t$result = $ClsUsu->get_usuario_sede(\"\",$usuario,\"\");\n\t\tif(is_array($result)){\n\t\t\t$sedes = \"\";\n\t\t\tforeach($result as $row){\n\t\t\t\t$sedes.= trim($row[\"sus_sede\"]).\",\";\n\t\t\t}\n\t\t\t$sedes = substr($sedes,0,-1);\n\t\t}\n\t\t$semana_actual = date(\"W\");\n\t\t$semana_actual = ($semana_actual == 0)?7:$semana_actual;\n\t\t$i = 0;\n\t\t$arr_data = array();\n\t\tfor($semana = 1; $semana <= 52; $semana++){\n\t\t\tif($semana < $semana_actual){\n\t\t\t\t$semana = (strlen($semana) <= 1)?\"0$semana\":$semana;\n\t\t\t\t$desde = date(\"d/m/Y\", strtotime($anio.\"-W\".$semana.'-1'));\n\t\t\t\t$hasta = date(\"d/m/Y\", strtotime($anio.\"-W\".$semana.'-7'));\n\t\t\t\t$rango_fechas = \"$desde - $hasta\";\n\t\t\t\t\n\t\t\t\t$result = $ClsPro->get_programacion($codigo,$activo,$usuario,$categoria,$sedes, '', '', $desde, $hasta);\n\t\t\t\t$normal = 0;\n\t\t\t\t$vencido = 0;\n\t\t\t\tif(is_array($result)){\n\t\t\t\t\tforeach ($result as $row){\n\t\t\t\t\t\t//conteo de dias\n\t\t\t\t\t\t$programado = trim($row[\"pro_fecha\"]).\" 23:59:59\";\n\t\t\t\t\t\t$fecha_update = trim($row[\"pro_fecha_update\"]);\n\t\t\t\t\t\t$vencimiento = comparaFechas($programado, $fecha_update);\n\t\t\t\t\t\t$situacion = $row[\"pro_situacion\"];\n\t\t\t\t\t\tif($vencimiento == 2){ // vencido\n\t\t\t\t\t\t\t$vencido++;\n\t\t\t\t\t\t}else{ // normal\n\t\t\t\t\t\t\t$normal++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($vencido > 0){\n\t\t\t\t\t$estado = 2;\n\t\t\t\t}else{\n\t\t\t\t\t$estado = 1;\n\t\t\t\t}\n\t\t\t}else if($semana == $semana_actual){\n\t\t\t\t$estado = 3;\n\t\t\t}else{\n\t\t\t\t$estado = 4;\n\t\t\t}\n\t\t\t$arr_data[$i]['semana'] = intval($semana);\n\t\t\t$arr_data[$i]['rango_fechas'] = $rango_fechas;\n\t\t\t$arr_data[$i]['estado'] = intval($estado);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$payload = array(\n\t\t\t\"status\" => true,\n\t\t\t\"data\" => $arr_data,\n\t\t\t\"message\" => \"\");\n\n\t\techo json_encode($payload);\n\t\t\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$payload = array(\n\t\t\t\"status\" => false,\n\t\t\t\"data\" => [],\n\t\t\t\"message\" => \"Uno de los campos esta vacio...\");\n\t\t\techo json_encode($payload);\n\t}\n}", "title": "" }, { "docid": "49798c3aa3ce5cb9a410ac08d0626738", "score": "0.55656993", "text": "public function testapicarga(){\n $res=\n $this->call('POST', 'api/Sigex/Inspecciones/', array(\n \"id\"=> 207,\n \"nroControl\"=> 51,\n \"fechaProgramacion\"=> \"2020-06-15\",\n \"fechaRealizado\"=> \"2020-06-15\",\n \"observaciones\"=> \"\",\n \"estado\"=> 1,\n \"tipo\"=> 1,\n \"contrato\"=>array( \n \"nroContrato\"=> \"CO010\",\n \"fechaCarga\"=> \"2019-06-24\",\n \"periodo\"=> 7,\n \"estado\"=> 1,\n \"fechaInicio\"=> \"2019-06-24\",\n \"fechaFin\"=> \"2020-08-30\",\n \"observaciones\"=> \"\",\n \"cod_Cliente\"=> 195,\n \"idSucursal\"=> 354,\n \"id\"=> 11,\n \"sucursales\"=>array(\n \"idSucursal\"=> 354,\n \"nombre\"=> \"Aeroparque\",\n \"sectores\"=>array(\n \"idSector\"=> 160,\n \"numero\"=> \"001\",\n \"sector\"=> \"General\",\n \"cod_Cliente\"=> 195,\n \"idSucursal\"=> 534,\n \"estadoSubida\"=> 1,\n \"habilitado\"=> 1,\n \"puestos\"=>array(\n \"idPuesto\"=> 4270,\n \"nroPuesto\"=> \"001\",\n \"ubicacion\"=> \"Escalera\",\n \"habilitado\"=> 1,\n \"idCapacidad\"=> 1,\n \"idSector\"=> 160,\n \"tipoDeEquipo\"=>array(\n \"tipoDeEquipo\"=> \"ABC-PQS\",\n \"tipogenerico\"=>array(\n \"tipo\"=> \"Polvo\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 1\n )\n ),\n \"equipo\"=> array(\n \"elemento_id\"=> 18715,\n \"numeroDeEquipo\"=> \"11897\",\n \"FechaFabricacion\"=> \"04\\\\/98\",\n \"fechaUltimaPH\"=> \"06\\\\/12\",\n \"vencimientoDeCarga\"=> \"2016-09-16\",\n \"vencimientoDePH\"=> \"2017-06-01\",\n \"codigoInternoCliente\"=> \"3\",\n \"observaciones\"=> \"\",\n \"disponible\"=> true,\n \"vencimientoVidaUtil\"=> \"2018-04-01\",\n \"tipo\"=>array (\n \"tipoDeEquipo\"=> \"HCFC 123\",\n \"tipogenerico\"=>array(\n \"tipo\"=> \"Halogenado\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 5\n )\n ),\n \"idCapacidad\"=> 1,\n \"marca\"=>array (\n \"id\"=> 10,\n \"Marca\"=> \"DRAGON\",\n \"marcaMOST\"=> \"Otros\"\n ),\n \"codCliente\"=> 290,\n \"sucursal\"=>array(\n \"idSucursal\"=> 629,\n \"nombre\"=> \"22 DE SEPTIEMBRE S.A. - Casa Central\",\n \"sectores\"=>array()\n ),\n \"idEquipo\"=> 4\n \n )\n\n ),\n ),\n ),\n ),\n \"inspecciones\"=> array(\n \"fechahora\"=> \"08/12/2019 01=>00=>00\",\n \"observaciones\"=> \"\",\n \"estado\"=> 1,\n \"idControlPeriodico\"=> 207,\n \"puesto\"=> array(\n \"idPuesto\"=> 4270,\n \"nroPuesto\"=> \"001\",\n \"ubicacion\"=> \"Escalera\",\n \"habilitado\"=> 1,\n \"idCapacidad\"=> 1,\n \"idSector\"=> 160,\n \"tipoDeEquipo\"=> array(\n \"tipoDeEquipo\"=> \"ABC-PQS\",\n \"tipogenerico\"=> array(\n \"tipo\"=> \"Polvo\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 1\n )\n ),\n \"equipo\"=> array(\n \"elemento_id\"=> 18715,\n \"numeroDeEquipo\"=> \"11897\",\n \"FechaFabricacion\"=> \"04\\\\/98\",\n \"fechaUltimaPH\"=> \"06\\\\/12\",\n \"vencimientoDeCarga\"=> \"2016-09-16\",\n \"vencimientoDePH\"=> \"2017-06-01\",\n \"codigoInternoCliente\"=> \"3\",\n \"observaciones\"=> \"\",\n \"disponible\"=> true,\n \"vencimientoVidaUtil\"=> \"2018-04-01\",\n \"tipo\"=> array(\n \"tipoDeEquipo\"=> \"HCFC 123\",\n \"tipogenerico\"=> array(\n \"tipo\"=> \"Halogenado\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 5\n )\n ),\n \"idCapacidad\"=> 1,\n \"marca\"=> array(\n \"id\"=> 10,\n \"Marca\"=> \"DRAGON\",\n \"marcaMOST\"=> \"Otros\"\n ),\n \"codCliente\"=> 290,\n \"sucursal\"=> array(\n \"idSucursal\"=> 629,\n \"nombre\"=> \"22 DE SEPTIEMBRE S.A. - Casa Central\",\n \"sectores\"=> array()\n ),\n \"idEquipo\"=> 4\n )\n ),\n \"equipo\"=> array(\n \"elemento_id\"=> 18715,\n \"numeroDeEquipo\"=> \"11897\",\n \"FechaFabricacion\"=> \"04\\\\/98\",\n \"fechaUltimaPH\"=> \"06\\\\/12\",\n \"vencimientoDeCarga\"=> \"2016-09-16\",\n \"vencimientoDePH\"=> \"2017-06-01\",\n \"codigoInternoCliente\"=> \"3\",\n \"observaciones\"=> \"\",\n \"disponible\"=> true,\n \"vencimientoVidaUtil\"=> \"2018-04-01\",\n \"tipo\"=> array(\n \"tipoDeEquipo\"=> \"HCFC 123\",\n \"tipogenerico\"=> array(\n \"tipo\"=> \"Halogenado\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 5\n )\n ),\n \"idCapacidad\"=> 1,\n \"marca\"=> array(\n \"id\"=> 10,\n \"Marca\"=> \"DRAGON\",\n \"marcaMOST\"=> \"Otros\"\n ),\n \"codCliente\"=> 290,\n \"sucursal\"=> array(\n \"idSucursal\"=> 629,\n \"nombre\"=> \"22 DE SEPTIEMBRE S.A. - Casa Central\",\n \"sectores\"=> array()\n ),\n \"idEquipo\"=> 4\n ),\n \"id\"=> 13333,\n \"fotos\"=> array()\n )\n\n ));\n dd($res);\n }", "title": "" }, { "docid": "9cb719e08bc053a4515cfdf027716837", "score": "0.55443585", "text": "function runAutomaticApi()\n {\n try {\n $this->auth();\n $db = new Db();\n $method = Input::getMethod();\n $segments = Uri::getSegments();\n $endPoint = BASE_URL.\"/api/v1/z2/x21/:miembro_id/\";\n $endPoint = BASE_URL.\"/api/v1/\";\n\n // Get the route\n // The parameters are fields\n // Count the route segments\n // Reduce the uri segments\n // Get the table name\n // Get the parameters\n\n array_shift($segments);\n array_shift($segments);\n $tableName = $segments[0];\n array_shift($segments);\n $segmentCount = count($segments);\n\n switch( $method ) {\n case \"GET\":\n if ( $segmentCount === 0 ) {\n $results = $db->get($tableName);\n return $this->setResponse();\n } // end if segment count === 0\n\n // Here we construct the query\n // we need the primary key for the table\n // and the segments to match\n $primaryKeys = $db->getPrimaryKeys( $tableName );\n\n if (count($primaryKeys) !== count($segments)) {\n throw new Exception(\"Not all segments corresponding to key in table\");\n } // end if count primaryKeys <> count segments\n\n $where = array();\n foreach($primaryKeys as $i => $key) {\n $where[$key] = $segments[$i];\n } // end foreach primary key\n\n // Get the result\n $results = $db->from($tableName)->where($where)->get();\n // Set the response\n return $this->setResponse();\n break;\n case \"POST\":\n if ( $segmentCount > 0 ) {\n throw new Exception( \"Post method must not include more url data\" );\n } // end if segmentCount > 0\n\n Logger::debug(\"Input array\");\n Logger::debug(Input::getArray());\n $rows = $db->insert( $tableName, Input::getArray() );\n // Here get id\n\n $keys = $db->getPrimaryKeys( $tableName );\n $keys = implode(\",\", $keys);\n $id = $db->select($keys)->from($tableName)->where(Input::getArray())->first();\n $id = implode(\"/\",$id);\n\n Output::setStatusCode(201);\n Output::setHeader(\"Location\", $endPoint . $tableName . \"/\" .$id );\n return;\n break;\n case \"PUT\":\n\n $input = Input::getArray();\n $primaryKeys = $db->getPrimaryKeys( $tableName );\n\n if (count($primaryKeys) !== count($segments)) {\n throw new Exception(\"Not all segments corresponding to key in table\");\n } // end if count primaryKeys <> count segments\n\n $where = array();\n foreach( $primaryKeys as $i => $key ) {\n $where[$key] = $segments[$i];\n } // end foreach\n\n $exists =\n $db->select(implode(\",\", $where))->\n from($tableName)->\n where($where)->get();\n\n if (!$exists) {\n Output::setStatusCode(404);\n } // end if not exists\n\n $db->update( $tableName, $input, $where );\n\n $keys = implode(\",\", $primaryKeys);\n $id = $db->select($keys)->from($tableName)->where(Input::getArray())->first();\n $id = implode(\"/\",$id);\n Output::setStatusCode(201);\n Output::setHeader(\"Location\", $endPoint . $tableName . \"/\" .$id );\n return;\n break;\n case \"DELETE\":\n if ( $segmentCount === 0 ) {\n throw new Exception( \"Must specify a record id to delete\" );\n } // end if segment count === 0\n\n $primaryKeys = $db->getPrimaryKeys( $tableName );\n\n if (count($primaryKeys) !== count($segments)) {\n throw new Exception(\"Not all segments corresponding to key in table\");\n } // end if count primaryKeys <> count segments\n\n $where = array();\n foreach($primaryKeys as $i => $key) {\n $where[$key] = $segments[$i];\n } // end foreach primary key\n\n $db->delete( $tableName, $where );\n Output::setStatusCode(204);\n return;\n break;\n } // end switch $method\n } catch(Exception $ex) {\n Output::setStatusCode(415);\n $this->jsonResponse(\n array(\n \"error\" => true,\n \"description\" => $ex->getMessage()\n ) // end array\n ); // end jsonResponse\n } // end try catch\n }", "title": "" }, { "docid": "1219cd029b2c28fd0ae97f20f15d84f0", "score": "0.55404466", "text": "function anteriorEstadoObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_ANTEOB_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('operacion', 'operacion', 'varchar');\n $this->setParametro('obs', 'obs', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "eb82b199f9f13f94a32fcec2df8ab4ee", "score": "0.55351216", "text": "function Modificar_Bono_Regular($cod,$dpi,$monto,$moneda,$tcambio,$desc){\n $respuesta = new xajaxResponse();\n $ClsPla = new ClsPlanillaAsignaciones();\n //pasa a mayusculas\n\t\t$desc = trim($desc);\n\t//--------\n\t//decodificaciones de tildes y Ñ's\n\t\t$desc = utf8_encode($desc);\n\t\t//--\n\t\t$desc = utf8_decode($desc);\n\t//-------- \n if($cod !=\"\" && $dpi !=\"\" && $desc !=\"\" && $monto != \"\" && $moneda != \"\" && $tcambio != \"\"){\n\t\t//$respuesta->alert(\"$id\");\n\t\t$sql = $ClsPla->update_base_bonificaciones($cod,$dpi,$monto,$moneda,$tcambio,$desc); /// Inserta\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsPla->exec_sql($sql);\n if($rs == 1){\n $respuesta->script('swal(\"Excelente!\", \"Registros actualizados satisfactoriamente!\", \"success\").then((value)=>{ window.location.reload(); });');\n }else{\n $respuesta->script('swal(\"Error\", \"Error de transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n $respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary';\");\n $respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary hidden';\");\n }\t\n\t}else{\n $respuesta->script('swal(\"Error\", \"Error de transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n $respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary';\");\n $respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary hidden';\");\n\t}\n \t\t\n return $respuesta;\n}", "title": "" }, { "docid": "1ce4a76123cd6af6b7fa528397fc5c7d", "score": "0.5521816", "text": "function sap_grpo_header_cancel($data) {\n $this->m_saprfc->setUserRfc();\n $this->m_saprfc->setPassRfc();\n $this->m_saprfc->sapAttr();\n $this->m_saprfc->connect();\n $this->m_saprfc->functionDiscover(\"ZMM_BAPI_CANCEL_GOODS_MOV\");\n $this->m_saprfc->importParameter(array (\"MATDOCUMENTYEAR\",\n \"MATERIALDOCUMENT\",\n \"OUTLET\",\n \"POSTING_DATE\",\n \"WEB_LOGIN_ID\",\n \"WEB_TRANSID\"),\n array ($data['mat_doc_year'],\n $data['grpo_no'],\n $data['plant'],\n $data['posting_date'],\n $data['id_user_input'],\n $data['web_trans_id'])\n );\n $count = count($data['item']);\n $this->m_saprfc->setInitTable(\"MATDOC_ITEM\");\n for ($i=1;$i<=$count;$i++) {\n $this->m_saprfc->append (\"MATDOC_ITEM\",\n array (\"MATDOC_ITEM\"=>$data['item'][$i])\n );\n }\n $this->m_saprfc->setInitTable(\"I_RETURN\");\n $this->m_saprfc->executeSAP();\n $GOODSMVT_HEADRET = $this->m_saprfc->export(\"GOODSMVT_HEADRET\");\n $I_RETURN = $this->m_saprfc->fetch_rows(\"I_RETURN\");\n $MATDOC_ITEM = $this->m_saprfc->fetch_rows(\"MATDOC_ITEM\");\n $this->m_saprfc->free();\n $this->m_saprfc->close();\n $count = count($I_RETURN);\n $sap_messages = '';\n for($i=1;$i<=$count;$i++) {\n $sap_messages = $sap_messages.' <br> '.$I_RETURN[$i]['MESSAGE'];\n }\n if (empty($GOODSMVT_HEADRET['MAT_DOC'])) {\n $count = count($MATDOC_ITEM);\n $sap_messages = $sap_messages.\n '<br> -------------------------------------- <br> '.\n 'Parameter Input yang dimasukkan : <br> '.\n 'MATDOCUMENTYEAR : '.$data['mat_doc_year'].' <br> '.\n 'MATERIALDOCUMENT : '.$data['grpo_no'].' <br> '.\n 'OUTLET : '.$data['plant'].' <br> '.\n 'POSTING_DATE : '.$data['posting_date'].' <br> '.\n 'WEB_LOGIN_ID : '.$data['id_user_input'].' <br> '.\n 'WEB_TRANSID : '.$data['web_trans_id'].' <br> ';\n for($i=1;$i<=$count;$i++) {\n $sap_messages = $sap_messages.\n '-------------------------------------- <br> '.\n 'MATDOC_ITEM :'.$MATDOC_ITEM[$i]['MATDOC_ITEM'].' <br> ';\n }\n } else {\n $count = count($MATDOC_ITEM);\n for($i=1;$i<=$count;$i++) {\n $this->sap_po_outstanding_update($data['po_no'],$data['item_po'][$i],$data['gr_quantity'][$i],'-');\n }\n }\n\n $cancelled_data = array (\n \"material_document\" => $GOODSMVT_HEADRET['MAT_DOC'],\n \"sap_messages\" => $sap_messages\n );\n\n return $cancelled_data;\n\t}", "title": "" }, { "docid": "e8211bdd3eb9896068e5f358855be364", "score": "0.5520552", "text": "public function testComunas()\n {\n // Parameters for the API call\n $body = TestHelper::getJsonMapper()->mapClass(json_decode(\n '{\\r\\n \"idIntegracion\": 21,\\r\\n \"token\": \"6be7212a-a769-40e4-9c6b-283aa06a3127\",\\r\\n \"idOrigen\": 83\\r\\n}'),\n 'SGIAvenderLib\\\\Models\\\\ComunasRequest'\n );\n\n // Set callback and perform API call\n self::$controller->setHttpCallBack($this->httpResponse);\n try {\n self::$controller->comunas($body);\n } catch (APIException $e) {\n }\n\n // Test response code\n $this->assertEquals(\n 200,\n $this->httpResponse->getResponse()->getStatusCode(),\n \"Status is not 200\"\n );\n }", "title": "" }, { "docid": "88b0dc38299108cd2dfe19f3c95cf47f", "score": "0.5506308", "text": "public function devuelveDatosPiso() {\n $idpiso = $this -> input -> post_get(\"id\");\n\n\t\t$datos[\"inmueble\"] = $this -> pisos_model -> show_piso($idpiso);\n\n\t\t// Cambiamos la cabecera a JSON de respuesta\n header(\"Content-Type: application/json\");\n // Escupimos la respuesta\n echo json_encode($datos);\n\t}", "title": "" }, { "docid": "863ee79a06f29d46d80026fd03ad3f88", "score": "0.5504539", "text": "public function procedimiento10($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,$c11,$c12,$c13,$c14){\n\t\t\t$db = Yii::$app->params['awadb'];\t\t\n\t\t\t$usuario = Yii::$app->params['usuario'];\n\t\t\t$contrasena = Yii::$app->params['password'];\n\t\t\t//establece la conexion con la bese de dato AWA\n\t\t\t$conexion = oci_connect($usuario, $contrasena, $db, 'AL32UTF8');\t\t\t\t\t\t\t\t\t\n\t\t\t//se hace el llamado al procedimietno que trae la informacion de las mesas\n\t\t\t$stid = oci_parse($conexion,\"BEGIN PKG_ACOMER_PROCEDURES.SP_ACOMER_FACTURA_RESTRASADA(:c1,:c2,:c3,:c4,:c5,:c6,:c7,:c8,:c9,:c10,:c11,:c12,:c13,:c14,:c15,:c16,:c17,:c18,:c19,:c20,:c21,:c22,:c23); END;\");\n\t\t\t//inicializa el cursor pasa como parametro\n\t\t\t$c16 = oci_new_cursor($conexion);\n\t\t\t//\n\t\t\toci_bind_by_name($stid, \":c1\", $c1, 10);\n\t\t\toci_bind_by_name($stid, \":c2\", $c2, 8);\t\t\n\t\t\toci_bind_array_by_name($stid, \":c3\", $c3, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c4\", $c4, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c5\", $c5, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c6\", $c6, 100, -1, SQLT_CHR);\n\t\t\toci_bind_by_name($stid, \":c7\", $c7, 11);\n\t\t\toci_bind_by_name($stid, \":c8\", $c8, 10);\n\t\t\toci_bind_by_name($stid, \":c9\", $c9, 11);\n\t\t\toci_bind_by_name($stid, \":c10\", $c10, 3);\n\t\t\toci_bind_by_name($stid, \":c11\", $c11, 20);\n\t\t\toci_bind_array_by_name($stid, \":c12\", $c12, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c13\", $c13, 100, -1, SQLT_CHR);\n\t\t\toci_bind_by_name($stid, \":c14\", $c14, 10);\n\t\t\toci_bind_by_name($stid, \":c15\", $c15, 20);\n\t\t\toci_bind_by_name($stid, \":c16\", $c16,-1, OCI_B_CURSOR);\n\t\t\toci_bind_by_name($stid, \":c17\", $c17, 10);\n\t\t\toci_bind_by_name($stid, \":c18\", $c18, 10);\n\t\t\toci_bind_by_name($stid, \":c19\", $c19, 10);\n\t\t\toci_bind_by_name($stid, \":c20\", $c20, 10);\n\t\t\toci_bind_by_name($stid, \":c21\", $c21, 10);\n\t\t\toci_bind_by_name($stid, \":c22\", $c22, 10);\n\t\t\toci_bind_by_name($stid, \":c23\", $c23, 8);\n\n\t\t\t//se ejecuta el procidimiento \n\t\t\toci_execute($stid);\n\t\t\toci_execute($c16,OCI_DEFAULT);\n\n\t\t\toci_fetch_all($c16, $cursor1);\n\n\t\t\treturn $c15;\n\t\t}", "title": "" }, { "docid": "76c99ed9ca61ec00b2022931c3811b8a", "score": "0.5502674", "text": "function listarModalidad(){\n $this->procedimiento='adq.f_solicitud_ime';\n $this->transaccion='ADQ_LISTMOD_GET';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud','id_solicitud','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //echo $this->consulta;exit;\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "72597608c706dc3d74574b0eb55131de", "score": "0.5499241", "text": "function controlAdjudicado(){\r\n $this->procedimiento='mat.ft_cotizacion_ime';\r\n $this->transaccion='MAT_CTS_ADJ';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\r\n $this->setParametro('adjudicado','adjudicado','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "50a60e0ad8ae5b0fff980a37bd725c5e", "score": "0.5492188", "text": "function API_login($usu,$pass){\n\t$ClsUsu = new ClsUsuario();\n\t$ClsReg = new ClsRegla();\n\t$ClsPerm = new ClsPermiso();\n\t$ClsPen = new ClsPensum();\n\tif($usu != \"\" && $pass != \"\"){\n\t\t$result = $ClsUsu->get_login($usu,$pass);\n\t\tif (is_array($result)) {\n\t\t\tforeach ($result as $row){\n\t\t\t\t$codigo = $row['usu_id'];\n\t\t\t\t$nombre = trim($row['usu_nombre']);\n\t\t\t\t$nombre_pantalla = utf8_decode($row['usu_nombre_pantalla']);\n\t\t\t\t$empresa = trim($row['suc_nombre']);\n\t\t\t\t$empCodigo = trim($row['suc_id']);\n\t\t\t\t$tipo = $row['usu_tipo'];\n\t\t\t\t$tipo_codigo = $row['usu_tipo_codigo'];\n\t\t\t\t//--\n\t\t\t\t$chat_user_id = $row['usu_chat_id'];\n\t\t\t\t//--\n\t\t\t\t$foto = $row['usu_foto'];\n\t\t\t}\n\t\t\t\n\t\t\t/// USUARIO\n\t\t\t$arr_data['codigo'] = $codigo;\n\t\t\t$arr_data['usu'] = $usu;\n\t\t\t$arr_data['pass'] = $pass;\n\t\t\t$arr_data['nombre'] = $nombre;\n\t\t\t$arr_data['usu_nombre_pantalla'] = $nombre_pantalla;\n\t\t\t//--\n\t\t\t$chat = ($tipo == 1 || $tipo == 3)?1:0;\n\t\t\t$arr_data['chat'] = $chat; ///\n\t\t\t$arr_data['chat_user_id'] = $chat_user_id;\n\t\t\tif(file_exists('../../CONFIG/Fotos/USUARIOS/'.$foto.'.jpg')){ /// valida que tenga foto registrada\n\t\t\t\t$arr_data['url_foto'] = \"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/Fotos/USUARIOS/\".$foto.\".jpg\";\n\t\t\t}else{\n\t\t\t\t$arr_data['url_foto'] = \"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/Fotos/nofoto.png\";\n\t\t\t}\n\t\t\t\n\t\t\t/// PENSUM ////\n\t\t\t$pensum = $ClsPen->get_pensum_activo();\n\t\t\t\n\t\t\t///// ASMS /////\n\t\t\t$arr_data['pensum'] = $pensum;\n\t\t\t$arr_data['tipo_usuario'] = $tipo;\n\t\t\t$arr_data['tipo_codigo'] = $tipo_codigo;\n\t\t\tif($tipo == 1){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"USIARIO ADMINISTRATIVO\";\n\t\t\t}else if($tipo == 2){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"MAESTRO\";\n\t\t\t}else if($tipo == 3){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"PADRE\";\n\t\t\t}else if($tipo == 4){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"MONITOR DE BUS\";\n\t\t\t}\n\t\t\t\n\t\t\t$payload = array(\n\t\t\t\t\t\"status\" => true,\n\t\t\t\t\t\"data\" => $arr_data,\n\t\t\t\t\t\"message\" => \"\");\n\t\t\t\t\t\t\n\t\t\techo json_encode($payload);\n\t\t}else{\n\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t$arr_data = array(\n\t\t\t\t\"status\" => false,\n\t\t\t\t\"message\" => \"El usuario o el password son incorrectos...\");\n\t\t\t\techo json_encode($arr_data);\n\t\t}\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$arr_data = array(\n\t\t\t\"status\" => false,\n\t\t\t\"message\" => \"Uno de los campos esta vacio...\");\n\t\t\techo json_encode($arr_data);\n\t}\n\t\n}", "title": "" }, { "docid": "f9488c1cb05e93cd9e058b6f57802d23", "score": "0.5487243", "text": "function modificarObsPoa()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_OBSPOA_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('obs_poa', 'obs_poa', 'varchar');\n $this->setParametro('codigo_poa', 'codigo_poa', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "0a22b171da4907acb1eaa4ec4f4d845a", "score": "0.54780996", "text": "function modificarObsPoa()\n {\n $this->procedimiento = 'adq.f_solicitud_ime';\n $this->transaccion = 'ADQ_MODOBSPOA_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('obs_poa', 'obs_poa', 'varchar');\n $this->setParametro('codigo_poa', 'codigo_poa', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "cbe6d23752b1cf5d04c75e4b2142249e", "score": "0.54756206", "text": "function siguienteEstadoCaja(){\n $this->procedimiento='tes.ft_caja_ime';\n $this->transaccion='TES_SIGECAJA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "caefaac73669a724a5e5301d1061d12e", "score": "0.5469488", "text": "function BD()\n\t\t{\n\t\t\t$this->servidor = SERVIDOR;\n\t\t\t$this->usuario = USUARIOBD;\n\t\t\t$this->clave = CLAVEBD;\n\t\t\t$this->idlink;\n\t\t\t$this->idresult;\n\t\t\t$this->indice_result = 'N'; // varible para definir si el array de los datos va a tener el indice numero N o alfabetico A\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "0fa16921540f6523e3ca5562e4b3070c", "score": "0.54688597", "text": "function getDatosCurso_ini_any()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'curso_ini_any'));\n $oDatosCampo->setEtiqueta(_(\"año inicio curso\"));\n return $oDatosCampo;\n }", "title": "" }, { "docid": "daafb433eb278cb5c2d177520cc78eac", "score": "0.5468668", "text": "public function odobri()\n {\n }", "title": "" }, { "docid": "3ca91eb7dc55c0ff93ec168025e74300", "score": "0.5464755", "text": "function obtenerFaltante()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_PAFPP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('ope_filtro', 'ope_filtro', 'varchar');\n $this->setParametro('id_plan_pago', 'id_plan_pago', 'integer');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "9fcbfa955bcff11e7e7e2fe351291ab1", "score": "0.546113", "text": "public function CumpleTodo($param) {//vienen todos los parametros incluido el servicio\r\n $datosiniciales = $this->capturartodoyconvertir($param); //request\r\n\r\n $array_fechas = $this->Dias2Fechas($datosiniciales[3], $datosiniciales[4]); //first and second fechaentra y fechasalida\r\n\r\n return $this->recorrerfechas($array_fechas, $datosiniciales);\r\n }", "title": "" }, { "docid": "154ae42d657c62e335e0ab1635404e4d", "score": "0.5458462", "text": "public function getConsultaUno($params){\n \n $msj = array(codigoError=>'0000',mensaje=>'',sesionId=>session_id(), sesUsuario=>$_SESSION[\"UsuarioId\"]);\n if (!isset($_SESSION[\"UsuarioId\"])){\n $msj = array(codigoError=>'9999',mensaje=>'Usuario no ha ingresado',sesionId=>session_id());\n $results = array();\n $respuesta = array($msj,$results); \n return $respuesta;\t \n\t } else { \n \n // Usuario ya ingresado. \n $_db = $this->__construct();\n \n $correo = $params->correo;\n \n $_result = $_db->query(\"SELECT EMail, NoCedula, Nombre, Apellidos, Apodo, TelCelular, FechaNacimiento,\n Genero, CodProv, CodCanton, CodDist, FotoFile, TipoUsuario \n FROM Usuario as A, Persona as B\n WHERE EMail='\".$correo.\"' AND A.IdPersona = B.id\") \n or die('Connect Error (' . $_db->connect_errno . ') ' . $_db->connect_error); \n \n $results = array();\n while ($row = $_result->fetch_assoc()) {array_push($results, $row);}\n $respuesta = array($msj,$results); \n return $respuesta;\n \n } // Fin de IF Sesion\n \n }", "title": "" }, { "docid": "200b58e75f8045cda861f87b5867e93c", "score": "0.54509217", "text": "private function loguear() {\n $respuesta = array();\n\n $body = file_get_contents('php://input');\n $usuario = json_decode($body);\n\n $telefono = $usuario->telefono;\n $contrasena = $usuario->contrasena;\n\n if (self::autenticar($telefono, $contrasena)) {\n $usuarioBD = self::obtenerUsuarioPorTelefono($telefono);\n\n if ($usuarioBD != NULL) {\n http_response_code(200);\n $respuesta[\"Usuario\"] = $usuarioBD[\"id_Usuario\"];\n $respuesta[\"Nombre\"] = base64_decode($usuarioBD[\"nombre\"]);\n $respuesta[\"Telefono\"] = $usuarioBD[\"telefono\"];\n $respuesta[\"APIkey\"] = $usuarioBD[\"claveApi\"];\n return [\"estado\" => 1, \"usuario\" => $respuesta];\n\n } else {\n throw new ExcepcionApi(self::ESTADO_FALLA_DESCONOCIDA,\n \"Ha ocurrido un error\");\n }\n } else {\n throw new ExcepcionApi(self::ESTADO_PARAMETROS_INCORRECTOS,\n utf8_encode(\"Teléfono o contraseña inválidos\"));\n }\n }", "title": "" }, { "docid": "6e2c94e3fb2867ff12740e05f9a7a8e0", "score": "0.54471695", "text": "function VerificaDatos_2($param_num,$param_notas,$param_archivo)\r\n {\r\n global $vectorNotasTemporal;\r\n global $ErrorExisteDoble;\r\n\r\n $ErrorExisteDoble = 0;\r\n $noexisten = 0;\r\n $ubicaciondoble = 0;\r\n for ($c=1; $c < $param_num; $c++)\r\n {\r\n list($card,$name,$final) = split(\",\",$param_notas[$c]);\r\n $laboratorio = 0;\r\n $zona = 0;\r\n $final = trim($final);\r\n $cantdigitos = strlen($card);\r\n // ----------modificacion realizada para el carnet\r\n switch($cantdigitos)\r\n {\r\n case 9: /*carne bueno */ break;\r\n case 7: $subcadena = substr($card, 0, 2);\r\n $factible = $subcadena + 0;\r\n if ($factible < 98) //aqui preguntar si los primeros dos digitos son < 98\r\n { $card = '00'.$card; }\r\n else //si son mayores a 98 entonces agregar 19\r\n { $card = '19'.$card; }\r\n break;\r\n default: $faltan = 9 - $cantdigitos;\r\n for($i=0; $i < $faltan; $i++) $card = '0'.$card;\r\n }//Fin del switch\r\n\r\n //Se le coloca el valor correspondiente sin son APR = -3, REP = -4\r\n $valor = strtoupper($final);\r\n switch( $valor )\r\n {\r\n case '1': $final = -3; break;\r\n case '2': $final = -4; break;\r\n case 'APR': $final = -3; break;\r\n case 'REP': $final = -4; break;\r\n }\r\n //echo \"final -* - $final <br>\";\r\n\r\n //aqui se verifica que el carne se encuentre en asignacion y asignaciondetalle\r\n //sino no se traslada a ingresotemporal, ademas para los periodos de retrasada\r\n //se le coloca a la zona y el laboratorio los valores de sus semestres respectivos\r\n $banderaencontrado = -1;\r\n for ($j=0; $j < $_SESSION[\"sNotas\"]->num_rows(); $j++)\r\n {\r\n $_SESSION[\"sNotas\"]->Row = $j;\r\n\r\n $_SESSION[\"sNotas\"]->next_record();\r\n $vectasig1[usuarioid] = trim($_SESSION[\"sNotas\"]->f('idstudent'));\r\n $vectasig1[carrera] = trim($_SESSION[\"sNotas\"]->f('idcareer'));\r\n $vectasig1[zona] = trim($_SESSION[\"sNotas\"]->f('classzone'));\r\n $vectasig1[zonalaboratorio] = trim($_SESSION[\"sNotas\"]->f('labnote'));\r\n\r\n if (strcmp($vectasig1[usuarioid], $card) == 0 )\r\n {\r\n $banderaencontrado = 1;\r\n $carrera = trim($vectasig1[carrera]);\r\n $laboratorio = 0; //asigno el laboratorio\r\n $zona = 0; //asigno la zona\r\n break;\r\n }\r\n }//Fin del for\r\n\r\n\r\n // Si los valores son encontrados se va guardando en un vector temporal para luego\r\n // ser insertado en la tabla ingresotemporal\r\n if ($banderaencontrado == 1 )\r\n {\r\n $numero = is_numeric($final);\r\n if ($numero)\r\n {\r\n $convfinal = 0;\r\n $convfinal = 0 + $final;\r\n }\r\n else { $convfinal = $final; }\r\n\r\n $notas[$c-1] = $this->mUsuarioid.\"|\".$card.\"|\".$carrera.\"|\".$this->mCurso.\"|\".$this->mIndex.\"|\".\r\n $this->mSeccion.\"|\".$this->mPeriodo.\"|\".$this->mAnio.\"|\".$zona.\r\n \"|\".$laboratorio.\"|\".$convfinal.\"|0|0\";\r\n\r\n //echo \" -*-*- \".$notas[$c-1].\"<br>\"; die;\r\n\r\n //busca que no sea un registro repetido\r\n $valor = -5;\r\n $banderaduplicado = 0;\r\n for ($r = 0; $r < $c-1; $r++)\r\n {\r\n if ($valor != 1)\r\n {\r\n $valor = substr_count($notasfinales[$r], $card); //cuenta cuantas veces aparece\r\n if ($valor > 0) //si lo encontro al menos una vez\r\n {\r\n// $tempdup = substr($notasfinales[$r],0,strlen($notasfinales[$r])-1);\r\n// $tempdup = $tempdup.\"8003,\".$carrera;\r\n// $notasfinales[$r] = \"\";\r\n// $notasfinales[$r] = $tempdup;\r\n $valor = -5;\r\n $banderaduplicado = 1;\r\n $ErrorExisteDoble = 1;\r\n $ubicaciondoble = $c+1;\r\n // echo \"entro con \".$card.\"<br>\";\r\n }\r\n }\r\n } //Fin del For\r\n\r\n if ($banderaduplicado == 0)\r\n {\r\n $notasfinales[$c-1] = $notas[$c-1];\r\n // echo \"notas finales \".$notasfinales[$c-1].\" <br>\";\r\n }\r\n\r\n $banderaencontrado = -1;\r\n }//fin del if de encontrado\r\n else { $noexisten++; }\r\n }//Fin del for\r\n//echo \"<br>vector --\",$notasfinales[0][$card],\"-- no existen <<\",$noexisten,\">>\";\r\n //Si existe en el archivo alguna tupla repetida se descarta de una vez el archivo\r\n\r\n//\t echo \"error --- \".$ErrorExisteDoble.\"<br>\"; die;\r\n if ($ErrorExisteDoble == 0)\r\n {\r\n //cuando hay registros agregados hay que verificar cuantos son dependiendo el porcentaje se desecha el archivo\r\n $porcentaje = $this->mAsignados * 0.50;\r\n\r\n if (($noexisten < $porcentaje)&&($notasfinales != null))\r\n {\r\n $transaccion_ok = 1;\r\n// $transaccion_ok = $_SESSION[\"sNotas\"]->query(\"begin\");\r\n\r\n $transaccion_ok = $_SESSION[\"sNotas\"]->query($this->gsql_IA->begin());\r\n\r\n $registros = $this->VerificaDatosTabla();\r\n\r\n /*\t\t $nf = count($notasfinales);\r\n for( $x=0; $x < nf; $x++)\r\n {\r\n echo $notasfinales[$x].\"<br>\";\r\n }\r\n\r\n print_r($notasfinales);\r\n\r\n die; */\r\n\r\n //Manejo de errores en la carga del vector a la tabla\r\n// $old_error_handler = set_error_handler(\"Maneja_Error_Copy\");\r\n $resultado = pg_copy_from($_SESSION[\"sNotas\"]->Link_ID,\"tbtempentry\", $notasfinales,\"|\");\r\n// restore_error_handler();\r\n if ($resultado)\r\n { //COMMIT TRANSACTION\r\n //echo \"entro por aca <br>\";\r\n// $rst_transaccion = $_SESSION[\"sNotas\"]->query(\"commit\");\r\n\r\n $rst_transaccion = $_SESSION[\"sNotas\"]->query($this->gsql_IA->commit());\r\n\r\n\r\n //echo \"hasta aqui solo los q estan en archivo\"; die;\r\n // Muestra resultados\r\n if ($this->upload_report($registros,$param_archivo) == 1) { return 1; }\r\n else { return 0; }\r\n }\r\n else\r\n { // Ha ocurrido algún error. Recupera el backup de la tabla de notas\r\n //ROLLBACK TRANSACTION\r\n// $rst_transaccion = $_SESSION[\"sNotas\"]->query(\"rollback\");\r\n\r\n $rst_transaccion = $_SESSION[\"sNotas\"]->query($this->gsql_IA->rollback());\r\n\r\n $this->mStringMensaje = \"No fu&eacute; posible cargar el archivo<br>\r\n por favor revise la informaci&oacute;n y vuelva a intentarlo.\";\r\n return 0;\r\n } //END TRANSACTION\r\n// $rst_transaccion = $_SESSION[\"sNotas\"]->query(\"end\");\r\n\r\n $rst_transaccion = $_SESSION[\"sNotas\"]->query($this->gsql_IA->end());\r\n\r\n }\r\n else\r\n {\r\n $this->mStringMensaje = \"No coinciden los alumnos del archivo con los asignados<br>\r\n revise que el archivo realmente sea el correcto<br>\r\n y vuelva a intentarlo.\";\r\n return 0;\r\n }\r\n }\r\n else\r\n {\r\n $this->mStringMensaje = \"Existen registros repetidos.<br>Verificar la l&iacute;nea : \".$ubicaciondoble;\r\n return 0;\r\n }//Fin de if de existe tupla repetida en el archivo\r\n\r\n }", "title": "" }, { "docid": "46a5078063074368e8c1bdb695b8209a", "score": "0.54416376", "text": "function ObtenerBaseDatos($CodigoSesion){\n $Conexion = new Conexion();\n\n /**\n * se asigna el nombre de la base de datos\n */\n $DatosConexion = $Conexion->ObtenerConexion();\n\n $Resultado = array();\n\n /**\n * verifica que el codigo no este \n * vacio\n */\n if($CodigoSesion != \"\"){ \n /**\n * selecciona unicamente \n * el nombre y la conexion\n * */ \n $result = $DatosConexion->query(\"SELECT Nombre,Conexion FROM operacion_conexiones where Codigo='\".$CodigoSesion.\"' and idEstado=1\");\n\n /**\n * evalua si devolvio \n * datos\n */\n if($result)\n { \n /**\n * asigna los datos consultados\n */\n $Resultado = $result->fetch_array(MYSQLI_ASSOC);\n }\n else{\n /**\n * retorna si no se encuentra un\n * registro\n */\n $Resultado = array (\n 'Codigo' => '',\n 'Usuario' => '',\n 'Response' => 'No hay datos'\n );\n }\n }\n else{\n /**\n * retorna si no se encuentra un\n * registro\n */\n $Resultado = array (\n 'Codigo' => '',\n 'Usuario' => '',\n 'Response' => 'No hay datos'\n );\n }\n\n return $Resultado;\n }", "title": "" }, { "docid": "1becf984c4739b324f5006600c557645", "score": "0.5431796", "text": "function callAPI($request_Type, $data = false, $api_url, $header, $url_campagin)\n{\n $url = $url_campagin . $api_url;\n $curl = curl_init();\n // print_r($data);\n // die;\n $data = json_encode($data);\n switch ($request_Type) {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, $data);\n }\n // OPTIONS:\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n // EXECUTE:\n $result = curl_exec($curl);\n $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n\n return array('response' => $result, 'httpcode' => $httpcode);\n}", "title": "" }, { "docid": "0b0e251c340cd7f7505489c7c5884e9d", "score": "0.54223895", "text": "function cuadroComparativo(){\r\n $this->procedimiento='mat.ft_cotizacion_sel';\r\n $this->transaccion='MAT_CTS_CUAR';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n $this->setCount(false);\r\n\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\r\n\r\n $this->captura('id_solicitud','int4');\r\n $this->captura('id_cotizacion','int4');\r\n $this->captura('parte','varchar');\r\n $this->captura('descripcion','text');\r\n $this->captura('explicacion_detallada_part_cot','varchar');\r\n $this->captura('cantidad','integer');\r\n $this->captura('tipo_cot','varchar');\r\n $this->captura('cd','varchar');\r\n $this->captura('precio_unitario','numeric');\r\n $this->captura('precio_unitario_mb','numeric');\r\n $this->captura('codigo_tipo','varchar');\r\n $this->captura('desc_proveedor','text');\r\n $this->captura('adjudicado','varchar');\r\n $this->captura('recomendacion','varchar');\r\n $this->captura('obs','varchar');\r\n $this->captura('fecha_cotizacion','varchar');\r\n $this->captura('fecha_po','varchar');\r\n $this->captura('monto_total','numeric');\r\n $this->captura('lista_proveedor','varchar');\r\n $this->captura('pie_pag','varchar');\r\n $this->captura('estado','varchar');\r\n\t\t\t\t$this->captura('nro_cotizacion','varchar');\r\n\t\t\t\t$this->captura('fecha_solicitud','date');\r\n\t\t\t\t$this->captura('fecha_salida','date');\r\n\t\t\t\t$this->captura('pn_cotizacion','varchar');\r\n $this->captura('nro_tramite','varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n\t\t\t\t//var_dump(\"aqui llega \",$this->respuesta);exit;\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "a9ba48d7897b3c637e544561b91198e8", "score": "0.5421656", "text": "function listarObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_sel';\n $this->transaccion = 'TES_COMEJEPAG_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\n //Definicion de la lista del resultado del query\n $this->captura('id_obligacion_det', 'int4');\n $this->captura('id_partida', 'int4');\n $this->captura('nombre_partida', 'text');\n $this->captura('id_concepto_ingas', 'int4');\n $this->captura('nombre_ingas', 'text');\n $this->captura('id_obligacion_pago', 'int4');\n $this->captura('id_centro_costo', 'int4');\n $this->captura('codigo_cc', 'text');\n $this->captura('id_partida_ejecucion_com', 'int4');\n $this->captura('descripcion', 'text');\n $this->captura('comprometido', 'numeric');\n $this->captura('ejecutado', 'numeric');\n $this->captura('pagado', 'numeric');\n $this->captura('revertible', 'numeric');\n $this->captura('revertir', 'numeric');\n $this->captura('moneda', 'varchar');\n $this->captura('desc_orden', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "3d78f76818aff63033721d495ede4c70", "score": "0.542111", "text": "function paradasCorredor($codCorredor){\r\n\t$ck = arrumaCookie(cookieSecao());\r\n\t$data = urlencode($codCorredor);\r\n\treturn json_decode(do_get_request(urlSp.urlParadasCorredor.$data,$ck),true);\r\n}", "title": "" }, { "docid": "2df8bd514dbd10eb8ed19663958638d4", "score": "0.5420119", "text": "function modificarObsPresupuestos()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_OBSPRE_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n $this->setParametro('fecha_cer_pres', 'fecha_cer_pres', 'date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "ccc2a0ae40a579dbe20010a48b389813", "score": "0.5417308", "text": "function modificarTarjetasErp(){\n\n $this->objFunc=$this->create('MODBoleto');\n $this->res=$this->objFunc->modificarTarjetasErp($this->objParam);\n\n if($this->res->getTipo()!='EXITO'){\n $this->res->imprimirRespuesta($this->res->generarJson());\n exit;\n }\n\n\n\n /*Aqui para guardar en el log de datos*/\n $this->objParam->addParametro('observaciones', \"Modificacion MP Tarjetas ERP y STAGE\");\n $this->objFunc=$this->create('MODBoleto');\n $this->res2=$this->objFunc->logModificaciones($this->objParam);\n\n if($this->res2->getTipo()!='EXITO'){\n $this->res2->imprimirRespuesta($this->res2->generarJson());\n exit;\n }\n\n /*Incluyenco la modificacion en el STAGE*/\n $data = array(\"ticketNumber\"=>$this->objParam->getParametro('boleto_a_modificar'),\n \"nroTarjeta\"=>$this->objParam->getParametro('num_tarjeta_1'),\n \"codAutorizacion\"=>$this->objParam->getParametro('cod_tarjeta_1'),\n \"issueDate\"=>$this->objParam->getParametro('issueDate')\n );\n $datosUpdate = json_encode($data);\n\n $envio_dato = $datosUpdate;\n\n $request = 'http://sms.obairlines.bo/CommissionServices/ServiceComision.svc/UpdatePaymentMethod';\n $session = curl_init($request);\n curl_setopt($session, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($session, CURLOPT_POSTFIELDS, $envio_dato);\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($session, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($envio_dato))\n );\n\n $result = curl_exec($session);\n curl_close($session);\n\n\n\n $respuesta = json_decode($result);\n\n $respuesta_final = json_decode($respuesta->UpdatePaymentMethodResult);\n\n $respuesta_estado_servicio = $respuesta_final->State;\n\n if ($respuesta_estado_servicio == true) {\n $respuesta_base_datos = $respuesta_final->Data;\n\n if ($respuesta_base_datos) {\n $respuesta_mensaje = $respuesta_base_datos[0]->Result;\n\n if ($respuesta_mensaje == 1) {\n $respuesta_mensaje = \"Medio de Pago modificado Correctamente en STAGE\";\n $error = false;\n } else {\n $error = true;\n $respuesta_mensaje = 'Error en la modificacion DB';\n }\n\n } else {\n $error = true;\n $respuesta_mensaje = 'Error en el Servicio cod: 2';\n }\n\n } else {\n $error = true;\n $respuesta_mensaje = 'Error en el servicio cod: 1';\n }\n\n\n\n if ($this->objParam->getParametro('num_tarjeta_2') != '' && $this->objParam->getParametro('num_tarjeta_2') != null) {\n\n $data2 = array(\"ticketNumber\"=>$this->objParam->getParametro('boleto_a_modificar'),\n \"nroTarjeta\"=>$this->objParam->getParametro('num_tarjeta_2'),\n \"codAutorizacion\"=>$this->objParam->getParametro('cod_tarjeta_2'),\n \"issueDate\"=>$this->objParam->getParametro('issueDate'));\n $datosUpdate2 = json_encode($data2);\n\n $envio_dato2 = $datosUpdate2;\n\n $request2 = 'http://sms.obairlines.bo/CommissionServices/ServiceComision.svc/UpdatePaymentMethod';\n $session2 = curl_init($request2);\n curl_setopt($session2, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($session2, CURLOPT_POSTFIELDS, $envio_dato2);\n curl_setopt($session2, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($session2, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($envio_dato2))\n );\n\n $result2 = curl_exec($session2);\n curl_close($session2);\n\n $respuesta2 = json_decode($result2);\n\n $respuesta_final2 = json_decode($respuesta2->UpdatePaymentMethodResult);\n\n $respuesta_estado_servicio2 = $respuesta_final2->State;\n\n if ($respuesta_estado_servicio2 == true) {\n $respuesta_base_datos2 = $respuesta_final2->Data;\n\n if ($respuesta_base_datos2) {\n $respuesta_mensaje2 = $respuesta_base_datos2[0]->Result;\n\n if ($respuesta_mensaje2 == 1) {\n $respuesta_mensaje2 = \"Medios de Pago modificados Correctamente en STAGE\";\n $error2 = false;\n } else {\n $error2 = true;\n $respuesta_mensaje2 = 'Error en la modificacion DB';\n }\n\n } else {\n $error2 = true;\n $respuesta_mensaje2 = 'Error en el Servicio cod: 2';\n }\n\n } else {\n $error2 = true;\n $respuesta_mensaje2 = 'Error en el servicio cod: 1';\n }\n\n if (($error == false) && ($error2 == false)) {\n\n\n $send = array(\n \"error\" => $error, // todo\n \"data\" => [\"mensaje_exito\" => $respuesta_mensaje2]\n );\n echo json_encode($send);\n\n } else {\n\n $send = array(\n \"error\" => $error, // todo\n \"data\" => [\"mensaje_exito\" => $respuesta_mensaje2]\n );\n echo json_encode($send);\n\n }\n\n } else {\n\n\n $send = array(\n \"error\" => $error, // todo\n \"data\" => [\"mensaje_exito\" => \"Datos Modificados Correctamente en ERP y Stage\"]\n );\n echo json_encode($send);\n }\n\n /****************************************/\n\n\n\n\n \t}", "title": "" }, { "docid": "12d557e46431b9224aea2fe80c0b88d8", "score": "0.5415781", "text": "public function EditarDatosPaciente()\n{\n\n $datosEditarPaciente = new GestionarPaciente();\n $idUsuario=base64_decode($_REQUEST['g']);\n \n if(isset($idUsuario)){\n\n $datosEditarPaciente = $this->modelo->ObtenerDatosEditarPaciente($idUsuario);\n}\nrequire_once 'Vista/Header.php';\nrequire_once 'Vista/GestionPacientes/EditarPaciente.php'; \nrequire_once 'Vista/Footer.php'; \n\n}", "title": "" }, { "docid": "1971f245c59bde4ae181b8ab3607b0aa", "score": "0.5411199", "text": "function listarCotizacion(){\r\n\t\t$this->procedimiento='mat.ft_cotizacion_sel';\r\n\t\t$this->transaccion='MAT_CTS_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_solicitud','id_solicitud','int4');\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_cotizacion','int4');\r\n\t\t$this->captura('id_solicitud','int4');\r\n\t\t$this->captura('id_moneda','int4');\r\n\t\t$this->captura('nro_tramite','varchar');\r\n\t\t$this->captura('fecha_cotizacion','date');\r\n\t\t$this->captura('adjudicado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_proveedor','int4');\r\n\t\t$this->captura('monto_total','numeric');\r\n\t\t$this->captura('id_usuario_ai','int4');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('usuario_ai','varchar');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_moneda','varchar');\r\n\t\t$this->captura('desc_proveedor','varchar');\r\n\t\t$this->captura('nro_cotizacion','varchar');\r\n\t\t$this->captura('recomendacion','varchar');\r\n\t\t$this->captura('obs','varchar');\r\n\t\t$this->captura('pie_pag','varchar');\r\n\t\t//\r\n\t\t// $this->captura('id_condicion_entrega','int4');\r\n\t\t// $this->captura('id_forma_pago','int4');\r\n\t\t// $this->captura('id_modo_envio','int4');\r\n\t\t// $this->captura('id_puntos_entrega','int4');\r\n\t\t// $this->captura('id_tipo_transaccion','int4');\r\n\t\t// $this->captura('id_orden_destino','int4');\r\n\t\t//\r\n\t\t// $this->captura('codigo_condicion_entrega','varchar');\r\n\t\t// $this->captura('codigo_forma_pago','varchar');\r\n\t\t// $this->captura('codigo_modo_envio','varchar');\r\n\t\t// $this->captura('codigo_puntos_entrega','varchar');\r\n\t\t// $this->captura('codigo_tipo_transaccion','varchar');\r\n\t\t// $this->captura('codigo_orden_destino','varchar');\r\n\t\t$this->captura('tipo_evaluacion','varchar');\r\n\t\t$this->captura('id_proveedor_contacto','int4');\r\n\t\t$this->captura('desc_contacto','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "a84d2c10331294ca9a48103af7d7c003", "score": "0.5407112", "text": "public function filtrosConsultaCorreosPadres() \n {\n try { \n $content = trim(file_get_contents(\"php://input\")); \n $decoded = json_decode($content, true); \n\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager()); \n $ciclo = $dbm->getRepositoriosById('Ciclo', 'activo', 1);\n $nivel = $dbm->getRepositoriosById('Nivel', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1); \n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n \n return Api::Ok(\"Filtros\",\n array(\n \"ciclo\" => $ciclo,\n \"grado\" => $grado,\n \"nivel\" => $nivel,\n \"semestre\" => $semestre,\n \"grupo\" => $grupo \n ));\n } catch (\\Exception $e) {\n return Api::Error(Response::HTTP_BAD_REQUEST, $e->getMessage()); \n }\n }", "title": "" }, { "docid": "27c289df5d1d5db0c2c54048bfe81f1f", "score": "0.54047674", "text": "function reportePreOrdenCompra()\n {\n\n $this->procedimiento = 'adq.f_solicitud_sel';\n $this->transaccion = 'ADQ_SOLOC_REP';\n $this->tipo_procedimiento = 'SEL';\n $this->setCount(false);\n\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\n $this->captura('desc_proveedor', 'varchar');\n $this->captura('id_persona', 'int4');\n $this->captura('dir_persona', 'varchar');\n $this->captura('telf1_persona', 'varchar');\n $this->captura('telf2_persona', 'varchar');\n $this->captura('cel_persona', 'varchar');\n $this->captura('correo_persona', 'varchar');\n $this->captura('id_institucion', 'int4');\n $this->captura('dir_institucion', 'varchar');\n $this->captura('telf1_institucion', 'varchar');\n $this->captura('telf2_institucion', 'varchar');\n $this->captura('cel_institucion', 'varchar');\n $this->captura('email_institucion', 'varchar');\n $this->captura('fax_institucion', 'varchar');\n $this->captura('lugar_entrega', 'varchar');\n $this->captura('tipo', 'varchar');\n $this->captura('moneda', 'varchar');\n $this->captura('codigo_moneda', 'varchar');\n $this->captura('num_tramite', 'varchar');\n\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n return $this->respuesta;\n }", "title": "" }, { "docid": "1559c56cd2cb521a00accbd12eaedf5d", "score": "0.54030406", "text": "public function actionCotizarV2(){\n $request = Yii::$app->request;\n $params = $request->bodyParams;\n\n $tipoPaquete = $request->getBodyParam(\"tipo_paquete\");\n\n if(!$tipoPaquete){\n throw new HttpException(500, \"No se envio el tipo de paquete\");\n }\n $cotizacion = new CotizacionRequest();\n $cotizacion->origenCP = $request->getBodyParam(\"cp_from\");\n $cotizacion->origenCountry = $request->getBodyParam(\"country_code_from\");\n $cotizacion->origenStateCode = $request->getBodyParam(\"state_code_from\");\n\n $cotizacion->destinoCP = $request->getBodyParam(\"cp_to\");\n $cotizacion->destinoCountry = $request->getBodyParam(\"country_code_to\");\n $cotizacion->destinoStateCode = $request->getBodyParam(\"state_code_to\");\n\n //Fecha de solicitud de envio o recoleccion\n $cotizacion->solicitaPickup = $request->getBodyParam(\"b_requiere_recoleccion\");\n if($request->getBodyParam(\"fch_recoleccion\") != null){\n $cotizacion->fecha = $request->getBodyParam(\"fch_recoleccion\");\n }else{\n $cotizacion->fecha = Calendario::getFechaActualMasDias(1); //Si no indica la fecha, le agrega 1 día para el envio\n }\n\n //Uso de seguro del envío\n if($request->getBodyParam(\"num_monto_seguro\") != null){\n $cotizacion->montoSeguro = $request->getBodyParam(\"num_monto_seguro\");\n $cotizacion->hasSeguro = true;\n }\n \n\n if(strtoupper($tipoPaquete)==\"SOBRE\"){\n $cotizacion->isPaquete = false;\n $dimenSobre = $request->getBodyParam(\"dimensiones_sobre\");\n $cotizacion->addSobre($dimenSobre[\"num_peso\"]/1000);\n }else{\n $cotizacion->isPaquete = true;\n $paquetesRequest = $request->getBodyParam(\"dimensiones_paquete\");\n \n foreach($paquetesRequest as $paquete){\n $cotizacion->addPaqueteElementos($paquete[\"num_alto\"],$paquete[\"num_ancho\"],$paquete[\"num_largo\"],$paquete[\"num_peso\"]);\n }\n }\n\n\n //Llama al servicio de cotización pertinente\n if($cotizacion->isPaquete){\n $cotizador = new CotizadorPaquete();\n return $cotizador->realizaCotizacion($cotizacion);\n }else{\n $cotizador = new CotizadorSobre();\n return $cotizador->realizaCotizacion($cotizacion);\n }\n }", "title": "" }, { "docid": "4818e5f19dbf03a85aee6f7518ad7543", "score": "0.5400881", "text": "static public function ctrRegistroBitacoraAgregar(){\r\n\r\n\t\tif (isset($_POST[\"idPedido\"])) {\r\n\t\t\t\r\n\t\t\t$tabla = \"bitacora\";\r\n\r\n\t\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t\t \"accion\" => 'Seguimiento de Pedido Laboratorio',\r\n\t\t\t\t\t\t\t\t \"folio\" => $_POST[\"idPedido\"]);\r\n\r\n\t\t\t$respuesta = ModeloLaboratorio::mdlRegistroBitacoraAgregar($tabla, $datos);\r\n\r\n\t\t\treturn $respuesta;\r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c3d21bed8c501b8a0ea7c4ca02d445d6", "score": "0.53993607", "text": "function anteriorEstadoCaja(){\n $this->procedimiento='tes.ft_caja_ime';\n $this->transaccion='TES_ANTECAJA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "87535d6e77549678f29b4e7d8d72c7b3", "score": "0.5396186", "text": "function modificarObsPresupuestos()\n {\n $this->procedimiento = 'adq.f_solicitud_ime';\n $this->transaccion = 'ADQ_MODOBS_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "96b732e9256b87e7a5fafe3b9c011b84", "score": "0.5395967", "text": "function enviarcorreo_cliente($t_nombres,$t_apellido1,$email,$creditcardtype,$last4carddigits){\n \n $mensaje = \" \".$t_nombres.\" \".$t_apellido1.\": ¡Bienvenido a REST911 servicio MEDICO EN ATENCION DOMICILIARIA! REST911 es la empresa líder en la ZONA NORTE DEL PAIS y esperamos que su experiencia de contratación en línea haya cumplido con sus expectativas, al igual que miles de familias han confiado en nosotros, es nuestro desafío atender sus requerimientos en atención oportuna que usted y su familia necesitan.\n Sus servicios quedaran activados dentro de las próximas 24 HORAS Hábiles, adjuntamos Instructivo de uso del servicio.\n Si tiene una emergencia debe llamarnos al 442 469 911 desde cualquier teléfono fijo o móvil o si lo prefiera al número 225738555. Nuestros profesionales de servicio están las 24 horas del día todo los días del año, listos para para ayudar de manera oportuna.\n Si tiene cualquier duda o consulta con las características de su plan, puede escribirnos a sac@rest911.cl \n Su pago inicial se aplicó conforme al Tipo de Plan seleccionado y en adelante sus pagos (mensual-trimestral-semestral ó anual) se aplicarán en modalidad automática para su comodidad y tranquilidad con cargo a su tarjeta \".$creditcardtype.\" número XXXX XXXX XXXX \".$last4carddigits.\" . \n REST911 más de 10 años protegiendo a las familias y al cuidado de los trabajadores.\n Por cualquier duda o consulta, no dude en contactarnos.\n Saludos\";\n\n $destinatario = $email;\n\n $asunto = \"REST911 Bienvenida y Confirmación de Pago - Activación en 24 Horas Hábiles\";\n\n // Datos de la cuenta de correo utilizada para enviar vía SMTP\n $smtpHost = \"pyme91.pymedns.net\"; // Dominio alternativo brindado en el email de alta \n $smtpUsuario = \"autocontrato@rest911.cl\"; // Mi cuenta de correo\n $smtpClave = \"%&auto&%web2020\"; // Mi contraseña\n $correo = ('autocontrato@rest911.cl'); // Email desde donde se envia el correo\n $nombre = \"REST911\";\n \n \n \n\n\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true; // authentication enabled\n $mail->Port = 465; \n $mail->IsHTML(true); \n $mail->CharSet = \"utf-8\";\n $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail\n \n //adicional\n //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n //$mail->SMTPDebug = 2;\n //$mail->Debugoutput = 'html';\n \n \n // VALORES A MODIFICAR //\n $mail->Host = $smtpHost; \n $mail->Username = $smtpUsuario; \n $mail->Password = $smtpClave;\n\n\n $mail->From = ($correo); // Email desde donde envío el correo.\n $mail->FromName = $nombre;\n $mail->AddAddress($destinatario); // Esta es la dirección a donde enviamos los datos del formulario\n //ADJUNTO\n $url = 'https://planes.rest911.cl/docu/Rest911%20Instructivo%20Usuario%20Activacion%20Servicio.pdf';\n $fichero = file_get_contents($url);\n $mail->addStringAttachment($fichero, 'Rest911 Instructivo Usuario Activacion Servicio.pdf');\n\t\n $mail->Subject = $asunto; // Este es el titulo del email.\n $mensajeHtml = nl2br($mensaje);\n \n $mail->Body = \"\n <html> \n\t<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />\n <body> \n <img src='https://planes.rest911.cl/img/c_header.jpg'>\n <div style='color:black !important; max-width: 800px;'>\n <p style='color:black !important;'>{$t_nombres} {$t_apellido1} :<br></p>\n \n <span style='color:black !important;'> ¡Bienvenido a REST911 servicio MEDICO EN ATENCION DOMICILIARIA! REST911 es la empresa líder en la ZONA NORTE DEL PAIS y esperamos que su experiencia de contratación en línea haya cumplido con sus expectativas, al igual que miles de familias han confiado en nosotros, es nuestro desafío atender sus requerimientos en atención oportuna que usted y su familia necesitan.<br><br>\n \n Sus servicios quedaran activados dentro de las <b>próximas 24 HORAS Hábiles</b>, adjuntamos Instructivo de uso del servicio. <br><br>\n \n Si tiene una emergencia debe llamarnos al <b>442 469 911</b> desde cualquier teléfono fijo o móvil o si lo prefiera al número <b>225738555</b>. Nuestros profesionales de servicio están las 24 horas del día todo los días del año, listos para para ayudar de manera oportuna.<br></span>\n \n <p><span style='color:black !important;'>Si tiene cualquier duda o consulta con las características de su plan, puede escribirnos a <a href='mailto:sac@rest911.cl'> sac@rest911.cl</a></span></p>\n \n <span style='color:black !important;'>Su pago inicial se aplicó conforme al Tipo de Plan seleccionado y en adelante sus pagos (mensual-trimestral-semestral ó anual) se aplicarán en modalidad automática para su comodidad y tranquilidad con cargo a su tarjeta {$creditcardtype} número XXXX XXXX XXXX {$last4carddigits} . <br><br></span>\n \n <span style='color:black !important;'><b>REST911</b> más de 10 años <b>protegiendo a las familias</b> y al <b>cuidado de los trabajadores.</b> <br><br></span>\n \n <span style='color:black !important;'>Por cualquier duda o consulta, no dude en contactarnos.<br><br></span>\n \n <span style='color:black !important;'>Saludos<br></span>\n <img src='https://rest911.cl/static/logo-3cec0a38c5f2697a65884f76e6b7f978.png' alt='REST911' ALIGN='right' />\n </div>\n\t<img src='https://planes.rest911.cl/img/c_footer.jpg'>\n </body> \n\n </html>\n\n <br />\"; // Texto del email en formato HTML\n $mail->AltBody = \"{$mensaje} \\n\\n \"; // Texto sin formato HTML\n // FIN - VALORES A MODIFICAR //\n\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n \n \n \n return($mail->Send());\n}", "title": "" }, { "docid": "771ebcfccb1ecdcd8f0c482458b148bf", "score": "0.5393932", "text": "public function ObtenerAcceso($Documento, $Clave)\r\n {\r\n try\r\n { \r\n $cn = Conexion::ObtenerConexion();\r\n $rs= $cn->query(\"CALL SPR_R_ObtenerAcceso('\" . $Documento . \"', '\" . $Clave . \"')\");\r\n $vecresultado = array(); // Recorremos el resultado de la consulta y lo almacenamos en el array\r\n while ($fila = $rs->fetch_row()) {\r\n array_push($vecresultado, $fila); \r\n }\r\n mysqli_free_result($rs);\r\n mysqli_close($cn);\r\n if ($vecresultado!= NULL)\r\n {\r\n $operario = new Operario(); \r\n $operario->setOperario_Id($vecresultado[0][0]); \r\n $operario->setNombres($vecresultado[0][1]);\r\n $operario->setApellidos($vecresultado[0][2]); \r\n $operario->setPerfil($vecresultado[0][3]);\r\n unset($vecresultado);\r\n return $operario;\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n }\r\n catch (Exception $ex)\r\n {\r\n echo $ex;\r\n }\r\n }", "title": "" }, { "docid": "2951e605cef32f3901b7147ae56fca8e", "score": "0.53844124", "text": "function Grabar_Bono_Regular($dpi,$monto,$moneda,$tcambio,$desc){\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n $ClsPla = new ClsPlanillaAsignaciones();\n //pasa a mayusculas\n\t\t$desc = trim($desc);\n\t//--------\n\t//decodificaciones de tildes y Ñ's\n\t\t$desc = utf8_encode($desc);\n\t\t//--\n\t\t$desc = utf8_decode($desc);\n\t//-------- \n if($dpi !=\"\" && $desc !=\"\" && $monto != \"\" && $moneda != \"\" && $tcambio != \"\"){\n\t\t//$respuesta->alert(\"$id\");\n\t\t$cod = $ClsPla->max_base_bonificaciones($dpi);\n\t\t$cod++;\n\t\t$sql = $ClsPla->insert_base_bonificaciones($cod,$dpi,$monto,$moneda,$tcambio,$desc); /// Inserta\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsPla->exec_sql($sql);\n\t\tif($rs == 1){\n\t\t\t$respuesta->script('swal(\"Excelente!\", \"Registros guardados satisfactoriamente!\", \"success\").then((value)=>{ window.location.reload(); });');\n\t\t}else{\n\t\t\t$respuesta->script('swal(\"Error\", \"Error de transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n\t\t\t$respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary';\");\n\t\t\t$respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary hidden';\");\n\t\t}\n\t}\n \n return $respuesta;\n}", "title": "" }, { "docid": "0e081773fc7935fbf79c87da3c355057", "score": "0.5382907", "text": "function cotizar($serviciosReferencias) {\r\n\t\r\n\t\r\n\t$cadErrores = '';\r\n\t$cad = 'tela';\r\n\t$cad1 = 'resi';\r\n\t$sistemaNormal = 0;\r\n\t$sistemaDoble = 0;\r\n\t$sistema = 1;\r\n\t$idResiduo = 0;\r\n\t\r\n\t$idTela = array();\r\n\t\r\n\t$resTelas = $serviciosReferencias->traerTelas();\r\n\t$resResiduos = $serviciosReferencias->traerResiduos();\r\n\t\r\n\t$idResiduo = $_POST['refresiduo'];\r\n\r\n\t$refroles = $_POST['refroles'];\r\n\tif ($refroles == 3) {\r\n\t\t$esRevendedor = 1;\r\n\t} else {\r\n\t\t$esRevendedor = 0;\r\n\t}\r\n\r\n\t$sistema = $_POST['normal'];\r\n\t\r\n\t$idTela[] = $_POST['reftelas'];\r\n\t$idTela[] = $_POST['reftelaopcional'];\r\n\t\r\n\t$ancho\t=\t(float)$_POST['ancho'] * 100;\r\n\t$alto\t=\t(float)$_POST['alto'] * 100;\r\n\t\r\n\t\r\n\t/*\r\n\tif ((sizeof($idTela) < 2) and ($sistema == 2)) {\r\n\t\t$cadErrores .= \"_ Debe seleccionar el segundo Material<br>\"; \r\n\t}\r\n\t\r\n\tif ((sizeof($idTela) > 2) and ($sistema == 2)) {\r\n\t\t$cadErrores .= \"_ Selecciono más de un Material<br>\"; \r\n\t}\r\n\t\r\n\tif ((sizeof($idTela) > 1) and ($sistema == 1)) {\r\n\t\t$cadErrores .= \"_ Selecciono más de un Material<br>\"; \r\n\t}\r\n\tif (sizeof($idTela) < 1) {\r\n\t\t$cadErrores .= \"_ Debe seleccionar un Material<br>\"; \r\n\t}\r\n\t*/\r\n\tif ($idResiduo == 0) {\r\n\t\t$cadErrores .= \"_ Debe seleccionar un Residuo<br>\"; \r\n\t}\r\n\t\r\n\t\r\n\t\r\n\tif (($ancho == '') || ($ancho < 20)) {\r\n\t\t$cadErrores .= \"_ Debe cargar un acnho o el ancho a menor a las 20 centimetros<br>\"; \r\n\t}\r\n\t\r\n\tif (($alto == '') || ($alto < 20)) {\r\n\t\t$cadErrores .= \"_ Debe cargar un alto o el alto a menor a las 20 centimetros<br>\"; \r\n\t}\r\n\t\r\n\t\r\n\tif ($cadErrores == '') {\r\n\t\t$total = $serviciosReferencias->cotizar($sistema, $idTela, $idResiduo, $ancho, $alto, $esRevendedor);\r\n\t\techo $total;\r\n\t} else {\r\n\t\techo $cadErrores;\t\r\n\t}\r\n}", "title": "" }, { "docid": "ff8eac78c5557ba590b5540374800f67", "score": "0.5376894", "text": "function CallAPI($method, $url, $data = false)\n{\n $curl = curlemu_init();\n\n switch ($method){\n case \"POST\":\n curlemu_setopt($curl, CURLOPT_POST, 1);\n if ($data){\n curlemu_setopt($curl, CURLOPT_POSTFIELDS, $data);\n }\n break;\n case \"PUT\":\n curlemu_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n // Optional Authentication:\n curlemu_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n // curlemu_setopt($curl, CURLOPT_PORT, 81);\n curlemu_setopt($curl, CURLOPT_URL, $url);\n curlemu_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curlemu_exec($curl);\n\n if(!$result){\n var_dump(curlemu_error($curl));\n }\n curlemu_close($curl);\n return $result;\n}", "title": "" }, { "docid": "5f4e2ca7025fa3b7963d20e126b5eacf", "score": "0.53768104", "text": "function __construct($idInventario=\"\",$serial=\"\",$idDescripcion=\"\",$idMarca=\"\",$idModelo=\"\",$fru=\"\",$productNumber=\"\",$spareNumber=\"\",$ct=\"\",$idPedido=\"\",\n\t$fechaInicio=\"\",$fechaFinal=\"\",$disponible=0,$codigoSap=\"\",$idInventarioUsuario=\"\",$ficha=\"9999999\",$statusActual=\"\",$fechaAsociacion=\"\",\n\t$idInventarioPropiedad=\"\",$idUss=\"\",$idEstado=\"\",$idInventarioUbicacion=\"\",$idDepartamento=\"\",$idSitio=\"\",$especifico=\"\",$SeviceTag=\"\",$ExpressService=\"\") {\n\t\t$this->idInventario;\n\t\t$this->serial=strtoupper($serial);\n\t\t$this->idDescripcion=$idDescripcion;\n\t\t$this->idMarca=$idMarca;\n\t\t$this->idModelo=$idModelo;\n\t\t$this->fru=strtoupper($fru);\n\t\t//*********************************\n\t\t//*********************************\n\t\t$this->ServiceTag=strtoupper($SeviceTag);\n\t\t$this->ExpressService=strtoupper($ExpressService);\n\t\t//*********************************\n\t\t//*********************************\n\t\t$this->productNumber=strtoupper($productNumber);\n\t\t$this->spareNumber=strtoupper($spareNumber);\n\t\t$this->ct=strtoupper($ct);\n\t\t$this->idPedido=$idPedido;\n\t\t$this->fechaInicio=substr($fechaInicio,6,6).\"-\".substr($fechaInicio,3,2).\"-\".substr($fechaInicio,0,2);\n\t\t$this->fechaFinal=substr($fechaFinal,6,6).\"-\".substr($fechaFinal,3,2).\"-\".substr($fechaFinal,0,2);\n\t\t$this->disponible=$disponible;\n\t\t$this->codigoSap=$codigoSap;\n\t\t$this->idInventarioUsuario=$idInventarioUsuario;\n\t\t$this->ficha=$ficha;\n\t\t$this->statusActual=$statusActual;\n\t\t$this->fechaAsociacion=getdate();\n\t\t$this->fechaAsociacion=$this->fechaAsociacion[year].\"-\".$this->fechaAsociacion[mon].\"-\".$this->fechaAsociacion[mday].\" \"\n\t\t.$this->fechaAsociacion[hours].\":\".$this->fechaAsociacion[minutes].\":\".$this->fechaAsociacion[seconds];\n\t\t\n\t\t$this->idInventarioPropiedad=$idInventarioPropiedad;\n\t\t$this->idUss=$idUss;\n\t\t$this->idEstado=$idEstado;\n\t\t$this->idInventarioUbicacion=$idInventarioUbicacion;\n\t\t$this->idDepartamento=$idDepartamento;\n\t\t$this->idSitio=$idSitio;\n\t\t$this->especifico=$especifico;\n\t}", "title": "" }, { "docid": "01f422cb8104218b481b577e5bd3dcd1", "score": "0.53738475", "text": "public function indexAPIRM()\n {\n $response = Http::get('https://datosabiertos.regiondemurcia.es/catalogo/api/action//datastore_search?resource_id=52dd8435-46aa-495e-bd2b-703263e576e7&limit=5&sort=DESCRIPCIONLOCALIDAD desc');\n \n return response()->json(json_decode($response));\n }", "title": "" }, { "docid": "92554adac812357aab650da0cbe446cc", "score": "0.5371886", "text": "public function obtener_argumentos(Request $request)\n {\n $validator = Validator::make($request->all(), [ \n 'archivo_id' => 'required',\n 'num_pagina' => 'required',\n 'motivo' => 'required',\n 'exacto' => 'required',\n 'pos_pagina' => 'required',\n 'apariencia'=> 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['message'=>$validator->errors()], 500);\n }\n\n $archivo = Archivo::find($request->archivo_id);\n if ($archivo == null) {\n return response()->json(['message'=>\"No se encontro el archivo!\"], 500);\n }\n\n if(!Storage::disk($this->disco)->exists($archivo->ruta)) {\n return response()->json(['message'=>\"No se encontro el archivo (FILESYSTEM)!\"], 500);\n }\n\n $reniec_id = config('app.reniec_id');\n $reniec_secret = config('app.reniec_secret');\n\n if ($reniec_id == '' | $reniec_secret == '') {\n return response()->json(['message'=>\"No se encontraron las claves reniec!\"], 500);\n }\n\n $recursos = new Recursos;\n $ubicacion = $recursos->obtener_pagina($archivo, $request->num_pagina, $request->exacto, $request->pos_pagina, $request->apariencia);\n \n $parametros ='{\n \"app\":\"pdf\",\n \"fileUploadUrl\":\"'.url('json/firma/'.$archivo->id).'/cargar\",\n \"reason\":\"'.$request->motivo.'\",\n \"type\":\"W\",\n \"clientId\":\"'.$reniec_id.'\",\n \"clientSecret\":\"'.$reniec_secret.'\",\n \"dcfilter\":\".*FIR.*|.*FAU.*\",\n \"fileDownloadUrl\":\"'.url('json/firma/'.$archivo->codigo).'/descargar\",\n \"fileDownloadLogoUrl\":\"\",\n \"posx\":\"'.$ubicacion[\"x\"].'\",\n \"posy\":\"'.$ubicacion[\"y\"].'\",\n \"outputFile\":\"'.pathinfo($archivo->ruta, PATHINFO_FILENAME).'[R].pdf\",\n \"protocol\":\"T\",\n \"contentFile\":\"'.$archivo->nombre_real.'\",\n \"stampAppearanceId\":\"'.$request->apariencia.'\",\n \"isSignatureVisible\":\"true\",\n \"idFile\":\"archivo_subir\",\n \"fileDownloadStampUrl\":\"'.asset('img/unamad_firma.png').'\",\n \"pageNumber\":\"'.$ubicacion[\"pagina\"].'\",\n \"maxFileSize\":\"15728640\",\n \"fontSize\":\"7\",\t\t\t\n \"timestamp\":\"false\"\n }';\n\n //error_log('ENVIO');\n return base64_encode($parametros);\n //return $parametros;\n }", "title": "" }, { "docid": "6601560bad91df6a2d00bebb26fa7148", "score": "0.537026", "text": "function cl_clientescontato() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientescontato\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f119dcd397c28f84f5ea609a182607b6", "score": "0.53682065", "text": "public function apiAction()\n {\n parent::disableViewAndLayout();\n\n //$apiID : kolerasi ke fn cuacaID, cuacaGlobal, prakGel di controller ini\n $apiID = $this->_request->getParam('id', null);\n\n $data = 'Tidak ada data'; //\n //jangan kosong\n if( !is_null($apiID) ){\n $data = self::$apiID();\n }\n\n //note : callback data html saja\n //karena data di bmkg kadang2 mengandung karakter yg tidak valid\n //ketika dipakai di format json / xml callback\n echo json_encode($data);\n }", "title": "" }, { "docid": "c404dfa83b126601d244d87b75b42ac0", "score": "0.53654754", "text": "function getDatosSolicitud()\n {\n $this->procedimiento = 'adq.f_solicitud_sel';\n $this->transaccion = 'ADQ_GET_DAT_SOL_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n\n $this->setCount(false);\n //$this->setParametro('id_solicitud','id_solicitud','int4');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_solicitud', 'integer');\n $this->captura('num_tramite', 'varchar');\n $this->captura('id_depto', 'integer');\n $this->captura('instruc_rpc', 'varchar');\n\n\n $this->armarConsulta();//echo $this->consulta; exit;\n $this->ejecutarConsulta();\n\n return $this->respuesta;\n }", "title": "" }, { "docid": "9439b9a0d17a8086604649528e7b87fb", "score": "0.53648096", "text": "public function filtrarConsultaCorreosPadres() \n {\n try { \n $content = trim(file_get_contents(\"php://input\")); \n $decoded = json_decode($content, true); \n $decoded = array_filter($decoded); \n\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager()); \n if($decoded['agruparfamilia']) {\n $result = $dbm->ObtenerCorreosPadresFamilia($decoded);\n } else {\n $result = $dbm->ObtenerCorreosPadresAlumnos($decoded);\n } \n\n return Api::Ok(\"Correos #\" . count($result), $result);\n } catch (\\Exception $e) {\n return Api::Error(Response::HTTP_BAD_REQUEST, $e->getMessage()); \n }\n }", "title": "" }, { "docid": "3e5c0d04dda5f8614d4890d1ccdd7067", "score": "0.5364721", "text": "function cargaAdmin($datos)\n{\n global $servidor;\n global $base;\n global $usuarioBD;\n global $pass;\n global $diaSemana;\n $stopFlag = false; //Variable para controlar el ciclo de asignaciones.\n $rawAsignaciones = array(); //Variable para guardar las asignaciones filtradas, sin procesamiento.\n $finalAsignaciones = array(); //Variable para guardar las asignaciones procesadas y listas para cargar al sistema.\n $errorAsignacion=array();\n $estadoCarga = array(); //Variable para guardar el \"log\" de la carga de las asignaciones.\n $toProcess = json_decode($datos, true);\n $getErrors= json_decode($_POST['errors'], true);\n $responsable = \"NULL\";\n if (isset($_POST['responsible'])) {\n $responsable = $_POST['responsible'];\n }\n # TODO: Camios para nueva instancia.\n # Elementos estaticos:\n # idServicio = ID del servicio que pertenece a Estancia en Campus\n # idGrupo = ID del grupo de Administrativos\n # idEspacio = ID del espacio con nombre UVM Campus Gdl Sur\n\n //Recibe los errores encontrados en el parserFIGO\n foreach ($getErrors as $error) {\n $error = array_map('utf8_decode', $error);\n $error = array_map('trim', $error);\n $tempE = array(\"nss\" => $error['nss'], \"nombre\" => $error['nombre'], \"ap\" => $error['apellidoP'], \"am\" => $error['apellidoM'], \"detalle\" => $error['detalle'], \"espacio\" => $error['espacio'], \"fechaInicio\" => $error['fechaInicio'], \"fechaFin\" => $error['fechaFin'], \"periodo\" => $error['periodo'], \"lunes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"martes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"miercoles\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"jueves\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"viernes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"sabado\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"domingo\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"tipo_error\" => $error['tipo_error']);\n for ($x = 0; $x < count($diaSemana); $x++) {\n if (!empty($error[$diaSemana[$x]])) {\n $timeArray = explode(\" \", $error[$diaSemana[$x]], 2);\n $tempE[$diaSemana[$x]]['hi'] = $timeArray[0];\n $tempE[$diaSemana[$x]]['hf'] = $timeArray[1];\n }\n }\n //Guarda errores recibidos del parserFIGPO\n array_push($errorAsignacion, $tempE);\n }\n //Modificar los datos de entrada del POST\n foreach ($toProcess as $data) {\n $data = array_map('utf8_decode', $data);\n $data = array_map('trim', $data);\n //$pattern=\"/^([0-1][0-9]|[2][0-3])[\\:]([0-5][0-9])$/\";//Expresion regular para validar la hora de inicio y fin\n $erroresHorario=0;\n $temp = array(\"nss\" => $data['nss'], \"nombre\" => $data['nombre'], \"ap\" => $data['apellidoP'], \"am\" => $data['apellidoM'], \"detalle\" => $data['detalle'], \"espacio\" => $data['espacio'], \"fechaInicio\" => $data['fechaInicio'], \"fechaFin\" => $data['fechaFin'], \"periodo\" => $data['periodo'], \"lunes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"martes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"miercoles\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"jueves\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"viernes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"sabado\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"domingo\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"tipo_error\" => $data['tipo_error']);\n //Validar Horario \n for ($x = 0; $x < count($diaSemana); $x++) {\n if (!empty($data[$diaSemana[$x]])) {\n $timeArray = explode(\" \", $data[$diaSemana[$x]], 3);\n if (empty($timeArray[0])) {\n $temp['tipo_error'] .= \"Error en la captura de horario de \". $diaSemana[$x] . \", \";\n $temp[$diaSemana[$x]]['hi'] = $timeArray[0];\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\n $erroresHorario++;\n continue;\n } else {\n $temp[$diaSemana[$x]]['hi'] = $timeArray[0];\n if (empty($timeArray[1])) {\n $temp['tipo_error'] .= \"Error en la captura de horario de \". $diaSemana[$x] . \", \";\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\n $erroresHorario++;\n continue;\n } else {\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\n if (strtotime($timeArray[0]) > strtotime($timeArray[1])) {\n $temp['tipo_error'].=\"\".$diaSemana[$x]. \"La hora de entrada es mayor a la hora de salida, \";\n $erroresHorario++;\n continue;\n }\n }\n }\n }\n }\n //Validar formato de fecha\n $tempFI = explode(\"/\", $temp['fechaInicio'], 3);\n $tempFF = explode(\"/\", $temp['fechaFin'], 3);\n $eFI=true;\n $eFF=true;\n if (!checkdate($tempFI[0], $tempFI[1], $tempFI[2])) {\n $temp['Tipo_error'] .= \"Formato de Fecha de Inicio incorrecto, \";\n $eFI=false;\n }\n if (!checkdate($tempFF[0], $tempFF[1], $tempFF[2])) {\n $eFF=false;\n $temp['Tipo_error'] .= \"Formato de Fecha de Fin incorrecto, \";\n }\n if ($erroresHorario!=0 || $eFI==false || $eFF==false ) {\n array_push($errorAsignacion, $temp);\n } else {\n array_push($finalAsignaciones, $temp);\n }\n //Gardar en la variable arrayAsignaciones los registros que pasaron el filtro con la informacion que nos interesa.\n //array_push($finalAsignaciones, $temp);\n }\n if (count($errorAsignacion)!=0) {\n echo json_encode(array(\"s\" =>0, \"m\" => \"Error al cargar FIGPO, el archivo contiene errores\", \"d\" => $errorAsignacion));\n } else {\n if (!$con = mysqli_connect($servidor, $usuarioBD, $pass, $base)) {\n die(\"Error de conexion\");\n } else {\n //$rows=count($finalAsignaciones);\n foreach ($finalAsignaciones as $key => $asignacion) {\n $idPersona = 0;\n $idAsignacion = 0;\n $estadoTemp = \"\";\n ////////////////////////////////////////////////////////////////////////////////Verificar si existe una persona\n ////Si hay concidencia en la busqueda de la persona por NSS\n $sql = \" SELECT ID FROM personas WHERE NSS = '{$asignacion['nss']}' \";\n if ($personaNSS = mysqli_query($con, $sql)) {\n //SI la persona ya existe => Actualizar el campo Activo a 1\n //ELSE => Insertar en la base de datos.\n if (mysqli_num_rows($personaNSS) != 0) {\n $estadoTemp .= \"Persona: <b>\" . $asignacion['nss'] . \"</b> ya existe <br>\";\n while ($row = mysqli_fetch_array($personaNSS)) {\n mysqli_query($con, \"UPDATE personas SET Activo = 1, Detalle = '{$asignacion['detalle']}' WHERE ID = '$row[ID]' \");\n $idPersona = $row['ID'];\n }\n } else {\n $sql = \" INSERT INTO personas (NSS, Nombre, ApellidoP, ApellidoM, Detalle) VALUES ('{$asignacion['nss']}', '{$asignacion['nombre']}', '{$asignacion['am']}', '{$asignacion['ap']}', '{$asignacion['detalle']}')\";\n if (mysqli_query($con, $sql)) {\n if ($idPersona = mysqli_insert_id($con)) {\n $estadoTemp .= \"Nueva Persona Resgistrada: <b>\" . $asignacion['nss'] . \"</b> <br>\";\n $sql = \" INSERT INTO identificador (ID_Persona, ID1) VALUES ('$idPersona', '{$asignacion['nss']}') \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Identificador registrado correctamente <br>\";\n } else {\n $estadoTemp .= \"&emsp;Error al registrar Identificador <br>\";\n }\n } else {\n $estadoTemp .= \"Error al tratar de insertar nueva persona <br>\";\n }\n } else {\n $estadoTemp .= \"Error al tratar de insertar nueva persona <br>\";\n }\n }\n\n ////Registra Area en la tabla servicios.\n $sql=\"SELECT ID FROM servicios where Titulo='{$asignacion['detalle']}' \";\n if ($result = mysqli_query($con,$sql)) {\n if (mysqli_num_rows($result)!=0) {\n $service = mysqli_fetch_assoc($result);\n $service = (int) $service['ID'];\n $estadoTemp .= \"Servicio \".$asignacion['detalle']. \" ya existe <br>\";\n } else {\n $sql=\"INSERT INTO servicios (Codigo, Titulo, ID_Tipo_Servicio, Departamento, Nivel, Activo) VALUES ('AD', '{$asignacion['detalle']}', 1, 'Administrativo', 'AD', 1)\";\n if (mysqli_query($con,$sql)){\n $sql=\"SELECT ID FROM servicios where Titulo='{$asignacion['detalle']}' \";\n $service=mysqli_fetch_assoc(mysqli_query($con,$sql));\n $service = (int) $service['ID'];\n $estadoTemp .= \"Nuevo servicio registrado: [\".$asignacion['detalle'].\"]\";\n } else {\n $estadoTemp .= \"Error al registrar nuevo servicio\";\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar servicio\";\n }\n ////Revisar si existe un espacio registrado\n $sql = \"SELECT ID FROM espacios WHERE Nombre='{$asignacion['espacio']}' \";\n if ($result= mysqli_query($con, $sql)) {\n if (mysqli_num_rows($result)==1){\n $place=mysqli_fetch_assoc($result);\n $place= (int) $place['ID'];\n $estadoTemp.= \"Ya existe el espacio \".$asignacion['espacio'].\".\";\n } else {\n $sql = \"INSERT INTO espacios (Nombre, Capacidad, ID_Tipo, Activo) VALUES ('{$asignacion['espacio']}', 0, 6, 1)\";\n if (mysqli_query($con,$sql)) {\n $sql=\"SELECT ID FROM espacios WHERE Nombre='{$asignacion['espacio']}' \";\n $place=mysqli_fetch_assoc(mysqli_query($con, $sql));\n $place= (int) $place['ID'];\n $estadoTemp .= \"Nuevo espacio \".$asignacion['espacio'].\" registrado\";\n } else {\n $estadoTemp .= \"Error al registrar el espacio \".$asignacion['espacio'].\".\";\n }\n }\n } else {\n $estadoTemp.= \"Error en la busqueda de espacio\";\n }\n ////Revisar si existen el rol 'Administrativo' registrado\n $sql = \"SELECT ID FROM roles WHERE Nombre='Administrativo'\";\n if ($result= mysqli_query($con, $sql)) {\n if (mysqli_num_rows($result)==1){\n $ID = mysqli_fetch_assoc($result);\n $ID = (int) $ID['ID'];\n $estadoTemp .= \"Ya existe rol \".$ID .\".\";\n } else{\n $sql= \"INSERT INTO roles (Nombre, Activo) VALUES ('Administrativo', 1)\";\n if (mysqli_query($con, $sql)) {\n $sql = \"SELECT ID FROM roles WHERE Nombre='Administrativo'\";\n $ID = mysqli_fetch_assoc(mysqli_query($con,$sql));\n $ID = (int) $ID['ID'];\n $estadoTemp .= \"Rol 'Administrativo' registrado correctamente\";\n } else {\n $estadoTemp .= \"Error al registar Rol 'Administrativo'\";\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar rol 'Administrativo'\";\n }\n ////Revisar si existe un rol asignado para un Administrativo\n $sql = \" SELECT * FROM asignacion_roles WHERE ID_Persona = '$idPersona' \";\n if ($rolAsignado = mysqli_query($con, $sql)) {\n if (mysqli_num_rows($rolAsignado) == 0) {\n $sql = \" INSERT INTO asignacion_roles (ID_Rol, ID_Persona) VALUES ('$ID', '$idPersona') \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Rol registrado correctamente <br>\";\n } else {\n $estadoTemp .= \"&emsp;Error al registrar Rol <br>\";\n }\n } else {\n $sql = \" UPDATE asignacion_roles SET ID_Rol='$ID' WHERE ID_Persona='$idPersona' \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Rol actualizado <br>\";\n } else {\n $estadoTemp .= \"&emsp;Error al actualizar Rol <br>\";\n }\n }\n } else {\n $estadoTemp .= \"&emsp;Error al buscar Roles <br>\";\n }\n ////Revisar si existe grupo 'Administrativos'\n $sql=\"SELECT ID FROM grupos where Nombre='Administrativos'\";\n if ($result=mysqli_query($con,$sql)) {\n if (mysqli_num_rows($result)==1) {\n $group = mysqli_fetch_assoc($result);\n $group = (int) $group['ID'];\n $estadoTemp .= \"Grupo 'Administrativos' ya existe\";\n } else {\n $sql=\"INSERT INTO grupos (Nombre, ID_Rol, Activo) VALUES ('Administrativos', '$ID', 1)\";\n if (mysqli_query($con,$sql)) {\n $sql = \"SELECT ID FROM grupos where Nombre='Administrativos'\";\n $group = mysqli_fetch_assoc(mysqli_query($con, $sql));\n $group = (int) $group['ID'];\n $estadoTemp .= \"Grupo 'Administrativos' registrado correctamente\";\n } else {\n $estadoTemp .= \"Error al registrar grupo\";\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar grupo 'Administrativos'\";\n }\n\n } else {\n $estadoTemp .= \"&emsp;Error al buscar Persona por NSS <br>\";\n }\n /////////////////////////////////////////////////////////////Registrar asignaciones\n ////Verificar que la fecha de inicio y fin esten en formato Ingles.\n if ((bool)strtotime($asignacion['fechaInicio']) && (bool)strtotime($asignacion['fechaInicio'])) {\n $tempFI = explode(\"/\", $asignacion['fechaInicio'], 3);\n $tempFF = explode(\"/\", $asignacion['fechaFin'], 3);\n if (checkdate($tempFI[0], $tempFI[1], $tempFI[2]) && checkdate($tempFF[0], $tempFF[1], $tempFF[2])) {\n ////Verificar si existe una asignacion\n $sql = \" SELECT asig.ID FROM asignaciones AS asig\n INNER JOIN servicios AS ser ON asig.ID_Servicio = ser.ID\n INNER JOIN personas AS per on asig.ID_Persona = per.ID\n WHERE ser.ID = '$service' AND per.NSS = '{$asignacion['nss']}'\n AND Periodo = '{$asignacion['periodo']}'\n AND FechaInicio = STR_TO_DATE('{$asignacion['fechaInicio']}', '%m/%d/%Y')\n AND FechaFin = STR_TO_DATE('{$asignacion['fechaFin']}', '%m/%d/%Y') \";\n if ($asignation = mysqli_query($con, $sql)) {\n if (mysqli_num_rows($asignation) != 0) {\n $estadoTemp .= \"Asignación ya registrada <br>\";\n } else {\n ////Registrar nueva asignacion\n $sql = \"INSERT INTO asignaciones (ID_Grupo, ID_Espacio, ID_Servicio, ID_Persona, FechaInicio, FechaFin, Periodo, CRN, ID_Administrativo, Forma) values ('$group', '$place', '$service', '$idPersona', STR_TO_DATE('{$asignacion['fechaInicio']}', '%m/%d/%Y'), STR_TO_DATE('{$asignacion['fechaFin']}', '%m/%d/%Y'), '{$asignacion['periodo']}', '', $responsable, 'figpo') \"; //'{$asignacion['periodo']}', '{$asignacion['crn']}')\";\n if (mysqli_query($con, $sql)) {\n if ($idAsignacion = mysqli_insert_id($con)) {\n $estadoTemp .= \"Nueva Asignacion <br>\";\n } else {\n $estadoTemp .= \"Error al seleccionar asignacion <br>\";\n }\n } else {\n $estadoTemp .= \"Error al tratar de insertar nueva asignacion <br>\";\n }\n\n ////Registrar detalles_asignacion\n for ($x = 0; $x < count($diaSemana); $x++) {\n if ($asignacion[$diaSemana[$x]]['hi'] != \"\" || $asignacion[$diaSemana[$x]]['hf'] != \"\") {\n if ($x == 2) $dia = strtoupper($diaSemana[$x][0]) . $diaSemana[$x][1];\n else $dia = strtoupper($diaSemana[$x][0]);\n $sql = \"INSERT INTO detalle_asignacion (ID_Asignacion, Dia, HoraInicio, HoraFin) VALUES ('$idAsignacion', '$dia', '{$asignacion[$diaSemana[$x]]['hi']}', '{$asignacion[$diaSemana[$x]]['hf']}') \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Dia <b>\" . $diaSemana[$x] . \"</b> de <b>\" . $asignacion[$diaSemana[$x]]['hi'] . \"</b> a <b>\" . $asignacion[$diaSemana[$x]]['hf'] . \"</b> registrado <br>\";\n\n } else {\n $estadoTemp .= \"&emsp;Error al tratar de registrar nuevo Detalle Asignacion <br>\";\n }\n } else continue;\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar asignaciones <br>\";\n }\n } else {\n $estadoTemp .= \"Error en el formato de Fecha Inicio o Fecha Fin<br>\";\n }\n } else {\n $estadoTemp .= \"Error en el formato de Fecha Inicio o Fecha Fin<br>\";\n }\n\n $estadoTemp .= \"<hr>\";\n array_push($estadoCarga, $estadoTemp);\n }\n echo json_encode(array(\"s\" => 1, \"m\" => \"Carga correcta de Administrativos\", \"d\" => $estadoCarga));\n }\n\n }\n mysqli_close($con);\n}", "title": "" }, { "docid": "8c28903d8b9186c2663360c54c5a6c0d", "score": "0.5363422", "text": "function cargarDatosProyecto() {\n //verifica el codigo de proyecto\n $codProyecto=(isset($_REQUEST['codProyecto'])?$_REQUEST['codProyecto']:'');\n if($codProyecto=='')\n {\n echo \"No seleccionó proyecto\";exit;\n }\n //borra los registros de estudiantes del proyecto\n $variables=array('CAMPO'=>'ins_est_cra_cod',\n 'VALOR_CAMPO'=>$_REQUEST['codProyecto']);\n $borradas=$this->borrarDatosPrecarga($variables);\n echo \"Se han borrado \".$borradas.\" registros de \";\n //consulta datos delproyecto\n $this->carreras=$this->consultarDatosProyecto($codProyecto);\n echo $this->carreras[0]['NOMBRE_CARRERA'].\".<br>\";\n $this->totalEstudiantes=0;\n $this->consultarRequisitos(); \n $this->consultarParametros();\n $this->consultarEspaciosCancelados();\n $this->espaciosEquivalentes=$this->consultarEspaciosEquivalentes();\n //ejecuta la carga para el proyecto\n $this->ejecutarCargaPorProyecto($this->carreras[0]);\n //finaliza reporte\n echo \"TOTAL ESTUDIANTES: \".$this->totalEstudiantes.\"<br>\";\n $this->volver();\n exit;\n }", "title": "" }, { "docid": "3e9589e0519218e22d11e54b5e8ea92b", "score": "0.5347954", "text": "function respuesta($status, $mensaje, $datos)\n {\n header(\"HTTP/1.1 $status $mensaje\");\n $response['status'] = $status;\n $response['disponibles'] = $mensaje;\n $response['habitaciones_disponibles'] = $datos;\n \n $json_response = json_encode($response);\n echo $json_response;\n }", "title": "" }, { "docid": "184a112d06fbf9858d13556e5716fc61", "score": "0.5347343", "text": "function NominaWEBRechazoMotivo($idNomina){\n\ttry{\n\t\tglobal $conn;\n\t\t\n\t\t$params = array(\":IDNOMINA\" => $idNomina);\t\n\t\t\n\t\t$sql = \"SELECT r.mr_descripcion, e.ew_observacionesrechazo\n\t\t\t\t FROM hys.hew_establecimientoweb e\n\t\t INNER JOIN \t hys.hmr_motivorechazonomina r ON e.ew_idmotivorechazo = r.mr_id\n\t\t\t\t WHERE e.ew_id = :IDNOMINA\";\n\t\t\n\n\t\t@$stmt = DBExecSql($conn, $sql, $params);\t\n\t\t\n\t\twhile ($row = DBGetQuery($stmt)){\t\n\t\t\n\t\t\t$desc = utf8_encode($row['MR_DESCRIPCION']);\n\t\t\t$obser = utf8_encode($row['EW_OBSERVACIONESRECHAZO']);\n\t\t\t\t\n\t\t\t$row1 = array(\"MR_DESCRIPCION\" => $desc, \n\t\t\t\t\t\t\t\"EW_OBSERVACIONESRECHAZO\" => $obser);\n\t\t\t\t\t\t\t\n\t\t\treturn json_encode($row1);\t\t\n\t\t}\n\t\t\t\t\n\t\treturn json_encode(array(\"MR_DESCRIPCION\" => \"SIN DATOS\", \"EW_OBSERVACIONESRECHAZO\" => \"SIN DATOS\" ));\t\n\t\t\n\t}catch (Exception $e) {\t\t\n\t\tthrow new Exception(\"Error \".$e->getMessage() ); \n\t}\t\n}", "title": "" }, { "docid": "9300360077163fa80079f67c8bd5c9f8", "score": "0.53454655", "text": "public function contaLancamentosCartao(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"conta_id=55632&data_inicio=\".$this->p_dia.\"&data_fim=\".$this->h_dia.\"&tipo_view=count\");\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->n_lancamentos_cartao = json_decode($result, true);\n\n curl_close($ch);\n }", "title": "" }, { "docid": "27230a7b13286e98591d8985a6c23a6c", "score": "0.5345081", "text": "function Buscar_Conducta($codigo){\n $respuesta = new xajaxResponse();\n $ClsCon = new ClsConducta();\n //$respuesta->alert(\"$codigo\");\n\t$result = $ClsCon->get_conducta($codigo);\n\tif(is_array($result)){\n\t\t\tforeach($result as $row){\n\t\t\t\t\t$codigo = $row[\"con_codigo\"];\n\t\t\t\t\t$respuesta->assign(\"codigo\",\"value\",$codigo);\n\t\t\t\t\t$pensum = $row[\"con_pensum\"];\n\t\t\t\t\t$respuesta->assign(\"pensum\",\"value\",$pensum);\n\t\t\t\t\t$nivel = $row[\"con_nivel\"];\n\t\t\t\t\t$respuesta->assign(\"nivel\",\"value\",$nivel);\n\t\t\t\t\t$grado = $row[\"con_grado\"];\n\t\t\t\t\t$respuesta->assign(\"grado\",\"value\",$grado);\n\t\t\t\t\t$seccion = $row[\"con_seccion\"];\n\t\t\t\t\t$respuesta->assign(\"grado\",\"value\",$seccion);\n\t\t\t\t\t$alumno = trim($row[\"con_alumno\"]);\n\t\t\t\t\t$respuesta->assign(\"alumno\",\"value\",$alumno);\n\t\t\t\t\t$pipi = trim($row[\"con_cant_pipi\"]);\n\t\t\t\t\t$respuesta->assign(\"pipi\",\"value\",$pipi);\n\t\t\t\t\t$obs = utf8_decode($row[\"con_observaciones\"]);\n\t\t\t\t\t$respuesta->assign(\"obs\",\"value\",$obs);\n\t\t\t}\t\n\t\t}\n\t\t\t//abilita y desabilita botones\n\t\t\t$respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary';\");\n\t\t\t$respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary hidden'\");\n\t\t\t\n\t\t\t$respuesta->script('document.getElementById(\"alumno\").focus();');\n\t\t\t$respuesta->script(\"cerrar();\");\n return $respuesta;\n}", "title": "" }, { "docid": "6a8a56a09466f979bc09214552c00350", "score": "0.5343437", "text": "public function getCertificacionSegip($data)\n {\n $respuesta = array(\n 'respuesta' => '',\n 'sw' => 0\n );\n\n $error1 = FALSE;\n //dd($data);\n // === OPERACION ===\n try\n {\n\n $params = [\n 'encoding' => 'UTF-8'\n ];\n\n $cliente = new \\SoapClient('http://172.27.104.3:86/ServicioExternoInstitucion.svc?singleWsdl', $params);\n //dd($cliente);\n $parametros = array(\n 'pCodigoInstitucion' => 4,//env('SEGIP_CODIGO_INSTITUCION'),\n 'pUsuario' => 'pablo.corral',//env('SEGIP_USUARIO'),\n 'pContrasenia' => 'Corral2018',//env('SEGIP_CONTRASENIA'),\n 'pClaveAccesoUsuarioFinal' => 'P33638371',//env('SEGIP_CLAVE_ACCESO_USUARIO_FINAL'),\n 'pNumeroAutorizacion' => '',\n 'pNumeroDocumento' => $data['n_documento'],\n 'pComplemento' => $data['complemento'],\n 'pNombre' => $data['nombre'],\n 'pPrimerApellido' => $data['ap_paterno'],\n 'pSegundoApellido' => $data['ap_materno'],\n 'pFechaNacimiento' => date(\"d/m/Y\", strtotime($data['f_nacimiento']))\n );\n\n $respuesta_soap1 = (array) $cliente->ConsultaDatoPersonaCertificacion($parametros);\n //dd($respuesta_soap1);\n $respuesta_soap = (array) $respuesta_soap1[\"ConsultaDatoPersonaCertificacionResult\"];\n }\n catch (Exception $e)\n {\n $respuesta['respuesta'] .= \"ERROR EN EL SOAP\";\n $error1 = TRUE;\n }\n\n if( ! $error1)\n {\n $respuesta['respuesta'] = $respuesta_soap;\n $respuesta['sw'] = 1;\n\n }\n\n return $respuesta;\n }", "title": "" }, { "docid": "67cfa5e7acc0d9ddee18b4d65413c3b5", "score": "0.53387725", "text": "function generaCodigotodos() {\n $actor = $this->AutoLoadModel('actor');\n $dataActor = $actor->listaTodosActores();\n $cantidad = count($dataActor);\n $cont = 0;\n $cont2 = 0;\n for ($i = 0; $i < $cantidad; $i++) {\n $idactor = $dataActor[$i]['idactor'];\n $filtro = \"idactor='$idactor'\";\n $data['codigo'] = 'GC' . str_pad($idactor, 5, '0', STR_PAD_LEFT);\n $exito = $actor->ActualizaActor($data, $filtro);\n if ($exito) {\n $cont++;\n } else {\n $cont2++;\n }\n }\n echo 'Cantidad Registros correctos :' . $cont;\n echo 'Cantidad Errores : ' . $cont2;\n }", "title": "" }, { "docid": "c9b544ce1d86f16269105ae0c98cabbb", "score": "0.5338174", "text": "function obtenerdatos($conn2, $fechainicio, $variable)\n\t{\n\t// Creamos una sentencia preparada para evitar inyecciones SQL\n //Obtenemos la lista del IVR que contengan un UCID y especificamos el Rango de Fechas en nuestra Sentencia Preparada\n\t$stmt = $conn2->prepare(\"SELECT logid, split, i_availtime, row_date FROM DAGENT\nwhere row_date = :fechainicio\nand logid=:variable\n;\");\n\t// Enlazamos las variables a nuestros apuntadores para Prepared Statements y Ejecutamos el Query\n\t$stmt->execute([':fechainicio' => $fechainicio, ':variable' => $variable]);\n //Creamos un Objeto con los resultados de la consulta\n\t$array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n //Recorremos este objeto y vamos agregando los resultados de la columna ucid a un Array\n //Si este array se encuentra vacio lanzamos el error que no se encuentran reusltados en la Consola\n\tif (!$array) exit('No hay resultados');\n //Designamos una variable con el objeto base\n\techo json_encode($array);\n //Limpiamos Consultas\n\t$stmt = null;\n\n //Cerramos conexiones\n $conn = null;\n\n\t}", "title": "" }, { "docid": "14f2e7d26e6a457bf380d21b651528a4", "score": "0.5334596", "text": "public function AgregarRfcFisicaOtra(){\n\n\t\t\t$tabla = \"clientes\";\n\n\t\t\t$datos = array(\"rfc\"=>$_POST[\"nuevoRFC_F\"],\n\t\t\t\t\t\t\t\"nombre\" => $_POST[\"nuevoNombre_F\"],\n\t\t\t\t\t\t\t\"app\" => $_POST[\"nuevoApellidoP_F\"],\n\t\t\t\t\t\t\t\"apm\" => $_POST[\"nuevoApellidoM_F\"],\n\t\t\t\t\t\t\t\"correo\" => $_POST[\"nuevo_Corrreo_F\"],\n\t\t\t\t\t\t\t\"calle\"=>$_POST[\"nuevoCalle_F\"],\n\t\t\t\t\t\t \"ext\"=>$_POST[\"nuevoExterior_F\"],\n\t\t\t\t\t\t \"intt\"=>$_POST[\"nuevoInterior_F\"],\n\t\t\t\t\t\t \"colonia\"=>$_POST[\"nuevoColonia_F\"],\n\t\t\t\t\t\t \"ciudad\"=>$_POST[\"nuevoCiudad_F\"],\n\t\t\t\t\t\t \"estado\"=>$_POST[\"nuevoEstado_F\"],\n\t\t\t\t\t\t \"codigo\"=>$_POST[\"nuevoPostal_F\"],\n\t\t\t\t\t\t \"tel1\"=>$_POST[\"nuevoNumero1_F\"],\n\t\t\t\t\t\t\t\"tel2\" => $_POST[\"nuevoNumero2_F\"]);\n\n\t\t\t$respuesta = ModeloClientes::mdlAgregarClienteFisicaOtro($tabla, $datos);\n\t\t\t$tabla2 =\"direccion_fiscal\";\n\n\t\t\t$result = ModeloClientes::mdlAgregarDomicilioFisicaOtra($tabla2, $datos,$respuesta);\n\n\t\t echo json_encode($result);\n\t\t\t\n\t\t\t\n\n\t}", "title": "" } ]
160aa472c8fe1dfc35be3dcd5f65b0e8
/ prints error message
[ { "docid": "2e60fa21b00ecc51ffb9891c67acab9f", "score": "0.0", "text": "private static function error($controller, $action, $msg=NULL){\n echo \"<h1>Error occurred</h1><p>$msg</p>\";\n exit(0);\n }", "title": "" } ]
[ { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.7772783", "text": "public function error();", "title": "" }, { "docid": "97b8a0cf9a65d4ed45572cc26f8ddf04", "score": "0.76964396", "text": "abstract public function error();", "title": "" }, { "docid": "97b8a0cf9a65d4ed45572cc26f8ddf04", "score": "0.76964396", "text": "abstract public function error();", "title": "" }, { "docid": "e5abc7b002233bb845c13e8be8411216", "score": "0.7447953", "text": "public abstract function error();", "title": "" }, { "docid": "2013672459594e2dac00626e788b7a3c", "score": "0.7426822", "text": "public function errorf();", "title": "" }, { "docid": "ffed6ccf6c1102c5ff8a6241738c6e91", "score": "0.7381607", "text": "abstract protected function get_error();", "title": "" }, { "docid": "ad734de73af1f196423c8d5c65d89596", "score": "0.73674643", "text": "public static function customErrorMsg()\n {\n echo \"<p>An error occurred, The error has been reported.</p>\";\n exit;\n }", "title": "" }, { "docid": "cce703e01282b378922d081b8c98a860", "score": "0.73556876", "text": "public static function error($message) {}", "title": "" }, { "docid": "627ed13816689ccc28bb69b6e729d502", "score": "0.734219", "text": "function error_found(){\n //echo \"<b>Custom error:</b> [$errno] $errstr<br>\";\n //echo \" Error on line $errline in $errfile<br>\";\n}", "title": "" }, { "docid": "bfe7b878a3bf0817fa82c185c264e22d", "score": "0.730539", "text": "public function output_errors()\n {\n }", "title": "" }, { "docid": "5ff45d9b6fb826127dad9a258407db80", "score": "0.7300101", "text": "function error() \r\n\t{\r\n\t\tassert(FALSE);\r\n\t}", "title": "" }, { "docid": "15854e4921ec85662f5704cff062c93d", "score": "0.72812223", "text": "function error_msg()\n\t{\n\t\t//How did the user get here? Must've been up to no good.\n\t\techo \"<div class='invalid' align='center'>Error: Invalid information.</div><br>\n\t\t\t<div align='center'>If you feel you reached this in error, please contact webmaster@footesbooks.com</div>\";\n\t}", "title": "" }, { "docid": "3284b1b62146ad1163842b0cf5b07747", "score": "0.72491133", "text": "public function error()\n\t{\n\t\t$numargs = func_num_args();\n\t\t$arg_list = func_get_args();\n\n\t\tif($this->logLevel >= Logger::$LOG_ERRORS)\n\t\t{\n\t\t\t$msg = \"[ERROR]\";\n\t\t\tfor ($i = 0; $i < $numargs; $i++)\n\t\t\t{\t\t\t\n\t\t\t\t$msg .= \" \".$this->toString($arg_list[$i]) ;\n\t\t\t}\n\t\t\t$this->save($msg);\n\t\t}\n\t}", "title": "" }, { "docid": "f285078d24a1f04655ecd14f8ce15ce9", "score": "0.72156316", "text": "function _error($message = null) {\r\n\t\tif ($message === null) $message = $this->lang->line('Invalid API request');\r\n\t\t$this->_output(array('error' => $message));\r\n\t}", "title": "" }, { "docid": "13e9e2accfdfb48eb67d5bc09ef097d2", "score": "0.7210492", "text": "function customError ($errno, $errstr, $error_file, $error_line, $error_context)\n\t{\n\t\techo \"<br><b>Error:</b> [$errno] $errstr<br />\";\n\t\techo \"Error: $error_file $error_line <br>\";\n\t\techo \"Error: $error_context <br>\";\n\t\techo \"Ending Script\";\n\t\tdie();\n\t}", "title": "" }, { "docid": "28b2486ddae0937d5324f03270d31efc", "score": "0.7190932", "text": "function customError($errno, $errstr)\n{\necho \"\n<b>\nError:\n</b>\n[$errno] $errstr\";\n}", "title": "" }, { "docid": "e394de4c56c6fd6618f5bbf97d0c070b", "score": "0.7176575", "text": "function error($errstr) {\n echo \"<b>Error:</b> $errstr\";\n}", "title": "" }, { "docid": "6af0c2f11dd0b773479971975b73a01a", "score": "0.71695447", "text": "function displayerror($error) {\r\n echo \"<b>Error</b>: $error\";\r\n }", "title": "" }, { "docid": "4208ede59d4f903253cb755a691d9a07", "score": "0.7156844", "text": "private function error()\n {\n $this->checkPassword();\n $this->checkPasswordFormat();\n $this->ifPasswordsAreDifferent();\n }", "title": "" }, { "docid": "d96caa7bbaf5f2892f18fea08c48669d", "score": "0.7146473", "text": "public function error_msg_print() {\r\n echo \"<hr>\";\r\n for ($i=0; $i <count($this->err_msgs); $i++) {\r\n echo $this->err_msgs[$i];\r\n }\r\n }", "title": "" }, { "docid": "ce0cf4e976c08c0969250d95d2bb0d2b", "score": "0.7145055", "text": "public function error($message) {\n // TODO: jeo - we need to use stderr for these.\n echo $this->formatDate( time() ) . ' - ' . $message . \"\\n\";\n }", "title": "" }, { "docid": "a77406bd22f19fef97d9667d51071111", "score": "0.71446735", "text": "function error($msg = NULL) {\n\tif ($msg) {\n\t\techo \"Error: \" . $msg; \n\t} else {\n\t\techo \"0\"; \n\t}\t\n\tdie(); \n}", "title": "" }, { "docid": "4cb788d697890ba0e0f6f2fe11f3a36b", "score": "0.71444744", "text": "function printError(int $code) : void\n {\n $begin = '<h1>';\n $message = '';\n $end = '</h1>';\n\n switch($code)\n {\n case 0: break;\n case 1: $message = 'Please provide input.';\n break;\n case 2: $message = 'Input is not valid.';\n break;\n case 3: $message = 'Awaiting input...';\n break;\n default: $message = 'Something went wrong.';\n break;\n }\n print($begin . $message . $end);\n }", "title": "" }, { "docid": "eb3d532b89cf8b92cb2b474c1d48e719", "score": "0.7139431", "text": "public function printErrorLog() {}", "title": "" }, { "docid": "f40dc28927cbe4344e218f6eb43f007d", "score": "0.7131707", "text": "protected function error($message)\n {\n $this->output->writeln(\"<error>{$message}</error>\");\n }", "title": "" }, { "docid": "76155793a79e49d6aabe51fbe5fc1182", "score": "0.71190923", "text": "public function error(): string;", "title": "" }, { "docid": "76155793a79e49d6aabe51fbe5fc1182", "score": "0.71190923", "text": "public function error(): string;", "title": "" }, { "docid": "d0bc560eb6abbd4bbc705719312c4037", "score": "0.71062565", "text": "function printError(){\n?>\t<h1>Error! Invalid data.</h1>\n\t<p>We're sorry. You submitted invalid user information. Please go back and try again.</p>\n<?php }", "title": "" }, { "docid": "687cabe540f6f44bf05f0c31cf72537c", "score": "0.7100675", "text": "function error($text) {\n echo \"<pre>\";\n var_dump( $text );\n echo \"</pre>\";\n die('ok');\n }", "title": "" }, { "docid": "f76d61db6bcd528ee58b947269693111", "score": "0.7099591", "text": "public function error()\n {\n }", "title": "" }, { "docid": "dffde826001e49c829d4c4913ea816c1", "score": "0.70992815", "text": "function ShowLastError()\n {\n printf(\"@E@%s failed\\nError Code: %d\\nReason: %s\\n\\n\",\n $this->errorLine,\n $this->errorNumber,\n $this->errorReason);\n }", "title": "" }, { "docid": "29783e5478a41a346dfe691f2459b480", "score": "0.7096681", "text": "public function display_errors()\n {\n }", "title": "" }, { "docid": "8858b6b719e468cb58bf784b5b1da22d", "score": "0.7094188", "text": "public function display_error()\n {\n $this->error->display();\n }", "title": "" }, { "docid": "ff9ec3aaf84e978ce13281945fbe2e33", "score": "0.7093242", "text": "abstract protected function displayFailure($msg);", "title": "" }, { "docid": "1b48f7edf04f3eeb640679fc93dcf749", "score": "0.70926917", "text": "function usageError($message)\n {\n echo \"Error: $message\\n\\n\";\n exit(1);\n }", "title": "" }, { "docid": "1b48f7edf04f3eeb640679fc93dcf749", "score": "0.70926917", "text": "function usageError($message)\n {\n echo \"Error: $message\\n\\n\";\n exit(1);\n }", "title": "" }, { "docid": "d48b73c9c201e670f191f6ba831666ab", "score": "0.70892715", "text": "function PrintError($error) {\r\n print('<p><font color=\"FF0000\">' . $error. '</font></p>');\r\n}", "title": "" }, { "docid": "c4e885d5f997b3597fb9cbe2d5e9ec89", "score": "0.70887804", "text": "public function error()\n {\n $args = func_get_args();\n foreach ($args as $d) {\n switch (true) {\n case (is_string($d)) :\n echo $d;\n break;\n case (is_array($d)) :\n print_r($d);\n break;\n default:\n var_dump($d);\n break;\n }\n echo PHP_EOL;\n }\n }", "title": "" }, { "docid": "3ed0bd2a3a72c8764d331ed46bcf133d", "score": "0.70802027", "text": "function handle_error($msg, $ex) {\n \theader(\"Content-Type: text/plain\");\n \tprint (\"{$msg}\\n\");\n \tprint (\"Error details: $ex \\n\");\n \tdie();\n }", "title": "" }, { "docid": "4cd248ecac96e2610a34b948caca28b2", "score": "0.70777136", "text": "function customError($errno, $errstr) {\n echo \"<b>Error:</b> [$errno] $errstr<br>\";\n die();\n}", "title": "" }, { "docid": "4aba7c0a4f1c1a8d306f839f1f589ed8", "score": "0.70764923", "text": "function show_error() {\n if ( $this->ERROR == 'wordpress' ) {\n print_string( 'new_feed_wordpress', 'bimtwo' );\n }\n\n // make sure there is an error\n if ( ! $this->simplepie->error() ) {\n return;\n }\n\n $error = $this->simplepie->error();\n\n // simplepie couldn't find a feed\n if ( preg_match( \"!^A feed could not be found at !\", $error )) {\n print_string( \"new_feed_nofound_error\", 'bimtwo' );\n } else if ( preg_match( \"!time out after!\", $error )) {\n print_string( \"new_feed_timeout_error\", 'bimtwo' );\n } else {\n print_string( \"new_feed_noretrieve_error\", 'bimtwo' );\n }\n }", "title": "" }, { "docid": "fafbe88e9a290be816569b3dbc45ab04", "score": "0.70719904", "text": "public function command_error();", "title": "" }, { "docid": "70d7c67fa8bc9cca7254f1d2f19ec664", "score": "0.7066597", "text": "function error($message) {\n echo $message;\n}", "title": "" }, { "docid": "60f42d5dd833c9e28abfcac5ceda21de", "score": "0.7059789", "text": "function error_string();", "title": "" }, { "docid": "e7f309215c28e5e89ee2be8f120a10d1", "score": "0.70486474", "text": "function report_error( $msg ) {\n\tprint '<span style=\"color:red;\">Error: </span>'.$msg;\n exit;\n}", "title": "" }, { "docid": "7737726ca91262359ad7d935186f0c2c", "score": "0.7027198", "text": "public function actionError() {\n\t\techo \"error\";\n\t}", "title": "" }, { "docid": "0a3de2322493bd8f36df78466d7fa04e", "score": "0.7022906", "text": "public function errorInfo();", "title": "" }, { "docid": "ae0b36bd13cdfec491158520d1351848", "score": "0.7022449", "text": "static function Error($X){ die(\"<b>Error:</b> $X\"); }", "title": "" }, { "docid": "b9305da8f276931b73c5489a9be941a3", "score": "0.70217925", "text": "public function get_error_message()\n {\n }", "title": "" }, { "docid": "fe1dba34260f1fe89a286fa653df7790", "score": "0.7016594", "text": "function printe($msg) {\r\n\tprintf(\"<h1>Debug Error:</h1><p>%s</p>\", $msg);\r\n\texit(1);\r\n}", "title": "" }, { "docid": "6e7818b9ef90c29197df49afc36b900b", "score": "0.700828", "text": "abstract public function action_error ();", "title": "" }, { "docid": "452a23dace44bbdc649a757224ed2c07", "score": "0.7007079", "text": "function error($msg) { trigger_error($msg, E_USER_ERROR); }", "title": "" }, { "docid": "c7a8dec8dc74e35b0efe031ef20eceb1", "score": "0.700429", "text": "function paintError($message) {\n parent::paintError($message);\n print \"<span class=\\\"fail\\\">Exception</span>: \";\n $breadcrumb = $this->getTestList();\n array_shift($breadcrumb);\n print implode(\" -&gt; \", $breadcrumb);\n print \" -&gt; <strong>\" . $this->_htmlEntities($message) . \"</strong><br />\\n\";\n }", "title": "" }, { "docid": "1acdc1c4d19a82934fe0f36b7843765c", "score": "0.6999709", "text": "protected function error($nvae) { ; }", "title": "" }, { "docid": "f9aa14e3fd40c6c962b7766690aedab3", "score": "0.698872", "text": "public static function err($message = '') {\n echo '<pre>';\n throw new exception('Error: ' . $message\n ); \n }", "title": "" }, { "docid": "f9aa14e3fd40c6c962b7766690aedab3", "score": "0.698872", "text": "public static function err($message = '') {\n echo '<pre>';\n throw new exception('Error: ' . $message\n ); \n }", "title": "" }, { "docid": "940c818ea28f3b5094abd8959c70cd09", "score": "0.6984316", "text": "function displayError($step) {\n\techo '<h2>An error occurred in step '.$step.'</h2>';\n}", "title": "" }, { "docid": "69e17149cae4e6a0b69ec8083b4fe208", "score": "0.6976827", "text": "function print_error($message) {\n script_print(\" ERROR: $message\\n\", SCRIPT_COLOR_FAIL);\n}", "title": "" }, { "docid": "3a5e4f0003af3e5e5d1ec551da777993", "score": "0.69710326", "text": "public function log_errors()\n {\n }", "title": "" }, { "docid": "2aa49ea55366f8f638bee325cbece738", "score": "0.69611895", "text": "function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'error');\n }", "title": "" }, { "docid": "2aa49ea55366f8f638bee325cbece738", "score": "0.69611895", "text": "function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'error');\n }", "title": "" }, { "docid": "2aa49ea55366f8f638bee325cbece738", "score": "0.69611895", "text": "function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'error');\n }", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.6934754", "text": "public function errors();", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.6934754", "text": "public function errors();", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.6934754", "text": "public function errors();", "title": "" }, { "docid": "fc9db30d7aa24198d0dbd3eac22c2f39", "score": "0.6932473", "text": "public function errorShow()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "e24e114ac7540ef603f313eb2fde5fa4", "score": "0.69317836", "text": "function getErrorMsg();", "title": "" }, { "docid": "fc9ac5914173a638a7e667951ec7aebc", "score": "0.69301856", "text": "function died($error) {\n echo \"Please complete all the required fields to continue \";\n echo $error.\"<br /><br />\";\n echo \"Please go back and fix these errors.<br /><br />\";\n die();\n }", "title": "" }, { "docid": "5d99bd64d5565e19cb3dfef34e9ff679", "score": "0.69244796", "text": "public function error($string) {\n $this->output->writeln(\"<error>$string</error>\");\n }", "title": "" }, { "docid": "8e1969c09955b126ac2162b8fd83cfa8", "score": "0.69214606", "text": "function error($description)\n{\n html_start();\n echo \"<pre>\\n\";\n echo htmlentities($description);\n echo \"\\n\";\n print_debug_backtrace();\n html_end();\n exit;\n}", "title": "" }, { "docid": "488d17c6fd48f832c9a7d8442c3aa62c", "score": "0.6919378", "text": "public function getError(){\n\n // ve(\"show_error = \".self::$show_error);\n\n if(self::$show_error){\n\n echo \"<pre dir='ltr'>\";\n if(self::$db_error){\n foreach (self::$db_error as $key => $error) {\n pre(\"<b>- DB</b>: \".__METHOD__.\"[ \".self::$target.\" ] <u>\".$error.\"</u>\",'left','ltr','#F33000');\n // trigger_error(self::$target.\" \".$error) ; //set as php runtime error.\n }\n }else{\n echo \"no Errors\";\n }\n echo \"</pre>\";\n }\n }", "title": "" }, { "docid": "e009fd0969642a99a9ae546bcdc1b3e6", "score": "0.6917245", "text": "function Error($msg){\r\n\r\n\t // Show the error\r\n\t echo('[-] '.trim($msg).\"\\n\");\r\n }", "title": "" }, { "docid": "e9d8968ee77cfff919c67c0dfb009454", "score": "0.6916132", "text": "function print_errors($msg) {\n header(\"HTTP/1.1 400 Invalid Request\");\n header(\"Content-type: text/plain\");\n echo $msg;\n }", "title": "" }, { "docid": "8bf961a0ae7897e6d09255897625934a", "score": "0.6908824", "text": "protected function errorAction() {}", "title": "" }, { "docid": "b2735dada6e5a448bca31dc8b26ab652", "score": "0.6906669", "text": "public function error($message);", "title": "" }, { "docid": "5bdb07ad8097cbec6055190b9d9f9b19", "score": "0.6904187", "text": "function err($string)\n{\n\t// Annoying PHP: we need to import global variables here...\n\tglobal $title;\n\tif (NONINTERACTIVE) error($string);\n\n\trequire(LIBWWWDIR . '/header.php');\n\n\techo \"<h2>Submit - error</h2>\\n\\n\";\n\n\techo '<div id=\"uploadstatus\">';\n\tlogmsg(LOG_WARNING, $string);\n\techo '</div>';\n\n\trequire(LIBWWWDIR . '/footer.php');\n\texit;\n}", "title": "" }, { "docid": "640e713fe52c177e0cc4aeedbb36d412", "score": "0.68889695", "text": "public static function error($message) {\r\n self::writeLine('ERROR | ' . $message);\r\n }", "title": "" }, { "docid": "ec7df0d3237333e4aefdc577a1ae89e2", "score": "0.6885041", "text": "abstract public function getMsgError();", "title": "" }, { "docid": "f62e4a418633b88a019ce86c4d7dd985", "score": "0.68810546", "text": "public function getError ();", "title": "" }, { "docid": "dfdee70032cedf2ef9a199158ed8cdaa", "score": "0.6867589", "text": "private function error()\n\t{\n\t\t$file = '';\n\t\t$line = 0;\n\n\t\t$message = 'Illegal use of $' . $this->name . '. You must use the request class to access input data. Found in %s on line %d. This error message was generated by deactivated_super_global.';\n\n\t\t$backtrace = debug_backtrace();\n\t\tif (isset($backtrace[1]))\n\t\t{\n\t\t\t$file = $backtrace[1]['file'];\n\t\t\t$line = $backtrace[1]['line'];\n\t\t}\n\t\ttrigger_error(sprintf($message, $file, $line), E_USER_ERROR);\n\t}", "title": "" }, { "docid": "3535075ee5f13ad58a94d734d315f652", "score": "0.6863229", "text": "function died($error) {\n echo \"มีข้อผิดพลาดเกิดขึ้น\";\n echo \"ด้านล่างนี้คือข้อผิดพลาด<br /><br />\";\n echo $error.\"<br /><br />\";\n echo \"กรุณาแก้ข้อผิดพลาดเหล่านี้<br /><br />\";\n die();\n }", "title": "" }, { "docid": "956aefd4a2adaa335d5ecb92c0e12321", "score": "0.68611866", "text": "function error($message) \n {\n if ( $this->_level | self::ERROR ) {\n $this->_app->getService('response')->writeLine(\n 'ERROR : ' . $message\n );\n } \n }", "title": "" }, { "docid": "1874fee03259d475d4e629d7dd50ef70", "score": "0.68583316", "text": "function error($params) {\n\t\textract($params, EXTR_OVERWRITE);\n\t\t$this->stderr($code . $name . $message.\"\\n\");\n\t\t$this->_stop(1);\n\t}", "title": "" }, { "docid": "61e01867231f2b93a509f61acbc04212", "score": "0.6856762", "text": "function print_errors($error_nodes) {\n\t\tprint \"There was an error processing your request:\\n\";\n\t\tforeach ($error_nodes as $error) {\n\t\t\tprint \" Error code: \" . $error->Code . \"\\n\";\n\t\t\tprint \" Error message: \" . $error->Message . \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "1954bd3a446fa4183b029739790e3492", "score": "0.68472767", "text": "private function error($message)\n {\n $this->write('<error>'.$message.'</error>', 'white', 'red');\n }", "title": "" }, { "docid": "db3f6ccacc47eaac8ba46f28ebb07f0d", "score": "0.6840599", "text": "function outputURLError()\r\n {\r\n\r\n $this->outputError(\"400\", \"error\", \"Query failed\", \"URL string has incorrect format.\");\r\n\r\n }", "title": "" }, { "docid": "6371c7b26393139c1cf96bccacb6e12d", "score": "0.6840179", "text": "function displayError($errMessage)\n {\n global $args;\n\n if (is_writable('./')) {\n $f=fopen(\"ydbmigrate.lasterror\",\"w\");\n fwrite($f,$errMessage);\n fclose($f);\n }\n\n $args->setArgValue('help',__TRUE__);\n die(\"\\n$errMessage\\n\");\n }", "title": "" }, { "docid": "e6e65df98f148937bff0556f1694feef", "score": "0.6839861", "text": "function show_error($message)\n\t{\n\t\t// require template\n require_once(\"error.php\");\n\n // exit immediately since we're apologizing\n exit;\n\t}", "title": "" }, { "docid": "1134ac0f7bc42e8f5746ba17318cbd0a", "score": "0.68363446", "text": "public function error($msg) {\r\n\t\t$this->writeLn('ERROR', $msg);\r\n\t}", "title": "" }, { "docid": "98e377edb48e54f1f9bbaba13abf1fb8", "score": "0.6833947", "text": "function get_error($input)\n {\n }", "title": "" }, { "docid": "d97e29562d21e87cad45d5f1983e1f2c", "score": "0.6828913", "text": "function IT_Error($msg, $file = __FILE__, $line = __LINE__)\n {\n\n $this->PEAR_Error(sprintf(\"%s [%s on line %d].\", $msg, $file, $line));\n\n }", "title": "" }, { "docid": "888f2f31a079ebdd165a2ff6fa08c4c8", "score": "0.68159306", "text": "function died($error) {\n\t\t\t\t\t\t\t\t $displayError = \"We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.<br /><br />\".$error.\"<br /><br />\".\"Please go back and fix these errors.<br /><br />\";\n\t\t\t\t\t\t\t\t die();\n\t\t\t\t\t\t\t }", "title": "" }, { "docid": "c3cd3d5e923f259a83e751c1eba57af4", "score": "0.6814875", "text": "function died($error) {\n\t\t\t\t\techo \"We are very sorry, but there were error(s) found with the form you submitted. \";\n\t\t\t\t\techo \"These errors appear below.<br /><br />\";\n\t\t\t\t\techo $error.\"<br /><br />\";\n\t\t\t\t\techo \"Please go back and fix these errors.<br /><br />\";\n\t\t\t\t\tdie();\n\t\t\t\t}", "title": "" }, { "docid": "c3cd3d5e923f259a83e751c1eba57af4", "score": "0.6814875", "text": "function died($error) {\n\t\t\t\t\techo \"We are very sorry, but there were error(s) found with the form you submitted. \";\n\t\t\t\t\techo \"These errors appear below.<br /><br />\";\n\t\t\t\t\techo $error.\"<br /><br />\";\n\t\t\t\t\techo \"Please go back and fix these errors.<br /><br />\";\n\t\t\t\t\tdie();\n\t\t\t\t}", "title": "" }, { "docid": "b00bf79295719bbe078ae3d998030cb7", "score": "0.6806885", "text": "public function usageError($message)\n {\n echo \"Error: $message\\n\\n\";\n exit(1);\n }", "title": "" }, { "docid": "9de21cd943639d55aab66adc76ff85e9", "score": "0.6800173", "text": "function printError($key)\n {\n if ($this->_error[$key]) {\n print '<span class=\"tznError\">'.$this->_error[$key].'</span>';\n }\n }", "title": "" }, { "docid": "b254d652df04b15bb19807805e7d0121", "score": "0.6794334", "text": "public function getErrorMsg();", "title": "" }, { "docid": "b254d652df04b15bb19807805e7d0121", "score": "0.6794334", "text": "public function getErrorMsg();", "title": "" }, { "docid": "e50b2ed633afe6ce3678a517e0ae68ec", "score": "0.67922777", "text": "public function actionError()\r\n {\r\n if ($error = Yii::app()->errorHandler->error)\r\n {\r\n echo $error['message'];\r\n }\r\n }", "title": "" }, { "docid": "51e78e5ccff2a2ac4a7120e3e3c0f86a", "score": "0.6791116", "text": "function _get_error_string()\n {\n \t# Driver specific\n }", "title": "" }, { "docid": "23e5919442d1f735770d1d6f68a082f7", "score": "0.6790401", "text": "function get_errors()\n {\n }", "title": "" } ]
787035bc8e3c36432dfee2d0b86d0ddc
Get the path to the application "app" directory.
[ { "docid": "5a90ce1bb0e4f570beb1c7ad7071d7d8", "score": "0.78055686", "text": "public function path()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'app';\n }", "title": "" } ]
[ { "docid": "3fd785b010911f0c4c87f4fc3ab9e8b6", "score": "0.8877233", "text": "public function getAppPath() {\n return str_replace('\\\\', '/', realpath($this->appDir));\n }", "title": "" }, { "docid": "a358ecef2daf08ed19a20e085a763d11", "score": "0.87416685", "text": "public static function getAppDir() {\n\t\treturn self::$app_dir;\n\t}", "title": "" }, { "docid": "67ae9676eabe42ba5bdb508637042579", "score": "0.8726361", "text": "protected function getAppPath()\n {\n return config()->path->app;\n }", "title": "" }, { "docid": "c212869ca2a9e1b50f917228d9ca7a1d", "score": "0.86749697", "text": "public function getAppPath()\n\t{\n\t\treturn realpath($this->applicationPath);\n\t}", "title": "" }, { "docid": "9d65f858028b30f048dcdabbef630457", "score": "0.85695016", "text": "public function getAppPath(){\n\t\treturn $this->getBasePath().$this->getAppFolder().DIRECTORY_SEPARATOR;\n\t}", "title": "" }, { "docid": "922a2e1fbf173484b30d8006074ae1a6", "score": "0.84234285", "text": "public function getAppDir()\n {\n return $this->_appDir;\n }", "title": "" }, { "docid": "8e10cf01a9acfc30eff778272017cade", "score": "0.8411603", "text": "protected function getAppFolderPath()\n {\n return $this->laravel->basePath().DIRECTORY_SEPARATOR.'app';\n }", "title": "" }, { "docid": "4018fe43312d41870ed5d4a5b1f927e6", "score": "0.8313208", "text": "public function getAppPath(): string\n {\n return $this->appPath;\n }", "title": "" }, { "docid": "e6bd0db7e5b00115de62ae8a59abaf90", "score": "0.8268232", "text": "function app_path()\n {\n return base_path() . '/app';\n }", "title": "" }, { "docid": "dd3039f95f7269ab07864413c57fd59c", "score": "0.82431394", "text": "private function getAppRootDir()\n {\n return $this->container->get('app.parameter_bag')->get('kernel.project_dir');\n }", "title": "" }, { "docid": "5103a6ed9555367308f59ae1e50758a4", "score": "0.8243135", "text": "public function appPath()\r\n {\r\n return $this->appPath;\r\n }", "title": "" }, { "docid": "c7f10ead41d6eb3d5431c1ab05441d2d", "score": "0.8147497", "text": "protected function appPath() : string\n {\n if (defined('APP_ROOT')) {\n return APP_ROOT;\n }\n if (isset($_ENV['APP_BASE_PATH'])) {\n return $_ENV['APP_BASE_PATH'];\n }\n if (function_exists('app_path')) {\n return app_path();\n }\n // Try to guess relative from vendor\n return realpath(__DIR__.'/../../../../..');\n }", "title": "" }, { "docid": "103a8cf754d57128b12c3c089c6f19ed", "score": "0.7908102", "text": "public static function path(){\n\t\t\treturn CFG::get('ABS_K2F').'apps/'.get_class(self::instance()).'/';\n\t\t}", "title": "" }, { "docid": "c1b4284dff45bfae59673fc8e307d7a6", "score": "0.77464545", "text": "public function getApplicationRoot()\n {\n return atkconfig('application_dir');\n }", "title": "" }, { "docid": "db6631b69a234a43be8c5aa6c4707642", "score": "0.7646897", "text": "static public function getPath()\n {\n return sfConfig::get('sf_config_dir').'/app.yml';\n }", "title": "" }, { "docid": "199d0c12840b8a81df7adb4420c0cd60", "score": "0.76046205", "text": "protected function applicationDirectory(){\n $webRoot = $_SERVER['DOCUMENT_ROOT'];\n $folders = explode('/',$webRoot);\n\n $newFolders = array_slice($folders, 0, -1);\n return implode('/', $newFolders);\n }", "title": "" }, { "docid": "a13680d75dd6b725a3e7550e2cea12e1", "score": "0.7511409", "text": "public function applicationDir(string $path = ''): string {\n return $this->rootDir('app') . ($path ? \"/{$path}\" : '');\n }", "title": "" }, { "docid": "832b92467bc663c64d8bd42e4df3007a", "score": "0.75094455", "text": "public function getApplicationDirectory () : string {\n return $this->applicationDirectory;\n }", "title": "" }, { "docid": "0a907e9db4d045b74fde908aa274dbc0", "score": "0.7503668", "text": "protected function getAppPath($path = null)\n {\n return $this->getStubPath('app'.($path ? '/'.$path : ''));\n }", "title": "" }, { "docid": "51a3a96b32077bd0c992b7714517e093", "score": "0.7469347", "text": "function app_path($path = '')\n {\n return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "fbf2724d69604092de1f0d81f36a2170", "score": "0.7460959", "text": "public function getAppsDir() {\n if (strpos(php_uname(), \"OS400\") !== false) {\n return self::DIR_APPS_I5;\n }\n \n return self::DIR_APPS;\n }", "title": "" }, { "docid": "f8f57704f4ac88b3eff1741efcfa9ee9", "score": "0.7435807", "text": "protected function getWebappPath()\n {\n return $this->getServletConfig()->getWebappPath();\n }", "title": "" }, { "docid": "941a15352d23b1750077b1201dbe70cb", "score": "0.7362219", "text": "public function getBaseDir()\n\t{\n\t\treturn $this->exedra->getBaseDir().'/'.$this->getAppName();\n\t}", "title": "" }, { "docid": "51f25797860eb4a68882f9809d18d08f", "score": "0.7310263", "text": "public final function getApplicationBaseDir()\n\t{\n\t\treturn $this->m_basedir;\n\t}", "title": "" }, { "docid": "cb432b55333cba6273cbf18f238a3db1", "score": "0.72846955", "text": "protected function getDefaultAppBasePath(): string\n {\n return env(static::ENV_NAME_APP_BASE_PATH) ?? $_ENV[static::ENV_NAME_APP_BASE_PATH] ?? \\dirname(__DIR__, 5);\n }", "title": "" }, { "docid": "2e16cb952aab6f600055f1944cfbc2c0", "score": "0.72558326", "text": "static public function appRoot() {\n\t\treturn self::$root;\n\t}", "title": "" }, { "docid": "74f12a1df3f5c0d8442fcc8be096c0a7", "score": "0.7208966", "text": "public static function APP_ROOT()\n {\n return self::$APP_ROOT;\n }", "title": "" }, { "docid": "a2f40ba496ce59b9aa90d28ae12913bd", "score": "0.7198173", "text": "protected function getApplicationConfigPath()\n {\n return $this->app->basePath('config/api.php');\n }", "title": "" }, { "docid": "90b19a5433e9799804085197905672bb", "score": "0.7179756", "text": "public function getApplicationRoot();", "title": "" }, { "docid": "9732a43e98a14097813a5d0ba0545866", "score": "0.7158976", "text": "public function getAppConfig()\n {\n return self::cleanPath(dirname(VENDOR_PATH) . DS . 'app' . DS . 'config' . DS . 'main.php');\n }", "title": "" }, { "docid": "4578daf5bc818fb7b3a15c20971848cf", "score": "0.7148916", "text": "protected function getDestinationPath()\n {\n return app_path();\n }", "title": "" }, { "docid": "307c850656e3be158e29f6a861c6fb3c", "score": "0.71375906", "text": "public static function GetPath(): string {\n return __DIR__;\n }", "title": "" }, { "docid": "c846a4cc92c9c2a77b3e3378c81c25f2", "score": "0.71259457", "text": "public static function get_path() {\n return dirname( __DIR__ );\n }", "title": "" }, { "docid": "8a5388c0e63928c6480b6afc5a9b8f2f", "score": "0.7066076", "text": "public static function getBundleDir() {\n return realpath(__DIR__ );\n }", "title": "" }, { "docid": "8507ad15200a3e50340f5f02f4d6f444", "score": "0.7043717", "text": "function get_web_root() {\r\n $uri = substr( __FILE__, strlen( $_SERVER[ 'DOCUMENT_ROOT' ] ) );\r\n\r\n // Split for unix\r\n $dirs = explode('/', $uri);\r\n\r\n try {\r\n // make an absolute url that points to the base of the app\r\n @ $app_path = '/' . $dirs[1] . '/';\r\n } catch (Exception $e) {\r\n // Split for windows in case the unix version doesn't work.\r\n $dirs = explode('\\\\', $uri);\r\n $app_path = '/' . $dirs[1] . '/';\r\n }\r\n \r\n return $app_path;\r\n}", "title": "" }, { "docid": "f740eb97067c31009c9d871325da6160", "score": "0.697008", "text": "public function getAppName() {\n return basename($this->getAppPath() . '/');\n }", "title": "" }, { "docid": "105cbbe0f14a0d85c9af57b92f6ee959", "score": "0.6966292", "text": "static function root (): string {\n return substr(__DIR__, 0, -1 * strlen(\"vendor/arshwell/monolith/src\"));\n }", "title": "" }, { "docid": "99e9bc124f4a542a069b01ca873a17a3", "score": "0.6965053", "text": "function get_app_dir($modulename) {\n\treturn is_dir(MODULE_DIR. '/'. $modulename) ? MODULE_DIR.'/'.$modulename : false;\n}", "title": "" }, { "docid": "b2d7b82a544920ab0cbbe8ad536b8c8e", "score": "0.6909473", "text": "protected function getAppPath($name)\n {\n $name = Str::replaceFirst($this->laravel->getNamespace(), '', $name);\n\n return $this->laravel['path'].'/'.str_replace('\\\\', '/', $name).'.php';\n }", "title": "" }, { "docid": "c29555ea0c6e966173b32c9a1405318f", "score": "0.6867018", "text": "function app_path() {\n return path('app');\n}", "title": "" }, { "docid": "1025f771f5bd90ae7dbeec7ed3b26b84", "score": "0.685002", "text": "function get_app_dir_under_construction() {\n\treturn MODULE_DIR. '/under_construction';\n}", "title": "" }, { "docid": "a81f54ed7efd0b09e1099b08be93a425", "score": "0.6809295", "text": "public function getPath()\n {\n return APPLICATION_PATH . self::PATH;\n }", "title": "" }, { "docid": "72e5c4ccd4f3c201770931d9581a78ab", "score": "0.6752673", "text": "protected function getProjectRoot()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "1421ac2e65cf1602ce6e6d0cacf169b5", "score": "0.6724568", "text": "protected function getPath() : string\n\t{\n\t\treturn dirname(__DIR__, 3) . '/';\n\t}", "title": "" }, { "docid": "c23a887b1446357db741be579367514f", "score": "0.66998464", "text": "public static function path(){\n\t\treturn $_SERVER['DOCUMENT_ROOT'];\n\t}", "title": "" }, { "docid": "8b400be40e12710d4271c02ccf8f134c", "score": "0.66958785", "text": "function app_path($path = '')\n{\n return base_path('app/' . $path);\n}", "title": "" }, { "docid": "5e47de895e42090a67a5f20fe6630ff8", "score": "0.6695472", "text": "function app_path(?string $relative = null): string\n {\n return app('path.app') . DIRECTORY_SEPARATOR . $relative;\n }", "title": "" }, { "docid": "be8691b10da71d40aef2fbde49e09b6f", "score": "0.6693014", "text": "protected function getDefaultAppBootstrapPath(): string\n {\n return env(static::ENV_NAME_APP_BOOTSTRAP_PATH) ?? $_ENV[static::ENV_NAME_APP_BOOTSTRAP_PATH] ?? '/bootstrap/app.php';\n }", "title": "" }, { "docid": "36e3ba53f3cc68af84b3df2ef9a7503c", "score": "0.6691083", "text": "protected function getDir()\n {\n return str_replace('\\\\', '/', __DIR__);\n }", "title": "" }, { "docid": "26ad45ddb7b3c41fa86bb44a0a03aea4", "score": "0.6686017", "text": "public function getRootDir()\n {\n // why does setting above not work ?\n // $this->vmRoot; // __DIR__;\n return '/home/vagrant/symProject/app';\n }", "title": "" }, { "docid": "9bd1affe6a6fc80a5d462b52aef0bdee", "score": "0.66847897", "text": "public static function getRootPath(){\n return (string) FrameWork::$rootPath;\n }", "title": "" }, { "docid": "d8e805da130a4acaa4ab1e7152659ece", "score": "0.66844046", "text": "protected function getRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/';\n }", "title": "" }, { "docid": "d67c7475961ef7d4ee5d0fc4409b27e7", "score": "0.66465473", "text": "function dirPath () { return (\"../../\"); }", "title": "" }, { "docid": "bad4a794ca19764dab35cd709a6855c9", "score": "0.6631665", "text": "public static function root_folder()\n {\n return Config::inst()->get(__CLASS__, 'root_folder') ?? ASSETS_PATH;\n }", "title": "" }, { "docid": "4d9a9e5f333626af466cda67dcf7630c", "score": "0.66168386", "text": "public function getBasePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "4674ac615d4c93b25abbde7577e0170c", "score": "0.65718913", "text": "public static function getBaseDir() {\n \n return dirname(__DIR__);\n }", "title": "" }, { "docid": "7bdc0a58457225920759a8bd17991f6c", "score": "0.65619564", "text": "protected function getFrameworkDir()\n {\n return marm_shopgate::getOxConfig()->getConfigParam(\n 'sShopDir'\n ) . DIRECTORY_SEPARATOR . self::FRAMEWORK_DIR . DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "d5b1c2fa1e500066574ce5087e50c6d1", "score": "0.654438", "text": "protected function getRootDir()\n {\n return $this->config['rootDir'];\n }", "title": "" }, { "docid": "f490c03c5d272f06f66a6661984e7fe0", "score": "0.65413785", "text": "function dirPath() { return (\"../../\"); }", "title": "" }, { "docid": "bc90d04908acc72f650dd91c9ab32a8c", "score": "0.65270495", "text": "public function getPath ()\n\t{\n\t\treturn dirname ( dirname ( __FILE__ ) );\n\t}", "title": "" }, { "docid": "1f7133de493de9811537d1b149f98de3", "score": "0.65098643", "text": "public static function getModulePath()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "8ab3fe302a1886f7224c3c11aad9d10d", "score": "0.649797", "text": "static function AppBundlesFolder()\n {\n return Path::Combine(PHINE_PATH, 'App/Phine/Bundles');\n }", "title": "" }, { "docid": "b2e64e001c2119a1b326dd0182a75877", "score": "0.6494931", "text": "protected function projectRootAbsolutePath()\n {\n return realpath(__DIR__ . '/../../../../');\n }", "title": "" }, { "docid": "84c7bff84896581c5fffe9e04b56210e", "score": "0.64885664", "text": "private function getBasePath(Application $application)\n {\n return sprintf(\n '%s/%s',\n $this->buildsApplicationDir,\n $application->getSlug()\n );\n }", "title": "" }, { "docid": "928e946e40205a318da6f5109dcbd6e1", "score": "0.64580184", "text": "public function configPath()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'config';\n }", "title": "" }, { "docid": "04465bab70879b8155acfd235cf2039a", "score": "0.6456082", "text": "public function getDir(){\n\t\t$module = $this->getModuleName();\n\t\treturn System::get()->moduleDir() . $module;\n\t}", "title": "" }, { "docid": "5d2a10fc0955b4918d67204f7520bdb0", "score": "0.64554995", "text": "public function getProjectDir()\n {\n if (file_exists(__DIR__.'/../../../../composer.json')) {\n return realpath(__DIR__.'/../../../..');\n }\n\n return parent::getProjectDir();\n }", "title": "" }, { "docid": "96ce576a3c18d335aa6074315ecfd500", "score": "0.6448864", "text": "public function getApp() : ? string\n {\n return $this->app;\n }", "title": "" }, { "docid": "4d276d0c82c1061319914caddc66179d", "score": "0.6445638", "text": "public static function wbAppGenPath($path = '')\n {\n return Path::rootConcatPath(APP_WORKBENCH_ROOT, self::WB_APP_GEN, $path);\n }", "title": "" }, { "docid": "14064d3a48856dd90eab054ec9ec7f61", "score": "0.6445493", "text": "public function getAppBaseUrl(){\n \n return UrlFacade::to('/').'/';\n }", "title": "" }, { "docid": "3c7e6abe5159baf079b17e0ead3d1f9f", "score": "0.64356446", "text": "public function path($path = '')\n {\n $appPath = $this->appPath ?: $this->basePath . DIRECTORY_SEPARATOR . 'app';\n return $appPath . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "dc4e67ea9e41b79f7a4be7672ca09d8d", "score": "0.64327776", "text": "public function getBasePath()\r\n {\r\n return getcwd();\r\n }", "title": "" }, { "docid": "896f674d2871e3235c393b26bb9f9e6d", "score": "0.64311713", "text": "public function getBasePath()\n {\n return realpath(__DIR__ . '/../..');\n }", "title": "" }, { "docid": "5d0c6ab62ef30c0acc90ac0ce15f6ff9", "score": "0.64228797", "text": "protected function getDir()\n {\n return __DIR__ . self::FILE_DIR;\n }", "title": "" }, { "docid": "84171716a1a77646e2c0603beac2e954", "score": "0.64223146", "text": "private function getConfigDir(): string\n {\n return $this->getProjectDir().'/config';\n }", "title": "" }, { "docid": "8d2aeab81d557ef593946e7b5a05eacf", "score": "0.6415186", "text": "private function getAppScript() {\n\n\t\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\n\t\treturn get_home_url() . $this->manifest['app.js'];\n\t}", "title": "" }, { "docid": "d4c5b19bf29917f1b92f21ea049d72fb", "score": "0.6411178", "text": "public static function get_path() {\n\t\treturn self::get_package()->get_path();\n\t}", "title": "" }, { "docid": "29714a009c2e3eacc117bafd3f25cf63", "score": "0.64103293", "text": "public static function path()\n {\n return getcwd();\n }", "title": "" }, { "docid": "8535a5143b5b2c4c13fda452116f1de4", "score": "0.6377574", "text": "public function appPath(string $path = '', string $extension = 'php')\n {\n return $this->appPath . ($path ? DIRECTORY_SEPARATOR . $path . ($extension ? '.' . $extension : '') : $path);\n }", "title": "" }, { "docid": "a81814fadf3735630af576da2c91eba0", "score": "0.6376201", "text": "protected function getAppComposer(): string\n {\n return ((new Filesystem())->closest($this->path(), 'composer.json')) ?? $this->basePath('composer.json');\n }", "title": "" }, { "docid": "804a940a6c14fa0fed3d0375fdc97096", "score": "0.6355365", "text": "protected function getBinDir(): string\n {\n return __DIR__ . '/../bin';\n }", "title": "" }, { "docid": "369d5e3a0e4674aec4ee2ec24927be2d", "score": "0.6350954", "text": "function getStarterKitPath()\n\t{\n\t\tstatic $starterKitPath = null;\n\t\t\n\t\tif ($starterKitPath === NULL)\n\t\t{\n\t\t\t$trace = debug_backtrace();\n\t\t\t$starterKitPath = dirname( $trace[1]['file'] );\n\t\t}\n\n\t\treturn $starterKitPath;\n\t}", "title": "" }, { "docid": "d3a32e4f0e992bbc7ea30a2203a8f812", "score": "0.63483083", "text": "final public function getProjectSystemPath(): string\n {\n return $this->appKernel->getProjectDir();\n }", "title": "" }, { "docid": "849fb52984cb8bec3ded931727137456", "score": "0.6346744", "text": "public static function getDocumentRoot(): string\n {\n if (array_key_exists('DOCUMENT_ROOT', $_SERVER)) {\n return $_SERVER['DOCUMENT_ROOT'];\n } else {\n $dirArray = explode(DIRECTORY_SEPARATOR, __DIR__);\n return implode(DIRECTORY_SEPARATOR, array_slice($dirArray, 0, count($dirArray) - 3));\n }\n }", "title": "" }, { "docid": "dda819b3aebc0a39f7e43d99b06ce8eb", "score": "0.6340376", "text": "public static function getVarPath($app = null) \n {\n $path = VPATH_BASE.DS.'var';\n \n if (!empty($app)) {\n $path .= DS.$app;\n } \n return $path;\n }", "title": "" }, { "docid": "37290aeec74df562d4ee0983a6f7d5e5", "score": "0.6329874", "text": "public function getRootDir()\n\t{\n\t\treturn XenForo_Autoloader::getInstance()->getRootDir();\n\t}", "title": "" }, { "docid": "d86deaa03f6250ff638cf90e64bcfa50", "score": "0.63233876", "text": "private function getAppScript() {\n\n\t\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\n\t\treturn $this->manifest['app.js'];\n\t}", "title": "" }, { "docid": "172b475d3b6ac7698cd79de968c5d195", "score": "0.6322318", "text": "protected function getBasePath()\n {\n return getcwd();\n }", "title": "" }, { "docid": "0ca5e16726edec06c0805738ddf1d942", "score": "0.63081765", "text": "private function getPath(): string\n {\n if ($this->path === null) {\n $this->path = $this->getConfig()->getParameterValue(self::CONFIG_PATH);\n\n if ($this->util->endsWith($this->path, DIRECTORY_SEPARATOR) === false) {\n $this->path .= DIRECTORY_SEPARATOR;\n }\n }\n\n return $this->path;\n }", "title": "" }, { "docid": "1a22cef0eec73ba9d9c669e7b585dad0", "score": "0.6307366", "text": "public function getPublicPath(Container $app);", "title": "" }, { "docid": "97090059f5d6617ce1df022a9e7b8c2b", "score": "0.62973195", "text": "function base_path()\n {\n return dirname(__DIR__);\n }", "title": "" }, { "docid": "a09ef211f4a934193e07964501a5463b", "score": "0.62905926", "text": "public static function siteRootDir() : string {\n return _assbase::siteRootDir_($_SERVER['PHP_SELF']);\n }", "title": "" }, { "docid": "08042dd21963748ad4433af0226674b9", "score": "0.62899345", "text": "public function getApplicationPaths()\n {\n return $this->applicationPaths;\n }", "title": "" }, { "docid": "363102f095dfc72b005aa70c3211721a", "score": "0.6288634", "text": "public function getAppTempDir()\n {\n return $this->_bootstrap->getApplication()->getTempDir();\n }", "title": "" }, { "docid": "801c14477dcd0863b6298e3156ce3ebe", "score": "0.6280069", "text": "public function getRootDir()\n {\n return($this->rootDir);\n }", "title": "" }, { "docid": "1f39ce585e5acbd82e3979d66b59a668", "score": "0.62576956", "text": "function getSiteRootDir() {\n\t\treturn BinCommon::getSiteRootDir();\n\t}", "title": "" }, { "docid": "02329f95538470fa7aa8d71b834ea44f", "score": "0.6257034", "text": "public function serverPath(){\n $result = $_SERVER['DOCUMENT_ROOT'];\n return $result;\n }", "title": "" }, { "docid": "09368f1cae9f8ea3378f84286e9786b8", "score": "0.6252916", "text": "public function getAppBase();", "title": "" } ]
a85e260dd2e6e462a217a94383d34f85
Register any application services.
[ { "docid": "011346c6589e19b161889b4094b34fc4", "score": "0.0", "text": "public function register()\r\n {\r\n App::bind(ILocationCAD::class, LocationCAD::class);\r\n App::bind(ILocationCAN::class, LocationCAN::class);\r\n App::bind(IServiceLogsCAD::class, ServiceLogsCAD::class);\r\n App::bind(IServiceLogsCAN::class, ServiceLogsCAN::class);\r\n App::bind(IProdutoCAD::class, ProdutoCAD::class);\r\n App::bind(IProdutoCAN::class, ProdutoCAN::class);\r\n App::bind(IUserManagementCAD::class, UserManagementCAD::class);\r\n App::bind(IUserManagementCAN::class, UserManagementCAN::class);\r\n }", "title": "" } ]
[ { "docid": "fbbb425b3bd02bbcc276621894741fe7", "score": "0.7714091", "text": "public function register()\n {\n// $this->registerServices();\n $this->registerRepositories();\n }", "title": "" }, { "docid": "f4bce7ab24b860b65455405e7af802e6", "score": "0.76522887", "text": "public function register(): void\n {\n $this->registerServices();\n }", "title": "" }, { "docid": "659b9b0b8033e83fca194956968b4426", "score": "0.7629979", "text": "public function register()\n {\n $this->registerRepositories();\n\n $this->registerDomainServices();\n }", "title": "" }, { "docid": "429bf528a34387a8ffaa9126341fc247", "score": "0.7498076", "text": "public function register()\n {\n $this->registerServiceProviders();\n\n $this->registerFacades();\n\n $this->registerConsole();\n }", "title": "" }, { "docid": "ce812ef3fba40bc383f1db3afaa81d4e", "score": "0.74953425", "text": "public function register()\n {\n $this->registerAlias();\n\n $this->registerServices();\n }", "title": "" }, { "docid": "7f687a4f8ebf0479878b557feadefac1", "score": "0.7463522", "text": "public function register()\n {\n $this->registerServiceProviders();\n }", "title": "" }, { "docid": "cddf77398f948fc35b216a0e987a1bed", "score": "0.7385764", "text": "public function register()\n {\n // app()->bind('App\\Services\\SocialService', function() {\n // return new \\App\\Services\\TwitterService('api-key-123');\n // });\n app()->bind('App\\Services\\SocialService', function() {\n return new \\App\\Services\\FacebookService('thing1', 'thing2');\n });\n }", "title": "" }, { "docid": "d2763e7b99729281f7476cfb88e6c392", "score": "0.73639125", "text": "public function register()\n {\n $this->registerResources();\n $this->registerFilterService();\n }", "title": "" }, { "docid": "84518461f0d2326c0450eface0f2565b", "score": "0.7337376", "text": "public function register()\n\t{\n $this->registerOAuthServer();\n $this->registerApi();\n\n // Register artisan commands\n\t\t$this->registerCommands();\n\t}", "title": "" }, { "docid": "972b96c8194c303163fc86d259a65a9f", "score": "0.7323455", "text": "public function register()\n {\n $this->registerServices();\n $this->registerAliases();\n $this->registerMiddlewares();\n }", "title": "" }, { "docid": "f6565a24d5a28733b87ac1adb8b6715a", "score": "0.72733027", "text": "public function register()\n {\n $this->app->bind('App\\Services\\MeigaraService');\n }", "title": "" }, { "docid": "c9bc6cfd69a60feee0745325044d378e", "score": "0.7268026", "text": "public function register()\n {\n $this->registerRepositories();\n }", "title": "" }, { "docid": "1f957a2343ab60f1e1e46bfbc29595a1", "score": "0.7247485", "text": "public function register()\n {\n // Automatically apply the package configuration\n //$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'data-repository');\n\n // Register the main class to use with the facade\n $this->app->singleton('data-repository', function () {\n return new DataRepository;\n });\n\n $this ->app ->register('Mawuekom\\MacroSearch\\MacroSearchServiceProvider');\n $this ->app ->register('Spatie\\QueryBuilder\\QueryBuilderServiceProvider');\n $this ->app ->register('Spatie\\JsonApiPaginate\\JsonApiPaginateServiceProvider');\n }", "title": "" }, { "docid": "3ecbd2e6e9219079a74c56af4e343e67", "score": "0.7237381", "text": "public function register()\n {\n $this->app->bind('Customer', \\App\\Services\\CustomerService::class);\n $this->app->bind('Loan', \\App\\Services\\LoanService::class);\n $this->app->bind('Screen', \\App\\Services\\ScreenService::class);\n $this->app->bind('Message', \\App\\Services\\MessageService::class);\n $this->app->bind('Payment', \\App\\Services\\PaymentService::class); \n $this->app->bind('Crb', \\App\\Services\\CrbService::class); \n }", "title": "" }, { "docid": "d9e22c599d2bd043c36264648ddcc425", "score": "0.72195977", "text": "public function register()\n {\n Passport::ignoreMigrations();\n\n // Register providers\n // $this->app->register(BroadcastServiceProvider::class);\n $this->app->register(EventServiceProvider::class);\n $this->app->register(RouteServiceProvider::class);\n// $this->app->register(AuthServiceProvider::class);\n }", "title": "" }, { "docid": "f5921cbcb82527c146d127ec1dc98298", "score": "0.7211748", "text": "public function register()\n {\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n $this->app->bind(\"neo4jRelation\", function() {\n return new \\Gigtrooper\\Services\\Neo4jRelationService;\n });\n\n $this->app->bind(\"neo4jCriteria\", function() {\n return new \\Gigtrooper\\Services\\Neo4jCriteriaService;\n });\n\n $this->app->bind(\"field\", function() {\n return new \\Gigtrooper\\Services\\FieldService;\n });\n\n $this->app->bind(\"criteria\", function() {\n return new \\Gigtrooper\\Services\\CriteriaService;\n });\n\n $this->app->bind(\"pagination\", function() {\n return new \\Gigtrooper\\Services\\PaginationService;\n });\n\n $this->app->bind(\"templateHelper\", function() {\n return new \\Gigtrooper\\Helpers\\TemplateHelper();\n });\n\n $this->app->bind(\"categoryService\", function() {\n return new \\Gigtrooper\\Services\\CategoryService();\n });\n\n $this->app->bind(\"subFieldService\", function() {\n return new \\Gigtrooper\\Services\\SubField();\n });\n\n $this->app->bind(\"fileUploadService\", function() {\n return new \\Gigtrooper\\Services\\FileUploadService();\n });\n\n $this->app->bind(\"dateService\", function() {\n return new \\Gigtrooper\\Services\\DateService();\n });\n\n $this->app->bind(\"dateTimeService\", function() {\n return new \\Gigtrooper\\Services\\DateTimeService();\n });\n\n $this->app->bind(\"userService\", function() {\n return new \\Gigtrooper\\Services\\UserService();\n });\n\n $this->app->bind(\"elementsService\", function() {\n return new \\Gigtrooper\\Services\\ElementsService();\n });\n\n $this->app->bind(\"fieldTypes\", function() {\n return new \\Gigtrooper\\Services\\FieldTypes();\n });\n\n $this->app->bind(\"countryService\", function() {\n return new \\Gigtrooper\\Services\\CountryService();\n });\n\n $this->app->bind(\"postService\", function() {\n return new \\Gigtrooper\\Services\\PostService();\n });\n\n $this->app->bind(\"messageChainService\", function() {\n return new \\Gigtrooper\\Services\\MessageChainService();\n });\n\n $this->app->bind(\"messageFormService\", function() {\n return new \\Gigtrooper\\Services\\MessageForm();\n });\n }", "title": "" }, { "docid": "41684855bf0abd3d5c8d41c9ad6c7a07", "score": "0.7209296", "text": "public function register()\n {\n\n $this->app->bind(\n VacancyServiceInterface::class,\n VacancyService::class,\n );\n\n $this->app->bind(\n VacancyRepositoryInterface::class,\n VacancyRepository::class,\n );\n\n $this->app->bind(\n AuthServiceInterface::class,\n AuthService::class,\n );\n\n $this->app->bind(\n AuthRepositoryInterface::class,\n AuthRepository::class,\n );\n\n $this->app->bind(\n MailServiceInterface::class,\n MailService::class,\n );\n\n $this->app->bind(\n HashServiceInterface::class,\n HashService::class,\n );\n\n $this->app->bind(\n JwtServiceInterface::class,\n JwtService::class,\n );\n\n $this->app->bind(\n UserRepositoryInterface::class,\n UserRepository::class,\n );\n\n $this->app->bind(\n FtpServiceInterface::class,\n FtpService::class,\n );\n\n $this->app->bind(\n ProfileServiceInterface::class,\n ProfileService::class,\n );\n\n $this->app->bind(\n ProfileRepositoryInterface::class,\n ProfileRepository::class,\n );\n\n $this->app->bind(\n LocationRepositoryInterface::class,\n LocationRepository::class,\n );\n\n $this->app->bind(\n LocationServiceInterface::class,\n LocationService::class,\n );\n }", "title": "" }, { "docid": "67bad94d602aaba709b68134297a5c79", "score": "0.72073114", "text": "public function register()\n {\n $this->app->register(OrchestratorEventServiceProvider::class);\n $this->app->register(DoctrineSupportServiceProvider::class);\n $this->app->register(DropboxServiceProvider::class);\n $this->app->register(GoogleDriveServiceProvider::class);\n $this->app->register(LogViewerServiceProvider::class);\n $this->app->register(L5SwaggerServiceProvider::class);\n $this->registerConsoleCommands();\n }", "title": "" }, { "docid": "5d04803be9b3b5833f6573a28989aabd", "score": "0.7197857", "text": "public function register() {\n\t\t$this->registerQueryService();\n\t}", "title": "" }, { "docid": "c93f6a4a7d0b079c6cdc9af5f7929b14", "score": "0.71915245", "text": "public function register()\n {\n $this->registerHttplugFactories();\n $this->registerHttplug();\n }", "title": "" }, { "docid": "c868ba7aca81f42ec0f9ec225c4b5ecd", "score": "0.71911395", "text": "public function register()\n {\n $this->app->bind(\n ContaServiceInterface::class,\n ContaService::class,\n );\n $this->app->bind(\n TransacaoServiceInterface::class,\n TransacaoService::class,\n );\n }", "title": "" }, { "docid": "1b18c34205ec5190ef1df81197574af7", "score": "0.7182214", "text": "public function register()\n {\n $this->registerModels();\n $this->registerRepositories();\n $this->registerSubscribers();\n $this->registerValidators();\n }", "title": "" }, { "docid": "3453bd73dbffcdc4a2fe2b6fea8540f7", "score": "0.71802413", "text": "public function register()\n {\n App::bind(GCloudPubSubService::class, function () {\n return new GCloudPubSubService();\n });\n\n App::bind(PelaporanService::class, function ($app, $item) {\n return new PelaporanService($item);\n });\n }", "title": "" }, { "docid": "49b33fbc5bfca91fe4dc2b23d7c66c71", "score": "0.7179535", "text": "public function register()\n {\n $this->registerValidationService();\n\n $this->registerValidate();\n\n $this->registerValidateAlias();\n }", "title": "" }, { "docid": "b4fe5a75b6b66edf2a1ecc58967a749b", "score": "0.71674174", "text": "public function register()\n {\n //login\n $this->app->bind('Domain\\Contracts\\Services\\UserLoginServiceContract', 'Domain\\Services\\UserLoginService');\n //me\n $this->app->bind('Domain\\Contracts\\Services\\MeServiceContract', 'Domain\\Services\\MeService');\n \n //user\n $this->app->bind('Domain\\Contracts\\Repositories\\UserRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\UserRepository');\n $this->app->bind('Domain\\Contracts\\Services\\UserServiceContract', 'Domain\\Services\\UserService');\n \n //company\n $this->app->bind('Domain\\Contracts\\Repositories\\CompanyRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CompanyRepository');\n $this->app->bind('Domain\\Contracts\\Services\\CompanyServiceContract', 'Domain\\Services\\CompanyService');\n\n //country\n $this->app->bind('Domain\\Contracts\\Repositories\\CountryRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CountryRepository');\n\n //state\n $this->app->bind('Domain\\Contracts\\Repositories\\StateRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\StateRepository');\n $this->app->bind('Domain\\Contracts\\Services\\StateServiceContract', 'Domain\\Services\\StateService');\n\n //city\n $this->app->bind('Domain\\Contracts\\Repositories\\CityRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CityRepository');\n $this->app->bind('Domain\\Contracts\\Services\\CityServiceContract', 'Domain\\Services\\CityService');\n\n //plan\n $this->app->bind('Domain\\Contracts\\Repositories\\PlanRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\PlanRepository');\n\n //manager\n $this->app->bind('Domain\\Contracts\\Repositories\\ManagerRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\ManagerRepository');\n\n //customer\n $this->app->bind('Domain\\Contracts\\Repositories\\CustomerRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CustomerRepository');\n\n }", "title": "" }, { "docid": "87308f79ec91947fe614365d984c4187", "score": "0.71669966", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Http\\Interfaces\\VehicleInterface',\n 'App\\Http\\Repositories\\VehicleRepository'\n );\n\n $this->app->bind(\n 'App\\Http\\Interfaces\\VehicleLookupInterface',\n 'App\\Http\\Repositories\\VehicleLookupRepository'\n );\n\n $this->app->bind(\n 'App\\Http\\Interfaces\\DashboardInterface',\n 'App\\Http\\Repositories\\DashboardRepository'\n );\n }", "title": "" }, { "docid": "8e9aa82c070622a2b80dcb6963f3284d", "score": "0.7164823", "text": "public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\pierresilva\\CrudGenerator\\CrudGeneratorServiceProvider::class);\n $this->app->register(\\pierresilva\\NgGenerators\\LaravelServiceProvider::class);\n $this->app->register(\\Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider::class);\n }\n }", "title": "" }, { "docid": "25f4e270b5831167c34bac6f478651e6", "score": "0.7164422", "text": "public function register()\n {\n $this->registerHttpParsers();\n $this->registerHttpValidation();\n }", "title": "" }, { "docid": "e30a68c58100ffcd0f8a581bacd7594a", "score": "0.7156825", "text": "public function register()\n {\n $this->registerTeamspeakFramework();\n $this->registerTeamspeak();\n }", "title": "" }, { "docid": "551449f13cba894a32639d3755a647e5", "score": "0.7149477", "text": "public function register()\n {\n $this->registerAlias();\n\n $this->registerServices();\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "5be92b0a679a47e81b6b6c7295629cc3", "score": "0.714629", "text": "public function register()\n {\n //include __DIR__.'/routes.php';\n //$this->app->make('dsanchezInmedia\\DataTable\\DataTableController');\n }", "title": "" }, { "docid": "4afd584d2e282e2912b292a9d7710570", "score": "0.7141903", "text": "public function register()\n {\n $this->app->register(ArtisanServiceProvider::class);\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerProviders();\n\n $this->registerVueApplication();\n\n $this->loadAssets();\n\n $this->registerNavigationPresetFactoryApplication();\n }", "title": "" }, { "docid": "41b780742f74c60ba1140ced3fcbcab0", "score": "0.7140552", "text": "public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n }", "title": "" }, { "docid": "b5437c140e9b733468d3f7a661bdc737", "score": "0.7139776", "text": "public function register()\n {\n $this->app->bind('date', \\App\\Services\\Date\\DateService::class);\n }", "title": "" }, { "docid": "b267b515babc15285a8ebfb019b6a8f8", "score": "0.7135218", "text": "public function register()\n {\n if ($this->app instanceof LumenApplication) {\n $this->app->configure('api'); // @codeCoverageIgnore\n }\n\n $this->mergeConfigFrom(__DIR__.'/../config/api.php', 'api');\n\n $this->registerClient();\n\n $this->registerToken();\n\n if ($this->app->runningInConsole()) {\n $this->registerForConsole();\n }\n }", "title": "" }, { "docid": "47db51fb87da28db3d8a87fc9a87302b", "score": "0.7132706", "text": "public function register()\n {\n// $this->app->bind(BlogService::class);\n }", "title": "" }, { "docid": "3c6f44c96275b5eb26cc52e2c80583c7", "score": "0.71313804", "text": "public function register()\n {\n /* $this->app->register(RouteServiceProvider::class); */\n $this->registerBladeExtensions();\n $this->setAliase();\n }", "title": "" }, { "docid": "96cb33ed2e7fdfbc4632bd6de12e341d", "score": "0.7119459", "text": "public function register(): void\n {\n $this->app->register(MenuEventServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }", "title": "" }, { "docid": "96d8dce2a6bbdeb514d710a19e7939ca", "score": "0.7115587", "text": "public function register()\n {\n $this->app->bind(DoctorService::class, function($app) {\n return new DoctorService();\n });\n }", "title": "" }, { "docid": "d491548a56d80ccd58366b607a4e8a2d", "score": "0.71090174", "text": "public function register()\n {\n $this->app->make('Ecce\\WeatherForecast\\ForecastController');\n $this->loadViewsFrom(__DIR__.'/views', 'forecast');\n $this->loadMigrationsFrom(__DIR__.'/migrations');\n }", "title": "" }, { "docid": "e4b124148ced0fba2b3a598e29ac90e4", "score": "0.70962703", "text": "public function register()\n {\n $this->registerApiAuth();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n }", "title": "" }, { "docid": "5f6812adf3d8edd064360f2b1367eca5", "score": "0.7091754", "text": "public function register()\n {\n //\n if ($this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }", "title": "" }, { "docid": "3c853ae9bac17cacf27655da163a2708", "score": "0.70844907", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Services\\Contracts\\CartServiceContract',\n 'App\\Services\\CartService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\ProductServiceContract',\n 'App\\Services\\ProductService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\CategoryServiceContract',\n 'App\\Services\\CategoryService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\TranslateServiceContract',\n 'App\\Services\\TranslateService'\n );\n }", "title": "" }, { "docid": "40f3f5ec79d8ffb47d3b910e79af5128", "score": "0.7083211", "text": "public function register()\n {\n /**\n * Regitrar intanciamento padrão para noticia Repository pegando configuração\n * para conexão ao elasticSearch\n */\n $this->app->bind(NoticiaRepository::class, function ($app) {\n return new NoticiaRepository($app->make(Client::class));\n });\n $this->bindESClient();\n }", "title": "" }, { "docid": "ef2200d44224806dd3179aae60c8575c", "score": "0.7082185", "text": "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->app->register(MenuServiceProvider::class);\n }", "title": "" }, { "docid": "da1bc636f5076a61e905c37509fbd72f", "score": "0.70815176", "text": "public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }", "title": "" }, { "docid": "443e770bddb47643992b29968059a288", "score": "0.7078013", "text": "public function register()\n {\n $this->app->bind(AircraftController::class, function () {\n return new AircraftController(new AircraftService());\n });\n $this->app->bind(BookingController::class, function () {\n return new BookingController(new BookingService());\n });\n $this->app->bind(FlightController::class, function () {\n return new FlightController(new FlightService());\n });\n $this->app->bind(SeatController::class, function () {\n return new SeatController(new SeatService());\n });\n $this->app->bind(MultipleBookingController::class, function () {\n return new MultipleBookingController(new MultipleBookingService());\n });\n }", "title": "" }, { "docid": "08b225cb063f72327c7123c067cbf548", "score": "0.70772624", "text": "public function register()\n {\n $this->registerService();\n\n $this->loadConfig();\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "ecdce634712e37057c3c243a68fe7301", "score": "0.7071076", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Services\\Contracts\\UsersServiceInterface',\n 'App\\Services\\UsersService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\BooksServiceInterface',\n 'App\\Services\\BooksService'\n );\n }", "title": "" }, { "docid": "4ca4dc4f5b96b978cbb5d5afbba3a19e", "score": "0.7059063", "text": "public function register()\n {\n $this->app->make('Magnetar\\Tariffs\\Controllers\\ObjectCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\ModuleCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\UserObjectCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\ObjectTypeCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\PaymentController');\n $this->commands($this->commands);\n\n $this->loadViewsFrom(__DIR__.'/views', 'magnetar_tariffs');\n }", "title": "" }, { "docid": "7fc00bca0153bf347d4d91993f4ac6fb", "score": "0.70588976", "text": "public function register()\n {\n $this->registerConfig();\n\n $this->registerMenuManagerService();\n }", "title": "" }, { "docid": "d98d9977a862a0f17245df402c5d9eb7", "score": "0.70563334", "text": "public function register()\n {\n $this->app->bind(UserAuthContract::class,UserAuthService::class);\n $this->app->bind(CompanySettingContract::class,CompanySettingService::class);\n }", "title": "" }, { "docid": "4e9bab5116778d6003f417ff9aa2a07c", "score": "0.7055316", "text": "public function register()\n {\n $this->app->register( RouteServiceProvider::class );\n $this->app->register( RepositoryServiceProvider::class );\n $this->app->register( AuthServiceProvider::class );\n $this->app->register( ImageServiceProvider::class );\n }", "title": "" }, { "docid": "430890e4b1f0dabc57776620444fb8eb", "score": "0.7054543", "text": "public function register()\n {\n $this->app->bind(\n \\App\\Services\\Country\\ICountryService::class,\n \\App\\Services\\Country\\CountryService::class\n );\n }", "title": "" }, { "docid": "cebbe088c77610455dbe05fa46e11db3", "score": "0.70522976", "text": "public function register()\n {\n $this->registerImage();\n\n $this->registerImagineManager();\n\n $this->registerSourceManager();\n\n $this->registerUrlGenerator();\n\n $this->registerRouteRegistrar();\n\n $this->registerImageHandler();\n\n $this->registerContracts();\n\n $this->registerMiddlewares();\n\n $this->registerConsole();\n }", "title": "" }, { "docid": "488b95520cd592b575e11c7452d640e3", "score": "0.70503455", "text": "public function register()\n {\n //Register Services\n $this->app->bind('Api\\\\Services\\\\ISellerPostService', 'Api\\\\Services\\\\SellerPostService');\n $this->app->bind('Api\\\\Services\\\\IBuyerPostService', 'Api\\\\Services\\\\BuyerPostService');\n\n $this->app->bind('Api\\\\Services\\\\FileStorage\\\\FileStorageInterface', 'Api\\\\Services\\\\FileStorage\\\\S3FileStorage');\n }", "title": "" }, { "docid": "e29aa875bcce2fee3e6b1953b69fd15a", "score": "0.70470077", "text": "public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\AuthRepositoryInterface',\n 'App\\Repositories\\AuthRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CaptureRepositoryInterface',\n 'App\\Repositories\\CaptureRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\PokemonRepositoryInterface',\n 'App\\Repositories\\PokemonRepository'\n );\n\n $this->app->bind(\n 'App\\Services\\Interfaces\\AuthServiceInterface',\n 'App\\Services\\AuthService'\n );\n $this->app->bind(\n 'App\\Services\\Interfaces\\CaptureServiceInterface',\n 'App\\Services\\CaptureService'\n );\n $this->app->bind(\n 'App\\Services\\Interfaces\\PokemonServiceInterface',\n 'App\\Services\\PokemonService'\n );\n }", "title": "" }, { "docid": "78bcefd7050ea075e2d08badd8a8ef43", "score": "0.7046471", "text": "public function register()\n {\n $this->app->bind( \\LACC\\Repositories\\CategoryRepository::class, \\LACC\\Repositories\\CategoryRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\UserRepository::class, \\LACC\\Repositories\\UserRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\SerieRepository::class, \\LACC\\Repositories\\SerieRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\VideoRepository::class, \\LACC\\Repositories\\VideoRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\PlanRepository::class, \\LACC\\Repositories\\PlanRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\OrderRepository::class, \\LACC\\Repositories\\OrderRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\SubscriptionRepository::class, \\LACC\\Repositories\\SubscriptionRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\PaypalWebProfileRepository::class, \\LACC\\Repositories\\PaypalWebProfileRepositoryEloquent::class );\n //:end-bindings:\n }", "title": "" }, { "docid": "9614f01af5ef402d2f77ea0965a37ddd", "score": "0.7044727", "text": "public function register() {\n\t\t$this->app['zuora'] = $this->app->share(function($app) {\n\t\t\t\treturn new ZuoraManager($app);\n\t\t\t});\n\t\t$this->app->booting(function() {\n\t\t\t\t$loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\t\t\t\t$loader->alias('Zuora', 'Dazza76\\Zuora\\Facades\\Zuora');\n\t\t\t\t$loader->alias('Zuora_API', 'Dazza76\\Zuora\\zuora-api\\API');\n\t\t\t});\n\t}", "title": "" }, { "docid": "9696a2955855ee0c64bc22082a3087c9", "score": "0.70437646", "text": "public function register()\n {\n $this->registerConfiguration();\n\n $this->registerIgc2Kmz();\n }", "title": "" }, { "docid": "cdfeac787cdd5eb8804a4f15a59df6a4", "score": "0.70428437", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'les');\n\n $this->registerCommands();\n $this->registerDataSerializer();\n $this->registerRepositoryFactory();\n $this->registerResponseBuilder();\n }", "title": "" }, { "docid": "dcebcce58ea16efaf0a131275d002fd2", "score": "0.70383126", "text": "public function register ()\n {\n $this->registerBankServices();\n }", "title": "" }, { "docid": "36b05d08d95a77ee3892ab87399d37ed", "score": "0.7032526", "text": "public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MiddlewareServiceProvider::class);\n }", "title": "" }, { "docid": "05feae3ee4b76131873d0fe07f0f065f", "score": "0.70259774", "text": "public function register() {\n\n $app = $this->app;\n $app['rest.server'] = $app->share(function ($app)\n {\n $case = $app['config']['andizzle/rest-framework::case'];\n return new RestServer($case);\n });\n\n $app['rest.serializer'] = $app->share(function ($app)\n {\n $model = $app['config']['andizzle/rest-framework::serializer.model'];\n return new $model;\n });\n\n }", "title": "" }, { "docid": "0d21c1b0658a66c641de235961ddb458", "score": "0.7025021", "text": "public function register() {\n $this->app->bind(\n 'App\\Services\\ExcelFileProcessorService',\n function ($app) {\n return new ExcelFileProcessorService();\n }\n );\n\n $this->app->bind('App\\Services\\UserService', function ($app) {\n return new UserService();\n });\n }", "title": "" }, { "docid": "2fdc41fb4fad15312dc0e93d3a818d52", "score": "0.7022796", "text": "public function register()\n {\n $this->registerServiceProviders();\n $this->registerAliases();\n $this->registerCommands();\n $this->registerConfigs();\n $this->registerRoutes();\n $this->registerPublishable();\n }", "title": "" }, { "docid": "0ee6da8654ba9bd9d0101156c5225e65", "score": "0.7022791", "text": "public function register()\n\t{\n\t\t$this->registerCommandTranslator();\n\n\t\t$this->registerCommandBus();\n\t}", "title": "" }, { "docid": "65694cf9355438bdb56a1bcc4b9e2a87", "score": "0.70214576", "text": "public function register()\n {\n \\App::bind('App\\Repositories\\CampaignRepositoryInterface', 'App\\Repositories\\Eloquent\\CampaignRepository');\n \\App::bind('App\\Repositories\\LotteryRepositoryInterface', 'App\\Repositories\\Eloquent\\LotteryRepository');\n \\App::bind('App\\Repositories\\EntryRepositoryInterface', 'App\\Repositories\\Eloquent\\EntryRepository');\n \\App::bind('App\\Repositories\\VoteRepositoryInterface', 'App\\Repositories\\Eloquent\\VoteRepository');\n \\App::bind('App\\Repositories\\PlayerRepositoryInterface', 'App\\Repositories\\Eloquent\\PlayerRepository');\n \\App::bind('App\\Repositories\\UserRepositoryInterface', 'App\\Repositories\\Eloquent\\UserRepository');\n \\App::bind('App\\Repositories\\SerialRepositoryInterface', 'App\\Repositories\\Eloquent\\SerialRepository');\n }", "title": "" }, { "docid": "550bd052b2967290f29706336c80e80b", "score": "0.70176536", "text": "public function register()\n {\n $this->app->bind(\"App\\Repositories\\User\\UserRepository\", \"App\\Repositories\\User\\UserService\");\n $this->app->bind(\"App\\Repositories\\Note\\NoteRepository\", \"App\\Repositories\\Note\\NoteService\");\n }", "title": "" }, { "docid": "23809250d230e1f4ac8cda60819645df", "score": "0.7014792", "text": "public function register()\n {\n $this->registerBindings();\n $this->registerFacade();\n }", "title": "" }, { "docid": "dbde3c2af05f55fb8df4261eeda74cbb", "score": "0.7013609", "text": "public function register()\n {\n $this->app->bind(\n ParserInterface::class,\n ParserService::class\n );\n $this->app->bind(\n SocialInterface::class,\n SocialService::class\n );\n }", "title": "" }, { "docid": "ff416b2021da6b9f1a51bd49be5661e6", "score": "0.70120114", "text": "public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/config/config.php', 'widgetize');\n $this->commands('command.imanghafoori.widget');\n app(RouteMacros::class)->registerMacros();\n app(SingletonServices::class)->registerSingletons($this->app);\n }", "title": "" }, { "docid": "cfae77d9fe9b935350385adbdcd9ae91", "score": "0.70066726", "text": "public function register()\n {\n $this->app->register(\\Webpatser\\Countries\\CountriesServiceProvider::class);\n\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Countries', 'Webpatser\\Countries\\CountriesFacade');\n }", "title": "" }, { "docid": "297dd2baab74cabd002cb7d94173f542", "score": "0.70058805", "text": "public function register()\n {\n\n $this->app->bind(\n UserRepository::class,\n EloquentUserRepository::class\n );\n\n $this->app->bind(\n EmpresasRepository::class,\n EloquentEmpresasRepository::class\n );\n\n }", "title": "" }, { "docid": "66f0c3b6d11614e5a90039a3456c784f", "score": "0.7005107", "text": "public function register()\n {\n $this->registerApi($this->app['config']['zuora'], $this->app[LoggerInterface::class]);\n }", "title": "" }, { "docid": "12ab930dfedd294d1332c8713ceff315", "score": "0.7003655", "text": "public function register()\n {\n $this->app->bind('App\\Services\\AudienceService', function ($app) {\n return new AudienceService($app->make('Illuminate\\Database\\DatabaseManager'));\n });\n }", "title": "" }, { "docid": "3e6847ee02ae41d870fb4e7adb61ca52", "score": "0.7002627", "text": "public function register()\n {\n //\n $this->modelService();\n $this->manufactureService();\n $this->categoryService();\n $this->itemService();\n $this->saleOrderService();\n $this->conditionService();\n $this->whTransferService();\n $this->supplierService();\n }", "title": "" }, { "docid": "f7dd8ea5d03d8b02a445f42ba595bca8", "score": "0.6997481", "text": "public function register()\n\t{ \n \t\n \t\\App::bind('assets', function()\n\t\t{\n\t\t return new \\App\\Services\\Assets;\n\t\t});\n\t\t\n\t}", "title": "" }, { "docid": "fa49ab70e8e4d0712fc332213e5918c3", "score": "0.6996125", "text": "public function register()\n {\n $this->app->singleton(ChromeDriverService::class, ChromeDriverService::class);\n $this->app->singleton(WebDriverService::class, WebDriverService::class);\n $this->app->singleton(ReportRepository::class, ReportRepository::class);\n }", "title": "" }, { "docid": "f6c961d61ddd61241667d328f8e518b6", "score": "0.6995174", "text": "public function register()\n {\n $this->registerRouter();\n $this->registerControllerDispatcher();\n }", "title": "" }, { "docid": "123e5f09cb8263ff4946744bbe7f9a67", "score": "0.6993437", "text": "public function register()\n {\n $this->app->bind('App\\Services\\Interfaces\\UserServiceInterface', 'App\\Services\\UserService');\n $this->app->bind('App\\Services\\Interfaces\\SearchServiceInterface', 'App\\Services\\SearchService');\n $this->app->bind('App\\Services\\Interfaces\\TaskServiceInterface', 'App\\Services\\TaskService');\n $this->app->bind('App\\Services\\Interfaces\\TimesheetServiceInterface', 'App\\Services\\TimesheetService');\n $this->app->bind('App\\Services\\Interfaces\\FileServiceInterface', 'App\\Services\\FileService');\n $this->app->bind('App\\Services\\Interfaces\\ReportServiceInterface', 'App\\Services\\ReportService');\n \n }", "title": "" }, { "docid": "cbe0b9f157965d6277fe01bcbd6a76a1", "score": "0.6991146", "text": "public function register()\n {\n /**\n * Service providers are auto-discovered by Laravel from version 5.5\n * If a Service Provider is needed only is specific environment\n * use the switch below\n */\n switch ($this->app->environment()) {\n case 'local':\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n break;\n\n case 'test':\n break;\n\n case 'staging':\n break;\n\n case 'production':\n break;\n }\n }", "title": "" }, { "docid": "32b6819d12a255227cf4657552a828de", "score": "0.69901663", "text": "public function register()\n {\n $this->app->bind('log-reader', 'Jackiedo\\LogReader\\LogReader');\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "254020eedf35718d14379d6b89004954", "score": "0.69893235", "text": "public function register() {\n\n // Middlewares\n $this->app->singleton('TokenMiddleware', function($app){\n return new TokenMiddleware($app);\n });\n\n // Services\n // $this->app->bind('WordListService', function($app) {\n $this->app->singleton('WordListService', function($app) {\n return new WordListService();\n });\n\n }", "title": "" }, { "docid": "39d6bd38810dc9103fc1b520d13ab79d", "score": "0.6988052", "text": "public function register()\n {\n\n\n $models = array(\n 'Article',\n 'Categorie',\n 'Section',\n 'Media',\n 'User'\n );\n\n foreach ($models as $model) {\n $this->app->bind(\n\n \"App\\\\Repositories\\\\{$model}Repository\",\n \"App\\\\Repositories\\\\{$model}RepositoryEloquent\"\n );\n }\n\n $this->app->register('Darkaonline\\L5Swagger\\L5SwaggerServiceProvider');\n\n }", "title": "" }, { "docid": "69c83df6b13aef2407d3e73cba145cb1", "score": "0.6987087", "text": "public function register()\n {\n $this->app->singleton(CountryService::class);\n $this->app->singleton(Client::class, function () {\n return new Client(\n config('services.influx.host'),\n config('services.influx.port'),\n config('services.influx.username'),\n config('services.influx.password')\n );\n });\n $this->app->singleton(InfluxService::class, function () {\n $service = app(Client::class);\n return new InfluxService(\n $service,\n $service->selectDB(config('services.influx.database'))\n );\n });\n $this->app->singleton(\\Elasticsearch\\Client::class, function () {\n return ClientBuilder::create()\n ->setHosts([config('services.elasticsearch.host') . ':' . config('services.elasticsearch.port')])\n ->build();\n });\n $this->app->singleton(ElasticSearchService::class);\n $this->app->singleton(DatabaseService::class);\n }", "title": "" }, { "docid": "4dc342393b6ec4bb2d2679382e1911f3", "score": "0.69835174", "text": "public function register()\n {\n\t\t$this->registerErrorHandlers();\n $this->registerFilterBindings();\n }", "title": "" }, { "docid": "bd93ffb07b82f55c19bbb5c3b13af369", "score": "0.6983031", "text": "public function register()\n {\n $this->app->bind('fazlali.laravel-jwt.api', function($app){\n return new \\Fazlali\\LaravelJWT\\JWTAPI($app['request']);\n });\n $this->app->bind('fazlali.laravel-jwt.auth', function($app){\n return new \\Fazlali\\LaravelJWT\\JWTAuth($app['request'], $app['auth']);\n });\n\n }", "title": "" }, { "docid": "7351bc11062a4c556526bf47212d9269", "score": "0.6973643", "text": "public function register()\n {\n // $this->app->singleton('leancloud', \\App\\Services\\LeancloudService::class);\n\n // $this->app->singleton('qiniu', \\App\\Services\\QiniuService::class);\n\n $this->app->singleton('wechat', \\App\\Services\\WechatService::class);\n }", "title": "" }, { "docid": "bdd17555ebe34b621e1da9d71ee8230b", "score": "0.6970282", "text": "public function register()\n {\n $this->app->booting(function() {\n $loader = AliasLoader::getInstance();\n $loader->alias(\\Vanilo\\Framework\\Http\\Controllers\\ProductController::class, \\App\\Http\\Controllers\\Admin\\ProductController::class);\n $loader->alias(\\Vanilo\\Framework\\Http\\Controllers\\MediaController::class, \\App\\Http\\Controllers\\Admin\\MediaController::class);\n $loader->alias(\\Vanilo\\Framework\\Search\\ProductFinder::class, \\App\\Ctic\\Product\\Search\\ProductFinder::class);\n });\n }", "title": "" }, { "docid": "da743f1cdf57877d8341b117fc3ec7ba", "score": "0.6970165", "text": "public function register()\n\t{\n\t\tapp()->bind(UserstatisticsServiceInterface::class, UserstatisticsService::class);\n\t\tapp()->bind(UserstatisticsRepositoryInterface::class, UserstatisticsRepository::class);\n\t}", "title": "" }, { "docid": "4485cef02cdd87b12a09ca62d56eb074", "score": "0.69695693", "text": "public function register()\n\t{\n\t\t$this->app->register(EventServiceProvider::class);\n\t}", "title": "" }, { "docid": "45db8ec6276e2bcbcc82009817da3d53", "score": "0.69687283", "text": "public function register()\n {\n $this->app->bind(LoadsServiceInterface::class, LoadsService::class);\n $this->app->bind(UtillsServiceInterface::class, UtillsService::class);\n $this->app->bind(OffersServiceInterface::class, OffersService::class);\n $this->app->bind(VehiclesServiceInterface::class, VehiclesService::class);\n }", "title": "" }, { "docid": "3e2dc3e202e54a8b49de16647852b2e7", "score": "0.6967715", "text": "public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerConsoleCommands();\n }\n }", "title": "" }, { "docid": "262e6955c60f56ae55fa9127d6f7e4e8", "score": "0.69606704", "text": "public function register()\n {\n $this->app->singleton(NotificationApi::class, function ($app) {\n return new NotificationApiVersion1($app->make(NotificationService::class));\n });\n\n $this->app->singleton(TransactionUploadApi::class, function ($app) {\n return new TransactionUploadApiVersion1($app->make(TransactionUploadService::class),\n $app->make(CsvValidatorService::class));\n });\n }", "title": "" }, { "docid": "d7d84cfee7e5163f0ac2e95c6ce484c5", "score": "0.6959384", "text": "public function register() {\n \n $this->app['google'] = $this->app->share(function($app) {\n return new Eden_Google($app['config']);\n });\n $this->app->booting(function() {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('google','Taqmaninw\\Apipack\\Facade\\Google');\n });\n $this->app['facebook'] = $this->app->share(function($app) {\n return new Eden_Facebook($app['config']);\n });\n $this->app->booting(function() {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('fb', 'Taqmaninw\\Apipack\\Facade\\Facebook');\n });\n $this->app['twitter'] = $this->app->share(function($app) {\n return new Eden_Twitter($app['config']);\n });\n $this->app['dropbox'] = $this->app->share(function($app) {\n return new Eden_Dropbox($app['config']);\n });\n $this->app['instagram'] = $this->app->share(function($app) {\n return new Eden_Instagram($app['config']);\n });\n $this->app['paypal'] = $this->app->share(function($app) {\n return new Eden_Paypal($app['config']);\n });\n }", "title": "" }, { "docid": "3b738453f6bd35aac0f52592451efa7a", "score": "0.695643", "text": "public function register()\n {\n $this->di->setShared(\n $this->serviceName,\n function () {\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('App\\Http\\Controllers');\n\n return $dispatcher;\n }\n );\n }", "title": "" }, { "docid": "b5567db2de31e992cf94837319e0fc1c", "score": "0.69551903", "text": "public function register()\n {\n\n // Register Factories\n $this->registerEloquentFactoriesFrom(__DIR__.'/database/factories');\n\n // Default Package Configuration\n $this->mergeConfigFrom(__DIR__.'/config/earmark.php', 'earmark');\n $this->mergeConfigFrom(__DIR__.'/config/default.php', 'earmark');\n\n $this->app->register(EventServiceProvider::class);\n\n // @codeCoverageIgnoreStart\n //Poing\\Earmark\\Http\\Controllers\n $this->app->singleton('earmark', function () {\n return new Serial;\n });\n\n //Poing\\Earmark\\Http\\Controllers\n $this->app->singleton('sequence', function () {\n return new Sequential;\n });\n // @codeCoverageIgnoreEnd\n }", "title": "" }, { "docid": "00df6aa25ac08b99dd662ce948e6d51b", "score": "0.6954678", "text": "public function register()\n {\n include __DIR__.'/../Http/routes.php';\n\n $this->app->register('A6digital\\Image\\DefaultProfileImageServiceProvider');\n\n $this->app->make('Arangel\\SmartAdmin\\Http\\Controllers\\AdminController');\n $this->app->make('Arangel\\SmartAdmin\\Http\\Controllers\\ProfileController');\n\n }", "title": "" }, { "docid": "6b7a0ac11db89c809d327596ba939fd9", "score": "0.695379", "text": "public function register(): void\n {\n $this->registerContracts();\n $this->registerConsoleCommands();\n }", "title": "" }, { "docid": "b91e69cc5f4882216988c0d66a43c536", "score": "0.6952329", "text": "public function register()\n {\n if (class_exists(\\ErpNET\\Saas\\Providers\\ErpnetSaasServiceProvider::class))\n $this->app->register(\\ErpNET\\Saas\\Providers\\ErpnetSaasServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Permissions\\Providers\\ErpnetPermissionsServiceProvider::class))\n $this->app->register(\\ErpNET\\Permissions\\Providers\\ErpnetPermissionsServiceProvider::class);\n\n if (class_exists(\\Barryvdh\\TranslationManager\\ManagerServiceProvider::class))\n $this->app->register(\\Barryvdh\\TranslationManager\\ManagerServiceProvider::class);\n\n\n if (class_exists(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class))\n $this->app->register(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class);\n\n// if (class_exists(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class))\n// $this->app->register(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class);\n }", "title": "" } ]
f15be84d7cf7e910bf64b78dd646bc0f
Return action message for history log
[ { "docid": "20e72e8ebe2a75a0c499bac47dc6bff6", "score": "0.6382086", "text": "public function getHistoryMessage($args = array())\n\t{\n\t\t$incrementId = isset($args['increment_id']) ? $args['increment_id'] : '';\n\t\treturn df_h()->reward()->__('Earned points for order #%s.', $incrementId);\n\t}", "title": "" } ]
[ { "docid": "9f0355284295d6c67bd9686c4f8c1855", "score": "0.65113485", "text": "public function getName() {\n\t\treturn \"log_action\";\n\t}", "title": "" }, { "docid": "e8b5656b266f8277607b3ad10a1bae08", "score": "0.6172861", "text": "function _log_action($action = '')\n\t{\n\t\tglobal $DB, $IN, $LOC, $PREFS;\n\n\t\tif ($action == '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n if (is_array($action))\n {\n \tif (count($action) == 0)\n \t{\n \t\treturn;\n \t}\n\n $msg = '';\n\n foreach ($action as $val)\n {\n $msg .= $val.\"\\n\";\n }\n\n $action = $msg;\n }\n\n $DB->query(\n $DB->insert_string(\n 'exp_cp_log',\n\n array(\n 'id' => '',\n 'member_id' => 1,\n 'username' => 'Member Utilities',\n 'ip_address' => '127.0.0.1',\n 'act_date' => $LOC->now,\n 'action' => $action,\n 'site_id'\t => $PREFS->ini('site_id')\n )\n )\n );\n\t}", "title": "" }, { "docid": "662208ce69e47750ce31b06a386aa846", "score": "0.61136204", "text": "public function displayHistory() {}", "title": "" }, { "docid": "d536dafb2ccb6e34e384682b2418a39b", "score": "0.60654575", "text": "public function getHistoryMessage($args = [])\n {\n $incrementId = isset($args['increment_id']) ? $args['increment_id'] : '';\n return __('Earned promotion extra points from order #%1', $incrementId);\n }", "title": "" }, { "docid": "0d1712e7e13e373a2a56b8632df162c2", "score": "0.60622096", "text": "public function getCallToActionText()\n {\n return isset($this->call_to_action_text) ? $this->call_to_action_text : null;\n }", "title": "" }, { "docid": "92e960e92e0862d0f445b5a774e64b5c", "score": "0.6044147", "text": "public function getPreviousActionName() {}", "title": "" }, { "docid": "a267102716ba4c095bfd20804473d456", "score": "0.5978843", "text": "public function logHistory()\n {\n $model = Mage::getModel('quartic/history');\n $storeCode = $this->getRequest()->getParam('___store');\n $store = Mage::getModel(\"core/store\")->load($storeCode);\n $data = array('store_id' => $store->getId());\n $model->setData($data);\n $model->save();\n }", "title": "" }, { "docid": "138e33174c3c832caa577df30d7d8063", "score": "0.59761906", "text": "function view_action()\n\t{\n\t\tbreadcrumb_set_self(do_lang_tempcode('ENTRY'));\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('VIEW_ACTION_LOGS')),array('_SELF:_SELF:list',do_lang_tempcode('RESULTS'))));\n\n\t\t$mode=get_param('mode','ocf');\n\t\t$id=get_param_integer('id');\n\n\t\tif ($mode=='ocf')\n\t\t{\n\t\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_moderator_logs',array('l_reason AS reason','id','l_by AS the_user','l_date_and_time AS date_and_time','l_the_type AS the_type','l_param_a AS param_a','l_param_b AS param_b'),array('id'=>$id),'',1);\n\t\t} else\n\t\t{\n\t\t\t$rows=$GLOBALS['SITE_DB']->query_select('adminlogs',array('id','the_user','date_and_time','the_type','param_a','param_b','ip'),array('id'=>$id),'',1);\n\t\t}\n\n\t\tif (!array_key_exists(0,$rows)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\t\t$row=$rows[0];\n\n\t\t$title=get_page_title('VIEW_ACTION_LOGS');\n\t\t$username=$GLOBALS['FORUM_DRIVER']->get_username($row['the_user']);\n\t\tif (is_null($username)) $username=do_lang('UNKNOWN');\n\t\t$type_str=do_lang($row['the_type'],$row['param_a'],$row['param_b'],NULL,NULL,false);\n\t\tif (is_null($type_str)) $type_str=$row['the_type'];\n\t\t$fields=array(\n\t\t\t\t\t\t'USERNAME'=>$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($row['the_user']),\n\t\t\t\t\t\t'DATE_TIME'=>get_timezoned_date($row['date_and_time']),\n\t\t\t\t\t\t'TYPE'=>$type_str,\n\t\t\t\t\t\t'PARAMETER_A'=>is_null($row['param_a'])?'':$row['param_a'],\n\t\t\t\t\t\t'PARAMETER_B'=>is_null($row['param_b'])?'':$row['param_b']);\n\t\tif (array_key_exists('ip',$row)) $fields['IP_ADDRESS']=escape_html($row['ip']);\n\t\tif (array_key_exists('reason',$row)) $fields['REASON']=escape_html($row['reason']);\n\t\tif (addon_installed('securitylogging'))\n\t\t{\n\t\t\tif (array_key_exists('ip',$row))\n\t\t\t{\n\t\t\t\t$banned_test_1=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_ip','ip',array('ip'=>$row['ip']));\n\t\t\t\t$fields['IP_BANNED']=is_null($banned_test_1)?do_lang_tempcode('NO'):do_lang_tempcode('YES');\n\t\t\t\tif ($row['ip']!=get_ip_address())\n\t\t\t\t{\n\t\t\t\t\t$fields['IP_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_ip_ban','id'=>$row['ip']),'_SELF'))));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$banned_test_2=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_member','the_member',array('the_member'=>$row['the_user']));\n\t\t\t$fields['SUBMITTER_BANNED']=is_null($banned_test_2)?do_lang_tempcode('NO'):do_lang_tempcode('YES');\n\t\t\tif ((!is_guest($row['the_user'])) && ($row['the_user']!=get_member()))\n\t\t\t{\n\t\t\t\t$fields['SUBMITTER_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_submitter_ban','id'=>$row['the_user'],'mode'=>$mode,'action_id'=>$id),'_SELF'))));\n\t\t\t}\n\t\t\t$banned_test_3=$GLOBALS['FORUM_DRIVER']->is_banned($row['the_user']);\n\t\t\t$fields['MEMBER_BANNED']=$banned_test_3?do_lang_tempcode('YES'):do_lang_tempcode('NO');\n\t\t\tif (((get_forum_type()=='ocf') && (!is_guest($row['the_user']))) && ($row['the_user']!=get_member()))\n\t\t\t{\n\t\t\t\t$fields['MEMBER_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_member_ban','id'=>$row['the_user'],'mode'=>$mode,'action_id'=>$id),'_SELF'))));\n\t\t\t}\n\t\t}\n\t\t$fields['INVESTIGATE_USER']=hyperlink(build_url(array('page'=>'admin_lookup','id'=>(array_key_exists('ip',$row))?$row['ip']:$row['the_user']),'_SELF'),do_lang_tempcode('PROCEED'));\n\n\t\trequire_code('templates_view_space');\n\t\treturn view_space($title,$fields);\n\t}", "title": "" }, { "docid": "ba55e4f49cae7df1987f265826a64f7e", "score": "0.59605944", "text": "public function getActionDetails()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $request = $objectManager->get('\\Magento\\Framework\\App\\RequestInterface');\n $action = ['origin' => null, 'username' => null];\n\n if (isset($request->getParams()['key'])) {\n // Action triggered from the backend\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_BACKEND;\n\n $auth = $objectManager->get('\\Magento\\Backend\\Model\\Auth');\n if ($auth->getUser() != null) {\n $action['username'] = $auth->getUser()->getUsername();\n } else {\n $action['username'] = __('Unknown user');\n }\n } else {\n if (php_sapi_name() == 'cli') {\n // Action triggered from CLI\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_CLI;\n $action['username'] = utf8_encode(get_current_user());\n } else {\n $state = $objectManager->get('\\Magento\\Framework\\App\\State');\n if ($state->getAreaCode() == 'webapi_rest') {\n // Action triggered from API\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_API;\n\n } else {\n // Action triggered from Cron\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_CRON;\n $action['username'] = utf8_encode(get_current_user());\n }\n }\n }\n\n return $action;\n }", "title": "" }, { "docid": "8983a2ab97eb328eb6dab1c5623c69cd", "score": "0.5932819", "text": "public function action() : string\n {\n\t return $this->action;\n }", "title": "" }, { "docid": "2692c428af3823c8cc2cee3205368139", "score": "0.58929473", "text": "public function getActionHistory () {\n return UserActionHistory::getUserHistory();\n }", "title": "" }, { "docid": "9dc0896ffef81ff4581f8377ce9fb4b5", "score": "0.5879128", "text": "public function addHistory() {\n if (!empty($this->evidenciahistory_id)) {\n $sql = \"insert into tickethistory (ticket_id,description,created_at,user_id,evidenciahistory_id) \";\n $sql .= \"value ($this->ticket_id,\\\"$this->description\\\",NOW(),$this->user_id,\\\"$this->evidenciahistory_id\\\")\";\n return Executor::doit($sql);\n } else {\n $sql = \"insert into tickethistory (ticket_id,description,created_at,user_id,evidenciahistory_id) \";\n $sql .= \"value ($this->ticket_id,\\\"$this->description\\\",NOW(),$this->user_id,\\\"$this->evidenciahistory_id\\\")\";\n return Executor::doit($sql);\n }\n }", "title": "" }, { "docid": "e7f5c5e11c27c54545dc9ff939648771", "score": "0.58700436", "text": "function insights_get_history_actions() {\n global $db;\n $tbl = TABLE_PREFIX;\n\n $r = $db->Index(\"action\")->Query(\n \"select count(*) AS `rows` , `action`\n FROM `{$tbl}_history`\n GROUP BY `action`\n ORDER BY `action`\"\n );\n\n return( $r );\n}", "title": "" }, { "docid": "8b726fcb2f484c02aefcf91b3f016883", "score": "0.5867213", "text": "public static function writeHistory($action = 'update', $result = null) {\n global $lC_Database;\n \n $lC_Database->startTransaction();\n \n $Qhistory = $lC_Database->query('insert into :table_updates_log (action, result, user, dateCreated) values (:action, :result, :user, :dateCreated)');\n $Qhistory->bindTable(':table_updates_log', TABLE_UPDATES_LOG);\n $Qhistory->bindValue(':action', ucwords($action));\n $Qhistory->bindValue(':result', $result);\n $Qhistory->bindValue(':user', $_SESSION['admin']['firstname'] . ' ' . $_SESSION['admin']['lastname']);\n $Qhistory->bindValue(':dateCreated', date(\"Y-m-d H:i:s\")); \n $Qhistory->setLogging($_SESSION['module']); \n $Qhistory->execute(); \n\n if (!$lC_Database->isError()) {\n $lC_Database->commitTransaction();\n return true;\n } else {\n $lC_Database->rollbackTransaction();\n return false;\n } \n }", "title": "" }, { "docid": "537eab9e5254c9997ddd6370df61619b", "score": "0.5865054", "text": "function getHistory() {}", "title": "" }, { "docid": "ddc3e888d4aa184fe12ed2de9621c0d2", "score": "0.5819254", "text": "public function actionLog() {\n $file = Yii::app()->basePath . DIRECTORY_SEPARATOR . \"data\" . DIRECTORY_SEPARATOR . \"chat_log.html\";\n\n if (is_file($file)) {\n $filesize = filesize($file);\n if ($filesize > 0) {\n $fp = fopen($file, 'r');\n\n $contents = fread($fp, $filesize);\n fclose($fp);\n $page_title = $this->readPageTitle();\n $userName = explode(\":\",trim($page_title));\n $contents = GroupChat::model()->getChatHistory();\n echo CJSON::encode(array(\"content\" => $contents,\"page_title\"=>$page_title));\n } else {\n echo CJSON::encode(array(\"content\" => \"\",\"page_title\"=>\"\",\"user_name\"=>$userName[0]));\n }\n } else {\n echo CJSON::encode(array(\"content\" => \"\",\"page_title\"=>\"\"));\n }\n }", "title": "" }, { "docid": "b22604515476fb8cb011e2032b002133", "score": "0.5759748", "text": "public function getLogMessage();", "title": "" }, { "docid": "b85fa3471370c3dcfda001035b29a80b", "score": "0.57584614", "text": "public function operation_history() {\n $data['title'] = 'Nexup | History';\n\n if (isset($_SESSION['logged_in'])) {\n $get_operations_url = API_URL . 'Account/GetOperationHistory';\n $header = array('Content-Type: application/json');\n if (isset($_SESSION['xauthtoken'])) {\n $val = 'X-AuthToken: ' . $_SESSION['xauthtoken'];\n array_push($header, $val);\n }\n\n $history_post['apikey'] = API_KEY;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $get_operations_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($history_post));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $server_output = curl_exec($ch);\n $response = (array) json_decode($server_output);\n $op = array_merge_recursive($response['data']->ListOperation, $response['data']->TaskOperation);\n $data['operations'] = $op;\n $this->template->load('default_template', 'user/operations', $data);\n } else {\n $this->session->set_flashdata('error', 'Please login to continue!');\n redirect($this->agent->referrer());\n }\n }", "title": "" }, { "docid": "e99b852017c75ccc7948dee67bd0a799", "score": "0.5757954", "text": "public function getActionName()\n {\n // get the last action stack entry\n $lastEntry = $this->getActionStack()->getLastEntry();\n\n if ($lastEntry)\n {\n return $lastEntry->getActionName();\n }\n }", "title": "" }, { "docid": "aa5f607ff9d66b9633ff4e784404a071", "score": "0.5736952", "text": "public function pfmstransactionhistoryAction(){\n\t\t\t\n\t\t$admname = new Zend_Session_Namespace('adminMname'); \n\t\t$userid = new Zend_Session_Namespace('userid');\n if($admname->adminname==''){\n $this->_redirect('');\n }\n $role = new Zend_Session_Namespace('role');\t\n if(!in_array($role->role,$this->rolearray)){\n\t\t\t$this->_redirect('');\n }\n if($role->role==6){\n $this->_helper->layout->setLayout('admin/layout');\n }\n\t\t\n\t\t$request = $this->getRequest();//$this should refer to a controller\n\t\tif($request->getParam('benef_id')!=''){\n\t\t\t$querystr = safexss($request->getParam('benef_id'));\n\t\t\t$_GET['benef_id'] = $querystr;\n\t\t}\n\t\t$scheme_id = safexss(base64_decode($request->getParam('scheme_id')));\n\t\t$min_id = safexss(base64_decode($request->getParam('min_id')));\n\t\t\n\t\tif(($scheme_id == '') || (!is_numeric($scheme_id))){\n\t\t\t$this->_redirect('');\n\t\t}\n\t\t$cmi_list = new Application_Model_Managetransaction();\n\t\t$scheme_code = $cmi_list->getschemecode($scheme_id);\n\t\t$this->view->assign('scheme_code', $scheme_code);\n\t\t$schemedetail = $cmi_list->getschemename($scheme_id);\n\t\t$this->view->assign('scheme_id', $schemedetail);\n\t\t$this->view->assign('min_id', $min_id);\n\t\t$schemedetails = $schemedetail->toArray();\n if($request->getParam('actmsg')=='add'){\n $this->view->assign('successMsg', RECORD_INSERTED);\n }elseif($request->getParam('actmsg')=='edit'){\n $this->view->assign('successMsg', RECORD_UPDATED);\n }elseif($request->getParam('actmsg')=='del'){\n $this->view->assign('successMsg', RECORD_DELETED);\n }elseif($request->getParam('actmsg')=='inactivate'){\n $this->view->assign('successMsg', 'Selected record has been Deactivated successfully.');\n }\n\t\t// Remove query string on page refresh\n\t\tsession_start();\n\t\t$RequestSignature = md5($_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING'].print_r($_POST, true));\n\t\tif ($_SESSION['LastRequest'] == $RequestSignature){\n\t\t \t$pos = strpos($_SERVER['QUERY_STRING'], 'actmsg=');\n\t\t\tif ($pos !== false) {\n\t\t\t\t//$this->_redirect('/schemeowner/beneficiarydatalist?scheme_id='.base64_encode($schemedetails[0]['id']));\n\t\t\t}\n\t\t}else{\n\t\t $_SESSION['LastRequest'] = $RequestSignature;\n\t\t}\n\t\t// Remove query string on page refresh end\n\t\t\tif(isset($start)){\n\t\t\t\t// This variable is set to zero for the first page\n\t\t\t\t$start = 0;\n\t\t\t}else{\n\t\t\t\t $start=$request->getParam('start');\n\t\t\t\t}\n\t\t$page=0;\n\t\t$limit=1500;\n\t\t$scheme_id = base64_decode($request->getParam('scheme_id'));\n\t\t$asignedschemeid = $cmi_list->checkasignedschemeid($userid->userid,$scheme_id);\n\t\tif($asignedschemeid > 0 || $role->role == 1 || $role->role == 6){\n\t\t\t$cmishow_list = $cmi_list->pfmstransactiondatalist($start,$limit,$scheme_id);\n\t\t\t$countcmi = $cmi_list->countpfmstransactiondatalist($scheme_id);\n\t\t\t//$this->pr_man($cmishow_list,1);\n\t\t\t$this->view->assign('cmidata', $cmishow_list);\n\t\t\t$minpagingid = $request->getParam('min_id');\n\t\t\t$schmepagingid = $request->getParam('scheme_id');\n\t\t\t$page_name = 'beneficiarydatalist';\n\t\t\t$pagination1=$this->pagination_search($schmepagingid,$minpagingid, $countcmi,$year,$month,$start,$limit,$page_name);\n\t\t\t$this->view->assign('pagination', $pagination1);\n\t\t\t$this->view->assign('start', $start);\n\t\t\t$this->view->assign('counttotalcmireports', $countcmi);\n\t\t\t//echo \"aaab\";exit;\n\t\t}else{\n\t\t\t$this->_redirect('/schemeowner/beneficiarydatalist');\n\t\t}\n\t}", "title": "" }, { "docid": "be903889d24f6d3223b0a70b2b47ade4", "score": "0.5726721", "text": "public function getLastAction()\n {\n\n return $this->database->getSession( session_id() )->lastaction;\n }", "title": "" }, { "docid": "96323b672294b400614e2314190c194b", "score": "0.5718543", "text": "public function getActionlogs()\n {\n return $this->actionlogs;\n }", "title": "" }, { "docid": "06e4a74b15bb6ce670750d1d59f59c4b", "score": "0.57048947", "text": "public function getLogIntentionAction()\n {\n \n }", "title": "" }, { "docid": "52d925af2921658bcd753b608f60be3b", "score": "0.56885856", "text": "private function log(Model $model, string $action)\n {\n }", "title": "" }, { "docid": "20d8b15393ee68dc09d8e4e3018e9f2f", "score": "0.56876165", "text": "public function action()\n\t{\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "74026f672c4fa9a3330e381b5dead4f0", "score": "0.56587774", "text": "function logAction($action, $message, $file = 'log.txt')\n{\n $logfile = SITE_ROOT . DS . 'log' . DS . $file;\n\n if ($handle = fopen($logfile, 'a')) {\n $timestamp = strftime(\"%d.%m.%Y %H:%M:%S\", time());\n $content = \"$timestamp | $action : $message\\n\";\n fwrite($handle, $content);\n fclose($handle);\n } else {\n echo \"Nije uspelo logovanje\";\n }\n}", "title": "" }, { "docid": "906958e8866e3e06bdee5bcdcf7018be", "score": "0.56528884", "text": "function logAction($level,$method,$data,$action){\n\t$CI = &get_instance();\n\tlog_message($level,'DFI::'.$method.' | '. $CI->session->userdata('username')\n\t.' | '.$action.' | '. print_r($data,TRUE));\n}", "title": "" }, { "docid": "6733919df141daf3d5d86ed91646f52e", "score": "0.5642127", "text": "public function getAction()\n {\n return isset($this->action) ? $this->action : '';\n }", "title": "" }, { "docid": "7984775977fed6ccd15b94404589218f", "score": "0.5639815", "text": "public function action()\n {\n return $this->action;\n }", "title": "" }, { "docid": "697ab51e075984c3910305a65e522c34", "score": "0.5638907", "text": "public function transactionhistoryAction() {\n /**\n * Renderer loadlayout()\n */\n $this->loadLayout ();\n $this->_initLayoutMessages ( 'catalog/session' );\n /**\n * If not logged in\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\n /**\n * Set login redirect url.\n */\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\n } else {\n /**\n * Set page title.\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'Transaction History' ) );\n }\n $this->renderLayout ();\n }", "title": "" }, { "docid": "3abdff993ad1f7a5d34b34b3907b497c", "score": "0.56231636", "text": "public static function logChange( Model $model, string $action ) {\n ModelAction::create([\n 'id' => ModelAction::max('id')+1,\n 'user_id' => static::activeUserId(),\n 'model' => static::class,\n 'action' => $action,\n 'message' => static::logSubject($model),\n 'ip_address' => request()->ip(),\n 'models' => [\n 'new' => $action !== 'DELETED' ? $model->getAttributes() : null,\n 'old' => $action !== 'CREATED' ? $model->getOriginal() : null,\n 'changed' => $action === 'UPDATED' ? $model->getChanges() : null,\n ]\n ]);\n }", "title": "" }, { "docid": "12d73efbdf38dd11f6bb17f0a98236e7", "score": "0.56219864", "text": "public function getAction(): string\n {\n return $this->action;\n }", "title": "" }, { "docid": "03dc774c44478d7b9fbf8542b0cff2b5", "score": "0.5615899", "text": "private function getLogTemplate()\n {\n $user_id = $this->user ? $this->user->id : 'N/A';\n\n $template = now()->toDateTimeString().PHP_EOL;\n\n if ($this->action === 'create') {\n $template .= \"New model was created by $user_id.\"\n .PHP_EOL.'Inserted data: '\n .PHP_EOL.http_build_query($this->model->toArray(), '', PHP_EOL);\n } elseif ($this->action === 'edit') {\n $template .= \"Model {$this->model->id} was update by $user_id.\"\n .PHP_EOL.'MODEL BEFORE '\n .PHP_EOL.http_build_query(array_intersect_key($this->model->getOriginal(),\n array_intersect_key($this->model->getChanges(),\n array_flip($this->loggable_fields))), '', PHP_EOL)\n\n .PHP_EOL.'MODEL AFTER '\n .PHP_EOL.http_build_query(array_intersect_key($this->model->getChanges(),\n array_flip($this->loggable_fields)), '', PHP_EOL);\n } elseif ($this->action === 'delete') {\n $template .= \"Model {$this->model->id} was deleted by $user_id\";\n }\n\n $template .= PHP_EOL.PHP_EOL;\n\n return $template;\n }", "title": "" }, { "docid": "2f1e755da1398e06e73dbc87c8fc9e43", "score": "0.56108254", "text": "function history_id() {\n return $this->history_id;\n }", "title": "" }, { "docid": "5d9e1103e12f1551112564f4053345bc", "score": "0.5607661", "text": "public function getActionlogsId()\n {\n return $this->actionlogs_id;\n }", "title": "" }, { "docid": "84f1a4e0e6444b837fb02e9e80aae664", "score": "0.5599127", "text": "public function getHistory()\n {\n\n }", "title": "" }, { "docid": "18265a1561d4e5190d96687a271ecd5c", "score": "0.5595286", "text": "public function getAction(): string\n {\n if ($this->obj[0] !== null) {\n return $this->obj[0]->action;\n }\n return '';\n }", "title": "" }, { "docid": "7643a300b68ae5a6c9e004a9413d3edc", "score": "0.5587727", "text": "public function _actionsAction()\n\t{\n\t\t$this->ajax(\n\t\t\t'SELECT DATE_FORMAT(Date,\"%d/%m/%y à %Hh\"), CONCAT(Matiere, \\' : <a href=\"/correcteur/exercice/index/\\', Hash, \\'\">\\', Titre, \\'</a>\\'), Action\n\t\t\tFROM Exercices_Logs\n\t\t\tLEFT JOIN Exercices ON (Exercices_Logs.Exercice = Exercices.ID)\n\t\t\tLEFT JOIN Membres ON (Membres.ID = Exercices_Logs.Membre)\n\t\t\tWHERE Exercices_Logs.Correcteur = ' . $_SESSION['Correcteur']->getFilteredId(),\n\t\t\t'Exercices_Logs.ID DESC'\n\t\t);\n\t}", "title": "" }, { "docid": "a001239f81d24cf80b7912f173abecc0", "score": "0.5587579", "text": "public function actionViewLogs(){\n return $this->render('view-logs');\n }", "title": "" }, { "docid": "c06b4863e7be353b8a02cf3130813650", "score": "0.5579973", "text": "function choose_action()\n\t{\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('VIEW_ACTION_LOGS'))));\n\t\tbreadcrumb_set_self(do_lang_tempcode('RESULTS'));\n\n\t\t$title=get_page_title('VIEW_ACTION_LOGS');\n\n\t\trequire_code('templates_internalise_screen');\n\t\t$test_tpl=internalise_own_screen($title);\n\t\tif (is_object($test_tpl)) return $test_tpl;\n\n\t\t$id=get_param_integer('id',-1);\n\t\t$start=get_param_integer('start',0);\n\t\t$max=get_param_integer('max',50);\n\t\t$sortables=array('date_and_time'=>do_lang_tempcode('DATE_TIME'),'the_type'=>do_lang_tempcode('ACTION'));\n\t\t$test=explode(' ',get_param('sort','date_and_time DESC'),2);\n\t\tif (count($test)==1) $test[1]='DESC';\n\t\tlist($sortable,$sort_order)=$test;\n\t\tif (((strtoupper($sort_order)!='ASC') && (strtoupper($sort_order)!='DESC')) || (!array_key_exists($sortable,$sortables)))\n\t\t\tlog_hack_attack_and_exit('ORDERBY_HACK');\n\t\tglobal $NON_CANONICAL_PARAMS;\n\t\t$NON_CANONICAL_PARAMS[]='sort';\n\n\t\trequire_code('templates_results_table');\n\t\t$field_titles=array(do_lang_tempcode('USERNAME'),do_lang_tempcode('DATE_TIME'),do_lang_tempcode('ACTION'),do_lang_tempcode('PARAMETER_A'),do_lang_tempcode('PARAMETER_B'));\n\t\tif (addon_installed('securitylogging'))\n\t\t\t$field_titles[]=do_lang_tempcode('_BANNED');\n\t\t$fields_title=results_field_title($field_titles,$sortables,'sort',$sortable.' '.$sort_order);\n\n\t\t$filter_to_type=get_param('to_type','');\n\t\t$filter_param_a=get_param('param_a','');\n\t\t$filter_param_b=get_param('param_b','');\n\n\t\t$max_rows=0;\n\n\t\t// Pull up our rows: forum\n\t\tif (get_forum_type()=='ocf')\n\t\t{\n\t\t\t// Possible filter (called up by URL)\n\t\t\t$where='1=1';\n\t\t\tif ($filter_to_type!='')\n\t\t\t\t$where.=' AND '.db_string_equal_to('l_the_type',$filter_to_type);\n\t\t\tif ($filter_param_a!='')\n\t\t\t\t$where.=' AND l_param_a LIKE \\''.db_encode_like('%'.$filter_param_a.'%').'\\'';\n\t\t\tif ($filter_param_b!='')\n\t\t\t\t$where.=' AND l_param_b LIKE \\''.db_encode_like('%'.$filter_param_b.'%').'\\'';\n\t\t\tif ($id!=-1) $where.=' AND l_by='.strval($id);\n\n\t\t\t// Fetch\n\t\t\t$rows1=$GLOBALS['FORUM_DB']->query('SELECT l_reason,id,l_by AS the_user,l_date_and_time AS date_and_time,l_the_type AS the_type,l_param_a AS param_a,l_param_b AS param_b FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_moderator_logs WHERE '.$where.' ORDER BY '.$sortable.' '.$sort_order,$max+$start);\n\t\t\t$max_rows+=$GLOBALS['FORUM_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_moderator_logs WHERE '.$where);\n\t\t} else $rows1=array();\n\n\t\t// Pull up our rows: site\n\t\t{\n\t\t\t// Possible filter (called up by URL)\n\t\t\t$where='1=1';\n\t\t\tif ($filter_to_type!='')\n\t\t\t\t$where.=' AND '.db_string_equal_to('the_type',$filter_to_type);\n\t\t\tif ($filter_param_a!='')\n\t\t\t\t$where.=' AND param_a LIKE \\''.db_encode_like('%'.$filter_param_a.'%').'\\'';\n\t\t\tif ($filter_param_b!='')\n\t\t\t\t$where.=' AND param_b LIKE \\''.db_encode_like('%'.$filter_param_b.'%').'\\'';\n\t\t\tif ($id!=-1) $where.=' AND the_user='.strval($id);\n\n\t\t\t// Fetch\n\t\t\t$rows2=$GLOBALS['SITE_DB']->query('SELECT id,the_user,date_and_time,the_type,param_a,param_b,ip FROM '.get_table_prefix().'adminlogs WHERE '.$where.' ORDER BY '.$sortable.' '.$sort_order,$max+$start);\n\t\t\t$max_rows+=$GLOBALS['SITE_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.get_table_prefix().'adminlogs WHERE '.$where);\n\t\t\t$rows=array_merge($rows1,$rows2);\n\t\t}\n\n\t\trequire_code('actionlog');\n\n\t\t$fields=new ocp_tempcode();\n\t\t$pos=0;\n\t\twhile ((count($rows)!=0) && (($pos-$start)<$max))\n\t\t{\n\t\t\t$best=0; // Initialise type to integer\n\t\t\t$_best=0; // Initialise type to integer\n\t\t\t$best=NULL;\n\t\t\t$_best=NULL;\n\t\t\tforeach ($rows as $x=>$row)\n\t\t\t{\n\t\t\t\tif ((is_null($best))\n\t\t\t\t\t|| (($row['date_and_time']<$_best) && ($sortable=='date_and_time') && ($sort_order=='ASC'))\n\t\t\t\t\t|| (($row['date_and_time']>$_best) && ($sortable=='date_and_time') && ($sort_order=='DESC'))\n\t\t\t\t\t|| ((intval($row['the_type'])<$_best) && ($sortable=='the_type') && ($sort_order=='ASC'))\n\t\t\t\t\t|| ((intval($row['the_type'])>$_best) && ($sortable=='the_type') && ($sort_order=='DESC'))\n\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$best=$x;\n\t\t\t\t\tif ($sortable=='date_and_time') $_best=$row['date_and_time'];\n\t\t\t\t\tif ($sortable=='the_type') $_best=$row['the_type'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($pos>=$start)\n\t\t\t{\n\t\t\t\t$myrow=$rows[$best];\n\n\t\t\t\t$username=$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($myrow['the_user']);\n\t\t\t\t$mode=array_key_exists('l_reason',$myrow)?'ocf':'ocp';\n\t\t\t\t$url=build_url(array('page'=>'_SELF','type'=>'view','id'=>$myrow['id'],'mode'=>$mode),'_SELF');\n\t\t\t\t$mode_nice=($mode=='ocp')?'ocPortal':'OCF';\n\t\t\t\t$date=hyperlink($url,get_timezoned_date($myrow['date_and_time']),false,true,$mode_nice.'/'.$row['the_type'].'/'.strval($myrow['id']),NULL,NULL,NULL,'_top');\n\n\t\t\t\tif (!is_null($myrow['param_a'])) $a=$myrow['param_a']; else $a='';\n\t\t\t\tif (!is_null($myrow['param_b'])) $b=$myrow['param_b']; else $b='';\n\n\t\t\t\trequire_code('templates_interfaces');\n\t\t\t\t$_a=tpl_crop_text_mouse_over($a,8);\n\t\t\t\t$_b=tpl_crop_text_mouse_over($b,15);\n\n\t\t\t\t$type_str=do_lang($myrow['the_type'],$_a,$_b,NULL,NULL,false);\n\t\t\t\tif (is_null($type_str)) $type_str=$myrow['the_type'];\n\n\t\t\t\t$test=actionlog_linkage($myrow['the_type'],$a,$b,$_a,$_b);\n\t\t\t\tif (!is_null($test)) list($_a,$_b)=$test;\n\n\t\t\t\t$result_entry=array($username,$date,$type_str,$_a,$_b);\n\n\t\t\t\tif (addon_installed('securitylogging'))\n\t\t\t\t{\n\t\t\t\t\t$banned_test_1=array_key_exists('ip',$myrow)?$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_ip','ip',array('ip'=>$myrow['ip'])):NULL;\n\t\t\t\t\t$banned_test_2=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_member','the_member',array('the_member'=>$myrow['the_user']));\n\t\t\t\t\t$banned_test_3=$GLOBALS['FORUM_DRIVER']->is_banned($myrow['the_user']);\n\t\t\t\t\t$banned=((is_null($banned_test_1)) && (is_null($banned_test_2)) && (!$banned_test_3))?do_lang_tempcode('NO'):do_lang_tempcode('YES');\n\n\t\t\t\t\t$result_entry[]=$banned;\n\t\t\t\t}\n\n\t\t\t\t$fields->attach(results_entry($result_entry,true));\n\t\t\t}\n\n\t\t\tunset($rows[$best]);\n\t\t\t$pos++;\n\t\t}\n\t\t$table=results_table(do_lang_tempcode('ACTIONS'),$start,'start',$max,'max',$max_rows,$fields_title,$fields,$sortables,$sortable,$sort_order,'sort');\n\n\t\treturn do_template('ACTION_LOGS_SCREEN',array('_GUID'=>'d75c813e372c3ca8d1204609e54c9d65','TABLE'=>$table,'TITLE'=>$title));\n\t}", "title": "" }, { "docid": "a6b65c1117dbbeaa4b72b9ea21996ef6", "score": "0.5578558", "text": "function getPostTransactionActions($history) {\n $actions = array(4 => 'inquiryTransaction');\n\n if ( (in_array('3', $history) === false) && (in_array('2', $history) === false) ) {\n $actions[3] = 'approveTransaction';\n }\n\n if (in_array('2', $history) === false) {\n $actions[2] = 'cancelTransaction';\n }\n\n return $actions;\n }", "title": "" }, { "docid": "08c9d445505f491edf6c71eccb722af4", "score": "0.5571992", "text": "static public function toHistoryString($post)\n\t{\n\t\t$controller = sfContext::getInstance()->getController();\n\t\t$link = $controller->genUrl('@view_thread?thread_id=' . $post->getThreadId());\n\t\t\n\t\t$link = sprintf(\n\t\t\t'<a href=\"%s\">%s</a>',\n\t\t\t$link,\n\t\t\t'forum thread'\n\t\t);\n\t\t\n\t\treturn sprintf(\n\t\t\t'posted on a %s',\n\t\t\t$link\n\t\t);\n\t}", "title": "" }, { "docid": "8b2b715fbf7a25facdbc6f681546fcee", "score": "0.556756", "text": "protected function createActionLog()\n {\n list($beforeAttributes, $afterAttributes) = $this->getAttributes();\n\n if ($this->actionType === 'updated' && empty($beforeAttributes)) {\n return;\n }\n\n ActionLog::create([\n 'user_id' => auth()->id(),\n 'type' => $this->actionType,\n 'model_id' => $this->model->id,\n 'model_type' => $this->modelType,\n 'model_name' => $this->model->getLogActionModelName(),\n 'before_attributes' => json_encode($beforeAttributes),\n 'after_attributes' => json_encode($afterAttributes),\n ]);\n }", "title": "" }, { "docid": "f2e5dd54a9a9f915e3860a0e8d816960", "score": "0.55622894", "text": "public function execute()\n {\n $module = $this->getRequest()->getParam('module');\n $entity = $this->getRequest()->getParam('entity');\n\n $this->initCurrentAction();\n\n return $this->getResponse()->setBody(\n $this->_view->getLayout()->createBlock(\n 'Wyomind\\\\' . $module . '\\Block\\Adminhtml' . ($entity ? '\\\\' . $entity : '') . '\\Edit\\Tab\\ActionHistory'\n )->toHtml()\n );\n }", "title": "" }, { "docid": "648d517a2f51dcfee03bf4a76baf0ecf", "score": "0.5559455", "text": "public function title(): string\n {\n return $this->action;\n }", "title": "" }, { "docid": "0552b37fab50eaa21c26325d0089f91b", "score": "0.5556896", "text": "public function getActionName():string\n {\n return $this->action;\n }", "title": "" }, { "docid": "f7c3de3ad9e3bcd6288e99c16d90e0b0", "score": "0.555456", "text": "public function commentsHistoryAction()\n {\n $this->_initOrder();\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock('smvendors/adminhtml_sales_order_view_tab_history')->toHtml()\n );\n }", "title": "" }, { "docid": "a472536db886773ed2a8665d7c5dfbcf", "score": "0.5550547", "text": "public function getAction(): string\n {\n return $this->getStringValue(['action'], 'run');\n }", "title": "" }, { "docid": "ede3b7e8f6ec7be55db6d25f35a67d11", "score": "0.55304086", "text": "public static function processAuditLog(AuditLog $log): string\n {\n $sentence = '';\n\n if ($log->action == 'account_created') {\n $sentence = trans('account.log_account_created');\n }\n\n if ($log->action == 'employee_added_to_company') {\n $sentence = trans('account.log_employee_added_to_company', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_destroyed') {\n $sentence = trans('account.log_employee_destroyed', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_locked') {\n $sentence = trans('account.log_employee_locked', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_unlocked') {\n $sentence = trans('account.log_employee_unlocked', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'team_created') {\n $sentence = trans('account.log_team_created', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_updated') {\n $sentence = trans('account.log_team_updated', [\n 'old_name' => $log->object->{'team_old_name'},\n 'new_name' => $log->object->{'team_new_name'},\n ]);\n }\n\n if ($log->action == 'team_destroyed') {\n $sentence = trans('account.log_team_destroyed', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_added_to_team') {\n $sentence = trans('account.log_employee_added_to_team', [\n 'employee' => $log->object->{'employee_name'},\n 'team' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_removed_from_team') {\n $sentence = trans('account.log_employee_removed_from_team', [\n 'employee' => $log->object->{'employee_name'},\n 'team' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_updated') {\n $sentence = trans('account.log_employee_updated', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_updated_hiring_information') {\n $sentence = trans('account.log_employee_updated_hiring_information', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'manager_assigned') {\n $sentence = trans('account.log_manager_assigned', [\n 'name' => $log->object->{'manager_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'manager_unassigned') {\n $sentence = trans('account.log_manager_unassigned', [\n 'name' => $log->object->{'manager_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_invited_to_become_user') {\n $sentence = trans('account.log_employee_invited_to_become_user', [\n 'employee' => $log->object->{'employee_first_name'}.' '.$log->object->{'employee_last_name'},\n ]);\n }\n\n if ($log->action == 'position_created') {\n $sentence = trans('account.log_position_created', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_updated') {\n $sentence = trans('account.log_position_updated', [\n 'former_name' => $log->object->{'position_old_title'},\n 'new_name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_destroyed') {\n $sentence = trans('account.log_position_destroyed', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_assigned') {\n $sentence = trans('account.log_position_assigned', [\n 'name' => $log->object->{'position_title'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'position_removed') {\n $sentence = trans('account.log_position_removed', [\n 'name' => $log->object->{'position_title'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'flow_created') {\n $sentence = trans('account.log_flow_created', [\n 'name' => $log->object->{'flow_name'},\n ]);\n }\n\n if ($log->action == 'employee_worklog_logged') {\n $sentence = trans('account.log_employee_worklog_logged');\n }\n\n if ($log->action == 'employee_status_created') {\n $sentence = trans('account.log_employee_status_created', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_updated') {\n $sentence = trans('account.log_employee_status_updated', [\n 'former_name' => $log->object->{'employee_status_old_name'},\n 'new_name' => $log->object->{'employee_status_new_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_destroyed') {\n $sentence = trans('account.log_employee_status_destroyed', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_assigned') {\n $sentence = trans('account.log_employee_status_assigned', [\n 'name' => $log->object->{'employee_status_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_removed') {\n $sentence = trans('account.log_employee_status_removed', [\n 'name' => $log->object->{'employee_status_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'company_news_created') {\n $sentence = trans('account.log_company_news_created', [\n 'name' => $log->object->{'company_news_title'},\n ]);\n }\n\n if ($log->action == 'company_news_updated') {\n $sentence = trans('account.log_company_news_updated', [\n 'name' => $log->object->{'company_news_title'},\n ]);\n }\n\n if ($log->action == 'company_news_destroyed') {\n $sentence = trans('account.log_company_news_destroyed', [\n 'name' => $log->object->{'company_news_title'},\n ]);\n }\n\n if ($log->action == 'employee_morale_logged') {\n $sentence = trans('account.log_employee_morale_logged', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'company_pto_policy_created') {\n $sentence = trans('account.log_company_pto_policy_created', [\n 'year' => $log->object->{'company_pto_policy_year'},\n ]);\n }\n\n if ($log->action == 'company_pto_policy_updated') {\n $sentence = trans('account.log_company_pto_policy_updated', [\n 'year' => $log->object->{'company_pto_policy_year'},\n ]);\n }\n\n if ($log->action == 'time_off_created') {\n $sentence = trans('account.log_company_time_off_created', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'time_off_destroyed') {\n $sentence = trans('account.log_company_time_off_destroyed', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'address_added_to_employee') {\n $sentence = trans('account.log_employee_address_set', [\n 'address' => $log->object->{'partial_address'},\n ]);\n }\n\n if ($log->action == 'pronoun_assigned_to_employee') {\n $sentence = trans('account.log_employee_pronoun_set', [\n 'name' => $log->object->{'pronoun_label'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'pronoun_removed_from_employee') {\n $sentence = trans('account.log_employee_pronoun_removed', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_description_set') {\n $sentence = trans('account.log_employee_description_set', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_description_cleared') {\n $sentence = trans('account.log_employee_description_cleared', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_birthday_set') {\n $sentence = trans('account.log_employee_birthday_set', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'team_description_set') {\n $sentence = trans('account.log_team_description_set', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_description_cleared') {\n $sentence = trans('account.log_team_description_cleared', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_useful_link_created') {\n $sentence = trans('account.log_team_useful_link_created', [\n 'name' => $log->object->{'team_name'},\n 'link_name' => $log->object->{'link_name'},\n ]);\n }\n\n if ($log->action == 'team_useful_link_updated') {\n $sentence = trans('account.log_team_useful_link_updated', [\n 'name' => $log->object->{'team_name'},\n 'link_name' => $log->object->{'link_name'},\n ]);\n }\n\n if ($log->action == 'team_useful_link_destroyed') {\n $sentence = trans('account.log_team_useful_link_destroyed', [\n 'name' => $log->object->{'team_name'},\n 'link_name' => $log->object->{'link_name'},\n ]);\n }\n\n if ($log->action == 'team_news_created') {\n $sentence = trans('account.log_team_news_created', [\n 'name' => $log->object->{'team_name'},\n 'news_name' => $log->object->{'team_news_title'},\n ]);\n }\n\n if ($log->action == 'team_news_updated') {\n $sentence = trans('account.log_team_news_updated', [\n 'name' => $log->object->{'team_name'},\n 'news_name' => $log->object->{'team_news_title'},\n ]);\n }\n\n if ($log->action == 'team_news_destroyed') {\n $sentence = trans('account.log_team_news_destroyed', [\n 'name' => $log->object->{'team_name'},\n 'news_name' => $log->object->{'team_news_title'},\n ]);\n }\n\n if ($log->action == 'employee_personal_details_set') {\n $sentence = trans('account.log_employee_personal_details_set', [\n 'name' => $log->object->{'employee_name'},\n 'email' => $log->object->{'employee_email'},\n ]);\n }\n\n if ($log->action == 'team_leader_assigned') {\n $sentence = trans('account.log_team_leader_assigned', [\n 'name' => $log->object->{'team_leader_name'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_leader_removed') {\n $sentence = trans('account.log_team_leader_removed', [\n 'name' => $log->object->{'team_leader_name'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_work_from_home_logged') {\n $sentence = trans('account.log_employee_work_from_home_logged', [\n 'name' => $log->object->{'employee_name'},\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'employee_work_from_home_destroyed') {\n $sentence = trans('account.log_employee_work_from_home_destroyed', [\n 'name' => $log->object->{'employee_name'},\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'question_created') {\n $sentence = trans('account.log_question_created', [\n 'title' => $log->object->{'question_title'},\n 'status' => $log->object->{'question_status'},\n ]);\n }\n\n if ($log->action == 'question_updated') {\n $sentence = trans('account.log_question_updated', [\n 'title' => $log->object->{'question_title'},\n 'old_title' => $log->object->{'question_old_title'},\n ]);\n }\n\n if ($log->action == 'question_destroyed') {\n $sentence = trans('account.log_question_destroyed', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'question_activated') {\n $sentence = trans('account.log_question_activated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'question_deactivated') {\n $sentence = trans('account.log_question_deactivated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_created') {\n $sentence = trans('account.log_answer_created', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_updated') {\n $sentence = trans('account.log_answer_updated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_destroyed') {\n $sentence = trans('account.log_answer_destroyed', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'hardware_created') {\n $sentence = trans('account.log_hardware_created', [\n 'name' => $log->object->{'hardware_name'},\n ]);\n }\n\n if ($log->action == 'hardware_updated') {\n $sentence = trans('account.log_hardware_updated', [\n 'name' => $log->object->{'hardware_name'},\n 'old_name' => $log->object->{'hardware_old_name'},\n ]);\n }\n\n if ($log->action == 'hardware_destroyed') {\n $sentence = trans('account.log_hardware_destroyed', [\n 'name' => $log->object->{'hardware_name'},\n ]);\n }\n\n if ($log->action == 'hardware_lent') {\n $sentence = trans('account.log_hardware_lent', [\n 'hardware_name' => $log->object->{'hardware_name'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'hardware_regained') {\n $sentence = trans('account.log_hardware_regained', [\n 'hardware_name' => $log->object->{'hardware_name'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'recent_ship_created') {\n $sentence = trans('account.log_recent_ship_created', [\n 'team_name' => $log->object->{'team_name'},\n 'ship_title' => $log->object->{'ship_title'},\n ]);\n }\n\n if ($log->action == 'employee_attached_to_recent_ship') {\n $sentence = trans('account.log_employee_attached_to_recent_ship', [\n 'employee_name' => $log->object->{'employee_name'},\n 'ship_title' => $log->object->{'ship_title'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'ship_destroyed') {\n $sentence = trans('account.log_recent_ship_destroyed', [\n 'ship_title' => $log->object->{'ship_title'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'skill_created') {\n $sentence = trans('account.log_skill_created', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'skill_associated_with_employee') {\n $sentence = trans('account.log_skill_associated_with_employee', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_name' => $log->object->{'skill_name'},\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'skill_removed_from_an_employee') {\n $sentence = trans('account.log_skill_removed_from_an_employee', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_name' => $log->object->{'skill_name'},\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'skill_destroyed') {\n $sentence = trans('account.log_skill_destroyed', [\n 'name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'skill_updated') {\n $sentence = trans('account.log_skill_updated', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_old_name' => $log->object->{'skill_old_name'},\n 'skill_new_name' => $log->object->{'skill_new_name'},\n ]);\n }\n\n if ($log->action == 'expense_category_created') {\n $sentence = trans('account.log_expense_category_created', [\n 'id' => $log->object->{'expense_category_id'},\n 'name' => $log->object->{'expense_category_name'},\n ]);\n }\n\n if ($log->action == 'expense_category_updated') {\n $sentence = trans('account.log_expense_category_updated', [\n 'id' => $log->object->{'expense_category_id'},\n 'old_name' => $log->object->{'expense_category_old_name'},\n 'new_name' => $log->object->{'expense_category_new_name'},\n ]);\n }\n\n if ($log->action == 'expense_category_destroyed') {\n $sentence = trans('account.log_expense_category_destroyed', [\n 'name' => $log->object->{'expense_category_name'},\n ]);\n }\n\n if ($log->action == 'task_created') {\n $sentence = trans('account.log_task_created', [\n 'title' => $log->object->{'title'},\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'company_renamed') {\n $sentence = trans('account.log_company_renamed', [\n 'old_name' => $log->object->{'old_name'},\n 'new_name' => $log->object->{'new_name'},\n ]);\n }\n\n if ($log->action == 'company_currency_updated') {\n $sentence = trans('account.log_company_currency_updated', [\n 'old_currency' => $log->object->{'old_currency'},\n 'new_currency' => $log->object->{'new_currency'},\n ]);\n }\n\n if ($log->action == 'expense_created') {\n $sentence = trans('account.log_expense_created', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_manager') {\n $sentence = trans('account.log_expense_accepted_by_manager', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_accounting') {\n $sentence = trans('account.log_expense_accepted_by_accounting', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_accounting') {\n $sentence = trans('account.log_expense_rejected_by_accounting', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'employee_allowed_to_manage_expenses') {\n $sentence = trans('account.log_employee_allowed_to_manage_expenses', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_disallowed_to_manage_expenses') {\n $sentence = trans('account.log_employee_disallowed_to_manage_expenses', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'rate_your_manager_survey_answered') {\n $sentence = trans('account.log_rate_your_manager_survey_answered', [\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'employee_twitter_set') {\n $sentence = trans('account.log_employee_twitter_set', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'twitter' => $log->object->{'twitter'},\n ]);\n }\n\n if ($log->action == 'employee_twitter_reset') {\n $sentence = trans('account.log_employee_twitter_reset', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_slack_set') {\n $sentence = trans('account.log_employee_slack_set', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'slack' => $log->object->{'slack'},\n ]);\n }\n\n if ($log->action == 'employee_slack_reset') {\n $sentence = trans('account.log_employee_slack_reset', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_hiring_date_set') {\n $sentence = trans('account.log_employee_hiring_date_set', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'hiring_date' => $log->object->{'hiring_date'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_created') {\n $sentence = trans('account.log_one_on_one_entry_created', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_destroyed') {\n $sentence = trans('account.log_one_on_one_entry_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_created') {\n $sentence = trans('account.log_one_on_one_talking_point_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_talking_point_id' => $log->object->{'one_on_one_talking_point_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_created') {\n $sentence = trans('account.log_one_on_one_action_item_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_action_item_id' => $log->object->{'one_on_one_action_item_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_created') {\n $sentence = trans('account.log_one_on_one_note_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_note_id' => $log->object->{'one_on_one_note_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_destroyed') {\n $sentence = trans('account.log_one_on_one_action_item_destroyed', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_destroyed') {\n $sentence = trans('account.log_one_on_one_talking_point_destroyed', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_destroyed') {\n $sentence = trans('account.log_one_on_one_note_destroyed', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_marked_happened') {\n $sentence = trans('account.log_one_on_one_note_marked_happened', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n return $sentence;\n }", "title": "" }, { "docid": "ed3c3ede5058180494c78d7ee5ad5fd4", "score": "0.551074", "text": "public function dispatchLog();", "title": "" }, { "docid": "25ba849872e53805b46d380f6d98059c", "score": "0.55077046", "text": "public function getOrderHistoryUrl(){\n return $this->getUrl('sales/order/history');\n }", "title": "" }, { "docid": "9b671e432d526150bf76d0d1328af8f0", "score": "0.5503841", "text": "public function __toString()\n\t{\n\t\t$level = 0;\n\t\t$lines = [];\n\n\t\tforeach ($this->state as $action) {\n\t\t\tswitch ($action['type']) {\n\t\t\t\tcase 'request':\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . $action['name'] . ' requested ('; \n\t\t\t\t\t$level++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'dependsOn':\n\t\t\t\t\t$deps = $action['dependencies'];\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . 'Depedencies: ' . (empty($deps) ? 'none' : '[' . implode(', ', $deps) . ']'); \n\t\t\t\t\tbreak;\n\t\t\t\tcase 'note':\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . 'Note: ' . $action['note'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'received':\n\t\t\t\t\t$level--;\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . ')';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn implode(\"\\n\", $lines);\n\t}", "title": "" }, { "docid": "2904ef50a4498c0ca20b1ae675126b09", "score": "0.549825", "text": "function logaction($user_id, $res, $res_id = 0, $action = null)\n{\n q(\n 'INSERT INTO fud30_action_log (logtime, logaction, user_id, a_res, a_res_id)\n\t\tVALUES(' .\n __request_timestamp__ .\n ', ' .\n ssn($action) .\n ', ' .\n $user_id .\n ', ' .\n ssn($res) .\n ', ' .\n (int)$res_id .\n ')'\n );\n}", "title": "" }, { "docid": "5ef5614a605adc1dbfc64e542e741f33", "score": "0.54968923", "text": "function insights_history( $entry_id, $action, $note = '', $skip_copy = false ) {\n global $db;\n $tbl = TABLE_PREFIX;\n\n # phase one: make copies of all data associated with this $action_id\n if( $action === 'update' && $skip_copy === false ) {\n $copy_id = insights_backup($entry_id);\n\n # override $note to point to the old entry\n $note = \"~\" . $copy_id;\n }\n\n # phase two: get action id, record info about user and action\n $db->Query(\n \"insert into `{$tbl}_history`\n (`ip`, `action`, `entry_id`, `note`)\n values\n (:addr, :action, :entry_id, :note)\",\n array(\n \":addr\" => $_SERVER[\"REMOTE_ADDR\"],\n \":action\" => $action,\n \":entry_id\" => intval( $entry_id ),\n \":note\" => $note\n )\n );\n\n $action_id = $db->getInsertID();\n\n return( $action_id );\n}", "title": "" }, { "docid": "15ac8f6db05a89426d4050dcba777931", "score": "0.5495883", "text": "protected function Action() { \n if(isset($this->queryGET['roll'])) {\n return \"<output class='info'>\" . $this->Roll() . \"</output>\"; \n } else if(isset($this->queryGET['store'])) {\n return \"<output class='info'>\" . $this->Store() . \"</output>\"; \n } else if(isset($this->queryGET['restart'])) {\n return $this->Restart(); \n }\n }", "title": "" }, { "docid": "fd86a15b8e4feafc897a454093e020e5", "score": "0.5491284", "text": "public function action_history(){\n $this->template->content = $this->getView('payment-history')//View::factory('admin/payment-history')\n ->bind('sub', $sub);\n Spreedly::configure($this->site, $this->token);\n $sub=SpreedlySubscriber::find($this->user_id);\n }", "title": "" }, { "docid": "51c26a6d689a292e5f639040537e7736", "score": "0.5488722", "text": "function log_action($link, $action, $user, $ip, $details, $user_group, $db_query = '') {\n\t\t$action = $link->escape(strtoupper($action));\n\t\t$event_date = date(\"Y-m-d H:i:s\");\n\t\t$user = $link->escape($user);\n\t\t$ip = $link->escape($ip);\n\t\t$user_group = $link->escape($user_group);\n\t\t$details = $link->escape($details);\n\t\t$db_query = $link->escape($db_query);\n\t\t\n\t\tif ((!is_null($user) && strlen($user) > 0) && (!is_null($ip) && strlen($ip) > 0) && $link) {\n\t\t\t//$logSQL = \"INSERT INTO go_action_logs (user, ip_address, event_date, action, details, db_query, user_group) VALUES ('$user', '$ip', '$event_date', '$action', '$details', '$db_query', '$user_group');\";\n\t\t\t$insertData = array(\n\t\t\t\t'user' => $user,\n\t\t\t\t'ip_address' => $ip,\n\t\t\t\t'event_date' => $event_date,\n\t\t\t\t'action' => $action,\n\t\t\t\t'details' => $details,\n\t\t\t\t'db_query' => $db_query,\n\t\t\t\t'user_group' => $user_group\n\t\t\t);\n\t\t\t$result = $link->insert('go_action_logs', $insertData);\n\t\t}\n\t\t\n\t\tif ($result) {\n\t\t\t$log_id = $link->getInsertId();\n\t\t\treturn $log_id;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e156f1ff82f5504b6f902887058e2736", "score": "0.5485324", "text": "function getAction() { return $this->action; }", "title": "" }, { "docid": "5caf44da9f95d52c2e142203dca4a9e7", "score": "0.548314", "text": "public function getActionName()\n {\n return $this->action_name;\n }", "title": "" }, { "docid": "86cdfcfcce67065dd1b7c033143e7e5d", "score": "0.54794836", "text": "public function getActionName()\n {\n return $this->action;\n }", "title": "" }, { "docid": "86cdfcfcce67065dd1b7c033143e7e5d", "score": "0.54794836", "text": "public function getActionName()\n {\n return $this->action;\n }", "title": "" }, { "docid": "4c4fe4356bdf75e726e0f8f53104db0c", "score": "0.5465473", "text": "public function getAction() { return $this->_action; }", "title": "" }, { "docid": "48160e5f1bee1ed2d10e0e2cf9c6516e", "score": "0.5459732", "text": "static function getRebuildActions() {\n $actions = array(Router::assemble('activity_logs_admin_clean') => lang('Clean up existing log entries'));\n \n EventsManager::trigger('on_rebuild_activity_log_actions', array(&$actions));\n \n return $actions;\n }", "title": "" }, { "docid": "57889a174455134ba06765a865127cab", "score": "0.54523695", "text": "function logActivity($action = null, $name=null)\n\t{\n\t\tif (!isset ($name)) \n\t\t{\n\t\t}\n\n\t\t$stmt = \"INSERT INTO $this->userActivityLog SET \" .\n\t\t\t\"OrderId = $this->OrderId, \".\n\t\t\t\"OrderNameId = $name, \".\n\t\t\t\"ActionType = $action, \" .\n\t\t\t\t\"ActionTimeStamp = NOW()\";\n\n\t\t// echo \"$stmt <P>\";\n\n\t\t$result = $this->dbi->query($stmt);\n\n\t\treturn $this->getReturnValue($result);\n\t}", "title": "" }, { "docid": "5314a036fbb66e578a2ff1b0cd17be94", "score": "0.54506755", "text": "private function getLastEventByAction(string $action): \\Magento\\Logging\\Model\\Event\n {\n $collection = $this->_objectManager->create(\\Magento\\Logging\\Model\\Event::class)->getCollection();\n $lastEvent = $collection->addFieldToFilter('fullaction', $action)\n ->setOrder('time', 'DESC')\n ->getLastItem();\n\n return $lastEvent;\n }", "title": "" }, { "docid": "0c13e90cd138b3addfa58bf95b3a70d8", "score": "0.5440356", "text": "public function getHistoryData() {\n echo(\"GetHistoryData Mastervolt\\n\");\n return \"No History Data\"; \n }", "title": "" }, { "docid": "fb6eaba2570f65cac49e9a771c64dc18", "score": "0.5433113", "text": "public function getActionName()\n {\n return $this->_action;\n }", "title": "" }, { "docid": "efa824a6a53c250d3102376332239079", "score": "0.54263407", "text": "public function getNewActionUrl(): string\n {\n return $this->batchUrl->getNewActionUrl();\n }", "title": "" }, { "docid": "368e47f2f7bedab96bd6cdf538d0a8bc", "score": "0.54243433", "text": "protected function performAction()\n {\n parent::performAction();\n\n $this->accesslog->logChange(\n $this->request,\n $this->getTitle(),\n $this->saveData + $this->getModel()->loadFirst()\n );\n }", "title": "" }, { "docid": "53c4016c2384ce0346d160d03c38ccbf", "score": "0.5424341", "text": "public function InsertHistory()\n {\n\n\t\t\t$nicks = $this->GetNick($this->to_user,$_SESSION['userid']);\n\n $sth = DB::prep(\"INSERT INTO cms_messaging_history (user,from_ip, email, sess, msg, admin, type) VALUES(:user,INET_ATON(:from_ip),:email,:sess,:msg,:this_admin, 'admin')\");\n $sth->bindParam(\":msg\", $this->msg, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":from_ip\", $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":sess\", $nicks->sess, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":email\", $nicks->email, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":this_admin\", $nicks->admin, PDO::PARAM_STR);\n $sth->bindParam(\":user\", $nicks->nick, PDO::PARAM_STR);\n \n DB::Exec($sth);\n }", "title": "" }, { "docid": "ed391bc3d66e431919ecf4f93f6dd4cb", "score": "0.5423868", "text": "function get_action() {\n return $this->action;\n }", "title": "" }, { "docid": "bc43f9b2f2b6b98d310f134724c0b0ac", "score": "0.5422916", "text": "public function GetAction()\n {\n return Flag::ACTION_STRING[$this->action];\n }", "title": "" }, { "docid": "766cc5a5882a6b1541806b32d4c184ed", "score": "0.54209316", "text": "public function get_action()\n {\n return $this->action;\n }", "title": "" }, { "docid": "3152f0d3f6d4f7e3681da5adc6402501", "score": "0.54159003", "text": "public function testGetMessageHistory()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "1c19719b341b796f83c084b00561bed3", "score": "0.5412721", "text": "function chatHistory($request) {\n\t\t$partnerId = $request['params']['to'];\n\t\t$user = $this->pi->db->getUser();\n\t\t//$partner = $this->pi->db->getUser($partnerId);\n\t\t\n\t\t// Prepare response\n\t\t$items = '';\n\t\tif (isset($this->chatHistory[$partnerId])) {\n\t\t\t$items = $this->chatHistory[$partnerId];\n\t\t}\n\t\tif ($items != '') {\n\t\t\t$items = substr($items, 0, -1);\n\t\t}\n\t\t\n\t\t// Respond\n\t\treturn \"{ \\\"items\\\": [$items] }\";\n\t}", "title": "" }, { "docid": "22b6ad47de3ecafac83369c32298ecc8", "score": "0.5411978", "text": "function cash_create_log($type, $action, $message = '')\n{\n\tglobal $db;\n\t$action = implode(CASH_LOG_ACTION_DELIMITER,$action);\n\t$current_time = time();\n\t$sql = \"INSERT INTO \" . CASH_LOGS_TABLE . \"\n\t\t\t(log_time, log_type, log_action, log_text)\n\t\t\tVALUES(\" . $current_time . \", \" . $type . \", '\" . $db->sql_escape($action) . \"', '\" . $db->sql_escape($message) . \"')\";\n\t$db->sql_query($sql);\n}", "title": "" }, { "docid": "96b359a696f7fde23557c8b6ae8a25a4", "score": "0.5408305", "text": "private function get_action() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "96b359a696f7fde23557c8b6ae8a25a4", "score": "0.5408305", "text": "private function get_action() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "96b359a696f7fde23557c8b6ae8a25a4", "score": "0.5408305", "text": "private function get_action() {\n\t\treturn $this->action;\n\t}", "title": "" }, { "docid": "249c978d3aca12c6e44f71ba03baea89", "score": "0.5401322", "text": "public static function getAction()\r\n {\r\n return wcmSession::getInstance()->getCurrentAction();\r\n }", "title": "" }, { "docid": "98342172d5ec2cea0c765e51d800a84f", "score": "0.53991157", "text": "public function __toString() {\n\t\tif ($this->toString === null) {\n\t\t\tswitch ($this->objectTypeID) {\n\t\t\t\tcase \\wcf\\data\\object\\type\\ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.modifiableContent', 'com.woltlab.wbb.thread'):\n\t\t\t\t\t$this->toString = \\wcf\\system\\WCF::getLanguage()->getDynamicVariable('wcf.acp.modification.log.wbb.thread.'.$this->action, array(\n\t\t\t\t\t\t'thread' => $this->getObject(), \n\t\t\t\t\t\t'additionalData' => $this->additionalData\n\t\t\t\t\t)); \n\t\t\t\t\tbreak; \n\t\t\t\t\n\t\t\t\tcase \\wcf\\data\\object\\type\\ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.modifiableContent', 'com.woltlab.wbb.post'): \n\t\t\t\t\t$this->toString = \\wcf\\system\\WCF::getLanguage()->getDynamicVariable('wcf.acp.modification.log.wbb.post.'.$this->action, array(\n\t\t\t\t\t\t'post' => $this->getObject(), \n\t\t\t\t\t\t'additionalData' => $this->additionalData\n\t\t\t\t\t)); \n\t\t\t\t\tbreak; \n\t\t\t}\n\t\t\t\n\t\t\t\\wcf\\system\\event\\EventHandler::getInstance()->fireAction($this, 'toString_'. \\wcf\\data\\object\\type\\ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID)->objectType);\n\t\t}\n\t\t\n\t\tif ($this->toString !== null) {\n\t\t\treturn $this->toString; \n\t\t}\n\t\t\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a163d8cf9e6fbce73411e8386545af7d", "score": "0.53971434", "text": "public function action(): string {\n return $this->route->getActionName();\n }", "title": "" }, { "docid": "5b04763a4a8639a91b2b5938011084e1", "score": "0.53937083", "text": "public function getLogCommandsAction()\n {\n $data = $this->getModelManager()->getConnection()->fetchAll(\n 'SELECT DISTINCT `command` FROM `s_plugin_connect_log`'\n );\n\n $data = array_map(function ($column) {\n return $column['command'];\n }, $data);\n\n // Enforce these fields\n foreach (['fromShop', 'toShop', 'getLastRevision', 'update', 'checkProducts', 'buy', 'reserveProducts', 'confirm'] as $value) {\n if (!in_array($value, $data)) {\n $data[] = $value;\n }\n }\n\n $this->View()->assign([\n 'success' => true,\n 'data' => $data\n ]);\n }", "title": "" }, { "docid": "38c18cd96907c5d628fb4e41fb502c93", "score": "0.5390117", "text": "public function getAction() {\n return $this->action;\n }", "title": "" }, { "docid": "3e0eb928ade8532ae1de8375562769b0", "score": "0.5383616", "text": "function action_log_and_get_score($action = null, $model = null, $record_id = null, $user_id = null)\r\r{\r\r}", "title": "" }, { "docid": "eac705b669fd5606604e34b3b1ffcdd3", "score": "0.5383519", "text": "private function getAction()\r\n {\r\n return $this->action;\r\n }", "title": "" }, { "docid": "2eafefb1eec2ec010835fc2662b2f4d8", "score": "0.53827083", "text": "function bp_get_messages_form_action() {\n\t\treturn apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );\n\t}", "title": "" }, { "docid": "afb314c12d0a2c6bb494f250100e4f94", "score": "0.5382378", "text": "function irc_bot_message_history_replay( int $log_id ) : void\n{\n // Require administrator rights to run this action\n user_restrict_to_administrators();\n\n // Sanitize the log id\n $log_id = sanitize($log_id, 'int', 0);\n\n // Fetch the data we need to replay the log\n $dlog = mysqli_fetch_array(query(\" SELECT logs_irc_bot.channel AS 'il_channel' ,\n logs_irc_bot.body AS 'il_body'\n FROM logs_irc_bot\n WHERE logs_irc_bot.id = '$log_id' \"));\n\n // Strip the hash from the start of the channel name\n $channel = $dlog['il_channel'];\n if($channel && (substr($channel, 0, 1) === '#'))\n $channel = substr($channel, 1);\n\n // Replay the message and bypass silenced mode\n irc_bot_send_message($dlog['il_body'], $channel, 1, 1);\n\n // Update the log now that it has been sent (if there's still an error, it will appear in the replayed log instead)\n query(\" UPDATE logs_irc_bot\n SET logs_irc_bot.is_silenced = 0 ,\n logs_irc_bot.is_failed = 0\n WHERE logs_irc_bot.id = '$log_id' \");\n}", "title": "" }, { "docid": "550b8988772b7911588dea3333fae024", "score": "0.537675", "text": "public function get_action()\n {\n return $this->action;\n }", "title": "" }, { "docid": "82c7aec7447ae13c7e392a03a617e0b9", "score": "0.5366671", "text": "public static function processEmployeeLog(EmployeeLog $log): string\n {\n $sentence = '';\n\n if ($log->action == 'employee_created') {\n $sentence = trans('account.employee_log_employee_created');\n }\n\n if ($log->action == 'employee_locked') {\n $sentence = trans('account.employee_log_employee_locked');\n }\n\n if ($log->action == 'employee_unlocked') {\n $sentence = trans('account.employee_log_employee_unlocked');\n }\n\n if ($log->action == 'manager_assigned') {\n $sentence = trans('account.employee_log_manager_assigned', [\n 'name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'direct_report_assigned') {\n $sentence = trans('account.employee_log_direct_report_assigned', [\n 'name' => $log->object->{'direct_report_name'},\n ]);\n }\n\n if ($log->action == 'manager_unassigned') {\n $sentence = trans('account.employee_log_manager_unassigned', [\n 'name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'direct_report_unassigned') {\n $sentence = trans('account.employee_log_direct_report_unassigned', [\n 'name' => $log->object->{'direct_report_name'},\n ]);\n }\n\n if ($log->action == 'position_assigned') {\n $sentence = trans('account.employee_log_position_assigned', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_removed') {\n $sentence = trans('account.employee_log_position_removed', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'employee_added_to_team') {\n $sentence = trans('account.employee_log_employee_added_to_team', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_removed_from_team') {\n $sentence = trans('account.employee_log_employee_removed_from_team', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_worklog_logged') {\n $sentence = trans('account.employee_log_employee_worklog_logged');\n }\n\n if ($log->action == 'employee_status_assigned') {\n $sentence = trans('account.employee_log_employee_status_assigned', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_removed') {\n $sentence = trans('account.employee_log_employee_status_removed', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'morale_logged') {\n $sentence = trans('account.employee_log_morale_logged', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'time_off_created') {\n $sentence = trans('account.employee_log_time_off_created', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'time_off_destroyed') {\n $sentence = trans('account.employee_log_time_off_destroyed', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'address_added') {\n $sentence = trans('account.employee_log_address_set', [\n 'address' => $log->object->{'partial_address'},\n ]);\n }\n\n if ($log->action == 'pronoun_assigned') {\n $sentence = trans('account.employee_log_pronoun_set', [\n 'name' => $log->object->{'pronoun_label'},\n ]);\n }\n\n if ($log->action == 'pronoun_removed') {\n $sentence = trans('account.employee_log_pronoun_removed');\n }\n\n if ($log->action == 'description_set') {\n $sentence = trans('account.employee_log_description_set');\n }\n\n if ($log->action == 'description_cleared') {\n $sentence = trans('account.employee_log_description_cleared');\n }\n\n if ($log->action == 'birthday_set') {\n $sentence = trans('account.employee_birthday_set');\n }\n\n if ($log->action == 'personal_details_set') {\n $sentence = trans('account.employee_personal_details_set', [\n 'name' => $log->object->{'name'},\n 'email' => $log->object->{'email'},\n ]);\n }\n\n if ($log->action == 'work_from_home_logged') {\n $sentence = trans('account.employee_log_work_from_home_logged', [\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'work_from_home_destroyed') {\n $sentence = trans('account.employee_log_work_from_home_destroyed', [\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'answer_created') {\n $sentence = trans('account.employee_log_answer_created', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_updated') {\n $sentence = trans('account.employee_log_answer_updated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_destroyed') {\n $sentence = trans('account.employee_log_answer_destroyed', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'employee_attached_to_recent_ship') {\n $sentence = trans('account.employee_log_employee_attached_to_recent_ship', [\n 'ship_title' => $log->object->{'ship_title'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'skill_associated_with_employee') {\n $sentence = trans('account.employee_log_skill_associated_with_employee', [\n 'name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'skill_removed_from_an_employee') {\n $sentence = trans('account.employee_log_skill_removed_from_an_employee', [\n 'name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'task_created') {\n $sentence = trans('account.employee_log_task_created', [\n 'title' => $log->object->{'title'},\n ]);\n }\n\n if ($log->action == 'expense_created') {\n $sentence = trans('account.employee_log_expense_created', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_for_employee') {\n $sentence = trans('account.employee_log_expense_accepted_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_manager') {\n $sentence = trans('account.employee_log_expense_accepted_by_manager', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_manager') {\n $sentence = trans('account.employee_log_expense_rejected_by_manager', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_for_employee') {\n $sentence = trans('account.employee_log_expense_rejected_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_accounting_for_employee') {\n $sentence = trans('account.employee_log_expense_accepted_by_accounting_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_accounting') {\n $sentence = trans('account.employee_log_expense_accepted_by_accounting', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_accounting_for_employee') {\n $sentence = trans('account.employee_log_expense_rejected_by_accounting_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_accounting') {\n $sentence = trans('account.employee_log_expense_rejected_by_accounting', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'employee_allowed_to_manage_expenses') {\n $sentence = trans('account.employee_log_employee_allowed_to_manage_expenses');\n }\n\n if ($log->action == 'employee_disallowed_to_manage_expenses') {\n $sentence = trans('account.employee_log_employee_disallowed_to_manage_expenses');\n }\n\n if ($log->action == 'rate_your_manager_survey_answered') {\n $sentence = trans('account.log_rate_your_manager_survey_answered', [\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'twitter_set') {\n $sentence = trans('account.employee_log_employee_twitter_set', [\n 'twitter' => $log->object->{'twitter'},\n ]);\n }\n\n if ($log->action == 'twitter_reset') {\n $sentence = trans('account.employee_log_employee_twitter_reset');\n }\n\n if ($log->action == 'slack_set') {\n $sentence = trans('account.employee_log_employee_slack_set', [\n 'slack' => $log->object->{'slack'},\n ]);\n }\n\n if ($log->action == 'slack_reset') {\n $sentence = trans('account.employee_log_employee_slack_reset');\n }\n\n if ($log->action == 'hiring_date_set') {\n $sentence = trans('account.employee_log_hiring_date_set', [\n 'hiring_date' => $log->object->{'hiring_date'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_created') {\n $sentence = trans('account.employee_log_one_on_one_entry_created', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_entry_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_created') {\n $sentence = trans('account.employee_log_one_on_one_talking_point_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_talking_point_id' => $log->object->{'one_on_one_talking_point_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_created') {\n $sentence = trans('account.employee_log_one_on_one_action_item_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_action_item_id' => $log->object->{'one_on_one_action_item_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_created') {\n $sentence = trans('account.employee_log_one_on_one_note_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_note_id' => $log->object->{'one_on_one_note_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_talking_point_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_action_item_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_note_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_marked_happened') {\n $sentence = trans('account.employee_log_one_on_one_note_marked_happened', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n return $sentence;\n }", "title": "" }, { "docid": "5310163c84225aef1f254945796bb03b", "score": "0.5361113", "text": "public function get_action() {\n return $this->action;\n }", "title": "" }, { "docid": "c70ff83766075905e1cb4140a3b93b61", "score": "0.53571606", "text": "public function actionViewlogging()\n\t{\n\t\t$h_id = Yii::app()->request->getParam('h', AppHelper::two_way_string_encrypt(Yii::app()->user->id));\n\t\t$id = AppHelper::two_way_string_decrypt($h_id);\n\t\tself::check_function_argument($id);\n\t\tif (Yii::app()->user->getIsGuest()) {\n\t\t\tYii::app()->user->setReturnUrl(Yii::app()->request->baseUrl.'/site/viewloggingdetails');\n\t\t\t$this->redirect(Yii::app()->request->baseUrl.'/user/login');\n\t\t}\n\t\t$wslogging_model=WsLogging::model()->findByPk($id);\n\t\t$this->render('viewlogging',array(\n\t\t\t\t'wslogging_model'=>$wslogging_model,\n\t\t));\n\t}", "title": "" }, { "docid": "b88c80c5539c1bcea127369391a1d24d", "score": "0.53561646", "text": "function ajan_activity_action( $args = array() ) {\n\techo ajan_get_activity_action( $args );\n}", "title": "" }, { "docid": "56bcde5b0173a441bde00954bb8774b7", "score": "0.53561145", "text": "public function getActionName()\n\t{\n\t\treturn $this->_action;\n\t}", "title": "" }, { "docid": "757aff08d5272f8735a592320effbe00", "score": "0.5354372", "text": "protected function messageHistory($id) {\n\n $message_sheduling = DB::table('CRM_MC_EVENTS')\n ->where('CME_ID', $id)\n ->first();\n\n $mhdata['CMH_RET_BIZ_ID'] = $message_sheduling->CME_RET_BIZ_ID;\n $mhdata['CMH_CMCVH_ID'] = 0;\n $mhdata['CMH_MSG_TYPE'] = $message_sheduling->CME_MSG_TYPE;\n\n $mhdata['CMH_TITLE'] = $message_sheduling->CME_TITLE;\n $mhdata['CMH_CONTENT'] = $message_sheduling->CME_MSG_TXT;\n $mhdata['CMH_CCM_GENDER'] = $message_sheduling->CME_CCM_GENDER;\n $mhdata['CMH_CCRL_CUST_PROS_TYPE'] = $message_sheduling->CME_CCRL_CUST_PROS_TYPE;\n $mhdata['CMH_CREATED_DT'] = Carbon::now();\n\n DB::table('CRM_MC_HISTORY')->insert($mhdata);\n $data['message_sheduling'] = DB::table('CRM_MC_EVENTS')->where('CME_ID', '=', $id)->update(['CME_MSG_STATUS' => 2]);\n }", "title": "" }, { "docid": "a4d99c5e2db0767958c2f4120a88d7b6", "score": "0.53532743", "text": "static function record_log($action, $handler, $message){\n //date formatting\n $date=strftime('%Y-%m-%d %H:%M:%S', time());\n //log format::2013-01-02 01:02:03|Login: kenny logged in\n if($action==\"Clear\"){\n $logfile=SITE_ROOT.DS.\"logs\".DS.\"logs.txt\";\n file_put_contents($logfile, \"{$date} |{$action}:{$message}\\n\");\n }else{\n $content=\"{$date} |{$action}:{$message}\\n\";\n //writing the content into a file\n $write_state=fwrite($handler, $content);\n }\n }", "title": "" }, { "docid": "9f1dde3ff85e859d12b77d94a33e7cac", "score": "0.5351802", "text": "public function index_activityLog()\n {\n //\n }", "title": "" }, { "docid": "8e49b63c139c936e53160f3599c18369", "score": "0.5351518", "text": "public function GetAction() {\n\t\treturn self::$strAction;\n\t}", "title": "" }, { "docid": "e49255ac22c3c6616a0b6c4e9a16f054", "score": "0.53452003", "text": "public function createHistoryLog($entity_id, $entity_type, $remote_site_id, $action, $note = NULL) {\n // Check if exists.\n $query = \\Drupal::entityQuery('history_log')\n ->condition('target_entity_id', $entity_id)\n ->condition('target_entity_type', $entity_type)\n ->condition('remote_site', $remote_site_id)\n ->condition('action', $action);\n $existing_logs = $query->execute();\n if ($existing_logs) {\n // Update existing log.\n $log = HistoryLog::load(end($existing_logs));\n $log->setChangedTime(time());\n $log->set('note', $note);\n $log->save();\n }\n else {\n // Create a new history log.\n $values = array(\n 'target_entity_id' => $entity_id,\n 'target_entity_type' => $entity_type,\n 'remote_site' => $remote_site_id,\n 'action' => $action,\n 'note' => $note,\n );\n return HistoryLog::create($values)->save();\n\n }\n }", "title": "" }, { "docid": "c4a3cdea83d726c2b2870f86f5d70d19", "score": "0.53446764", "text": "public function getAction()\r\n {\r\n return $this->action;\r\n }", "title": "" } ]
33b0b5768df228b3024cf55a05133955
A way to get all the currently 'hot' artists Uses last.fm at the moment, could change later
[ { "docid": "44d202e8ee89d28e58bda106f5f94684", "score": "0.6771763", "text": "public function hot() {\n\t\t$this->set('artists', $this->Artist->getHot(8));\n\t}", "title": "" } ]
[ { "docid": "fafbf95d6ff8f6816791b4f9cb0f0b34", "score": "0.704185", "text": "public function GetAllArtist()\r\n {\r\n $html = $this->LoadSite(\"http://www.eachamps.rw/audios\");\r\n $c = HtmlPageCrawler::create($html);\r\n $links = $c->filter('.tabcontents #view2 .scroll-pane .panel-default .list-group .list-group-item a');\r\n $data = array();\r\n for ($i = 0; $i < $links->length; $i++) {\r\n $info = array();\r\n $info['artist'] = $links->eq($i)->html();\r\n $info['link'] = $links->eq($i)->attr('href');\r\n //$info['info'] = $this->ArtistDetails($links->eq($i)->attr('href'));\r\n array_push($data, $info);\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "67b781a51969d98814d0157cadc789c0", "score": "0.6972261", "text": "public function getArtists()\n {\n // return artists\n return (array) $this->artists;\n }", "title": "" }, { "docid": "58b40d631cf3154c758e28edfed67012", "score": "0.6851953", "text": "public function getAllArtists()\r\n\t{\r\n\t$artists = $this->select('*', 'artists');\r\n\treturn $artists;\r\n\t}", "title": "" }, { "docid": "a8798831cf45ab2e1ae66899c732f7fd", "score": "0.67795706", "text": "public static function artists()\n {\n return \"discogs:artists\";\n }", "title": "" }, { "docid": "d861df88975670501d59c96044ea934f", "score": "0.6703048", "text": "public function getArtist()\r\n {\r\n if (!empty($this->_tags['artists']))\r\n return $this->_tags['artist'];\r\n else return ;\r\n }", "title": "" }, { "docid": "e46958a02edb04173755a6eea732da29", "score": "0.6502736", "text": "public function getArtists($artist){\n\t\t$data['artist_name'] = $artist;\n\t\t//Get Artist information\n\t\t$data['artist_cover'] = Comicbooks::artists($artist)\n\t \t\t\t\t\t\t\t\t\t\t->select('cover_image')\n\t\t\t\t\t\t\t\t\t\t\t\t->orderBy('published_date', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t \t->distinct()->get();\n\t\t$data['artist_works'] = Comicbooks::artists($artist)\n\t\t\t\t\t\t\t\t\t ->select('book_name')\n\t\t\t\t\t\t\t\t\t ->orderBy('published_date', 'asc')\n\t\t\t\t\t\t\t\t\t ->distinct()->get();\n\n\t \t//Check to see if artist exist in database. If it doesn't Redirect to a wiki page\n\t $data['has_artist'] = (count($data['artist_works'])) ? true : false;\n\t\tif (!$data['has_artist']) {\n\t\t\treturn Redirect::away(\"http://en.wikipedia.org/wiki/\".ucwords($artist));\n\t\t}\n\t\t$this->layout->content = View::make('artist', $data);\n\t}", "title": "" }, { "docid": "d55771dbc76b0f3f603682c538f05d65", "score": "0.6498086", "text": "function WOLFARTISTS() {\n\treturn Wolf_Artists::instance();\n}", "title": "" }, { "docid": "8e19adff16fd3b0ea7b047877fcf0559", "score": "0.63691163", "text": "public function getArtists($id)\n {\n \n // skladanka, gdzie chcemy wziac artist (album artist mamy v/a wtedy)\n // plyta producencka, gdzie chcemy wziac feat\n // normalna plyta gdzie wykonawca jest autor plyty (ale nie mamy jak odroznic od producenckiej)\n \n // moze jako wykonawce traktowac zawsze album artist, ale dawac w nawiasie feat ?\n // hhbd.pl/Dj 600v/_/Merctedes (feat. Tede),4581.html\n // hhbd.pl/VA/Letnie hity 2010/Merctedes (feat. Tede),4581.html\n $artists = new Jkl_List();\n //set feat as artist\n $featuring = Model_Artist_Api::getInstance()->getSongFeaturing($id);\n foreach ($featuring->items as $key => $value) {\n $artists->add($value);\n }\n \n //if empty \n //get list of albums\n // seat first album artist not v/a as artist\n if (sizeof($artists->items) < 1) {\n $featured = Model_Album_Api::getInstance()->getSongAlbums($id, null);\n foreach ($featured->items as $key => $value) {\n if ($value->artist->name != 'V/A') {\n $artists->add($value->artist);\n } \n }\n }\n \n // if still empty\n // set song's artist\n if (sizeof($artists->items) < 1) {\n $artist = Model_Artist_Api::getInstance()->getSongArtist($id); \n foreach ($featured->items as $key => $value) {\n $artists->add($value);\n }\n }\n return $artists; \n }", "title": "" }, { "docid": "dac397de04eb120c416974b67154c6ef", "score": "0.6366875", "text": "function artistLists( $offset = 0 ){\n\n\t\treturn $this->take(Config::get('cms_config.limit'))\n\t\t\t\t\t->offset($offset)\n\t\t\t\t\t->get();\n\t}", "title": "" }, { "docid": "1a19cfe861e20153e83667c799c5319c", "score": "0.6365595", "text": "public function populateMusicArtists($artist)\n\t\t\t{\n\t\t\t\t$strtoarray = explode(',',$artist);\n\t\t\t\t$artist = array_pop($strtoarray);\n\t\t\t\t$sql = 'SELECT artist_name, '.\n\t\t\t\t\t\t'(CASE WHEN `artist_name` LIKE \\''.$artist.'%\\' THEN 1 ELSE 0 END) AS relevance1, '.\n\t\t\t\t\t\t'(CASE WHEN `artist_name` LIKE \\'%'.$artist.'%\\' THEN 1 ELSE 0 END) AS relevance2 '.\n\t\t\t\t\t\t' FROM '.$this->CFG['db']['tbl']['music_artist'].\n\t\t\t\t\t\t' WHERE artist_name LIKE \\'%'.$artist.'%\\''.\n\t\t\t\t\t\t' AND music_artist_id!=1'.\n\t\t\t\t\t\t' ORDER BY relevance1 DESC, relevance2 DESC';\n\n\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t$rs = $this->dbObj->Execute($stmt, array());\n\t\t\t if (!$rs)\n\t\t\t\t trigger_error($this->dbObj->ErrorNo().' '.\n\t\t\t\t\t\t$this->dbObj->ErrorMsg(), E_USER_ERROR);\n\n\t\t\t\tif(!$rs->PO_RecordCount())\n\t\t\t\t\treturn false;\n\n\t\t\t\t$artist_name = array();\n\t\t\t\twhile($row = $rs->FetchRow())\n\t\t\t\t\t{\n\t\t\t\t\t\t$artist_name[] = trim($row['artist_name']);\n\t\t\t\t\t}\n\t\t\t\treturn $artist_name;\n\t\t\t}", "title": "" }, { "docid": "9bbaa13b47b25b22bc6860e577a0814f", "score": "0.63458663", "text": "public function getArtistSearchResult()\n {\n return $this->artistSearchResult;\n }", "title": "" }, { "docid": "5bcd185617e7e1d518f93304013d5a93", "score": "0.614506", "text": "function getArtistInfo($artist, $api){\n $album_list = array();\n $xml_request_url = 'http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist='.$artist.'&api_key='.$api;\n $xml = new SimpleXMLElement($xml_request_url, null, true);\n if($xml->topalbums->album){\n $artist_info['album_list'] = array();\n foreach($xml->topalbums as $value){\n foreach($value->album as $test){\n array_push($album_list,'<a href=\"'.$test->url.'\">'.$test->name.'</a>');\n }\n }\n }\n if($xml->artist->bio->summary){\n $artist_info['summary'] = $xml->artist->bio->summary;\n $artist_info['info'] = $xml->artist->bio->content;\n }\n return $artist_info;\n}", "title": "" }, { "docid": "f7d22be55b142ba9d7caa52c90381843", "score": "0.6105338", "text": "public function getTopTags($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.gettoptags\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_TAGS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }", "title": "" }, { "docid": "d33d296dd90b27db256769b1c66ddb1d", "score": "0.6102792", "text": "function get_artist()\r\n {\r\n return $this->get_additional_property(self :: PROPERTY_ARTIST);\r\n }", "title": "" }, { "docid": "9683c78056ccd61b073012c074947930", "score": "0.6096452", "text": "public function getArtistSearchResultInfo()\n {\n return $this->artistSearchResultInfo;\n }", "title": "" }, { "docid": "a5be8557e3eb8beaf6c23f364e42550e", "score": "0.60147697", "text": "function queryArtworkArtistInfo($art){\n $artworkQuery;\n $artistArtworkQuery;\n $artistNames;\n $artistQuery;\n $result;\n\n if(is_array($art)){\n // build main image artist name (by querying ARTWORK with artworkReferenceNo in the EXHIBITION table)\n if($artworkQuery = queryReference('ARTWORK', 'ArtworkID', $art['ArtworkID'])){\n\n // check if artist_artwork table gets referenced\n if($artistArtworkQuery = queryReference('ARTIST_ARTWORKS', 'ArtworkID', $artworkQuery[0]['ArtworkID'])){\n\n // build the artistNames string\n $artistNames =\"\";\n\n // loop through the artwork query\n foreach($artistArtworkQuery as $artist){\n\n // query the ARTIST table with corresponding ID\n if($artistsQuery = queryReference('ARTIST', 'ArtistID', $artist['ArtistID'])){\n\n // build name and concatenate each return string\n $artistNames .= buildArtistName($artistsQuery[0]);\n\n }\n }\n }\n }\n \n $result = array(\"artwork\" => $artworkQuery, \"artists\" => $artistNames);\n }\n return $result;\n }", "title": "" }, { "docid": "d4381bf7d94e787e87b6b7bcd2ae77bf", "score": "0.60025483", "text": "public function artists() {\n return $this->belongsToMany('Artist', 'artist_musician');\n }", "title": "" }, { "docid": "414a402f8766349b7b4ee0d6e31a3489", "score": "0.5995856", "text": "private function getrecenttracks()\n {\n include_once \"../app/API/newdb.php\";\n $conn = getconn();\n $sql = \"SELECT * FROM metadata ORDER BY STR_TO_DATE(releaseDate,'%Y-%c-%e') DESC limit 5\";\n $myres = array();\n $result = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $item = array(\n 'id' => $row['id'],\n 'songName' => $row['songName'],\n 'albumName' => $row['albumName'],\n 'artists' => $row['artists'],\n 'releaseDate' => $row['releaseDate'],\n 'songImage' => $row['songImage'],\n 'genre' => $row['genre'],\n 'popularity' => $row['popularity']\n );\n\n array_push($myres, $item);\n }\n $conn->close();\n return $myres;\n }", "title": "" }, { "docid": "132e4ff1bd27555915613e2c502e4c4d", "score": "0.5983257", "text": "function list_artist()\n {\n // Recupération des artistes pour les options du select \n $artist = new Artist();\n $row_artiste = $artist->details_artist();\n return $row_artiste;\n }", "title": "" }, { "docid": "fa346369caf563c46de95c633535f080", "score": "0.5971614", "text": "function getArtist()\n\t{\n\t\treturn $this->_artist;\n\t}", "title": "" }, { "docid": "2a5d1e265f60cc85874ca1b7203db6bc", "score": "0.5960267", "text": "public function getSongsbyArtist($artist) {\n // create null artist\n $searchArtist[] = null;\n // Loop through the songs array\n foreach ($this->songs as $value) {\n // Check the value of the current items properties in the array to see if they match the artist we are looking for\n if($value->artist == $artist){\n //if the artist does match the one we are looking for, push it to the search artist array and echo values\n array_push($searchArtist, $value);\n echo $value . \"\\n\";\n }\n }\n //return print_r($searchArtist);\n }", "title": "" }, { "docid": "777dda2e937d2e0e21d1db1244c70b36", "score": "0.5953435", "text": "public function refreshArtistList()\n {\n $key = Config::get('key');\n $endpoint = Config::get('endpoint');\n $faceListUUID = Config::get('faceListUUID');\n\n Http::withoutVerifying()->withHeaders([\n 'Content-Type' => 'application/json',\n 'Ocp-Apim-Subscription-Key' => $key\n ])->post(\"$endpoint/face/v1.0/largefacelists/$faceListUUID/train\");\n }", "title": "" }, { "docid": "8c820a4f9c319048b3d2740420ad4984", "score": "0.5948619", "text": "function getLatestSongs() {\n\t\t$songs = json_decode( $this->fetchLatest()->getBody()->getContents(), true );\n\n\t\t$this->parseSongs( $songs );\n\t}", "title": "" }, { "docid": "744f38014c7467806bafe5b0ea227f48", "score": "0.5936104", "text": "public function index()\n {\n return Artist::all();\n }", "title": "" }, { "docid": "f12a09e66ae9b341e3ce5595aba8cc95", "score": "0.5922935", "text": "public function getArtist(){\n return $this->artist;\n }", "title": "" }, { "docid": "8ffa0148f98c569db127d73b1e06bd8d", "score": "0.5901701", "text": "public function getArtist() {\n $artist = $this->_getTrack()->getArtist();\n if ($artist == null) {\n $artist = $this->_getTrack()->getAlbum()->getProduct()->getMytunesArtist();\n }\n return $artist;\n }", "title": "" }, { "docid": "569c8eb4871edfed002864d67cd575c0", "score": "0.58981055", "text": "public function MakeArtistAdvancedSearch(){\n\t\t//get all artists\n\t\t$artist =$this->DanceRepository->GetArtists();\n\t\t$artistsSearchlist = \"\";\n\t\t// foreach artist make a checkbox \n\t\tforeach ($artist as $artist) {\n\t\t\t$artistsSearchlist .= \"<input type='checkbox' name='ArtistCheckbox[]' value=\".$artist[\"Id\"].\"><label>\".$artist[\"Name\"].\"</label><br/>\";\n\t\t}\n\t\t//return all artists checkboxes\n\t\treturn $artistsSearchlist;\n\t}", "title": "" }, { "docid": "a547d449350f21b203fdce3d957363b8", "score": "0.5883599", "text": "public function getArtist()\n {\n return $this->artist;\n }", "title": "" }, { "docid": "a547d449350f21b203fdce3d957363b8", "score": "0.5883599", "text": "public function getArtist()\n {\n return $this->artist;\n }", "title": "" }, { "docid": "a547d449350f21b203fdce3d957363b8", "score": "0.5883599", "text": "public function getArtist()\n {\n return $this->artist;\n }", "title": "" }, { "docid": "a547d449350f21b203fdce3d957363b8", "score": "0.5883599", "text": "public function getArtist()\n {\n return $this->artist;\n }", "title": "" }, { "docid": "ebcd15b367520aad46e9ffa9803d2577", "score": "0.58790743", "text": "function sr_artist_tracks($artist)\r\n{\t\r\n\t$tracks = array();\r\n\tglobal $tracks_mb;\r\n\t$meta = $tracks_mb->the_meta();\r\n\t$trackmeta = $meta['tracks'];\r\n\t\r\n\tif($trackmeta){\r\n\t\tforeach ($trackmeta as $track){\r\n\t\t\t$track = $track['track-link'];\r\n\t\t\tif (!in_array($track , $tracks)){\r\n\t\t\t\tarray_push($tracks, $track);\r\n\t\t\t}\r\n\t\t}\r\n\t} \r\n\t$args = $rel_args = array('post_type' => 'release' , 'artist' => $artist , 'posts_per_page' => '-1');\r\n\t$rel_query = new WP_query($rel_args);\r\n\t\t\r\n\tif(have_posts()): while ( $rel_query->have_posts() ) : $rel_query->the_post();\r\n\t\r\n\t\t$meta = $tracks_mb->the_meta();\r\n\t\t$trackmeta = $meta['tracks'];\r\n\t\r\n\t\tif($trackmeta){\r\n\t\t\tforeach ($trackmeta as $track){\r\n\t\t\t\t$track = $track['track-link'];\r\n\t\t\t\tif (!in_array($track , $tracks)){\r\n\t\t\t\t\tarray_push($tracks, $track);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\r\n\tendwhile; endif; wp_reset_query();\r\n\t\r\n\t$tracks_count = count($tracks);\r\n\tif($tracks_count > 7){\r\n\t\t$tracks = array_slice($tracks, 0, 7);\r\n\t}\r\n\tif(!empty($tracks)){\r\n\t\techo '<aside id=\"tracks\" class=\"fourcol\"><h2 class=\"aside-header\">Listen</h2>';\r\n\t\techo '<div class=\"sc-player\">';\r\n\t\tforeach ($tracks as $track)\r\n\t\t{\t\r\n\t\t\techo '<a href=\"' . $track . '\" class=\"sample-track\">' . $track . '</a>';\r\n\t\t}\r\n\t\techo '</div></aside><!--#tracks-->';\r\n\t}\r\n}", "title": "" }, { "docid": "1640313410df2f6623bf0d2f97ad804f", "score": "0.58760655", "text": "function sr_get_rels_artist($postID , $link = true, $tag = 'h2'){\r\n\r\n\t$artist_terms = get_the_terms( $postID, 'artist' );\r\n\t$artists = array();\r\n\tforeach ($artist_terms as $artist_term)\r\n\t{\t\r\n\t\tarray_push($artists, $artist_term->term_id);\r\n\t}\r\n\t$artists_titles = array();\r\n\tforeach ($artist_terms as $artist_term)\r\n\t{\t\r\n\t\t$artist_title = get_page_by_title($artist_term->name , OBJECT, 'artist');\r\n\t\t$artist_title = array('title' => $artist_title->post_title, 'guid' => $artist_title->guid);\r\n\t\tarray_push($artists_titles, $artist_title);\r\n\t}\r\n\t\r\n\t$artists_titles_count = count($artists_titles);\r\n\techo '<'. $tag .' class=\"entry-artists\">';\r\n\tif($artists_titles_count <= 2):\r\n\t\tforeach($artists_titles as $artist_title): ?>\r\n\t\t\t<span class=\"entry-artist faint\">\r\n\t\t\t\t<? if ($link == true): ?>\r\n\t\t\t\t\t<a href=\"<?php echo $artist_title['guid'];?>\" title= \"More about <?php echo \r\n\t\t\t\t\t$artist_title['title']; ?>\"><?php echo $artist_title['title']; ?></a>\r\n\t\t\t\t<? else:\r\n\t\t\t\t\techo $artist_title['title'];\r\n\t\t\t\tendif; ?>\r\n\t\t\t</span> <?php\r\n\t\tendforeach;\r\n\telse: ?>\r\n\t\t<span class=\"entry-artist faint\">Various Artists</span>\r\n\t<?php endif; //wp_reset_query();\r\n\techo '</'. $tag .'>';\r\n\treturn $artists;\r\n}", "title": "" }, { "docid": "bd8e3941d91ab65647bf45edde3e0daa", "score": "0.58757293", "text": "public static function artistsIgnore()\n {\n return \"discogs:artists:ignore\";\n }", "title": "" }, { "docid": "edafdf8f67f90bf0896cfdf88303344a", "score": "0.58636916", "text": "public function getDisplayArtist()\n {\n return $this->displayArtist;\n }", "title": "" }, { "docid": "57fc54f76c643e6f901d3b08c6c4bbff", "score": "0.5843973", "text": "public function getArtists()\n {\n\n try {\n\n //search the token\n $em = $this->getDoctrine()->getEntityManager();\n $oArtistRepo = $em->getRepository(Artist::class);\n\n $oArtists = $oArtistRepo->findAll();\n\n if (empty($oArtistRepo))\n throw new \\Exception('No artists found');\n\n //package to return\n $arrArtist = array_map(function($oArtist) {\n return $oArtist->getSerializedArtist();\n }, $oArtists );\n\n $response = ['result' => self::SUCCESS_RESPONSE, 'message' => 'success', 'data' => $arrArtist];\n } catch (\\Exception $ex) {\n $response = ['result' => self::NOT_SUCCESS_RESPONSE, 'message' => $ex->getMessage(), 'data' => ''];\n }\n\n return $this->json($response);\n }", "title": "" }, { "docid": "bf324adea6fd1ec1db81be15ba16f1d5", "score": "0.5842245", "text": "protected function getArtistQuery()\n {\n return $this->artistQuery;\n }", "title": "" }, { "docid": "f46ddaa80713065377c2d813f7edc964", "score": "0.58234257", "text": "function fetch_ijlastfm_data($username = 'just_in_time90',$trackNum = 3,$showArt = 1,$showUI = 1,$useReturn = 0){\n$options = get_option(\"ij_lastfm_widget\");\nlibxml_use_internal_errors(true);\nif (!is_array($options))\n{\n$options = array(\n\t\t'title' => 'Last.fm Recently Played',\n\t\t'username' => 'just_in_time90',\n\t\t'trackNum' => '3',\n\t\t'showArt' => '1',\n\t\t'showUI' => '1',\n\t\t'profileLink' => 'View My Profile'\n );\n}\nif(false === ($latest = get_transient('ij_lastfm_widget_'.$username))){\n$request_url = \"http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=\".$username.\"&limit=50&api_key=f02d8c8d50cd86d57bed580b6c6aeda3\";\n$ch = curl_init();\n$timeout = 5;\ncurl_setopt($ch, CURLOPT_URL, $request_url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n$latest = curl_exec($ch);\ncurl_close($ch);\nset_transient('ij_lastfm_widget_'.$username, $latest, 60);\n}\nif(false === ($ui = get_transient('ij_lastfm_widget_uinfo_'.$username))){\n$request_url = \"http://ws.audioscrobbler.com/2.0/?method=user.getinfo&user=\".$username.\"&api_key=f02d8c8d50cd86d57bed580b6c6aeda3\";\n$ch = curl_init();\n$timeout = 5;\ncurl_setopt($ch, CURLOPT_URL, $request_url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n$ui = curl_exec($ch);\ncurl_close($ch);\nset_transient('ij_lastfm_widget_uinfo_'.$username, $ui, 60);\n}\n\n$latest = new SimpleXMLElement($latest);\n$ui = new SimpleXMLElement($ui);\nif($latest->xpath('//track')){\n//gather user info\n$upic = $ui->user->image[1];\n$username = $ui->user->name;\n$playcount = $ui->user->playcount;\n$timejoin = $ui->user->registered['unixtime'];\n$fromCountry = $ui->user->country;\n\n$theTracks = \"\";\n\nif($showUI==1){\n$theTracks = $theTracks.\"<div class=\\\"lastfm_container user\\\">\";\nif($upic!=''){\n$theTracks = $theTracks.\"<img src=\\\"\".$upic.\"\\\" alt=\\\"Profile Pic for \".$username.\"\\\"/>\";\n}\n//determin link text\nif($options['profileLink'] == \"\")\n{\n$profileLink = \"View My Profile\";\n}else{\n$profileLink = $options['profileLink'];\n}\n$theTracks = $theTracks.\"<span class=\\\"lastfm_user_name\\\">\".$username.\"</span>\";\n$theTracks = $theTracks.\"<span class=\\\"lastfm_user_info\\\"><a href=\\\"http://last.fm/user/\".$username.\"\\\">\".$profileLink.\"</a></span>\";\n$theTracks = $theTracks.\"<span class=\\\"lastfm_user_info\\\">\".$playcount.\" plays since \".date(\"F j Y\",(int)$timejoin).\"</span>\";\n$theTracks = $theTracks.\"</div>\";\n}\n$i=0;\nforeach($latest->xpath('//track') as $track){\n//get all the info\n\t$title = $track->xpath('//name');\n\t$title = $title[$i];\n\t$nowPlaying = $track->xpath('//track/@nowplaying');\n\t$datePlayed = $track->xpath('//date/@uts');\n\t$albumArt = $track->xpath('//image[@size=\"medium\"]');\n\t$artist = $track->xpath('//artist');\n//create the DIV\n$theTracks = $theTracks.\"<div class=\\\"lastfm_container track\\\">\";\n\tif($showArt==1){\n//do we want to show album art?\n\tif($albumArt[$i] != \"\"){\n\t$theTracks = $theTracks.\"<img src='\".$albumArt[$i].\"' width='52' height='52' alt='Album Art for \".$title.\"'/>\";\n\t}else{\n\t$theTracks = $theTracks.\"<img src='http://cdn.last.fm/flatness/catalogue/noimage/2/default_artist_medium.png' width='52' height='52' alt='No Album Art Available'/>\";\n\t}\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_title\\\">\".$title.\"</span>\";\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_artist\\\">\".$artist[$i].\"</span>\";\n\t//lets see if this song is currently playing...\n\tif($nowPlaying[$i] != \"\"){\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_info now_playing\\\"><img src=\\\"\".WP_PLUGIN_URL.\"/lastfm-recently-played-tracks/images/icon_eq.gif\\\"/>now playing!</span>\";\n\t}else{\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_info\\\">\".human_time_diff($datePlayed[$i]).\" ago</span>\";\n\t}\n\t}else{\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_info\\\">\".$title.\"</span>\";\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_artist\\\">\".$artist[$i].\"</span>\";\n\t//lets see if this song is currently playing...\n\tif($nowPlaying[$i] != \"\"){\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_info now_playing\\\"><img src=\\\"\".WP_PLUGIN_URL.\"/lastfm-recently-played-tracks/images/icon_eq.gif\\\"/>now playing!</span>\";\n\t}else{\n\t$theTracks = $theTracks.\"<span class=\\\"lastfm_track_info\\\">\".human_time_diff($datePlayed[$i]).\" ago</span>\";\n\t}\n}\n\t$i++;\n$theTracks = $theTracks.\"</div>\";\n\tif($i == $trackNum){break;};\n\tif($i == 50){break;};\n}\n}else{\n\t$theTracks = \"<span class=\\\"lastfm_track_info\\\">Something went wrong... Last.fm may be down.</span>\";\n}\nIf($useReturn == 1){\nreturn $theTracks;\n}else{\necho $theTracks;\n}\n}", "title": "" }, { "docid": "e5d1d37a86d0df133a414bfddc91c747", "score": "0.58045304", "text": "function findArtist($level, $echonest, $i = 0)\n{\n if ($i > 100) {\n die('sorry, no artist found');\n }\n\n $familiarity = 0.9 - ($level/10);\n\n $results = $echonest->getArtistApi()->search(array(\n 'genre' => 'classical',\n 'min_familiarity' => $familiarity,\n 'artist_start_year_before' => 1870,\n 'sort' => 'familiarity-desc'\n ));\n\n $rand = rand(0, count($results) - 1);\n $artist = $results[$rand];\n\n $location = $echonest->getArtistApi()->setId($artist['id'])->getProfile(array(\n 'bucket' => 'artist_location'\n ));\n\n $country = $location['artist_location']['country'];\n $city = $location['artist_location']['city'];\n\n // filter the USA because we get wrong results from there -> this is just a hack\n if ($country == 'United States'\n || empty($city)\n || empty($country)\n ) {\n return findArtist($level, $echonest, ++$i);\n }\n\n return $location;\n}", "title": "" }, { "docid": "740c8c8c093751c432c261997fc678cb", "score": "0.57630706", "text": "function hnd_artist_events() {\n\n\t$artist_title = get_the_title();\n\n\tadd_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n \t$artist_events = new WP_Query( array(\n\t\t'post_type' => 'events',\n\t\t'order' => 'DESC',\n\t\t'posts_per_page' => -1,\n\t\t'artist_title' => $artist_title,\n\t) );\n\tremove_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n \t\n\t# TODO: split into upcoming and past events\n\n\tif( isset( $artist_events ) && $artist_events->have_posts() ) {\n\t\twhile( $artist_events->have_posts() ) : $artist_events->the_post();\n\t\t\tget_template_part( 'loop', 'item' );\n\t\tendwhile;\n\t} else {\n\t\techo '<h2>No Upcoming Events</h2><hr>';\n\t}\n\t\n\twp_reset_query();\n}", "title": "" }, { "docid": "0626754873d261691b16b939df55bb9b", "score": "0.5748841", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CDACertifBundle:Artist')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "3253382079eeb30d95d42bdae183ed7d", "score": "0.5743927", "text": "function getFavorites() \n {\n return $this->favorites;\n }", "title": "" }, { "docid": "009c2cb74e5580b3e0ee653e8c81e2f7", "score": "0.57435393", "text": "function getLastFm() {\n\n $user = '** USERNAME **'; // Enter your username here\n $key = '** API KEYS **'; // Enter your API Key\n $status = 'Last Played:'; // default to this, if 'Now Playing' is true, the json will reflect this.\n $endpoint = 'https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=' . $user . '&&limit=2&api_key=' . $key . '&format=json';\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); // 0 for indefinite\n curl_setopt($ch, CURLOPT_TIMEOUT, 10); // 10 second attempt before timing out\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));\n\n $response = curl_exec($ch);\n $lastfm[] = json_decode($response, true);\n\n curl_close($ch);\n\n $artwork = $lastfm[0]['recenttracks']['track'][0]['image'][2]['#text'];\n\n if ( empty( $artwork ) ) {\n $artwork = 'artwork-fallback.png';\n }\n\n $trackInfo = [\n 'name' => $lastfm[0]['recenttracks']['track'][0]['name'],\n 'artist' => $lastfm[0]['recenttracks']['track'][0]['artist']['#text'],\n 'link' => $lastfm[0]['recenttracks']['track'][0]['url'],\n 'albumArt' => $artwork,\n 'status' => $status\n ];\n\n if ( !empty($lastfm[0]['recenttracks']['track'][0]['@attr']['nowplaying']) ) {\n $trackInfo['nowPlaying'] = $lastfm[0]['recenttracks']['track'][0]['@attr']['nowplaying'];\n $trackInfo['status'] = 'Now Playing:';\n }\n\n return displayLastFM($trackInfo);\n}", "title": "" }, { "docid": "33a576a7ad8502fac6df1ad68858cc5a", "score": "0.5696698", "text": "function lastfm_recenttracks($lastfm_username,$amount=5) {\n\t$list=file(\"http://ws.audioscrobbler.com/1.0/user/$lastfm_username/recenttracks.txt\");\n\t$i=0;\n\t$pieces=array();\n\t$temp=array();\n\twhile ($i<$amount) {\n\t\t//each piece's pieces array structure: 0=>$timestamp, 1=>$artist, 2=>$title\n\t\t$pieces[$i]=explode(\",\",$list[$i]);\n\t\t//now $pieces[$i][0] is our timestamp of current song, $pieces[$i][1] are other parts of the song info\n\t\t$temp[$i][0]=$pieces[$i][1];\n\t\t//I saved the other part of the track info (track, artist) to $temp[$i][0] for later to use substr. Because some songs may have \" - \" someting like \"Oh God - Please Help me!\"\n\t\t$temp[$i][1]=explode(\"---\",preg_replace('/[^0-9a-z\\s\\`\\~\\!\\@\\#\\$\\%\\^\\*\\(\\)\\; \\,\\.\\'\\/\\_\\-]/i', '-',$pieces[$i][1])); //file() messes up with the \" - \", don't know. Tried on 2 different servers, both same. it changes it to some special char which hardens the job. Instead, I changed them to - char and join them to use with explode\n\t\t$pieces[$i][1]=trim($temp[$i][1][0]);\n\t\t//now $pieces[$i][1] is artist\n\t\t$pieces[$i][2]=substr($temp[$i][0],(strlen($pieces[$i][1])+4)); //4 , because \" - \" this makes 3 chars, and a file() shows - as a false character, and it makes one extra character, that's why it's 3+1=4\n\t\t//$pieces[$i][2] is now title\n \n\t\t//echo \"timestamp: \".$pieces[$i][0].\"<br>\";\n\t\t//echo \"artist: \".$pieces[$i][1].\"<br>\";\n\t\t//echo \"title: \".$pieces[$i][2].\"<hr>\";\n\t\t$i++;\n\t}\n \nfor($j=0;$j<$i;$j++) { unset($temp[$j][0],$temp[$j][1]); } //for memory cleanup\n \nreturn $pieces; //either returns the array, or uncomment echo statements and change this to return true; for echoing. I prefer returning the array\n}", "title": "" }, { "docid": "76f4b98555cae4372740651b92d3111b", "score": "0.5680409", "text": "public function getArtist() {\n\t\t\treturn $this->artist;\n\t\t}", "title": "" }, { "docid": "9f31984700fcc3613ec546e993324c94", "score": "0.56763595", "text": "public function getTopFans($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.gettopfans\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_FANS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }", "title": "" }, { "docid": "52d58bb9d2914b2482aae6f0eb5be37f", "score": "0.5673547", "text": "function ListAlbums() {\n\t//THIS is not in use for my purposes KLY\n\tglobal $gp;\n\ttry {\n\t $userFeed = $gp->getUserFeed(\"default\");\n\t foreach ($userFeed as $userEntry) {\n\t echo $userEntry->title->text . \"<br />\\n\";\n\t }\n\t} catch (Zend_Gdata_App_HttpException $e) {\n\t echo \"Error: \" . $e->getMessage() . \"<br />\\n\";\n\t if ($e->getResponse() != null) {\n\t echo \"Body: <br />\\n\" . $e->getResponse()->getBody() .\n\t \"<br />\\n\";\n\t }\n\t // In new versions of Zend Framework, you also have the option\n\t // to print out the request that was made. As the request\n\t // includes Auth credentials, it's not advised to print out\n\t // this data unless doing debugging\n\t // echo \"Request: <br />\\n\" . $e->getRequest() . \"<br />\\n\";\n\t} catch (Zend_Gdata_App_Exception $e) {\n\t echo \"Error: \" . $e->getMessage() . \"<br />\\n\";\n\t}\n}", "title": "" }, { "docid": "b54d0f10478b89313a2b11d129efd410", "score": "0.5637695", "text": "public function getFavorites()\n {\n return $this->get('1.1/favorites/list.json');\n }", "title": "" }, { "docid": "a6a5408905f55ee4769acfda0203399c", "score": "0.56357807", "text": "function getOGAuthors();", "title": "" }, { "docid": "aa2d03078adf780369d77a44265f80cc", "score": "0.56293935", "text": "public function getAll() {\r\n\t\tif (!$this->userController->isUserAdmin()) {\r\n\t\t\t$this->userController->index();\r\n\t\t} else {\r\n\t\t\t$artistArray = $this->dao->retrieveAll();\r\n\t\t\tinclude ADMIN_VIEWS . '/adminartist.php';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "07edddb85180b071ec68c97283096aa1", "score": "0.5614671", "text": "public function artist_musicians() {\n return $this->hasMany('ArtistMusician');\n }", "title": "" }, { "docid": "54be2a36547c2ca8661a8157946ac3d8", "score": "0.5608186", "text": "function get_artist($GroupID) {\n\t$Results = get_artists(array($GroupID));\n\treturn $Results[$GroupID];\n}", "title": "" }, { "docid": "f821dd2d7054ff7ba28dd2b94250b8e1", "score": "0.56065506", "text": "public function getArtist($id);", "title": "" }, { "docid": "59d2a1d18654f5b1cb9f55588528ee45", "score": "0.560624", "text": "public function getArtist($parameters = null)\n {\n return $this->getRelated('AlbumOrama\\Models\\Artists', $parameters);\n }", "title": "" }, { "docid": "4c73b0d16c5a7c1731e48956b3e53653", "score": "0.5597599", "text": "public static function getArtist($name) {\n\t\t$result = file_get_contents(\"http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=\" . urlencode($name) . \"&autocorrect=1&format=json&limit=10&api_key=\" . self::API_KEY);\n\t\tif ($result !== false) {\n\t\t\t$artist = new Artist($name);\n\n\t\t\treturn $artist->setTopTracks(json_decode($result, true));\n\t\t}\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "ee2c564e63ab7fdc9176db1d2cddc89e", "score": "0.5586276", "text": "abstract protected function getAlbumArtist(): string;", "title": "" }, { "docid": "308f29bbf7096206ef5635d7428b8910", "score": "0.5584955", "text": "public function getAlbumsByArtist($artist) {\n $success = $this->_db->query(\"SELECT * FROM albums WHERE album_artist = ' $artist ' \");\n\n if ($success) {\n $albums = [];\n while ($row = $success->fetch_assoc()) {\n $albums[] = $row;\n }\n return $albums;\n }\n\n return NULL;\n }", "title": "" }, { "docid": "ca5511be178170c7d1640ab21e6293b4", "score": "0.5584499", "text": "public function Recently_song()\r\n {\r\n $html = $this->LoadSite(\"http://www.eachamps.rw/recentlyadded\");\r\n $c = HtmlPageCrawler::create($html);\r\n $links = $c->filter('.songs-wid table .sng-img a');\r\n $data = array();\r\n for ($i = 0; $i < $links->length; $i++) {\r\n $link = $links->eq($i)->attr('href');\r\n array_push($data, $link);\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "0d0366dfc4ab75b552bc5becb3d6045c", "score": "0.55573106", "text": "public function viewArtist(){\n $result = $this->danceAdmin->getAllArtists();\n foreach ($result as $row){\n $data[] = array('id'=>$row->artist_id,'name'=>$row->name,'genre'=>$row->genre);\n }\n $this->view('danceAdmins/viewArtist',$data);\n }", "title": "" }, { "docid": "d1260e30acca974058c44ce46e0640e6", "score": "0.5540244", "text": "public function artistAlbums($artist)\n {\n //procurar albums do artista\n $data = LastFm::searchArtistAlbum($artist);\n $searchError = LastFm::getErrorMsg($data);\n $obj = ($searchError) ? $searchError : $data->topalbums->album;\n\n return view('pages.music.artistAlbums')\n ->with(\"albums\", $obj)\n ->with(\"artist\", $artist);\n }", "title": "" }, { "docid": "07973cdc35b30a9bfaaf9371a292f531", "score": "0.5525384", "text": "function getArtists() {\r\n\t$memc = new Memcached();\r\n\t$memc->addServer(\"localhost\", 11211) or die(\"Could not connect to memcached\");\r\n\t$artists = $memc->get(\"artists\");\r\n\tif($artists) {\r\n\t\techo \"<option>MEMCACHED</option>\";\r\n\t\treturn $artists;\r\n\t} else {\r\n\t\t$sql = 'SELECT ArtistID, FirstName, LastName FROM Artists';\r\n\t\techo \"<option>NOT MEMCACHED</option>\";\r\n\t\t$result = DBQuery($sql);\r\n\t\ttry {\r\n\t\t\twhile($row = $result->fetch()) {\r\n\t\t\t\t$artists[$row['ArtistID']] = $row['FirstName'].' '.$row['LastName'];\r\n\t\t\t}\r\n\t\t\t$memc->set(\"artists\", $artists, 60);\r\n\t\t\treturn $artists;\r\n\t\t} catch (PDOException $e) {\r\n\t\t\tdie($e->getMessage());\r\n\t\t}\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "caa9f441f1377f2e5cfb1556afa4ea59", "score": "0.5523972", "text": "private function getpopular()\n {\n include_once \"../app/API/newdb.php\";\n $conn = getconn();\n $sql = \"SELECT * from metadata order by popularity desc limit 5\";\n $myres = array();\n $result = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $item = array(\n 'id' => $row['id'],\n 'songName' => $row['songName'],\n 'albumName' => $row['albumName'],\n 'artists' => $row['artists'],\n 'releaseDate' => $row['releaseDate'],\n 'songImage' => $row['songImage'],\n 'genre' => $row['genre'],\n 'popularity' => $row['popularity']\n );\n\n array_push($myres, $item);\n }\n $conn->close();\n return $myres;\n }", "title": "" }, { "docid": "29b10b606a5134aea1113786b72264af", "score": "0.5522644", "text": "function addArtists($c){\n\t$artists = array();\n\t$db = new DB($c['db_host'], $c['db_user'], $c['db_pass'], $c['db_name']);\n\t$sql = \"SELECT id, name from artist order by name asc\";\n\t\t$query = $db->query($sql);\n\t\twhile($row = $query->fetch_array()){\n\t\t\t$i = $row['id'];\n\t\t\t$n = $row['name'];\n\t\t\t$artists[] = new Artist($i,$n);\n\t\t}\n\t\t$db->close();\n\t\treturn $artists;\n}", "title": "" }, { "docid": "4757f14f1ab5529dd01ba8d630602752", "score": "0.5518958", "text": "public function getTopAlbums($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_ALBUMS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }", "title": "" }, { "docid": "f6a597929c72c1f393a6380cf6c4a517", "score": "0.55085284", "text": "private function artists_above_50() {\n\n//Make a master list as a single dimensional array\n$tmplist = explode(',', preg_replace('/(\\r\\n|[\\r\\n])/', ',', trim($this->file_contents)));\n\n//product the array of only the duplicates\n$duplicates_array = $this->array_not_unique($tmplist);\n\n//get a count for how many times each is duplicated\n$count_array = @array_count_values($duplicates_array);\t//supress warning with blank entries\n\n$dup_array = array();\n\n//Find all duplicate artists that are mentioned 50 times or more\nforeach ($count_array as $key => $value) {\nif ($value >= 50) {\n$dup_array[] = $key;\n}\n}\n\nreturn $dup_array;\n\n}", "title": "" }, { "docid": "2247ab41c2831135d47168863fd9da32", "score": "0.55033606", "text": "function sr_rels_by_artist($args = array() , $show_artist = false)\r\n{\t\r\n\t$defaults = array(\r\n\t\t'artist' => '',\r\n\t\t'thumb_size' => 'thumbnail',\r\n\t\t'limit' => '6',\r\n\t\t'buy_now' => true,\r\n\t\t'exclude' => '',\r\n\t\t'aside' => false,\r\n\t\t'title' => false,\r\n\t);\r\n\t\r\n\t$options = array_merge($defaults , $args);\r\n\t\r\n\t$query_args = array(\r\n\t\t'post_type' => 'release' ,\r\n\t\t'post_status' => 'publish',\r\n\t\t'posts_per_page' => $options['limit'] ,\r\n\t\t'post__not_in' => array($options['exclude']),\r\n\t\t'orderby' => 'meta_value',\r\n\t\t'meta_key' => '_sr_release-date'\r\n\t);\r\n\tif ($options['artist'] != ''){\r\n\t\t$query_args['tax_query'] = array(\r\n\t\t\tarray(\r\n\t\t\t\t'taxonomy' => 'artist',\r\n\t\t\t\t'field' => 'id',\r\n\t\t\t\t'terms' => $options['artist']\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n\t$rel_query = new WP_query($query_args);\r\n\t$aside = $options['aside'];\r\n\tif($aside == false)\r\n\t{\r\n\t\tif ($options['title'] == true){\r\n\t\t\t$wrapper_o = '<section id=\"releases\" class=\"nested\"><h2 class=\"section-header\">Latest Releases</h2>';\r\n\t\t}else{\r\n\t\t\t$wrapper_o = '<section id=\"releases\" class=\"clearfix\">';\r\n\t\t}\r\n\t\t$wrapper_o .= '<div class=\"releases-wrap clearfix\">';\r\n\t\t$wrapper_c = '</div><!--.releases-wrap--></section><!--#releases-->';\r\n\t\t$article_tag_o = '<article class=\"release twocol\">';\r\n\t\t$article_tag_c = '</article>';\r\n\t}else{\r\n\t\t$wrapper_o = '<aside id=\"releases\" class=\"fourcol\"><h2 class=\"aside-header\">More Releases</h2><ul class=\"artist-releases img-list\">';\r\n\t\t$wrapper_c = '</ul></aside><!--#releases-->';\r\n\t\t$article_tag_o = '<li class=\"release\">';\r\n\t\t$article_tag_c = '</li>';\r\n\t\t\r\n\t}\r\n\tif( $rel_query->have_posts() ):\r\n\t\techo $wrapper_o;\r\n\t\twhile ($rel_query->have_posts() ): $rel_query->the_post(); ?>\r\n\t\t\t<?php echo $article_tag_o;?>\r\n\t\t\t\t<?php $rel_id = get_the_ID(); ?>\r\n\t\t\t\t<a href=\"<?php the_permalink(); ?>\" <?php if($aside == true){echo 'class=\"red-roll \"'; }?> rel=\"bookmark\">\r\n\t\t\t\t<div class=\"img-holder\">\r\n\t\t\t\t\t<?php sr_post_thumbnail($options['thumb_size'] , false, 'null');?>\r\n\t\t\t\t</div>\r\n\t\t\t\t<?php //if($aside == true): ?>\r\n\t\t\t\t<div class=\"info\">\r\n\t\t\t\t<?php //endif; ?>\r\n\t\t\t\t\t<span class=\"title-date-holder\">\r\n\t\t\t\t\t\t<h3 class=\"entry-title <?php echo $class; ?> \"><?php the_title(); ?></h3> <?php\r\n\t\t\t\t\t\t\tif($show_artist == false):\r\n\t\t\t\t\t\t\t\t$release_date = get_post_meta( $rel_id , '_sr_release-date', true);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ($release_date):\r\n\t\t\t\t\t\t\t\t\t$release_date = date_create($release_date);\r\n\t\t\t\t\t\t\t\t\t$release_date = date_format($release_date, 'Y');\r\n\t\t\t\t\t\t\t\t\techo '<time class=\"release-date faint\">' . $release_date . '</time>';\r\n\t\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\t\telseif($show_artist == true):\t\r\n\t\t\t\t\t\t\t\t\tsr_get_rels_artist($post->ID, false, 'h3');\r\n\t\t\t\t\t\t\tendif; ?>\r\n\t\t\t\t\t</span><!--.title-date-holder -->\r\n\t\t\t\t\t<?php if($aside == true):?>\r\n\t\t\t\t\t\t<p class=\"faint\">\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$excerpt = get_the_content();\r\n\t\t\t\t\t\tif(strlen($excerpt) > 0):\r\n\t\t\t\t\t\t\t$excerpt = sr_truncate($excerpt, 75, ' ');\r\n\t\t\t\t\t\t\techo $excerpt;\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\tglobal $review_mb;\r\n\t\t\t\t\t\t\t$meta = $review_mb->the_meta();\r\n\t\t\t\t\t\t\t$reviews = $meta['reviews'];\r\n\t\t\t\t\t\t\tif($reviews):\r\n\t\t\t\t\t\t\t\t$review_text = sr_truncate($reviews[0]['review-text'], 75, ' ');\r\n\t\t\t\t\t\t\t\techo $review_text;\r\n\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\tendif;\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</div><!--.info-->\r\n\t\t\t\t\t</a>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$buy_now_link = get_post_meta ( $rel_id , '_sr_release-buy-link' , true);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($buy_now_link && $options['buy_now'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$curr_date = date('Y-m-d');\r\n\t\t\t\t\t\t$release_date = get_post_meta( $rel_id , '_sr_release-date', true);\r\n\t\t\t\t\t\tif ($curr_date < $release_date)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\techo '<a href=\"'.$buy_now_link .'\" class=\"buy-link preorder button button-small\">Preorder now</a>';\r\n\t\t\t\t\t\t}else\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\techo '<a href=\"'.$buy_now_link .'\" class=\"buy-link buy-now button button-small\">Buy Now</a>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}?>\r\n\t\t\t<?php echo $article_tag_c; ?>\r\n\t\t<?php endwhile; \r\n\t\techo $wrapper_c;\r\n\t\tendif; wp_reset_query();\r\n}", "title": "" }, { "docid": "42caece7897cd8aca467dcd3a1c2c0e2", "score": "0.549625", "text": "public function show(Artists $artist)\n {\n //\n }", "title": "" }, { "docid": "c7505e0a3c017603939f17d5135fe67a", "score": "0.54932743", "text": "private function getSongs()\n {\n $stmt = $this->db->prepare(\"SELECT * FROM tracks\");\n //TODO add filter by user id WHERE (user_id = :user_id)\");\n //$stmt->bindParam(':user_id', $_SESSION['id']);\n $stmt->execute();\n $isFetchModeSet = $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\n //we store the results in memory, might not be best for large results\n $allRows = $stmt->fetchAll();\n return $allRows;\n }", "title": "" }, { "docid": "928827c6464e6cdc2a09809ffe3d55df", "score": "0.5485443", "text": "function sr_relart_loop_markup(&$artists = array()){\r\n\tglobal $post;\r\n\t$sr_post_class = '';\r\n\tif('artist' == get_post_type()){\r\n\t\t$sr_post_class = get_post_meta(get_the_ID(),'_sr_present-past',TRUE);\r\n\t\tif ($sr_post_class == 'past'){\r\n\t\t\t$meta_blob = '<span class=\"artist-status\">Catalogue</span>'; \r\n\t\t}else{\r\n\t\t\t$artist_status = null;\r\n\t\t\t$meta_blob = null;\r\n\t\t}\r\n\t}else{\r\n\t\t$artist_tax = get_the_terms( $post->ID, 'artist' );\r\n\t\tforeach($artist_tax as $artist){\r\n\t\t\t$artist = array('title' => $artist->name , 'class' => $artist->slug);\r\n\t\t\t$sr_post_class .= $artist['class'] . ' ';\r\n\t\t\tif(!in_array($artist , $artists)){\r\n\t\t\t\tarray_push($artists, $artist);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t$sr_post_class .= ' fourcol fancy-roll';\r\n\t?>\r\n\t\r\n\t<a href=\"<?php the_permalink(); ?>\" <?php post_class($sr_post_class);?> rel=\"bookmark\">\r\n\t\t<?php sr_post_thumbnail('sr-art-fourcol' , false, 'null'); ?>\r\n\t\t<div class=\"info\">\r\n\t\t\t<div class=\"wrap\">\r\n\t\t\t\t<header class=\"entry-header\">\r\n\t\t\t\t\t<h1 class=\"entry-title small-h\"><?php the_title();?></h1>\r\n\t\t\t\t\t<?php if('artist' == get_post_type()){ echo $meta_blob; }else{sr_get_rels_artist($post->ID , false);}?>\r\n\t\t\t\t</header><!-- .entry-header -->\r\n\t\t\t\t<div class=\"entry-summary\">\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$excerpt = get_the_content();\r\n\t\t\t\t\t\tif(strlen($excerpt) > 0):\r\n\t\t\t\t\t\t\t$excerpt = sr_truncate($excerpt, 250, ' ');\r\n\t\t\t\t\t\t\techo '<p>' . $excerpt . '</p>';\r\n\t\t\t\t\t\t\techo '<footer class=\"read-more button button-large\">read more</footer>';\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\tglobal $review_mb;\r\n\t\t\t\t\t\t\t$meta = $review_mb->the_meta();\r\n\t\t\t\t\t\t\t$reviews = $meta['reviews'];\r\n\t\t\t\t\t\t\tif($reviews):\r\n\t\t\t\t\t\t\t\t$review_text = sr_truncate($reviews[0]['review-text'], 250, ' ');\r\n\t\t\t\t\t\t\t\techo '<p>' . $review_text . '</p>';\r\n\t\t\t\t\t\t\t\techo '<footer class=\"read-more button button-large\">read more</footer>';\r\n\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\tendif;\r\n\t\t\t\t\t?>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</a>\r\n<?php }", "title": "" }, { "docid": "94d0723a2a46fd6630545f1c5e562e5a", "score": "0.5482979", "text": "public function getSongs() {\n\treturn $this->songs;\n }", "title": "" }, { "docid": "3f7a2755868a2c14246125edb4a7a79c", "score": "0.5482759", "text": "public function getSimilarArtists($artist,$limit){\n\t\t$query = \"SELECT DISTINCT artist2 FROM correlation WHERE artist1 = '\".$artist.\"' ORDER BY correlation DESC LIMIT \".$limit;\n\t\t\n\t\t$result = mysql_query($query);\n\n\t\t$array = array();\n\t\twhile($row = mysql_fetch_array($result)){\n\t\t\t$array[]= $row;\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "924e4802734340878ba5a71e9f9f5c4a", "score": "0.54716617", "text": "public function createArtistList()\n {\n $key = Config::get('key');\n $endpoint = Config::get('endpoint');\n $faceListUUID = Config::get('faceListUUID');\n\n $request = Http::withoutVerifying()->withHeaders([\n 'Content-Type' => 'application/json',\n 'Ocp-Apim-Subscription-Key' => $key\n ])->put(\"$endpoint/face/v1.0/largefacelists/$faceListUUID\", [\n 'name' => $faceListUUID,\n 'userData' => $faceListUUID,\n 'recognitionModel' => 'recognition_03',\n ]);\n\n try {\n return $request->getBody();\n } catch (HttpException $ex) {\n return $ex;\n }\n }", "title": "" }, { "docid": "50e6a4966ccc127151e1b0c324d88e5f", "score": "0.54670787", "text": "public function testWillRetriveArtistWithMediumDetails()\n {\n $artist = $this->getSpotifyService()->lookupArtist(self::ARTIST_URI, 'album');\n\n // artist assertions\n $this->assertInstanceOf('PequenoSpotifyModule\\Item\\Artist', $artist);\n $this->assertEquals(self::ARTIST_URI, $artist->getUri());\n $this->assertEquals('Basement Jaxx', $artist->getName());\n $this->assertGreaterThanOrEqual(0.0, $artist->getPopularity());\n // albums assertions\n $this->assertNotEmpty($artist->getAlbums());\n $albums = $artist->getAlbums();\n /** @var $album \\PequenoSpotifyModule\\Item\\Album */\n $album = end($albums);\n $this->assertInstanceOf('PequenoSpotifyModule\\Item\\Album', $album);\n $this->assertEquals('spotify:album:7gljDo33wlUkdGGVwkKDMG', $album->getUri());\n $this->assertEquals('Atlantic Jaxx - A Compilation Vol 1', $album->getName());\n $this->assertNotEmpty($album->getTerritories());\n $this->assertEmpty($album->getReleased());\n $this->assertEmpty($album->getArtists());\n $this->assertEmpty($album->getExternalIds());\n $this->assertEmpty($album->getTracks());\n\n // album artist assertions\n $this->assertSame($artist, $album->getArtist());\n $this->assertEquals(self::ARTIST_URI, $album->getArtist()->getUri());\n $this->assertEquals('Basement Jaxx', $album->getArtist()->getName());\n $this->assertSame($artist->getAlbums(), $album->getArtist()->getAlbums());\n $this->assertEmpty($album->getArtist()->getPopularity());\n }", "title": "" }, { "docid": "a9042e6dcfd9732f2263a519d1bdb237", "score": "0.54587054", "text": "public function getArtist()\n {\n if (! isset($this->artist)) {\n $this->artist = (($nodeList = $this->getXPath($this->getDomElement())->query($this->getArtistQuery(), $this->getDomElement())) && $nodeList->length)\n ? new \\MphpMusicBrainz\\Result\\Artist($this->getFactory()->getResultAdapter(\\MphpMusicBrainz\\Service\\MusicBrainz::RESOURCE_ARTIST, $nodeList->item(0)))\n : null;\n }\n return $this->artist;\n }", "title": "" }, { "docid": "e084cb91e44fc0bb02d99e1e51c81f12", "score": "0.5456722", "text": "public function getLessListenedAlbum()\n {\n $allAlbums = $this->getUserAlbums();\n $album = $this->getRandomAlbums($allAlbums, 1);\n $chart = $this->request(self::USER_ALBUMS_CHART_URL.\"?access_token=\".$this->getAccessToken());\n $i = 0;\n $albumToSuggest = null;\n $topFiveAlbumsId = array();\n for($j = 0; $j < 5; $j++) {\n $topFiveAlbumsId[] = $chart['data'][$j]['id'];\n }\n while($albumToSuggest === null && $i < self::TRACKS_MAX_TRIES) {\n $i++;\n if(!in_array($album[0]->getDeezerId(), $topFiveAlbumsId)) {\n $albumToSuggest = $album[0];\n } else {\n $album = $this->getRandomAlbums($allAlbums['data'], 1);\n }\n }\n if(!isset($albumToSuggest)) {\n $albumToSuggest = $album[0];\n }\n\n return $albumToSuggest;\n }", "title": "" }, { "docid": "2912e9c32a07f203b38e034d6c398b0c", "score": "0.5456717", "text": "public function searchArtists($query, $limit);", "title": "" }, { "docid": "642915a31aa58d67198d8dc128e0e421", "score": "0.54566914", "text": "function hnd_artist_flyers() {\n\t$artist_title = get_the_title();\n\tadd_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n \t$artist_events = new WP_Query( array(\n\t\t'post_type' => 'events',\n\t\t'order' => 'DESC',\n\t\t'posts_per_page' => -1,\n\t\t'artist_title' => $artist_title,\n\t) );\n\tremove_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n\n\tif( isset( $artist_events ) && $artist_events->have_posts() ) {\n\t\t\n\t\t$flyer_ids = array();\n\t\t\n\t\t// build array of flyer ids\n\t\twhile( $artist_events->have_posts() ) : $artist_events->the_post();\n\t\t\tif( has_post_thumbnail() ) $flyer_ids[] = get_post_thumbnail_id();\n\t\tendwhile;\n\n\t\t// flyer gallery\n\t\tif( count( $flyer_ids ) ) {\n\t\t\t\n\t\t\t// default gallery\n\t\t\t#$shortcode = '[gallery ids=\"' . implode( ',', $flyer_ids ) . '\"]';\t\t\t\n\t\t\t\n\t\t\t// tiled columns\n\t\t\t#$shortcode = '[gallery type=\"columns\" link=\"file\" ids=\"' . implode( ',', $flyer_ids ) . '\"]';\t\t\t\n\t\t\t\n\t\t\t// tiled mosaic\n\t\t\t$shortcode = '[gallery type=\"rectangular\" link=\"file\" ids=\"' . implode( ',', $flyer_ids ) . '\"]';\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// only apply content filters to flyers\n\t\t\tremove_filter( 'the_content', 'hnd_event_content' );\n\t\t\techo apply_filters( 'the_content', $shortcode );\n\t\t\tadd_filter( 'the_content', 'hnd_event_content' );\n\t\t}\n\n\t} else {\n\t\techo '<h2>No Flyers Available</h2><hr>'; \n\t\techo '<p>Free free to <a href=\"mailto:will@handstandrecords.com\">send us any flyers</a> we don\\'t already have!</p>';\n\t}\n\t\n\twp_reset_query();\t\n}", "title": "" }, { "docid": "05b0cb87686e08b8ed7765b0a5cf9b4a", "score": "0.5448923", "text": "public function getArtistUrl()\n {\n return $this->_artistUrl;\n }", "title": "" }, { "docid": "0d22a12d8f32d1c64627a5f87faaf7e9", "score": "0.544498", "text": "private function getSongs()\n {\n $song = new Song();\n $songs = $song->getWhere('deleted', 0);\n return $songs;\n }", "title": "" }, { "docid": "49728bf4f6e34419684f7bcd86c946c5", "score": "0.54408383", "text": "private function favorite_tweets() {\n $json = $this->load_url('http://api.twitter.com/1/statuses/retweeted_by_me.json?count=10', '', FAVORITES_TWITTER_USER.':'.FAVORITES_TWITTER_PASS);\n \n $json = json_decode($json);\n \n $tweets = array();\n \n foreach ($json as $tweet) {\n $tweets[] = array(\n 'text' => (string) $tweet->retweeted_status->text,\n 'author' => (string) $tweet->retweeted_status->user->screen_name.' ('.$tweet->retweeted_status->user->name.')',\n 'author_url' => (string) 'http://twitter.com/'.$tweet->retweeted_status->user->screen_name,\n 'url' => (string) 'http://twitter.com/'.$tweet->retweeted_status->user->screen_name.'/statuses/'.$tweet->retweeted_status->id,\n 'avatar' => (string) $tweet->retweeted_status->user->profile_image_url,\n 'date' => (string) $tweet->retweeted_status->created_at\n );\n }\n \n return $tweets;\n }", "title": "" }, { "docid": "17b3a325a7e8f77b35f7bbd8f9205757", "score": "0.54170096", "text": "public function albumInfo($artist, $album)\n {\n $data = LastFm::searchAlbumInfo($artist, $album);\n $searchError = LastFm::getErrorMsg($data);\n $obj = ($searchError) ? $searchError : $data->album;\n\n //more by this artist\n $moreByArtist = LastFm::searchArtistAlbum($artist, '', 20)->topalbums->album;\n //\n $x = 1;\n $more = [];\n $arrAlbumNames = [];\n while ( $x <= 5) {\n $rand = array_rand($moreByArtist);\n\n if( isset($moreByArtist[$rand]->name) )\n {\n\n if( $obj->name != $moreByArtist[$rand]->name )\n {\n if(!in_array($moreByArtist[$rand]->name, $arrAlbumNames))\n {\n array_push($more, $moreByArtist[$rand]);\n array_push($arrAlbumNames, $moreByArtist[$rand]->name);\n $x++;\n }\n }\n }\n }\n //\n\n return view('pages.music.albumInfo')\n ->with(\"album\", $obj)\n ->with(\"moreBy\", $more);\n }", "title": "" }, { "docid": "f7350d6f57b9a00f22e374cdb1f070e6", "score": "0.54096454", "text": "public function getArtists($user, $limit = null, $page = null)\n {\n $response = $this->call(array(\n 'method' => 'library.getArtists',\n 'user' => $user,\n 'limit' => $limit,\n 'page' => $page\n ));\n\n $artists = array();\n if (!empty($response->artists->artist)) {\n foreach ($response->artists->artist as $artist) {\n $artists[] = LastfmModel\\Artist::createFromResponse($artist);\n }\n }\n\n return $artists;\n }", "title": "" }, { "docid": "0168338d540ed1bf43a636fba0134e1d", "score": "0.5396238", "text": "function songsLists( $offset = 0 ){\n\n\t\treturn $this->Join('artist', function($join){\n\t\t\t\t\t\t$join->on('artist.id', '=', 'songs.artist');\n\t\t\t\t\t})\n\t\t\t\t\t->groupBy('artist.id')\n\t\t\t\t\t->take(Config::get('cms_config.limit'))\n\t\t\t\t\t->offset($offset)\n\t\t\t\t\t->get([\n\t\t\t\t\t\tDB::raw('artist.id'),\n\t\t\t\t\t\tDB::raw('artist.name'),\n\t\t\t\t\t\tDB::raw('count(songs.id) as number_of_songs')\n\t\t\t\t\t]);\n\t}", "title": "" }, { "docid": "f3d21d126f633e8552fea9d05b39a65d", "score": "0.5395225", "text": "public static function getAllArtists($st_limit=0, $end_limit=10){\n global $db;\n $rs_arr = [];\n $query = \"SELECT *, profile_images.img_sm_path FROM users INNER JOIN profile_images \";\n $query .= \"ON users.id=profile_images.user_id WHERE(role=1) \";\n $query .= \"ORDER BY users.id DESC LIMIT {$st_limit}, {$end_limit}\";\n $rs = $db->query($query);\n if($rs && $db->num_rows($rs) > 0){\n while($row = $db->fetch_array($rs)){\n array_push($rs_arr, array(\n \"id\"=>$row[\"id\"],\n \"profile_image\"=>$row[\"img_sm_path\"],\n \"username\"=>$row[\"username\"],\n \"email\"=>$row[\"email\"],\n \"active_since\"=>$row[\"active_since\"],\n \"musical_style\"=>$row[\"musical_style\"],\n \"isBlocked\"=>$row[\"isBlocked\"],\n \"rank\"=>$row[\"rank\"],\n \"binHexCode\"=>$row[\"binHexCode\"],\n \"date_of_entry\"=>dateToString($row[\"date_of_entry\"])\n ));\n }\n }\n return ($rs_arr == null) ? null : $rs_arr;\n }", "title": "" }, { "docid": "858f660d4dd4485dfd2c17c3a6ad801d", "score": "0.53726083", "text": "public function getArtista()\n {\n return $this->artista;\n }", "title": "" }, { "docid": "49f5179d84aab69fe7bb6552b3278538", "score": "0.53612804", "text": "public function getSimilar($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_ARTISTS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }", "title": "" }, { "docid": "0878736c939ac0794918f58132aca157", "score": "0.53608674", "text": "public function getArtista()\n {\n return $this->artista;\n }", "title": "" }, { "docid": "cc692aacf88a2bccc0cf1a358f524199", "score": "0.53525406", "text": "function getArtistTotal(){\n\n\t\treturn $this->count();\n\n\t}", "title": "" }, { "docid": "2f01f9984366306fa4eca29a536a452b", "score": "0.53493553", "text": "public function topStories(): array\n {\n $key = 'topstories-ids';\n if (Cache::has($key)) {\n $topStories = Cache::get($key);\n } else {\n $url = \"https://hacker-news.firebaseio.com/v0/topstories.json\";\n\n $client = new Client();\n\n try {\n $res = $client->get($url);\n } catch (ClientException $e) {\n dd($e);\n }\n $topStories = json_decode($res->getBody()->getContents());\n Cache::put($key, $topStories, now()->addMinutes($this->topStoriesTtl));\n }\n return $topStories;\n }", "title": "" }, { "docid": "ce15d568162b0a93ca1f9d24ad7c007a", "score": "0.534767", "text": "public function show(Artist $artist)\n {\n return $artist;\n }", "title": "" }, { "docid": "755addf7a842eb01fdfca2e6d4d55755", "score": "0.5344165", "text": "function getSong($level, $echonest, $i = 0)\n{\n if ($i > 100) {\n die('sorry, no song found');\n }\n\n $artist = findArtist($level, $echonest);\n\n $songs = $echonest->getSongApi()->search(array(\n 'artist_id' => $artist['id'],\n 'bucket' => array('id:spotify-WW', 'tracks')\n ));\n\n $songsWithTrx = array();\n\n foreach ($songs as $song) {\n\n if (count($song['tracks']) > 0) {\n foreach ($song['tracks'] as $i => $track) {\n $song['tracks'][$i]['foreign_id'] = preg_replace('~^spotify\\-WW~', 'spotify', $song['tracks'][$i]['foreign_id']);\n }\n\n $songsWithTrx[] = $song;\n }\n }\n\n $songs = $songsWithTrx;\n\n if (count($songs) == 0) {\n return getSong($level, $echonest, ++$i);\n }\n\n $rand = rand(0, count($songs) - 1);\n $song = $songs[$rand];\n $rand = rand(0, count($song['tracks']) - 1);\n\n return array(\n 'artist' => $artist,\n 'song' => $song['tracks'][$rand]\n );\n}", "title": "" }, { "docid": "84be80ee4da5481d486e683553cab904", "score": "0.5338183", "text": "function getPlayHistory($for=false) {\n\t $for = jz_db_escape($for);\n\t $q = \"SELECT n.*,p.user FROM jz_playcounts p,jz_nodes n WHERE p.media_id=n.my_id\";\n\t if ($for){\n\t $q .= \" AND p.user='$for'\";\n\t }\n\t $q .= \" AND n.ptype='track' GROUP BY p.media_id ORDER BY max(date) desc LIMIT 25\";\n\t $res = jz_db_object_query($q);\n\n\t // TODO: include user info in result\n\t return $res;\n\t}", "title": "" }, { "docid": "112265e6a2f88b59b79405fc92b1a549", "score": "0.53277314", "text": "public function favoritesAction()\n {\n $favorite = $this->getService('Model\\Favorite');\n $userId = $this->getService('Auth')->getIdentity()->id;\n return array('titles' => $favorite->all($userId));\n }", "title": "" }, { "docid": "6429fdbf32c70a2322afc4ad7def7e64", "score": "0.5321101", "text": "public function getItemArtistAttribute()\n {\n if(!$this->artist_url && !$this->artist_id) return null;\n\n // Check to see if the artist exists on site\n $artist = checkAlias($this->artist_url, false);\n if(is_object($artist)) {\n $this->artist_id = $artist->id;\n $this->artist_url = null;\n $this->save();\n }\n\n if($this->artist_id)\n {\n return $this->artist->displayName;\n }\n else if ($this->artist_url)\n {\n return prettyProfileLink($this->artist_url);\n }\n }", "title": "" }, { "docid": "fae453de80d04dad38f2aab8a1b0c87d", "score": "0.5320939", "text": "public function get_fluids()\n {\n return $this->fluids;\n }", "title": "" }, { "docid": "ea44f89726de638ee0ccdb40d7d7411a", "score": "0.5315851", "text": "function scrap_url($artist, $song_name) {\n if(strpos($song_name,\"(\") > 0 ){\n $song_name = substr($song_name,0,strpos($song_name,\"(\")-1);\n }\n\n if(strpos($artist,\"feat\") > 0 ){\n $artist = substr($artist,0,strpos($artist,\"feat\"));\n }\n\n $artist = filer_var($artist);\n $song_name = filer_var($song_name);\n $artist = ucwords(str_replace(\" \",\"-\",$artist));\n $song_name = ucwords(str_replace(\" \",\"-\",$song_name));\n $url = sprintf('https://genius.com/%s-%s-lyrics',$artist,$song_name);\n $url = str_replace(\"--\",\"-\",$url);\n $lyrics = \"\";\n\n do{\n $lyrics = file_get_html($url)->plaintext;\n $start_index = strpos($lyrics,\"Verse\");\n $end_index =strpos($lyrics,\"Contributors\");\n $lyrics = substr($lyrics,$start_index,$end_index - $start_index);\n }while(strpos($lyrics,\"More on Genius\")>1);\n\n return $lyrics;\n }", "title": "" }, { "docid": "7188b2032238220fe028c5ffb62f4e78", "score": "0.5291484", "text": "public function favorators();", "title": "" }, { "docid": "a5c0819d36b47516e77df224b3807041", "score": "0.5291047", "text": "function songsAlbumLists( $offset = 0, $artistId = 0 ){\n\n\t\treturn $this->Join('albums', function($join){\n\t\t\t\t\t\t$join->on('albums.id', '=', 'songs.album');\n\t\t\t\t\t})\n\t\t\t\t\t->where('songs.artist', $artistId)\n\t\t\t\t\t->groupBy('albums.id')\n\t\t\t\t\t->take(Config::get('cms_config.limit'))\n\t\t\t\t\t->offset($offset)\n\t\t\t\t\t->get([\n\t\t\t\t\t\tDB::raw('albums.id'),\n\t\t\t\t\t\tDB::raw('albums.title'),\n\t\t\t\t\t\tDB::raw('albums.artworkPath'),\n\t\t\t\t\t\tDB::raw('count(songs.id) as number_of_songs')\n\t\t\t\t\t]);\n\t}", "title": "" }, { "docid": "1aae5508a69df256a8fa5d6998c93e77", "score": "0.5282606", "text": "function SERVICE_GETALBUMMETADATA_yahoo($node, $displayOutput = true, $return = false) {\n\t\tglobal $include_path;\n\t\t\n\t\t// Ok, now we need to see if we are reading a album or an artist\n\t \t$album = $node->getName(); \n\t\t$parent = $node->getParent();\n\t\t$artist = $parent->getName();\n\t\t\t\t\n\t\tinclude_once($include_path. \"lib/snoopy.class.php\");\n\t\t\n\t\t// First let's get the artist page\n\t\t$snoopy = new Snoopy;\n\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t$contents = $snoopy->results;\n\t\tunset($snoopy);\n\t\t\n\t\t// Did we get anything?\n\t\tif (stristr($contents,\"no matches found\")){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Now let's fix up the name\n\t\t$albumName = str_replace(\"&\",\"&amp;\",$album);\n\t\t$artist = str_replace(\"&\",\"&amp;\",$artist);\n\t\t\n\t\t// Ok, now let's see if we got a direct hit or a link\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\t// Ok, we missed let's try to mangle the name and try again?\n\t\t\t$album = trim(substr($album,0,strpos($album,\" -\")));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t}\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\t// Ok, we missed let's try to mangle the name and try again?\n\t\t\t$album = trim(substr($album,0,strpos($album,\"[\")));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t}\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\t// Ok, we missed let's try to mangle the name and try again?\n\t\t\t$album = trim(substr($album,0,strpos($album,\"(\")));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t}\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\treturn false;\n\t\t}\n\n\t\t// Now let's move up to the artist and back\n\t\t$link = substr($contents,strpos($contents,$artist)-300);\n\t\t$link = substr($link,strpos($link,\"<a href=http://music.yahoo.com/release\")+8);\n\t\t$link = substr($link,0,strpos($link,' '));\n\t\tif (stristr($link,\">\")){\n\t\t\t$link = substr($link,0,strpos($link,'>'));\n\t\t}\n\t\t\n\t\t// Now let's get that page\n\t\t$contents = @file_get_contents($link);\n\t\t\n\t\t// Now let's get the image\n\t\t$contents = substr($contents,strpos($contents,'onClick=\"ext_link'));\n\t\t$contents = substr($contents,strpos($contents,'Album Release Date')-400);\n\t\t$image = substr($contents,strpos($contents,'<img src=\"http://')+10);\n\t\t$image = substr($image,0,strpos($image,'\"'));\n\t\t\n\t\tif (!stristr($image,\".jpg\") or !stristr($image,\"http://\")){\n\t\t\t$image = \"\";\n\t\t}\n\t\t\n\t\t// Now let's get the release year\n\t\t$year = substr($contents,strpos($contents,'Album Release Date:&nbsp;')+strlen('Album Release Date:&nbsp;'));\n\t\t$year = substr($year,0,strpos($year,'</td>'));\n\t\t\n\t\tif (!$return){\n\t\t\twriteAlbumMetaData($node, $year, $image, false, false, false, false, false, $displayOutput);\n\t\t} else {\n\t\t\tif ($return == \"array\"){\n\t\t\t\t$retArr['year'] = $year;\n\t\t\t\t$retArr['image'] = $image;\n\t\t\t\t$retArr['review'] = false;\n\t\t\t\t$retArr['rating'] = false;\n\t\t\t\t\n\t\t\t\treturn $retArr;\n\t\t\t} else {\n\t\t\t\treturn $$return;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c9d84edadd21842b82d6abb05e2a6c3d", "score": "0.52769315", "text": "function fetch_flickr() {\n\t$theme_options = get_option(THEME_OPTIONS_NAME);\n\tif ( (in_array('flickr', $theme_options['enabled_services'])) && ($theme_options['hashtags']) ) {\n\t\t$max \t= is_numeric($theme_options['flickr_max_results']) ? $theme_options['hashtags'] : 20; // fallback check for valid max #\n\t\t\n\t\tadd_filter( 'wp_feed_cache_transient_lifetime' , 'cache_reset' );\t\t\n\t\t$feed \t= fetch_feed('http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tagmode=ANY&'.build_hashtag_query('tags'));\n\t\tremove_filter( 'wp_feed_cache_transient_lifetime' , 'cache_reset' );\n\t\t\n\t\tif (!is_wp_error($feed)) { \n\t\t\t// Figure out how many total items there are, but limit it to the max number set. \n\t\t\t$total = $feed->get_item_quantity($max); \n\t\t\t// Build an array of all the items, starting with element 0 (first element).\n\t\t\t$items = $feed->get_items(0, $total);\n\t\t\t\n\t\t\treturn $items;\n\t\t}\n\t\telse { return 'Error in generating Flickr feed object'; }\n\t}\n}", "title": "" } ]
d2e6a55072549a661ff599e7b5112d32
Get the fields available on the action.
[ { "docid": "e53d261b0050462f8a70085c68e4eca0", "score": "0.0", "text": "public function fields()\n {\n $data = \\App\\Collection::query()\n ->orderBy('count', 'DESC')\n ->pluck('name', 'id')\n ->toArray();\n return [\n SelectAutoComplete::make(_(\"加入合集\"), 'collection')->options(\n $data\n ),\n ];\n }", "title": "" } ]
[ { "docid": "fbcb81ed29ba972b1535b534c6090f35", "score": "0.76794356", "text": "final private function action_fields() {\n\t\techo json_encode( array(\n\t\t\t'fields' => $this->_fields,\n\t\t\t'required' => $this->_required,\n\t\t));\n\t}", "title": "" }, { "docid": "d0033b2bfffa85cdb4f9369e134ec5d7", "score": "0.7256724", "text": "public function getFields(): array\n {\n return $this->getParam('fields');\n }", "title": "" }, { "docid": "162710dabcee8c0c68faacf64608cc50", "score": "0.7212939", "text": "protected function _getActionFields(Request $request, $action = null)\n {\n $controller = $request->controller;\n\n if (is_null($action)) {\n $action = $request->action;\n }\n\n $mc = new ModuleConfig(ConfigType::VIEW(), $controller, $action);\n $result = $mc->parse()->items;\n\n return $result;\n }", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.7102856", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.7102856", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.7102856", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.7102856", "text": "public function getFields() {}", "title": "" }, { "docid": "c05d1a717598ad7bb2e27bf5fbb76d98", "score": "0.70388126", "text": "protected function _get_fields() {\n\t\treturn $this->getData( 'fields' );\n\t}", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7022615", "text": "public function getFields();", "title": "" }, { "docid": "c79b9464822fba1a9a904c6d8e4bf403", "score": "0.70016515", "text": "private function getFields()\n {\n return $this->option('fields');\n }", "title": "" }, { "docid": "67bfb1c997ac416471a49903c50f902f", "score": "0.6955787", "text": "public function fields()\n {\n return $this->query->get('fields', ['*']);\n }", "title": "" }, { "docid": "4e8545111781f7de6a144630f7577cf0", "score": "0.6936022", "text": "public function getFieldsForExport();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.6877529", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.6877529", "text": "public function fields();", "title": "" }, { "docid": "b7fbfe144ca9c1d034bb7ebf8120f86a", "score": "0.6829355", "text": "public abstract function getFields();", "title": "" }, { "docid": "a0076042e8dcc2743ee302a5b3374e9e", "score": "0.6827416", "text": "public function get_fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "04007fa8b56716a52dbf21969d240765", "score": "0.6823905", "text": "public function get_fields(){\n\t\t\treturn $this->attributes();\n\t}", "title": "" }, { "docid": "35517251216a0ee294b86af15172fcfd", "score": "0.68228036", "text": "protected function fields()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.68186903", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.68186903", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.68186903", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.68186903", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.68186903", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "e76c9ad7019caa5ed90b22909a54cf2b", "score": "0.68186903", "text": "public function fields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "cb675d454d605a8f2247d33929183dc2", "score": "0.6801977", "text": "public function fields()\n\t{\n\t\treturn $this->fields;\n\t\t\n\t}", "title": "" }, { "docid": "c4678a435e0c24b18b90d6f33d36bea3", "score": "0.67854786", "text": "public function get_fields() {\n return $this->fields;\n }", "title": "" }, { "docid": "dea4c38826dbcd9bf33e72d715d16fbe", "score": "0.67746043", "text": "private final function getFields() {\n\t\t\treturn $this->fields;\n\t\t}", "title": "" }, { "docid": "9957355417a37e9320a3b5fa06125d71", "score": "0.67366904", "text": "public function fields()\n\t{\n\t\treturn $this->_fields;\n\t}", "title": "" }, { "docid": "9957355417a37e9320a3b5fa06125d71", "score": "0.67366904", "text": "public function fields()\n\t{\n\t\treturn $this->_fields;\n\t}", "title": "" }, { "docid": "031ae34088f6eca8258f16501aeb3872", "score": "0.67213905", "text": "public function getFieldsForFilter();", "title": "" }, { "docid": "770bebc7101f0f4befaaeb686ac5b048", "score": "0.67099893", "text": "function getFields () {\n\t\treturn array_merge ($this->_baseFields, $this->_optionalFields);\n\t}", "title": "" }, { "docid": "8d82d2549ea0782bda574ed5da5e8232", "score": "0.6700873", "text": "public function __get_fields()\n {\n return $this->fillable ? $this->fillable : [];\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "fa5cf309e844eb59a69802e9697d7e64", "score": "0.66945714", "text": "public function getFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "5926e635db4d11dc3118d4079bb27b54", "score": "0.6675174", "text": "public function getFields() \n {\n return $this->fields;\n }", "title": "" }, { "docid": "e0426a55d01a693558a46ec84ec0518a", "score": "0.6665702", "text": "public function getFields() {\n return $this->fields;\n }", "title": "" }, { "docid": "a0570da3d2ce5f95a8b0f718c045216e", "score": "0.6663916", "text": "public function getFields() {\n return $this->fields;\n }", "title": "" }, { "docid": "a0570da3d2ce5f95a8b0f718c045216e", "score": "0.6663916", "text": "public function getFields() {\n return $this->fields;\n }", "title": "" }, { "docid": "a0570da3d2ce5f95a8b0f718c045216e", "score": "0.6663916", "text": "public function getFields() {\n return $this->fields;\n }", "title": "" }, { "docid": "728d146684d83a06a517acdf45d45c2d", "score": "0.6662549", "text": "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "728d146684d83a06a517acdf45d45c2d", "score": "0.6662549", "text": "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "728d146684d83a06a517acdf45d45c2d", "score": "0.6662549", "text": "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "d15667d1030c43621f3350b78d0a58fb", "score": "0.66619664", "text": "public function getFields() { \n return $this->fields; \n }", "title": "" }, { "docid": "9a9036785bb3d85bf4de91bc5c3f34dc", "score": "0.66615903", "text": "public function getFields(){\n\t\treturn $this->_fields;\n\t}", "title": "" }, { "docid": "a91b7ad453761ac2b67d0db05ada0b8c", "score": "0.66383606", "text": "public function getFields() {\n\t\treturn $this->fields;\n\t}", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.6635201", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.6635201", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.6635201", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "711a94e5915dec1e5e708c38a142076c", "score": "0.6635201", "text": "public function getFields()\n {\n return $this->_fields;\n }", "title": "" }, { "docid": "d535168086f097d16f2741a38c0e7f7d", "score": "0.6634387", "text": "public function fields() {\n return array();\n }", "title": "" }, { "docid": "5f723f232abb6636c6a367fdd4cb648b", "score": "0.66184384", "text": "public function getFields() {\n return $this->_fields;\n }", "title": "" }, { "docid": "39f885f17c5752de50bc486edbad1325", "score": "0.66090715", "text": "public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}", "title": "" }, { "docid": "5eaeee1eeec435551c77103965302005", "score": "0.66085863", "text": "protected function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6597802", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6597802", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6597802", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.6597802", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "a365a525cb46187b44c68bc0d9f9fa09", "score": "0.65966916", "text": "public function GetFields()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.65893567", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.65893567", "text": "abstract public function getFields();", "title": "" }, { "docid": "ed05faaf734687310751214da07a7dec", "score": "0.65858537", "text": "public function fields()\n {\n return [\n ];\n }", "title": "" }, { "docid": "769d5d5b2de1dd955d971e0bfad1779b", "score": "0.6578913", "text": "protected function getFields()\n {\n //not used. please see query for more details.\n return array(\n 'validationid AS id',\n 'id',\n 'type',\n 'view_type',\n 'fix_user_id',\n 'osm_id',\n 'osm_type',\n 'title',\n 'fixmessage',\n 'falsepositive',\n 'question',\n 'bug_question',\n 'latitude',\n 'longitude',\n 'upratings',\n 'downratings',\n 'required_votes',\n 'geom',\n 'txt1',\n 'txt2',\n 'txt3',\n 'txt4',\n 'txt5'\n );\n }", "title": "" }, { "docid": "e5645904a27804b4bfa8da648f30e9bd", "score": "0.6569733", "text": "protected function fields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "5a9bf1e8781251b27dae507687cfbdc7", "score": "0.6567309", "text": "public function getFields(): array {\n return $this->fields;\n }", "title": "" }, { "docid": "62cc78c6a53109f8aaebd178e26e23e5", "score": "0.6560122", "text": "public function getAllFields();", "title": "" }, { "docid": "ddff45333f245b18bc55dd497175ca9f", "score": "0.65487885", "text": "public function fields(){\n if($this->_fields){\n return $this->_fields;\n }\n\n //$fields = parent::fields();\n\n\n //var_dump(array_keys($fields));\n\n $fields = [\n 'id',\n 'tempId',\n 'title',\n 'postDate',\n 'expiryDate',\n 'dateCreated',\n 'dateUpdated',\n 'enabled',\n 'sectionId',\n 'typeId',\n 'authorId',\n 'newParentId',\n 'revisionCreatorId',\n 'revisionNotes'\n ];\n\n\n if($this->_removeFields){\n // remove fields that contain sensitive information\n foreach($this->_removeFields AS $key) {\n unset($fields[$key]);\n }\n }\n\n /* Return Standard Fields Removing Unset Fields */\n return $fields;\n }", "title": "" }, { "docid": "e9c8f16724e072e3d6760c0d3e89d9d3", "score": "0.65424234", "text": "public static function listFields(){\n\t\treturn [ \n\t\t\t\"permission_id\",\n\t\t\t\"model_type\",\n\t\t\t\"model_id\" \n\t\t];\n\t}", "title": "" }, { "docid": "4f55d5346433d32d752833663df6db99", "score": "0.6522194", "text": "public function getFields(): array\n {\n $request = [\n 'id' => $this->id,\n 'student_id' => $this->student_id,\n 'exam_duration' => $this->exam_duration,\n 'course_number' => $this->course_number,\n 'exam_date' => $this->exam_date,\n 'delay' => $this->delay,\n 'paid' => $this->paid,\n 'minStarRating' => $this->min_star_rating,\n 'maxStarRating' => $this->max_star_rating,\n 'dismissed_at' => $this->dismissed_at,\n 'created_at' => $this->created_at,\n ];\n\n if (get_class($this->discipline) !== Reference::class) {\n $request['discipline'] = $this->discipline->getFields();\n }\n if (get_class($this->subject) !== Reference::class) {\n $request['subject'] = $this->subject->getFields();\n }\n if (get_class($this->level) !== Reference::class) {\n $request['level'] = $this->level->getFields();\n }\n if (get_class($this->student) !== Reference::class) {\n $request['student'] = $this->student->getFields();\n }\n if (get_class($this->school) !== Reference::class) {\n $request['school'] = $this->school->getFields();\n }\n\n return $request;\n }", "title": "" }, { "docid": "50bfe33fdf0035632a1b33674ed7f48b", "score": "0.6504257", "text": "public function getFields()\n {\n $fields = $this->fields;\n\n return $fields;\n }", "title": "" }, { "docid": "38ac10c3c1c7994252b6bb11e79df08e", "score": "0.6498773", "text": "public function getActionParameters() : array\n {\n return $this->actionParameters;\n }", "title": "" }, { "docid": "c30a8ae081b5592e5887e6400d913f2e", "score": "0.6484356", "text": "public function fields()\n {\n return $this->fields ? $this->fields->all() : [];\n }", "title": "" }, { "docid": "ed110ff55019d88e0d35e2e1d782b300", "score": "0.64816916", "text": "public function fields()\n\t{\n\t\t$fields = array_diff_key(\n\t\t\tparent::fields(), \n\t\t\tarray_flip([\n\t\t\t\t'created_at',\n\t\t\t\t'created_by',\n\t\t\t\t'updated_at',\n\t\t\t\t'updated_by',\n\t\t\t])\n\t\t);\n\t\t\t\t\t\t\t\t\t\t\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "9bd3255dc13049670e6d614314164f9b", "score": "0.6472619", "text": "public static function viewFields(){\n\t\treturn [ \n\t\t\t\"permission_id\",\n\t\t\t\"model_type\",\n\t\t\t\"model_id\" \n\t\t];\n\t}", "title": "" }, { "docid": "83c74553baef8705ae5814840dcf7b95", "score": "0.6470866", "text": "private function get_reservation_action_fields() {\n\t\treturn [\n\t\t\t'target' => [\n\t\t\t\t'_default' => null,\n\t\t\t\t'_edit' => true,\n\t\t\t\t'_ret' => '',\n\t\t\t\t'_req' => false,\n\t\t\t\t'_type' => 'multi',\n\t\t\t\t'_desc' => [\n\t\t\t\t\t\\__( 'Target specifications', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t\\__( 'Specify where the user can complete a reservation.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t],\n\t\t\t\t'_data' => [\n\t\t\t\t\t'is-showif-listener' => '1',\n\t\t\t\t\t'showif' => [\n\t\t\t\t\t\t'department.acceptsReservations.type' => 'accept',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'_fields' => $this->get_reservation_target_fields(),\n\t\t\t],\n\t\t];\n\t}", "title": "" }, { "docid": "4f6ae1c4cac259bd9ea724047f59c9b0", "score": "0.6470728", "text": "public function getFields (): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "59b39a640674c21feb2ef6404647a9e4", "score": "0.64683706", "text": "static function getFields() {\n\t\t// Expect Override\n\t\treturn array();\n\t}", "title": "" }, { "docid": "59b39a640674c21feb2ef6404647a9e4", "score": "0.64683706", "text": "static function getFields() {\n\t\t// Expect Override\n\t\treturn array();\n\t}", "title": "" }, { "docid": "0805a90c2b19700625c2b0ed533e34dd", "score": "0.6464409", "text": "public static function fields();", "title": "" }, { "docid": "a1c33356ee56992038a89d5b0f788795", "score": "0.6461294", "text": "function acfe_form_get_actions(){\n \n return get_query_var('acfe_form_actions', array());\n \n}", "title": "" }, { "docid": "9c9704f407e9756f14f3db3797cd175e", "score": "0.6433368", "text": "public function fields()\n {\n }", "title": "" }, { "docid": "845b6f1fd412b65c9eaf4a4dc195a40c", "score": "0.6428576", "text": "abstract public function available_fields();", "title": "" }, { "docid": "6da2cfcf825b689fc1a5b96d758bc90d", "score": "0.6427386", "text": "public function getFields() {\r\n\t\treturn array('fromaddress', 'toaddress', 'subjectop', 'subject', 'bodyop', 'body', 'matchusing');\r\n\t}", "title": "" }, { "docid": "fbb5d9b77c69d6dd58400d5210deff7f", "score": "0.6373995", "text": "public function get_fields() {\n $this->maybe_reload_fields();\n\n return $this->fields;\n }", "title": "" }, { "docid": "5152dd464ac5d01d618b5f0d1198e514", "score": "0.63738143", "text": "private function get_fields() {\r\n /** \r\n * Use the charitable_settings_tab_fields to include the fields for new tabs. \r\n * DO NOT use it to add individual fields. That should be done with the\r\n * filters within each of the methods. \r\n */\r\n return apply_filters( 'charitable_settings_tab_fields', array(\r\n 'general' => $this->get_general_fields(),\r\n 'forms' => $this->get_form_fields(),\r\n 'gateways' => $this->get_gateway_fields() \r\n ) );\r\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.63716227", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.63716227", "text": "public function fields()\n {\n return [];\n }", "title": "" } ]
3db22ff6ebfcb14b7c19b8e39f7b2bd3
Function for generating vouchers.
[ { "docid": "1dc1ad0ec001109058d7d380b00df31f", "score": "0.4653837", "text": "public function generateVoucher($minutes = 60, $count = 1, $numberOfUsage = 4, $note = null, $upSpeed = null, $downSpeed = null, $totalMB = null)\n {\n return self::$uniFiClient->create_voucher($minutes, $count, $numberOfUsage, $note, $upSpeed, $downSpeed, $totalMB);\n }", "title": "" } ]
[ { "docid": "c4c9f4e5070adf19f9913662f8bf5672", "score": "0.6959568", "text": "public function action_generate()\n {\n\n $id_offer = Input::post(\"id_offer_gen\");\n $expiration_date = Input::post(\"date_expiration\");\n\n $recipients = \\Model_Recipient::find('all');\n\n // Loop between recipients to create the vouchers\n foreach ($recipients as $r) {\n\n // Create a new voucher record\n $voucher = new \\Model_Voucher();\n $voucher->id_recipient = $r->id_recipient;\n $voucher->id_offer = $id_offer;\n $voucher->date_expiration = $expiration_date;\n $voucher->date_usage = NULL;\n $voucher->code = $this->generateVoucherCode(); // generate random code\n\n $voucher->save();\n\n }\n\n Session::set_flash(\"success\", \"All vouchers have been generated sucessfully.\");\n Response::redirect_back();\n\n }", "title": "" }, { "docid": "375bdd073345bfc6809a0e83809d267a", "score": "0.63281393", "text": "public function getVouchersList()\n {\n $vouchers = self::$uniFiClient->stat_voucher();\n $date = new \\DateTime();\n\n foreach ($vouchers as $voucher) {\n $interval = new \\DateInterval('PT' . $voucher->duration . 'M');\n $created = new \\DateTime();\n $created->setTimestamp($voucher->create_time);\n\n if ($created->add($interval) < $date) {\n $voucher->invalid = true;\n } else {\n $voucher->invalid = false;\n }\n }\n\n return $vouchers;\n }", "title": "" }, { "docid": "c6741e633250f943fd1db4bd11f22dfd", "score": "0.5916995", "text": "private function setUpForAvailableVouchersTests()\n {\n\n $vouchers = [];\n $vouchers[0] = factory(Voucher::class)->create([\n 'public_name' => 'no limits applied',\n ]);\n $vouchers[1] = factory(Voucher::class)->create([\n 'public_name' => 'no limits applied, not published',\n ]);\n $vouchers[2] = factory(Voucher::class)->create([\n 'public_name' => 'expired, no limits applied',\n ]);\n $vouchers[3] = factory(Voucher::class)->create([\n 'public_name' => 'limit_per_account set to 1',\n ]);\n $vouchers[4] = factory(Voucher::class)->create([\n 'public_name' => 'limit_pet_required set to 1',\n ]);\n $vouchers[5] = factory(Voucher::class)->create([\n 'public_name' => 'limit_species_id set to 1',\n ]);\n $vouchers[6] = factory(Voucher::class)->create([\n 'public_name' => 'limit_per_pet set to 2',\n ]);\n\n $consumers = [];\n $consumers[0] = factory(Consumer::class)->create([\n 'first_name' => 'No Pets',\n 'last_name' => \"One coupon for {$vouchers[3]->id}\",\n ]);\n $consumers[1] = factory(Consumer::class)->create([\n 'first_name' => 'No Pets',\n 'last_name' => 'No Coupons',\n ]);\n $consumers[2] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 1',\n 'last_name' => \"One coupon, for {$vouchers[3]->id}\",\n ]);\n $consumers[3] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 2',\n 'last_name' => \"One coupon, for {$vouchers[3]->id}\",\n ]);\n $consumers[4] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 1',\n 'last_name' => 'No Coupons',\n ]);\n $consumers[5] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 2',\n 'last_name' => 'No Coupons',\n ]);\n\n// $consumers = factory(Consumer::class, 6)->create();\n\n $vouchers[0]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[0]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[0]->limit_per_account = 0;\n $vouchers[0]->limit_per_account_per_date_period = '0';\n $vouchers[0]->limit_pet_required = 0;\n $vouchers[0]->limit_per_pet = 0;\n $vouchers[0]->limit_species_id = null;\n $vouchers[0]->published = 1;\n $vouchers[0]->save();\n\n $vouchers[1]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[1]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[1]->limit_per_account = 0;\n $vouchers[1]->limit_per_account_per_date_period = '0';\n $vouchers[1]->limit_pet_required = 0;\n $vouchers[1]->limit_per_pet = 0;\n $vouchers[1]->limit_species_id = null;\n $vouchers[1]->published = 0;\n $vouchers[1]->save();\n\n $vouchers[2]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[2]->subscribe_to_date = Carbon::now()->subDays(5);\n $vouchers[2]->limit_per_account = 0;\n $vouchers[2]->limit_per_account_per_date_period = '0';\n $vouchers[2]->limit_pet_required = 0;\n $vouchers[2]->limit_per_pet = 0;\n $vouchers[2]->limit_species_id = null;\n $vouchers[2]->published = 1;\n $vouchers[2]->save();\n\n $vouchers[3]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[3]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[3]->limit_per_account = 1;\n $vouchers[3]->limit_per_account_per_date_period = '0';\n $vouchers[3]->limit_pet_required = 0;\n $vouchers[3]->limit_per_pet = 0;\n $vouchers[3]->limit_species_id = null;\n $vouchers[3]->published = 1;\n $vouchers[3]->save();\n\n $vouchers[4]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[4]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[4]->limit_per_account = 0;\n $vouchers[4]->limit_per_account_per_date_period = '0';\n $vouchers[4]->limit_pet_required = 1;\n $vouchers[4]->limit_per_pet = 0;\n $vouchers[4]->limit_species_id = null;\n $vouchers[4]->published = 1;\n $vouchers[4]->save();\n\n $vouchers[5]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[5]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[5]->limit_per_account = 0;\n $vouchers[5]->limit_per_account_per_date_period = '0';\n $vouchers[5]->limit_pet_required = 1;\n $vouchers[5]->limit_per_pet = 0;\n $vouchers[5]->limit_species_id = 1;\n $vouchers[5]->published = 1;\n $vouchers[5]->save();\n\n $vouchers[6]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[6]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[6]->limit_per_account = 0;\n $vouchers[6]->limit_per_account_per_date_period = '0';\n $vouchers[6]->limit_pet_required = 1;\n $vouchers[6]->limit_per_pet = 2;\n $vouchers[6]->limit_species_id = null;\n $vouchers[6]->published = 1;\n $vouchers[6]->save();\n\n $coupons = [];\n $coupons[0] = new Coupon(\n [\n 'voucher_id' => $vouchers[3]->id,\n 'restrict_consumer_id' => $consumers[0]->id,\n 'issued_at' => now(),\n 'valid_from' => now(),\n 'valid_to' => now(),\n ]\n );\n $coupons[0]->save();\n\n $coupons[1] = new Coupon(\n [\n 'voucher_id' => $vouchers[3]->id,\n 'restrict_consumer_id' => $consumers[2]->id,\n 'issued_at' => now(),\n 'valid_from' => now(),\n 'valid_to' => now(),\n ]\n );\n $coupons[1]->save();\n\n $coupons[2] = new Coupon(\n [\n 'voucher_id' => $vouchers[3]->id,\n 'restrict_consumer_id' => $consumers[3]->id,\n 'issued_at' => now(),\n 'valid_from' => now(),\n 'valid_to' => now(),\n ]\n );\n $coupons[2]->save();\n\n $pets = [];\n $pets[0] = new Pet(\n [\n 'consumer_id' => $consumers[2]->id,\n 'pet_name' => 'Pet 0',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 1)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[0]->save();\n\n $pets[1] = new Pet(\n [\n 'consumer_id' => $consumers[3]->id,\n 'pet_name' => 'Pet 1',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 2)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[1]->save();\n\n $pets[2] = new Pet(\n [\n 'consumer_id' => $consumers[4]->id,\n 'pet_name' => 'Pet 2',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 1)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[2]->save();\n\n $pets[3] = new Pet(\n [\n 'consumer_id' => $consumers[5]->id,\n 'pet_name' => 'Pet 3',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 2)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[3]->save();\n\n return [\n 'pets' => $pets,\n 'coupons' => $coupons,\n 'vouchers' => $vouchers,\n 'consumers' => $consumers,\n ];\n }", "title": "" }, { "docid": "091bf4b542599fce076107fff5ece739", "score": "0.5757781", "text": "public function vouchers()\n {\n return $this->hasMany(Voucher::class);\n }", "title": "" }, { "docid": "091bf4b542599fce076107fff5ece739", "score": "0.5757781", "text": "public function vouchers()\n {\n return $this->hasMany(Voucher::class);\n }", "title": "" }, { "docid": "b312f22bc0fb3b7c23e113aee8fb6ff9", "score": "0.57561255", "text": "public function generateVoucher(Request $request)\n {\n DB::beginTransaction();\n try {\n $date_time = date('Y-m-d H:i:s');\n if (!empty($request->offer)) {\n if (!empty($request->offer['id'])) {\n $offer_id = $request->offer['id'];\n } else {\n $offer = Offer::create([\n 'name' => $request->offer['name'],\n 'discount' => $request->offer['discount'],\n ]);\n $offer_id = $offer->id;\n }\n }\n\n if (!empty($request->customer)) {\n if (!empty($request->customer['id'])) {\n $customer_id = $request->customer['id'];\n } else {\n $customer = Customer::whereEmail($request->customer['email'])->first();\n if (!empty($customer)) {\n return response()->json(['status' => 400, 'message' => 'Customer email already exist']);\n } else {\n $customer = Customer::create([\n 'name' => $request->customer['name'],\n 'email' => $request->customer['email'],\n ]);\n }\n $customer_id = $customer->id;\n }\n }\n $voucher_data = [\n 'expire_date' => date('Y-m-d', strtotime('+3 days', strtotime(date('Y-m-d')))),\n 'is_active' => 'true',\n 'offer_id' => $offer_id,\n 'customer_id' => $customer_id,\n 'code' => mb_substr(rand(100000000, strtotime(date('Y-m-d H:i:s'))), 0, 8)\n ];\n $voucher = Voucher::create($voucher_data);\n DB::commit();\n return response()->json(['data' => $voucher], 200);\n } catch (\\Exception $e) {\n DB::rollBack();\n return response()->json(['status' => false, 'message' => $e->getMessage()]);\n }\n }", "title": "" }, { "docid": "e951b7eae13747edd5d577a234f5ace4", "score": "0.57287276", "text": "public function createVouchers(int $amount, ?Closure $callback = null)\n {\n $vouchers = new Vouchers();\n\n if ($callback) {\n $callback($vouchers);\n }\n\n return $vouchers->withOwner($this)->create($amount);\n }", "title": "" }, { "docid": "1f8229da956f4c300dff281142f62d8e", "score": "0.5600894", "text": "public function testGetAvailableVouchersNoPetsWithCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[0]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }", "title": "" }, { "docid": "7cd155953b82557d2ba3e3423e2b9985", "score": "0.5579743", "text": "public function generateGiftVouchers($length = 20) {\n $allowedCharacters = '23456789abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($allowedCharacters);\n $giftVoucherCode = '';\n for ($i = 0; $i < $length; $i++) {\n $giftVoucherCode .= $allowedCharacters[mt_rand(0, $charactersLength - 1)];\n\n }\n return $giftVoucherCode;\n }", "title": "" }, { "docid": "7ad94feb60780bc875225befefe463c3", "score": "0.55547756", "text": "public function testCreateVouchersWithCallback(): void\n {\n $user = factory(User::class)->create();\n $color = factory(Color::class)->create();\n $vouchers = $user->createVouchers(3, function (Vouchers $vouchers) use ($color) {\n $vouchers->withEntities($color);\n });\n\n foreach ($vouchers as $index => $voucher) {\n // Check user voucher relation.\n $this->assertTrue($voucher->is($user->vouchers[$index]));\n $this->assertTrue($voucher->is($user->voucherEntities[$index]->voucher));\n $this->assertTrue($color->is($voucher->getEntities(Color::class)->first()));\n }\n }", "title": "" }, { "docid": "571fed3a3632d1a3a1f8ac2829eda7a8", "score": "0.55030686", "text": "public function testGetAvailableVouchersOnePetWithCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[2]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }", "title": "" }, { "docid": "956d9cf9b60cb52c51ea63164bf796cc", "score": "0.54982483", "text": "private function generateVoucherCode() {\n\t\t// generate voucher code\n\t\twp_send_json(\n\t\t\tarray(\n\t\t\t\t'success' => TRUE,\n\t\t\t\t'code' => LaterPay_Helper_Voucher::generateVoucherCode(),\n\t\t\t));\n\t}", "title": "" }, { "docid": "cbb570a41de110110abf31617970d614", "score": "0.5445817", "text": "public function createVirtualUsers_get() {\n\n $tlds = array(\"com\");\n $char = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n $Limit = 5000;\n $Names = $this->Utility_model->getDummyNames($Limit);\n for ($j = 0; $j < $Limit; $j++) {\n $UserName = $Names[$j]['names'];\n $UserUnique = str_replace(\" \", \"\", $UserName);\n $ulen = mt_rand(5, 10);\n $dlen = mt_rand(7, 17);\n $email = \"\";\n for ($i = 1; $i <= $ulen; $i++) {\n $email .= substr($char, mt_rand(0, strlen($char)), 1);\n }\n $email .= \"@\";\n $email .= \"gmail\";\n $email .= \".\";\n $email .= $tlds[mt_rand(0, (sizeof($tlds) - 1))];\n $username = strtolower($UserUnique) . substr(md5(microtime()), rand(0, 26), 4);\n $Input = array();\n $Input['Email'] = $username . \"@gmail.com\";\n $Input['Username'] = $username;\n $Input['FirstName'] = $UserName;\n $Input['Password'] = 'A@123456';\n $Input['Source'] = \"Direct\";\n $Input['PanStatus'] = 2;\n $Input['BankStatus'] = 2;\n $Input['DocumentStatus'] = 2;\n $UserID = $this->Users_model->addUser($Input, 3, 1, 2);\n if ($UserID) {\n $this->Utility_model->generateReferralCode($UserID);\n $WalletData = array(\n \"Amount\" => 10000,\n \"CashBonus\" => 0,\n \"TransactionType\" => 'Cr',\n \"Narration\" => 'Deposit Money',\n \"EntryDate\" => date(\"Y-m-d H:i:s\")\n );\n $this->Users_model->addToWallet($WalletData, $UserID, 5);\n }\n }\n }", "title": "" }, { "docid": "7d31d1ade9912ac1b0ec2131067d388b", "score": "0.5435966", "text": "public function testGetAvailableVouchersNoPetsWithoutCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[1]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }", "title": "" }, { "docid": "8940eb2b25b3c4558cf67bff0bd359f0", "score": "0.5359112", "text": "public static function generateVouchers( ServicePlan $plan, $validity, $validity_unit, $count)\n {\n return DB::transaction(function() use( $plan, $validity, $validity_unit, $count){\n $pins = [];\n for($i=1; $i<=$count; $i++)\n {\n $voucher = static::generateSingle($plan, $validity, $validity_unit);\n $pins[] = $voucher->pin;\n }\n return $pins;\n });\n }", "title": "" }, { "docid": "7626c268771fd0e1a0393aa0ce981933", "score": "0.5342733", "text": "public function create()\n {\n return view('backend.vouchers.create');\n }", "title": "" }, { "docid": "265f7ab60ab92205252c3ee523eddba4", "score": "0.53421444", "text": "public function run()\n {\n //\n $vouchers = [\n [\n 'name' => 'Khuyến mại dịp đầu năm'\n ],\n [\n 'name' => 'Khuyến mại dịp mùng 8/3'\n ],\n\n ];\n\n foreach ($vouchers as $voucher)\n {\n \\App\\Voucher::create($voucher);\n }\n }", "title": "" }, { "docid": "0888c03823e511339bdc5bdf1b3a0960", "score": "0.52850145", "text": "public function index()\n {\n $q = request()->query('q');\n $paginate = request()->query('paginate') != null ? request()->query('paginate') : 15;\n\n $electronicVouchers = ElectronicVoucher::orderBy('id', 'DESC')\n ->where(function ($query) use ($q) {\n $query->where(\"number\", \"like\", \"%$q%\");\n $query->orWhere(\"serie\", \"like\", \"%$q%\");\n $query->orWhere(\"created_at\", \"like\", \"%$q%\");\n })\n ->paginate($paginate);\n\n return ElectronicVoucherResource::collection($electronicVouchers);\n }", "title": "" }, { "docid": "488ac33cd0d43293929ad5dd206763eb", "score": "0.52704334", "text": "public function generate_invoice_vat() {\n\t\t// Depending on the mode selected, the VAT will either be calculated per\n\t\t// invoice line, or per VAT rate group.\n\n\t\t// Fetch the invoice_items\n\t\t$invoice_items = $this->get_invoice_items();\n\n\t\t// Get existing VAT lines, reset them without saving yet\n\t\t$invoice_vats = [];\n\t\tforeach (Invoice_Vat::get_by_invoice($this) as $invoice_vat) {\n\t\t\t$invoice_vat->base = 0;\n\t\t\t$invoice_vat->vat = 0;\n\t\t\t$invoice_vats[$invoice_vat->vat_rate_id] = $invoice_vat;\n\t\t}\n\n\t\tforeach ($invoice_items as $invoice_item) {\n\t\t\tif ($invoice_item->vat_rate_value == 0) {\n\t\t\t\tcontinue;\n\t\t\t} elseif (isset($invoice_vats[$invoice_item->vat_rate_id])) {\n\t\t\t\t$invoice_vat = $invoice_vats[$invoice_item->vat_rate_id];\n\t\t\t} else {\n\t\t\t\t$invoice_vat = new Invoice_Vat();\n\t\t\t\t$invoice_vat->invoice_id = $this->id;\n\t\t\t\t$invoice_vat->vat_rate_id = $invoice_item->vat_rate_id;\n\t\t\t\t$invoice_vat->rate = $invoice_item->vat_rate_value;\n\t\t\t\t$invoice_vat->base = 0;\n\t\t\t\t$invoice_vat->vat = 0;\n\t\t\t}\n\n\t\t\t// Check the vat mode, calculate accordingly\n\t\t\tif ($this->vat_mode == 'line') {\n\t\t\t\t// Calculate the VAT for each line, add the VAT per line\n\t\t\t\t$invoice_vat->base = $invoice_vat->base + $invoice_item->get_price_excl();\n\t\t\t\t$invoice_vat->vat = $invoice_vat->vat + ($invoice_item->get_price_incl() - $invoice_item->get_price_excl());\n\t\t\t\t$invoice_vat->save();\n\n\t\t\t\t$invoice_vats[$invoice_item->vat_rate_id] = $invoice_vat;\n\t\t\t} else {\n\t\t\t\t// Group all items subject to the same VAT rate, calculate VAT\n\t\t\t\t// over the sum of these at the end\n\t\t\t\t$invoice_vat->base = $invoice_vat->base + $invoice_item->get_price_excl();\n\t\t\t\t$invoice_vats[$invoice_item->vat_rate_id] = $invoice_vat;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($invoice_vats as $invoice_vat) {\n\t\t\t// Calculate the VAT over the group, if desired\n\t\t\tif ($this->vat_mode == 'group') {\n\t\t\t\t$invoice_vat->vat = $invoice_vat->base * ($invoice_vat->rate / 100);\n\t\t\t}\n\n\t\t\t$invoice_vat->save();\n\t\t}\n\t}", "title": "" }, { "docid": "cd6146a74f9db1d5f6ca353bfb495106", "score": "0.5231511", "text": "public function index() {\n $vouchers = Voucher::all();\n $result = $vouchers->toArray();\n\n return Response::make( [\n 'meta' => [ 'message' => 'success', 'code' => 200 ],\n 'vouchers' => $result\n ] );\n\n }", "title": "" }, { "docid": "e0ce69279d70bc90bfc6e550cbc6b83b", "score": "0.5204736", "text": "public function index()\n {\n $vouchers = Voucher::latest('id')->paginate(10);\n return new VoucherCollection($vouchers);\n }", "title": "" }, { "docid": "e6f2e469a7d6c57886d5fbe2203a47b0", "score": "0.51899064", "text": "public function index()\n {\n $vouchers = Voucher::all();\n return view('pages/vouchers/index',compact('vouchers'));\n }", "title": "" }, { "docid": "3fa6f1afa45a7230b28ab5db749b212b", "score": "0.51439637", "text": "function generateLicenseResponse($requests) {\n $last_ticket = \"\";\n $responses = array();\n $response = \"\";\n $boundary = @exec(\"uuid\");\n\n foreach($requests as $req) {\n\t$ticket = $req['ticket'];\n\t$partner_id = $req['partner_id'];\n\t$name = $req['name'];\n\t$email = $req['email'];\n\t$key = $req['key'];\n\t$request_id = $req['request_id'];\n\t$hw_sn = $req['hw_sn'];\n\t$sw_sn = $req['sw_sn'];\n\n\tif ($ticket != $last_ticket) {\n\n\t // new ticket, save previous response and generate a new response\n\t if ($response != \"\") {\n\t\t$responses[$last_ticket] = $response;\n\t\t$response = \"\";\n\t }\n\n\t // generate email headers\n\t $response = $response . sprintf(\"From: VIVIPOS License Service <license-request@vivipos.com.tw>\\n\");\n\t $response = $response . sprintf(\"To: %s\\n\", $ticket);\n\t $response = $response . sprintf(\"Subject: Requested VIVIPOS license(s) generated (Request ID: %s)\\n\", $request_id);\n\t $response = $response . sprintf(\"Content-Type: multipart/mixed; boundary=%s\\n\\n\", $boundary);\n\n\t $response = $response . sprintf(\"--%s\\n\", $boundary);\n\t $response = $response . sprintf(\"Content-Type: text/plain; charset=utf-8\\n\");\n\t $response = $response . sprintf(\"Content-Transfer-Encoding: 7bit\\n\\n\");\n\t $response = $response . sprintf(\"Attached please find the license(s) that you have requested.\\n\\n\");\n\n\t $last_ticket = $ticket;\n\t}\n\n\t$response = $response . sprintf(\"--%s\\n\", $boundary);\n\n\tif ($partner_id == 'VIVIPOS SDK') {\n\t $response = $response . sprintf(\"Content-Type: application/octet-stream; name=\\\"vivipos.lic\\\"\\n\");\n\t $response = $response . sprintf(\"Content-Disposition: attachment; filename=\\\"vivipos.lic\\\"\\n\\n\");\n\t $response = $response . sprintf(\"%s\\n\\n\", $key);\n\t}\n\telse {\n\t $response = $response . sprintf(\"Content-Type: application/octet-stream; name=\\\"vivipos.lic\\\"\\n\");\n\t $response = $response . sprintf(\"Content-Disposition: attachment; filename=\\\"vivipos.lic\\\"\\n\\n\");\n\t $response = $response . sprintf(\"[%s]\\nname=%s\\nemail=%s\\nsigned_key=%s\\n\\n\", $partner_id, $name, $email, $key);\n\t}\n }\n if ($response != \"\") {\n\t$response = $response . sprintf(\"--%s--\\n\", $boundary);\n\t$responses[$ticket] = $response;\n }\n return $responses;\n}", "title": "" }, { "docid": "ac52ac3e768773a06e3efa78e1b8c7ea", "score": "0.51409996", "text": "public function vendors(){\n $v = $this->Freeradius->getVendors();\n $items = array();\n foreach($v as $i){\n array_push($items, array('id' => $i, 'name' => $i));\n }\n $this->set(array(\n 'items' => $items,\n 'success' => true,\n '_serialize' => array('items','success')\n ));\n }", "title": "" }, { "docid": "4a02b6411ed276e97b73f27156a6bee2", "score": "0.5134869", "text": "public function getRelatedVouchers(Request $request, Response $response)\n {\n $recipient_vouchers = [];\n $recipient = Recipient::with('vouchers')\n ->where('email',$request->get('email'))->first();\n if(!$recipient)\n {\n return response()->json([\n 'Message' => \"This email doesnt exist in our database!\"\n ], 400);\n }\n else\n {\n foreach ($recipient->vouchers as $voucher) {\n $recipient_vouchers[] = (object) array('voucher_code' => $voucher->code , 'offer' => $voucher->offer->name);\n }\n return response()->json([\n 'Message' => collect($recipient_vouchers)\n ], 400);\n }\n }", "title": "" }, { "docid": "33e0a656e54e88f5292ad4f792ab9938", "score": "0.50997686", "text": "public function create()\n {\n $sellers = Seller::all();\n return view('pages/vouchers/create',compact('sellers'));\n }", "title": "" }, { "docid": "2e64dbe460d4353701498a9375e36701", "score": "0.50907844", "text": "private static function generateInvoice()\n {\n //find all orders that have been verified and\n //ready to be invoiced\n\n $userIds = BanquetOrder::find()\n ->select('userId')\n ->where(['orderStatus' => BanquetOrder::ORDER_STATUS_VERIFIED])\n ->distinct()->asArray()->all();\n\n \n foreach ($userIds as $userId)\n {\n $id = $userId[\"userId\"];\n Yii::info('xx='.$id);\n InvoiceHelper::generateForUser($id);\n }\n\n\n\n }", "title": "" }, { "docid": "695811e148a1778d3017479abab05960", "score": "0.5084104", "text": "public function testGetAvailableVouchersOnePetDifferentSpeciesWithCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[3]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }", "title": "" }, { "docid": "dd32747902ad9d699600f6904f96f710", "score": "0.5061233", "text": "public function index()\n {\n try {\n $vouchers = $this->voucher->all();\n return view('adminlte::voucher_list', compact('vouchers'));\n } catch (Exception $e) {\n dd($e);\n }\n }", "title": "" }, { "docid": "98eecee762a11520e565fd408061a944", "score": "0.50497067", "text": "function archivevoucher(){\n\t\t$this->set('title_for_layout','Archive Gift Certificate');\n\t\t$this->set('categoryList',$this->common->getAllCategory());\n\t\t$this->set('countyList',$this->common->getAllCounty()); \t// List counties\n\t\t$this->set('cityList',$this->common->getAllCity()); \t\t// List cities\n\t\t$this->set('stateList',$this->common->getAllState()); \t\t// List states\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\n\t\t$this->set('search_text','Title');\n\t\t$this->set('s_date','');\n\t\t$this->set('e_date','');\n\t\t$this->set('category', 'Category');\n\t\t$this->set('county', 'County');\n\t\t$this->set('advertiser_profile_id', 'Advertiser');\n\t\t$cond = '';\n\t\t$time = mktime(0,0,0,date('m'),date('d'),date('Y'));\n\t\t$cond['Voucher.e_date <'] = $time;\n\t\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\n\t\t\n\t\t\n\t\t//pr($this->params);\n\t\t\n\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\n\t\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\n\t\t\t{\n\t\t\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\n\t\t\t}\n\t\t\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\n\t\t\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\n\t\t\t}else{\n\t\t\t \n\t\t\t $advertiser_profile_id =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('advertiser_profile_id',$advertiser_profile_id); \n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\n\t\t\t{\n\t\t\t $category = $this->data['vouchers']['category'] ;\n\t\t\t}\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\n $category = $this->params['named']['category'] ;\n\t\t\t}else{\n\t\t\t$category = '';\n\t\t\t}\n\t\t\t$this->set('category',$category); \n\t\t}\n// if county is set\n\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\n\t\t\t{\n\t\t\t $county = $this->data['vouchers']['county'] ;\n\t\t\t}\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\n $county = $this->params['named']['county'] ;\n\t\t\t}else{\n\t\t\t$county = '';\n\t\t\t}\n\t\t\t$this->set('county',$county); \n\t\t}\n\n\t\t\n\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\n\t\t\t{\n\t\t\t $search_text = $this->data['vouchers']['search_text'] ;\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\n\t\t\t $search_text = $this->params['named']['search_text'] ;\n\t\t\t}else{\n $search_text ='';\n\t\t\t}\n\t\t\t$this->set('search_text',$search_text); \n\t\t}\n\t\t\n\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\n\t\t\t{\n\t\t\t $arrS_date = explode(\"/\",$this->data['vouchers']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->data['vouchers']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\n\t\t\t \n\t\t\t $arrS_date = explode(\"-\",$this->params['named']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->params['named']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}else{\n\t\t\t $s_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('s_date',$s_date);\n\t\t\t\n\t\t\t$this->set('s_datetmsp',$s_datetmsp);\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\n\t\t\t{\n\t\t\t\n\t\t\t $arrE_date = explode(\"/\",$this->data['vouchers']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t $e_date = $this->data['vouchers']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\n\t\t\t \n\t\t\t $arrE_date = explode(\"-\",$this->params['named']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t \n\t\t\t $e_date = $this->params['named']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}else{\n\t\t\t $e_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('e_date',$e_date);\n\t\t\t$this->set('e_datetmsp',$e_datetmsp);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\n\t\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\n\t\t}\n\t\t\n\t\tif(isset($category) && $category !=''){\n\t\t $cond['Voucher.category_id'] = $category;\n\t\t}\n\t\t\n\t\tif(isset($county) && $county !=''){\n\t\t $cond['Voucher.advertiser_county_id'] = $county;\n\t\t}\n\n\t\tif(isset($search_text) && $search_text !=''){\n\t\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\n\t\t}\n\t\t\n\t\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\n\t\t $cond['Voucher.s_date >='] = $s_datetmsp ;\n\t\t $cond['Voucher.e_date <='] = $e_datetmsp ;\n\t\t}\n\t\t\n\t\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\n\t\t\n\t\t $cond['Voucher.s_date ='] = $s_datetmsp ;\n\t\t\n\t\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\n\t\t $cond['Voucher.e_date ='] = $e_datetmsp ;\n\t\t}\n\n\t\t$data = $this->paginate('Voucher', $cond);\n\t\t$this->set('vouchers', $data);\n\t\n\t}", "title": "" }, { "docid": "8b47da3155623a90b6776169dbceb993", "score": "0.50392497", "text": "public function index()\n {\n $vouchers = Voucher::all();\n\n $index = 1;\n\n return view('backend.vouchers.index', compact('vouchers','index'));\n }", "title": "" }, { "docid": "d4944ab5be6652db8eeac31c90cdf597", "score": "0.5034194", "text": "public function createVoucher(?Closure $callback = null): object\n {\n return $this->createVouchers(1, $callback);\n }", "title": "" }, { "docid": "b371ba2e38e94cf2b1fa1340419dbd7f", "score": "0.49957168", "text": "protected function _getVouchersAttributeName()\n {\n return Innobyte_EmagMarketplace_Model_Sales_Voucher_Abstract::EMAG_VOUCHERS;\n }", "title": "" }, { "docid": "3e4e8e50eed2d50bd102a0b06d436117", "score": "0.4981456", "text": "public function run()\n\t{\n\t\tDB::table('reference_vouchers')->insert([\n\t\t\t[\n\t\t\t\t'name' => 'direct',\n\t\t\t\t'display_name' => 'Direct',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'purchase_order',\n\t\t\t\t'display_name' => 'Purchase Order',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'purchases',\n\t\t\t\t'display_name' => 'Purchase',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'goods_receipt_note',\n\t\t\t\t'display_name' => 'Goods Receipt Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'debit_note',\n\t\t\t\t'display_name' => 'Debit Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'estimation',\n\t\t\t\t'display_name' => 'Estimation',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'sale_order',\n\t\t\t\t'display_name' => 'Sale Order',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'sales',\n\t\t\t\t'display_name' => 'Invoice',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'job_invoice',\n\t\t\t\t'display_name' => 'Job Invoice',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'job_request',\n\t\t\t\t'display_name' => 'Job Request',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'delivery_note',\n\t\t\t\t'display_name' => 'Delivery Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'credit_note',\n\t\t\t\t'display_name' => 'Credit Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t]\n\t\t]);\n\t}", "title": "" }, { "docid": "3896a08104ba58eaee033d285a2da664", "score": "0.49777725", "text": "public function generate($params,$version) {\n //et pars url y ketery poxum _ gceri\n //stex et responsy xml a galis eli, ydex mi komponentner el ka vor dzevapoxuma , es konkret arrayinnem grel, arrayova eli patasxany galis\n $unsignedRequest = $this->CreateUnsignedAmazonUrl($params);\n\t\treturn $this->CreateSignedAwsRequest($unsignedRequest,$version);\n }", "title": "" }, { "docid": "99ac37d2fb55f86b26f8d642fdf14b9d", "score": "0.49526668", "text": "public function index()\n {\n $vouchers = Voucher::where('terminal_id', Auth::user()->terminal_id);\n return view('admin.voucher.index', ['vouchers' => $vouchers]);\n }", "title": "" }, { "docid": "8e96c1f390781d412d9cbc4215e2d923", "score": "0.49438828", "text": "protected function _generate()\n {\n }", "title": "" }, { "docid": "ec5f9b44323ca4ed28b959ffcfcf3a05", "score": "0.49410847", "text": "public function vocations();", "title": "" }, { "docid": "7a19435f34050846bcdc8a35737f812e", "score": "0.49258858", "text": "public function index()\n {\n $vouchers = Voucher::all();\n\n return view('voucher.index', compact('vouchers'));\n }", "title": "" }, { "docid": "109898ada62c690ddfa964d3b5bf08f0", "score": "0.4915956", "text": "public function vouchertemplate(Request $request)\n {\n\n //////vouchertemplate\n\n //agency detal get\n\n $payment_booking = DB::table('payment')->where('id', '=', $_POST['bookingid'])->get();\n\n $guest = unserialize($payment_booking[0]->guest);\n\n $Servicename = '';\n\n $Servicetype = '';\n\n $MealBasis = '';\n\n $ServiceAddress = '';\n\n $RoomServiceType = '';\n\n $NoRooms = '';\n\n $Child = '';\n\n $Desitination = '';\n\n $starCategory = '';\n\n $Reservationstatus = '';\n\n $GuestName = '';\n\n $NoAdult = '';\n\n $Infants = '';\n\n $PoliciesDetails = '';\n\n if ($payment_booking[0]->supplier == 'travelanda') {\n $getBookingDetails = $this->getBookingDetails($payment_booking[0]);\n\n $Gethotelresponse = HotelApiController::Gethotelresponse($payment_booking[0]->hotelid);\n\n $Description = '';\n\n if (isset($Gethotelresponse->Body->Hotels->Hotel->Description)) {\n $Description = $Gethotelresponse->Body->Hotels->Hotel->Description;\n }\n\n if (isset($getBookingDetails->Body->Bookings)) {\n foreach ($getBookingDetails->Body->Bookings->HotelBooking as $HotelBooking) {\n if ($payment_booking[0]->BookingReference == $HotelBooking->BookingReference) {\n $bo = 1;\n\n if (isset($HotelBooking->Policies->Policy)) {\n $PoliciesDetails .= $Description;\n\n $PoliciesDetails .= '<div class=\"\" style=\"margin-bottom: 5px;\"><span> </span> You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.</div>';\n\n foreach ($HotelBooking->Policies->Policy as $Policy) {\n if ($Policy->Type == 'Percentage') {\n $PoliciesDetails .= '<div class=\"\" style=\"margin-bottom: 5px;\"><span></span> If you will cancel the booking after <b>'.$Policy->From.'</b> then you should pay <b'.$Policy->Value.'% </b> penalty for this booking.</div>';\n }\n\n if ($Policy->Type == 'Amount') {\n $PoliciesDetails .= ' <div class=\"\" style=\"margin-bottom: 5px;\"><span> </span> If you will cancel the booking after <b>'.$Policy->From.'</b> then you should pay $ <b>'.$Policy->Value.'</b> penalty for this booking.</div>';\n }\n\n if ($Policy->Type == 'Nights') {\n $PoliciesDetails .= '<div class=\"\" style=\"margin-bottom: 5px;\"><span></span> If you will cancel the booking after <b>'.$Policy->From.'</b> then you should pay <b>'.$Policy->Value.'</b> night price penalty for this booking.</div>';\n }\n\n ++$bo;\n }\n }\n\n // echo '<pre>';\n\n //print_r($payment_booking);\n\n // print_r($HotelBooking);\n\n //echo '</pre>';\n\n /*echo '<pre>';\n\n print_r($guest);\n\n echo '</pre>';*/\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n foreach ($guest as $guestDetails) {\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'</p>';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'</p>';\n }\n }\n }\n\n $RoomName = '';\n\n $NumAdults = '';\n\n $NumChildren = '';\n\n $room = 0;\n\n foreach ($HotelBooking->Rooms->Room as $roomDetails) {\n $RoomName = $roomDetails->RoomName;\n\n $NumAdults += $roomDetails->NumAdults;\n\n $NumChildren += $roomDetails->NumChildren;\n\n ++$room;\n }\n\n $Servicename = $HotelBooking->HotelName;\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $HotelBooking->BoardType;\n\n $ServiceAddress = $HotelBooking->City;\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $room;\n\n $Child = $NumChildren;\n\n $Desitination = $HotelBooking->City;\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n }\n }\n }\n\n if ($payment_booking[0]->supplier == 'tbo') {\n $getBookingDetails = $this->tbobboking_details($payment_booking[0]->BookingReference);\n\n $tboHolidaysHotelDetails = HotelApiController::tboHolidaysHotelDetails($payment_booking[0]->hotelid);\n\n /*\techo '<pre>';\n\n print_r($tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description']);\n\n echo '</pre>';*/\n\n $RoomName = '';\n\n if (!empty($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'])) {\n for ($r = 0; $r < $payment_booking[0]->no_of_room; ++$r) {\n $RoomName .= '<p>'.$getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'][$r]['RoomName'].'</p>';\n }\n }\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n $NumAdults = 0;\n\n $NumChildren = 0;\n\n foreach ($guest as $guestDetails) {\n $NumAdults += $guestDetails['adult'];\n\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'</p>';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n $NumChildren += $guestDetails['child'];\n\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'</p>';\n }\n }\n }\n\n $PoliciesDetails .= $tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description'];\n\n $PoliciesDetails .= '<div class=\"\"><span> </span> You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.</div>';\n\n $attr = '@attributes';\n\n $bo = 1;\n\n if (isset($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'][0])) {\n foreach ($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'] as $Policy) {\n if ($Policy[$attr]['ChargeType'] == 'Fixed') {\n $PoliciesDetails .= '<div class=\"\">If you will cancel the booking <b>'.$Policy[$attr]['FromDate'].'</b> to <b>'.$Policy[$attr]['ToDate'].'</b> then you should pay '.$Policy[$attr]['Currency'].''.$Policy[$attr]['CancellationCharge'].' penalty for this booking</div>';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Percentage') {\n $PoliciesDetails .= '<div class=\"\"><span>If you will cancel the booking <b>'.$Policy[$attr]['FromDate'].' </b> to <b>'.$Policy[$attr]['ToDate'].'</b> then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking</div>';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Night') {\n $PoliciesDetails .= '<div class=\"\"><span>If you will cancel the booking <b>'.$Policy[$attr]['FromDate'].' </b> to <b>'.$Policy[$attr]['ToDate'].'</b> then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking</div>';\n }\n\n ++$bo;\n }\n }\n\n $Servicename = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $ServiceAddress = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['AddressLine1'];\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $payment_booking[0]->no_of_room;\n\n $Child = ''; //$NumChildren;\n\n $Desitination = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['City'];\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n\n $name = '';\n\n $address = '';\n\n $city = '';\n\n $country = '';\n\n if ($payment_booking[0]->user_type == 'AgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '<pre>';\n\n print_r($agency);\n\n echo '</pre>';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'SubAgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '<pre>';\n\n print_r($agency);\n\n echo '</pre>';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'UserInfo') {\n $userinformation = DB::table('userinformation')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '<pre>';\n\n print_r($userinformation);\n\n echo '</pre>';*/\n\n $name = $userinformation[0]->name;\n\n $address = $userinformation[0]->email;\n\n $city = $userinformation[0]->phone;\n }\n\n /*echo '<pre>';\n\n print_r($guest[0]['firstname'][1]);\n\n echo '</pre>';*/\n\n $date1 = date_create($payment_booking[0]->checkin);\n\n $date2 = date_create($payment_booking[0]->checkout);\n\n $diff = date_diff($date1, $date2);\n\n $daycount = $diff->days;\n\n\n $tempalte = '\n\t\t\n\t\t\t\t<!DOCTYPE html>\n\t\t\n\t\t<html>\n\t\t\n\t\t<head>\n\t\t\n\t\t<meta charset=\"UTF-8\">\n\t\t\n\t\t<title>Voucher</title>\n\t\t\n\t\t</head>\n\t\t\n\t\t<link href=\"https://fonts.googleapis.com/css?family=Roboto:300,400,500\" rel=\"stylesheet\">\n\t\t\n\t\t<body style=\"font-family: \"Roboto\", sans-serif;background:#f0f4f5;font-size:13px;color:#6e6963\">\n\t\t\n\t\t\t<div class=\"container\" style=\"max-width:900px;margin:auto;\">\n\t\t\n\t\t\t<div id=\"outprint\">\n\t\t\n\t\t\t <header style=\"font-size: 14px; font-weight: 500;background: #036292;text-align: center;color: #ffffff;text-transform: uppercase;padding: 10px;\"> Please Present this voucher upon arrival </header>\n\t\t\n\t\t\t\t<div class=\"below-header\" style=\"padding:20px;background:#ffffff;margin-bottom:20px;border:1px solid #e2e2e2;\">\n\t\t\n\t\t\t\t<div class=\"logo-invoice-details\" style=\" margin-bottom:10px;\">\n\t\t\n\t\t\t\t\t<div class=\"logo\" style=\"padding-top:20px;width: 50%;float: left;\">\n\t\t\n\t\t\t\t\t\t<img src=\"img/logo_default_dark.png\">\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t<div class=\"l-invoice-details\" style=\"width: 50%;float: right;text-align: right;\">\n\t\t\n\t\t\t\t\t\t<h1 style=\"margin-top: 0;font-size: 30px;margin-bottom:10px;\"><span style=\"font-weight:300;\">Service</span> Voucher</h1>\n\t\t\n\t\t\t\t\t\t<p style=\"margin:0;\">'.$name.'</p>\n\t\t\n\t\t\t\t\t\t<address style=\" width: 150px;margin-left: auto;font-style: normal;\">\n\t\t\n\t\t\t\t\t\t\t'.$address.', '.$city.', '.$country.'.\n\t\t\n\t\t\t\t\t\t</address>\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t<div style=\"display:table;clear:both;\">\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t</div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t<div class=\"booking-information\" style=\"position:relative;margin-bottom:10px;\">\n\t\t\n\t\t\t\t\t<div class=\"booking-information-left\" style=\"width:65%;float:left\">\n\t\t\n\t\t\t\t\t\t<div class=\"booking-information-left-header\" style=\" border: 1px solid #eceeeb;\n\t\t\n\t\t\tborder-bottom: none; padding: 10px; background: #f7f9f8;font-weight: 500;font-size: 14px;\">\n\t\t\n\t\t\t\t\t\t\tBooking Information\n\t\t\n\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t <table style=\"width: 100%;text-align: left;border-collapse: collapse;\">\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Voucher No</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">LBVN'.$payment_booking[0]->hotelid.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">LB REF No</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">LBHR'.$payment_booking[0]->hotelid.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Supplier Ref No</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$payment_booking[0]->id.$payment_booking[0]->hotelid.$payment_booking[0]->login_id.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Re-confirmation No/Msg</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$payment_booking[0]->login_id.$payment_booking[0]->hotelid.$payment_booking[0]->id.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Lead Name</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$guest[0]['firstname'][1].''.$guest[0]['lastname'][1].'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Issued on</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.date('d/M/Y, D', strtotime($payment_booking[0]->bookingdate)).'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\n\t\t\t\t\t </table>\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t<div class=\"booking-information-right\" style=\" width: 35%;float: left;position: absolute;height: 100%;right: 0;top: 0;\">\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t<div class=\"booking-information-right-top\" style=\" height: calc(100% - 38px);position: relative;top: 0;\">\n\t\t\n\t\t\t\t\t\t<div class=\"booking-information-right-top-left\" style=\"float:left; width: 50%;height: 100%;background: #f38321;color: #ffffff;text-align: center;\">\n\t\t\n\t\t\t\t\t\t\t<p style=\"margin-top: 0;font-size: 14px;padding-top: 40px;\">Check In</p>\n\t\t\n\t\t\t\t\t\t\t<h1 style=\" font-size: 46px;margin: 0;margin-bottom: 12px;\">'.date('d', strtotime($payment_booking[0]->checkin)).'</h1>\n\t\t\n\t\t\t\t\t\t\t<i style=\"display:block;margin-bottom: 7px;\">'.date('M', strtotime($payment_booking[0]->checkin)).', '.date('Y', strtotime($payment_booking[0]->checkin)).'</i>\n\t\t\n\t\t\t\t\t\t\t<i>'.date('D', strtotime($payment_booking[0]->checkin)).'</i>\n\t\t\n\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t <div class=\"booking-information-right-top-left\" style=\"float:left;width: 50%;height: 100%;background: #38a4ff;color: #ffffff;text-align: center;\">\n\t\t\n\t\t\t\t\t\t\t<p style=\"margin-top: 0;font-size: 14px;padding-top: 40px;\">Check Out</p>\n\t\t\n\t\t\t\t\t\t\t<h1 style=\" font-size: 46px;margin: 0;margin-bottom: 12px;\">'.date('d', strtotime($payment_booking[0]->checkout)).'</h1>\n\t\t\n\t\t\t\t\t\t\t<i style=\"display:block;margin-bottom: 7px;\">'.date('M', strtotime($payment_booking[0]->checkout)).', '.date('Y', strtotime($payment_booking[0]->checkout)).'</i>\n\t\t\n\t\t\t\t\t\t\t<i>'.date('D', strtotime($payment_booking[0]->checkout)).'</i>\n\t\t\n\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t<div class=\"booking-information-right-bottom\" style=\" background: #e4293e;color: #ffffff;text-align: center;font-size: 32px;\n\t\t\n\t\t\tfont-weight: 600;\">\n\t\t\n\t\t\t\t\t\t'.$daycount.' Nights\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t <div style=\"display:table;clear:both;\">\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t</div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t<div class=\"accomodation-details\" style=\"margin-bottom:10px;\">\n\t\t\n\t\t\t\t\t<div class=\"booking-information-left-header\" style=\" border: 1px solid #eceeeb;\n\t\t\n\t\t\tborder-bottom: none; padding: 10px; background: #f7f9f8;font-weight: 500;font-size: 14px;\">\n\t\t\n\t\t\t\t\t\t\tAccomodation Details\n\t\t\n\t\t\t\t\t\t</div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t<div class=\"accomodation-left-right\">\n\t\t\n\t\t\t\t\t\t\t<div class=\"accomodation-left\" style=\"width:50%;float:left;\">\n\t\t\n\t\t\t\t\t\t\t\t<table style=\"width: 100%;text-align: left;border-collapse: collapse;\">\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%; \">Servicename</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Servicename.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Service Type </th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Servicetype.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Meal Basis </th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$MealBasis.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Service Address</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$ServiceAddress.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">RoomService Type</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$RoomServiceType.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">No Rooms</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$NoRooms.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t </table>\n\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t<div class=\"accomodation-right\" style=\"width:50%;float:left;\">\n\t\t\n\t\t\t\t\t\t\t\t<table style=\"width: 100%;text-align: left;border-collapse: collapse;\">\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Child </th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Child.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Desitination</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Desitination.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Reservation Status</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Reservationstatus.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">NoAdult</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$NoAdult.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Infants</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Infants.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Guest Name</th>\n\t\t\n\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$GuestName.'</td>\n\t\t\n\t\t\t\t\t\t</tr>\n\t\t\n\t\t\t\t\t </table>\n\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t\t <div style=\"display:table;clear:both;\">\n\t\t\n\t\t\t\t\t</div>\n\t\t\n\t\t\t\t\t\t</div>\n\t\t\n\t\t\t\t</div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t<div class=\"importantnotes\">\n\t\t\n\t\t\t\t\t<div class=\"booking-information-left-header\" style=\" border: 1px solid #eceeeb;\n\t\t\n\t\t\tborder-bottom: none; padding: 10px; background: #f7f9f8;font-weight: 500;font-size: 14px;\">\n\t\t\n\t\t\t\t\t\t\tImportant Notes\n\t\t\n\t\t\t\t\t\t</div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t<div style=\"border:1px solid #eceeeb;padding:20px;\">\n\t\t\n\t\t\t\t\t'.$PoliciesDetails.'\n\t\t\n\t\t\t\t</div>\n\t\t\n\t\t\t\t </div>\n\t\t\n\t\t\t\t<div class=\"map\" style=\"margin-bottom:10px;\">\n\t\t\n\t\t\t\t\t<h1>Hotel Map</h1>\n\t\t\n\t\t\t\t\t<img style=\"width:100%\" src=\"'.asset('img/map.jpg').'\">\n\t\t\n\t\t\t\t\t<div id=\"map\"></div>\n\t\t\n\t\t\n\t\t\n\t\t\t\t</div>\n\t\t\n\t\t\t </div> \n\t\t\n\t\t\t\t<div class=\"print-close\" style=\"display:inline-block;padding:7px;background:#d8d6d7\">\n\t\t\n\t\t\t\t\t<input type=\"button\" style=\"background:#f9783e;border:1px solid #e08558;text-align:center;cursor:pointer; color:#ffffff;padding:7px;\" value=\"Print\" class=\"Printdocument\" /> \n\t\t\n\t\t\n\t\t\n\t\t\t\t<input type=\"button\" style=\" margin-left:3px; background:#ffffff;border:1px solid #ffffff;text-align:center;cursor:pointer; color:#333333;padding:7px;\" value=\"Close\" class=\"closevocher\"/> \n\t\t\n\t\t </div>\n\t\t\n\t\t\n\t\t\n\t\t\t</div>\n\t\t\n\t\t</body>\n\t\t\n\t\t</html>\n\n\n\n\t\t';\n\n echo $tempalte;\n }", "title": "" }, { "docid": "dec2af58b1d08b1db32d956007ff52f8", "score": "0.4903172", "text": "function addVoucher(){\n\t\tif(isset($this->params['pass'][0])){\n\t \t\t$this->set('advertiser_id', $this->params['pass'][0]);\n\t\t}\n\t\t\n\t\tif($this->referer()=='/vouchers/addVoucher' || $this->referer()=='/'){ } else {\n\t\t\t$this->Session->write('referer',$this->referer());\n\t\t}\t\t\n\t\t$this->set('refferer',$this->Session->read('referer'));\n\t\t$this->set('title_for_layout','Add Gift Certificate');\n\t\t$this->set('categoryList',$this->common->getAllCategory()); // List categories\n\t \t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List Advertisers\n\n\t\t/*------------------validation for redirect 2 mastersheet if it is initiated from master sheet-----------------*/\n\t\t if((strpos($this->referer(),'masterSheet')!=false)) {\n\t\t \t$this->Session->write('reff',$this->referer());\n\t\t }\n\t\t if($this->Session->read('reff')) {\n\t\t \t$this->set('reff',$this->Session->read('reff'));\n\t\t } else {\n\t\t \t$this->set('reff',$this->referer());\n\t\t }\n\t\t \n\t\t/*----------------------------------------------------------------------------------------------------------*/\t\n\n\t\tif(isset($this->data))\n\t\t\t\t{\n\t\t\t\t $this->Voucher->set($this->data['voucher']);\n\t\t\t\t\n\t\t \t \t $this->set('advertiser_id', $this->data['voucher']['advertiser_profile_id']);//element use only\n\t\t\t\t if($this->Voucher->validates())\n\t\t\t\t { \n\t\t\t\t\t\t\n\t\t\t\t\t/*------------------------------------find county of specified advertiser---------------------------------------------*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t$county = $this->Voucher->getCityCountyState($this->data['voucher']['advertiser_profile_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['advertiser_county_id']\t=\t$county[0]['advertiser_profiles']['county'];\n\t\t\t\t\t\t\n\t\t\t\t\t/*--------------------------------------------------------------------------------------------------------------------*/\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($this->data['voucher']['sdate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$s_date\t\t= $this->data['voucher']['sdate'];\n\t\t\t\t\t\t\t$start_date\t= explode('/',$s_date);\n\t\t\t\t\t\t\t$start_date = mktime(0,0,0,$start_date[0],$start_date[1],$start_date[2]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start_date = mktime(0,0,0,date('m'),date('t',strtotime('today')),date('Y'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($this->data['voucher']['edate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$e_date\t\t= $this->data['voucher']['edate'];\n\t\t\t\t\t\t\t$expiry_date\t= explode('/',$e_date);\n\t\t\t\t\t\t\t$expiry_date = mktime(0,0,0,$expiry_date[0],$expiry_date[1],$expiry_date[2]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$expiry_date = mktime(0,0,0,date('m'),date('t',strtotime('today')),date('Y'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/***********--------------------------valid date validation ------------------------------------------------------*/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($expiry_date < $start_date )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Session->setFlash('End Date should be greater than or equal to Start Date'); \n\t\t\t\t\t\t\treturn false;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*----------------------------------------------------------------------------------------------------------------*/\t\n\t\t\t\t\t\t\t$this->data['Voucher']['s_date']= $start_date;\n\t\t\t\t\t\t\t$this->data['Voucher']['e_date']= $expiry_date;\n\t\t\t\t\t\t/*---------------------------------------------------------------------------------*/\n\t\t\t\t\t\t$lastid = $this->Voucher->find('first',array('fields'=>array('Voucher.id'),'order'=>array('Voucher.id DESC'),'limit'=>1));\n\t\t\t\t\t\tif(is_array($lastid)) {\n\t\t\t\t\t\t\t$this->data['Voucher']['id'] = $lastid['Voucher']['id']+1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->data['Voucher']['id'] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['title']\t=\t$this->data['voucher']['title'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['description']\t=\t$this->data['voucher']['description'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['price']\t=\t$this->data['voucher']['price'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['advertiser_profile_id']\t=\t$this->data['voucher']['advertiser_profile_id'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['category_id']\t=\t$this->data['voucher']['category_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['status']\t=\t$this->data['voucher']['status'];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t/*pr($this->data['Voucher']);\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t$this->Voucher->save($this->data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*----------------------------------------------------------------------------------------------------*/\n\t\t\t\t\t\t App::import('model', 'WorkOrder');\n\t\t\t\t\t\t $this->WorkOrder = new WorkOrder;\t\t\t \n\t\t\t\t\t\t $orderid = $this->common->getOrderId($this->data['Voucher']['advertiser_profile_id']);\n\t \t\t\t\t\t $salsemain_detail = $this->common->getorderdetail($orderid['AdvertiserProfile']['order_id']);\n\t\t\t\t\t\t $saveWorkArray = array();\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['advertiser_order_id'] = $orderid['AdvertiserProfile']['order_id'];\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['read_status'] \t\t = 0;\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['subject'] \t\t\t = 'New Workorder for Gift Certificate';\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['message'] \t\t\t = 'New Workorder for Gift Certificate has been launched for the following advertiser profile.';\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['type'] \t\t\t = 'Gift Certificate Workorder';\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['sent_to'] \t\t\t = $salsemain_detail['AdvertiserOrder']['salesperson'];\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['sent_to_group'] \t = 5;\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['from_group'] \t\t = $this->Session->read('Auth.Admin.user_group_id');\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['salseperson_id'] \t = 0;\n\t\t\t\t\t\t date_default_timezone_set('US/Eastern');\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['created_date'] \t\t\t= date(DATE_FORMAT.' h:i:s A');\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['created'] \t\t\t = strtotime(date(DATE_FORMAT.' h:i:s A'));\n\t\t\t\t\t\t $this->WorkOrder->save($saveWorkArray);\n\t\t\t\t\t/*----------------------------------------------------------------------------------------------------------*/\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Session->setFlash('Gift Certificate Successfully Saved'); \n\t\t\t\t\t\tif(isset($this->data['voucher']['prvs_link']) && (strpos($this->data['voucher']['prvs_link'],'masterSheet')!=false))\n\t\t\t\t\t\t{\n\t\t\t\t\t \t\t$this->Session->delete('reff');\n\t\t\t\t\t\t\t$ad_id = explode('/',$this->data['voucher']['prvs_link']);\t\t\n\t\t\t\t\t\t\t$this->redirect(FULL_BASE_URL.router::url('/',false).'advertiser_profiles/masterSheet/'.$ad_id[3]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->redirect(array('action' => 'index/'.$this->data['voucher']['advertiser_profile_id']));\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\n\t\t\t\t\t\t$errors = $this->Voucher->invalidFields();\t\n\t\t\t\t\t\t$this->Session->setFlash(implode('<br>', $errors)); \n\t\t\t\t\t\treturn false;\n\t\t\t\t }\t \n\t\t\t}\n\t}", "title": "" }, { "docid": "ae65bb6cd56609cd64f5ea39a03596dc", "score": "0.48989162", "text": "public function store(CreateVouchersRequest $request)\n {\n $data = $request->except('valid_from','valid_until');\n $data['valid_from'] = $request->valid_from != '' ? $request->valid_from : NULL ;\n $data['valid_until'] = $request->valid_until != '' ? $request->valid_until : NULL ;\n $voucher = Voucher::create($data);\n\n return redirect()->route('gjadmin.vouchers.index');\n }", "title": "" }, { "docid": "707598dd3a6f3868b02cb066f3a01a33", "score": "0.48901686", "text": "function createView() {\n\n require 'connector.php';\n\n /* Map Function */\n $map = \"function(doc) {\n (doc.genre || []).forEach(function(genre){ \n var key = {title: doc.title, genre: doc.genre};\n emit(key, 1);\n });\n }\";\n\n $view = new stdClass();\n $view->_id = '_design/title';\n $view->language = 'javascript';\n $view->views = array('byGenre' => array('map' => $map, \"reduce\" => \"_count\"));\n\n $client->storeDoc($view);\n}", "title": "" }, { "docid": "d382802f3ac099e23bfdaee4bcfbaa2e", "score": "0.48863566", "text": "protected function RecalculateVouchers()\n {\n if (!is_null($this->GetActiveVouchers())) {\n $this->dCostVouchers = 0;\n $this->GetActiveVouchers()->RemoveInvalidVouchers(MTShopBasketCore::MSG_CONSUMER_NAME, $this);\n $this->dCostVouchers = $this->GetActiveVouchers()->GetVoucherValue(true);\n if ($this->dCostVouchers > $this->dCostTotal) {\n $this->dCostVouchers = $this->dCostTotal;\n }\n } else {\n $this->dCostVouchers = 0;\n }\n }", "title": "" }, { "docid": "b1f522473626035b45f8d09f2a682ce7", "score": "0.48726457", "text": "function downloadvolunteers()\n\t{\n\t\t$userInfo = $_SESSION['user'];\n\t\tif(!isset($userInfo))\n\t\t\tredirect('/hcdec/index');\n\t\tif(!in_array('manage_volunteers', $userInfo['roles']))\n\t\t\tredirect('/hcdec/myhcdec');\n\t\t\t# list the volunteers as rows in HTML table. parameters for\n\t\t# this request: $startDate, $endDate. if startDate is not\n\t\t# given, all volunteer requests are listed up thru endDate.\n\t\t# if endDate is not given, all volunteer requests are listed\n\t\t# period in one giant scrolling div. add format = html or csv\n\t\t# so we know which view to load\n\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t\n\t\t$criteria = array();\n\t\t$startDate = \"\";\n\t\tif(isset($arr['startDate']))\n\t\t{\n\t\t\t$criteria['startDate'] = $arr['startDate'];\n\t\t\t$startDate = $arr['startDate'];\n\t\t}\n\t\t\t\n\t\t$endDate = \"\";\n\t\tif(isset($arr['endDate']))\n\t\t{\n\t\t\t$criteria['endDate'] = $arr['endDate'];\n\t\t\t$endDate = $arr['endDate'];\n\t\t}\n\t\t\n\t\t$precinct = \"\";\n\t\tif(isset($arr['precinct']))\n\t\t{\n\t\t\t$criteria['precinct'] = $arr['precinct'];\n\t\t\t$precinct = $arr['precinct'];\n\t\t}\n\t\t\t\n\t\t$criteria = array();\n\t\t# now look up volunteers\n\t\t$this->load->model('volunteers');\n\t\t$r = $this->volunteers->getVolunteers();\n\t\tif($r['status'] == 'OK')\n\t\t{\n\t\t\t$params['volunteers'] = $r['rows'];\n\t\t\t$params['startDate'] = $startDate;\n\t\t\t$params['endDate'] = $endDate;\n\t\t\t$params['precinct'] = $precinct;\n\t\t\t$this->load->view('volunteers_spreadsheet', $params);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# error page\n\t\t}\n\t}", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "09ea1b1b1e32adfa9b9794a8b6bd069a", "score": "0.48708385", "text": "public function generate();", "title": "" }, { "docid": "7dd10791b42ea589326aa3d2fec1051e", "score": "0.48571146", "text": "protected function _setVouchers( $aVoucherSeries )\r\n {\r\n if ( empty( $aVoucherSeries ) ) {\r\n return;\r\n }\r\n $aVoucherIDs = array();\r\n foreach ( $aVoucherSeries as $aVoucherSerie ) {\r\n $oVoucherSerie = oxNew( 'oxbase' );\r\n $oVoucherSerie->init( 'oxvoucherseries' );\r\n foreach( $aVoucherSerie as $sKey => $mxValue ) {\r\n $sField = \"oxvoucherseries__\" . $sKey;\r\n $oVoucherSerie->$sField = new oxField( $mxValue, oxField::T_RAW);\r\n }\r\n $oVoucherSerie->save();\r\n // inserting vouchers\r\n for ( $i = 1; $i <= $aVoucherSerie['voucher_count']; $i++ ) {\r\n $aData = array(\r\n 'oxreserved' => 0,\r\n 'oxvouchernr' => md5( uniqid( rand(), true ) ),\r\n 'oxvoucherserieid' => $oVoucherSerie->getId() \r\n );\r\n $oVoucher = $this->createObj( $aData, 'oxvoucher', 'oxvouchers' );\r\n $aVoucherIDs[] = $oVoucher->getId();\r\n }\r\n }\r\n return $aVoucherIDs;\r\n }", "title": "" }, { "docid": "b44c6127fb55f26eb4e490af9a373be5", "score": "0.48478484", "text": "public function payment_vouchers()\r\n {\r\n return $this->hasMany('App\\PaymentVoucher');\r\n }", "title": "" }, { "docid": "8c1d7d8c48f9896dfc27e6469230d2ce", "score": "0.48383877", "text": "public function generate() {\n\n\t\t}", "title": "" }, { "docid": "fe0afdbb783d907cdcac4e7119d949ed", "score": "0.4826828", "text": "public function create()\n {\n $temp_vendors=DB::table('vendors')\n ->where('vendortype','customer')\n ->orderBy('company_name_th','asc') //select data from database\n ->get();\n\n $vendors=[];\n if(!empty($temp_vendors)){\n foreach($temp_vendors as $temp){ //check data and loop for change value to id \n $vendors[$temp->vendor_id]=$temp;\n }\n }\n return view('createquotation',['vendors'=>$vendors]);\n }", "title": "" }, { "docid": "9b468c67cc6e974d62abe56dbcbd38e0", "score": "0.4808531", "text": "function index(){\n\tif(!isset($this->params['pass'][0])) {\n\t\t$this->redirect(array('action'=>'voucherCommon'));\n\t}\n\t\t$this->set('title_for_layout','Gift Certificate');\n\t\t$this->set('categoryList',$this->common->getAllCategory());\n\t\t$this->set('countyList',$this->common->getAllCounty()); \t// List counties\n\t\t$this->set('cityList',$this->common->getAllCity()); \t\t// List cities\n\t\t$this->set('stateList',$this->common->getAllState()); \t\t// List states\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\n\t\t$this->set('search_text','Title');\n\t\t$this->set('s_date','');\n\t\t$this->set('e_date','');\n\t\t$this->set('category', 'Category');\n\t\t$this->set('county', 'County');\n\t\t$this->set('advertiser_profile_id', 'Advertiser');\n\t\t$cond = '';\n\t\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\n\t\t\n\t\t/*--------------------------------------setting diff condition in paginate function according to search criteria-----------------------------*/\n\t\t\n\t\tif(isset($this->params['pass'][0]) && $this->params['pass'][0] !='' )\n\t\t {\n\t\t\t $cond=array('Voucher.advertiser_profile_id' => $this->params['pass'][0]);\n\t\t\t (empty($this->params['named'])) ? $this->set('advertiser_profile_id', $this->params['pass'][0]) :$this->set('advertiser_profile_id', $this->params['pass'][0]) ; \n\t\t\t $this->set('advertiser_id',$this->params['pass'][0]);\n\t\t }\n\t\t//if advertiser is set\t\t\n\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\n\t\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\n\t\t\t{\n\t\t\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\n\t\t\t}\n\t\t\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\n\t\t\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\n\t\t\t}else{\n\t\t\t \n\t\t\t $advertiser_profile_id =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('advertiser_profile_id',$advertiser_profile_id); \n\t\t}\n\t\t\n\t\t\n\t\t//if categry is set\n\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\n\t\t\t{\n\t\t\t $category = $this->data['vouchers']['category'] ;\n\t\t\t}\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\n $category = $this->params['named']['category'] ;\n\t\t\t}else{\n\t\t\t$category = '';\n\t\t\t}\n\t\t\t$this->set('category',$category); \n\t\t}\n\t\t//if county is set\n\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\n\t\t\t{\n\t\t\t $county = $this->data['vouchers']['county'] ;\n\t\t\t}\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\n $county = $this->params['named']['county'] ;\n\t\t\t}else{\n\t\t\t$county = '';\n\t\t\t}\n\t\t\t$this->set('county',$county); \n\t\t}\n\t\t\n\t\t//if title is set\t \t\t \n\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\n\t\t\t{\n\t\t\t $search_text = $this->data['vouchers']['search_text'] ;\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\n\t\t\t $search_text = $this->params['named']['search_text'] ;\n\t\t\t}else{\n $search_text ='';\n\t\t\t}\n\t\t\t$this->set('search_text',$search_text); \n\t\t}\n\t\t\n\t\t//if start and end dates are set \n\t\t\n\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\n\t\t\t{\n\t\t\t $arrS_date = explode(\"/\",$this->data['vouchers']['s_date']);\n\t\t\t $day = $arrS_date[0] ;\n\t\t\t $month = $arrS_date[1] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->data['vouchers']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\n\t\t\t \n\t\t\t $arrS_date = explode(\"-\",$this->params['named']['s_date']);\n\t\t\t $day = $arrS_date[0] ;\n\t\t\t $month = $arrS_date[1] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->params['named']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}else{\n\t\t\t $s_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('s_date',$s_date);\n\t\t\t\n\t\t\t$this->set('s_datetmsp',$s_datetmsp);\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\n\t\t\t{\n\t\t\t\n\t\t\t $arrE_date = explode(\"/\",$this->data['vouchers']['e_date']);\n\t\t\t $eday = $arrE_date[0] ;\n\t\t\t $emonth = $arrE_date[1] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t $e_date = $this->data['vouchers']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\n\t\t\t \n\t\t\t $arrE_date = explode(\"-\",$this->params['named']['e_date']);\n\t\t\t $eday = $arrE_date[0] ;\n\t\t\t $emonth = $arrE_date[1] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t \n\t\t\t $e_date = $this->params['named']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}else{\n\t\t\t $e_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('e_date',$e_date);\n\t\t\t$this->set('e_datetmsp',$e_datetmsp);\n\t\t\n\t\t}\n\t\n\t\t \n\t\t\t /*----------------------------------At the time of sorting Filteration on basis of these fields------------------------------*/\n\t\t\n\t\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\n\t\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\n\t\t}\n\t\t\n\t\tif(isset($category) && $category !=''){\n\t\t $cond['Voucher.category_id'] = $category;\n\t\t}\n\t\t\n\t\tif(isset($county) && $county !=''){\n\t\t $cond['Voucher.advertiser_county_id'] = $county;\n\t\t}\n\n\t\tif(isset($search_text) && $search_text !=''){\n\t\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\n\t\t}\n\t\t\n\t\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\n\t\t $cond['Voucher.s_date >='] = $s_datetmsp ;\n\t\t $cond['Voucher.e_date <='] = $e_datetmsp ;\n\t\t}\n\t\t\n\t\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\n\n\t\t\n\t\t $cond['Voucher.s_date ='] = $s_datetmsp ;\n\t\t\n\t\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\n\t\t $cond['Voucher.e_date ='] = $e_datetmsp ;\n\t\t}\n\n\t\t\n\t\t$data = $this->paginate('Voucher', $cond);\n\t\t$this->set('vouchers', $data);\n\t\n\t}", "title": "" }, { "docid": "436fa0b7be7f3da7f95d7022b403edb5", "score": "0.48030066", "text": "public function index()\n\t{\n\n\t\t//$vouchers = Vouchers::latest()->get();\n $vouchers= Vouchers::paginate(1);\n //dd($paginare);\n\t\treturn view('administrare.pages.voucher.index', compact('vouchers'));\n // ->with(compact('paginare'));\n\t}", "title": "" }, { "docid": "3c32c2b4304c44e6e1023d89efd9c5ba", "score": "0.48025286", "text": "public function method1()\n {\n $user = getAPIUser();\n\n // Only Buyer User or Broker can access buyer records\n if (!($this->isCustomer() || ($this->isBroker() && $user->broker))) {\n ssAbort('Unauthorised', ERROR_CODE_UNAUTHORIZED);\n }\n\n $buyers = null;\n\n if ($this->isCustomer()) {\n $buyers = $user->buyers;\n } else if ($this->isBroker() && $user->broker) {\n $buyers = $user->broker->buyers;\n }\n\n loadObjects($buyers, [\n 'individual',\n 'company',\n 'officers',\n 'primary_address',\n 'mailing_address',\n 'email_contact',\n 'phone1_contact',\n 'phone2_contact',\n 'documents',\n 'lawyers',\n 'users'\n ]);\n\n $data = [\n \"buyers\" => $buyers,\n ];\n\n $buyersArray[]=['No', 'Date', 'Name', 'Email', 'Contact Number', 'NIRC/PASSPORT / COMPANY REG. NO', 'STATUS'];\n foreach($buyers as $key=>$buyer){\n $verified =($buyer->emailContact->verified)?'Verified':'Not Verified';\n $email =($buyer->emailContact->value)?$buyer->emailContact->value:'';\n $created_at =!empty($buyer->emailContact->created_at)?$buyer->emailContact->created_at:'';\n $display_name =!empty($buyer->individual)?$buyer->individual->first_name.' '.$buyer->individual->last_name:$buyer->company->name;\n $phone1Contactvalue =!empty($buyer->phone1Contact->value)?$buyer->phone1Contact->value:'';\n\n\n if(!empty($buyer->individual)){\n $passport_no =!empty($buyer->individual->passport_no)?$buyer->individual->passport_no:$buyer->individual->national_id;\n }\n if(!empty($buyer->company)){\n $passport_no =!empty($buyer->company->reg_no)?$buyer->company->reg_no:'';\n }\n //$passport_no =!empty($buyer->individual)?($buyer->individual->identity_type=='singaporean' || $buyer->individual->identity_type=='singaporean_r')?$buyer->individual->national_id:$buyer->individual->passport_no:$buyer->company->reg_no;\n $buyersArray[]=[$key+1, $created_at, $display_name, $email, $phone1Contactvalue, $passport_no, $verified];\n }\n Excel::create('BUYERS LIST', function ($exportBuyers) use ($buyersArray) {\n // Set the spreadsheet title, creator, and description\n $exportBuyers->setTitle('BUYERS LIST');\n $exportBuyers->setCreator('test')->setCompany('Show Suite');\n $exportBuyers->setDescription('Buyers List Export');\n //Property\n $exportBuyers->sheet('Buyers', function ($sheet) use ($buyersArray) {\n $sheet->fromArray($buyersArray, null, 'A1', true, false);\n });\n\n })->download('xlsx');\n\n }", "title": "" }, { "docid": "f1d5d7d30b93f2bfe29e2aa250ec0ec0", "score": "0.47578892", "text": "function gen() { $this->generate(); }", "title": "" }, { "docid": "b3e4213cbc089be7b07970ee597139c0", "score": "0.47552603", "text": "public function generate()\n {\n }", "title": "" }, { "docid": "cc44ac22660d0a3053ee6ec80ae9ff2c", "score": "0.4710078", "text": "public function generate_guest_report(){\n\t\t$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n\t\t// set document information\n\t\t// $pdf->SetCreator(PDF_CREATOR);\n\t\t// $pdf->SetAuthor('Nicola Asuni');\n\t\t// $pdf->SetTitle('TCPDF Example 048');\n\t\t// $pdf->SetSubject('TCPDF Tutorial');\n\t\t// $pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n\n\t\t// set default header data\n\t\t$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\n\n\t\t// set header and footer fonts\n\t\t$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n\t\t$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n\t\t// set default monospaced font\n\t\t$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n\t\t// set margins\n\t\t$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n\t\t$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n\t\t$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n\t\t// set auto page breaks\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n\t\t// set image scale factor\n\t\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n\t\t// set some language-dependent strings (optional)\n\t\tif (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n\t\t\trequire_once(dirname(__FILE__).'/lang/eng.php');\n\t\t\t$pdf->setLanguageArray($l);\n\t\t}\n\n\t\t// ---------------------------------------------------------\n\n\t\t// set font\n\t\t$pdf->SetFont('helvetica', 'B', 20);\n\n\t\t// add a page\n\t\t$pdf->AddPage();\n\n\t\t$pdf->Write(0, 'Guest List', '', 0, 'C', true, 0, false, false, 0);\n\n\t\t// set font\n\t\t$pdf->SetFont('helvetica', 'B', 10);\n\t\t\n\t\t$pdf->Write(0, 'Date: '.date('F d, Y'), '', 0, 'C', true, 0, false, false, 0);\n\t\t\n\t\t$pdf->SetFont('helvetica', '', 10);\n\t\t\n\t\tif(isset($_POST['guest_type_id']) == true && isset($_POST['gender_id']) == true){\n\t\t\t$data['guests'] = $this->usersModel->getGuestTypeAndGender($_POST['guest_type_id'], $_POST['gender_id']);\n\t\t}elseif(isset($_POST['guest_type_id']) == true && isset($_POST['gender_id']) == false){\n\t\t\t$data['guests'] = $this->usersModel->getGuestTypeAndNoGender($_POST['guest_type_id']);\n\t\t}elseif(isset($_POST['guest_type_id']) == false && isset($_POST['gender_id']) == true){\n\t\t\t$data['guests'] = $this->usersModel->getNoGuestTypeAndGender($_POST['gender_id']);\n\t\t}else{\n\t\t\t$data['guests'] = $this->usersModel->getUsersLists();\n\t\t}\n\t\t$html = view('Modules\\Guests\\Views\\guests\\guestspdf', $data);\n\t\t$pdf->writeHTML($html, true, false, false, false, '');\n\t\t// ---------------------------------------------------------\n\n\t\t// Close and output PDF document\n\t\t// This method has several options, check the source code documentation for more information.\n\t\t$pdf->Output('example_001.pdf', 'I');\n\t\tdie();\n\t}", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.46835908", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.46835908", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.46835908", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.46835908", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.46835908", "text": "abstract public function generate();", "title": "" }, { "docid": "54d8d709193bf8cd436df32b18796ca7", "score": "0.46793646", "text": "public function getAll(Request $request, Response $response)\n {\n $vouchers = Voucher::all();\n return response()->json([\n 'vouchers' => $vouchers\n ], 200);\n }", "title": "" }, { "docid": "d234f6e813278016f8e3644f3ac69297", "score": "0.46764204", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $recipients = [];\n\n /**\n * This first recipient will be used for later testing the API\n */\n $recipients[] = DB::table('recipients')\n ->insertGetId([\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n for ($i = 0; $i < 49; $i++) {\n $recipients[] = DB::table('recipients')\n ->insertGetId([\n 'name' => $faker->name,\n 'email' => $faker->unique()->email,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n }\n\n for ($i = 0; $i < 5; $i++) {\n $offer = DB::table('special_offers')\n ->insertGetId([\n 'name' => $faker->sentence(4),\n 'discount' => $faker->numberBetween(1, 20) * 5,\n 'expiration' => $faker->dateTimeBetween('-2 months', '+5 months'),\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n foreach ($recipients as $recipient) {\n DB::table('voucher_codes')\n ->insert([\n 'special_offer_id' => $offer,\n 'recipient_id' => $recipient,\n 'code' => str_random(12),\n 'used_on' => (mt_rand(0, 2) <= 1) ? $faker->dateTimeBetween('-2 months', 'now') : NULL,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n }\n }\n }", "title": "" }, { "docid": "7f995aa3fd22e6520e919d63477ad1ef", "score": "0.46645784", "text": "public function generate( $args, $assoc_args ) {\n $faker = Faker::get();\n\n $count = 10;\n $generated = 0;\n\n if ( ! empty( $assoc_args['count'] ) ) {\n $count = $assoc_args['count'];\n }\n\n $message = sprintf( 'Generating %d vendors', $count );\n\n $progress = $this->make_progress_bar( $message, $count );\n\n add_filter( 'woocommerce_email_enabled_dokan_new_seller', '__return_false' );\n\n for ( $i = 0; $i < $count; $i++ ) {\n $email = $faker->safeEmail;\n $shopname = $faker->unique()->userName;\n\n $userdata = [\n 'user_login' => $email,\n 'user_email' => $email,\n 'user_pass' => ',lpmkonji',\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'role' => 'seller',\n 'user_nicename' => $shopname,\n ];\n\n $vendor = wp_insert_user( $userdata );\n\n if ( ! is_wp_error( $vendor ) ) {\n $dokan_settings = array(\n 'store_name' => $shopname,\n 'social' => array(),\n 'payment' => array(),\n 'phone' => $faker->phoneNumber,\n 'show_email' => 'no',\n 'dokan_category' => '',\n 'banner' => 0,\n );\n\n // 50-50 chance to add location data\n $add_location_data = $faker->boolean();\n\n if ( $add_location_data ) {\n $lat = $faker->latitude( 23.70, 23.90 );\n $long = $faker->longitude( 90.25, 90.50 );\n\n $dokan_settings['find_address'] = $faker->address;\n $dokan_settings['location'] = $lat . ',' . $long;\n }\n\n update_user_meta( $vendor, 'dokan_profile_settings', $dokan_settings );\n update_user_meta( $vendor, 'dokan_store_name', $dokan_settings['store_name'] );\n\n do_action( 'dokan_new_seller_created', $vendor, $dokan_settings );\n\n do_action( 'dokan_dev_cli_vendor_generated', $vendor );\n\n ++$generated;\n }\n\n $progress->tick();\n }\n\n $progress->finish();\n\n $message = sprintf( 'Generated %d vendors', $generated );\n\n $this->success( $message );\n }", "title": "" }, { "docid": "546026b52202f3210a24a75e0f2235b1", "score": "0.4659318", "text": "public function createReservationVoucher(BathReservation $reservation, string $flePath, string $projectDir)\n {\n $pdfOptions = new Options();\n $pdfOptions->set('defaultFont', 'DejaVu Sans');\n // Instantiate Dompdf with our options\n $dompdf = new Dompdf($pdfOptions);\n\n $dompdf->getOptions()->setChroot($projectDir . DIRECTORY_SEPARATOR . 'public'); //path to document root\n // Retrieve the HTML generated in our twig file\n\n /** @var BathSlot[] $slots */\n $slots = $reservation->getSlots();\n $countSlots = count($slots);\n $startTime = $slots[0]->getBathschedule()->getDate()->format('Y-m-d'). \" \" .explode('-', $slots[0]->getTime())[0];\n $endTime = $slots[$countSlots - 1]->getBathschedule()->getDate()->format('Y-m-d'). \" \" .explode('-', $slots[$countSlots - 1]->getTime())[1];\n $html = $this->twig->render('pdf/voucher.html.twig', [\n 'title' => \"Ваучер бронирования\",\n 'assetDir' => $projectDir . DIRECTORY_SEPARATOR . 'public',\n 'reservation' => $reservation,\n 'startTime' => $startTime,\n 'endTime' => $endTime\n ]);\n\n $dompdf->loadHtml($html);\n \n // (Optional) Setup the paper size and orientation 'portrait' or 'portrait'\n $dompdf->setPaper('A4', 'portrait');\n\n // Render the HTML as PDF\n $dompdf->render();\n\n // Store PDF Binary Data\n $output = $dompdf->output();\n \n // Write file to the desired path\n file_put_contents($flePath, $output); \n }", "title": "" }, { "docid": "b22bf1296ea34a5a7f8993ee4749927c", "score": "0.46513382", "text": "public function index() {\n\t\t$id = $this->requete->getParametre('id');\n $Client = $this->Client->getClient($id);\n $this->genererVue(array('Client' => $Client));\n }", "title": "" }, { "docid": "efb5112dd14999fbfd9069a8830aa8b3", "score": "0.46510085", "text": "public function getTypeVouchers(){\n $type_vouchers = \\DB::table('type_vouchers')->get();\n return response()->json(['estado'=>true, 'code'=>'200', 'message'=>\"Petición exitosa\", 'data'=>$type_vouchers]);\n\n }", "title": "" }, { "docid": "534410c4a5ca0ae549bfaa831f292b73", "score": "0.46496972", "text": "public abstract function generateView();", "title": "" }, { "docid": "42ada19f453464f1876edd8e8dc6bedb", "score": "0.46456087", "text": "public function ventas(Request $request)\n {\n $facturas = Factura::orderBy('fecha', 'ASC')->get();\n // Establecer la fecha desde y hasta\n if (count($facturas) > 0) {\n $inicio = $facturas->first();\n $ultima = $facturas->last();\n $from = $request->get('desde', $inicio->fecha);\n $to = $request->get('hasta', $ultima->fecha);\n } else {\n $from = $request->get('desde', now());\n $to = $request->get('hasta', now());\n }\n\n $desde = new Carbon($from);\n $hasta = new Carbon($to);\n $ventasFecha = [];\n $fecs = collect();\n $vendedores = [];\n $ventasVendedores = [];\n $sellers = collect();\n $ventasClientes = [];\n $clientes = [];\n $clients = collect();\n $ventasCondiciones = [];\n $condiciones = collect(['CONTADO', 'CUENTA CORRIENTE', 'CREDITO / DEBITO']);\n\n // Buscar las facturas entre las fechas\n $facturas = Factura::where('fecha', '>=', $desde->format('Ymd'))->where('fecha', '<=', $hasta->format('Ymd'))->orderBy('fecha', 'ASC')->take($request->get('limit', null))->get();\n\n foreach ($facturas as $factura) {\n $seller = User::find($factura->user_id);\n $sellers->push($seller);\n $client = Cliente::find($factura->cliente_id);\n $clients->push($client);\n }\n\n $facturas2 = Factura::where('fecha', '>=', $desde->format('Ymd'))->where('fecha', '<=', $hasta->format('Ymd'))->orderBy('fecha', 'ASC')->get();\n foreach ($facturas2 as $factura) {\n $fecs->push($factura->fecha);\n }\n\n // Fechas\n $auxFechas = $fecs->unique();\n foreach ($auxFechas as $value) {\n $factus = Factura::where('fecha', $value)->get();\n array_push($ventasFecha, $factus);\n };\n $columnsFechas = ['fecha', 'total'];\n $rowsFechas = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasFecha); $i++) {\n $otro = $ventasFecha[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $fecha = $ventasFecha[$i][0]->fecha;\n $fechaNew = new Carbon($fecha);\n $rowsFechas->push([\n 'fecha' =>\n $fechaNew->format('d-m-Y'),\n 'total' => $total\n ]);\n $total = 0;\n };\n $ventasFechasChart = collect();\n $ventasFechasChart->put('columns', $columnsFechas);\n $ventasFechasChart->put('rows', $rowsFechas);\n // Fin Fechas\n\n // Vendedores\n $auxVendedores = $sellers->unique();\n foreach ($auxVendedores as $key) {\n $facs = Factura::where('user_id', $key->id)\n ->where('fecha', '>=', $desde->format('Ymd'))\n ->where('fecha', '<=', $hasta->format('Ymd'))\n ->orderBy('fecha', 'ASC')\n ->get();\n array_push($vendedores, $key);\n array_push($ventasVendedores, $facs);\n }\n $columnsVendedores = ['vendedor', 'totalVendido'];\n $rowsVendedores = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasVendedores); $i++) {\n $otro = $ventasVendedores[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $rowsVendedores->push([\n 'vendedor' => $vendedores[$i]->name,\n 'totalVendido' => $total\n ]);\n $total = 0;\n };\n $ventasVendedores = collect();\n $ventasVendedores->put('columns', $columnsVendedores);\n $ventasVendedores->put('rows', $rowsVendedores);\n // Fin Vendedores\n\n // Clientes\n $auxClientes = $clients->unique();\n foreach ($auxClientes as $aux) {\n $facturs = Factura::where('cliente_id', $aux->id)\n ->where('fecha', '>=', $desde->format('Ymd'))\n ->where('fecha', '<=', $hasta->format('Ymd'))\n ->orderBy('fecha', 'ASC')->get();\n array_push($clientes, $aux);\n array_push($ventasClientes, $facturs);\n }\n $columnsClientes = ['cliente', 'totalComprado'];\n $rowsClientes = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasClientes); $i++) {\n $otro = $ventasClientes[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $rowsClientes->push([\n 'cliente' => $clientes[$i]->razonsocial,\n 'totalComprado' => $total\n ]);\n $total = 0;\n };\n $ventasClientes = collect();\n $ventasClientes->put('columns', $columnsClientes);\n $ventasClientes->put('rows', $rowsClientes);\n // Fin Clientes\n\n // Condiciones\n foreach ($condiciones as $cond) {\n $fa = Factura::where('condicionventa', $cond)\n ->where('fecha', '>=', $desde->format('Ymd'))\n ->where('fecha', '<=', $hasta->format('Ymd'))\n ->orderBy('fecha', 'ASC')->get();;\n array_push($ventasCondiciones, $fa);\n }\n $columnsCondiciones = ['condicion', 'totalVendido'];\n $rowsCondiciones = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasCondiciones); $i++) {\n $otro = $ventasCondiciones[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $rowsCondiciones->push([\n 'condicion' => $condiciones[$i],\n 'totalVendido' => $total\n ]);\n $total = 0;\n };\n $ventasCondiciones = collect();\n $ventasCondiciones->put('columns', $columnsCondiciones);\n $ventasCondiciones->put('rows', $rowsCondiciones);\n // Fin Condiciones\n\n $ventas = [\n 'fechas' => ['desde' => $desde->format('Y-m-d'), 'hasta' => $hasta->format('Y-m-d')],\n 'ventasFecha' => $facturas,\n 'ventasFechaChart' => $ventasFechasChart,\n 'total' => count(Factura::all()),\n 'vendedores' => $vendedores,\n 'ventasVendedores' => $ventasVendedores,\n 'clientes' => $clientes,\n 'ventasClientes' => $ventasClientes,\n 'condiciones' => $condiciones,\n 'ventasCondiciones' => $ventasCondiciones\n ];\n\n return ['ventas' => $ventas];\n }", "title": "" }, { "docid": "188bcaec1f4f91a043af3b33457bc868", "score": "0.46387964", "text": "public function __construct(Google_Client $client)\n {\n parent::__construct($client);\n $this->servicePath = 'apps/reseller/v1/';\n $this->version = 'v1';\n $this->serviceName = 'reseller';\n\n $this->customers = new Google_Service_Reseller_Customers_Resource(\n $this,\n $this->serviceName,\n 'customers',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'customers/{customerId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'customers',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerAuthToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),'patch' => array(\n 'path' => 'customers/{customerId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'customers/{customerId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->subscriptions = new Google_Service_Reseller_Subscriptions_Resource(\n $this,\n $this->serviceName,\n 'subscriptions',\n array(\n 'methods' => array(\n 'activate' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/activate',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'changePlan' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changePlan',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'changeRenewalSettings' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'changeSeats' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changeSeats',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'delete' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'deletionType' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'customers/{customerId}/subscriptions',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customerAuthToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),'list' => array(\n 'path' => 'subscriptions',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'customerAuthToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'pageToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'customerId' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'maxResults' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'customerNamePrefix' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),'startPaidService' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/startPaidService',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'suspend' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/suspend',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n }", "title": "" }, { "docid": "15dbf206655220f9b5a7f5bdefe836dd", "score": "0.46299675", "text": "protected function GetActiveVouchers()\n {\n if (is_null($this->oActiveVouchers)) {\n $this->oActiveVouchers = new TShopBasketVoucherList();\n }\n\n return $this->oActiveVouchers;\n }", "title": "" }, { "docid": "b7372e67a6ced070a8fdb527b5891a02", "score": "0.46255672", "text": "public function generate()\n {\n $this->initialiseDocument();\n $this->createRDFContainer();\n $this->createRDFVersion();\n $this->signManifest();\n }", "title": "" }, { "docid": "d466adf32928ad68c826f61a4dd357ce", "score": "0.4624151", "text": "public function generate()\n {\n $validation = $this->validate();\n\n if ($validation === true) {\n $offers = Offer::whereHas('leadstat', function($query) {\n $query->where('date', '>=', Input::get('date_start'))\n ->where('date', '<=', Input::get('date_end'));\n });\n\n $country = Input::get('country');\n if (!empty($country)) {\n $offers->whereHas('countries', function($query) use ($country) {\n $query->where('country', '=', $country);\n });\n }\n\n $offerIds = Input::get('offer_ids');\n // 0 denotes all offers.\n if (!in_array('0', $offerIds))\n $offers->whereRaw('id IN (' . implode(',', $offerIds) . ')');\n\n $this->generated = true;\n return $this->showResults($offers->get()->sortBy('name'));\n } else {\n $this->setAlertDanger($validation);\n return $this->showResults();\n }\n }", "title": "" }, { "docid": "0097b425d5ac073c4ed76e557e7723bd", "score": "0.4622875", "text": "function voucherCommon(){\n\t\t$this->set('title_for_layout','Gift Certificate Common');\n\t\t$this->set('categoryList',$this->common->getAllCategory());\n\t\t$this->set('countyList',$this->common->getAllCounty()); \t// List counties\n\t\t$this->set('cityList',$this->common->getAllCity()); \t\t// List cities\n\t\t$this->set('stateList',$this->common->getAllState()); \t\t// List states\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\n\t\t$this->set('search_text','Title');\n\t\t$this->set('s_date','');\n\t\t$this->set('e_date','');\n\t\t$this->set('category', 'Category');\n\t\t$this->set('county', 'County');\n\t\t$this->set('advertiser_profile_id', 'Advertiser');\n\t\t$cond = '';\n\t\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\n\t\t\n\t\t\n\t\t//pr($this->params);\n\t\t\n\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\n\t\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\n\t\t\t{\n\t\t\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\n\t\t\t}\n\t\t\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\n\t\t\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\n\t\t\t}else{\n\t\t\t \n\t\t\t $advertiser_profile_id =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('advertiser_profile_id',$advertiser_profile_id); \n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\n\t\t\t{\n\t\t\t $category = $this->data['vouchers']['category'] ;\n\t\t\t}\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\n $category = $this->params['named']['category'] ;\n\t\t\t}else{\n\t\t\t$category = '';\n\t\t\t}\n\t\t\t$this->set('category',$category); \n\t\t}\n// if county is set\n\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\n\t\t\t{\n\t\t\t $county = $this->data['vouchers']['county'] ;\n\t\t\t}\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\n $county = $this->params['named']['county'] ;\n\t\t\t}else{\n\t\t\t$county = '';\n\t\t\t}\n\t\t\t$this->set('county',$county); \n\t\t}\n\n\t\t\n\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\n\t\t\t{\n\t\t\t $search_text = $this->data['vouchers']['search_text'] ;\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\n\t\t\t $search_text = $this->params['named']['search_text'] ;\n\t\t\t}else{\n $search_text ='';\n\t\t\t}\n\t\t\t$this->set('search_text',$search_text); \n\t\t}\n\t\t\n\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\n\t\t\t{\n\t\t\t $arrS_date = explode(\"/\",$this->data['vouchers']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->data['vouchers']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\n\t\t\t \n\t\t\t $arrS_date = explode(\"-\",$this->params['named']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->params['named']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}else{\n\t\t\t $s_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('s_date',$s_date);\n\t\t\t\n\t\t\t$this->set('s_datetmsp',$s_datetmsp);\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\n\t\t\t{\n\t\t\t\n\t\t\t $arrE_date = explode(\"/\",$this->data['vouchers']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t $e_date = $this->data['vouchers']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\n\t\t\t \n\t\t\t $arrE_date = explode(\"-\",$this->params['named']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t \n\t\t\t $e_date = $this->params['named']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}else{\n\t\t\t $e_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('e_date',$e_date);\n\t\t\t$this->set('e_datetmsp',$e_datetmsp);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\n\t\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\n\t\t}\n\t\t\n\t\tif(isset($category) && $category !=''){\n\t\t $cond['Voucher.category_id'] = $category;\n\t\t}\n\t\t\n\t\tif(isset($county) && $county !=''){\n\t\t $cond['Voucher.advertiser_county_id'] = $county;\n\t\t}\n\n\t\tif(isset($search_text) && $search_text !=''){\n\t\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\n\t\t}\n\t\t\n\t\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\n\t\t $cond['Voucher.s_date >='] = $s_datetmsp ;\n\t\t $cond['Voucher.e_date <='] = $e_datetmsp ;\n\t\t}\n\t\t\n\t\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\n\t\t\n\t\t $cond['Voucher.s_date ='] = $s_datetmsp ;\n\t\t\n\t\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\n\t\t $cond['Voucher.e_date ='] = $e_datetmsp ;\n\t\t}\n\n\t\t$data = $this->paginate('Voucher', $cond);\n\t\t$this->set('vouchers', $data);\n\t\n\t}", "title": "" }, { "docid": "21330d8293f52111fb7ca9b932bbe91a", "score": "0.46182698", "text": "function makeOfficerList() {\n global $HERE;\n $jsonPath = $HERE . \"../res/json/officers.json\";\n return jsonFileArrayToStr($jsonPath, \"makeOfficerHtml\");\n}", "title": "" }, { "docid": "8dbe557dc0e43290c1459a242ee0566e", "score": "0.46150115", "text": "public function woo_vou_admin_voucher_pdf_download() {\r\r\n\t\t\r\r\n\t\tglobal $current_user;\r\r\n\t\t\r\r\n\t\tif( !empty( $_GET['download_file'] ) && !empty( $_GET['key'] ) \r\r\n\t\t\t&& !empty( $_GET['woo_vou_admin'] ) && !empty( $_GET['woo_vou_order_id'] ) ) {\r\r\n\t\t\t\t\r\r\n\t\t\t\tif ( current_user_can( 'moderate_comments' ) ) {\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t$product_id\t\t= (int) $_GET['download_file'];\r\r\n\t\t\t\t\t$email\t\t\t= sanitize_email( str_replace( ' ', '+', $_GET['email'] ) );\r\r\n\t\t\t\t\t$download_id\t= isset( $_GET['key'] ) ? preg_replace( '/\\s+/', ' ', $_GET['key'] ) : '';\r\r\n\t\t\t\t\t$order_id\t\t= $_GET['woo_vou_order_id'];\r\r\n\t\t\t\t\t$item_id\t\t= isset( $_GET['item_id'] ) ? $_GET['item_id'] : '';\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t//Generate PDF\r\r\n\t\t\t\t\t$this->model->woo_vou_generate_pdf_voucher( $email, $product_id, $download_id, $order_id, $item_id );\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t} else {\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\twp_die( '<p>'.__( 'You are not allowed to access this URL.', 'woovoucher' ).'</p>' );\r\r\n\t\t\t\t}\r\r\n\t\t\t\t\r\r\n\t\t\t\texit;\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "6bdebcb50144a7f6bf261ac8ae1682a3", "score": "0.46087518", "text": "public function getOurOffers(Request $request){\n //$ouroffers = ouroffers::where('branch_id',$this->branch_id)->get();\n $ouroffers = ouroffers::all();\n $ouroffers = OurOffersResource::collection($ouroffers);\n $ouroffersArr = $ouroffers->toArray($ouroffers);\n //dd($ouroffersArr);\n $allArr = [];\n foreach($ouroffersArr as $items){\n foreach($items as $ouroffer){\n $allArr[] = $ouroffer;\n }\n }\n //dd($allArr);\n\n return $this->setCode(200)->setData($allArr)->send();\n\n }", "title": "" }, { "docid": "f7f2ff05bb1a51f4b22d534004d7db02", "score": "0.4596203", "text": "public function index(Request $request)\n {\n $vouchers= Voucher::where(function($query) use ($request) {\n \n if (($term = $request->get('term'))) {\n\n $query->orWhere('dep_id','like','%' . $term . '%');\n // $query->orWhere('bacprno','like','%' . $term . '%');\n $query->orWhere('pboobrno','like','%' . $term . '%');\n $query->orWhere('pboacctcode','like','%' . $term . '%');\n\n }\n })\n \n ->orderBy('id', 'desc')\n ->where('is_released','<>','1')\n ->paginate(5);\n\n //$prs = PurchaseRequest::orderBy('id', 'desc')->paginate(4);\n return view('budget.vouchers.index', compact('vouchers'));\n }", "title": "" }, { "docid": "34c3c1ee60e1b784061e5ffd150a6aa2", "score": "0.45873955", "text": "public function voucherpaymentemail(Request $request)\n {\n\n //////vouchertemplate\n\n //agency detal get\n\n $payment_booking = DB::table('payment')->where('id', '=', $_POST['bookingid'])->get();\n\n $guest = unserialize($payment_booking[0]->guest);\n\n $Servicename = '';\n\n $Servicetype = '';\n\n $MealBasis = '';\n\n $ServiceAddress = '';\n\n $RoomServiceType = '';\n\n $NoRooms = '';\n\n $Child = '';\n\n $Desitination = '';\n\n $starCategory = '';\n\n $Reservationstatus = '';\n\n $GuestName = '';\n\n $NoAdult = '';\n\n $Infants = '';\n\n $PoliciesDetails = '';\n\n if ($payment_booking[0]->supplier == 'travelanda') {\n $getBookingDetails = $this->getBookingDetails($payment_booking[0]);\n\n $Gethotelresponse = HotelApiController::Gethotelresponse($payment_booking[0]->hotelid);\n\n $Description = '';\n\n if (isset($Gethotelresponse->Body->Hotels->Hotel->Description)) {\n $Description = $Gethotelresponse->Body->Hotels->Hotel->Description;\n }\n\n if (isset($getBookingDetails->Body->Bookings)) {\n foreach ($getBookingDetails->Body->Bookings->HotelBooking as $HotelBooking) {\n if ($payment_booking[0]->BookingReference == $HotelBooking->BookingReference) {\n $bo = 1;\n\n if (isset($HotelBooking->Policies->Policy)) {\n $PoliciesDetails .= $Description;\n\n $PoliciesDetails .= '<div class=\"\" style=\"margin-bottom: 5px;\"><span> </span> You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.</div>';\n\n foreach ($HotelBooking->Policies->Policy as $Policy) {\n if ($Policy->Type == 'Percentage') {\n $PoliciesDetails .= '<div class=\"\" style=\"margin-bottom: 5px;\"><span></span> If you will cancel the booking after <b>'.$Policy->From.'</b> then you should pay <b'.$Policy->Value.'% </b> penalty for this booking.</div>';\n }\n\n if ($Policy->Type == 'Amount') {\n $PoliciesDetails .= ' <div class=\"\" style=\"margin-bottom: 5px;\"><span> </span> If you will cancel the booking after <b>'.$Policy->From.'</b> then you should pay $ <b>'.$Policy->Value.'</b> penalty for this booking.</div>';\n }\n\n if ($Policy->Type == 'Nights') {\n $PoliciesDetails .= '<div class=\"\" style=\"margin-bottom: 5px;\"><span></span> If you will cancel the booking after <b>'.$Policy->From.'</b> then you should pay <b>'.$Policy->Value.'</b> night price penalty for this booking.</div>';\n }\n\n ++$bo;\n }\n }\n\n // echo '<pre>';\n\n //print_r($payment_booking);\n\n // print_r($HotelBooking);\n\n //echo '</pre>';\n\n /*echo '<pre>';\n\n print_r($guest);\n\n echo '</pre>';*/\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n foreach ($guest as $guestDetails) {\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'</p>';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'</p>';\n }\n }\n }\n\n $RoomName = '';\n\n $NumAdults = '';\n\n $NumChildren = '';\n\n $room = 0;\n\n foreach ($HotelBooking->Rooms->Room as $roomDetails) {\n $RoomName = $roomDetails->RoomName;\n\n $NumAdults += $roomDetails->NumAdults;\n\n $NumChildren += $roomDetails->NumChildren;\n\n ++$room;\n }\n\n $Servicename = $HotelBooking->HotelName;\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $HotelBooking->BoardType;\n\n $ServiceAddress = $HotelBooking->City;\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $room;\n\n $Child = $NumChildren;\n\n $Desitination = $HotelBooking->City;\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n }\n }\n }\n\n if ($payment_booking[0]->supplier == 'tbo') {\n $getBookingDetails = $this->tbobboking_details($payment_booking[0]->BookingReference);\n\n $tboHolidaysHotelDetails = HotelApiController::tboHolidaysHotelDetails($payment_booking[0]->hotelid);\n\n /*\techo '<pre>';\n\n print_r($tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description']);\n\n echo '</pre>';*/\n\n $RoomName = '';\n\n if (!empty($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'])) {\n for ($r = 0; $r < $payment_booking[0]->no_of_room; ++$r) {\n $RoomName .= '<p>'.$getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'][$r]['RoomName'].'</p>';\n }\n }\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n $NumAdults = 0;\n\n $NumChildren = 0;\n\n foreach ($guest as $guestDetails) {\n $NumAdults += $guestDetails['adult'];\n\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'</p>';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n $NumChildren += $guestDetails['child'];\n\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '<p style=\"margin:0;\">'.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'</p>';\n }\n }\n }\n\n $PoliciesDetails .= $tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description'];\n\n $PoliciesDetails .= '<div class=\"\"><span> </span> You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.</div>';\n\n $attr = '@attributes';\n\n $bo = 1;\n\n if (isset($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'][0])) {\n foreach ($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'] as $Policy) {\n if ($Policy[$attr]['ChargeType'] == 'Fixed') {\n $PoliciesDetails .= '<div class=\"\">If you will cancel the booking <b>'.$Policy[$attr]['FromDate'].'</b> to <b>'.$Policy[$attr]['ToDate'].'</b> then you should pay '.$Policy[$attr]['Currency'].''.$Policy[$attr]['CancellationCharge'].' penalty for this booking</div>';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Percentage') {\n $PoliciesDetails .= '<div class=\"\"><span>If you will cancel the booking <b>'.$Policy[$attr]['FromDate'].' </b> to <b>'.$Policy[$attr]['ToDate'].'</b> then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking</div>';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Night') {\n $PoliciesDetails .= '<div class=\"\"><span>If you will cancel the booking <b>'.$Policy[$attr]['FromDate'].' </b> to <b>'.$Policy[$attr]['ToDate'].'</b> then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking</div>';\n }\n\n ++$bo;\n }\n }\n\n $Servicename = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $ServiceAddress = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['AddressLine1'];\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $payment_booking[0]->no_of_room;\n\n $Child = ''; //$NumChildren;\n\n $Desitination = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['City'];\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n\n $name = '';\n\n $address = '';\n\n $city = '';\n\n $country = '';\n\n if ($payment_booking[0]->user_type == 'AgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '<pre>';\n\n print_r($agency);\n\n echo '</pre>';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'SubAgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '<pre>';\n\n print_r($agency);\n\n echo '</pre>';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'UserInfo') {\n $userinformation = DB::table('userinformation')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '<pre>';\n\n print_r($userinformation);\n\n echo '</pre>';*/\n\n $name = $userinformation[0]->name;\n\n $address = $userinformation[0]->email;\n\n $city = $userinformation[0]->phone;\n }\n\n /*echo '<pre>';\n\n print_r($guest[0]['firstname'][1]);\n\n echo '</pre>';*/\n\n $date1 = date_create($payment_booking[0]->checkin);\n\n $date2 = date_create($payment_booking[0]->checkout);\n\n $diff = date_diff($date1, $date2);\n\n $daycount = $diff->days;\n\n $tempalte = '<!DOCTYPE html>\n\t\t\t\t\t\n\t\t\t\t\t<html>\n\t\t\t\t\t\n\t\t\t\t\t<head>\n\t\t\t\t\t\n\t\t\t\t\t<meta charset=\"UTF-8\">\n\t\t\t\t\t\n\t\t\t\t\t<title>Voucher</title>\n\t\t\t\t\t\n\t\t\t\t\t</head>\n\t\t\t\t\t\n\t\t\t\t\t<link href=\"https://fonts.googleapis.com/css?family=Roboto:300,400,500\" rel=\"stylesheet\">\n\t\t\t\t\t\n\t\t\t\t\t<body style=\"font-family: \"Roboto\", sans-serif;background:#f0f4f5;font-size:13px;color:#6e6963\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"container\" style=\"max-width:900px;margin:auto;\">\n\t\t\t\t\t\n\t\t\t\t\t\t<div id=\"outprint\">\n\t\t\t\t\t\n\t\t\t\t\t\t <header style=\"font-size: 14px; font-weight: 500;background: #036292;text-align: center;color: #ffffff;text-transform: uppercase;padding: 10px;\"> Please Present this voucher upon arrival </header>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"below-header\" style=\"padding:20px;background:#ffffff;margin-bottom:20px;border:1px solid #e2e2e2;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"logo-invoice-details\" style=\" margin-bottom:10px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"logo\" style=\"padding-top:20px;width: 50%;float: left;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<img src=\"'.asset('img/logo_default_dark.png').'\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"l-invoice-details\" style=\"width: 50%;float: right;text-align: right;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<h1 style=\"margin-top: 0;font-size: 30px;margin-bottom:10px;\"><span style=\"font-weight:300;\">Service</span> Voucher</h1>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p style=\"margin:0;\">'.$name.'</p>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<address style=\" width: 150px;margin-left: auto;font-style: normal;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$address.', '.$city.', '.$country.'.\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</address>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div style=\"display:table;clear:both;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"booking-information\" style=\"position:relative;margin-bottom:10px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"booking-information-left\" style=\"width:65%;float:left\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"booking-information-left-header\" style=\" border: 1px solid #eceeeb;\n\t\t\t\t\t\n\t\t\t\t\t\tborder-bottom: none; padding: 10px; background: #f7f9f8;font-weight: 500;font-size: 14px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tBooking Information\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t <table style=\"width: 100%;text-align: left;border-collapse: collapse;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Voucher No</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">LBVN'.$payment_booking[0]->hotelid.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">LB REF No</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">LBHR'.$payment_booking[0]->hotelid.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Supplier Ref No</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$payment_booking[0]->id.$payment_booking[0]->hotelid.$payment_booking[0]->login_id.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Re-confirmation No/Msg</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$payment_booking[0]->login_id.$payment_booking[0]->hotelid.$payment_booking[0]->id.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Lead Name</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$guest[0]['firstname'][1].''.$guest[0]['lastname'][1].'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;\">Issued on</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.date('d/M/Y, D', strtotime($payment_booking[0]->bookingdate)).'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t </table>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"booking-information-right\" style=\" width: 35%;float: left;position: absolute;height: 100%;right: 0;top: 0;\">\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"booking-information-right-top\" style=\" height: calc(100% - 38px);position: relative;top: 0;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"booking-information-right-top-left\" style=\"float:left; width: 50%;height: 100%;background: #f38321;color: #ffffff;text-align: center;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-top: 0;font-size: 14px;padding-top: 40px;\">Check In</p>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<h1 style=\" font-size: 46px;margin: 0;margin-bottom: 12px;\">'.date('d', strtotime($payment_booking[0]->checkin)).'</h1>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<i style=\"display:block;margin-bottom: 7px;\">'.date('M', strtotime($payment_booking[0]->checkin)).', '.date('Y', strtotime($payment_booking[0]->checkin)).'</i>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<i>'.date('D', strtotime($payment_booking[0]->checkin)).'</i>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t <div class=\"booking-information-right-top-left\" style=\"float:left;width: 50%;height: 100%;background: #38a4ff;color: #ffffff;text-align: center;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<p style=\"margin-top: 0;font-size: 14px;padding-top: 40px;\">Check Out</p>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<h1 style=\" font-size: 46px;margin: 0;margin-bottom: 12px;\">'.date('d', strtotime($payment_booking[0]->checkout)).'</h1>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<i style=\"display:block;margin-bottom: 7px;\">'.date('M', strtotime($payment_booking[0]->checkout)).', '.date('Y', strtotime($payment_booking[0]->checkout)).'</i>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<i>'.date('D', strtotime($payment_booking[0]->checkout)).'</i>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"booking-information-right-bottom\" style=\" background: #e4293e;color: #ffffff;text-align: center;font-size: 32px;\n\t\t\t\t\t\n\t\t\t\t\t\tfont-weight: 600;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t'.$daycount.' Nights\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t <div style=\"display:table;clear:both;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"accomodation-details\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"booking-information-left-header\" style=\" border: 1px solid #eceeeb;\n\t\t\t\t\t\n\t\t\t\t\t\tborder-bottom: none; padding: 10px; background: #f7f9f8;font-weight: 500;font-size: 14px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAccomodation Details\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"accomodation-left-right\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"accomodation-left\" style=\"width:50%;float:left;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<table style=\"width: 100%;text-align: left;border-collapse: collapse;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%; \">Servicename</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Servicename.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Service Type </th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Servicetype.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Meal Basis </th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$MealBasis.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Service Address</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$ServiceAddress.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">RoomService Type</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$RoomServiceType.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">No Rooms</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$NoRooms.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t </table>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"accomodation-right\" style=\"width:50%;float:left;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t<table style=\"width: 100%;text-align: left;border-collapse: collapse;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Child </th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Child.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Desitination</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Desitination.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Reservation Status</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Reservationstatus.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">NoAdult</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$NoAdult.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Infants</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$Infants.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<th style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 400;width:35%;\">Guest Name</th>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<td style=\"padding: 10px;border: 1px solid #eceeeb;font-weight: 600;text-align: left;\">'.$GuestName.'</td>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t </table>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t <div style=\"display:table;clear:both;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"importantnotes\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"booking-information-left-header\" style=\" border: 1px solid #eceeeb;\n\t\t\t\t\t\n\t\t\t\t\t\tborder-bottom: none; padding: 10px; background: #f7f9f8;font-weight: 500;font-size: 14px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tImportant Notes\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div style=\"border:1px solid #eceeeb;padding:20px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t'.$PoliciesDetails.'\n\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"map\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h1>Hotel Map</h1>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<img style=\"width:100%\" src=\"'.asset('img/map.jpg').'\">\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div id=\"map\"></div>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t\t </div> \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t</body>\n\t\t\t\t\t\n\t\t\t\t\t</html>';\n\n $mail = $tempalte;\n\n $to = $payment_booking[0]->email;\n\n $subject = 'Booking Voucher';\n\n $message = $mail;\n\n $headers = \"From: B2B project<admin@livebeds.com>\\r\\n\";\n\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n mail($to,$subject,$message,$headers);\n }", "title": "" }, { "docid": "027153c383160e2e9e3efc321f79e2b2", "score": "0.4585479", "text": "function generate(Collection $collection, $code = null, $quota = null);", "title": "" }, { "docid": "323a5921b64f12f2a9dfa292ee08c266", "score": "0.4577593", "text": "private function __generateData() {\n\t\t$this->__logMessage('Generating test data');\n\t\t$this->__pushLogIndent();\n\n\t\t$totalMembersToGenerate = 200;\n\t\t$membersRemaining = $totalMembersToGenerate;\n\n\t\t$genDetails = array();\n\n\t\t// Half the members should be current members\n\t\t$genDetails[Status::CURRENT_MEMBER] = $this->__distribureMembers($membersRemaining, 2);\n\n\t\t// 1/3rd of the remaining members should be ex members\n\t\t$genDetails[Status::EX_MEMBER] = $this->__distribureMembers($membersRemaining, 3);\n\n\t\t// Distribute the rest of the members evenly over the other statuses\n\t\t$toAssign = (int)floor($membersRemaining / 4);\n\n\t\t$genDetails[Status::PROSPECTIVE_MEMBER] = $toAssign;\n\t\t$genDetails[Status::PRE_MEMBER_1] = $toAssign;\n\t\t$genDetails[Status::PRE_MEMBER_2] = $toAssign;\n\t\t$genDetails[Status::PRE_MEMBER_3] = $toAssign;\n\n\t\t$membersRemaining -= ($toAssign * 4);\n\n\t\t// Any left? Make them current members\n\t\t$genDetails[Status::CURRENT_MEMBER] += $membersRemaining;\n\n\t\t$this->__logMessage(\"Generating data for $totalMembersToGenerate members.\");\n\n\t\t// Generate!\n\t\t$dataGenerator = new DataGenerator();\n\t\tforeach ($genDetails as $status => $num) {\n\t\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t\t$dataGenerator->generateMember($status);\n\t\t\t}\n\t\t}\n\n\t\t// Finally generate the dev user\n\t\t$details = array(\n\t\t\t'firstname' => $this->__firstname,\n\t\t\t'surname' => $this->__surname,\n\t\t\t'email' => $this->__email,\n\t\t\t'username' => $this->__username,\n\t\t\t'groups' => array(\n\t\t\t\tGroup::CURRENT_MEMBERS, Group::FULL_ACCESS, Group::MEMBERSHIP_ADMIN,\n\t\t\t),\n\t\t);\n\t\t$dataGenerator->generateMember(Status::CURRENT_MEMBER, $details);\n\n\t\t// Generate some subscriptions\n\t\t$memberData = $dataGenerator->getMembersData();\n\n\t\t$memberEmails = array_map(function ($data) {\n\t\t\treturn $data['email'];\n\t\t}, $memberData);\n\n\t\t$emailGenerator = new emailGenerator();\n\t\t$randomEmails = array();\n\t\tfor ($i = 0; $i < 50; $i++) {\n\t\t\tarray_push($randomEmails, $emailGenerator->generate());\n\t\t}\n\t\t$allEmails = array_merge($memberEmails, $randomEmails);\n\n\t\t$mailingListDataGenerator = new MailingListDataGenerator();\n\t\tforeach ($mailingListDataGenerator->getMailingListsData() as $list) {\n\t\t\t$numToAdd = rand(10, 30);\n\t\t\tfor ($i = 0; $i < $numToAdd; $i++) {\n\t\t\t\t$timestamp = rand(strtotime('last year'), time());\n\t\t\t\t$email = $allEmails[array_rand($allEmails)];\n\t\t\t\t$mailingListDataGenerator->subscribeEmailToList($email, $list['id'], $timestamp);\n\t\t\t}\n\t\t}\n\n\t\t$this->__logMessage('Writing SQL files');\n\n\t\t$sqlData = array(\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/members_data.sql',\n\t\t\t\t'tableName' => 'members',\n\t\t\t\t'data' => $memberData,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/member_group_data.sql',\n\t\t\t\t'tableName' => 'member_group',\n\t\t\t\t'data' => $dataGenerator->getMembersGroupData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/account_data.sql',\n\t\t\t\t'tableName' => 'account',\n\t\t\t\t'data' => $dataGenerator->getAccountsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/pins_data.sql',\n\t\t\t\t'tableName' => 'pins',\n\t\t\t\t'data' => $dataGenerator->getPinsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/rfid_tags_data.sql',\n\t\t\t\t'tableName' => 'rfid_tags',\n\t\t\t\t'data' => $dataGenerator->getRfidTagsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/status_updates_data.sql',\n\t\t\t\t'tableName' => 'status_updates',\n\t\t\t\t'data' => $dataGenerator->getStatusUpdatesData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/mailinglists_data.development.sql',\n\t\t\t\t'tableName' => 'mailinglists',\n\t\t\t\t'data' => $mailingListDataGenerator->getMailingListsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/mailinglist_subscriptions_data.development.sql',\n\t\t\t\t'tableName' => 'mailinglist_subscriptions',\n\t\t\t\t'data' => $mailingListDataGenerator->getMailingListSubscriptionsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/hms_emails_data.development.sql',\n\t\t\t\t'tableName' => 'hms_emails',\n\t\t\t\t'data' => $dataGenerator->getEmailRecordData(),\n\t\t\t),\n array(\n 'filepath' => '../Sql/bank_transactions_data.sql',\n 'tableName' => 'bank_transactions',\n 'data' => $dataGenerator->getBankTransactionData(),\n ),\n array(\n 'filepath' => '../Sql/access_log_data.sql',\n 'tableName' => 'access_log',\n 'data' => $dataGenerator->getAccessLogData(),\n ),\n\t\t);\n\n\t\t$sqlWriter = new sqlWriter();\n\t\tforeach ($sqlData as $dataEntry) {\n\t\t\t$sqlString = $sqlWriter->writeInsert($dataEntry['tableName'], $dataEntry['data']);\n\t\t\t$path = $dataEntry['filepath'];\n\t\t\tif ($this->__writeToFile($path, $sqlString)) {\n\t\t\t\t$this->__logMessage(\"Wrote $path\");\n\t\t\t} else {\n\t\t\t\t$this->__logMessage(\"Failed to write $path\");\n\t\t\t\t$this->__popLogIndent();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n \n // TODO: write out csv files of records we can import into the bank transactions table\n \n $this->__writeDataCSV($dataGenerator->getBankCSVData());\n\n\t\t$this->__popLogIndent();\n\t\treturn true;\n\t}", "title": "" }, { "docid": "eb51ec8ce7192908a2077a5cad7d76b3", "score": "0.457343", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|unique:giftvouchers,name,NULL,id,deleted_at,NULL',\n 'code' => 'required',\n 'value' => 'required',\n 'quantity' => 'required',\n 'valid_from' => 'required',\n 'valid_to' => 'required',\n \n ])->validate();\n\n $count = $request->quantity;;\n $generatedGiftVoucherCode = array();\n $prefix = $request->code;\n $fromDate = date('d',strtotime($request->valid_from));\n $toDate = date('d',strtotime($request->valid_to));\n\n for ($i=1; $i <= $count; $i++) {\n $generatedGiftVoucherCode[] = \"NSP\" . trim($prefix) . $fromDate . $this->generateGiftVouchers(6) . $toDate;\n }\n\n $out = array_values($generatedGiftVoucherCode);\n $myJSON = json_encode($out);\n\n $giftvoucher = new Giftvoucher();\n $giftvoucher->name = $request->name;\n $giftvoucher->code = $myJSON;\n $giftvoucher->value = $request->value;\n $giftvoucher->qty = $request->quantity;\n $giftvoucher->valid_from = date('Y-m-d',strtotime($request->valid_from));\n $giftvoucher->valid_to = date('Y-m-d',strtotime($request->valid_to));\n $giftvoucher->remark = $request->remark;\n $giftvoucher->created_by = 0;\n $giftvoucher->updated_by = 0;\n $result = $giftvoucher->save();\n\n if ($result == true) {\n return Redirect::back()->with('success', 'Successfully created');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }", "title": "" }, { "docid": "bef1ed778c1e02dc62eb52aabc56ec76", "score": "0.45559847", "text": "public function getOwnOffers(){\n require('dbconnect.php');\n mysqli_select_db($connection, 'db_sharey');\n \n $query = \"SELECT o.*, p.pz_plz, p.pz_location, p.pz_plzID, t.tg_description AS tagDescription, t.tg_color AS tagColor, t.tg_tagID AS tagID \n FROM tbl_offer AS o \n JOIN tbl_tag AS t \n ON o.or_tagID = t.tg_tagID \n JOIN tbl_plz AS p \n ON o.or_plzID = p.pz_plzID \n WHERE o.or_ocID = \".$this->getUserID().\" AND o.or_active = true\n ORDER BY o.or_creationDate DESC;\";\n\n $res = mysqli_query($connection, $query);\n\n $offers = [];\n \n while(($data = mysqli_fetch_array($res)) != false){\n $offers[] = new Offer($data['or_active'], new DateTime($data['or_creationDate']), utf8_encode($data['or_description']), new DateTime($data['or_mhd']), $data['or_offerID'], $data['or_picture'], new PLZ(utf8_encode($data['pz_location']), $data['pz_plz'], $data['pz_plzID']), $data['or_report'], new Tag($data['tagColor'], utf8_encode($data['tagDescription']), $data['tagID']), utf8_encode($data['or_title']), $data['or_ocID']);\n }\n\n return $offers;\n }", "title": "" }, { "docid": "6730ca59ff15b5099ec57f9474996749", "score": "0.45557582", "text": "public function makeJSONforBooking(Request $request)\n {\n $dateStart=$request->dateStart;\n $dateEnd=$request->dateEnd;\n\n $diff = strtotime($dateEnd) - strtotime($dateStart);\n $json=[];\n\n if($diff>0)\n {\n $cars=$this->aveilibleCars($dateStart,$dateEnd);\n $models=array_keys($cars);\n $readyModels=[];\n $cene=[];\n\n foreach($models as $model)\n {\n $readyModels[$model]=TipoviAutomobilaModel::where('Model',$model)->first();\n $cene[$model]=$this->totalCost($model,$dateStart,$dateEnd);\n }\n\n \n // $json['cars']=$cars;\n $json['unique_models']=$models;\n $json['cene']=$cene;\n $json['podaci']=$readyModels;\n }\n else\n {\n $json['unique_models']=[];\n $json['cene']=[];\n $json['podaci']=[];\n }\n\n $paket=json_encode($json);\n \n return $paket;\n }", "title": "" }, { "docid": "a9f9022bda0d8043b770c2293b8b2f94", "score": "0.45538932", "text": "function volunteers()\n\t{\n\t\t$userInfo = $_SESSION['user'];\n\t\tif(!isset($userInfo))\n\t\t\tredirect('/hcdec/index');\n\t\tif(!in_array('manage_volunteers', $userInfo['roles']))\n\t\t\tredirect('/hcdec/myhcdec');\n\t\t\t# list the volunteers as rows in HTML table. parameters for\n\t\t# this request: $startDate, $endDate. if startDate is not\n\t\t# given, all volunteer requests are listed up thru endDate.\n\t\t# if endDate is not given, all volunteer requests are listed\n\t\t# period in one giant scrolling div. add format = html or csv\n\t\t# so we know which view to load\n\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t\n\t\t$criteria = array();\n\t\t$startDate = \"\";\n\t\tif(isset($arr['startDate']))\n\t\t{\n\t\t\t$criteria['startDate'] = $arr['startDate'];\n\t\t\t$startDate = $arr['startDate'];\n\t\t}\n\t\t\t\n\t\t$endDate = \"\";\n\t\tif(isset($arr['endDate']))\n\t\t{\n\t\t\t$criteria['endDate'] = $arr['endDate'];\n\t\t\t$endDate = $arr['endDate'];\n\t\t}\n\t\t\n\t\t$precinct = \"\";\n\t\tif(isset($arr['precinct']))\n\t\t{\n\t\t\t$criteria['precinct'] = $arr['precinct'];\n\t\t\t$precinct = $arr['precinct'];\n\t\t}\n\t\t\t\n\t\t# now look up volunteers\n\t\t$this->load->model('volunteers');\n\t\t#FIXME - change this to use start and end dates and precinct numbers\n\t\t$r = $this->volunteers->getVolunteersForCriteria($criteria);\n\t\tif($r['status'] == 'OK')\n\t\t{\n\t\t\tif(count($r['rows'])>0)\n\t\t\t{\n\t\t\t\t$params['volunteers'] = $r['rows'];\n\t\t\t\t$params['startDate'] = $startDate;\n\t\t\t\t$params['endDate'] = $endDate;\n\t\t\t\t$params['precinct'] = $precinct;\n\t\t\t\t$content = $this->load->view('hcdec_volunteers', $params, true);\n\t\t\t\t$p = array('user'=>$userInfo, 'content'=>$content);\n\t\t\t\t$this->load->view('public_template', $p);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# redirect to page that says 'no volunteers found in that range'\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# error page\n\t\t}\n\t}", "title": "" }, { "docid": "99786d56b343a9b3e3ea5e40686d53f1", "score": "0.45453182", "text": "public function index()\n {\n if (\\request('year')){\n\n $date = Verta::parse(\\request('year'));\n $from = $date->formatGregorian('Y-m-d');//getGregorian($date->year, $date->month, $date->day);\n\n\n $date2 = $date->addDays(365);\n $to = $date2->formatGregorian('Y-m-d');\n\n\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->paginate(\\request('size') ? \\request('size') : 30));\n\n }\n\n if (\\request('lastName')){\n\n $lastName = \\request('lastName');\n\n $date = verta(Carbon::now()->format('Y-m-d'));\n $date->month(1);\n $date->day(1);\n $from = $date->formatGregorian('Y-m-d');\n\n $date2 = $date->addDays(365);\n $to = $date2->formatGregorian('Y-m-d');\n\n\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->where('lastName' ,'LIKE', '%' . $lastName . '%')->paginate(\\request('size') ? \\request('size') : 30));\n\n }\n\n else\n {\n $date = verta(Carbon::now()->format('Y-m-d'));\n $date->month(1);\n $date->day(1);\n $from = $date->formatGregorian('Y-m-d');\n\n $date2 = $date->addDays(365);\n $to = $date2->formatGregorian('Y-m-d');\n\n\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->paginate(\\request('size') ? \\request('size'):30));\n\n }\n\n }", "title": "" }, { "docid": "8c8bc4eee5d1be97141dc54349031387", "score": "0.45416793", "text": "public function generateContract(){\n $users = DB::table('users')->get();\n $properties= DB::table('immovableproperty')->get();\n return view('auth.generateContract')->with('users',$users)->with('properties',$properties);\n }", "title": "" }, { "docid": "56d496c921d7f48df2b9d8224481e8b0", "score": "0.45380506", "text": "protected function createVertices()\n {\n foreach ($this->items as $itemId => $itemData) {\n $vertex = $this->graph->createVertex($itemId);\n $vertex->setAttribute('data', $itemData);\n }\n }", "title": "" }, { "docid": "3c2e8a3f416bb7e666e46ed3d31e1c31", "score": "0.45315677", "text": "public function create(Request $request)\n {\n $clinics = $this->clinicProfileRepository->all();\n return view('pemedic::admin.vouchers.create',compact('clinics','request'));\n }", "title": "" }, { "docid": "c0f7345bc7675e223331f837dda3b2a5", "score": "0.4531281", "text": "public function booking ()\n {\n $clients = $this->Client->find('all', array ('fields' => array ('Client.id', 'Client.name')));\n $this->set(array('clients'),array($clients));\n }", "title": "" }, { "docid": "10dcf4a14027142fc33a8f1a2f872ac4", "score": "0.45308638", "text": "public function productLicenses(Varien_Event_Observer $observer)\n {\n $event = $observer->getEvent();\n $order = $event->getInvoice()->getOrder();\n $invoice = $observer->getEvent()->getInvoice();\n switch ($invoice->getState()) {\n \tcase Mage_Sales_Model_Order_Invoice::STATE_PAID :\n \t $customerId = $invoice->getCustomerId();\n \t $orderId = $order->getIncrementId();\n \t $storeId = $invoice->getStoreId();\n \t $items = $invoice->getAllItems();\n \t $model = Mage::getModel('pyro_licenses/licenses');\n \t $emailData = array();\n \t \n \t foreach ($items as $item) {\n $product = Mage::getResourceModel('catalog/product')->getAttributeRawValue($item->getProductId(), 'license', $storeId);\n if (!$product) {\n continue; \n }\n \n $qty = (int) $item->getQty();\n $productId = $item->getProductId();\n $collection = $model->getCollection()->getAvailableLicenses();\n $collection->getSelect()->limit($qty);\n \n $emailData[$productId] = array(\n \t 'product' => $item,\n );\n \n foreach ($collection as $item) {\n $qty--;\n $item->setStatus(Pyro_Licenses_Model_Licenses::STATUS_ENABLED);\n $item->setCustomerId($customerId);\n $item->setProductId($productId);\n $item->setOrderId($orderId);\n $item->save();\n\n $emailData[$productId]['licenses'][] = $item->getLicenseKey();\n }\n \n // If there are no licenses in database generate for the remaining quantity \n if ($qty > 0) {\n for($i = 1; $i <= $qty; $i++) {\n $item = Mage::getModel('pyro_licenses/licenses');\n $licenseKey = Mage::helper('pyro_licenses/generate')->license();\n $item->setStatus(Pyro_Licenses_Model_Licenses::STATUS_ENABLED);\n $item->setCustomerId($customerId);\n $item->setProductId($productId);\n $item->setOrderId($orderId);\n $item->setLicenseKey($licenseKey);\n $item->save();\n $emailData[$productId]['licenses'][] = $licenseKey;\n }\n } \n \t }\n\n \t if(count($emailData)) {\n \t $this->sendLicensesMail($order, $emailData);\n \t }\n \t break;\n }\n \n return $this;\n }", "title": "" }, { "docid": "f159d527a90fc5f638c60e8edb8e298f", "score": "0.45285237", "text": "function get_cdrs_retail_customer($icustomer, $from_date, $to_date, $iteracion, $cantidad) {\n try { \n if ($iteracion==1) {\n $cdrs_list_info = new SoapClient($this->wsdl_url_customer);\n $cdrs_list_info->__setSoapHeaders($this->auth_info);\n $this->cdrs_list_info = $cdrs_list_info;\n }\n \n // Se extraen como maximo los primeros 3000 CDRS por factura (para un cliente y un rango de fechas), \n // dado que al intentar sacar mas se obtiene error del SOAP\n $GetCustomerXDRsRequest_info = array('offset' => ($cantidad==0 ? 0 : (3000*$cantidad)), \n 'limit' => 3000, \n 'from_date' => $from_date . ' 00:00:00', 'to_date' => $to_date . ' 23:59:59',\n 'i_customer' => $icustomer);\n \n if ($GetCustomerXDRsRequest_info) {\n \n if ($iteracion==1) {\n $cdrs_list_response = $cdrs_list_info->get_customer_xdrs($GetCustomerXDRsRequest_info);\n } else {\n $cdrs_list_response = $this->cdrs_list_info->get_customer_xdrs($GetCustomerXDRsRequest_info);\n }\n\n if($cdrs_list_response){\n $this->xdr_list = $cdrs_list_response->xdr_list;\n return $resp = true; \n }else{\n \t$this->xdr_list = \"\";\n return $resp = false;\n }\n }else{\n return $resp = false;\n }\n } catch (SoapFault $exception) { } \n }", "title": "" } ]
c536d2a82ffe6fcdc0049f91208cd188
Gets the instance of the View
[ { "docid": "4745e282952c35d8df19a7b0e2e2c3b7", "score": "0.0", "text": "public static function getInstance(){\n if( self::$instance === null ){\n self::$instance = new self();\n }\n return self::$instance;\n }", "title": "" } ]
[ { "docid": "bb5dea0ff81a828fe32385dfa5878532", "score": "0.8054523", "text": "protected function _view()\n {\n if (!$this->_view) {\n $this->_view = \\Core\\View::getInstance();\n }\n return $this->_view;\n }", "title": "" }, { "docid": "fbd89f00eb5efadb2c0d86ad3bb354cf", "score": "0.7703845", "text": "public function get_view()\n {\n return $this->viewObject;\n }", "title": "" }, { "docid": "9f5fa9ff451975361c98e6d9d190f91c", "score": "0.74205935", "text": "public function getView() {\n return $this->_view;\n }", "title": "" }, { "docid": "0506d377e89717fac1cf759fb17cc6ab", "score": "0.7410825", "text": "public function getView()\n\t{\n\t\treturn $this->_view;\n\t}", "title": "" }, { "docid": "d33478676a508223afe87b2d331a537f", "score": "0.7409056", "text": "function getView()\n\t{\n\t\treturn $this->view;\n\t}", "title": "" }, { "docid": "d33478676a508223afe87b2d331a537f", "score": "0.7409056", "text": "function getView()\n\t{\n\t\treturn $this->view;\n\t}", "title": "" }, { "docid": "9e902b69bd9d0fc70d715d095077b43f", "score": "0.736638", "text": "public function getView()\n {\n if ($this->_view === null) {\n $this->setView(self::getDefaultView());\n }\n\n return $this->_view;\n }", "title": "" }, { "docid": "a49bf11ff5d291eba44a988c924ee553", "score": "0.7335811", "text": "public function getView()\n\t\t{\n\t\t\treturn $this->view;\n\t\t}", "title": "" }, { "docid": "519d14f016149c629d28a468a480ff86", "score": "0.73338956", "text": "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "title": "" }, { "docid": "1c3f9b916f9284530b43607cc2758fce", "score": "0.732308", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "78f49a455e5abedcb8aed3565645bdb4", "score": "0.7303139", "text": "public function getView()\r\n {\r\n return parent::getView();\r\n }", "title": "" }, { "docid": "78f49a455e5abedcb8aed3565645bdb4", "score": "0.7303139", "text": "public function getView()\r\n {\r\n return parent::getView();\r\n }", "title": "" }, { "docid": "5d4d17bace5ec84ce3fec5215f354685", "score": "0.7292293", "text": "protected function View() {\n return $this->view;\n }", "title": "" }, { "docid": "bd48a571c827118db0ab14dac4415730", "score": "0.7283091", "text": "public function getView() {\n return $this->view;\n }", "title": "" }, { "docid": "3146a9a8d15396390160913dfb1ffb61", "score": "0.7282899", "text": "protected function getView() {\n return $this->_View; // cake 2.0\n }", "title": "" }, { "docid": "43acf694d614c6dbb66f36a18c65fc10", "score": "0.7280747", "text": "public function getView() {\r\n\t\treturn $this->oView;\r\n\t}", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "19f982ca42f62383da44a9422ae3ffb4", "score": "0.72737586", "text": "public function getView()\n {\n return $this->view;\n }", "title": "" }, { "docid": "e75b2297246bc50f4bc4495fff01353a", "score": "0.72227794", "text": "public function getView() {}", "title": "" }, { "docid": "e5d849980fb1aade5ba3e40dce1ce414", "score": "0.72033817", "text": "public function getView() {\n\t\treturn $this->getController()->view;\n\t}", "title": "" }, { "docid": "9dd9b5e377b35d34bdf5066e7ac58bb9", "score": "0.7173682", "text": "public function getView() {\n if (null === $this->view) {\n require_once 'Zend/Controller/Action/HelperBroker.php';\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $this->setView(clone($viewRenderer->view));\n }\n\n return $this->view;\n }", "title": "" }, { "docid": "63669b927c3a281d011194547b988977", "score": "0.7105985", "text": "public function getView() {\n\t\tif (null === $this->_view) {\n\t\t\trequire_once 'Zend/Controller/Action/HelperBroker.php';\n\t\t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'viewRenderer' );\n\t\t\t$this->setView ( $viewRenderer->view );\n\t\t}\n\t\treturn $this->_view;\n\t}", "title": "" }, { "docid": "7452264c3c38ab7a52591352dcf901e3", "score": "0.69906354", "text": "public function getView() {\n return $this->view['object'];\n }", "title": "" }, { "docid": "7a8012ee2cc5a556b54b79bcc8fa08e5", "score": "0.6960877", "text": "public function getView()\n\t{\n\t\tif (null === $this->_view) {\n\t\t\trequire_once 'Zend/Controller/Action/HelperBroker.php';\n\t\t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n\t\t\t$this->setView($viewRenderer->view);\n\t\t}\n\n\t\treturn $this->_view;\n\t}", "title": "" }, { "docid": "3143925c06b13aa4d08d0177db9f3be5", "score": "0.687225", "text": "public function view()\n {\n return $this->view;\n }", "title": "" }, { "docid": "3143925c06b13aa4d08d0177db9f3be5", "score": "0.687225", "text": "public function view()\n {\n return $this->view;\n }", "title": "" }, { "docid": "40e089036d124c201919d5492e0addef", "score": "0.68645835", "text": "public function getView();", "title": "" }, { "docid": "40e089036d124c201919d5492e0addef", "score": "0.68645835", "text": "public function getView();", "title": "" }, { "docid": "cdff618f2b9e3e55cd455386f1f71823", "score": "0.68439883", "text": "public function getView ();", "title": "" }, { "docid": "ee916e56fe89a7b4d726bfc682e089a4", "score": "0.6816027", "text": "public function get_view() {\n if (!isset($this->view)) {\n return false;\n }\n return $this->view;\n }", "title": "" }, { "docid": "2bf48425882c1fa74aa628142e2a9d91", "score": "0.6811174", "text": "public function getMainView() {}", "title": "" }, { "docid": "8bf43bf6ad7b2c0ecc3e8ecdda78e19b", "score": "0.67661375", "text": "function getView();", "title": "" }, { "docid": "179ef66c3eac5b7da5cb6f170ae206dc", "score": "0.6732854", "text": "public function getView()\n {\n // TODO: Implement getView() method.\n }", "title": "" }, { "docid": "6a6e3d6b36be75af1b23bf7941358d29", "score": "0.6710661", "text": "public function getView()\n\t{\n\t\tif (null === $this->_view) {\n\t\t\t$this->_view = Zend_Layout::getMvcInstance()->getView();\n\t\t}\n\t\treturn $this->_view;\n\t}", "title": "" }, { "docid": "c04439c86f757c3b1528e2cbc41908e6", "score": "0.6648896", "text": "protected static function getView()\n {\n return null;\n }", "title": "" }, { "docid": "6578ac5a30a632900edc50e0e03a6f6b", "score": "0.6644731", "text": "function __construct() \n {\n $this->view = new View(); \n }", "title": "" }, { "docid": "3c32d4f0af41e5d5bac5436ed9e8c01b", "score": "0.66267097", "text": "public function __construct(){\n $this->view = new View();\n }", "title": "" }, { "docid": "85dbb6f69ad627f5b16eca9931cbb669", "score": "0.66258335", "text": "protected function view()\n {\n if (!$this->view) {\n $this->view = debug_backtrace();\n $this->view = basename($this->view[2]['file'], '.php');\n }\n return $this;\n }", "title": "" }, { "docid": "f6a60b9b73a3a5a540db4d1ed9a5903f", "score": "0.661566", "text": "public function getView()\n {\n return $this->app->getView();\n }", "title": "" }, { "docid": "705f3a1ca83b56eefacfb7d006074b37", "score": "0.65716636", "text": "abstract public function getView();", "title": "" }, { "docid": "705f3a1ca83b56eefacfb7d006074b37", "score": "0.65716636", "text": "abstract public function getView();", "title": "" }, { "docid": "3a9954f4f773179544cda45ac3e0eac5", "score": "0.6521006", "text": "public function __construct()\n {\n $this->view = new View();\n }", "title": "" }, { "docid": "23c25a027c85ee97f1edaf259d63a793", "score": "0.6468614", "text": "protected function getView($page) {\n\t\trequire_once('View.php');\n\t\treturn new View($page);\n\t}", "title": "" }, { "docid": "7f3a9691a4be86b79a9b1b3bbb843bdf", "score": "0.6444031", "text": "public function toView() {\n $this->_initViewResponse();\n $this->_initViewLayout();\n\n return $this->_view;\n }", "title": "" }, { "docid": "b6695b7c2ee146d2bc081946ec443464", "score": "0.6433773", "text": "public function getView()\n {\n if (is_null($this->_view)) {\n $controller = $this->_routeInfo->controllerName;\n $name = $this->_routeInfo->action;\n $ext = $this->_routeInfo->getExtension();\n $template = \"{$controller}/{$name}.{$ext}.twig\";\n if (!is_null($this->_controller->view)) {\n $template = \"{$this->_controller->view}.{$ext}.twig\";\n }\n $this->_view = new View(['file' => $template]);\n }\n return $this->_view;\n }", "title": "" }, { "docid": "2a9d6a9d820cf8648ed9eca842b3d85a", "score": "0.6343339", "text": "public function getView(): ?Factory;", "title": "" }, { "docid": "3f5b22648eb0403c2921d31cf3a02d43", "score": "0.63312644", "text": "public function getView()\n\t{\n\t\treturn $this->client->getView();\n\t}", "title": "" }, { "docid": "3b5c83bfaae12ed928f527bfbad267cf", "score": "0.63256276", "text": "public function __construct() {\n\t\t$this->_view = new View (new Request);\n\t}", "title": "" }, { "docid": "ef88c1c0cad422626561abf48fa5a253", "score": "0.63253736", "text": "public static function getContainer()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getContainer();\n }", "title": "" }, { "docid": "da7dd0ea0e6a8b0caf260feeba03ebf6", "score": "0.63183796", "text": "public function __construct() {\n\t\t$this->view = new view ( $this );\n\t}", "title": "" }, { "docid": "aee8d9b34b36c1ae97b9124ee6008f2c", "score": "0.6300965", "text": "public function __construct()\r\n\t\t{\r\n\t\t\t$this->view = new View();\r\n\t\t}", "title": "" }, { "docid": "6dc6ffbd2a313238940b7de0e81f6644", "score": "0.6253772", "text": "public function view()\n {\n return $this->di()->getViewRenderer();\n }", "title": "" }, { "docid": "7980113e8d481552285c7a8a76b1db4c", "score": "0.6232145", "text": "protected function getView()\n {\n $view = new StandaloneView($this->controllerContext->getRequest());\n if (is_file($this->settings['viewHelpers']['templates'][get_class($this)])) {\n $view->setPartialRootPath($this->settings['viewHelpers']['partialRootPath']);\n $view->setTemplatePathAndFilename($this->settings['viewHelpers']['templates'][get_class($this)]);\n }\n return $view;\n }", "title": "" }, { "docid": "bffc575dc68f6af68c3c211794d64717", "score": "0.62243724", "text": "public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}", "title": "" }, { "docid": "bb3727c934bc8b0aeb74fbcd4d768dca", "score": "0.6203977", "text": "private function generateViewObject() {\r\n if ($this->viewLoaded) {\r\n $this->view = new View($this);\r\n // create a global instance\r\n View::$instance = $this->view;\r\n // Check static permission\r\n if ($this->isStatic && !$this->view->__staticLoadAllowed) {\r\n $this->fatal('Error: Loading this page statically is denied.');\r\n }\r\n // Set the template: important\r\n $this->view->template = $this->template;\r\n // Pass data set from controller\r\n if (!empty($this->cData)) {\r\n foreach ($this->cData as $varName => $varValue) {\r\n $this->view->$varName = $varValue;\r\n }\r\n }\r\n } else {\r\n // Check if controller loaded\r\n if (!$this->controllerLoaded) {\r\n // Invalid request. report 404\r\n $this->fatal('Error 404 Page not found!');\r\n }\r\n// $this->debug(\"View Not Loaded\");\r\n }\r\n }", "title": "" }, { "docid": "5ba1a4a1576d73eb69a0cb1dbb638a41", "score": "0.61991656", "text": "public function create()\n {\n return $this->view();\n }", "title": "" }, { "docid": "468cb75db419e04ef9efd71dfd5ebee2", "score": "0.61809087", "text": "protected function getView():DomainView {\n if (!isset($this->relatedView)) {\n $this->relatedView = $this->relatedFactory->getView();\n }\n\n return $this->relatedView;\n }", "title": "" }, { "docid": "eace182e9db86a7c86b942b501bb7258", "score": "0.6174277", "text": "public function getFormView() \n {\n return $this->getForm()->createView();\n }", "title": "" }, { "docid": "e1d4aaea7c9a20be693a25a1272ed91f", "score": "0.6174222", "text": "protected function getView($view)\n\t{\n\t\treturn View::make($view, $this->viewBag);\n\t}", "title": "" }, { "docid": "4f754e934d45721eb532f7662d3c911f", "score": "0.6171902", "text": "public function set_view($view)\n {\n return $this;\n }", "title": "" }, { "docid": "31f503b03b4d48d4cbf1c4e01d2b385d", "score": "0.6117485", "text": "protected function getView()\n {\n $this->runtime_data->render = $this->view_instance->getView($this->token);\n\n if ($this->runtime_data->render->extension->title === $this->token->name) {\n } else {\n $this->token->name = $this->runtime_data->render->extension->title;\n }\n\n return $this;\n }", "title": "" }, { "docid": "eba5b91340156a8c743cae7158ae2a25", "score": "0.61069983", "text": "function view($view)\n {\n $this->view=$view;\n return $this;\n }", "title": "" }, { "docid": "c422907caead51de0518d9c3d726d8c2", "score": "0.60916716", "text": "function view() {\n return app()->view;\n }", "title": "" }, { "docid": "97e80a1e4eaded6a0e3b4be4a225b654", "score": "0.60743725", "text": "public function getView(){\n\t\treturn $this->getActionMapping()->getView();\n\t}", "title": "" }, { "docid": "b47feb43b462361562d06390c796bbd3", "score": "0.60576093", "text": "public function create()\n {\n return view();\n }", "title": "" }, { "docid": "b47feb43b462361562d06390c796bbd3", "score": "0.60576093", "text": "public function create()\n {\n return view();\n }", "title": "" }, { "docid": "3b0f0fb92715eb1e5eed5b9e7a70feb9", "score": "0.60313094", "text": "public function getInstance()\n {\n return $this->model;\n }", "title": "" }, { "docid": "840252dabc9e35a7d768ecf7f51254be", "score": "0.6030913", "text": "protected function resolveView()\n {\n $viewObjectName = self::JSON_VIEW;\n $view = $this->objectManager->get($viewObjectName);\n return $view;\n }", "title": "" }, { "docid": "6f5852a5598cd38581623afa9889392d", "score": "0.60291785", "text": "function views(): Views\n {\n return new Views;\n }", "title": "" }, { "docid": "f0226c87f54fe60d5ff27d05ec83f87f", "score": "0.60218847", "text": "public static function getShared()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getShared();\n }", "title": "" }, { "docid": "f4c2114abf23f6f8893e35590b9b6126", "score": "0.5982899", "text": "public function instance()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$editor = App::get('editor');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$editor = \\Hubzero\\Html\\Editor::getInstance('none');\n\t\t}\n\n\t\treturn $editor;\n\t}", "title": "" }, { "docid": "604d0e4e1a61c069f8c7dcc391542277", "score": "0.5959043", "text": "public function get()\n\t{\n\t\t// -----------------------------------------------------\n\t\t// Set the name of the last rendered view.\n\t\t// -----------------------------------------------------\n\t\tstatic::$last = $this->view;\n\n\t\t// -----------------------------------------------------\n\t\t// Get the content of all of the sub-views.\n\t\t// -----------------------------------------------------\n\t\tforeach ($this->data as &$data)\n\t\t{\n\t\t\tif ($data instanceof View or $data instanceof Response)\n\t\t\t{\n\t\t\t\t$data = (string) $data;\n\t\t\t}\n\t\t}\n\n\t\t// -----------------------------------------------------\n\t\t// Extract the view data into the local scope.\n\t\t// -----------------------------------------------------\n\t\textract($this->data, EXTR_SKIP);\n\n\t\t// -----------------------------------------------------\n\t\t// Start an output buffer to catch the content.\n\t\t// -----------------------------------------------------\n\t\tob_start();\n\n\t\t// -----------------------------------------------------\n\t\t// Echo the content of the view.\n\t\t// -----------------------------------------------------\n\t\techo eval('?>'.$this->content);\n\n\t\t// -----------------------------------------------------\n\t\t// Get the contents of the output buffer.\n\t\t// -----------------------------------------------------\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "823be81f46582e46d7f3242703cc1537", "score": "0.5945081", "text": "function asView() {\n $unique = spl_object_hash($this);\n $classname = \"QueryView{$unique}\";\n $class = <<<EOF\nclass {$classname} extends VerySimpleModel {\n static \\$meta = array(\n 'view' => true,\n );\n static \\$queryset;\n\n static function getQuery(\\$compiler) {\n return ' ('.static::\\$queryset->getQuery().') ';\n }\n\n static function getSqlAddParams(\\$compiler) {\n return static::\\$queryset->toSql(\\$compiler, self::\\$queryset->model);\n }\n}\nEOF;\n eval($class); // Ugh\n $classname::$queryset = $this;\n return $classname;\n }", "title": "" }, { "docid": "bd43f81adeff70f9505ebfdaf7f5614e", "score": "0.5940266", "text": "public function view()\n\t{\n\t\treturn View::make('request.request');\n\n }", "title": "" }, { "docid": "c1694a4dd5f0593eb143d564c39e0638", "score": "0.5938605", "text": "public function create()\n {\n return view($this->_config['view']);\n }", "title": "" }, { "docid": "5d59cec6a1eede654aadb47fadf46117", "score": "0.59267294", "text": "public static function instance(): WorkoutLogView {\n if (self::$instance === null) {\n self::$instance = new static();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "0f1e41722bf80238f5e276e12c0f8586", "score": "0.5924794", "text": "function dbGetView($viewClassname)\n {\n $view = new $viewClassname();\n if (!($view instanceof View)) {\n throw new Exception('Invalid view implementation by class: ' . $viewClassname);\n }\n $view->setDb($this);\n \n return $view;\n }", "title": "" }, { "docid": "6822e35e8a07f1aceca81256425210c5", "score": "0.59236676", "text": "public function getView($name)\n\t{\n\t\treturn $this->getClass('App\\\\Views\\\\' . ucfirst($name) . 'View');\n\t}", "title": "" }, { "docid": "1bf5935164ba3782194be1c3e17aefc4", "score": "0.5912308", "text": "public function superView(){\n\t\treturn $this->app->superApp()->view;\n\t}", "title": "" }, { "docid": "1f002c11d5f420a27d760f64407dcce3", "score": "0.5903931", "text": "public function view($view = NULL)\n {\n if ($view === NULL)\n {\n // Act as a getter\n return $this->view;\n }\n\n // Act as a setter\n $this->view = $view;\n\n return $this;\n }", "title": "" }, { "docid": "ba64eb656a1f68c487c0bcfa2744ff21", "score": "0.58948493", "text": "public function getViewClass(): string;", "title": "" }, { "docid": "196fa38b5d7b3d8ab5aeee34d5ce7c6f", "score": "0.5890229", "text": "public function cloneView()\n {\r\n \tif (!$this->_clone) {\r\n \t\t\r\n \t\treturn $this->view;\r\n \t}\r\n \t\n $view = clone $this->view;\n $view->clearVars();\n return $view;\n }", "title": "" }, { "docid": "0f26a34ef6fb26390d6bfcc898eea123", "score": "0.58639884", "text": "public function __invoke()\n {\n return view('app');\n }", "title": "" }, { "docid": "8d62b928fe7b6a3793f1f2c39daea48d", "score": "0.5837526", "text": "public function getView()\n {\n // Create the view\n $view = parent::getView();\n\n // Find out the value and force it to be true or false\n $value = $this->get('value', false) ? true : false;\n\n // we want to add the checked attribute if we can\n if ($value) {\n $attr = $this->get('attributes', array());\n $attr['checked'] = 'checked';\n $view->set('attributes', $attr);\n }\n\n // Always set the value in the checkbox control to 1\n $view->set('value', 1);\n\n // return it\n return $view;\n }", "title": "" }, { "docid": "a654911b5f2ceaed0fe3e4c51f3b5ba8", "score": "0.5836071", "text": "public function getResponseView()\n {\n return $this->response_view;\n }", "title": "" }, { "docid": "4eaf9e4e465e060cf060319bb8527063", "score": "0.58236575", "text": "protected function _initView() {\n $view = new Zend_View();\n $view->doctype('XHTML1_STRICT');\n\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\n $viewRenderer->setView($view);\n\n return $view;\n }", "title": "" }, { "docid": "a687ae8e8294fc6e4a570c2612444389", "score": "0.58047444", "text": "public function getInstance()\n {\n return $this;\n }", "title": "" }, { "docid": "c85a573e54c149fd73edfd053489fece", "score": "0.5798673", "text": "public static function make( $view = null, Context $context = null ) {\n\t\t$manager = tribe( Manager::class );\n\n\t\t$default_view = $manager->get_default_view();\n\t\tif (\n\t\t\tnull === $view\n\t\t\t|| 'default' === $view\n\t\t) {\n\t\t\t$view = $default_view;\n\t\t}\n\n\t\tlist( $view_slug, $view_class ) = $manager->get_view( $view );\n\n\t\t// When not found use the default view.\n\t\tif ( ! $view_class ) {\n\t\t\tlist( $view_slug, $view_class ) = $manager->get_view( $default_view );\n\t\t}\n\n\t\t// Make sure we are using Reflector when it fails\n\t\tif ( ! class_exists( $view_class ) ) {\n\t\t\tlist( $view_slug, $view_class ) = $manager->get_view( 'reflector' );\n\t\t}\n\n\t\tif ( ! self::$container instanceof Container ) {\n\t\t\t$message = 'The ' . __CLASS__ . '::$container property is not set: was the class initialized by the service provider?';\n\t\t\tthrow new \\RuntimeException( $message );\n\t\t}\n\n\t\t/**\n\t\t * Run an action before we start making a new View instance.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param string $view_class The current view class.\n\t\t * @param string $view_slug The current view slug.\n\t\t */\n\t\tdo_action( 'tribe_events_views_v2_before_make_view', $view_class, $view_slug );\n\n\t\t/** @var View_Interface $instance */\n\t\t$instance = self::$container->make( $view_class );\n\n\t\t$template = new Template( $instance );\n\n\t\t/**\n\t\t * Filters the Template object for a View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Template $template The template object for the View.\n\t\t * @param string $view_slug The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$template = apply_filters( 'tribe_events_views_v2_view_template', $template, $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the Template object for a specific View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Template $template The template object for the View.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$template = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_template\", $template, $instance );\n\n\t\t$instance->set_template( $template );\n\t\t$instance->set_slug( $view_slug );\n\t\t$instance->set_template_slug( $view_slug );\n\n\t\t// Let's set the View context from either the global context or the provided one.\n\t\t$view_context = null === $context ? tribe_context() : $context;\n\n\t\t/**\n\t\t * Filters the Context object for a View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Context $view_context The context abstraction object that will be passed to the view.\n\t\t * @param string $view The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_context = apply_filters( 'tribe_events_views_v2_view_context', $view_context, $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the Context object for a specific View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Context $view_context The context abstraction object that will be passed to the view.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_context = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_context\", $view_context, $instance );\n\n\t\t$instance->set_context( $view_context );\n\n\t\t// This code is coupled with the idea of viewing events: that's fine as Events are the default view content.\n\t\t$view_repository = tribe_events();\n\t\t$view_repository->order_by( 'event_date', 'ASC' );\n\n\t\t/**\n\t\t * Filters the Repository object for a View.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param \\Tribe__Repository__Interface $view_repository The repository instance the View will use.\n\t\t * @param string $view_slug The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_repository = apply_filters( 'tribe_events_views_v2_view_repository', $view_repository, $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the Repository object for a specific View.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param \\Tribe__Repository__Interface $view_repository The repository instance the View will use.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_repository = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_repository\", $view_repository, $instance );\n\n\t\t$instance->set_repository( $view_repository );\n\n\t\t/**\n\t\t * Filters the query arguments array for a View URL.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param array $query_args Arguments used to build the URL.\n\t\t * @param string $view_slug The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_url_query_args = apply_filters( 'tribe_events_views_v2_view_url_query_args', [], $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the query arguments array for a specific View URL.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param array $query_args Arguments used to build the URL.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_url_query_args = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_url_query_args\", $view_url_query_args, $instance );\n\n\t\t$instance->set_url( $view_url_query_args, true );\n\n\t\t/**\n\t\t * Run an action after we are done making a new View instance.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\tdo_action( 'tribe_events_views_v2_after_make_view', $instance );\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "798811018532dbb03e67ab14c284912b", "score": "0.5789599", "text": "public function getInstance()\n {\n return $this->instance;\n }", "title": "" }, { "docid": "798811018532dbb03e67ab14c284912b", "score": "0.5789599", "text": "public function getInstance()\n {\n return $this->instance;\n }", "title": "" }, { "docid": "798811018532dbb03e67ab14c284912b", "score": "0.5789599", "text": "public function getInstance()\n {\n return $this->instance;\n }", "title": "" }, { "docid": "9a68a2fb8efd8e04962d3d7183f4fcd0", "score": "0.5789537", "text": "protected function getContentInstance()\n {\n return $this;\n }", "title": "" }, { "docid": "3e364ab117fdc0d408c34ccad8409cbf", "score": "0.5783446", "text": "public static function instance() {\n\t\t\treturn tribe( self::class );\n\t\t}", "title": "" }, { "docid": "9e0ee738674261f8561874c1af1b2c80", "score": "0.57667357", "text": "public static function getDispatcher()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getDispatcher();\n }", "title": "" }, { "docid": "1d4bde6299402b8744a5b381189f416c", "score": "0.5758326", "text": "public function newPageView()\n {\n return new \\Racecore\\GATracking\\Tracking\\Pageview();\n }", "title": "" }, { "docid": "1f83c557dcea2273da015794d0675111", "score": "0.57576174", "text": "public static function instance() {\n\t\tif( ! self::$_instance ) {\n\t\t\tself::$_instance = new self();\n\t\t\tself::_add_actions();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "title": "" } ]
3c29a7ad437fe4613d19e59cc70077ad
Retrieves the raw result
[ { "docid": "970b3d66db82016bef6dde1f0a7dacea", "score": "0.8254048", "text": "function getRawResult()\n {\n return $this->_raw_result;\n }", "title": "" } ]
[ { "docid": "fee6ca042cb7b7a7534ccb393ed8e0ce", "score": "0.8654125", "text": "public function getRawResult();", "title": "" }, { "docid": "f060351cd064680258cf40af1011c87a", "score": "0.7553329", "text": "public function getRawResponse()\n {\n return $this->execute(false);\n }", "title": "" }, { "docid": "7266ed766ce3f05818f072be82ff0d1b", "score": "0.7162325", "text": "protected abstract function get_result();", "title": "" }, { "docid": "74422aab3c769e622944c25d8648d60b", "score": "0.71161485", "text": "public function getRaw();", "title": "" }, { "docid": "74422aab3c769e622944c25d8648d60b", "score": "0.71161485", "text": "public function getRaw();", "title": "" }, { "docid": "74422aab3c769e622944c25d8648d60b", "score": "0.71161485", "text": "public function getRaw();", "title": "" }, { "docid": "74422aab3c769e622944c25d8648d60b", "score": "0.71161485", "text": "public function getRaw();", "title": "" }, { "docid": "9ce3e19d04d2fc8b15486c273fd28b47", "score": "0.70984465", "text": "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "title": "" }, { "docid": "9ce3e19d04d2fc8b15486c273fd28b47", "score": "0.70984465", "text": "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "title": "" }, { "docid": "9ce3e19d04d2fc8b15486c273fd28b47", "score": "0.70984465", "text": "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "title": "" }, { "docid": "9ce3e19d04d2fc8b15486c273fd28b47", "score": "0.70984465", "text": "public function getResult()\n {\n return $this->get(self::_RESULT);\n }", "title": "" }, { "docid": "8108bc9837d1b37cb06d6e5a28952a89", "score": "0.702069", "text": "public function get_raw_data() {}", "title": "" }, { "docid": "cdb173dbf94f9499cd0d8e68ffabb224", "score": "0.701663", "text": "public static function get_raw_data() {}", "title": "" }, { "docid": "92307cb93946f90d45d89e4e64a9ba6c", "score": "0.6947413", "text": "protected function get_result()\n {\n }", "title": "" }, { "docid": "92307cb93946f90d45d89e4e64a9ba6c", "score": "0.6947413", "text": "protected function get_result()\n {\n }", "title": "" }, { "docid": "92307cb93946f90d45d89e4e64a9ba6c", "score": "0.6947413", "text": "protected function get_result()\n {\n }", "title": "" }, { "docid": "92307cb93946f90d45d89e4e64a9ba6c", "score": "0.6947413", "text": "protected function get_result()\n {\n }", "title": "" }, { "docid": "8b4b536b3b247f98bccd25779dd8add3", "score": "0.69369394", "text": "private function result() {\n return json_decode($this->result, true);\n }", "title": "" }, { "docid": "74a11efb2d22366b04565b9f873e0650", "score": "0.69153315", "text": "function getResult()\r\n {\r\n return $this->result;\r\n }", "title": "" }, { "docid": "2e9f647eadb4bec3b7e4bc1c9d08bcf5", "score": "0.6899217", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "b1fe1c363cb0866cb9e5b92a068e11aa", "score": "0.68757766", "text": "function getResult() \n {\n return $this->result;\n }", "title": "" }, { "docid": "0af7642e57f5d90939d6a3f9cc4012ea", "score": "0.6853757", "text": "function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "bc65d4f72eb538de65f645da21fbfee4", "score": "0.6841476", "text": "public function result() {\n return $this->_result;\n }", "title": "" }, { "docid": "0bbae86588669d7b1a23ec394c6a2ed6", "score": "0.68287283", "text": "public function result() {\n return $this->result;\n }", "title": "" }, { "docid": "19fdb233cd38b43994238f22b09b34cb", "score": "0.6797053", "text": "public function getResult() {\r\n return $this->_result;\r\n }", "title": "" }, { "docid": "fcb0c0f041fd98d624ec9c2fb176e655", "score": "0.6796461", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "3264d3434e333075ab0f02db8298daba", "score": "0.67920727", "text": "public function getResult() {\r\n return $this->result;\r\n }", "title": "" }, { "docid": "083e5453b3e5dfdbdcb41960d91ddbfb", "score": "0.67904484", "text": "public function result() {\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "c560d7d9fd1865febb800ff8441f9ce5", "score": "0.67863214", "text": "public function getResult()\r\n {\r\n return $this->result;\r\n }", "title": "" }, { "docid": "c560d7d9fd1865febb800ff8441f9ce5", "score": "0.67863214", "text": "public function getResult()\r\n {\r\n return $this->result;\r\n }", "title": "" }, { "docid": "db97c24a75c5ca6bbcb8adcd3cd19d16", "score": "0.67765766", "text": "public function getResult(){\n return $this->result;\n }", "title": "" }, { "docid": "db97c24a75c5ca6bbcb8adcd3cd19d16", "score": "0.67765766", "text": "public function getResult(){\n return $this->result;\n }", "title": "" }, { "docid": "1ffccddb8a021c52280aefebcbf3f42d", "score": "0.677622", "text": "function getResult() {\n\n return $this->result;\n\n }", "title": "" }, { "docid": "56f6e96b5bfcda8a98c5b9ae014a86f5", "score": "0.67714596", "text": "public function result()\n {\n return $this->result;\n }", "title": "" }, { "docid": "56f6e96b5bfcda8a98c5b9ae014a86f5", "score": "0.67714596", "text": "public function result()\n {\n return $this->result;\n }", "title": "" }, { "docid": "56f6e96b5bfcda8a98c5b9ae014a86f5", "score": "0.67714596", "text": "public function result()\n {\n return $this->result;\n }", "title": "" }, { "docid": "56f6e96b5bfcda8a98c5b9ae014a86f5", "score": "0.67714596", "text": "public function result()\n {\n return $this->result;\n }", "title": "" }, { "docid": "56f6e96b5bfcda8a98c5b9ae014a86f5", "score": "0.67714596", "text": "public function result()\n {\n return $this->result;\n }", "title": "" }, { "docid": "534b69a192282d44c8a81630bfbee06d", "score": "0.6769219", "text": "function getResult()\n\t{\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "cbd908e75b9f2ba0543369027d96e245", "score": "0.6745732", "text": "public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "b15899ded5a041e6cc9f3265f4c0785a", "score": "0.6740582", "text": "public function get_result(){\n\t\t\treturn $this -> set_result();\n\t\t}", "title": "" }, { "docid": "58e8bf90ffd157e0c455b5289ba4f0e4", "score": "0.6740346", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "58e8bf90ffd157e0c455b5289ba4f0e4", "score": "0.6740346", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "58e8bf90ffd157e0c455b5289ba4f0e4", "score": "0.6740346", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "58e8bf90ffd157e0c455b5289ba4f0e4", "score": "0.6740346", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "58e8bf90ffd157e0c455b5289ba4f0e4", "score": "0.6740346", "text": "public function getResult() {\n return $this->result;\n }", "title": "" }, { "docid": "174253d2202e330d7f2f38036274b5e0", "score": "0.6736543", "text": "public function getResult()\n {\n return $this->_result;\n }", "title": "" }, { "docid": "174253d2202e330d7f2f38036274b5e0", "score": "0.6736543", "text": "public function getResult()\n {\n return $this->_result;\n }", "title": "" }, { "docid": "498a9f547f43d8c4b566d64c06e31664", "score": "0.671149", "text": "public function getResult(){\r\n \r\n return $this->result;\r\n \r\n }", "title": "" }, { "docid": "4d9ad58f3e69461e6a99423c4907cdb5", "score": "0.6701049", "text": "public function getResponse()\n {\n return $this->execute();\n }", "title": "" }, { "docid": "8dee40b86f879e2e865f74ef4ce5c75e", "score": "0.66913587", "text": "public function getResult() {\n\t\treturn $this->_result;\n\t}", "title": "" }, { "docid": "467971416b713cecc8a500dcfddfca7c", "score": "0.66830117", "text": "public static function get_raw_data()\n {\n }", "title": "" }, { "docid": "5f6047126bc9f9f552990a648dacd480", "score": "0.66553575", "text": "public function get_raw_data()\n {\n }", "title": "" }, { "docid": "5f6047126bc9f9f552990a648dacd480", "score": "0.66553575", "text": "public function get_raw_data()\n {\n }", "title": "" }, { "docid": "ab4c201f141abd092f8f2b5b45cf2455", "score": "0.66455", "text": "public function result()\n\t{\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "799e72985588440b1f1ae899fc7c065f", "score": "0.66428727", "text": "final public function getResult()\n {\n return $this->result;\n }", "title": "" }, { "docid": "db18051f5c33979237e5b873ca4286c6", "score": "0.660434", "text": "function getResult(): string {\n return $this->result;\n }", "title": "" }, { "docid": "49846b29db39105ba44afd15b529e3ca", "score": "0.6603602", "text": "public function getResult()\n\t{\n\t\treturn parent::getData()['RESULT'] ?? null;\n\t}", "title": "" }, { "docid": "a555d69282561706f5e6940eaa2b1cb0", "score": "0.6588059", "text": "public function get_result()\n\t\t{\n\t\t\treturn $this->m_result;\n\t\t}", "title": "" }, { "docid": "1b7fce5553b832b782bf545b71c7d6cc", "score": "0.65768564", "text": "public function getRawContent();", "title": "" }, { "docid": "dcbf9a5d56ff9d793b7aeb19270ece27", "score": "0.65756464", "text": "public function getResult()\n {\n if (isset($this->_result)) {\n return $this->_result;\n }\n }", "title": "" }, { "docid": "207a815058fcbaa1267e43be342837fa", "score": "0.65744", "text": "public function getResult();", "title": "" }, { "docid": "207a815058fcbaa1267e43be342837fa", "score": "0.65744", "text": "public function getResult();", "title": "" }, { "docid": "207a815058fcbaa1267e43be342837fa", "score": "0.65744", "text": "public function getResult();", "title": "" }, { "docid": "207a815058fcbaa1267e43be342837fa", "score": "0.65744", "text": "public function getResult();", "title": "" }, { "docid": "207a815058fcbaa1267e43be342837fa", "score": "0.65744", "text": "public function getResult();", "title": "" }, { "docid": "5cfbc18a298510fb252d2429450a0a81", "score": "0.6534868", "text": "public function getRawResult()\n {\n if (!is_array($this->_result)) {\n throw new P4Cms_Diff_Exception(\n \"Cannot get results. Results have not been set.\"\n );\n }\n\n return $this->_result;\n }", "title": "" }, { "docid": "a9a67633636d0320eb8a92b4d5a154de", "score": "0.6527428", "text": "function getRaw()\n {\n return $this->raw;\n }", "title": "" }, { "docid": "e3884e602e160f57d9a10873f4cd1910", "score": "0.65199107", "text": "public function getSingleResult()\n {\n }", "title": "" }, { "docid": "8f9af841990c728aa99864b3d83c34c9", "score": "0.6506277", "text": "public function getResult() {\n return $this->_Result;\n }", "title": "" }, { "docid": "37753c9770573927c296bc5bcfc1a7c3", "score": "0.64886284", "text": "public function raw();", "title": "" }, { "docid": "37753c9770573927c296bc5bcfc1a7c3", "score": "0.64886284", "text": "public function raw();", "title": "" }, { "docid": "5b5a0933c15dcda0afe32af3d37a21dc", "score": "0.6471584", "text": "public function getResult() \n {\n\t\t$res = $this->result;\n\t\tunset($this->result);\t\n\t\treturn $res;\n }", "title": "" }, { "docid": "50f54bbbf62490bd19ca8bc790846d2b", "score": "0.64685374", "text": "public function result()\n\t\t{\n\n\t\t\t$result = $this->response->result();\n\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "2068db0c432ab08898db57316fa4c597", "score": "0.64663166", "text": "public function getResponseRaw()\n {\n return $this->responseRaw;\n }", "title": "" }, { "docid": "2068db0c432ab08898db57316fa4c597", "score": "0.64663166", "text": "public function getResponseRaw()\n {\n return $this->responseRaw;\n }", "title": "" }, { "docid": "d7c464b3661da85bf3b6462bf4493266", "score": "0.6457883", "text": "public function raw()\n {\n return $this->raw;\n }", "title": "" }, { "docid": "4eebe1136184124ca3e0f668d409e9ef", "score": "0.6449014", "text": "public function getRaw()\n {\n return $this->raw;\n }", "title": "" }, { "docid": "4eebe1136184124ca3e0f668d409e9ef", "score": "0.6449014", "text": "public function getRaw()\n {\n return $this->raw;\n }", "title": "" }, { "docid": "5236b8fff8d2b5dd729690cce6ed60fa", "score": "0.6445442", "text": "public function getResult()\n {\n //do this only when the cmd is done well\n if (!$this->isSuccess())\n return;\n if ($this->subcmd == 'RESULT' && in_array($this->cmd, $this->rstNeeded)) {\n $this->result = $_POST['result'];\n }\n }", "title": "" }, { "docid": "86e35b23e984279606c40c1165729f8d", "score": "0.6423968", "text": "function get_raw_data() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "8ae6e1664a918d8dc831ecf5fa74f39e", "score": "0.64139026", "text": "public function getRaw() {\n return $this->raw;\n }", "title": "" }, { "docid": "c699a153259ba86d438af94ae5540c55", "score": "0.64049846", "text": "public function getResultHtml()\n {\n $query = Mage::helper('vubla')->getQueryText();\n \n $queryURL = Mage::helper('vubla')->getVublaURL() . urlencode($query);\n\n // Create the stream context\n $context = stream_context_create(array('http' => array('timeout' => 3))); // Timeout in seconds\n\t\t\n $contents = \"\";\t\t\t \n try {\n // Fetch the URL's contents\n\t @$contents = file_get_contents($queryURL, 0, $context);\n\t if (empty($contents)) Throw new Exception(\"empty\");\n\t \n\t \n } catch(Exception $e){\n\t Mage::app()->getResponse()->setRedirect(\n\t Mage::helper('vubla')->getOldResultUrl($query));\n\t //Mage::getUrl(\"myrouter/mycontroller/noview\"))\n\n }\n\n //$queryURL = \"http://rasmus.vubla.com/dev/search/?q=QUERY&host=everlight.dk&enable=1\";\n //$result = \"searchquery to call: \".$queryURL;\n //$result= file_get_contents($queryURL);\n return $contents;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "3466d9dff55537179a6b4dbf5ccab133", "score": "0.0", "text": "public function create()\n {\n $page_title = 'Tambah Master Kupon';\n return view('view_kupon.create',compact('page_title'));\n }", "title": "" } ]
[ { "docid": "735e465640db5c659ac193ab8af1f08c", "score": "0.75663006", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "1f9733369c1aaf55c73aa4d1a8a80882", "score": "0.74566424", "text": "public function create()\n {\n\n return view('resources.create');\n\n }", "title": "" }, { "docid": "1da53c4d224bfa3bc44c0fabd927bedd", "score": "0.7455584", "text": "public function create()\n {\n return view ('rol.form_create');\n }", "title": "" }, { "docid": "4c4b7c47a2d71e26b29b9caea091a07c", "score": "0.7393118", "text": "public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }", "title": "" }, { "docid": "edabb98341a0b5aadd47c2864942b8db", "score": "0.7339739", "text": "protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }", "title": "" }, { "docid": "4734584f2f8340a42973a0d555da6c67", "score": "0.7328834", "text": "public function create()\n {\n return view(\"superadmin.form\");\n }", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "6ed61a57fb61b517537e754054cffc2f", "score": "0.7257705", "text": "public function create()\n {\n return view(\"stok.form\");\n }", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "8a257056a97a8ef04b6027c8bfb8cad1", "score": "0.723185", "text": "public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }", "title": "" }, { "docid": "f5f050d80230f2f0b6313a13b65e7a0b", "score": "0.72228223", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "4b9c0332c0bc5feb4fa5c4c15ff4cda0", "score": "0.722023", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208485", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "85bc1c405768493e40df217a0040f018", "score": "0.7191366", "text": "function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }", "title": "" }, { "docid": "9493a84894964b34fd6021b3786bcc7a", "score": "0.71894634", "text": "public function create()\n {\n return view('crops.forms.create');\n }", "title": "" }, { "docid": "68716ed8c8a7c02d13766dd274f478a3", "score": "0.718268", "text": "public function create()\n {\n return view('user_resources/create');\n }", "title": "" }, { "docid": "643073da4582f0c5ee209f1f696bb305", "score": "0.7166686", "text": "public function create()\n {\n return view('admin/records/forms/record-create-form');\n }", "title": "" }, { "docid": "ca8a62edbc9efc96246dc89065570720", "score": "0.71638685", "text": "public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }", "title": "" }, { "docid": "86e44150333771a80ff3634ffc76f344", "score": "0.71529675", "text": "public function create()\n {\n return view('dashboard.form.create');\n }", "title": "" }, { "docid": "75889c35cd5f200bf02a5b21774293e1", "score": "0.7137003", "text": "public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }", "title": "" }, { "docid": "0a067c68f8000d9eb913daf36e5e607c", "score": "0.712034", "text": "public function create()\n {\n return view('FullForm.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "c88daeaad1f2ef73dd9534351ceea67a", "score": "0.70962554", "text": "public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "856274cb86788ad9604003f12dd5060c", "score": "0.7073722", "text": "public function create()\n {\n return view('carusel.new');\n }", "title": "" }, { "docid": "7545e6950b9a4b4ee7a1ca28789b55aa", "score": "0.7072655", "text": "public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}", "title": "" }, { "docid": "8e0fde88926c98fb2c54ba67ab5b36a7", "score": "0.7061749", "text": "public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}", "title": "" }, { "docid": "345c70747deda30c3482e759c25c4d12", "score": "0.706081", "text": "public function create()\n {\n return view('passenger.forms.create');\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "20ab9d62fc4da5013c56daa9183bfe28", "score": "0.70571035", "text": "public function create()\n {\n return view('admin.client.form');\n }", "title": "" }, { "docid": "b7f63db5c5ecb7bba494b8a81ce69874", "score": "0.70475084", "text": "public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "8f53ed51f8136e8e32a2c0525120a50f", "score": "0.7042422", "text": "public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }", "title": "" }, { "docid": "f1f40cbb0cad3cf320b4c0ec09b3b428", "score": "0.7040213", "text": "public function create()\n {\n return view('form');\n\n }", "title": "" }, { "docid": "643fd44e4ced88a8aac481ced428c5ca", "score": "0.70261294", "text": "public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }", "title": "" }, { "docid": "40e93c68e66b0c86108e5ae59cc176d2", "score": "0.70215225", "text": "public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }", "title": "" }, { "docid": "8074165780da4d1be303d3e9d8c535ba", "score": "0.7012196", "text": "public function create()\n {\n return view ('owner/form');\n }", "title": "" }, { "docid": "06af90c4292c136aaaf9329cfae0b3fc", "score": "0.70115083", "text": "public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "75fb4bc6a7a5df1f1f5cd380b0cd4aec", "score": "0.7000195", "text": "public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }", "title": "" }, { "docid": "c6f4cc7fdd05567403f39d82ae477eb4", "score": "0.6994647", "text": "public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}", "title": "" }, { "docid": "753f9bd767a3748b9d6409cb957dc41f", "score": "0.6994326", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "7fdab24f12d98bab46a40db3c2f06831", "score": "0.69885707", "text": "public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}", "title": "" }, { "docid": "355b502cb4384aeb8c0d1322a57b7677", "score": "0.69879013", "text": "public function create()\n {\n return view ('show.create', [\n ]); \n }", "title": "" }, { "docid": "afec885a1ddf009d317c5bca27be7983", "score": "0.6985705", "text": "public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }", "title": "" }, { "docid": "93cdfcc841a0d10e976bbc17fe7020ec", "score": "0.6977717", "text": "public function create()\n {\n return view('rombel.create');\n }", "title": "" }, { "docid": "eb3ba5c68f25897de6ed50346b9959f7", "score": "0.6976043", "text": "public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "27f66e57741013d1d7bd227b0a1ae6cc", "score": "0.6969905", "text": "public function create()\n {\n return view('radars/create');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "58119c678c7b859b3d2fcb9d4e2544e9", "score": "0.69620776", "text": "public function create()\n {\n return view('forms.girders.create');\n }", "title": "" }, { "docid": "57611366e6e3194f52047893b6a260ec", "score": "0.6958746", "text": "public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "cfb06a7f594e86d7fe22432b5bd18371", "score": "0.6957784", "text": "public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6954809", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "9cc1ebbeb06fe2564e0fa603d2c72f75", "score": "0.69542176", "text": "public function create()\n {\n //\n return view('product.form');\n }", "title": "" }, { "docid": "ad86bd025139be91b2df85c83f79d4bd", "score": "0.69525295", "text": "public function create()\n {\n return view('syllabus.create');\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "29d1eb6a37de9bf5891c3b5b4ef4fa2d", "score": "0.69450635", "text": "public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }", "title": "" }, { "docid": "353155b973a25b62f33cce0b6600b99c", "score": "0.693502", "text": "public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }", "title": "" }, { "docid": "7c12821aa5d613a86cc8ba0cf190e6fd", "score": "0.6930994", "text": "public function create()\n {\n return view('tutores.new');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "60c9cc4899b058bc51c74601c8025ebe", "score": "0.6925751", "text": "public function create()\n {\n return view('adminCreateForm');\n }", "title": "" }, { "docid": "466006539e9b1da8c7c2e06a069c4e2e", "score": "0.6921871", "text": "public function create()\n {\n return view('layout_admin.thenew.create_new');\n }", "title": "" }, { "docid": "38a6849d5b56a77b178a1fc8297c2e4e", "score": "0.69218206", "text": "public function create()\n\t{\n\t\treturn view('information.create');\n\t}", "title": "" }, { "docid": "a59dfad08f7be5f4bb5d898d16a6d3a3", "score": "0.6919321", "text": "public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.6918515", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "1b49a8bc053be1715bbf5620cf797e18", "score": "0.69184965", "text": "public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}", "title": "" }, { "docid": "27e5069596828984f14a92c012c1e448", "score": "0.6914329", "text": "public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "51a5131df9fc2dcd5b65b5ca8aa614d0", "score": "0.69092304", "text": "public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }", "title": "" }, { "docid": "4b3f5241c4a2f638b9ee19747079b7a2", "score": "0.69069797", "text": "public function create()\n {\n return view('stus.add');\n }", "title": "" }, { "docid": "ecc913c81504bfd8529f7b7feaef7080", "score": "0.69047576", "text": "public function create(){\n return view('person/form', ['action'=>'create']);\n }", "title": "" }, { "docid": "64d616e79a29573ea35b962756917c05", "score": "0.69007623", "text": "public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "61066352fa31a37b0f1d8bc9fd229ea9", "score": "0.6897235", "text": "public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }", "title": "" }, { "docid": "70820d35b4d8e319baa89b6f91a3d029", "score": "0.6895603", "text": "public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "619fa64afd3457bdc8d1c1a041acff47", "score": "0.68903565", "text": "public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }", "title": "" }, { "docid": "09fab99adf688ea100aa90694eab5889", "score": "0.6888845", "text": "public function create()\n {\n return view(\"Amenity::add\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "9664795bf81cca0f3e65d94f0f595082", "score": "0.6880484", "text": "public function create()\n\t{\n\t\treturn view('questao.create');\n\t}", "title": "" }, { "docid": "623f899bed6c6f380a03ffc99508b73d", "score": "0.6879059", "text": "public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a3b3bbcce8f8a6239dadc2917240252b", "score": "0.6878254", "text": "public function showForm()\n {\n return view('AdminView.create');\n }", "title": "" }, { "docid": "06fe0499ccb2038bd9c25e7ef14289e2", "score": "0.68774086", "text": "public function create()\n {\n //Return item details form\n return view('home.create');\n }", "title": "" }, { "docid": "47e62b5d5e96751bc9e8ab90f94e7ea4", "score": "0.6876466", "text": "public function create()\n {\n return view('manager.new');\n }", "title": "" }, { "docid": "3557ca31989d52aabfc94b29a8b4779e", "score": "0.6874666", "text": "public function create()\n {\n return view('hari.create');\n }", "title": "" }, { "docid": "b3998fa6dce49f97902e942f97d98ede", "score": "0.687325", "text": "public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "9f18b1b1a35a9af23eb1d4bbdba665f8", "score": "0.68696606", "text": "public function create()\n {\n return view('admin.car_com.create');\n }", "title": "" }, { "docid": "96c76b820b73f95fa584de07ad04ad0a", "score": "0.6865675", "text": "public function create()\n {\n return view('nasabah/addnasabah');\n }", "title": "" }, { "docid": "e3cfac3178d9c5cb5ab322fa4785604c", "score": "0.6862222", "text": "public function create()\n {\n return view('Prenda.create');\n }", "title": "" }, { "docid": "f4672fc37d04d0e3bef9bc80e57323e9", "score": "0.6860329", "text": "public function create()\n {\n //\n $question= new Question();\n return view('dashboard.question.form', [\n \"question\" => $question\n ]);\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6860251", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "95a4952039c4b40b058cc67fba7cd2d7", "score": "0.68573785", "text": "public function create () {\n $course = new Course();\n $btnText = __(\"Enviar curso para revisión\");\n\n return view('courses.form', compact('course', 'btnText'));\n }", "title": "" }, { "docid": "ca80651480f4bbbd35305ceefd136182", "score": "0.6853353", "text": "public function newAction()\n {\n $entity = new Alumni();\n $form = $this->createForm(new AlumniType(), $entity);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "d58534453dca5d05eb6bf9759a643eaa", "score": "0.68512565", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t}", "title": "" }, { "docid": "783d7ee63b2e492087fc641fa43b1ef1", "score": "0.684831", "text": "public function create()\n\t{\n\t\treturn View::make('fornecedors.create');\n\t}", "title": "" }, { "docid": "2d13aa784138fe895746ebaa36bda96f", "score": "0.6847265", "text": "public function create()\n {\n return view('hr.create');\n }", "title": "" }, { "docid": "1406c82292b4f07e3eecfee633a3f557", "score": "0.68437195", "text": "public function create()\n {\n return view('admin.company.form', [\n 'company' => null,\n 'route' => 'admin.company.store',\n 'method' => 'POST'\n ]);\n }", "title": "" }, { "docid": "b1d677deef4bb08323db61d502e8dcee", "score": "0.6843096", "text": "public function create()\n {\n return view('backend.book.create');\n }", "title": "" } ]
d44b00db19a0535f11425bbc0ad42b69
checks if analysis with specified parameters is already done and cached in local store. If so, returns cached result
[ { "docid": "e81daac7f02e4d2ca01944e096d71a16", "score": "0.62183636", "text": "protected function isAnalysisCached(){\n\t\t// one more criteria should be added for user authorization.\n\t\t// Analysis request may come from different users for different \n\t\t// domain, source etc. \n\t\treturn smongo::$db->analysis->findOne(array(\n\t\t\t\"date\"=>date('Y-m-d H:i:s',$this->presentEnd),\n\t\t\t\"interval\"=>$this->intervalName\n\t\t));\n\t}", "title": "" } ]
[ { "docid": "99098f35dbdf97195cb45e4fd17be741", "score": "0.63279456", "text": "protected function cacheAnalysis($result){\n\t\tsmongo::$db->analysis->insert($result);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ce89b953cd29f71e0662be72577ca6d6", "score": "0.5725143", "text": "public function maybeByPassCache();", "title": "" }, { "docid": "99a5123d637852dee3376f6bba9aa8d2", "score": "0.5386595", "text": "private static function cacheResult($result)\n {\n\t\n }", "title": "" }, { "docid": "76b778272c7db6ca9be2cbe436a51789", "score": "0.5222791", "text": "function ProcessIncrementalResult() {\n global $testPath;\n global $done;\n global $testInfo;\n global $testInfo_dirty;\n global $runNumber;\n global $cacheWarmed;\n global $location;\n\n if ($done) {\n // mark this test as done\n $testInfo['test_runs'][$runNumber]['done'] = true;\n $testInfo_dirty = true;\n \n // make sure all of the sharded tests are done\n for ($run = 1; $run <= $testInfo['runs'] && $done; $run++) {\n if (!$testInfo['test_runs'][$run]['done'])\n $done = false;\n }\n \n if (!$done &&\n array_key_exists('discarded', $testInfo['test_runs'][$runNumber]) &&\n $testInfo['test_runs'][$runNumber]['discarded']) {\n if (is_file(\"$testPath/test.job\")) {\n if (copy(\"$testPath/test.job\", $testInfo['job_file'])) {\n AddJobFileHead($location, $testInfo['workdir'], $testInfo['job'], $testInfo['priority'], true);\n }\n }\n }\n }\n}", "title": "" }, { "docid": "b7050a6ddd9a4ac6d342073199a3893e", "score": "0.520328", "text": "private function isCacheBypassed()\n\t{\n\t\treturn !$this->use_cache;\n\t}", "title": "" }, { "docid": "14b2a5e623b621a74246fdb0a91efd93", "score": "0.5142566", "text": "public function cached();", "title": "" }, { "docid": "9b1c150309e04dd9d25361d544938f67", "score": "0.51316166", "text": "public function hasCache();", "title": "" }, { "docid": "48ef374171a21813c174b76e75b99149", "score": "0.51020044", "text": "public function cache();", "title": "" }, { "docid": "c3e2523e74996e4048669617cfca9537", "score": "0.50676453", "text": "function check_for_existing_cached_chart($file) {\n // Check if the file exists and return bool\n $forcegeneration = optional_param('forcegeneration', false, PARAM_BOOL);\n if ($forcegeneration==true) {\n return false;\n }\n return (file_exists($file) && is_readable($file));\n}", "title": "" }, { "docid": "73e88c1a86b472ab69c6c8ac51ad5ecf", "score": "0.50512487", "text": "public function cacheFileExists()\n {\n $request = RequestFactory::create(func_get_args(), $this->defaultManipulations);\n\n return $this->cache->has($this->getCachePath($request));\n }", "title": "" }, { "docid": "941e8c7f963cb34d58920fc5ad009915", "score": "0.50386125", "text": "public function isCached(): bool;", "title": "" }, { "docid": "941e8c7f963cb34d58920fc5ad009915", "score": "0.50386125", "text": "public function isCached(): bool;", "title": "" }, { "docid": "b41a86a3bd23fc141b1e8152a53942fb", "score": "0.5038088", "text": "private function set_cache_variable()\r\n\t{\r\n\t\t\t\t\r\n\t\t$sql = '\tSELECT\r\n\t\t\t\t\t\t`IDP`,\r\n\t\t\t\t\t\t`NOM`,\r\n\t\t\t\t\t\t`resultat`,\r\n\t\t\t\t\t\t`type`,\r\n\t\t\t\t\t\t`id_action`,\r\n\t\t\t\t\t\t`id_src`,\r\n\t\t\t\t\t\t`id_action_src`,\r\n\t\t\t\t\t\t`used`,\r\n\t\t\t\t\t\t`defaut`,\r\n\t\t\t\t\t\t`neutre` \r\n\t\t\t\t\tFROM \r\n\t\t\t\t\t\t`'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].'` \r\n\t\t\t\t\tWHERE 1 = 1\r\n\t\t\t\t\t\tAND `id_fiche` = \"'.$this->c_id_temp.'\"\r\n\t\t\t ';\r\n\r\n\t\t$resultat = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\r\n\t\t$this->c_variables_fiche = null;\r\n\t\twhile($row = mysql_fetch_array($resultat,MYSQL_ASSOC))\r\n\t\t{\r\n\t\t\tswitch($row['type'])\r\n\t\t\t{\r\n\t\t\t\tcase 'IN':\r\n\t\t\t\t\t$nom = $row['NOM'].'()';\r\n\t\t\t\t\t$utilisee = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'OUT':\r\n\t\t\t\t\t$nom = $row['NOM'].'('.$row['id_action'].')';\r\n\t\t\t\t\t$utilisee = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'EXTERNE':\r\n\t\t\t\t\t$nom = $row['NOM'].'('.$row['id_action'].'\\\\'.$row['id_src'].'\\\\'.$row['id_action_src'].')';\r\n\t\t\t\t\t$nom_varext = $row['NOM'].'('.$row['id_src'].'\\\\'.$row['id_action_src'].')';\r\n\t\t\t\t\t// Vérification de l'utilisation de la variable dans les étapes\r\n\t\t\t\t\t($this->get_varinext_utilise($nom,$nom_varext) == true ? $used = 1 : $used = 0);\r\n\r\n\t\t\t\t\t$sql = 'UPDATE `'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].'` \r\n\t\t\t\t\t\t\tSET `used` = '.$used.'\r\n\t\t\t\t\t\t\tWHERE `id_fiche` = '.$this->c_id_temp.' \r\n\t\t\t\t\t\t\tAND `IDP` = '.$row['IDP'].' \r\n\t\t\t\t\t\t\tAND `type` = \"EXTERNE\" \r\n\t\t\t\t\t\t\tAND `id_action` = '.$row['id_action'].' \r\n\t\t\t\t\t\t\tAND `id_src` = '.$row['id_src'].' \r\n\t\t\t\t\t\t\tAND `id_action_src` = '.$row['id_action_src'].' \r\n\t\t\t\t\t\t\tAND `NOM` = \"'.$row['NOM'].'\"';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($used == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$utilisee = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$utilisee = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(isset($_GET[$row['NOM']]))\r\n\t\t\t{\r\n\t\t\t\t$in_url = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$in_url = false;\r\n\t\t\t}\r\n\t\t\t$this->c_variables_fiche[] = array(0 => $nom,1 => $row['resultat'],2 => $row['type'], 3 => $row['id_action'],4 => $utilisee,5 => $row['defaut'],6 => $row['neutre'],7 => $in_url);\r\n\t\t}\r\n\t\t/*===================================================================*/\t\r\n\t}", "title": "" }, { "docid": "de2c3ea415ae8cf9e8a0bc6d2c2df85b", "score": "0.5033254", "text": "public function storeInCache(): bool;", "title": "" }, { "docid": "8110a95847bbfa2bb566dc6698db6776", "score": "0.49676377", "text": "public function define_caching(){}", "title": "" }, { "docid": "9903b80b2e3d5370d09bfa6746abe869", "score": "0.49361405", "text": "public static function useCache() {\n global $GLPI_CACHE;\n return $GLPI_CACHE != null\n && (!defined('TU_USER') || defined('CACHED_TESTS'));\n }", "title": "" }, { "docid": "c55ee81e0b9b1d0ad5fc54b657b28bf2", "score": "0.4909914", "text": "function si_exhibition_cron_cache($function_name = FALSE, $arguments = FALSE){\n $current_cron_cache = si_exhibition_cache('cron_check','', FALSE, TRUE);\n if ($current_cron_cache == NULL) $current_cron_cache = array();\n si_exhibition_debug(\"si_exhibition_cron_cache $function_name\");\n if ($function_name === FALSE) return $current_cron_cache;\n if (!array_key_exists($function_name, $current_cron_cache) || !is_array($current_cron_cache[$function_name])){\n $current_cron_cache[$function_name] = array(); \n }\n if ($arguments === FALSE) return $current_cron_cache[$function_name];\n\n //Not a simple return, so it's a storage. Already created the cache if it didn't exist yet\n //Now store the arguments (if they are not stored yet)\n if (!in_array($arguments, $current_cron_cache[$function_name])) $current_cron_cache[$function_name][] = $arguments;\n si_exhibition_cache('cron_check',$function_name, $current_cron_cache[$function_name], TRUE);\n}", "title": "" }, { "docid": "16482f1c0619da61ec1cfc4291dac936", "score": "0.48661295", "text": "private function setParamsCache() {\n\t\t\n\t\t$item = $this->select(\"query_cache, query_cache_time\", TBL_SYS_CONF, \"id='1'\", array('cache'=>false));\n\t\tif(count($item))\n\t\t{\n\t\t\t$this->_query_cache = $item[0]['query_cache'] ? true : false;\n\t\t\t$this->_query_cache_time = $item[0]['query_cache_time'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_query_cache = false;\n\t\t\t$this->_query_cache_time = null;\n\t\t}\n\t}", "title": "" }, { "docid": "a279b953202b22945ba5f71e777e1fb7", "score": "0.4848644", "text": "function lingotek_do_cache() {\n return !(variable_get('lingotek_flush_cache', FALSE) && user_access('use lingotek developer tools'));\n}", "title": "" }, { "docid": "8d062ad70cd7feac4dec5df038d4a438", "score": "0.48418543", "text": "function isFileExists($input1, $input2 = '', $forceCheck = false, $noCatcheSave = false) {\n\tif($input2 === true) {\n\t\t$file = false;\n\t\t$cacheKey = $input1;\n\t}\n\telse {\n\t\t$file = str_replace('//', '/', $input1);\n\t\t$cacheKey = $input2;\n\t}\n\t\n\tif(!$cacheKey)\n\t\t$cacheKey = $file;\n\t\n\tif(!$cacheKey)\n\t\treturn false;\n\t\n\tif(!isset($GLOBALS['ZampFilePresenceCache'])) {\n\t\t$GLOBALS['ZampFilePresenceCache'] = [];\n\t\t\n\t\t$cacheFile = _PROJECT_PATH_.'data/tmp/cache/zamp_file_presence_cache.php';\n\t\t\n\t\tif(file_exists($cacheFile)) {\n\t\t\t$GLOBALS['ZampFilePresenceCache'] = include $cacheFile;\n\t\t\t\n\t\t\tif((array) $GLOBALS['ZampFilePresenceCache'] !== $GLOBALS['ZampFilePresenceCache'])\n\t\t\t\t$GLOBALS['ZampFilePresenceCache'] = [];\n\t\t}\n\t}\n\t\n\tif(!$forceCheck && isset($GLOBALS['ZampFilePresenceCache'][$cacheKey])) {\n\t\tif($GLOBALS['ZampFilePresenceCache'][$cacheKey] && $cacheKey == $file)\n\t\t\treturn $file;\n\t\telse\n\t\t\treturn $GLOBALS['ZampFilePresenceCache'][$cacheKey];\n\t}\n\t\n\tif(!$file)\n\t\treturn false;\n\telseif(file_exists($file))\n\t\t$GLOBALS['ZampFilePresenceCache'][$cacheKey] = ($cacheKey == $file) ?true :$file;\n\telse {\n\t\t$file = false;\n\t\t$GLOBALS['ZampFilePresenceCache'][$cacheKey] = $file;\n\t}\n\t\n\tif($noCatcheSave && !$file)\n\t\treturn $file;\n\telseif(!isset($cacheFile))\n\t\t$cacheFile = _PROJECT_PATH_.'data/tmp/cache/zamp_file_presence_cache.php';\n\t\n\tfile_put_contents($cacheFile, \"<?php\\n// \".date('Y-m-d H:i:s').\"\\nreturn \".var_export($GLOBALS['ZampFilePresenceCache'], true).\";\\n\", LOCK_EX);\n \n Zamp_General::invalidate($cacheFile);\n\t\n\treturn $file;\n}", "title": "" }, { "docid": "d5902d04129865c833f27aef4f58449f", "score": "0.48351884", "text": "function processActionCached($request) {\n \n // create cache key\n $id = preg_replace('/\\W/', '', $_SERVER['HTTP_HOST']) . '_GET_' . md5(ONXSHOP_DB_HOST . ONXSHOP_DB_PORT . ONXSHOP_DB_NAME . $request . serialize($_GET) . isset($_SERVER['HTTPS'])); // include hostname and database connection details to prevent conflicts in shared cache engine environment\n if (defined('ONXSHOP_ENABLE_AB_TESTING') && ONXSHOP_ENABLE_AB_TESTING == true) $id .= $_SESSION['ab_test_group'];\n\n if (!is_array($data = $this->cache->load($id))) {\n // cache miss\n \n $this->processAction($request);\n \n if ($this->canBeSavedInCache()) {\n\n $data_to_cache = array();\n $data_to_cache['output_headers'] = $this->headers;\n $data_to_cache['output_body'] = $this->output;\n $this->cache->save($data_to_cache);\n\n // update index immediately if enabled in the configuration,\n // but not when search_query is submitted (don't index search results)\n // and not when forward \"to\" is provided\n // TODO: canonise the request before submitting for indexing\n if (ONXSHOP_ALLOW_SEARCH_INDEX_AUTOUPDATE && !array_key_exists('search_query', $_GET) && !array_key_exists('to', $_GET)) $this->indexContent($_GET['translate'], $this->output);\n }\n\n } else {\n \n $this->headers = $data['output_headers'];\n $this->output = $data['output_body'];\n $this->restoreHeaders();\n }\n }", "title": "" }, { "docid": "65dec07d879656bce7eef344ee98c61a", "score": "0.48324567", "text": "public function cache_valid() {\n return $this->cache_exists();\n }", "title": "" }, { "docid": "e428d9e278273b6203cc737587ea3741", "score": "0.48228982", "text": "public function is_already_optimized() {\n\t\treturn 'already_optimized' === $this->get_status();\n\t}", "title": "" }, { "docid": "238ae087a7bd9a82eeb00297817facc9", "score": "0.48168832", "text": "public function getCachedAnalysis($analysisId){\n\t\t$a = smongo::$db->analysis->findOne(\n\t\t\tarray('_id'=>new MongoID($analysisId))\n\t\t);\n\t\t\n\t\tif($a) {\n\t\t\t$a['id'] = (string)$a['_id'];\n\t\t\tunset($a['_id']);\n\t\t}\n\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "ed7bb94c0f7619a9d96f256928f04307", "score": "0.48105332", "text": "public function isTemporary();", "title": "" }, { "docid": "d974ac56120802ec051a8959aaa9a152", "score": "0.480924", "text": "function has_cache($name = '') {\n\n\t\t$cache_name = ($name != '') ? $name : sha1(strtolower($_SERVER['REQUEST_URI'])).'-'.$this->v;\n\n\t\t//Return the transient\n\t\t$cache = get_transient($cache_name);\n\n\t\tif ($cache) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "fe1df665aa217028d56ba395a7114415", "score": "0.48051313", "text": "private function get_results_from_storage() {\n\t\t$this->results = get_option( 'rank_math_seo_analysis_results' );\n\t\t$this->build_results();\n\t}", "title": "" }, { "docid": "154d72c41978e1155be677c6cd955c9c", "score": "0.47815388", "text": "public function configurationIsCached()\n {\n }", "title": "" }, { "docid": "2a1a31f93238696c104dfd4facd8ea22", "score": "0.4775719", "text": "public function cacheValid()\n {\n // If files exists And is not expired\n if (file_exists($this->path.$this->name.'.xml') && $this->isExpired() !== true){\n return true;\n }else {\n return false;\n }\n }", "title": "" }, { "docid": "3dfbff691a174ec9ed582c8fda188456", "score": "0.4765422", "text": "protected function extractDataFromCache()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "792eaa7d8b8d5909fffb4bb5a1304c4f", "score": "0.47492442", "text": "public function cachable();", "title": "" }, { "docid": "5887a173001ec880f57f089921a37860", "score": "0.47148773", "text": "function setup_cache() {\n\t\tglobal $phpbb_seo;\n\t\t// For module inclusion in ACP : No cache\n\t\tif ( defined('ADMIN_START') ) {\n\t\t\treturn;\n\t\t}\n\t\t// build cache file name\n\t\t$ssl_bit = $phpbb_seo->ssl['use'] ? 'ssl_' : '';\n\t\t$file_name = ( !empty($this->options['module_sub']) ? $this->options['module_sub'] : '' ) . trim(str_replace(array('&amp;', '/'), '-', $this->options['extra_params_full']),'-') . '-a' . $this->options['auth_param'];\n\t\tif ($this->gym_master->gym_config['gym_cript_cache']) {\n\t\t\t$file_name = md5( $file_name );\n\t\t}\n\t\t$file_name = $this->gym_master->actions['action_type'] . '_' . ( ( !empty($this->options['module_main']) ) ? $this->options['module_main'] . '_' : 'main_' ) . $ssl_bit . $file_name . $this->cache['cache_file_ext'];\n\t\t$this->cache['file'] = $this->gym_master->path_config['gym_path'] . 'cache/' . $file_name;\n\t\t// Output, first check cache\n\t\tif ($this->cache['do_cache'] && $this->check_cache($this->cache['file'])) {\n\t\t\t// Check expiration\n\t\t\t$this->cache['cache_born'] = filemtime($this->cache['file']);\n\t\t\t$this->cache['cache_too_old'] = ($this->cache['cache_born'] + $this->cache['cache_max_age']) <= $this->outputs['time'] ? true : false;\n\t\t\tif ($this->cache['cache_too_old'] && $this->cache['cache_auto_regen']) {\n\t\t\t\t@unlink($this->cache['file']);\n\t\t\t\t$this->cache['cached'] = false;\n\t\t\t}\n\t\t}\n\t\t// Expiration time & Etags\n\t\tif (!$this->cache['cached'] || !$this->cache['do_cache']) {\n\t\t\t// Take care about lastmod when not cached\n\t\t\tif (($this->outputs['last_mod_time'] + $this->cache['cache_max_age']) <= $this->outputs['time']) {\n\t\t\t\t$this->outputs['last_mod_time'] = $this->outputs['time'];\n\t\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['time'] + $this->cache['cache_max_age']));\n\t\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t\t$this->update_lastmod();\n\t\t\t} else {\n\t\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\n\t\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t}\n\t\t\t$this->check_mod_since();\n\t\t} else {\n\t\t\t$this->outputs['last_mod_time'] = $this->cache['cache_born'];\n\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\n\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t$this->check_mod_since();\n\t\t\t$this->cache_output();\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "2fb1b2f359c533d8ad52cb589cddf6d1", "score": "0.47136664", "text": "public function isCached() \n {\n $modified = (file_exists($this->cache_file)) ? filemtime($this->cache_file) : 0;\n return ((time() - $this->cache_expires) < $modified);\n }", "title": "" }, { "docid": "2a9c585917e87d2a79f79c33c29609bd", "score": "0.47087356", "text": "public static function check($param=false)\n\t{\n\t\tif(is_array($param))\n\t\t{\n\t\t\t$param['prefix'] = isset($param['prefix']) ? $param['prefix'] : 'data';\n\t\t\t$param['query'] = isset($param['query']) ? $param['query'] : null;\n\t\t\t$param['suffix'] = isset($param['suffix']) ? $param['suffix'] : 'json';\n\t\t\t$param['table'] = isset($param['table']) ? $param['table'] : 'app_cache';\n\t\t\t$param['type_save'] = isset($param['type_save']) ? $param['type_save'] : 'file';\n\n\t\t\t$idFile = $param['prefix'].'-'.md5($param['query']);\n\t\t\t$fileReady = defined('APPDATAPATH') ? APPDATAPATH.'/cache/'.$idFile :\n\t\t\t\t\t\t$param['absolute_path'].'/'.$idFile;\n\n\t\t\t$fileReady = $fileReady.'.'.$param['suffix'];\n\n\t\t\tswitch($param['type_save'])\n\t\t\t{\n\t\t\t\tcase 'file':\n\t\t\t\t$data = file_exists($fileReady);\n\t\t\t\tbreak;\n\t\t\t\tcase 'database':\n\t\t\t\t$prm_read = \"WHERE cache_name='{$idFile}'\";\n\t\t\t\t$data_read = array('tbl'=>$param['table'],'row'=>'*','prm'=>$prm_read);\n\t\t\t\t$sql_read = AccessCRUD($data_read,'read');\n\t\t\t\t$data = $sql_read == false ? false : $sql_read->num_rows > 0 ? true : false;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t$data = false;\n\t\t\t}\n\n\t\t\tif($data)\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}", "title": "" }, { "docid": "3eeb331ffab2d5ad2bcce3874631f90a", "score": "0.4702895", "text": "public function shouldResetInMemoryCache(): bool;", "title": "" }, { "docid": "d23371841bb947c6b1586ea6d0d975ae", "score": "0.46904173", "text": "function has_caching_for($type)\n{\n if (!function_exists('get_option')) {\n return false;\n }\n\n $setting = (get_option('is_on_' . $type . '_cache') == '1');\n\n $positive = (get_param_integer('keep_cache', 0) == 1) || (get_param_integer('cache', 0) == 1) || (get_param_integer('keep_cache_' . $type . 's', 0) == 1) || (get_param_integer('cache_' . $type . 's', 0) == 1);\n\n $not_negative = (get_param_integer('keep_cache', null) !== 0) && (get_param_integer('cache', null) !== 0) && (get_param_integer('keep_cache_' . $type . 's', null) !== 0) && (get_param_integer('cache_' . $type . 's', null) !== 0);\n\n return ($setting || $positive) && (strpos(get_param_string('special_page_type', ''), 't') === false) && $not_negative;\n}", "title": "" }, { "docid": "4df8de7e308f1f04ea703be455cbe2c8", "score": "0.46886098", "text": "private function getDoneData($localCacheData,&$cacheKeyId,$callKeyId) {/*{{{*/\n if ($localCacheData != false) {\n $key = $cacheKeyId == NULL ? 0 : $cacheKeyId;\n if(is_array($cacheKeyId)==false && $localCacheData[$key]!=false) {\n $returnCacheData = is_array($callKeyId) ? $localCacheData : $localCacheData[$key];\n $cacheKeyId = false; \n return $returnCacheData;\n }\n $localCacheDataKeys = array_keys($localCacheData);\n $cacheKeyId = array_diff($cacheKeyId,$localCacheDataKeys);\n if(empty($cacheKeyId)) {\n $cacheKeyId = false;\n return $localCacheData;\n }\n }\n }", "title": "" }, { "docid": "24a7ef70f4ce7aa83d7f89ea0d1b950c", "score": "0.4683057", "text": "protected function wasCached()\n {\n $this->start = microtime(true);\n // Location to lookup or store cached file\n $this->cache_file_name = $this->cache_folder.md5(\",a1b2c3d4e5f6g7h8i9ABB!\");\n return file_exists($this->cache_file_name) ? filemtime($this->cache_file_name) : 0;\n }", "title": "" }, { "docid": "d1f3d370fa0baa7ef20b1467a2cc4af5", "score": "0.4676231", "text": "function is_cached($cacheFile) \n\t{\n \t$cacheFile_created = (file_exists($cacheFile)) ;\n \treturn $cacheFile_created;\n}", "title": "" }, { "docid": "f987d242cb2503c67330cc31c4f71177", "score": "0.4675593", "text": "public function setCache() {\n\t\tif(!$this->isCacheValid($this->_cachefile)) {\n\t\t\tob_start();\n\t\t\treturn $this->addLog( 'Could not find valid cachefile: ' . $this->_cachefile );\n \t} else {\n \t\treturn true;\n \t}\n\t}", "title": "" }, { "docid": "8c23c8f158f96a23f38283549811dd8f", "score": "0.46682513", "text": "protected function apply_internal ($cache_not_saved_mark = true) {\n\t\tif ($cache_not_saved_mark) {\n\t\t\t$this->core['cache_not_saved'] = true;\n\t\t} else {\n\t\t\tunset($this->core['cache_not_saved']);\n\t\t}\n\t\t$Cache = Cache::instance();\n\t\tif (!$Cache->set(\n\t\t\t'config',\n\t\t\t[\n\t\t\t\t'core' => $this->core,\n\t\t\t\t'db' => $this->db,\n\t\t\t\t'storage' => $this->storage,\n\t\t\t\t'components' => $this->components\n\t\t\t]\n\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\t$Cache->del('languages');\n\t\tdate_default_timezone_set($this->core['timezone']);\n\t\t$this->fill_mirrors();\n\t\tEvent::instance()->fire('System/Config/changed');\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8fc5217894c8f1a03d990f17db3e6b7d", "score": "0.46641606", "text": "function getData ()\n{\n return cache();\n}", "title": "" }, { "docid": "12113f68f94062bc578c08097d1b1643", "score": "0.46529156", "text": "static function Maintain( Wrapper $theWrapper, $doVerbose = FALSE )\n\t{\n\t\t//\n\t\t// Init local storage.\n\t\t//\n\t\t$cache = Array();\n\t\t$prefix = __class__;\n\t\t$zp = $fp = $name_zip = $ok = $eol = NULL;\n\t\t$stats = array( 'new' => 0, 'updated' => 0, 'processed' => 0 );\n\t\t$collection\n\t\t\t= static::ResolveCollection(\n\t\t\t\tstatic::ResolveDatabase( $theWrapper, TRUE ) );\n\t\t\n\t\t//\n\t\t// TRY BLOCK.\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t//\n\t\t\t// Init local storage.\n\t\t\t//\n\t\t\t$max_exe = ini_set( 'max_execution_time', 0 );\n\t\t\t$name_zip = tempnam( \"/tmp\", \"$prefix\".\"ZIP\" );\n\t\t\t\n\t\t\t//\n\t\t\t// Load FAO institutes.\n\t\t\t//\n\t\t\tif( file_put_contents( $name_zip,\n\t\t\t\t\t\t\t\t file_get_contents( kFAO_INSTITUTES_URL ) ) !== FALSE )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Open zip file.\n\t\t\t\t//\n\t\t\t\t$zp = zip_open( $name_zip );\n\t\t\t\tif( $zp )\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// Unzip data.\n\t\t\t\t\t//\n\t\t\t\t\tif( $data = zip_read( $zp ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Save unzipped data.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t$name_txt = tempnam( \"/tmp\", \"$prefix\".\"TXT\" );\n\t\t\t\t\t\tif( $ok = file_put_contents(\n\t\t\t\t\t\t\t\t\t$name_txt,\n\t\t\t\t\t\t\t\t\tzip_entry_read(\n\t\t\t\t\t\t\t\t\t\t$data, zip_entry_filesize( $data ) ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Cleanup.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\tzip_entry_close( $data );\n\t\t\t\t\t\t\tzip_close( $zp );\n\t\t\t\t\t\t\t$zp = NULL;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Handle Mac EOL.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t$eol = ini_set( 'auto_detect_line_endings', 1 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Open file.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t$fp = fopen( $name_txt, 'r' );\n\t\t\t\t\t\t\tif( $fp )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Cycle file.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$header = NULL;\n\t\t\t\t\t\t\t\twhile( ($data = fgetcsv( $fp, 4096, ',', '\"' )) !== FALSE )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Load header.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $header === NULL )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Load header.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$header = $data;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // First run.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Verify record.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( count( $header ) != count( $data ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\techo( \" ==> Invalid record format at source.\" );\n\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Increment processed.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$stats[ 'processed' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Load new record.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$new = new static( $theWrapper );\n\t\t\t\t\t\t\t\t\t$new->importFAO( $data, $header );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Try loading existing.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$id = static::FAOIdentifier( $data[ 'INSTCODE' ] );\n\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID => $id );\n\t\t\t\t\t\t\t\t\t$old = $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_OBJECT );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Skip not changed.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $old\n\t\t\t\t\t\t\t\t\t && ($old->offsetGet( kTAG_VERSION )\n\t\t\t\t\t\t\t\t\t\t\t== $new->offsetGet( kTAG_VERSION )) )\n\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Handle cached.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( array_key_exists( $id, $cache ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Save object in cache.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$cache[ $id ] = $new;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Cached.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Handle referenced.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $new->offsetExists( kTAG_ENTITY_VALID ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Init local storage.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$valid = $new->offsetGet( kTAG_ENTITY_VALID );\n\t\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID => $valid );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Handle unresolved.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif( ! $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_COUNT ) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Cache valid.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\tif( ! array_key_exists( $valid, $cache ) )\n\t\t\t\t\t\t\t\t\t\t\t\t$cache[ $valid ] = NULL;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Cache current.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$cache[ $id ] = $new;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} // Cached valid and current.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Has valid institute.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Handle existing.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $old )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Replace old.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$new->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$stats[ 'updated' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Exists.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Handle new.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Insert new.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$new->commit();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$stats[ 'new' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // New record.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} // Iterating file.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Recurse ad exhaustion.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$count = count( $cache );\n\t\t\t\t\t\t\t\twhile( count( $cache ) )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Iterate cache.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$keys = array_keys( $cache );\n\t\t\t\t\t\t\t\t\tforeach( $keys as $key )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Init loop storage.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$cached = & $cache[ $key ];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Try loading existing.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$id = static::FAOIdentifier(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cached[ kTAG_IDENTIFIER ] );\n\t\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID => $id );\n\t\t\t\t\t\t\t\t\t\t$old = $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_OBJECT );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Handle existing.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif( $old )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Replace old.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$cached->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$stats[ 'updated' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} // Exists.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Handle new.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Check if valid is there.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\tif( $cached->offsetExists( kTAG_ENTITY_VALID ) )\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t\t// Check if valid exists.\n\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID\n\t\t\t\t\t\t\t\t\t\t\t\t\t=> $cached[ kTAG_ENTITY_VALID ] );\n\t\t\t\t\t\t\t\t\t\t\t\tif( ! $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_COUNT ) )\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} // Has valid reference.\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Insert new.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$cached->commit();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$stats[ 'new' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} // New record.\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Pop cache.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tunset( $cache[ $key ] );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Iterating cache.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Check infinite loop.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( count( $cache ) == $count )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Dump cache.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tforeach( $cache as $cached )\n\t\t\t\t\t\t\t\t\t\t\tvar_dump(\n\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'NICODE'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $cached[ kTAG_IDENTIFIER ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'VALID'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $cached[ kTAG_ENTITY_VALID ] ) );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\t\t\t\t\"Unreferenced valid institute\" );\t// !@! ==>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Unreferenced valid institute.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} // Cache not exhausted.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Reset maximum execution time.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\tini_set( 'max_execution_time', $max_exe );\n\t\t\t\n\t\t\t\t\t\t\t\treturn $stats;\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // Opened unzipped file.\n\t\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\t\t\"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t .\"unable to open unzipped data\" );\t\t\t// !@! ==>\n\t\t\t\t\t\t\n\t\t\t\t\t\t} // Saved unzipped data.\n\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\t\"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t .\"unable to save unzipped data\" );\t\t\t\t// !@! ==>\n\t\t\t\t\t\n\t\t\t\t\t} // Unzipped data.\n\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new \\Exception( \"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t\t\t\t .\"unable to unzip data\" );\t\t\t// !@! ==>\n\t\t\t\t\n\t\t\t\t} // Opened zip file.\n\t\t\n\t\t\t\telse\n\t\t\t\t\tthrow new \\Exception( \"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t\t\t .\"unable to open zip file\" );\t\t\t// !@! ==>\n\t\t\n\t\t\t} // Loaded institutes from FAO.\n\t\t\n\t\t\telse\n\t\t\t\tthrow new CException( \"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t\t .\"unable to access URL\" );\t\t\t\t\t// !@! ==>\n\t\t}\n\t\t\n\t\t//\n\t\t// FINAL BLOCK.\n\t\t//\n\t\tfinally\n\t\t{\n\t\t\tif( $zp )\n\t\t\t{\n\t\t\t\tfclose( $zp );\n\t\t\t\tunlink( $name_zip );\n\t\t\t}\n\t\t\t\n\t\t\tif( $fp )\n\t\t\t\tfclose( $fp );\n\t\t\t\n\t\t\tif( $ok )\n\t\t\t\tunlink( $name_txt );\n\t\t\t\n\t\t\tif( $eol !== NULL )\n\t\t\t\tini_set( 'auto_detect_line_endings', $eol );\n\t\t\t\n\t\t\tif( isset( $max_exe ) )\n\t\t\t\tini_set( 'max_execution_time', $max_exe );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0eb2250cf8c567a6726dec5e930b5885", "score": "0.46345368", "text": "function preRun($cached)\n {\n }", "title": "" }, { "docid": "447525a002c93502df229985bd4c62ee", "score": "0.4633542", "text": "final protected function getCacheNeed()\n\t{\n\t\treturn\tintval($this->arParams['CACHE_TIME']) > 0 &&\n\t\t\t\t$this->arParams['CACHE_TYPE'] != 'N' &&\n\t\t\t\tConfig\\Option::get(\"main\", \"component_cache_on\", \"Y\") == \"Y\";\n\t}", "title": "" }, { "docid": "69d5025c1bfc9bf6e31616b04e8fbfd2", "score": "0.4631425", "text": "public function process() {\r\n\r\n\t\t// Revisión inicial\r\n\t\tif (!$this->checkInit()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$sqlWhere = array();\r\n\t\t$sqlOrden = '';\r\n\t\t$sqlLimit = '';\r\n\t\t\r\n\t\t// Cargo los filtros\r\n\t\t$sqlWhere = $this->checkFilters();\r\n\r\n\t\tif (!count($sqlWhere)) {\r\n\t\t\t$this->log.= '- <b>Error:</b> No existe ningún condicional (WHERE) definido<br/>';\r\n\t\t\r\n\t\t\t$this->error(2);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$sqlWhereFinal = implode(' AND ', $sqlWhere);\r\n\r\n\t\tif ($this->orden != '') {\r\n\t\t\t$sqlOrden = 'ORDER BY '.$this->orden;\r\n\t\t}\r\n\r\n\t\tif ($this->cantidad || $this->desplazamiento) {\r\n\t\t\t$sqlLimit = 'LIMIT '.$this->desplazamiento;\r\n\t\t\t$sqlLimit.= ($this->cantidad) ? ','.$this->cantidad : '';\r\n\t\t}\r\n\t\t\r\n\t\t$oSql = \"SELECT count(gal_id) as total \r\n\t\t\tFROM {$this->_table}noticias_galeria_multimedia\r\n\t\t\tWHERE {$sqlWhereFinal}\";\r\n\r\n\t\t$this->log.= '- Realizando consulta previa, para saber la cantidad de resultados. <br/>';\r\n\t\t$this->log.= '- Consulta SQL:'.$oSql.'<br/>';\r\n\t\t\r\n\t\t$this->log.= '- Generando consulta definitiva <br/>';\r\n\t\t$oSqlFinal = \"SELECT {$this->_table}noticias_galeria_multimedia.*\r\n\t\t\tFROM {$this->_table}noticias_galeria_multimedia\r\n\t\t\tWHERE {$sqlWhereFinal}\r\n\t\t\t{$sqlOrden}\r\n\t\t\t{$sqlLimit}\";\r\n\r\n\t\t$this->log.= '- Consulta SQL definitiva:'.$oSqlFinal.'<br/>';\r\n\r\n\t\t/* Consultando si posee cache */\r\n\t\tif ($this->_cacheOK) {\r\n\r\n\t\t\t$this->log.= '- Intentando recuper datos de cache. <br/>';\r\n\r\n\t\t\t$cacheName = md5($oSqlFinal);\r\n\r\n\t\t\tif ($cacheData = $this->cache->get($cacheName)) {\r\n\t\t\t\r\n\t\t\t\t$this->log.= '- Datos de cache recuperados OK. <br/>';\r\n\r\n\t\t\t\t$this->totalPaginas = $cacheData['totalPaginas'];\r\n\t\t\t\t$this->totalResultados = $cacheData['totalResultados'];\r\n\t\t\t\t// $this->facetas = $cacheData['facetas'];\r\n\t\t\t\t$im = $cacheData['im'];\r\n\t\t\t\t\r\n\t\t\t\treturn $im;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (!$res = $this->db->query($oSql)) {\r\n\t\t\t$this->log.= '- Error al ejecutar la consulta.<br/>';\r\n\t\t\t$this->log.= '- El sistema dice:'.$this->db->error().'</br>';\r\n\t\t\r\n\t\t\t$this->error(5);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$rs = $this->db->next($res);\r\n\t\t$this->totalResultados = $rs['total'];\r\n\r\n\t\t$this->log.= '- Consulta SQL OK.<br/>';\r\n\r\n\t\tif ($this->cantidad) {\r\n\t\t\t$this->totalPaginas = ceil($this->totalResultados / $this->cantidad);\r\n\t\t} else {\r\n\t\t\t$this->totalPaginas = $this->totalResultados;\r\n\t\t}\r\n\t\t\r\n\t\t$this->log.= '- Total de resultados encontrados:'.$this->totalResultados.' <br/>';\r\n\t\t$this->log.= '- Total de páginas devueltas:'.$this->totalPaginas.' <br/>';\r\n\r\n\t\tif (!$res = $this->db->query($oSqlFinal)) {\r\n\t\t\t$this->log.= '- Error al ejecutar la consulta.<br/>';\r\n\t\t\t$this->log.= '- El sistema dice:'.$this->db->error().'</br>';\r\n\r\n\t\t\t$this->error(5);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->log.= '- Recuperando información final<br/>';\r\n\t\t$im = array();\r\n\r\n\t\t$idList = '';\t// Listado de ids para luego agregar información\r\n\t\t$idArray = array();\t// Ubicación del Id para luego agregarle información\r\n\t\t\r\n\t\t// Información extra solo para Adjuntos\r\n\t\t$idListExtra = '';\t// Listado de ids para luego agregar información\r\n\t\t$idArrayExtra = array();\t// Ubicación del Id para luego agregarle información\t\t\r\n\r\n\t\tif ($this->db->num_rows($res)) {\r\n\t\t\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\r\n\t\t\t\t$rs = $this->db->next($res);\r\n\r\n\t\t\t\t$rs['extra'] = json_decode($rs['gal_extra'], true);\r\n\t\t\t\t\r\n\t\t\t\tforeach ($rs as $j => $s) {\r\n\t\t\t\t\tif (is_string($s) && $s != '') {\r\n\r\n\t\t\t\t\t\t// Aplica el formato negrita, cursiva, etc y los saltos de líneas\r\n\t\t\t\t\t\t$s = htmlspecialchars_decode($s, ENT_QUOTES);\r\n\t\t\t\t\t\t$s = str_replace(\"\\n\", \"<br/>\", $s);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Aplico vínculos cliqueables al texto\r\n\t\t\t\t\t\tif ($j == 'gal_descripcion') {\r\n\t\t\t\t\t\t\t$s = clickable($s);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// cierro los tags que puedan haber quedado abiertos\r\n\t\t\t\t\t\t$s = closeTags($s);\r\n\r\n\t\t\t\t\t\t$rs[$j] = $s;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Devuelvo la extensión del adjunto.\r\n\t\t\t\t$rs['gal_file_ext'] = '';\r\n\t\t\t\tif (strpos($rs['gal_file'], '.') && strpos($rs['gal_file'], 'http:') === false) {\r\n\t\t\t\t\t$oFileExtArr = explode('.', $rs['gal_file']);\r\n\t\t\t\t\t$oFileExt = (count($oFileExtArr)>1) ? $oFileExtArr[count($oFileExtArr)-1] : '';\r\n\t\t\t\t\t$rs['gal_file_ext'] = $oFileExt;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Proceso solo si tengo asignado el array de datos\r\n\t\t\t\tif (is_array($this->datos)) {\r\n\t\t\r\n\t\t\t\t\t$fileUrl = pathAdjunto($this->datos[$rs['gal_galeria']], $rs['gal_file'], $rs['gal_fecha']);\r\n\t\t\t\t\tif ($fileUrl) {\r\n\t\t\t\t\t\t$rs = array_merge($rs, array('url' => $fileUrl));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Si es un video de YouTube proceso info extra\r\n\t\t\t\tif ($rs['gal_tipo'] == 'ytube') {\r\n\t\t\t\t\r\n\t\t\t\t\t$type_all = array(\r\n\t\t\t\t\t\t'link' => '/http:\\/\\/[w\\.]*youtube\\.com\\/watch\\?v=([^&#]*)|http:\\/\\/[w\\.]*youtu\\.be\\/([^&#]*)/i',\r\n\t\t\t\t\t\t'embed' => '/http:\\/\\/[w\\.]*youtube\\.com\\/v\\/([^?&#\"\\']*)/is',\r\n\t\t\t\t\t\t'iframe' => '/http:\\/\\/[w\\.]*youtube\\.com\\/embed\\/([^?&#\"\\']*)/is'\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$code = '';\r\n\t\t\t\t\tforeach($type_all as $type => $regexp) {\r\n\r\n\t\t\t\t\t\tpreg_match($regexp, $rs['gal_file'], $match);\r\n\t\t\t\t\t\tif (!empty($match)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfor($ii = 1; $ii < sizeof($match); $ii++) {\r\n\t\t\t\t\t\t\t\tif($match[$ii] != '') {\r\n\t\t\t\t\t\t\t\t\t$code = $match[$ii];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($code != '') {\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($code != '') {\r\n\t\t\t\t\t\t// Imagen grande alternativa\r\n\t\t\t\t\t\t$rs['extra']['img_small'] = 'http://i.ytimg.com/vi/'.$code.'/default.jpg';\r\n\t\t\t\t\t\t$rs['extra']['img_large'] = 'http://i4.ytimg.com/vi/'.$code.'/hqdefault.jpg';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Igualo la ruta del archivo final para videos de ytube\r\n\t\t\t\t\t\t$rs['url']['o'] = $rs['gal_file'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Compatibilizo si no recibe esta data desde la dbase\r\n\t\t\t\t\t\t$rs['extra']['iframe'] = 'http://www.youtube.com/embed/'.$code;\r\n\t\t\t\t\t\t$rs['extra']['embed'] = 'http://www.youtube.com/v/'.$code;\r\n\t\t\t\t\t\t$rs['extra']['url'] = 'http://www.youtube.com/watch?v='.$code;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$im[$i] = $rs;\r\n\t\t\t\t$idList.= ','.$rs['gal_id'];\r\n\t\t\t\t$idArray[$rs['gal_id']][] = $i;\r\n\t\t\t\t\r\n\t\t\t\tif (!empty($rs['extra']['adjunto'])) {\r\n\t\t\t\t\t$idListExtra.= ','.$rs['extra']['adjunto'];\r\n\t\t\t\t\t$idArrayExtra[$rs['extra']['adjunto']][$rs['gal_id']] = $i;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$idList = substr($idList,1);\r\n\t\t\t$idListExtra = substr($idListExtra,1);\r\n\t\t}\r\n\t\t\r\n\t\t// Cargo los adjuntos extras del item\r\n\t\t$im = $this->loadItemsExtras($im, $idListExtra, $idArrayExtra);\r\n\r\n\t\t// Cargo los adjuntos del item\r\n\t\t$im = $this->loadAdjuntos($im, $idList, $idArray);\r\n\t\t\r\n\t\t// Cargo los art relacionados del item\r\n\t\t$im = $this->loadNotas($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo los comentarios del item\r\n\t\t$im = $this->loadComentarios($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo el mapa asociado al item\r\n\t\t// $im = $this->mapa($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo información de etiquetas del item\r\n\t\t$im = $this->tags($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo información de estadísticas del item\r\n\t\t$im = $this->stats($im, $idList, $idArray);\r\n\r\n\t\t// Cargo información reversa del item\r\n\t\tif ($this->reverse) {\r\n\t\t\t// Cargo los adjuntos a los que se asoció el item\r\n\t\t\t$im = $this->loadReverseAdjuntos($im, $idList, $idArray);\r\n\t\t\t\r\n\t\t\t// Cargo los art relacionados asociados al item\r\n\t\t\t$im = $this->loadReverseNotas($im, $idList, $idArray);\t\r\n\t\t}\r\n\r\n\t\t/* Consultando si posee cache */\r\n\t\tif ($this->_cacheOK) {\r\n\t\t\r\n\t\t\t$this->log.= '- Guardando consulta en Cache. <br/>';\r\n\r\n\t\t\t$cacheName = md5($oSqlFinal);\r\n\r\n\t\t\t$cacheData = array();\r\n\t\t\t$cacheData['totalPaginas'] = $this->totalPaginas;\r\n\t\t\t$cacheData['totalResultados'] = $this->totalResultados;\r\n\t\t\t// $cacheData['facetas'] = $this->facetas;\r\n\t\t\t$cacheData['im'] = $im;\r\n\r\n\t\t\t// consulta si posee cache, sino lo guarda por 24 hs.\r\n\t\t\t$cacheExpire = !empty($this->cacheExpire) ? $this->cacheExpire : 86400;\r\n\r\n\t\t\tif ($this->cache->set($cacheName, $cacheData, $cacheExpire)) {\r\n\r\n\t\t\t\t$this->log.= '- Información guardada en cache por:'.$cacheExpire.' segundos. <br/>';\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$this->log.= '- Error al guardar información en cache.<br/>';\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $im;\r\n\t}", "title": "" }, { "docid": "cc1af9b74bb6373e5ba136199b1a869a", "score": "0.46204364", "text": "public function cache_exists() {\n return isset($this->static_cache[$this->cache_name]);\n }", "title": "" }, { "docid": "cbc07626413f393029c51ece1c59d89b", "score": "0.46147287", "text": "abstract public function needsExecution(): bool;", "title": "" }, { "docid": "5c5cb42fa81ace06899c94f6f1f334cf", "score": "0.46136022", "text": "public function checkiscached()\n {\n $template = 'user/cachedemo/checkiscached.tpl';\n\n // force caching on\n $this->view->setCaching(Zikula_View::CACHE_ENABLED);\n\n //force local cache lifetime\n $localcachelifetime = 31;\n $this->view->setCacheLifetime($localcachelifetime);\n\n // check to see if the tempalte is cached, if not, get required data\n if (!$this->view->is_cached($template)) {\n // manufactured wait to demo DB fetch or something resource intensive\n sleep(5);\n\n $this->view->assign('time', microtime(true));\n $this->view->assign('localcachelifetime', $localcachelifetime);\n }\n return $this->view->fetch($template);\n }", "title": "" }, { "docid": "e85267a12aee2c1d5b06851ef36221d4", "score": "0.46085775", "text": "private function maybe_clear_storage() {\n\t\tif ( '1' === Param::request( 'clear_results' ) ) {\n\t\t\tdelete_option( 'rank_math_seo_analysis_results' );\n\t\t\twp_safe_redirect( Security::remove_query_arg_raw( 'clear_results' ) );\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "83d5e42ae651e0378d9f36702d62a5c7", "score": "0.45958245", "text": "protected function checkDefeatAudioCache(): bool\n {\n $assertion = true;\n $result = $this->parser->data['options']['drive_options']['defeat_audio_cache'];\n $check = self::DEFEAT_AUDIO_CACHE_DISABLED;\n\n return $this->scoreResult($result, $assertion, $check);\n }", "title": "" }, { "docid": "7d74421e900815a8736aca59b2b289fd", "score": "0.45953095", "text": "protected function obtainNonCachedData()\n\t{\n\t}", "title": "" }, { "docid": "4caf74662cc684bd1e23fa7b5a6ce75f", "score": "0.45941424", "text": "public function getCached();", "title": "" }, { "docid": "f50e8a0c388079796b1e81c3d10f22c0", "score": "0.45899394", "text": "public function detect(){\n\t\t/*\n\t\t$cache=$this->isAnalysisCached();\n\t\tif($cache)\n\t\t\treturn $cache;\n*/\n\t\t$r=parent::detect();\n\t\t$r=$this->prepareResult();\n\t\t\n\t\t// saving the result of detection into the database for caching\n\t\t$r=$this->cacheAnalysis($r);\n\t\t\n\t\t$r->id=(string)$r->_id;\n\t\tunset($r->_id);\n\t\treturn (array)$r;\n\t}", "title": "" }, { "docid": "83d384c1258c11017c964f84a955d96f", "score": "0.4575388", "text": "function qed_check( $check_name, $ignore_cache = false ) {\r\n\t\tstatic $cache = array();\r\n\r\n\t\tif ( ! isset( $cache[ $check_name ] ) || $ignore_cache ) {\r\n\t\t\t$result = false;\r\n\t\t\tswitch ( $check_name ) {\r\n\t\t\t\tcase 'media_category_taxonomy_exists':\r\n\t\t\t\t\t$result = taxonomy_exists( 'media_category' );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'is_wpml_in_use':\r\n\t\t\t\t\t$result = defined( 'ICL_SITEPRESS_VERSION' ); // function_exists( 'icl_object_id' );.\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'is_wordpress_seo_in_use':\r\n\t\t\t\t\t$result = defined( 'WPSEO_VERSION' );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$cache[ $check_name ] = $result;\r\n\t\t}\r\n\r\n\t\treturn $cache[ $check_name ];\r\n\t}", "title": "" }, { "docid": "a0c9e3c8fa1601966b1acb0a154ededc", "score": "0.45711517", "text": "public function exist_cache(){\n\t\t\t\n\t\t\tif (!$this->CachedString->isHit()) {\n\t\t\t\treturn false;\n\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "9efaa3bda54b46384b29342b217b43ff", "score": "0.45685363", "text": "public function refreshCache()\n\t{\n\t\t$vsid = $this->getID();\n\t\tif (false === ($result = GDO::table('GWF_VoteScoreRow')->selectFirst(\"AVG(vsr_score), SUM(vsr_score), COUNT(*)\", \"vsr_vsid={$vsid}\", '', NULL, GDO::ARRAY_N)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->saveVars(array(\n\t\t\t'vs_avg' => $result[0] === NULL ? $this->getInitialAvg() : $result[0],\n\t\t\t'vs_sum' => $result[1],\n\t\t\t'vs_count' => $result[2],\n\t\t));\n\t}", "title": "" }, { "docid": "03362c1938fd27c07f3ef9abb950d962", "score": "0.45562294", "text": "function _slack_call_api_cached($slack, $method, $args, $ttl = MICROBOT_TTL_1_MINUTE) {\n if (!is_a($slack, 'Slack')) {\n throw new Exception(__FUNCTION__ . \" was called with an invalid Slack instance; did you forget to pass one in?\");\n }\n $cache_filename = MICROBOT_TMP_DIR . \"/slack.\" . $method . \".\" . sha1(json_encode($args)) . \".ttl\" . $ttl . \".json\";\n if (file_exists($cache_filename) && (time() - filemtime($cache_filename)) < $ttl) {\n return json_decode(file_get_contents($cache_filename), true);\n }\n\n $resp = $slack->call($method, $args);\n file_put_contents($cache_filename, json_encode($resp));\n return $resp;\n}", "title": "" }, { "docid": "81c30bf6393c777ccc928db5b7803784", "score": "0.45554203", "text": "private function manage_cache(){\n if ( ! laterpay_check_is_vip_classic() || ! function_exists( 'vary_cache_on_function' ) ) {\n return;\n }\n $client_options = LaterPay_Helper_Config::get_php_client_options();\n $skip_cache_for_cookie = sprintf( '$skip_cache_keys = array( \"laterpay_tracking_code\", \"%s\" );', sanitize_key( $client_options[\"token_name\"] ) );\n $skip_cache_for_cookie .= '\n foreach ( $skip_cache_keys as $key ) {\n if ( array_key_exists( $key, $_COOKIE ) ) {\n return;\n }\n }\n if ( ! empty( $_GET[\"lptoken\"] ) ) {\n return;\n }\n return true;';\n\n vary_cache_on_function( $skip_cache_for_cookie );\n\n if ( ! function_exists( 'batcache_cancel' ) ) {\n return;\n }\n $skip_cache_keys = array(\n 'laterpay_tracking_code',\n $client_options[\"token_name\"],\n );\n foreach ( $skip_cache_keys as $key ) {\n if ( array_key_exists( $key, $_COOKIE ) ) { // phpcs:ignore\n // Cancel adding cache if cookie is present since it can be user specific content.\n batcache_cancel();\n return;\n }\n }\n if ( ! empty( $_GET['lptoken'] ) ) { // When laterpay payment api redirects to set token in cookie.\n batcache_cancel();\n return;\n }\n }", "title": "" }, { "docid": "69806e95aea799a798f645b7052d662e", "score": "0.45499074", "text": "public function hasCache() {\n return !!$this->cache;\n }", "title": "" }, { "docid": "1bab89ba1d9c37c66653e8938516f692", "score": "0.45470914", "text": "static public function get_cached_source( $schedule_id, $source_type = false ) {\n if( !( ( $uploads = wp_upload_dir( current_time( 'mysql' ) ) ) && false === $uploads[ 'error' ] ) ) {\n return false; // upload dir is not accessible\n }\n if( $source_type ) {\n $source_type = $source_type . '_';\n }\n $cache_file = $uploads[ 'basedir' ] . \"/wpp_import_files/temp/{$schedule_id}/{$source_type}cache.xml\";\n //** Check if a source_cache file exists and is not empty */\n if( file_exists( $cache_file ) && filesize( $cache_file ) ) {\n $xml_data = file_get_contents( $cache_file );\n $result[ 'time' ] = filemtime( $cache_file );\n $result[ 'xml_data' ] = $xml_data;\n return $result;\n }\n return false;\n }", "title": "" }, { "docid": "5afcce580b5916754deac5d1db5073c9", "score": "0.45397237", "text": "public function CacheGetOutput() {\n\t\t$key = $this->CacheKey();\n\n\t\tif ('0' == GetGet('cache')) {\n\t\t\t// Cache temp off, but still gen & set\n\t\t\t$s = NULL;\n\t\t} else {\n\t\t\t// Try get\n\t\t\t$s = $this->oCache->Get($key, $this->CacheLifetime());\n\t\t}\n\n\t\tif (is_null($s)) {\n\t\t\t// Cache invalid, gen and set\n\t\t\t$s = $this->GetOutput();\n\t\t\t$this->oCache->Set($key, $s, $this->CacheLifetime());\n\t\t}\n\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "4a20864d6b608b2c0fd20c5b56ff9a60", "score": "0.45347184", "text": "public function save($notifyJsonCache = true) {\r\n\t\tglobal $wpdb;\r\n\t\t// TODO: check permissions\r\n\t\tUwr1resultsHelper::enforcePermission( 'save' );\r\n\r\n\t\t// check if a result for this fixture already exists.\r\n\t\t// otherwise, the submitter name get overwritten and that sucks.\r\n\t\t$doSave = false;\r\n\r\n\t\t// kludge: use an internal second instance of this class\r\n\t\t$tmpInstance = new Uwr1resultsModelResult();\r\n\t\t$oldResult = $tmpInstance->findById($this->id());\r\n\r\n\t\t$this->updatePoints();\r\n\t\t$changes = Uwr1resultsModel::diff($oldResult->properties, $this->properties);\r\n\t\t// ignore all fields which are not relevant for the decission of $doSave\r\n\t\t$ignoreFields = array('userId', 'modified',\r\n\t\t\t\t\t\t\t'goalsHalfBlue', 'goalsHalfWhite',\r\n\t\t\t\t\t\t\t'goalsRegularBlue', 'goalsRegularWhite');\r\n\t\tforeach ($ignoreFields as $field) {\r\n\t\t\tunset($changes->$field);\r\n\t\t}\r\n\r\n\t\t// all cases where an update is needed:\r\n\t\t// 1) new result (there is no old result)\r\n\t\tif (!$doSave && !@$oldResult->id()) {\r\n\t\t\t$doSave = true;\r\n\t\t}\r\n\t\t// 2) result changed (we optimistically assume the new one is a correction)\r\n\t\tif (!$doSave && \r\n\t\t\t(isset($changes->goalsBlue) || isset($changes->goalsWhite))\r\n\t\t\t) {\r\n\t\t\t$doSave = true;\r\n\t\t}\r\n\t\t// 3) comment changed and not set to empty string\r\n\t\t$newComment = trim(@$changes->comment['new']);\r\n\t\tif (!$doSave && !empty($newComment)) {\r\n\t\t\t$doSave = true;\r\n\t\t}\r\n\t\tunset($newComment);\r\n\t\t\r\n\t\tif (!$doSave) { return; }\r\n\r\n\r\n\t\t$this->updatePoints();\r\n\t\t\r\n\t\t// re-compute $changes after updatePoints\r\n\t\t$changes = Uwr1resultsModel::diff($oldResult->properties, $this->properties);\r\n\t\t// ignore fields which are not user-settable\r\n\t\t$ignoreFields = array('modified',\r\n\t\t\t\t\t\t\t'goalsHalfBlue', 'goalsHalfWhite',\r\n\t\t\t\t\t\t\t'goalsRegularBlue', 'goalsRegularWhite');\r\n\t\tforeach ($ignoreFields as $field) {\r\n\t\t\tunset($changes->$field);\r\n\t\t}\r\n\r\n\t\t// escape and quote $comment\r\n\t\t$comment = $this->comment();\r\n\t\t$this->set( 'comment', \"'\" . Uwr1resultsHelper::sqlEscape( $comment ) . \"'\" );\r\n\r\n\t\t$fields = array();\r\n\t\t$values = array();\r\n\t\tforeach ($this->dbMapping as $prop => $dbField) {\r\n\t\t\t$fields[] = $dbField;\r\n\t\t\t$values[] = $this->$prop();\r\n\t\t}\r\n\t\t$fieldsStr = \"`\" . implode(\"`, `\", $fields) . \"`\";\r\n\t\t$valuesStr = implode(\", \", $values);\r\n/*\t\t\r\n\t\t$sql = 'REPLACE INTO `'.parent::getTable(get_class($this)).'`'\r\n\t\t\t. ' (`fixture_ID`, `user_ID`, `result_modified`, `result_goals_b`, `result_goals_w`)'\r\n\t\t\t. ' VALUES'\r\n\t\t\t. ' (' . $this->fixtureId() . ', ' . intval($current_user) . ', NOW(), ' . intval($_POST['goalsBlue']) . ', ' . intval($_POST['goalsWhite']) . ')';\r\n*/\r\n\t\t// For now: only one result per game: resultId == fixtureId\r\n\t\t$sql = 'REPLACE INTO `'.parent::getTable(get_class($this)).'`'\r\n\t\t\t. \" ({$fieldsStr})\"\r\n\t\t\t. ' VALUES'\r\n\t\t\t. \" ({$valuesStr})\";\r\n\t\t//print $sql;exit;\r\n\t\t$res = $wpdb->query($sql);\r\n\t\t\r\n\t\tif ($res && $notifyJsonCache) {\r\n\t\t\t$this->notifyJsonCache($this->leagueSlug(), __FILE__);\r\n\t\t}\r\n\r\n\t\t// TODO: change return type: $result_id on success, false otherwise\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "ac0d62ba85a7be6ea016629bf81e17b3", "score": "0.45290223", "text": "public function test_are_we_setting_the_cache()\n {\n $gracenote = new \\Atomescrochus\\Gracenote\\Gracenote();\n $gracenote->searchType('track_title');\n $gracenote->query('poker face');\n $cache_key = 'track_title-poker face';\n $gracenote->search();\n\n $this->assertTrue(Cache::has($cache_key));\n\n // remove it from cache, just in case it would interfer with future test\n Cache::forget($cache_key);\n $this->assertFalse(Cache::has($cache_key));\n }", "title": "" }, { "docid": "9a8aef022d935fccd2d7eb1fe3ddc5ea", "score": "0.45234227", "text": "private function isCached() {\n $name = \"body\" . md5(Router::getInstance()->getController() . Router::getInstance()->getAction()) . \".min.js\";\n clearstatcache(true, $this->getJsDir() . $name);\n // check if the file exists\n if (file_exists($this->getJsDir().$name)) {\n if ($this->config['cache']['ttl'] == 0) return true;\n $limit = (time() - $this->config['cache']['ttl']);\n // check if the file is recent\n if ($limit > filemtime($this->getJsDir() . $name)) {\n return true;\n }\n return false;\n } else\n return false;\n }", "title": "" }, { "docid": "4d113fb410016dce8fc421308a131803", "score": "0.4523342", "text": "public function execute()\n { \n $jsonResp['incache'] = false;\n $params = $this->getRequest()->getParams(); \n if(empty($params['cachecheeck']) == false) {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $sessionManager = $objectManager->create('\\Magento\\Framework\\Session\\SessionManagerInterface');\n $jsonFactory = $objectManager->create('\\Magento\\Framework\\Controller\\Result\\JsonFactory');\n $isInCache = $sessionManager->getNotInCache();\n if($isInCache) {\n $sessionManager->unsNotInCache();\n $jsonResp['incache'] = true; \n }\n $result = $jsonFactory->create();\n\t\t return $result->setData($jsonResp);\n \n } else {\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }\n }", "title": "" }, { "docid": "9b47c67d4268278cf200482c2dfa399f", "score": "0.45231894", "text": "public function cache()\n\t{\n\t\t$sources = $this->getSources();\n\t\tforeach ($sources as $source) {\n\t\t\t$source->cache();\n\t\t};\n\t}", "title": "" }, { "docid": "45fac12873f7e823912f9f4c34d2da57", "score": "0.4519064", "text": "public function should_cache() {\n return (($this->method == HTTP_Request2::METHOD_GET) && $this->config['cache']) || $this->config['force_cache'];\n }", "title": "" }, { "docid": "6495e94618e9b0997b109071fd022b5b", "score": "0.45149752", "text": "public static function share_cache(){\n self::$cache_shared = true;\n }", "title": "" }, { "docid": "eb0fa60dff69ddfe11d077f189d50b91", "score": "0.45116335", "text": "protected function getFromCache()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "6cbc6952d9b18b67ce992aea942ad628", "score": "0.45073825", "text": "function smarty_core_read_cache_file( &$params, &$smarty )\r\n{\r\n static $content_cache = array( );\r\n if ( $smarty->force_compile )\r\n {\r\n return FALSE;\r\n }\r\n if ( isset( $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']] ) )\r\n {\r\n $smarty->_cache_info = $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']][1];\r\n $params['results'] = $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']][0];\r\n return TRUE;\r\n }\r\n if ( !empty( $smarty->cache_handler_func ) )\r\n {\r\n call_user_func_array( $smarty->cache_handler_func, array(\r\n \"read\",\r\n $smarty,\r\n $params['results'],\r\n $params['tpl_file'],\r\n $params['cache_id'],\r\n $params['compile_id'],\r\n NULL\r\n ) );\r\n }\r\n else\r\n {\r\n $_auto_id = $smarty->_get_auto_id( $params['cache_id'], $params['compile_id'] );\r\n $_cache_file = $smarty->_get_auto_filename( $smarty->cache_dir, $params['tpl_file'], $_auto_id );\r\n $params['results'] = $smarty->_read_file( $_cache_file );\r\n }\r\n if ( empty( $params['results'] ) )\r\n {\r\n return FALSE;\r\n }\r\n $_contents = $params['results'];\r\n $_info_start = strpos( $_contents, \"\\n\" ) + 1;\r\n $_info_len = ( integer )substr( $_contents, 0, $_info_start - 1 );\r\n $_cache_info = unserialize( substr( $_contents, $_info_start, $_info_len ) );\r\n $params['results'] = substr( $_contents, $_info_start + $_info_len );\r\n if ( $smarty->caching == 2 && isset( $_cache_info['expires'] ) )\r\n {\r\n if ( 0 - 1 < $_cache_info['expires'] && $_cache_info['expires'] < time( ) )\r\n {\r\n return FALSE;\r\n }\r\n }\r\n else if ( 0 - 1 < $smarty->cache_lifetime && $smarty->cache_lifetime < time( ) - $_cache_info['timestamp'] )\r\n {\r\n return FALSE;\r\n }\r\n if ( $smarty->compile_check )\r\n {\r\n $_params = array( \"get_source\" => FALSE, \"quiet\" => TRUE );\r\n foreach ( array_keys( $_cache_info['template'] ) as $_template_dep )\r\n {\r\n $_params['resource_name'] = $_template_dep;\r\n if ( !$smarty->_fetch_resource_info( $_params ) || $_cache_info['timestamp'] < $_params['resource_timestamp'] )\r\n {\r\n return FALSE;\r\n }\r\n }\r\n if ( isset( $_cache_info['config'] ) )\r\n {\r\n $_params = array(\r\n \"resource_base_path\" => $smarty->config_dir,\r\n \"get_source\" => FALSE,\r\n \"quiet\" => TRUE\r\n );\r\n foreach ( array_keys( $_cache_info['config'] ) as $_config_dep )\r\n {\r\n $_params['resource_name'] = $_config_dep;\r\n if ( !$smarty->_fetch_resource_info( $_params ) || $_cache_info['timestamp'] < $_params['resource_timestamp'] )\r\n {\r\n return FALSE;\r\n }\r\n }\r\n }\r\n }\r\n $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']] = array(\r\n $params['results'],\r\n $_cache_info\r\n );\r\n $smarty->_cache_info = $_cache_info;\r\n return TRUE;\r\n}", "title": "" }, { "docid": "6166c21746761a7ceca21bff6fe5a08d", "score": "0.45054048", "text": "public function isUsingMemoized()\n\t{\n\t\treturn $this->_useMemoized;\n\t}", "title": "" }, { "docid": "8b374aa7ec6e91e14446efc432b94e51", "score": "0.4503109", "text": "function workflow_invalidate_cache() {\n workflow_load_all(TRUE);\n}", "title": "" }, { "docid": "1d6f823eac50f24baf6a4fb0810f631d", "score": "0.45026395", "text": "function check_cache($file) {\n\t\tif(!$this->cache['cache_enable']) {\n\t\t\t$this->cache['cached'] = false;\n\t\t\treturn false;\n\t\t}\n\t\tif(!@file_exists($file)) {\n\t\t\t$this->cache['cached'] = false;\n\t\t\treturn false;\n\t\t}\n\t\t$this->cache['cached'] = true;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "42514d5779f1159a7d1b21fd512ef47d", "score": "0.4498361", "text": "public function configurationIsCached(): bool\n {\n return false;\n }", "title": "" }, { "docid": "08db3164f7f2b145ad548a67c761bda0", "score": "0.44904435", "text": "public function isCached() {\n return $this->_is_cached ? $this->_createCacheKey($this->getId()) : false;\n }", "title": "" }, { "docid": "be1be0bdf479100a6c26d02a868600e9", "score": "0.44900268", "text": "public function testDoSaveWithDefinedLifeTime()\n {\n $this->primaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->secondaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->assertEquals(true, $this->cache->save('panda', 'asdf', 123));\n }", "title": "" }, { "docid": "91215df5a767e0e6dfbfc7ac4d8fd661", "score": "0.44790623", "text": "public function testDoSaveWithDefaultLifeTime()\n {\n $this->primaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->secondaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->assertEquals(true, $this->cache->save('panda', 'asdf'));\n }", "title": "" }, { "docid": "ab6d55bdfd2db6ee8d4a44d62ecec012", "score": "0.44766867", "text": "function isCached()\n\t{\n\t\treturn $this->is_cached ;\n\t}", "title": "" }, { "docid": "43251772ec413af5f278e4e1bb9c18f0", "score": "0.44700038", "text": "function RecalculateSharingRules()\n{\n\tglobal $log;\n\t$log->debug(\"Entering RecalculateSharingRules() method ...\");\n\tglobal $adb;\n\n\t$log->debug(\"Exiting RecalculateSharingRules method ...\");\t\n\t\t\t\t\n}", "title": "" }, { "docid": "384beb5edae66eb27afb72143c73771b", "score": "0.4468517", "text": "public function updateCache()\n {\n $update_cache_process = update_option( 'sprout_logged_errors', $this->cache, 'no' );\n\n if( !$update_cache_process ) {\n return False;\n }\n\n return True;\n }", "title": "" }, { "docid": "b513918c4f12d5313d971e0006fb184b", "score": "0.4458395", "text": "public static function CacheExists($what)\n\t{\n\t\tif(isset(self::$cache[$what]))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "4dbcb33ef8c5274e1a4c5e249aadd047", "score": "0.4451571", "text": "public function getFromCache()\n {\n $hash = sha1($this->properties['orContent']);\n //if cache is not enabled we leave from here\n if ($this->properties[self::ENABLE_CONTENT_CACHE] !== true) {\n return false;\n }\n\n foreach ($this->properties[self::ASSIGNED] as $var => $val) {\n ${$var} = $val;\n }\n $_cache = new Cache($this->cacheStorage);\n //we load our sourcecode from cache\n $this->properties[self::SOURCE] = $_cache->load($hash);\n\n if($this->properties[self::SOURCE] === null){\n return false;\n }\n\n $this->properties[self::SOURCE] = \"<!-- Aria Framework Cached -->\\n\".$this->properties[self::SOURCE];\n ob_start();\n $e = eval('?>' . $this->properties[self::SOURCE]);\n $this->properties[self::OUTPUT] = ob_get_clean();\n if ($e === false) {\n die(\"Error: unable to compile template\");\n }\n\n return true;\n }", "title": "" }, { "docid": "ea935c088d327b0b8b300f4bebc65a38", "score": "0.4449083", "text": "private function loadCache() {\n\t\t$cache = get_site_option(self::OPTION_KEY);\n\t\tif ($cache === false) {\n\t\t\treturn $this->updateCache();\n\t\t}\n\t\t$this->cache = $cache;\n\t}", "title": "" }, { "docid": "3d6b0b67ce192db5bbb6834e61eb8d6a", "score": "0.4447546", "text": "private function isUsed(): bool\n {\n\n return ($this->success\n or (($this->local_status ?? Transaction::LOCAL_STATUS_INIT) != Transaction::LOCAL_STATUS_INIT)\n or $this->cashier_id // i.e. do not reuse those created by admin, not that it matters though.\n );\n }", "title": "" }, { "docid": "baf8a7e1d66d4ffca5d2fa13b364e999", "score": "0.44465595", "text": "public function configurationIsCached()\n {\n return false;\n }", "title": "" }, { "docid": "0cede0eb594cfc444bc30603cd3b2adf", "score": "0.44417682", "text": "private function __cache() { \n \n // Save the data to the cache.\n $this->cache->set($this->method, $this->endpoint, $this->query, [\n 'status' => $this->status,\n 'data' => $this->data,\n 'features' => $this->features\n ]);\n \n }", "title": "" }, { "docid": "f872129216499fbec1e78779c2cf933c", "score": "0.4437814", "text": "public function syncValues() {\n\t\t$DashboardKpi = ClassRegistry::init('Dashboard.DashboardKpi');\n\t\t$kpi = $DashboardKpi->find('list', [\n\t\t\t'fields' => ['id'],\n\t\t\t'recursive' => -1\n\t\t]);\n\n\t\t$ret = true;\n\t\tforeach ($kpi as $kpiId) {\n\t\t\t$ret &= $DashboardKpi->recalculate($kpiId);\n\t\t}\n\n\t\t$ret &= $this->_saveInternalLog(DashboardLog::TYPE_RECALCULATION);\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "1acb25ca843db6122f2ef7a0e192ab91", "score": "0.44374546", "text": "public function injectFindMatchResultsCache(\\F3\\FLOW3\\Cache\\Frontend\\VariableFrontend $cache) {\n\t\t$this->findMatchResultsCache = $cache;\n\t}", "title": "" }, { "docid": "26a3db560689399a5611fac1def031aa", "score": "0.44291365", "text": "public static function maybe_cached_request( $url, $args ) {\n\t\t$data = static::get_data( $url );\n\n\t\tif ( ! empty( $data ) ) {\n\t\t\t// check to see if this request is expired\n\t\t\tstatic::check_for_expired_result( $data, $args );\n\n\t\t\treturn $data;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0be02282b657f98cf56430f73b9de0b7", "score": "0.44271722", "text": "function _cacheMiss($cache, $id) {\n\t\t$submission = $this->getById($id, null, false);\n\t\t$cache->setCache($id, $submission);\n\t\treturn $submission;\n\t}", "title": "" }, { "docid": "bf1963d1715a4bff8504e158657231a8", "score": "0.44263747", "text": "function optimizeTables() {\r\n $db =& $this->state->getByRef('db');\r\n\t if (!$this->canExecute('lastOptimization', $this->getRandomTime(300000, 600000))) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t$paramsSettings = $this->createParamsObject();\r\n\t\t\t$paramsSettings->setField('lastOptimization', $db->getDateString());\r\n\t\t\t$this->callService('Settings', 'updateSetting', $paramsSettings);\r\n\t\t}\r\n return $this->runOptimizeTables();\t\t\r\n\t}", "title": "" }, { "docid": "3422174a5e88f65a82fd0276c8c27e73", "score": "0.44221178", "text": "function previous_references_get_cache(){\n\t\tif ($data = cache_get('previous_references_data','cache')){\n\t\t\treturn $data->data;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "430547571b1134b72d49edc109c52f26", "score": "0.4420516", "text": "public function execute()\n {\n // Parse external values\n $this->parseExternalValues();\n\n // Compare external values\n $result = false;\n if ( $this->monolingualTextValueComparer ) {\n $result = $this->monolingualTextValueComparer->execute();\n }\n\n return $result;\n }", "title": "" }, { "docid": "4cf4b8a8ae2010bfc1e0c4e3c04d68bd", "score": "0.44068968", "text": "public function hasResult(): bool;", "title": "" }, { "docid": "ebe4be41ef4a563a4270d4cb0ecf6b17", "score": "0.44055942", "text": "private function checkCacheGet(){\n\t\t$cache_path = $this->cachePath();\n\t\t\n\t\t// Check we're not being run by PHP-CLI\n\t\tif(php_sapi_name() == 'cli'){\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Do we have a cached version?\n\t\tif(!file_exists($cache_path)){\n\t\t\tMagicLogger::log(\"No cache file exists at {$cache_path}.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Has the cached file expired?\n\t\tif(filemtime($cache_path) < strtotime('1 hour ago')){\n\t\t\tMagicLogger::log(\"File at {$cache_path} too old.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// No caching if the user is logged in.\n\t\tif($this->checkCacheGetHasUser()){\n\t\t\tMagicLogger::log(\"User is logged in, not serving cached file {$cache_path}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// No caching if there is a POST operation going on\n\t\tif(count($_POST) > 0){\n\t\t\tMagicLogger::log(\"Request is a POST, not serving {$cache_path}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// None of the above true? We can served a cached file.\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "f9c73e042073ed440c38fe726c015b8a", "score": "0.43985003", "text": "function si_exhibition_cache($cache_name, $cache_data_index, $overwrite = FALSE, $permanent = FALSE){\n global $tnum;\n si_exhibition_debug(\"si_exhibition_cache $cache_name | $cache_data_index | $overwrite | $permanent |\");\n if (!variable_get('si_exhibition_cache_on',TRUE)){\n si_exhibition_debug(\"si_exhibition_cache is turned off\");\n if ($overwrite !== FALSE) return $overwrite; //If caching is turned off, don't use caching!\n return NULL;\n }\n $prefix = 'si_exhibition_cache_';\n $cache_table_for_clearing = 'cache';\n if ($overwrite === FALSE){\n $cache = NULL;\n if ($cache_info = cache_get($prefix.$cache_name, $cache_table_for_clearing)){\n $cache = $cache_info->data;\n if ($cache_data_index == ''){\n si_exhibition_debug(\"si_exhibition_cache returning entire cache\", $cache);\n //return the entire cache\n return $cache;\n }\n if (array_key_exists($cache_data_index, $cache)){\n si_exhibition_debug(\"si_exhibition_cache returning specific cache\", $cache[$cache_data_index]);\n return $cache[$cache_data_index];\n }\n }\n }else{\n /*\n if (!is_string($overwrite)){\n if (empty($tnum)) $tnum = 0;\n $tnum++;\n print 'NOT STRING wbt';\n var_dump($overwrite);\n debug_print_backtrace();\n if ($tnum > 1) exit();\n }\n */\n $data = array();\n if ($cache_info = cache_get($prefix.$cache_name, $cache_table_for_clearing)){\n $data = $cache_info->data;\n }\n $data[$cache_data_index] = $overwrite;\n $hours = 3;\n $expire_date_time = time() + 60 * 60 * $hours;\n if ($permanent === TRUE){\n $expire_date_time = CACHE_PERMANENT;\n }\n si_exhibition_debug(\"si_exhibition_cache setting cache $prefix | $cache_name\", $data);\n cache_set($prefix.$cache_name, $data, $cache_table_for_clearing, $expire_date_time);\n return $overwrite;\n }\n si_exhibition_debug(\"si_exhibition_cache returning nothing found in cache\");\n return NULL;\n}", "title": "" }, { "docid": "6f6184cb4a7fbf04d7aa6dcd355ae35a", "score": "0.43920428", "text": "function check_cache ( $url )\n\t{\n\t\t$this->ERROR = \"\";\n\t\t$filename = $this->file_name( $url );\n\n\t\tif ( file_exists( $filename ) )\n\t\t{\n\t\t\t// find how long ago the file was added to the cache\n\t\t\t// and whether that is longer then MAX_AGE\n\t\t\t$mtime = filemtime( $filename );\n\t\t\t$age = time() - $mtime;\n\t\t\tif ( $this->MAX_AGE > $age )\n\t\t\t{\n\t\t\t\t// object exists and is current\n\t\t\t\treturn 'HIT';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// object exists but is old\n\t\t\t\treturn 'STALE';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// object does not exist\n\t\t\treturn 'MISS';\n\t\t}\n\t}", "title": "" }, { "docid": "1c66ee2c4cb1b286ed76e4fa3928198c", "score": "0.43885598", "text": "function touchCache() {\n $result = false;\n try {\n $result = $this->query(\n \"UPDATE Cache SET time = '{$time}' WHERE id = '{$id}';\" \n );\n }\n catch (PDOException $e) {\n die($e->getMessage());\n }\n return $result;\n }", "title": "" }, { "docid": "5cf02aeb6d9e958a85fa0220868b262f", "score": "0.43873352", "text": "public function initcache(){\n $this->cpanel_api_ver = 'api1';\n return $this->_check_result($this->api1_query($this->user, 'Mysql', __FUNCTION__));\n }", "title": "" } ]
d39d595318bf00ac5a1ff84c16ba0179
Absorb the build from git.
[ { "docid": "2ea1ac473c4f9d3570afda8dbbff1743", "score": "0.79937714", "text": "private function absorbBuild()\n {\n if (($type = $this->config->get('build.git_absorb')) === false) {\n return;\n }\n\n $config = $this->config->getRoot();\n\n $config['build']['number'] = $this->git->getCommit($type);\n\n $this->config->update($config);\n }", "title": "" } ]
[ { "docid": "cd7dbae20affffd816a6f6300e8c7efe", "score": "0.60403705", "text": "private function absorbVersion()\n {\n if (($type = $this->config->get('current.git_absorb')) === false) {\n return;\n }\n\n $version = $this->git->extractVersion(\n $this->git->getVersionFromGit($type)\n );\n\n $config = $this->config->getRoot();\n\n $config['current']['major'] = (int) $version[1][0];\n\n $config['current']['minor'] = (int) $version[2][0];\n\n $config['current']['patch'] = (int) $version[3][0];\n\n $this->config->update($config);\n }", "title": "" }, { "docid": "16739cf40ff65f143487ab43ca2419d5", "score": "0.5715115", "text": "public function gitPull(): void\n {\n $this->git\n ->changeDirectory()\n ->fetch()\n ->reset()\n ->pull();\n }", "title": "" }, { "docid": "f169a95bac7060b73d539afffbfc6d37", "score": "0.5604104", "text": "public function execute() {\r\n try {\r\n if (!$this->has_base_directory()) {\r\n mkdir($this->_directory, 0777, true);\r\n }\r\n\r\n // Make sure we're in the right directory\r\n chdir($this->_directory);\r\n\r\n // only first run\r\n if (!is_dir('./.git')) {\r\n // The \".\" at the end specifies the current folder as the checkout folder!\r\n $this->exec_and_log('Cloning repo for the first time.', \"git clone '\" . $this->_url . \"' .\");\r\n }\r\n\r\n // normal run\r\n else {\r\n\r\n // 1. Move to master branch.\r\n $this->exec_and_log('Switching to master branch.', 'git checkout ' . $this->_branch);\r\n\r\n // 2. Update the local repository\r\n $this->exec_and_log('Pulling in changes.', 'git pull');\r\n\r\n // hidden feature: checkout special revision\r\n\r\n if (isset($_GET['hash']) && $this->is_sha1($_GET['hash'])) {\r\n $hash = $_GET['hash'];\r\n $this->exec_and_log('Checkout previous revision '. $hash.':', 'git checkout '. $hash);\r\n }\r\n }\r\n\r\n // Secure the .git directory\r\n $this->exec_and_log('Securing .git directory.', 'chmod -R og-rx .git');\r\n\r\n $this->log('PULL successful.');\r\n }\r\n catch (Exception $e) {\r\n $this->log($e, 'ERROR');\r\n }\r\n }", "title": "" }, { "docid": "4149cf8a5e6e4421081945ec6848698a", "score": "0.5454768", "text": "public function gitCheckout(string $ref): void\n {\n $this->git\n ->changeDirectory()\n ->fetch()\n ->checkoutTag($ref);\n }", "title": "" }, { "docid": "d32caf03e108814e95c6510c48cfea40", "score": "0.5388621", "text": "public function main()\n {\n if (null === $this->getRepository()) {\n throw new BuildException('\"repository\" is required parameter');\n }\n $remotes = trim($this->getRemote());\n if (null === $remotes || '' === $remotes) {\n throw new BuildException('\"remote\" is required parameter');\n }\n\n $client = $this->getGitClient(false, $this->getRepository());\n $command = $client->getCommand('merge');\n $command\n ->setOption('commit', $this->isCommit())\n ->setOption('q', $this->isQuiet());\n\n if ($this->getMessage()) {\n $command->setOption('message', $this->getMessage());\n }\n\n if (!$this->isCommit()) {\n $command->setOption('no-commit', $this->isNoCommit());\n }\n\n if ($this->isFastForwardCommit()) {\n $command->setOption('no-ff', true);\n }\n\n $strategy = $this->getStrategy();\n if ($strategy) {\n // check if strategy is valid\n if (false === in_array($strategy, $this->validStrategies)) {\n throw new BuildException(\n \"Could not find merge strategy '\" . $strategy . \"'\\n\" .\n \"Available strategies are: \" . implode(', ', $this->validStrategies));\n }\n $command->setOption('strategy', $strategy);\n if ($this->getStrategyOption()) {\n $command->setOption(\n 'strategy-option',\n $this->getStrategyOption()\n );\n }\n }\n\n $remotes = explode(' ', $this->getRemote());\n foreach ($remotes as $remote) {\n $command->addArgument($remote);\n }\n\n $this->log('git-merge command: ' . $command->createCommandString(), Project::MSG_INFO);\n\n try {\n $output = $command->execute();\n } catch (Exception $e) {\n throw new BuildException('Task execution failed.', $e);\n }\n\n $this->log(\n sprintf('git-merge: replaying \"%s\" commits', $this->getRemote()),\n Project::MSG_INFO\n );\n $this->log('git-merge output: ' . trim($output), Project::MSG_INFO);\n\n }", "title": "" }, { "docid": "d78f3b64373f7972e85c92d61f3d5e4d", "score": "0.53662103", "text": "public function doGitFetch()\n {\n $stack = $this->getOption('stack');\n if ($stack) {\n $relativeUrl = sprintf('project/%s/git/fetches', $stack);\n $response = $this->fetchUrl($relativeUrl, 'POST');\n } else {\n throw new \\Exception('[Action:GitFetch] Requires Stack', 1);\n }\n\n if ($response['status'] !== 202) {\n throw new \\Exception('[Error:GitFetch] ' . var_export($response,1), 1);\n }\n\n $relativeUrl = sprintf(\n 'project/%s/git/fetches/%s',\n $stack,\n $response['body']['data']['id']\n );\n\n $timer = 0;\n $sleep = 5;\n $isWaiting = true;\n do {\n $timer += $sleep;\n if ($timer > self::GIT_TIMEOUT) {\n $isWaiting = false;\n throw new \\Exception('[Error:GitFetch] ' . self::GIT_TIMEOUT . 'seconds timeout', 1);\n }\n\n $this->warning('Waiting for 5 seconds...');\n sleep($sleep);\n\n $response = $this->fetchUrl($relativeUrl);\n if ($response['status'] === 200\n && $response['body']['data']['attributes']['status'] === 'Complete'\n ) {\n $this->success('Git Fetch Completed');\n $isWaiting = false;\n }\n } while ($isWaiting);\n\n return $response;\n }", "title": "" }, { "docid": "629ce2299256a22ad11fab8f1893d38f", "score": "0.5146541", "text": "public static function integrate(Event $event): void\n {\n $filesystem = new Filesystem();\n\n $composerBinDir = $event->getComposer()->getConfig()->get('bin-dir');\n $executable = dirname(__DIR__, 2).$filesystem->ensureValidSlashes('/bin/grumphp');\n $composerExecutable = $composerBinDir.'/grumphp';\n $filesystem->copy(\n $filesystem->ensureValidSlashes($executable),\n $filesystem->ensureValidSlashes($composerExecutable)\n );\n\n $commandlineArgs = ProcessArgumentsCollection::forExecutable($composerExecutable);\n $commandlineArgs->add('git:init');\n $process = self::fixInternalComposerProcessVersion($commandlineArgs);\n\n $process->run();\n if (!$process->isSuccessful()) {\n $event->getIO()->write(\n '<fg=red>GrumPHP can not sniff your commits. Did you specify the correct git-dir?</fg=red>'\n );\n $event->getIO()->write('<fg=red>'.$process->getErrorOutput().'</fg=red>');\n\n return;\n }\n\n $event->getIO()->write('<fg=yellow>'.$process->getOutput().'</fg=yellow>');\n }", "title": "" }, { "docid": "e37211899f259745f58e277d708f3a2d", "score": "0.51256263", "text": "public function pull() {\n\t\tif(!is_dir(Enviro::mergePath($this->localPath, '.git'))) {\n\t\t\tthrow new Exception(\"The folder '{$this->localPath}' is not a git repository.\");\n\t\t}\n\t\t$prevDir = getcwd();\n\t\tchdir($this->localPath);\n\t\ttry {\n\t\t\tEnviro::write(\"Updading local repository {$this->owner}/{$this->repository}... \");\n\t\t\tEnviro::run('git', \"checkout {$this->branch}\");\n\t\t\tEnviro::run('git', \"fetch origin\");\n\t\t\tEnviro::run('git', \"reset --hard origin/{$this->branch}\");\n\t\t\tEnviro::run('git', \"clean -f -d\");\n\t\t\tEnviro::write(\"done.\\n\");\n\t\t}\n\t\tcatch(Exception $x) {\n\t\t\tchdir($prevDir);\n\t\t\tthrow $x;\n\t\t}\n\t\tchdir($prevDir);\n\t}", "title": "" }, { "docid": "8e84b67f04d6e26bc63c9196e8fdc583", "score": "0.5105907", "text": "public static function prepareForPantheon()\n {\n // Get rid of any .git directories that Composer may have added.\n // n.b. Ideally, there are none of these, as removing them may\n // impair Composer's ability to update them later. However, leaving\n // them in place prevents us from pushing to Pantheon.\n $dirsToDelete = [];\n $finder = new Finder();\n foreach (\n $finder\n ->directories()\n ->in(getcwd())\n ->ignoreDotFiles(false)\n ->ignoreVCS(false)\n ->depth('> 0')\n ->name('.git')\n as $dir) {\n $dirsToDelete[] = $dir;\n }\n $fs = new Filesystem();\n $fs->remove($dirsToDelete);\n\n // Fix up .gitignore: remove everything above the \"::: cut :::\" line\n $gitignoreFile = getcwd() . '/.gitignore';\n $gitignoreContents = file_get_contents($gitignoreFile);\n $gitignoreContents = preg_replace('/.*::: cut :::*/s', '', $gitignoreContents);\n file_put_contents($gitignoreFile, $gitignoreContents);\n }", "title": "" }, { "docid": "b201fee8abc01c33c36c2035dc57ad76", "score": "0.50694793", "text": "public function actionForceUploadBuilds()\n {\n $developmentAction = new DevelopmentAction(DevelopmentAction::FORCEUPLOAD);\n $developmentAction->performAction();\n }", "title": "" }, { "docid": "401a0d322ecc103b942264eb2a235e7b", "score": "0.5014463", "text": "public function handle() {\n $this->line(exec('git pull'));\n }", "title": "" }, { "docid": "4b9a0070a38ed2988c4ff669d98c8c2e", "score": "0.49999708", "text": "private function buildIfNecessary()\n {\n if (!$this->hasBeenBuilt) {\n $this->build();\n $this->hasBeenBuilt = true;\n }\n }", "title": "" }, { "docid": "28c9823f3e3766f6df52006afc7151b9", "score": "0.49289346", "text": "protected function postIntegrationCleanup() {\n // Convert Git repo to non-Git controlled file directory. This is required\n // to be able to commit the app files to Health project codebase.\n $git_related_files_folders = [\n '.git',\n '.gitignore',\n ];\n $this\n ->consoleIO\n ->write(\"Checking if project uses Git... \");\n foreach ($git_related_files_folders as $file) {\n $git_file_path = $this->appPath . $file;\n if (file_exists($git_file_path)) {\n $command = 'cd ' . escapeshellcmd($this->appPath) . ' && rm -Rf ' . escapeshellcmd($git_file_path);\n $this->executeCommand($command, \"Removing \" . $git_file_path);\n }\n }\n $this\n ->consoleIO\n ->write(\"[DONE]\");\n }", "title": "" }, { "docid": "12841ef31df4680d5184d28a288bb0c6", "score": "0.4897389", "text": "public function execute()\n {\n try{\n if (is_callable($this->beforeDeploy)){\n call_user_func($this->beforeDeploy);\n }\n\n // Discard any changes to tracked files since our last deploy\n $output = shell_exec('git reset --hard HEAD');\n $this->log('Reseting repository... '.$output);\n\n // Update the local repository\n $output = shell_exec('git pull origin master');\n $this->log('Pulling in changes... '.$output);\n\n // Secure the .git directory\n $output = shell_exec('chmod -R og-rx .git');\n $this->log('Securing .git directory... '.$output);\n\n $this->log('Deployment successful!');\n\n if (is_callable($this->afterDeploy)){\n call_user_func($this->afterDeploy);\n }\n }catch (\\Exception $e){\n $this->log($e, 'ERROR');\n }\n }", "title": "" }, { "docid": "e2be8675e66f4c9031ff41ef43a83e4f", "score": "0.48899144", "text": "public function testUpdateGitBranch()\n {\n }", "title": "" }, { "docid": "bc5cb723d8bf65436bf38647a5f4d6af", "score": "0.48794106", "text": "function upgrade_is_git()\n{\n\tif ( SAFE_MODE === true )\n\t{\n\t\treturn false;\n\t}\n\n\tif ( ! is_dir( PML_BASE . DIRECTORY_SEPARATOR . '.git' ) )\n\t{\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "8d80484613d9ef80ed7c7dbe71853829", "score": "0.4861493", "text": "protected function preBuild() {\n }", "title": "" }, { "docid": "050e9c01c2acdf4d3b89aa1b79bc9569", "score": "0.4845944", "text": "function update_fromgit($version_str, &$errmsg){\n\n global $config_ini;\n $taglist = array();\n $errorcnt = 0;\n if(array_key_exists(\"gitcommandpath\", $config_ini)){\n $gitcmd = urldecode($config_ini[\"gitcommandpath\"]);\n if(file_exists($gitcmd)){\n $execcmd = $gitcmd.' config --global core.autoCRLF false';\n exec($execcmd);\n \n $execcmd = $gitcmd.' fetch origin';\n set_time_limit (900);\n exec($execcmd,$result_str);\n foreach($result_str as $line){\n $err_str_pos = mb_strpos($line, \"unable to access\");\n if( $err_str_pos !== false ) {\n $errmsg .= \"network access failed\";\n $errorcnt ++;\n }else if (mb_strstr($line, \"fatal\") !== false) {\n $errmsg .= \"fetch unknown error: $line\";\n $errorcnt ++;\n }\n }\n if($errorcnt > 1){\n return false;\n }\n\n $execcmd = $gitcmd.' reset --hard '.$version_str;\n exec($execcmd,$result_str);\n foreach($result_str as $line){\n $err_str_pos = mb_strpos($line, \"unknown revision\");\n if( $err_str_pos !== false) {\n $errmsg .= \"no version : $version_str\";\n $errorcnt ++;\n }else if (mb_strstr($line, \"fatal\") !== false) {\n $errmsg .= \"reset --hard unknown error: $line\";\n $errorcnt ++;\n }\n }\n }\n }\n \n if($errorcnt > 0) {\n return false;\n }\n \n return true;\n}", "title": "" }, { "docid": "936dc324c49611492a1835a8cd65457d", "score": "0.48357284", "text": "public function handle(Git $git) {\n $version = $this->getTagWithV($this->argument('version'));\n $issues = $this->argument('issues');\n\n $this->info(\"Creating release branch for version {$version}.\");\n\n $this->info(\"Checking out dev branch.\");\n $repo = $git->open(getcwd());\n $repo->checkout('dev');\n\n $this->info(\"Pulling latest dev branch.\");\n $repo->pull();\n\n $this->info(\"Creating release branch.\");\n $issuesFormattedForBranch = str_replace(',', '-', $issues);\n $branchName = \"release/{$version}-{$issuesFormattedForBranch}\";\n try {\n $this->runProcess(\"git checkout -b {$branchName}\");\n } catch (\\Exception $e) {\n if (str_contains($e->getMessage(), 'already exists')) {\n $shouldDeleteIt = $this->confirm(\"Branch {$branchName} already exists. Should we delete it?\", true);\n if ($shouldDeleteIt) {\n $this->runProcess(\"git branch -D {$branchName}\");\n $this->runProcess(\"git checkout -b {$branchName}\");\n } else {\n $this->error(\"Branch {$branchName} already exists. Please delete it or choose a different version.\");\n return;\n }\n }\n }\n\n $this->info(\"Pulling issue branches into release branch.\");\n $issuesArray = explode(',', $issues);\n $issueBranches = $this->findIssueBranches($issuesArray);\n\n $this->mergeBranches($issueBranches);\n\n $this->info(\"Pushing release branch to origin.\");\n $this->runProcess(\"git push origin $branchName\");\n\n $this->info(\"Creating release PR.\");\n $prBody = \"- #\" . implode(\"\\n- #\", $issuesArray) . \"\\n\";\n // We don't run this in testing mode, because I don't feel like figuring out how to mock the gh command for now.\n if (!app()->runningUnitTests()) {\n try {\n $this->runProcess(<<<bash\n gh pr create \\\n --title 'Release {$version}' \\\n --body '$prBody' \\\n --base dev \\\n --head {$branchName} \\\n --assignee @me\n bash);\n } catch (\\Exception $e) {\n $this->warn(\"Failed to create PR. Please create it manually.\");\n }\n }\n\n // Create and push a tag for the release\n $this->info(\"Creating release tag.\");\n // Remove any 'v' from the version number\n $version = str_replace('v', '', $version);\n $this->runProcess(\"git tag -a v{$version} -m 'Release {$version}'\");\n $this->runProcess(\"git push origin v{$version}\");\n\n $this->info(\"Done.\");\n $this->info(\"Branch: {$branchName}\");\n }", "title": "" }, { "docid": "6c77fa0a5055e8d01dbcf2fb48972c52", "score": "0.483529", "text": "public function precommit( ) {\n\t\treturn;\n\t}", "title": "" }, { "docid": "94329ba83bc7b2cc0af357432fa29e5b", "score": "0.48231778", "text": "public function run()\n {\n \t$branch = $this->getParameter('branch');\n \t$remote = $this->getParameter('remote');\n\n \t// Fetch Remote\n $command = 'git fetch ' . $remote;\n $result = $this->runCommandRemote($command) && $result;\n\n // Checkout\n $command = 'git checkout ' . $branch;\n $result = $this->runCommandRemote($command) && $result;\n\n // Check Working Copy status\n $stashed = false;\n $status = '';\n $command = 'git checkout ' . $branch;\n $result = $this->runCommandRemote($command) && $result;\n\n // Stash if Working Copy is not clean\n if(!$status) {\n \t$stashResult = '';\n \t$command = 'git stash';\n \t$result = $this->runCommandRemote($command, $stashResult) && $result;\n \tif($stashResult != \"No local changes to save\") {\n $stashed = true;\n }\n }\n\n // Rebase\n $command = 'git rebase ' . $remote . '/' . $branch;\n $result = $this->runCommandRemote($command) && $result;\n\n // If Stashed, restore.\n if ($stashed) {\n \t$command = 'git stash pop';\n \t$result = $this->runCommandRemote($command) && $result;\n }\n\n return $result;\n }", "title": "" }, { "docid": "3e930098112b35510d39117e24ff65ec", "score": "0.48197645", "text": "private function updateRepoInfo()\n {\n $wrapper = tempnam(storage_path() . '/app/', 'gitssh');\n file_put_contents($wrapper, $this->gitWrapperScript($this->private_key));\n\n $workingdir = tempnam(storage_path() . '/app/', 'clone');\n unlink($workingdir);\n\n $cmd = <<< CMD\nchmod +x \"{$wrapper}\" && \\\nexport GIT_SSH=\"{$wrapper}\" && \\\ngit clone --quiet --branch %s --depth 1 %s {$workingdir} && \\\ncd {$workingdir} && \\\ngit checkout %s --quiet && \\\ngit log --pretty=format:\"%%H%%x09%%an\" && \\\nrm -rf {$workingdir}\nCMD;\n\n //$this->outputToConsole('Checking repository state' . PHP_EOL);\n $process = new Process(sprintf(\n $cmd,\n $this->deployment->project->branch,\n $this->deployment->project->repository,\n $this->deployment->project->branch\n ));\n\n $process->setTimeout(null);\n $process->run();\n\n unlink($wrapper);\n\n if (!$process->isSuccessful()) {\n // FIXME: Handle this situation as it is then unclear what went wrong\n throw new \\RuntimeException('Could not get repository info - ' . $process->getErrorOutput());\n }\n\n $git_info = $process->getOutput();\n\n $parts = explode(\"\\x09\", $git_info);\n $this->deployment->commit = $parts[0];\n $this->deployment->committer = trim($parts[1]);\n $this->deployment->save();\n }", "title": "" }, { "docid": "f94fb0dc614283beb82a40ba01bc14a0", "score": "0.47722572", "text": "function pull()\n\t{\n\t\tif(!$this->_permit('admin')) { $this->_denied(); return; }\n\t\n\t\t// Work outside the web root\n\t\tchdir('../..');\n\t\t\n\t\t// download tar from github\n\t\tsystem('wget --no-check-certificate -O lakshya.tar.gz -o github.log https://github.com/lakshya/website/tarball/master');\n\t\t\n\t\t// unzip into 'beta_new' folder\n\t\tmkdir('beta_new');\n\t\tsystem('tar -xzf lakshya.tar.gz -C beta_new');\n\t\t\n\t\t// copy database & logs from old ones\n\t\tsystem('cp www/beta/application/config/database.php beta_new/lakshya-website-*/www/application/config/database.php');\n\t\tsystem('cp www/beta/application/logs/* beta_new/lakshya-website-*/www/application/logs/');\n\t\t\n\t\t// Delete the old beta backup & create a new one\n\t\tsystem('rm -rf beta_backup');\n\t\tsystem('mv www/beta/ beta_backup/');\n\t\t\n\t\t// Move 'beta_new' to 'beta'\n\t\tsystem('mv beta_new/lakshya-website-*/www/ www/beta/');\n\t\t\n\t\t// Call upgrade on the beta site\n\t\tsystem('wget http://stage.thelakshyafoundation.org/upgrade/');\n\t\t\n\t\t// Remove the temp. files\n\t\tsystem('rm lakshya.tar.gz');\n\t\tsystem('rm github.log');\n\t\tsystem('rm -rf beta_new');\n\t}", "title": "" }, { "docid": "e7a61989b2067453290742a7bfc515fa", "score": "0.47685304", "text": "protected function build() {\n\t\t$this->durationTracker->start( 'build' );\n\n\t\t// Ensure that the directory doesn't already exist to prevent errors. If it does, remove it.\n\t\tif ( $this->filesystem->exists( $this->buildDirectory ) ) {\n\t\t\t$this->cleanup( $this->buildDirectory );\n\t\t}\n\n\t\t$this->cloneRepository( $this->repository->endpoint, $this->pluginBranch, $this->buildDirectory );\n\t\t$this->installDependencies();\n\t\t$this->createZip( $this->zipName );\n\t\t$this->cleanup( $this->buildDirectory );\n\n\t\t$this->openDir( 'zips' );\n\n\t\t$event = $this->durationTracker->stop( 'build' );\n\t\t$this->successMessage( 'Build complete.', $event );\n\n\t\t$this->durationTracker->saveTotalDuration( $event );\n\t}", "title": "" }, { "docid": "51ca2d5f3f7af0a220d34a9e6ccde181", "score": "0.47669557", "text": "public function build() {\n parent::build();\n $this->add_step(new rollover_restore_clean_log_step('clean_log'));\n }", "title": "" }, { "docid": "423d7437a5f215f45ddf53b59f8be870", "score": "0.47650442", "text": "public function git_push() {\n // initialize the git object\n $git = self::get_git_obj();\n $git->clean(false, true);\n // check if gitcreds are set\n $this->options = get_option('gitdown_settings');\n if ( !isset($this->options['github_username'], $this->options['github_password'], $this->options['github_repo'] ) ) {\n // if they're aren't, give up and let user know\n return('Set your credentials');\n } else {\n // get git repo url with creds\n $git_repo = self::get_repo_url();\n // run git push\n $msg = $git->push($git_repo, 'master');\n return('Git push successful. ' . $msg);\n }\n }", "title": "" }, { "docid": "6bce5470848bc536837af5ce7e1cb2f4", "score": "0.47618407", "text": "public function absorb($force = false)\n {\n if ($force) {\n $this->cache->flush();\n }\n\n $this->absorbVersion();\n\n $this->absorbBuild();\n\n return true;\n }", "title": "" }, { "docid": "1c3ead5bfbcae506a5b7a788c3db0664", "score": "0.4758704", "text": "protected function createGitIgnore()\n {\n if (!is_file($path = $this->projectDir.'/.gitignore')) {\n try {\n $client = $this->getGuzzleClient();\n\n $response = $client->get(sprintf(\n 'https://raw.githubusercontent.com/symfony/symfony-standard/v%s/.gitignore',\n $this->getInstalledSymfonyVersion()\n ));\n\n $this->fs->dumpFile($path, $response->getBody()->getContents());\n } catch (\\Exception $e) {\n // don't throw an exception in case the .gitignore file cannot be created,\n // because this is just an enhancement, not something mandatory for the project\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "8e97c82f94dd25098bae2597abcb31cb", "score": "0.47413465", "text": "function main(){\n $configFile = getcwd() . \"/.gh-backup\";\n if(!file_exists($configFile)){\n $configFile = getenv(\"HOME\") . \"/.gh-backup\";\n if(!file_exists($configFile)){\n echoErr(\"Couldn't locate a github backup configuration file\");\n exit(1);\n }\n }\n $configData = parseConfig($configFile);\n\n //Build up a list of repos to backup\n $credentials = array(\n $configData['username'],\n $configData['token']\n );\n $repoList = array();\n $repoList = array_merge(\n $repoList,\n myRepoList($credentials),\n orgsRepoList($credentials)\n );\n if(isset($configData['filter'])){\n $filter = $configData['filter'];\n foreach($repoList as $index => $repo){\n if(preg_match($filter, $repo) == 0){\n unset($repoList[$index]);\n }\n }\n }\n $repoList = array_unique($repoList);\n $repoList = array_values($repoList); # Re-index\n\n $instanceBackupDir = $configData['directory'] . \"/\" . date('Y-m-d');\n exec(\"mkdir -p {$instanceBackupDir}\");\n chdir($instanceBackupDir);\n foreach($repoList as $repoUrl){\n preg_match('/:(.*)\\//', $repoUrl, $matches);\n $entity = $matches[1]; # User or Org\n exec(\"mkdir -p {$entity}\");\n chdir($entity);\n exec(\"git clone --mirror {$repoUrl}\");\n chdir(\"../\");\n }\n}", "title": "" }, { "docid": "8b59f28fdad5e2fd8af2dbfa062242ea", "score": "0.4728857", "text": "private function gitWrapperScript($key_file_path)\n {\n return <<<OUT\n#!/bin/sh\nssh -o CheckHostIP=no \\\n -o IdentitiesOnly=yes \\\n -o StrictHostKeyChecking=no \\\n -o PasswordAuthentication=no \\\n -o IdentityFile={$key_file_path} $*\n\nOUT;\n }", "title": "" }, { "docid": "3ac90bba93b7a6da621b8c851b2dbcfc", "score": "0.47136945", "text": "public function checkoutCommit()\n {\n $this->repository->getCommit($this->payload->getHeadCommit()->getId());\n }", "title": "" }, { "docid": "c135c1702d46a35653f3dba95638ab0b", "score": "0.46913534", "text": "public function testGitBranch()\n {\n }", "title": "" }, { "docid": "a9af9635d1ef30b922e8d7445581c8eb", "score": "0.46680832", "text": "public function initialize()\n {\n if (!GitRepo::isRemoteUrlReadable($this->repoUrl)) {\n throw new GitException('The repo url '.$this->repoUrl.' is not readable');\n }\n if (!is_dir($this->fullRepoPath)) {\n try {\n $this->repo = GitRepo::cloneRepository($this->repoUrl, $this->fullRepoPath);\n $this->logger->info('Repo cloned ('.$this->repoUrl.')');\n } catch (GitException $e) {\n $this->logger->error('Repo clone failed ('.$this->repoUrl.')');\n throw $e;\n }\n } else {\n $this->repo = new GitRepo($this->fullRepoPath);\n }\n $this->handleRepoStatusChange();\n }", "title": "" }, { "docid": "b27d054452c11ebc22dab584ca619c8e", "score": "0.46651438", "text": "protected function doGitOperation($remote)\n\t{\n\t\t// For now, we will just completely remove the source directory\n\t\t// and create it again. Later, we can probably optimize this\n\t\t// to just perform a git rebase or pull, but it works now.\n\t\t$this->file->deleteDirectory($this->paths->source);\n\n\t\t// Create the git command.\n\t\t$gitOperation = strtr(config('git.clone'), [\n\t\t\t'@version@' => $remote,\n\t\t\t'@source@' => $this->paths->source\n\t\t]);\n\n\t\t$this->info(\"Cloning using '{$gitOperation}'\");\n\t\t$this->run($gitOperation);\n\t}", "title": "" }, { "docid": "3fc0f797a77760902fa1e4c971cd21a9", "score": "0.4664693", "text": "public function testRunGitConnectionTest()\n {\n }", "title": "" }, { "docid": "f5e66e24e17c5cd6f747f522ae3fd30e", "score": "0.465781", "text": "static function filterGitURL($url) {\n\t\t//regular expressions to turn invalid git URLs with usernames into valid URLs that can be checked out\n\t\t// without a password prompt appearing (which would block the script)\n\t\t$url = preg_replace('/(\\w+?\\@github\\.com\\:)(.*)/','git://github.com/$2',$url);\n\t\t$url = preg_replace('/(.*?\\/\\/)(\\w+\\@)(.*)/','$1$3',$url);\n\t\t$url = preg_replace('/(\\w+?\\@)(.*)/','git://$2',$url);\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "978fc25cbe41163c6f479e7c8b7104ee", "score": "0.46527177", "text": "public static function clearRepo() {\n $root = dirname(dirname(__DIR__)) . '';\n // Git sub folders.\n exec('find ' . $root . '/drush -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/web/libraries -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/web/modules -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/web/profiles -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/vendor -name \\'.git\\' | xargs rm -rf');\n\n // Examples and build folders.\n exec('rm -f example.gitignore .eslintignore > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"sample\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"samples\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"example\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"examples\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"doc\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"docs\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"tests\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"node_modules\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"bower_components\" | xargs rm -rf > /dev/null 2>&1');\n\n // Single unnecessary file.\n exec('find ' . $root . ' -name \"*.*~\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"*travis*\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"LICENSE*\"| xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"CHANGELOG.*\"| xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"MAINTAINERS.*\"| xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \".DS_Store\"| xargs rm -rf > /dev/null 2>&1');\n }", "title": "" }, { "docid": "8f68447cedbbe788ea276b6c8c55a15a", "score": "0.46382535", "text": "public function resetCommand($site_env_id, $commit, $commit_log)\n {\n // Determine tags\n $test_tags = shell_exec('git tag -l \"*test*\"');\n $test_tags_array = preg_split('/\\s+/', trim($test_tags));\n $last_test_tag = end($test_tags_array);\n $last_test_tag_breakdown = explode('_', $last_test_tag);\n $last_test_tag_number = (int) end($last_test_tag_breakdown);\n $new_tag_number_for_test = $last_test_tag_number + 1;\n\n $live_tags = shell_exec('git tag -l \"*live*\"');\n $live_tags_array = preg_split('/\\s+/', trim($live_tags));\n $last_live_tag = end($live_tags_array);\n $last_live_tag_breakdown = explode('_', $last_live_tag);\n $last_live_tag_number = (int) end($last_live_tag_breakdown);\n $new_tag_number_for_live = $last_live_tag_number + 1;\n \n $live_tag = \"pantheon_live_\" . $new_tag_number_for_live;\n $test_tag = \"pantheon_test_\" . $new_tag_number_for_test;\n\n // Get the site repo\n list($site, $env) = $this->getSiteEnv($site_env_id);\n $env_id = $env->getName();\n $siteInfo = $site->serialize();\n print_r($siteInfo);\n\n $site_id = $siteInfo['id'];\n $repo_path = \"ssh://codeserver.dev.$site_id@codeserver.dev.$site_id.drush.in:2222/~/repository.git\";\n\n // Restore DB from url.\n $clone_op = \"terminus env:clone-content \" . $siteInfo['name'] . \".demo \" . \" dev -y\";\n exec($clone_op);\n\n // Reset history back to the commit passed.\n $this->passthru('git reset --hard ' . $commit);\n\n // Rewrite this breaking commit to be recent.\n $this->passthru('GIT_COMMITTER_DATE=\"$(date)\" git commit --amend --no-edit --date \"$(date)\"');\n\n // Tag breaking commit for deploy to test/live\n $this->passthru('git tag ' . $live_tag);\n $this->passthru('git tag ' . $test_tag);\n \n // Get our commit log into an array.\n $commits = array_map('str_getcsv', file($commit_log));\n\n foreach ($commits as $commit) {\n $this->passthru('echo \"Adding ' . $commit[0] . '\" >> log.txt');\n $this->passthru('git add log.txt');\n $this->passthru('git commit -m \"' . $commit[0] . '\"');\n }\n\n // Force push changes to Pantheon.\n $this->passthru('git remote remove pantheon');\n $this->passthru('git remote add pantheon ' . $repo_path);\n $this->passthru('git push pantheon master --force --tags');\n\n\n\n }", "title": "" }, { "docid": "e69206a7454d394c018f8cd2676c17c1", "score": "0.463367", "text": "public function restoreStashedBranch()\n {\n if (null === $this->stashedBranch) {\n return;\n }\n\n if (!$this->isWorkingTreeReady()) {\n throw new \\RuntimeException(\n sprintf(\n 'The Git working tree has uncommitted changes, unable to checkout your working branch \"%s\"'.\"\\n\".\n 'Please resolve this failure manually.',\n $this->stashedBranch\n )\n );\n }\n\n $this->checkout($this->stashedBranch);\n $this->stashedBranch = null;\n }", "title": "" }, { "docid": "4e7e9a5b202ea8482f0c83883d305233", "score": "0.4632594", "text": "static function check_git_version() {\n $git = new GitRepo();\n $git_version = $git->run('--version');\n $git_version = substr($git_version, 11);\n if ( version_compare( $git_version, '1.7.5', '>=' ) ) {\n deactivate_plugins( __FILE__ );\n exit('You need to run at least git version 1.7.5. You are currently running version ' . $git_version);\n }\n }", "title": "" }, { "docid": "319f448cbeb4e1a1eff71653971543b1", "score": "0.46282798", "text": "private function initRepository()\n {\n chdir($this->directory);\n $this->gitInit();\n $this->composerUpdate();\n $this->gitCommitUpdateDependecies();\n }", "title": "" }, { "docid": "5be3898d2eaf91fe959030db4b63c9cd", "score": "0.45846388", "text": "public function toCommit(HasRemotes $git, string $hash): string;", "title": "" }, { "docid": "624e66d927cac95bde19fecd3f77eb86", "score": "0.45806456", "text": "function drush_dgb_commit() {\n _dgb_set_required_settings();\n\n // Allow for custom commit message in case of manual backup.\n $message = drush_get_option('m', 'auto-commit changes for databases and files by dgb.');\n\n // Add DRUPAL_ROOT to git index.\n $exec = 'git add .';\n // Add database dumps directory to git index.\n $exec .= '; git add ' . drush_get_option('dgb-dumps');\n // If drushrc.php is located in the upper directory, include it in the commit.\n if (is_file('../drushrc.php')) {\n $exec .= '; git add ../drushrc.php';\n }\n // Commit command.\n $exec .= '; git commit -am \"' . $message . '\"';\n drush_op('system', $exec );\n\n // run git gc for maintenance.\n drush_op('system', 'git gc' );\n}", "title": "" }, { "docid": "6c27421e3e408656d544c34da2291f42", "score": "0.4574962", "text": "public function testAutoMergeCurrent() {\n $upstream = $this->createUpstreamRepo();\n\n mkdir(\"{$this->fixturePath}/subdir\");\n ProcessUtil::runOk($this->command(\"\", \"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\"));\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\n $this->assertEquals(\"example text\", $downstream->readFile(\"example.txt\"));\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n $downstream->commitFile(\"example.txt\", \"some unrelated local changes\");\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n\n $commandTester = $this->createCommandTester(array(\n 'command' => 'automerge',\n '--path' => $this->fixturePath,\n '--keep' => 1,\n // Find the dir based on upstream remote.\n 'url' => array(\";/upstream;$patchFile\"),\n ));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", keep the current branch \"master\"',\n $commandTester->getDisplay(FALSE));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", apply',\n $commandTester->getDisplay(FALSE));\n $this->assertEquals(0, $commandTester->getStatusCode());\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n $this->assertRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n // Preserved local changes.\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n }", "title": "" }, { "docid": "481886efe6de76c7520c5073bcfb8ae4", "score": "0.4572453", "text": "function checkout() { //$repo_url, $repo_sub_path, $current_rev) {\n $repo_url = $this->state->get_repository_root();\n $repo_sub_path = $this->state->get_repository_path();\n $current_rev = $this->state->get_revision();\n \n $src_path = $repo_url . $repo_sub_path;\n \n // figure out where to send our http REPORT request\n $bits = parse_url($repo_url . \"/!svn/vcc/default\");\n $repo_host = $bits['host'];\n $repo_port = @$bits['port']; if (!$repo_port) $repo_port = 80;\n $repo_path = $bits['path'];\n\n $this->out(\"Connecting to host $repo_host:$repo_port,<br>sending HTTP REPORT $repo_path for src-path $src_path.\\n\");\n \n $xml = '<S:update-report send-all=\"true\" xmlns:S=\"svn:\"><S:src-path>'.$src_path.'</S:src-path><S:entry rev=\"'.$current_rev.'\"></S:entry></S:update-report>';\n $xml_len = strlen($xml);\n \n $query = \"REPORT $repo_path HTTP/1.0\nHost: $repo_host\nContent-Type: text/xml\nContent-Length: $xml_len\nDepth: 0\n\n$xml\";\n\n $this->out($query);\n\n $sock = new Net_Socket();\n $this->check_err($sock->connect($repo_host, $repo_port, null, 60, null)); // 60 sec timeout\n \n $this->check_err($sock->write($query));\n\n // read response\n $this->out(\"Downloading patch ...\\n\");\n $this->fp = fopen($this->diff_fn, \"wt\");\n if (!$this->fp) throw new Subversion_Failure(\"can't open $this->diff_fn file\");\n $listeners = array($this);\n $this->received_bytes = 0;\n $resp = new HTTP_Response($sock, $listeners);\n $this->check_err($resp->process(false));\n fclose($this->fp);\n $this->out(\"\\nFinished downloading update ($this->received_bytes bytes).\\n\");\n }", "title": "" }, { "docid": "dc3199188e65c5cf091eb09915a9110b", "score": "0.45688823", "text": "public function build()\n {\n $this->info('Starting build');\n $this->dirPrepare();\n $this->phpLint();\n $this->phpCodeStyle();\n $this->phpMessDetect();\n $this->phpTest();\n $this->docsPhpApi(['force' => true]);\n $this->info('build complete');\n }", "title": "" }, { "docid": "314764cdb34d972d62dee60a47389c72", "score": "0.45681307", "text": "public function fire()\n\t{\n\t\t$github = new Client();\n\t\t$http = new \\Guzzle\\Http\\Client();\n\n\t\t$forceupdate = $this->argument(\"force\");\n\t\tforeach(\\Config::get(\"laravel.versions\") as $version){\n\n\t\t\t$this->info(\"Process branch $version\");\n\n\t\t\tif($forceupdate){\n\t\t\t\tDocs::version($version)->delete();\n\t\t\t\t$this->info(\"force clear database!\");\n\t\t\t}\n\n\t\t\t//$content = $this->githubTranslated->getFile($version, \"menu.md\");\n\t\t\t$this->line(\"Fetch documentation.md\");\n\t\t\t$content = $this->githubTranslated->getFile($version, \"documentation.md\");\n\t\t\t$lines = explode(\"\\n\", $content);\n\t\t\t$lines[] = \"[Menu](/docs/$version/documentation)\";\n\t\t\t$matches = array();\n\t\t\tforeach($lines as $line){\n\t\t\t\tpreg_match(\"/\\(\\/docs\\/(.*?)\\/(.*?)\\)/im\", $line, $matches);\n\t\t\t\tif(isset($matches[2])){\n\t\t\t\t\t$name = $matches[2];\n\t\t\t\t\t$filename = $name.\".md\";\n\t\t\t\t\t$this->line(\"\");\n\t\t\t\t\t$this->line(\"Fetch $filename ..\");\n\t\t\t\t\t//$last_commit_id = $this->githubTranslated->getLastCommitId($version, $filename);\n\t\t\t\t\t$this->line(\" get last translated commit\");\n\t\t\t\t\t$commit = $this->githubTranslated->getLastCommit($version, $filename);\n\n\t\t\t\t\tif( ! is_null($commit)) {\n\t\t\t\t\t\t$last_commit_id = $commit['sha'];\n\t\t\t\t\t\t$last_commit_at = Carbon::createFromTimestampUTC(strtotime($commit['commit']['committer']['date']));\n\t\t\t\t\t\t$this->line(\" get file\");\n\t\t\t\t\t\t$content = $this->githubTranslated->getFile($version, $filename, $last_commit_id);\n\t\t\t\t\t\tif(!is_null($content)) {\n\t\t\t\t\t\t\tpreg_match(\"/git (.*?)$/m\", $content, $matches);\n\t\t\t\t\t\t\t$last_original_commit_id = array_get($matches, '1');\n\t\t\t\t\t\t\t//if(!$last_original_commit) {\n\t\t\t\t\t\t\tif(!$last_original_commit_id AND $name != \"menu\") {\n\t\t\t\t\t\t\t\t$this->error(\"Not found git signature in $filename\");\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$this->line(\" get last translated original commit $last_original_commit_id\");\n\t\t\t\t\t\t\t\t$original_commit = $this->githubOriginal->getCommit($last_original_commit_id);\n\t\t\t\t\t\t\t\t$count_ahead = 0;\n\t\t\t\t\t\t\t\t$current_original_commit = \"\";\n\t\t\t\t\t\t\t\tif($original_commit) {\n\t\t\t\t\t\t\t\t\t$last_original_commit_at = Carbon::createFromTimestampUTC(strtotime($original_commit['commit']['committer']['date']));\n\n\t\t\t\t\t\t\t\t\t// Считаем сколько коммитов прошло с момента перевода\n\t\t\t\t\t\t\t\t\t$this->line(\" get current original commit\");\n\t\t\t\t\t\t\t\t\t$original_commits = $this->githubOriginal->getCommits($version, $filename, $last_original_commit_at);\n\t\t\t\t\t\t\t\t\t$count_ahead = count($original_commits)-1;\n\t\t\t\t\t\t\t\t\t$current_original_commit = $this->githubOriginal->getLastCommit($version, $filename);\n\t\t\t\t\t\t\t\t\t$current_original_commit_id = $current_original_commit['sha'];\n\n//\t\t\t\t\t\t\t\t\t$current_original_commit = $original_commits[0]['sha'];\n//\t\t\t\t\t\t\t\t\tforeach($original_commits as $c){\n//\t\t\t\t\t\t\t\t\t\tif($c['sha']!=$last_original_commit_id) $count_ahead++;\n//\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$last_original_commit_at = null;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$content = preg_replace(\"/git(.*?)(\\n*?)---(\\n*?)/\", \"\", $content);\n\t\t\t\t\t\t\t\tpreg_match(\"/#(.*?)$/m\", $content, $matches);\n\t\t\t\t\t\t\t\t$title = trim(array_get($matches, '1'));\n\t\t\t\t\t\t\t\t$page = Docs::version($version)->name($name)->first();\n\t\t\t\t\t\t\t\tif($page) {\n\t\t\t\t\t\t\t\t\tif($last_commit_id != $page->last_commit) {\n\t\t\t\t\t\t\t\t\t\t$page->last_commit = $last_commit_id;\n\t\t\t\t\t\t\t\t\t\t$page->last_commit_at = $last_commit_at;\n\t\t\t\t\t\t\t\t\t\t$page->last_original_commit = $last_original_commit_id;\n\t\t\t\t\t\t\t\t\t\t$page->last_original_commit_at = $last_original_commit_at;\n\t\t\t\t\t\t\t\t\t\t$page->current_original_commit = $current_original_commit_id;\n\t\t\t\t\t\t\t\t\t\t$page->original_commits_ahead = $count_ahead;\n\t\t\t\t\t\t\t\t\t\t$page->title = $title;\n\t\t\t\t\t\t\t\t\t\t$page->text = $content;\n\t\t\t\t\t\t\t\t\t\t$page->save();\n\t\t\t\t\t\t\t\t\t\t$this->info(\"$version/$filename updated. Commit $last_commit_id. Last original commit $last_original_commit_id.\");\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\telse {\n\t\t\t\t\t\t\t\t\tDocs::create([\n\t\t\t\t\t\t\t\t\t\t\t'framework_version' => $version,\n\t\t\t\t\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t\t\t\t\t\t'last_commit' => $last_commit_id,\n\t\t\t\t\t\t\t\t\t\t\t'last_commit_at' => $last_commit_at,\n\t\t\t\t\t\t\t\t\t\t\t'last_original_commit' => $last_original_commit_id,\n\t\t\t\t\t\t\t\t\t\t\t'last_original_commit_at' => $last_original_commit_at,\n\t\t\t\t\t\t\t\t\t\t\t'current_original_commit' => $current_original_commit_id,\n\t\t\t\t\t\t\t\t\t\t\t'original_commits_ahead' => $count_ahead,\n\t\t\t\t\t\t\t\t\t\t\t'text' => $content]);\n\t\t\t\t\t\t\t\t\t$this->info(\"$version/$filename created. Commit $last_commit_id. Last original commit $last_original_commit_id.\");\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "c22d4a5b3f02b011df28f13ff054420d", "score": "0.45660073", "text": "public function pullOrInitialize() {\n\t\tif($this->localFolderIsGit()) {\n\t\t\t$this->pull();\n\t\t}\n\t\telse {\n\t\t\t$this->initialize();\n\t\t}\n\t}", "title": "" }, { "docid": "e3814d5248fdce8593d3d836239c957d", "score": "0.45645553", "text": "public function doExt( $extRepo, $unusedKey, $branchName ) {\n\t\t// otherwise we'll get build/AntiBot/CategoryTree/.. instead of build/AntiBot, build/CategoryTree, ..\n\t\t$this->chdir( $this->buildDir );\n\t\techo \"... $extRepo\\n\";\n\t\t$url = str_replace( '{repository}', $extRepo, $this->conf->extRepoUrlFormat );\n\t\t$name = basename( $extRepo );\n\t\t$this->execCmd( 'git', 'clone', '-q', $url, '-b', 'master', $name );\n\t\t$this->chdir( $name );\n\n\t\t$out = $exitcode = null;\n\t\t// Check if the branch exists already\n\t\texec( 'git show-branch origin/' . escapeshellarg( $branchName ) . ' 2>&1', $out, $exitcode );\n\t\tif ( $exitcode == 0 ) {\n\t\t\techo \"Skipping $extRepo: Branch exists already\\n\";\n\t\t\treturn;\n\t\t}\n\t\t$commit = $this->execReadCmd( 'git', 'rev-list', '-n', '1', '--before', $this->opts->branchDate, 'master' );\n\t\tif ( !$commit ) {\n\t\t\techo \"Skipping $extRepo: Repo does not have a commit before the branch date\\n\";\n\t\t\treturn;\n\t\t}\n\t\tif ( $this->conf->verbose ) {\n\t\t\techo \"... $extRepo: Branching $branchName at $commit\\n\";\n\t\t}\n\t\t$this->execCmd( 'git', 'checkout', '-q', '-b', $branchName, $commit );\n\n\t\t# Intermediate commit & fixes\n\t\t$this->fixGitReview( $branchName );\n\t\t$this->execCmd( 'git', 'commit', '-a', '-q', '-m', \"Creating new {$branchName} branch\" );\n\n\t\t# Final push to repo for this extension/skin\n\t\t$this->execWriteCmd( 'git', 'push', 'origin', \"$branchName:refs/heads/$branchName\" );\n\t}", "title": "" }, { "docid": "f83c01facd18c02bc374a5b4c424c5fa", "score": "0.45599082", "text": "public function testGit()\n {\n $descriptorspec = array(\n 1 => array('pipe', 'w'),\n 2 => array('pipe', 'w'),\n );\n $pipes = array();\n $resource = proc_open(GitApi::getBin(), $descriptorspec, $pipes);\n\n $stdout = stream_get_contents($pipes[1]);\n $stderr = stream_get_contents($pipes[2]);\n foreach ($pipes as $pipe) {\n fclose($pipe);\n }\n\n $status = trim(proc_close($resource));\n return ($status != 127);\n }", "title": "" }, { "docid": "3dcab8f154b2fd965e80ee36a3b3bdd1", "score": "0.45473325", "text": "function git($command, &$output = null) {\n\texec('git '.$command, $output, $exitCode);\n\treturn $exitCode;\n}", "title": "" }, { "docid": "dad23a60a6aed39298c30aa89abee13d", "score": "0.45401362", "text": "public function build(): void;", "title": "" }, { "docid": "67d543c97c84fd76558c58266f62da7b", "score": "0.45307738", "text": "public function import_full( $p_repo ) {}", "title": "" }, { "docid": "7098c83bebe20575dce2feffe4e9d90a", "score": "0.45264924", "text": "public function getGitUpdate(){\n $command = \"git fetch origin\";\n $returnVar = NULL;\n $output = NULL;\n exec($command, $output, $returnVar);\n\n $command = \"git diff master origin/master --name-only\";\n $returnVar = NULL;\n $output = NULL;\n exec($command, $output, $returnVar);\n return $output;\n }", "title": "" }, { "docid": "d460727dd72a0739f91edf69b16a606a", "score": "0.45254084", "text": "public function build(): void\n {\n if ($this->config->isHotReload()) {\n $output = $this->config->getJson();\n $this->swagger->writeFile($output);\n }\n }", "title": "" }, { "docid": "167de434da45c30a4a3b012204104c8b", "score": "0.45140684", "text": "public function set_needed_repos(): void {}", "title": "" }, { "docid": "c25ff108845b9967a7a8245480bef5e8", "score": "0.45129213", "text": "protected function initGit() {\n // Init repo.\n $this->git = new \\derhasi\\RedmineToGit\\Git();\n // @todo: option to init repo.\n $this->git->setRepository($this->repoPath->string());\n\n // Validate repo, by checking status.\n try {\n $this->git->status();\n }\n // When there is a git excpetion we are likely to have no repo there.\n catch (\\PHPGit\\Exception\\GitException $e) {\n $this->currentOutput->writeln(\"<error>{$this->repoPath->string()} is no valid git repo.</error>\");\n return FALSE;\n }\n }", "title": "" }, { "docid": "e1021d3be0ee79451812ff05bb89c0c7", "score": "0.45063487", "text": "public function downloadUpdate(){\n $command = \"git pull\";\n $returnVar = NULL;\n $output = NULL;\n exec($command, $output, $returnVar);\n }", "title": "" }, { "docid": "277b30e64080eb88e99a4b422c8f41f1", "score": "0.4502693", "text": "function checkout() {\n\t\t//\n\t}", "title": "" }, { "docid": "9cca4ce4fa7ecb3dece4cd57232625be", "score": "0.44969106", "text": "public function handle()\n {\n exec('bash '.app_path('../bin/git/status'), $result);\n\n if (empty($result) || !isset($result[1])) {\n Log::error('Update', 'Checking', 'Cannot get GIT status. Updating failed');\n return;\n }\n\n $this->clientRepository->insertOrUpdateClient([\n 'last_update_check' => date('Y-m-d H:i:s'),\n 'last_commit' => $this->getCurrentCommit(),\n ]);\n\n switch($result[1])\n {\n case 'up-to-date':\n // nothing to do\n break;\n case 'need-to-pull':\n $this->update();\n break;\n case 'diverged':\n case 'need-to-push':\n Log::error('Update', 'Checking', 'Impossible to update due to local changes or conflicts');\n break;\n default:\n Log::error('Update', 'Checking', 'Unknown GIT status. Updating failed!');\n return;\n\n }\n\n }", "title": "" }, { "docid": "16d57a925acfcac11cbebff74de3877a", "score": "0.44951326", "text": "public function testRunHookWithUnstagedChanges(): void\n {\n $this->assertFalse(getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR));\n\n $config = $this->createConfigMock();\n $io = $this->createIOMock();\n $pluginConfig = $this->createPluginConfigMock();\n\n $unstagedChanges = 'foo bar baz';\n $patchFileConstraint = $this->matches(sys_get_temp_dir() . '/CaptainHook/patches/%d-%x.patch');\n\n $this->statusOperator->method('getWorkingTreeStatus')->willReturn([]);\n\n $this->indexOperator->expects($this->never())->method('removeFiles');\n $this->indexOperator->expects($this->never())->method('recordIntentToAddFiles');\n\n $this->diffOperator\n ->expects($this->once())\n ->method('getUnstagedPatch')\n ->willReturn($unstagedChanges);\n\n $this->filesystem\n ->expects($this->once())\n ->method('dumpFile')\n ->with($patchFileConstraint, $unstagedChanges);\n\n $this->statusOperator\n ->expects($this->once())\n ->method('restoreWorkingTree')\n ->will($this->returnCallback(function (): bool {\n if (getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR) != '1') {\n $this->fail(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR . ' did not have the correct value');\n }\n return true;\n }));\n\n $this->diffOperator\n ->expects($this->once())\n ->method('applyPatches')\n ->with($this->callback(function ($value) use ($patchFileConstraint): bool {\n $result = true;\n foreach ($value as $item) {\n $result = $result && $patchFileConstraint->evaluate($item, '', true);\n }\n return $result;\n }))\n ->willReturn(true);\n\n $hook = new class ($io, $config, $this->repo) extends Hook {\n protected $hook = Hooks::PRE_COMMIT;\n };\n\n $plugin = new PreserveWorkingTree($this->filesystem);\n $plugin->configure($config, $io, $this->repo, $pluginConfig);\n\n $plugin->beforeHook($hook);\n $plugin->afterHook($hook);\n\n // This should not be set after this test is finished.\n $this->assertFalse(getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR));\n }", "title": "" }, { "docid": "5dbc322b904a4562a1063894175af728", "score": "0.44888255", "text": "protected function build(): void\n {\n\n }", "title": "" }, { "docid": "c1fbc4def40e8ce95722254fba9b2038", "score": "0.44881886", "text": "function tryProcessUncommitedChanges(): void\n {\n }", "title": "" }, { "docid": "f3222f3f0e399b35be32ebc073f30045", "score": "0.4479133", "text": "public function fromGit(string $url)\n {\n return $this->setRepositorySource('custom', $url);\n }", "title": "" }, { "docid": "f8176190b0c21446fa0580c28e7ce856", "score": "0.44770023", "text": "protected function gitCall($_args)\n {\n return sprintf(\n '%s %s %s %s',\n static::ENCODING_ENV,\n static::GIT_BINARY,\n \"--git-dir={$this->root}/.git --work-tree={$this->root}\",\n implode(' ', func_get_args())\n );\n }", "title": "" }, { "docid": "5fd62debb8fe71c7bb742b91adbee375", "score": "0.44404185", "text": "public function gotoGit(){\n\n\n return Socialite::driver('github')->redirect();\n }", "title": "" }, { "docid": "4ad2e8cf3e7fff42bf4240ca5a00f71d", "score": "0.44205353", "text": "function upgrade_can_git_pull()\n{\n\tif ( SAFE_MODE === true )\n\t{\n\t\treturn false;\n\t}\n\n\t$base = PML_BASE;\n\n\t// Check if git is callable and if all files are not changed\n\t$a = exec( 'cd ' . escapeshellarg( $base ) . '; git status -s' , $lines , $code );\n\n\t// Error while executing this comand\n\tif ( $code !== 0 )\n\t{\n\t\treturn array( $code , $lines );\n\t}\n\n\t// Error, files have been modified\n\tif ( count( $lines ) !== 0 )\n\t{\n\t\treturn array( $code , $lines );\n\t}\n\n\t// can write all files with this webserver user ?\n\t$canwrite = true;\n\t$lines = array();\n\t$git = mb_strlen( realpath( $base ) ) + 1;\n\t$pmlfiles = new RecursiveIteratorIterator(\n\t\tnew RecursiveDirectoryIterator( $base ) ,\n\t\tRecursiveIteratorIterator::SELF_FIRST\n\t);\n\n\tforeach ( $pmlfiles as $f )\n\t{\n\n\t\t// Ignore all .git/* files\n\t\tif ( ( mb_substr( $f->getPathname() , $git , 4 ) ) === '.git' )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// check if this file is writable\n\t\tif ( ! $f->isWritable() )\n\t\t{\n\n\t\t\t// check if it ignored or not\n\t\t\t$b = exec( \"git ls-files \" . escapeshellarg( $f->getPathname() ) );\n\t\t\tif ( ! empty( $b ) )\n\t\t\t{\n\t\t\t\t$canwrite = false;\n\t\t\t\t$lines[] = $f->getPathname();\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( $canwrite === false )\n\t{\n\t\treturn array( 2706 , $lines );\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "ba18157c0f76dce7e2a0c71e51a64ec0", "score": "0.44124347", "text": "protected function updateGitRepo() {\n\n $this->currentOutput->writeln(\"<info>Committing changes ...</info>\");\n\n $changes = FALSE;\n\n // @todo: option to stash current repo changes?\n foreach ($this->wikiVersions as $version) {\n\n // Perform any changes in the filesystem for the given version.\n $this->updateFilesForVersion($version);\n\n // Only really commit if there are changes to commit.\n if ($this->git->hasStagedChanges()) {\n $changes++;\n\n // Build commit message.\n if ($version->version == 1) {\n $message = \"Created page {$version->title} by {$version->author->name}\";\n }\n else {\n $message = \"Updated page {$version->title} by {$version->author->name}\";\n }\n\n $commit_message = \"{$this->project->project}: $message\";\n $commit_message .= \"\\n Date: {$version->updated_on}\";\n\n // If the version got some comments, we add that to the commit message.\n if (!empty($version->comments)) {\n $commit_message .= \"\\n Message: {$version->comments}\";\n }\n\n $this->git->commit($commit_message, array(\n 'author' => $version->author->getGitAuthorName(),\n 'date' => $version->updated_on,\n ));\n\n // Write status.\n $this->currentOutput->writeln(\"<comment>$message</comment>\");\n }\n\n // @todo: handling comments?\n // @todo: handling documents?\n\n }\n\n if (empty($changes)) {\n $this->currentOutput->writeln(\"<comment>There were no changes to commit.</comment>\");\n }\n }", "title": "" }, { "docid": "b86d826960c1d4ef3d76c844f498fc67", "score": "0.43981454", "text": "public function testCreateGitBranch()\n {\n }", "title": "" }, { "docid": "975be872ac1cb24737f0e9067424695a", "score": "0.43928447", "text": "public function clear_build_ts() {\n\t\t$this->out('Clearing build timestamp.');\n\t\t$this->out();\n\t\tAssetConfig::clearBuildTimeStamp();\n\t}", "title": "" }, { "docid": "98d1e27dbfad729dea8350586a621f89", "score": "0.43761477", "text": "public function handle()\n {\n if (!\\App::environment('local', 'staging', 'development', 'testing')) {\n $this->info('...Photon update forbidden');\n return false;\n }\n\n $this->info(\"...Checking license\");\n // check if license key exist\n $key = LicenseKeyHelper::checkLicenseKey();\n // ping home\n $validKey = LicenseKeyHelper::pingHome($key); \n // store license key if it does not exist\n if(!$key) \n LicenseKeyHelper::storeLiceseKey($validKey['body']['license_key']);\n\n $currentVersion = ComposerBump::getVersion();\n $this->info(\"...Installed version: \" . $currentVersion);\n $this->info(\"...Latest version: \" . $validKey['body']['newest_version']);\n \n if($validKey['body']['newest_version'] == $currentVersion) {\n $this->info(\"Photon instalation already up to date\");\n return false;\n }\n\n $directory = getcwd().'/tmp';\n\n // clear tmp folder\n $this->info(\"...Clearing old temporary files\");\n $this->clearTmpFolder($directory);\n\n $this->info(\"...Downloading and extracting update\");\n $this->download($zipFile = $this->makeFilename($directory))\n ->extract($zipFile, $directory)\n ->cleanUp($zipFile);\n\n $this->info(\"...Applying update\");\n $this->copyCoreBeFiles();\n $this->copyCoreFeFiles();\n\n // clear tmp folder\n $this->info(\"...Clearing temporary files\");\n $this->clearTmpFolder($directory);\n\n $this->info(\"...Updating composer\");\n $this->composerFileHelper->setVersion($validKey['body']['newest_version'])->save();\n\n $this->info(\"Photon CMS Updated\");\n }", "title": "" }, { "docid": "0f4034a7e3a159e4fcab525fe6c86ebb", "score": "0.43691802", "text": "function build()\n {\n assert('Debug::checkState(\"Component\", DEBUG_STATE_BUILD)');\n assert('$id = $this->getObjectId()');\n assert('$class = get_class($this)');\n assert('Debug::log(\"Component: building \\'$id\\', class \\'$class\\'\")');\n }", "title": "" }, { "docid": "978df408211b4bd230b84aceec240cf6", "score": "0.43640077", "text": "function commitEditedMedia($full_filepath) {\n if (\n isset($_POST) && \n isset($_POST['action']) && \n $_POST['action'] !== 'image-editor'\n ) return $full_filepath;\n\n // bail out if this is an intermediate image size. \n // gatsby creates our image sizes so we only commit full size images to the repo.\n if (\n !preg_match(\n '/^(?!.*-\\d{2,4}x\\d{2,4}).*\\.(jpg|png|bmp|gif|ico)$/', $full_filepath\n )\n ) return $full_filepath;\n\n // bail if the file doesn't exist. It should, but just in case.\n if (!file_exists($full_filepath)) {\n jp_notices_add_error(\"There was an error saving your image. Please try again.\");\n return $full_filepath;\n };\n\n\t$dirname = pathinfo( $full_filepath, PATHINFO_DIRNAME );\n\t$ext = pathinfo( $full_filepath, PATHINFO_EXTENSION );\n $filename = pathinfo( $full_filepath, PATHINFO_FILENAME );\n\n $repo_full_filepath = \"wordsby/\" . substr(\n $full_filepath, \n strpos($full_filepath, \"/uploads/\") + 1\n ); \n\n $repo_filename = pathinfo( $repo_full_filepath, PATHINFO_BASENAME );\n\t$repo_dirname = pathinfo( $repo_full_filepath, PATHINFO_DIRNAME );\n\n\n $client = getGitlabClient();\n if (!$client) return null; \n\n createMediaBranchIfItDoesntExist($client);\n \n global $mediaBranch;\n\n\n $media_exists = isFileInRepo(\n $client, $repo_dirname, $repo_filename, $mediaBranch\n );\n $action = $media_exists ? 'update' : 'create';\n\n $original_filename = preg_replace( \n '/-e([0-9]+)$/', '', $filename \n ) . \".$ext\";\n\n $repo_original_filepath = \"$repo_dirname/$original_filename\";\n \n $original_media_exists = isFileInRepo(\n $client, $repo_dirname, $original_filename, $mediaBranch\n );\n\n\n $site_url = get_site_url();\n $current_user = wp_get_current_user()->data;\n $username = $current_user->user_nicename;\n\n $commit_message = \"\n \\\"$filename\\\" edited (\\\"$repo_filename\\\") \n — by $username (from $site_url)\n \";\n\n $actions = array(\n array(\n 'action' => $action,\n 'file_path' => $repo_full_filepath,\n 'content' => base64_encode(file_get_contents($full_filepath)),\n 'encoding' => 'base64'\n )\n );\n\n // delete the original media file from the repo if \n // IMAGE_EDIT_OVERWRITE is true.\n if (\n defined( 'IMAGE_EDIT_OVERWRITE' ) && \n IMAGE_EDIT_OVERWRITE &&\n $original_media_exists\n ) {\n array_push($actions, array(\n 'action' => 'delete',\n 'file_path' => $repo_original_filepath,\n ));\n }\n\n $commit = $client->api('repositories')->createCommit(\n WORDLIFY_GITLAB_PROJECT_ID, \n array(\n 'branch' => $mediaBranch, \n 'commit_message' => $commit_message,\n 'actions' => $actions,\n 'author_email' => $username,\n 'author_name' => $current_user->user_email\n )\n );\n\n return $full_filepath;\n}", "title": "" }, { "docid": "a1d44eb8ef5adf399244d1a2fb87ac2c", "score": "0.43614262", "text": "public function run()\n {\n //config from params, and if not params from environment config: git-rebase-defaults\n $deploymentGitData = $this->getConfig()->environmentConfig('git-rebase-defaults', array());\n $remote = $this->getParameter('remote', (array_key_exists('remote',$deploymentGitData)) ? $deploymentGitData['remote'] : 'origin');\n $branch = $this->getParameter('branch', (array_key_exists('branch',$deploymentGitData)) ? $deploymentGitData['branch'] : 'master');\n \n $result = true;\n\n //fetching\n $result = $this->runCommandRemote(\"git fetch $remote\", $output) && $result;\n if(!$result)\n {\n Console::output(\"<red>fails fetch $remote ... </red>\",0,0);\n return false;\n }\n\n //ensuring right branch is checked out\n $result = $this->runCommandRemote(\"git checkout $branch\") && $result;\n if(!$result)\n {\n Console::output(\"<red>fails $branch checkout ... </red>\",0,0);\n return false;\n }\n\n //testing for local modifications just to be sure\n $status = '';\n $result = $this->runCommandRemote('git status --porcelain', $status) && $result;\n $clean = (empty($status)) ? true : false;\n $stashed = false;\n if(!$clean)\n {\n //hacemos un stash\n $result = $this->runCommandRemote(\"git stash\", $output) && $result;\n if($output != \"No local changes to save\"){\n Console::output(\"stash ... \",0,0);\n $stashed = true;\n }\n }\n\n //rebasing\n $result = $this->runCommandRemote(\"git rebase $remote/$branch\", $output) && $result;\n if(!$result)\n {\n Console::output(\"<red>fails rebase $remote/$branch ... </red>\",0,0);\n }\n\n if($stashed)\n {\n //local modifications before rebase being popped from stash\n $result = $this->runCommandRemote(\"git stash pop\", $output) && $result;\n Console::output(\"stash pop ... \",0,0);\n }\n\n return $result;\n }", "title": "" }, { "docid": "0e7613a2365edd19550df4d7f36e335c", "score": "0.4358847", "text": "public function testAutoMergeRebuild() {\n $upstream = $this->createUpstreamRepo();\n\n mkdir(\"{$this->fixturePath}/subdir\");\n ProcessUtil::runOk($this->command(\"\", \"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\"));\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\n $this->assertEquals(\"example text\", $downstream->readFile(\"example.txt\"));\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\n\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n $downstream->commitFile(\"example.txt\", \"some unrelated local changes\");\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n\n // Run it the first time\n\n $commandTester = $this->createCommandTester(array(\n 'command' => 'automerge',\n '--path' => $this->fixturePath,\n '--rebuild' => 1,\n // Find the dir based on upstream remote.\n 'url' => array(\";/upstream;$patchFile\"),\n ));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", rename \"master\" to \"backup-master-',\n $commandTester->getDisplay(FALSE));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", apply',\n $commandTester->getDisplay(FALSE));\n $this->assertEquals(0, $commandTester->getStatusCode());\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n $this->assertRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n // Rebuilt from upstream. Local changes were lost.\n $this->assertNotRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n }", "title": "" }, { "docid": "5caa80984ed29459407f3a185052f385", "score": "0.43482804", "text": "public function testFindGitBranch()\n {\n }", "title": "" }, { "docid": "2e19560ca8335d147bfd0f469263317c", "score": "0.43432114", "text": "protected function update()\n {\n exec('git checkout .');\n exec('git clean -fd');\n\n // Pull new version\n exec('git pull origin master');\n\n exec('composer install --no-interaction');\n\n $this->clientRepository->insertOrUpdateClient([\n 'last_commit' => $this->getCurrentCommit(),\n 'last_update_code' => date('Y-m-d H:i:s')\n ]);\n\n Artisan::call('cache:clear');\n }", "title": "" }, { "docid": "ead04577e7a8073aa13cd0f593c8552c", "score": "0.43213633", "text": "protected function _clearBuilds($ext) {\n\t\t$targets = $this->_Config->targets($ext);\n\t\tif (empty($targets)) {\n\t\t\t$this->err('No ' . $ext . ' build files defined, skipping');\n\t\t\treturn;\n\t\t}\n\t\t$path = $this->_Config->cachePath($ext);\n\t\tif (!file_exists($path)) {\n\t\t\t$this->err('Build directory ' . $path . ' for ' . $ext . ' does not exist.');\n\t\t\treturn;\n\t\t}\n\t\t$dir = new DirectoryIterator($path);\n\t\tforeach ($dir as $file) {\n\t\t\t$name = $file->getFilename();\n\t\t\tif (in_array($name, array('.', '..'))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// no timestamp\n\t\t\tif (in_array($name, $targets)) {\n\t\t\t\t$this->out(' - Deleting ' . $path . $name);\n\t\t\t\tunlink($path . $name);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (preg_match('/^.*\\.v\\d+\\.[a-z]+$/', $name)) {\n\t\t\t\tlist($base, $v, $ext) = explode('.', $name, 3);\n\t\t\t\tif (in_array($base . '.' . $ext, $targets)) {\n\t\t\t\t\t$this->out(' - Deleting ' . $path . $name);\n\t\t\t\t\tunlink($path . $name);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e84608326828d270439e67e566935616", "score": "0.4318278", "text": "public function createAndCheckoutBranchFromHead($name) {\n list($err, $stdout, $stderr) = $this->api\n ->execManualLocal('checkout --track -b %s', $name);\n echo $stdout;\n if ($err) {\n throw new ArcanistUsageException($stderr);\n }\n }", "title": "" }, { "docid": "0dc1ad5a1acb2199119dc1e9718b5d09", "score": "0.42999792", "text": "public function testAllGitBranches()\n {\n }", "title": "" }, { "docid": "114253361c539c2037dd12585ea1f9c0", "score": "0.42952728", "text": "public static function clone()\n {\n \t$bowerDir = 'vendor' . DIRECTORY_SEPARATOR . self::$sourceBower;\n\n $bowerYiiDir = 'vendor' . DIRECTORY_SEPARATOR . self::$bowerVendor;\n\n \ttry {\n \t\t\n \t\tself::deleteDir($bowerYiiDir);\n\n \tself::copyDir($bowerDir, $bowerYiiDir);\n\n \techo \"Clone bower process done\\n\";\n\n \t} catch (Exception $e) {\n \t\t\n \t\techo \"Error on clone bower process\\n\";\n \t}\n }", "title": "" }, { "docid": "168aa960e3d2771047b18d6af392c9f0", "score": "0.4286561", "text": "public function finish_build($colony)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "d2e51fd25316c0804dcf6691274e9ff8", "score": "0.4285112", "text": "public function checkoutBranch($name) {\n // Regular checkout\n list($err, $stdout, $stderr) = $this->api\n ->execManualLocal('checkout %s', $name);\n echo $stdout;\n if ($err) {\n throw new ArcanistUsageException($stderr);\n }\n }", "title": "" }, { "docid": "04fdb2652ce0a19b5369aeb434ca8a7b", "score": "0.42848378", "text": "public function handle()\n {\n $this->createFreshDirectory();\n\n // Non-existent repo\n $this->createFreshDirectory('does_not_exist');\n\n // Empty repo\n $this->createFreshDirectory('empty');\n $this->initialiseGitRepository('empty');\n\n // Single commit repo\n $this->createFreshDirectory('single_commit');\n $this->initialiseGitRepository('single_commit');\n $this->writeTextToFile('<?php echo \"hello world\";', 'single_commit/hello_world.php');\n $this->stageAll('single_commit');\n $this->commit('single_commit', 'initial commit');\n }", "title": "" }, { "docid": "238260cc3e34743bb88092582e30138f", "score": "0.42837128", "text": "public function compileRepository() \n\t{\n\n\t}", "title": "" }, { "docid": "2dd627ef4443b3d163b56dfc768cef9d", "score": "0.42770082", "text": "public function grabRepository($mixed) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabRepository', func_get_args()));\n }", "title": "" }, { "docid": "7ae393c7c5d2bcd8d3d17997ada2a51b", "score": "0.42749888", "text": "public function git_push_callback() {\n $msg = $this->git_push();\n die($msg);\n }", "title": "" }, { "docid": "7c6c3dc46a4f8aad87fb50168b2c331e", "score": "0.42742285", "text": "static public function maybe_run() {\n\t\t// Make sure the user is logged in.\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Don't update for dev copies.\n\t\tif ( FL_BUILDER_VERSION == '{FL_BUILDER_VERSION}' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the saved version.\n\t\t$saved_version = get_site_option( '_fl_builder_version' );\n\n\t\t// No saved version number. This must be a fresh install.\n\t\tif ( ! $saved_version ) {\n\t\t\tupdate_site_option( '_fl_builder_version', FL_BUILDER_VERSION );\n\t\t\treturn;\n\t\t} elseif ( ! version_compare( $saved_version, FL_BUILDER_VERSION, '=' ) ) {\n\n\t\t\tif ( is_multisite() ) {\n\t\t\t\tself::run_multisite( $saved_version );\n\t\t\t} else {\n\t\t\t\tself::run( $saved_version );\n\t\t\t}\n\n\t\t\tupdate_site_option( '_fl_builder_version', FL_BUILDER_VERSION );\n\n\t\t\tupdate_site_option( '_fl_builder_update_info', array(\n\t\t\t\t'from' => $saved_version,\n\t\t\t\t'to' => FL_BUILDER_VERSION,\n\t\t\t) );\n\t\t}\n\t}", "title": "" }, { "docid": "e3ad0d94f3fc10c5f8da68924085626f", "score": "0.4273377", "text": "public function testAutoMergeCurrentConflict() {\n $upstream = $this->createUpstreamRepo();\n\n mkdir(\"{$this->fixturePath}/subdir\");\n ProcessUtil::runOk($this->command(\"\", \"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\"));\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\n $this->assertEquals(\"example text\", $downstream->readFile(\"example.txt\"));\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n $downstream->commitFile(\"example.txt\", \"some unrelated local changes\");\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n\n // Introduce a conflict\n $downstream->commitFile(\"changelog.txt\", \"this is bad! it has conflict!\");\n\n try {\n $commandTester = $this->createCommandTester(array(\n 'command' => 'automerge',\n '--path' => $this->fixturePath,\n '--keep' => 1,\n // Find the dir based on upstream remote.\n 'url' => array(\";/upstream;$patchFile\"),\n ));\n $this->fail(\"Expected ProcessErrorException\");\n }\n catch (ProcessErrorException $e) {\n $this->assertTrue($e->getProcess()->getExitCode() > 0);\n $this->assertStringContainsString(\n 'patch failed',\n $e->getProcess()->getErrorOutput());\n }\n }", "title": "" }, { "docid": "8f8bc819867f3264804db360d1511d92", "score": "0.4268325", "text": "public function composerUpdateHash()\n {\n $paths = $this->getPaths();\n $this->stopOnFail(true);\n $this->yell('composer:update-hash');\n $this->info('Updating Composer lock file');\n $this->taskExec('composer')\n ->dir($paths['root'])\n ->arg('update')\n ->option('lock')\n ->printed(true)\n ->run();\n $this->info('Composer lock file updated');\n }", "title": "" }, { "docid": "7065b60a39df56bb20e09e1449b9b2f3", "score": "0.4263203", "text": "private function install_main_bakery_bakery()\n\t{\n\n\t}", "title": "" }, { "docid": "90c642bad0041ed07d9a2a05ab1b3814", "score": "0.42480212", "text": "public function build() {\n if ($this->hasBeenExecuted) {\n throw new \\LogicException('Builders can only be used once.');\n }\n\n $this->hasBeenExecuted = TRUE;\n\n // Hello old faithful.\n if (!$this->importer) {\n $this->setImporter(new Importer());\n }\n\n $this->replayCommands();\n\n if (!$this->importer->getLogger()) {\n $this->doSetLogger(new NullLogger());\n }\n\n $this->importer->validate();\n\n // Since this is potentially a long running process, we need to make an\n // effort to clean up after ourselves.\n $importer = $this->importer;\n unset($this->importer, $this->commands, $this->clients);\n\n return $importer;\n }", "title": "" }, { "docid": "03ea08e8f8c1546ef189c7d9456ef5e0", "score": "0.42433223", "text": "public function precommit() {}", "title": "" }, { "docid": "15a63d9f9675e8c4d1005e6f86bae65c", "score": "0.42422482", "text": "public function testDeleteGitBranch()\n {\n }", "title": "" }, { "docid": "93d1e234cae17400336ad1b9a11cc0f9", "score": "0.42315206", "text": "public function toArchive(HasRemotes $git, string $branch = 'master'): string;", "title": "" }, { "docid": "54ee93675aa34bb5a530b42ca1e3ed82", "score": "0.42096457", "text": "public function bumpBuild()\n {\n $this->build += 1;\n $this->release = null;\n\n return $this;\n }", "title": "" }, { "docid": "8a43949b515b303e4ac8850b0b0766c0", "score": "0.42090386", "text": "public function testRenameWithClashingGitRepository() {\n\t\t$sourcekettleConfig = ClassRegistry::init('Setting')->loadConfigSettings();\n\t\t$base = $sourcekettleConfig['SourceRepository']['base']['value'];\n\t\tmkdir(\"$base/not_at_all_private.git\");\n\t\t$before = $this->Project->findById(1);\n\t\ttry{\n\t\t\t$this->assertFalse($this->Project->rename(\"private\", 'not_at_all_private'));\n\t\t} catch (InvalidArgumentException $e) {\n\t\t\t$this->assertTrue(true, \"Caught expected exception\");\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(false, \"Caught unexpected exception\");\n\t\t}\n\t\t$after = $this->Project->findById(1);\n\t\t$this->assertEquals($before, $after);\n\t}", "title": "" }, { "docid": "c304d06569af05d9d418a4b0b47313a5", "score": "0.42048898", "text": "private function _getDifferenceGit()\n {\n return [];\n }", "title": "" }, { "docid": "5b0637c5a8b2f1a12a42466888780939", "score": "0.42045978", "text": "public function compile() {\n\t\t$this->start('Compiling to '. $this->host);\n\n\t\t// fix path\n\t\t$this->localProj\t= self::path($this->localProj);\n\t\t$this->remoteProj\t= rtrim($this->remoteProj, DIRECTORY_SEPARATOR);\n\t\t\n\t\t// Work from project\n\t\tif(isset($this->localProj) && is_dir($this->localProj))\n\t\t\tchdir($this->localProj);\n\t\t\n\t\t// documentation\n\t\tif(isset($this->localDoc))\n\t\t\t$this->start('Creating Documentation from ' . $this->localDoc)->makeDoc()->finish();\n\t\t\n\t\t// twig templates\n\t\tif(isset($this->localTpl))\n\t\t\t$this->start('Creating JS Templates from ' . $this->localTpl)->makeTpl()->finish();\n\t\t\n\t\t\n\t\t// static files\n\t\t$localStatic = self::path(sys_get_temp_dir()) . 'data' . time() . DIRECTORY_SEPARATOR;\n\t\t$this->wipe[] = $localStatic;\n\t\t\n\t\tforeach($this->remoteStatic as $type => $trash) {\n\t\t\tif(method_exists($this, $type)) {\n\t\t\t\t$this->tmp[ $type ] = $localStatic . $type . DIRECTORY_SEPARATOR;\n\t\t\t\tself::readyDir( $this->tmp[ $type ] );\n\n\t\t\t\t// process static files\n\t\t\t\t$this->start('Processing '. $type)->$type()->finish();\n\t\t\t\t\n\t\t\t} elseif(!empty($this->localStatic[ $type ])) {\n\t\t\t\t\t// just moved the folder\n\t\t\t\t\t$this->tmp[ $type ] = self::path(current ($this->localStatic[ $type ]));\n\t\t\t\t\t\n\t\t\t\t\t// remove if not there\n\t\t\t\t\tif(!file_exists($this->tmp[ $type ])) \n\t\t\t\t\t\tunset ($this->remoteStatic[ $type ]);\n\t\t\t}\n\t\t}\n\n\t\t// run through static files then upload them\n\t\t$this->start('Uploading Static')->uploadStatic()->finish();\n\n\t\t// upload project\n\t\t$cmd = [\n\t\t\t'pscp',\n\t\t\t'-p',\t\t\t\t\t\t\t\t\t// preserve attributes\n\t\t\t'-r',\t\t\t\t\t\t\t\t\t// copy recursively\n\t\t\t'-q',\t\t\t\t\t\t\t\t\t// silent\n\t\t\t//'-sftp',\t\t\t\t\t\t\t\t// for use of SFTP protocal\n\t\t\t'-batch',\t\t\t\t\t\t\t\t// non interactive\n\t\t\t'-C',\t\t\t\t\t\t\t\t\t// enable compression\n\t\t\t'-i', static::safeDir($this->ppk),\t\t\t\t\t\t// Private key file to access server\n\t\t];\n\t\t\n\t\t// Directory to upload\n\t\tforeach($this->localCopy as $name)\n\t\t\t$cmd[] = static::safeDir($this->localProj . $name);\n\t\t\n\t\t// host:path on server to save data\n\t\t$cmd[] = $this->host .':'. $this->remoteProj;\n\t\t\n\t\t$this->start('Uploading Project')->runLocal($cmd)->finish();\n\n\t\t// config\n\t\tif(!isset($this->s3) && !empty($this->remoteStatic)) {\n\t\t\t// reset file permissions\n\t\t\t$cmd = array();\n\t\t\tforeach($this->remoteStatic as $type => $path) {\n\t\t\t\t$cmd[] = 'chmod 774 -R '. $path;\n\t\t\t\t// $cmd[] = 'chown mo:www-data -R '. $path;\n\t\t\t}\n\t\t\t\n\t\t\t$this->start('Updating Server Enviroment')->runRemote( $cmd )->finish();\n\t\t}\n\n\t\t// clean up\n\t\t$this\t->start('Cleaning up');\n\t\t\tforeach($this->wipe as $dir)\n\t\t\t\tself::wipeDir($dir, true);\n\t\t$this\t->finish();\n\t\t\n\t\t// finally\n\t\t$this->finish();\n\t}", "title": "" }, { "docid": "e0cac3172216dffabf61ef3eccbd7646", "score": "0.42031255", "text": "function svn_checkout($repos, $targetpath, $revision = NULL, $flags = false)\n{\n}", "title": "" } ]
042ccd567b21942a9bd4ca21fa34db10
/! \brief Function that delete the first index of an array \param[in]$inThe array \returnReturn the array without the first index
[ { "docid": "a9041cd356fdb5cff0027a9cd233b087", "score": "0.715564", "text": "function deleteFirst($in){\n\t\treturn deleteIndex($in, 0);\n\t}", "title": "" } ]
[ { "docid": "b3ce71f701b0d39600ae5767f4b9fdfe", "score": "0.70402986", "text": "function shoestrap_array_delete( $idx, $array ) { \n unset( $array[$idx] );\n return ( is_array( $array ) ) ? array_values( $array ) : null;\n}", "title": "" }, { "docid": "e791476bbae84a4479ac3dbcf3274966", "score": "0.6838905", "text": "private function deleteArrayElement($anArray=array(), $index) {\n unset($anArray[$index]);\n $anArray = array_values($anArray);\n\n return $anArray;\n }", "title": "" }, { "docid": "9861ca47d5060f8d712b054227710754", "score": "0.6830198", "text": "function deleteIndex($in, $index){\n\t\tif(gettype($in) !== \"array\"){\n\t\t\treturn $in;\n\t\t}\n\n\t\t$out = array();\n\t\t$i = 0;\n\t\t$size = sizeOf($in);\n\n\t\tforeach($in as $key => $value){\n\t\t\tif($i !== $index){\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\n\t\t\t++$i;\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "7489c1507bf2213c7cbc8a918fb4e44e", "score": "0.6809874", "text": "function array_unset($array,$index) {\n $res=array();\n $i=0;\n foreach ($array as $item) {\n if ($i!=$index)\n $res[]=$item;\n $i++;\n }\n return $res;\n}", "title": "" }, { "docid": "451877d2444516f44273994d51257c57", "score": "0.6371668", "text": "static public function delete_from(&$array, $element) {\n\n $pos = array_search($element, $array);\n for ($i = $pos; $i < count($array); $i++) {\n\n $array[$i] = $array[$i + 1];\n }\n array_pop($array);\n return $array;\n }", "title": "" }, { "docid": "b2eb7f3affdeee4de9cf35a63095dae8", "score": "0.6331412", "text": "function removeElement($array,$value) {\n if (($key = array_search($value, $array)) !== false) {\n unset($array[$key]);\n }\n return $array;\n}", "title": "" }, { "docid": "4cbf46a3d14f42edfd46eb992545372d", "score": "0.628373", "text": "public function removeFromArray($data,$value){\n $data=array_flip($data);\n unset($data[$value]);\n $data=array_flip($data);\n return array_merge(array(),$data);\n}", "title": "" }, { "docid": "8949ccff17fa22ae99972742c6ba90e1", "score": "0.60765123", "text": "public function offsetUnset($indice) {\n }", "title": "" }, { "docid": "e5c4ee155bf47a1443ea2586191d900c", "score": "0.6014415", "text": "function drop(array $input, $number = 1)\n{\n return array_slice($input, $number);\n}", "title": "" }, { "docid": "351eac0dcbeed6102cd0bd3c4f5d97d4", "score": "0.5942644", "text": "function deleteMapIndex($in, $index){\n\t\tif(gettype($in) !== \"array\"){\n\t\t\treturn $in;\n\t\t}\n\n\t\t$out = array();\n\n\t\tforeach($in as $key => $value){\n\t\t\tif($key !== $index){\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "e66372c519db3e2dc8e809ebdbab92b8", "score": "0.5930846", "text": "function array_delete(&$array, $value)\n {\n $value = \\Illuminate\\Support\\Arr::wrap($value);\n\n foreach ($array as $index => $item) {\n if (in_array($item, $value)) {\n unset($array[$index]);\n }\n }\n }", "title": "" }, { "docid": "d72bf6b8896201622d4f23b8c68ab1bf", "score": "0.5926096", "text": "Public Static Function RemoveArrayKey(&$Array, $Element)\n\t{\n\t\t$Output = array();\n\t\tforeach($Array as $Key=>$Value)\n\t\t{\n\t\t\tif($Element !== $Key)\n\t\t\t\t$Output[$Key] = $Value;\n\t\t}\n\t\t$Array = $Output;\n\t}", "title": "" }, { "docid": "0c9931feb6cd39f42002842e8cd8364c", "score": "0.59198844", "text": "function search_n_remove_valuefromArray($array,$value)\n{\n\tif (($key = array_search($value, $array)) !== false) {\n \t unset($array[$key]);\n\t}\n\treturn $array;\n}", "title": "" }, { "docid": "7b7ab8d71292594c3a00c90ba0566ff2", "score": "0.5911409", "text": "Public Static Function RemoveArrayElement(&$Array, $Element)\n\t{\n\t\t$Output = array();\n\t\tforeach($Array as $Key=>$Value)\n\t\t{\n\t\t\tif($Element !== $Value)\n\t\t\t\t$Output[$Key] = $Value;\n\t\t}\n\t\t$Array = $Output;\n\t}", "title": "" }, { "docid": "adb4c3f0b43fc58399da78b052b05c03", "score": "0.58731043", "text": "function array_delete(&$array, $value)\n {\n foreach ($array as $index => $item) {\n if ($value == $item) {\n unset($array[$index]);\n }\n }\n }", "title": "" }, { "docid": "9923550625a0a147daaa6f609730b63c", "score": "0.5825495", "text": "function grabElement($array, $index){\n\t\t\tunset($array[$index]);\n\t\t\t$array = array_values($array);\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "dd202af17e750a677675396482a67b50", "score": "0.58190316", "text": "function deleteArray($array)\n{\n // Now delete every item, but leave the array itself intact:\n foreach ($array as $i => $value) {\n unset($array[$i]);\n }\n}", "title": "" }, { "docid": "5011630f4b9a7989240dafadb58b8be3", "score": "0.5816838", "text": "public function myArraySplice() {\n return array_splice($this->arr1, 1, 3, array(\"x\" => 9, \"y\" => 8));\n }", "title": "" }, { "docid": "0ddb4979a6cb5712aeb457d31f2e0578", "score": "0.57933974", "text": "public static function removeFromArray($arr,$item){\n $ret = [];\n $i = 0;\n foreach($arr as $a){\n if ($a != $item || $i == 1){\n $ret[] = $a;\n }\n if ($a == $item){\n $i = 1;\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "13dbd4d34655d168c0b83a4e86ac2019", "score": "0.57749856", "text": "function array_forget(&$array, $keys)\n {\n return Arr::forget($array, $keys);\n }", "title": "" }, { "docid": "13dbd4d34655d168c0b83a4e86ac2019", "score": "0.57749856", "text": "function array_forget(&$array, $keys)\n {\n return Arr::forget($array, $keys);\n }", "title": "" }, { "docid": "f5ab5eca2c4e8345e0fe92aff87c7302", "score": "0.5742579", "text": "public function eliminar($_array_data){\n\t\treturn $this->modelo->eliminar($_array_data);\n\t}", "title": "" }, { "docid": "ad82d208389a0dc75e519ec06715d670", "score": "0.5720066", "text": "function remove_array($v,$a) {\r\n\r\n$array=explode(',',$a);\r\n//check if value is already in array\r\nif (in_array($v, $array)){\r\n$key=array_search($v,$array);\r\narray_splice($array,$key,1);\r\n}\r\nreturn implode(',',$array);\r\n\r\n}", "title": "" }, { "docid": "c70e7ba298449b7f8510bcec6104f3eb", "score": "0.571839", "text": "function array_forget(&$array, $keys)\n {\n Arr::forget($array, $keys);\n }", "title": "" }, { "docid": "efd5aec07498165bbc26a0d8667f815e", "score": "0.5713354", "text": "public static function removeValue(array &$array, $value) {\n if (($key = array_search($value, $array)) !== FALSE) {\n unset($array[$key]);\n }\n if (static::isSequential($array)) {\n array_values($array);\n }\n }", "title": "" }, { "docid": "0296c564ba72f75d596b7a5a545f7859", "score": "0.57081753", "text": "function solution2($A) {\n\n if(count($A) == 1) {\n return array_shift($A);\n }\n\n $first = array_shift($A);\n $found = array_search($first, $A, true);\n if ($found !== false){\n unset($A[$found]);\n return solution2(array_values($A));\n } else {\n return $first;\n }\n}", "title": "" }, { "docid": "267558e6b407cf2b1b81cae3a7fcdd74", "score": "0.56893134", "text": "function array_remove(&$array, $value) {\n\tforeach($array as $k => $v) {\n\t\tif ($v == $value) {\n\t\t\tunset($array[$k]);\n\t\t}\n\t}\n\tprint_r($array);\n}", "title": "" }, { "docid": "9dc699090c9232aa204a2141c65c1021", "score": "0.5685235", "text": "function array_remove_value() {\n\t\t\t$args = func_get_args();\n\t\t\t$arr = $args[0];\n\t\t\t$values = array_slice($args,1);\n\t\t\tforeach($arr as $k=>$v) {\n\t\t\t\tif(in_array($v, $values))\n\t\t\t\t\tunset($arr[$k]);\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}", "title": "" }, { "docid": "ef12e4f6c30853d9ce224e637241df81", "score": "0.5680133", "text": "function array_remove( $array, $remove ) {\n\tif ( !is_array( $remove ) ) {\n\t\t$remove = array( $remove );\n\t}\n\treturn array_values( array_diff( $array, $remove ) );\n}", "title": "" }, { "docid": "5a72be196c3daf46dbd053f19167c352", "score": "0.5675407", "text": "function stpArrayRemoveEmpty($arr)\r\n{\r\n\r\n\tif(!is_array($arr)) {\r\n\t\techo \"Make sure the parameter is an array\";\r\n\t}\r\n\telse {\r\n\t\t$arr = array_filter($arr);\r\n\t}\r\n\treturn $arr;\r\n}", "title": "" }, { "docid": "533bb9d7020a808f015d20f0c97bf2ec", "score": "0.56724566", "text": "function deleteLast($in){\n\t\treturn deleteIndex($in, sizeOf($in)-1);\n\t}", "title": "" }, { "docid": "96a19ec18733cbb33e8930e5b2128ea0", "score": "0.56384766", "text": "function remove_value(&$array, $value) {\r\n\t\t$index = array_search($value, $array);\r\n\t\tif ($index !== false)\r\n\t\t\tunset($array[$index]);\r\n\t}", "title": "" }, { "docid": "88b28debee818e10e49b43daae8e1c87", "score": "0.56165224", "text": "public static function arrayDelete(int $idx, array $array): ?array\n {\n if (isset($array[$idx])) {\n unset($array[$idx]);\n if (is_array($array)) { \n $array = array_values($array);\n } else {\n $array = null;\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "43d65a555afc561136931f9a89d0e24c", "score": "0.55889034", "text": "function array_delete($ary,$key_to_be_deleted) {\n $new = array(); \n if(is_string($key_to_be_deleted)) { \n if(!array_key_exists($key_to_be_deleted,$ary)) { \n return; \n } \n foreach($ary as $key => $value) { \n if($key != $key_to_be_deleted) { \n $new[$key] = $value; \n } \n } \n $ary = $new; \n } \n if(is_array($key_to_be_deleted)) { \n foreach($key_to_be_deleted as $del) { \n $ary=array_delete($ary,$del); \n } \n } \n\t return ($ary);\n\t}", "title": "" }, { "docid": "ac532f061f5d10fc2b245192794f8e85", "score": "0.55752784", "text": "public function arrayUnset($array, $key)\n {\n unset($array[$key]);\n\n return $array;\n }", "title": "" }, { "docid": "3fc1e2b23342ba56ebde7b0f5a623186", "score": "0.5564978", "text": "private function array_index_remove( $target_array,$target_id )\n\t{\n\t\tforeach($target_array as $key => $val)\n\t\t{\n\t\t\tif ($val['question_id'] === $target_id ){\n\t\t\t\t$final_key = $key;\n\t\t\t}\n\t\t}\n\t\t//ARAAY INDEX REMOVED \n\t\tunset($target_array[$final_key]);\n\t\t//REORDER ARRAY INDEX\n\t\tsort($target_array);\n\t\treturn $target_array;\n\t}", "title": "" }, { "docid": "e34cde3381c06f306740e727458e0ccf", "score": "0.5563348", "text": "function removeIntegerIndexesFromArray($data)\r\n {\r\n foreach (array_keys($data) as $key) {\r\n if (is_numeric($key)) {\r\n unset($data[$key]);\r\n }\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "1e5ba60552b949a72ea0da3b1989fb09", "score": "0.5534026", "text": "function removeUnwantedColumn($inputArray, $remove){\n $out = [];\n foreach ($inputArray as $line){\n $temp = [];\n $count = 0;\n foreach ($line as $item){\n if($count != $remove){\n array_push($temp,$item);\n }\n $count++;\n }\n array_push($out,$temp);\n }\n return $out;\n}", "title": "" }, { "docid": "e8f096b25c8746d5cf71c38d0e2dd7a6", "score": "0.55178523", "text": "public function offsetUnset($index);", "title": "" }, { "docid": "e8f096b25c8746d5cf71c38d0e2dd7a6", "score": "0.55178523", "text": "public function offsetUnset($index);", "title": "" }, { "docid": "409184e28e7582ac59e2b2d8f2390065", "score": "0.5516824", "text": "function removeElementWithValue($array, $key){\n foreach($array as $subKey => $subArray){\n\t\t\t if(empty($subArray[$key]))\n unset($array[$subKey]);\n }\n \n return $array;\n}", "title": "" }, { "docid": "dfef4573a1a76b97950c58079fb7c112", "score": "0.54975045", "text": "function PMA_arrayRemove($path, &$array)\r\n{\r\n $keys = explode('/', $path);\r\n $keys_last = array_pop($keys);\r\n $path = array();\r\n $depth = 0;\r\n\r\n $path[0] =& $array;\r\n $found = true;\r\n // go as deep as required or possible\r\n foreach ($keys as $key) {\r\n if (! isset($path[$depth][$key])) {\r\n $found = false;\r\n break;\r\n }\r\n $depth++;\r\n $path[$depth] =& $path[$depth-1][$key];\r\n }\r\n // if element found, remove it\r\n if ($found) {\r\n unset($path[$depth][$keys_last]);\r\n $depth--;\r\n }\r\n\r\n // remove empty nested arrays\r\n for (; $depth >= 0; $depth--) {\r\n if (! isset($path[$depth+1]) || count($path[$depth+1]) == 0) {\r\n unset($path[$depth][$keys[$depth]]);\r\n } else {\r\n break;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "01066055ad60e1fb96a053d2e2061647", "score": "0.54959047", "text": "public function offsetUnset($index) { }", "title": "" }, { "docid": "9790834fd4e57274f77da2e55c3eb3db", "score": "0.548071", "text": "function del_by_value($array, $del_val)\n {\n return array_values(array_diff($array, array($del_val)));\n }", "title": "" }, { "docid": "aeae3a1605c8b73b8b0cb6c2d798cf44", "score": "0.54792607", "text": "function clearArray($array) {\n\n if (!is_array($array) || count($array) == 0) {\n\n $this->setError('An error occured : Invalid Arguments Supplied');\n\n return false;\n\n }\n\n foreach ($array as $key => $val) {\n\n if (!array_key_exists($key, $this->fields))\n\n unset($array[$key]);\n\n }\n\n return $array;\n\n }", "title": "" }, { "docid": "8ea736a5aebeeec5ff2afb0cdaa3fab6", "score": "0.54366493", "text": "static function removeArrayValueByKey(array $array, $search) {\n\t $array = new ArrayObject($array);\n\t $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($array), RecursiveIteratorIterator::CHILD_FIRST);\n\t foreach ($iterator as $key => $value) {\n\t if ($search === $key) {\n\t $iterator->offsetUnset($key);\n\t }\n\t }\n\t return $array->getArrayCopy();\n\t}", "title": "" }, { "docid": "c73dd016200998ffd9afef55b9210ed1", "score": "0.54363364", "text": "private function removeElement($element, &$array)\n {\n $key = array_search($element, $array, true);\n\n if ($key !== false) {\n unset($array[$key]);\n }\n }", "title": "" }, { "docid": "71dce18754aad2eaca56d9cb84a34b2e", "score": "0.54352766", "text": "function array_first($a, $d = null) {\n if (count($a)) {\n return array_shift($a);\n }\n\n if (func_num_args() > 1) {\n return $d;\n }\n\n error('Cannot get first element of empty array ' . spy($a) . '.');\n}", "title": "" }, { "docid": "de54396a3edc8be65e26c47ff19b09c5", "score": "0.54336864", "text": "static function first( $array ) {\n return array_shift( $array );\n }", "title": "" }, { "docid": "cef58d679d93ecb0ec4dfd48a15c2119", "score": "0.5406539", "text": "function deleteEmpties( $item ){\n\t\t$item = array_map('array_filter', $item);\n\t\t$item = array_filter( $item, function( ){} );\n\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "fb7f47559fda13cbc331da54f0dca0d8", "score": "0.5394619", "text": "function removeCard($card, $arr) {\n $key = array_search($card, $arr);\n array_splice($arr, $key, 1);\n\n return $arr;\n }", "title": "" }, { "docid": "8e2a648fdb142ae12ceecf771e7882c2", "score": "0.5393777", "text": "function remove_empty($a, $token = \"\") {\n\t$a2 = $a;\n\tforeach ($a as $k => $v) {\n\t\tif ($v == $token) {\n\t\t\tunset($a2[$k]);\n\t\t}\n\t}\n\treturn $a2;\n}", "title": "" }, { "docid": "d1f633d34127dcb3a882d7b40acb5d02", "score": "0.5377216", "text": "function kws_array_remove_empty($haystack) {\n\n\t$haystack = (array)$haystack;\n\n foreach ($haystack as $key => $value) {\n if (is_array($value)) {\n $haystack[$key] = kws_array_remove_empty($haystack[$key]);\n }\n\n if (empty($haystack[$key])) {\n unset($haystack[$key]);\n }\n }\n\n return $haystack;\n}", "title": "" }, { "docid": "c2b3a20f9510ed82d019122db5c7c13a", "score": "0.53661954", "text": "protected function removeArrayValue(array &$array, array &$arrayPath)\n {\n if (count($arrayPath) == 1) {\n $array[$arrayPath[0]] = [];\n } else {\n $key = array_shift($arrayPath);\n $this->removeArrayValue($array[$key], $arrayPath);\n }\n }", "title": "" }, { "docid": "ac35171d3c389dc08922d6b33c89ba91", "score": "0.5364741", "text": "function minus_array_values($old_item_array, $item_array) {\n\t// In order to work out what to remove from the $session_array, the $old_item_array\n\t// must exist.\n\tif (is_not_empty_array($old_item_array) && is_not_empty_array($item_array)) {\n\t\t$new_array = array();\n\n\t\treset($old_item_array);\n\t\twhile (list(, $value) = each($old_item_array)) {\n\t\t\tif (!in_array($value, $item_array)) {\n\t\t\t\tarray_push($new_array, $value);\n\t\t\t}\n\t\t}\n\t\treturn $new_array;\n\t} else\n\t\treturn $old_item_array;\n}", "title": "" }, { "docid": "0ea5139612a3ba8561822d003d67bc0c", "score": "0.5357996", "text": "public static function delete(&$array, $index) {\r\n\t\t$loc = &$array;\r\n\t\t$parts = explode('/', $index);\r\n\t\twhile(count($parts) > 1) {\r\n\t\t\t$step = array_shift($parts);\r\n\t\t\tif(!isset($loc[$step])) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$loc = &$loc[$step];\r\n\t\t}\r\n\t\tunset($loc[array_shift($parts)]);\r\n\t\treturn $array;\r\n\t}", "title": "" }, { "docid": "4dfd4e1569a1da522af46eea46b760b4", "score": "0.5347036", "text": "public static function array_remove(&$array, $value)\n {\n return array_filter($array, function($a) use($value) {\n return $a !== $value;\n });\n }", "title": "" }, { "docid": "dbd261b3128c38ef72dfb039a1bf7215", "score": "0.5340487", "text": "public function arrayRemove(&$array, $key, $default = null)\n {\n if (is_array($array) && (isset($array[$key]) || array_key_exists($key, $array))) {\n $value = $array[$key];\n unset($array[$key]);\n\n return $value;\n }\n\n return $default;\n }", "title": "" }, { "docid": "b5dc7aecfbeb4533bb167f1c90d1fe03", "score": "0.5328492", "text": "function _deleteArticleFromArray ($articlesArray, $itemId) {\n\t\tforeach ($articlesArray as $key => $article) {\n\t\t\tif ($article->getItemId() == $itemId){\n\t\t\t\tunset ($articlesArray [$key] );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $articlesArray;\n\t}", "title": "" }, { "docid": "5ed1b2cba00b9a64bfea1bbdd099a5c9", "score": "0.5297816", "text": "function testUnset() {\n\t$arr = array(\n\t\t\"something\" => \"special\",\n\t\t\"another\" => \"hello\"\n\t);\n\n\n\n\tprint_r($arr);\n\n\tunset($arr['something']);\n\tprint(\"<br/>\");\n\n\tprint_r($arr);\n}", "title": "" }, { "docid": "1068103e978b092c05b49ea5633882fc", "score": "0.5265458", "text": "function removeElementWithValue($array, $key, $value){\n\t\t\t foreach($array as $subKey => $subArray){\n\t\t\t\t if($subArray[$key] == $value){\n\t\t\t\t\t unset($array[$subKey]);\n\t\t\t\t }\n\t\t\t }\n\t\t\t return $array;\n\t\t}", "title": "" }, { "docid": "4626d126148c4600892ff9a86de6276a", "score": "0.52551496", "text": "function test_splice ($replacement)\n{\n $input_array=array(0,1);\n var_dump (array_splice (&$input_array,2,0,$replacement));\n var_dump ($input_array);\n}", "title": "" }, { "docid": "15cc3d855e705759defc306211d6cee7", "score": "0.5254339", "text": "private function removeElementAtIndexFromArray($index, &$arrElemArray)\n\t{\n\t\t$ret = false;\n\t\t\n\t\t// We want to be sure that validator was called before calling this function\n\t\tif($this->isValidIndexAndArray($index, $arrElemArray))\n\t\t{\n\t\t\t// OK\n\t\t\tunset($arrElemArray[$index]);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t/*DEBUG*/ $this->debugger->push(\"Element at index &#39;{$index}&#39; removed from array\");\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "c6ec23345e17b47f2a8c1e47a93f19d6", "score": "0.52521825", "text": "function removeAt( $index );", "title": "" }, { "docid": "0043efaec1a3631405425440bb3aed5d", "score": "0.5244331", "text": "public function clearIndex();", "title": "" }, { "docid": "0043efaec1a3631405425440bb3aed5d", "score": "0.5244331", "text": "public function clearIndex();", "title": "" }, { "docid": "8c7962d571aea17e264a365722230f22", "score": "0.52316105", "text": "public function offsetUnset ($index)\n\t{\n\t\t$value = $this->offsetGet($index);\n\n\t\tif ($index == 0) {\n\t\t\treturn array_shift($this->storage);\n\t\t}\n\n\t\tif ($index == $this->count() - 1) {\n\t\t\treturn array_pop($this->storage);\n\t\t}\n\n\t\t$new = $this->slice(0, $index - 1);\n\t\t$new->push($this->slice($index, $this->count()));\n\n\t\t$this->storage = $new->to_array();\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "332a03693ce4c1fa42de928ee7aced31", "score": "0.5229292", "text": "public function offsetUnset( $index ): void;", "title": "" }, { "docid": "754bb599eefa0da1de9a2001628573c0", "score": "0.52107626", "text": "public function ClearArray()\r\n\t{\r\n\t\t$this->array = NULL;\r\n\t}", "title": "" }, { "docid": "c31908d580597582aed3b12bbff60abd", "score": "0.52068627", "text": "function array_delete_value(&$array, $value) {\n\tforeach (array_keys($array, $value) as $k) unset($array[$k]);\n}", "title": "" }, { "docid": "c4ed4c6e69a4826ee2e228e61741a778", "score": "0.5199156", "text": "public function offsetUnset($offset){ }", "title": "" }, { "docid": "e2f564fabf357a8a3841fdc4d7aac0c9", "score": "0.5194369", "text": "function stpArrayRemoveEmptyOrder($arr)\r\n{\r\n\r\n\t$arr = array_filter($arr);\r\n\r\n\t$newMy = array();\r\n\t$i = 0;\r\n\r\n\tforeach($arr as $key => $value) {\r\n\t\tif(!is_null($value)) {\r\n\t\t\t$newMy[$i] = $value;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}\r\n\treturn $newMy;\r\n}", "title": "" }, { "docid": "68746306683d1d5b9e6a3fe6079371e0", "score": "0.518851", "text": "public static function drop($array, $n = 1)\n {\n return array_slice($array, $n);\n }", "title": "" }, { "docid": "d054cc621fe4e8b85b621417eb6df65b", "score": "0.5185434", "text": "function unset_key(&$array = array(), $key)\n{\n\tif (is_array($array) && array_key_exists($key, $array))\n\t{\t\t\n\t\tunset($array[$key]);\n\t}\n}", "title": "" }, { "docid": "80d95805d5cecb9f1abacc6743cc1f2e", "score": "0.5166289", "text": "function remove_duplicates(array $array){\n\t\t\t\t$tmp_array = array();\n\n\t\t\t\tforeach($array as $key => $val) {\n\t\t\t\t\tif (!in_array($val, $tmp_array)) {\n\t\t\t\t\t\t$tmp_array[$key] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $tmp_array;\n\t\t\t}", "title": "" }, { "docid": "fc709cf2e30982937cfcb0cf8ef4fdd8", "score": "0.5161099", "text": "public function array_delete_key($arr, $key)\n {\n $last = sizeof($arr) - 1;\n $arr[$key] = $arr[$last];\n unset($arr[$last]);\n return $arr;\n }", "title": "" }, { "docid": "c0bfee81be916ad6c720daff16b16b7c", "score": "0.51569295", "text": "public function offsetUnset( $offset ) {}", "title": "" }, { "docid": "83d3ac1d9f726ca90eef96c03c6f5111", "score": "0.5151905", "text": "function array_key_first($array){\n\treset($array);\n\treturn key($array);\n}", "title": "" }, { "docid": "3d44a556fd799b959e3660077d1ccc45", "score": "0.5144177", "text": "public static function remove(array &$array, $item, $searchStrict = true)\n {\n if (($key = array_search($item, $array, $searchStrict)) !== false) {\n array_splice($array, $key, 1);\n }\n\n return $array;\n }", "title": "" }, { "docid": "ffd181e6eba23a8e267fdb39a62bee7f", "score": "0.5133503", "text": "public function offsetUnset(int $offset) {}", "title": "" }, { "docid": "081f191fa3b66848314eed8cdd742f21", "score": "0.5131817", "text": "function array_without(array $array, mixed ...$values): array\n {\n foreach (variadic_array($values) as $value) {\n if (($key = array_search($value, $array)) !== false) {\n unset($array[$key]);\n }\n }\n\n return $array;\n }", "title": "" }, { "docid": "69fedd5f886c0ebdec705e3da1b32504", "score": "0.5114989", "text": "function deleteArrayDuplicates(array $array)\n{\n if (count($array) < 2) {\n return count($array);\n }\n\n $writeIndex = 0;\n\n for ($i = 1; $i < count($array); ++$i) {\n if ($array[$writeIndex] != $array[$i]) {\n $array[++$writeIndex] = $array[$i];\n }\n }\n\n return $writeIndex + 1;\n}", "title": "" }, { "docid": "88d504d0a34d267fbf93d3f13b0ded78", "score": "0.5109864", "text": "public static function unique_multidim_array_except($array, $key,$key_current) {\n\t\t$temp_array = array();\n\t\t$i = 0;\n\t\t$key_array = array();\n\t\t\n\t\tforeach($array as $val) {\n\t\t\tif (!in_array($val[$key], $key_array) && !in_array($val[$key], $key_current) ) {\n\t\t\t\t$key_array[$i] = $val[$key];\n\t\t\t\t$temp_array[$i] = $val;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $temp_array;\n\t}", "title": "" }, { "docid": "c1d2a51f1fb7e58b931151cac5ca45ee", "score": "0.51094955", "text": "function array_duplicates($a=array())\n{\n\t$unique = array_unique($a);\n\tforeach($unique as $k => $v)\n\t\tunset($a[$k]);\n\treturn array_unique($a);\n}", "title": "" }, { "docid": "4f05eac2ba9565287fd1e41d9760ff45", "score": "0.5103692", "text": "function deduplicate_array($value1, $value2) {\n\t$value1 = get_array_for_value ( $value1 );\n\t$value2 = get_array_for_value ( $value2 );\n\t\n\t// remove duplicates\n\tforeach ( $value1 as $key => $val ) {\n\t\tif (in_array ( $val, $value2 )) {\n\t\t\tunset ( $value1 [$key] );\n\t\t}\n\t}\n\treturn $value1;\n}", "title": "" }, { "docid": "68d8f7a3cc47b050a460deba1af735a7", "score": "0.5098572", "text": "private function clean($table,$arr1){\n\t\t// if only 1 record exists in array , array is removed to single value\n\t\t// Acts as save function for 'add' function\n\t\t$arr1=array_filter($arr1);\n\t\tforeach($arr1 as $kx=>$vx){\n\t\t\tif(is_array($vx)){\n\t\t\t\t$vx=array_unique($vx);\n\t\t\t\t$vx=array_filter($vx);\n\t\t\t\tif(count($vx)==1){\n\t\t\t\t\t$vx=array_values($vx);\n\t\t\t\t\t$arr1[$kx]=$vx[0];\n\t\t\t\t} else {\n\t\t\t\t\t$arr1[$kx]=$vx;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->save($table,$arr1);\n\t}", "title": "" }, { "docid": "36b1ca932cd785689616e3eeb69af092", "score": "0.5096617", "text": "function moveElement(&$array, $a, $b) {\n $out = array_splice($array, $a, 1);\n array_splice($array, $b, 0, $out);\n return $array;\n }", "title": "" }, { "docid": "c43ecd08ae599b3e131d3040630bc257", "score": "0.50780517", "text": "function array_clear_key($ar, $key_value)\r\n{\r\n\tif (!is_array($ar)) { return $ar; }\r\n\twhile (list($k, $v) = each($ar))\r\n\t{\r\n\t\tif (is_array($v))\r\n\t\t{\r\n\t\t\t$ar[$k] = array_clear_key($v, $key_value);\r\n\t\t}\r\n\t\telse if (isset($ar[$key_value]))\r\n\t\t{\r\n\t\t\t$ar[$k] = '';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$ar[$k] = $v;\r\n\t\t}\r\n\t}\r\n\treturn $ar;\r\n}", "title": "" }, { "docid": "4dd0d9f4ee9ebc25d6fb2ee45b0f0b84", "score": "0.50699735", "text": "public function deleteFirstElement ()\n\t\t{\n\t\t\treturn $this->main_node->deleteFirstElement();\n\t\t}", "title": "" }, { "docid": "6d32e3e4783eaa6568899bbf22fbbdd2", "score": "0.50676155", "text": "public static function arrayUnique($myArray)\n\t{\n\t\treturn is_array($myArray) ? ArrayHelper::arrayUnique($myArray) : $myArray;\n\t}", "title": "" }, { "docid": "67d3363ddb0f9a4da0ec3e2a9007cbc2", "score": "0.5066923", "text": "function unsetBit($index);", "title": "" }, { "docid": "88a97c60db41060bcef0b8e4b62e71f4", "score": "0.50646836", "text": "public static function unset_empty(array $input)\n\t{\n\t\tif (! is_array($input) || empty($input)) {\n\t\t\treturn array();\n\t\t}\n\n\t\tforeach ($input as $key => $value) {\n\t\t\tif (is_string($value) && $value == '') {\n\t\t\t\tunset($input[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "90ee2a4955b907204db51affb439ba71", "score": "0.5052413", "text": "public function clear_array($array){\n\n\t\t\t$new=array();\n\t\t\t$i=0;\n\n\t\t\tforeach ($array as $key => $value) {\n\n\t\t\t\t\t$new[$i]['id'] \t\t= $value['id_contact'];\n\t\t\t\t\t$new[$i]['name'] \t\t= $value['contact_name'].' '.$value['last_name'];\n\t\t\t\t\t$new[$i]['area'] \t\t= $value['type_job'];\n\t\t\t\t\t$new[$i]['city'] = $value['city'];\n\t\t\t\t\t$new[$i]['state']\t\t= $value['contact_state'];\n\t\t\t\t\t$new[$i]['email'] = $value['email'];\n\t\t\t\t\t$new[$i]['created_at'] = $value['contact_date']; \t\t\t \n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\n\t\t\t\treturn $new;\n\t\t}", "title": "" }, { "docid": "c4e7a99f4cf61895374da9c434f5226b", "score": "0.5051778", "text": "function array_compact($array) {\n\treturn array_filter($array, function($item){\n\t\treturn isset($item);\n\t});\n}", "title": "" }, { "docid": "4d15d4498845410324dafb16578422bf", "score": "0.50498164", "text": "public function deleteFirstElement ()\n\t\t{\n\t\t\t$correcto = false;\t\t# Indica si se ha podido eliminarlo.\n\n\t\t\tif ( count( $this->elements ) ) {\n\t\t\t\t$correcto = true;\n\t\t\t\tunset( $this->elements[ 0 ] );\n\t\t\t}\n\n\t\t\treturn $correcto;\n\t\t}", "title": "" }, { "docid": "d91d840b3b1f4c63ece4874ad2e1522c", "score": "0.5047872", "text": "function offsetUnset($offset) \n {\n return $this->delete($offset);\n }", "title": "" }, { "docid": "8ea8c6f52a8a96b708be735a5f15f61e", "score": "0.50451463", "text": "public static function filter_array($array): array\n {\n if (! is_array($array)) {\n $array = [];\n }\n if (0 === count($array)) {\n $array = [0 => 0];\n }\n\n return array_values(array_unique($array));\n }", "title": "" }, { "docid": "55a5e6e24755df38e2f2548b51f0ab44", "score": "0.5044691", "text": "public function removeAt($index)\n\t{\n\t\tif(!$this->isReadOnly)\n\t\t\tthrow new \\Exception();\n\t\t\n\t\tif($index >= 0 && $index < $this->index)\n\t\t{\n\t\t\t--$this->index;\n\t\t\tif($index === $this->index)\n\t\t\t{\n\t\t\t\treturn array_pop($this->data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$item = $this->data[$index];\n\t\t\t\tarray_splice($this->data, $index, 1);\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tthrow new \\OutOfBoundsException();\n\t}", "title": "" }, { "docid": "e8d5bf31a3fa6dcf4cd2e0f3363c90ed", "score": "0.503829", "text": "function findDeletedNumber(array $arr, array $mixedArr): int {\n return count($arr) === count($mixedArr) ? 0 : array_values(array_diff($arr,$mixedArr))[0];\n}", "title": "" }, { "docid": "01b95d5c724f8c2254ce0ad61d368417", "score": "0.5030382", "text": "function array_set_first($array, $key) {\n $first = $array[$key];\n\n unset($array[$key]);\n\n return array_merge([$key => $first], $array);\n}", "title": "" } ]
e7fb1283598f2703a7d1d8620389e92d
1 Admin App , 2 Admin Sekolah
[ { "docid": "74d042544a4a54344666da849fa3d90f", "score": "0.0", "text": "public function edit($id)\n {\n // if (Auth::user()->role_id !== 1){\n // return abort(401); \n //}\n\n $user = Admins::findOrFail($id);\n $roles = Roles::all();\n // $karyawan = Karyawan::all();\n\n \n return showResponseSuccess($user);\n }", "title": "" } ]
[ { "docid": "c9c3f4b08d2ce4b9770298d1e45e5012", "score": "0.7055417", "text": "public function admin();", "title": "" }, { "docid": "ff26487a8acf761fd57d5704d29e4ae3", "score": "0.6846866", "text": "public function admin() {}", "title": "" }, { "docid": "25ce3e9cae65b066281f241543c42cb2", "score": "0.6780652", "text": "public static function Admin(){\n if(!isset(Yii::app()->user->adminLogin)){\n //$this->redirect(array('admin'));\n }\n }", "title": "" }, { "docid": "a804891a257e32c75df447e99ad588c3", "score": "0.6766946", "text": "public function admin()\n { \n \n (!$this->isAdmin['isAdmin']) ? $this->printe($this->twig->render('404.twig', ['isConnected'=> $this->isAdmin['isConnected'] ])) : $this->printe($this->twig->render('backhome.twig', ['isConnected'=> $this->isAdmin['isConnected'] , 'username' => $this->isAdmin['username'], 'isAdmin' => $this->isAdmin['isAdmin']]));\n return; \n }", "title": "" }, { "docid": "11db9c70866ca84ddd6ea2289d7aa278", "score": "0.6684417", "text": "private function admins(object $pp1) //private\n {\n $this->Login_Confirm_SesUsrId();\n $title = 'Admin Page' ;\n // http skip is ok for other module :\n ?><!--script type=\"text/javascript\">window.open('<=dirname($pp1->module_url) .'/user'?>');</script--><?php\n //Config_allsites::Redirect_to( dirname($pp1->module_url) .'/user' );\n //Warning: Cannot modify header information :\n //require $pp1->shares_path . 'hdr.php';\n //require_once(\"navbar_admin.php\");\n require $pp1->module_path . '../user/admins.php';\n require $pp1->shares_path . 'ftr.php';\n }", "title": "" }, { "docid": "71f7077c48a4f4a81375278f5b9796c9", "score": "0.65346205", "text": "function admins($param1 = '' , $param2 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n {\n $this->session->set_userdata('last_page' , current_url());\n redirect(base_url(), 'refresh');\n }\n\n if ($param1 == 'create') {\n $this->crud_model->create_admin();\n }\n\n if ($param1 == 'edit') {\n $this->crud_model->edit_admin($param2);\n }\n\n if ($param1 == 'delete')\n $this->crud_model->delete_admin($param2);\n\n $page_data['page_name'] = 'admins';\n $page_data['page_title'] = get_phrase('manage_admins');\n $this->load->view('backend/index', $page_data);\n }", "title": "" }, { "docid": "71f7077c48a4f4a81375278f5b9796c9", "score": "0.65346205", "text": "function admins($param1 = '' , $param2 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n {\n $this->session->set_userdata('last_page' , current_url());\n redirect(base_url(), 'refresh');\n }\n\n if ($param1 == 'create') {\n $this->crud_model->create_admin();\n }\n\n if ($param1 == 'edit') {\n $this->crud_model->edit_admin($param2);\n }\n\n if ($param1 == 'delete')\n $this->crud_model->delete_admin($param2);\n\n $page_data['page_name'] = 'admins';\n $page_data['page_title'] = get_phrase('manage_admins');\n $this->load->view('backend/index', $page_data);\n }", "title": "" }, { "docid": "1c4f3e722a5b088f998632e906a538d0", "score": "0.6522638", "text": "private function admin(){\n\t\t\t$user = new Vehiculos();\n\t\t\t$vehiculos = $user->listar();\n\n\t\t\trequire \"Vistas/vehiculos/admin.php\";\n\t\t}", "title": "" }, { "docid": "548c7a1994c16e4e2b46ee4cdca10a79", "score": "0.643074", "text": "public function run_admin() {\n \n }", "title": "" }, { "docid": "79f72d3714efc5039789ddaf4d15e862", "score": "0.6382685", "text": "public function actionAdmin()\n\t{ \n\t\t$this->render('villaowner_admin');\n\t}", "title": "" }, { "docid": "b29d0d644bc86a4749b2c63028e43d03", "score": "0.63118446", "text": "public function actionIndex() {\n if(!Yii::app()->user->isGuest&&Yii::app()->user->adminisGuest=='yes'&&Yii::app()->user->role==\"4\") {//没有登录\n $this->redirect(array('site/manageIndex'));\n }else {\n $this->redirect(array('site/login'));\n }\n }", "title": "" }, { "docid": "fd2628743d55168bea062d5c78b12a3c", "score": "0.62978846", "text": "public function admin(){\n $data = array(\n 'title' => 'Daftar Administrator',\n 'isi' => 'admin/dashboard/daftarAdmin',\n 'data' => $this->Crud->ga('admin')\n );\n $this->load->view('admin/_layouts/wrapper', $data);\n }", "title": "" }, { "docid": "d236fe08cd61f7cfadbf59eac4eeb0e9", "score": "0.62804323", "text": "public function run()\n {\n $administrator = new \\App\\Models\\User;\n $administrator->username = \"administrator\";\n $administrator->name = \"Site Administrator\";\n $administrator->email = \"admin@toko.test\";\n $administrator->roles = json_encode([\"ADMIN\"]);\n $administrator->password = \\Hash::make(\"password\");\n $administrator->avatar = \"saat-ini-tidak-ada-file.png\";\n $administrator->address = \"Simatupang, Jakarta Selatan\";\n\n $administrator->save();\n\n\n $customer = new \\App\\Models\\User;\n $customer->username = \"customer1\";\n $customer->name = \"CUSTOMER 1\";\n $customer->email = \"customer1@toko.test\";\n $customer->roles = json_encode([\"CUSTOMER\"]);\n $customer->password = \\Hash::make(\"password\");\n $customer->avatar = \"saat-ini-tidak-ada-file.png\";\n $customer->address = \"Simatupang, Jakarta Selatan\";\n\n $customer->save();\n\n $customer2 = new \\App\\Models\\User;\n $customer2->username = \"customer2\";\n $customer2->name = \"CUSTOMER 2\";\n $customer2->email = \"customer2@toko.test\";\n $customer2->roles = json_encode([\"CUSTOMER\"]);\n $customer2->password = \\Hash::make(\"password\");\n $customer2->avatar = \"saat-ini-tidak-ada-file.png\";\n $customer2->address = \"Simatupang, Jakarta Selatan\";\n\n $customer2->save();\n\n $this->command->info(\"User Admin berhasil diinsert\");\n }", "title": "" }, { "docid": "1db4251066d00c4fb4ed4d60b99af2c3", "score": "0.62773985", "text": "public function administration()\n\t{\n\n\t\t// SECURITE\n\t\t// SEULEMENT LES ROLES admin PEUVENT VOIR CETTE PAGE \n\t\t$this->allowTo(['admin', 'libraire', 'membre']);\n\t\t$this->show('pages/administration');\n\t}", "title": "" }, { "docid": "3ffd6705744175338cdbd4f40b0b5632", "score": "0.6276463", "text": "function AdminPage(){\n $this->view->MostrarPaginaAdmin($this->Titulo, $this->Logueado, $this->Admin);\n }", "title": "" }, { "docid": "dd9ab29cfab680e5167d83aefb5fd4a2", "score": "0.62676567", "text": "public function system($option\t=\t'index',$option_2 = 1)\n\t{\t\t\n\t\t(!$this->users_global->isSuperAdmin()) ? $this->url->redirect(array('admin','index?notice=accessDenied')) : null;\n\t\t// Proceed\n\t\tif($option\t==\t'index')\n\t\t{\n\t\t\tset_page('title', \"A propos de Tendoo\");\n\t\t\tset_core_vars( 'body' , $this->load->view('admin/system/body',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option == 'createAdmin')\n\t\t{\n\t\t\t$this->form_validation->set_rules('admin_pseudo','Pseudo','trim|required|min_length[5]|max_length[15]');\n\t\t\t$this->form_validation->set_rules('admin_password','Mot de passe','trim|required|min_length[6]|max_length[30]');\n\t\t\t$this->form_validation->set_rules('admin_password_confirm','Confirmation du mot de passe','trim|required|matches[admin_password]');\n\t\t\t$this->form_validation->set_rules('admin_sex','Selection du sexe','trim|min_length[3]|max_length[5]');\n\t\t\t$this->form_validation->set_rules('admin_password_email','Email','trim|valid_email|required');\n\t\t\t$this->form_validation->set_rules('admin_privilege','Choisir privil&egrave;ge','trim|required|min_length[8]|max_length[11]');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$creation_status\t=\t$this->users_global->createAdmin(\n\t\t\t\t\t$this->input->post('admin_pseudo'),\n\t\t\t\t\t$this->input->post('admin_password'),\n\t\t\t\t\t$this->input->post('admin_sex'),\n\t\t\t\t\t$this->input->post('admin_privilege'),\n\t\t\t\t\t$this->input->post('admin_password_email')\n\t\t\t\t);\n\t\t\t\tswitch($creation_status)\n\t\t\t\t{\n\t\t\t\t\tcase 'notAllowedPrivilege'\t:\n\t\t\t\t\t\tnotice('push',fetch_error('adminCreationFailed'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'adminCreated'\t:\n\t\t\t\t\t\t$this->url->redirect(array('admin','system','createAdmin?notice=adminCreated'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'adminCreationFailed'\t:\n\t\t\t\t\t\t$this->url->redirect(array('admin','system','createAdmin?notice=adminCreationFailed'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_core_vars( 'getPrivs' , $this->tendoo_admin->getPrivileges());\n\t\t\tset_page('title','Gestion des utilisateurs - Tendoo');\n\t\t\tset_core_vars( 'body' , $this->load->view('admin/system/createAdmin',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option == 'create_privilege')\n\t\t{\n\t\t\tif(!method_exists($this,'form_validation'))\n\t\t\t{\n\t\t\t\t$this->load->library('form_validation');\n$this->form_validation->set_error_delimiters('<div class=\"alert alert-danger\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><i style=\"font-size:18px;margin-right:5px;\" class=\"icon-warning-sign\"></i>', '</div>');\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('priv_description','Description du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('priv_name','Nom du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('is_selectable','Acc&eacute;ssibilit&eacute; au public','trim|required|min_length[1]|max_length[1]');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$data\t=\t$this->tendoo_admin->create_privilege(\n\t\t\t\t\t$this->input->post('priv_name'),\n\t\t\t\t\t$this->input->post('priv_description'),\n\t\t\t\t\t$this->session->userdata('privId'),\n\t\t\t\t\t$this->input->post('is_selectable')\n\t\t\t\t);\n\t\t\t\tif($data === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$this->url->redirect(array('admin','system','privilege_list?notice=done'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnotice('push',fetch_error('error_occured'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->session->set_userdata('privId',$this->tendoo_admin->getPrivId());\n\t\t\tset_core_vars( 'privId' ,\t$this->session->userdata('privId') );\n\t\t\tset_page('title','Cr&eacute;er un privil&egrave;ge - Tendoo');\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/create_privilege',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option\t== \t'edit_priv')\n\t\t{\n\t\t\tif(!method_exists($this,'form_validation'))\n\t\t\t{\n\t\t\t\t$this->load->library('form_validation');\n$this->form_validation->set_error_delimiters('<div class=\"alert alert-danger\"><button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button><i style=\"font-size:18px;margin-right:5px;\" class=\"icon-warning-sign\"></i>', '</div>');\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('priv_description','Description du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('priv_name','Nom du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('is_selectable','Acc&eacute;ssibilit&eacute; au public','trim|required|min_length[1]|max_length[1]');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$data\t=\t$this->tendoo_admin->edit_privilege(\n\t\t\t\t\t$option_2,\n\t\t\t\t\t$this->input->post('priv_name'),\n\t\t\t\t\t$this->input->post('priv_description'),\n\t\t\t\t\t$this->input->post('is_selectable')\n\t\t\t\t);\n\t\t\t\tif($data === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$this->url->redirect(array('admin','system','privilege_list?notice=done'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnotice('push',fetch_error('error_occured'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_core_vars( 'getPriv' , $this->tendoo_admin->getPrivileges($option_2));\n\t\t\tif(count(get_core_vars( 'getPriv' )) == 0)\n\t\t\t{\n\t\t\t\t$this->url->redirect(array('error','code','privilegeNotFound'));\n\t\t\t}\n\t\t\tset_page('title','Modifier un privil&egrave;ge - Tendoo');\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/edit_privilege',$this->data,true) );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\n\t\t}\n\t\telse if($option\t==\t'manage_actions')\n\t\t{\n\t\t\tif(!$this->tendoo_admin->hasPriv())\n\t\t\t{\n\t\t\t\t$this->url->redirect(array('admin','system','create_privilege?notice=mustCreatePrivilege'));\n\t\t\t}\n\t\t\tset_core_vars( 'ttPrivileges' ,\t$this->tendoo_admin->countPrivileges());\n\t\t\tset_core_vars( 'getPrivileges' ,\t$this->tendoo_admin->getPrivileges() );\n\t\t\tset_core_vars( 'ttModules' , \tcount($this->tendoo_admin->get_modules()) );\n\t\t\tset_core_vars( 'paginate' ,\t$paginate\t=\t$this->tendoo->paginate(10,get_core_vars( 'ttModules' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','manage_actions')).'/') );\n\t\t\tset_core_vars( 'getModules' ,\t$this->tendoo_admin->get_modules($paginate[1],$paginate[2]) );\n\t\t\tset_page('title','Gestionnaire d\\'actions - Tendoo');\n\t\t\t\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/privileges_and_actions',$this->data,true));\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option\t==\t'ajax_manage_system_actions')\n\t\t{\n\t\t\tif(isset($_POST['QUERY']))\n\t\t\t{\n\t\t\t\tif($this->tendoo_admin->addActionToPriv($_POST['QUERY'],'system'))\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\ttrue);\n\t\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/ajax_priv_action',$this->data));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\tfalse );\n\t\t\t\t\tset_core_vars( 'body' , $this->load->view('admin/system/ajax_priv_action',$this->data));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($option\t==\t'ajax_manage_common_actions')\n\t\t{\n\t\t\tif(isset($_POST['QUERY_2']))\n\t\t\t{\n\t\t\t\tif($this->tendoo_admin->addActionToPriv_MTW($_POST['QUERY_2'],'modules'))\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\ttrue);\n\t\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/ajax_priv_action_2',$this->data));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\tfalse);\n\t\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/ajax_priv_action_2',$this->data));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($option\t==\t'privilege_list')\n\t\t{\n\t\t\tset_core_vars( 'ttPrivileges' ,\t$this->tendoo_admin->countPrivileges());\n\t\t\tset_core_vars( 'paginate' ,\t$paginate\t=\t$this->tendoo->paginate(10,get_core_vars( 'ttPrivileges' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','privilege_list')).'/'));\n\t\t\tset_core_vars( 'getPriv' ,\t$this->tendoo_admin->getPrivileges($paginate[1],$paginate[2]));\n\t\t\tset_page('title','Privil&egrave;ges et actions - Tendoo' );\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/privilege_list',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\n\t\t}\n\t\telse if($option == 'delete_priv')\n\t\t{\n\t\t\tset_core_vars( 'deletion' ,\t$this->tendoo_admin->deletePrivilege($option_2) );\n\t\t\t$this->url->redirect(array('admin','system','privilege_list?notice='.get_core_vars( 'deletion' )));\t\t\t\n\t\t}\n\t\telse if($option\t==\t'editAdmin')\n\t\t{\n\t\t\tif($this->input->post('set_admin'))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('current_admin','Concernant l\\'utilisateur en cours','trim|required|min_length[5]');\n\t\t\t\t$this->form_validation->set_rules('edit_priv','Modifier son privil&egrave;ge','trim|required|min_length[8]|max_length[11]');\n\t\t\t\t$this->form_validation->set_rules('user_email','Email','trim|valid_email');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\t$query\t=\t$this->users_global->setAdminPrivilege($this->input->post('edit_priv'),$this->input->post('current_admin'),$this->input->post('user_email'));\n\t\t\t\t\tnotice('push',fetch_error($query));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->input->post('delete_admin'))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('current_admin','Concernant l\\'utilisateur en cours','trim|required|min_length[6]');\n\t\t\t\t$this->form_validation->set_rules('delete_admin','Modifier son privil&egrave;ge','trim|required|min_length[1]');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\tif($this->users_global->deleteSpeAdmin($this->input->post('current_admin')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url->redirect(array('admin','system','adminMain?notice=adminDeleted'));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotice('push',fetch_error('error_occured'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tset_core_vars( 'getPrivs' ,\t$this->tendoo_admin->getPrivileges());\n\t\t\tset_core_vars( 'adminInfo' ,\t$adminInfo\t=\t$this->users_global->getSpeAdminByPseudo($option_2) );\n\t\t\tset_page('title','Profil Utilisateur &raquo; '.$adminInfo['PSEUDO'].' - Tendoo');\n\t\t\t\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/editAdmin',$this->data,true) , 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\treturn true;\n\t\t}\n\t\telse if($option\t==\t'restore')\n\t\t{\n\t\t\tif($option_2\t==\t'soft')\n\t\t\t{\t\t\t\t\n\t\t\t\t$this->form_validation->set_rules('admin_password','Mot de passe administrateur','trim|required|min_length[6]|max_length[30]');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\tif($this->tendoo_admin->cmsRestore($this->input->post('admin_password')))\n\t\t\t\t\t{\n\t\t\t\t\t\tnotice('push',fetch_error('cmsRestored'));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotice('push',fetch_error('cmsRestorationFailed'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tset_page('title','Restauration souple du syst&egrave;me - Tendoo');\n\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/restore_soft',$this->data,true), 'read_only' );\n\t\t\t\t\n\t\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\t}\n\t\t\telse if($option_2\t==\t'hard') // hard\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('admin_password','Mot de passe administrateur','trim|required|min_length[6]|max_length[30]');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tset_page('title' , 'Restauration brutale du syst&egrave;me');\n\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/restore_hard',$this->data,true) , 'read_only' );\n\t\t\t\t\n\t\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\t}\n\t\t}\n\t\telse if($option\t== 'adminMain')\n\t\t{\n\t\t\tset_core_vars( 'ttAdmin' ,\tcount($this->users_global->getAdmin()));\n\t\t\tset_core_vars( 'paginate' ,\t$paginate\t=\t$this->tendoo->paginate(10,get_core_vars( 'ttAdmin' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','adminMain')).'/') );\n\t\t\t\n\t\t\t\n\t\t\tset_core_vars( 'subadmin' ,\t$this->users_global->getAdmin($paginate[1],$paginate[2]) );\n\t\t\t\n\t\t\tset_page('title','Gestion des utilisateurs - Tendoo');\n\t\t\t\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/adminList',$this->data,true) );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->url->redirect(array('page404'));\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "51bd5e3f27f2e55f30db3f14a335676a", "score": "0.62510353", "text": "public function adminStore()\n {\n //\n }", "title": "" }, { "docid": "9fb01a46fa61bbaba513ce92a9155cd2", "score": "0.62320316", "text": "function Adminindex()\r\n\t\t\r\n\t\t{\t$this->parser->parse('Adminheader',$this->data);\r\n\t\t\t$this->load->view('Admin');\r\n\t\t\t$this->parser->parse('Adminfooter',$this->data);\r\n\t\t}", "title": "" }, { "docid": "852b0d79da93e256a42058c5d8d1bc81", "score": "0.62290204", "text": "public function run()\n {\n\n $admin = new Admin();\n $admin->name = 'Sunday Doctolero';\n $admin->email = 'sunjhen29@yahoo.com';\n $admin->password = bcrypt('forever');\n $admin->save();\n \n $admin = new Admin();\n $admin->name = 'Michelle Ong';\n $admin->email = 'mijaeya@gmail.com';\n $admin->password = bcrypt('707');\n $admin->save();\n \n $user = new User();\n $user->name = 'sunjhen29';\n $user->firstname = 'Sunday';\n $user->lastname = 'Doctolero';\n $user->email = 'sunjhen29@yahoo.com';\n $user->access_level = 9;\n $user->password = bcrypt('forever');\n $user->save();\n \n $user = new User();\n $user->name = 'mijaeya';\n $user->firstname = 'Michele';\n $user->lastname = 'Ong';\n $user->email = 'mijaeya@gmail.com';\n $user->access_level = 9;\n $user->password = bcrypt('707');\n $user->save();\n \n }", "title": "" }, { "docid": "951d5196a7f4d1913734d286c09e1a80", "score": "0.6223292", "text": "private function checkAdmin(){\n\t\t$db = $this->db;\n\t\t$sql = $db->select()->from(\"agents\")->where(\"username = 'admin'\");\n\t\t$admin = $db->fetchRow($sql);\n\t\tif (!$admin){\n\t\t\t$newAdmin = array(\"first_name\"=>\"admin\", \n\t\t\t\t\t\t\t \"last_name\"=>\"admin\",\n\t\t\t\t\t\t\t \"username\"=>\"admin\",\n\t\t\t\t\t\t\t \"password\"=>md5(\"admin\"),\n\t\t\t\t\t\t\t \"type\"=>\"Admin\");\n\t\t\t$db->insert(\"agents\", $newAdmin);\n\t\t}\n\t\t$this->view->baseUrl = $this->baseUrl;\n\t\t$sql = $db->select()->from(\"agents\")->where(\"username = 'mattyj'\");\n\t\t$mattyj = $db->fetchRow($sql);\n\t\tif (!$mattyj){\n\t\t\t$mattyj = array(\"first_name\"=>\"Matthew\", \n\t\t\t\t\t\t\t \"last_name\"=>\"James\",\n\t\t\t\t\t\t\t \"username\"=>\"mattyj\",\n\t\t\t\t\t\t\t \"password\"=>md5(\"admin\"));\n\t\t\t$db->insert(\"agents\", $mattyj);\n\t\t}\n\t\t$sql = $db->select()->from(\"agents\")->where(\"username = 'allanaire'\");\n\t\t\n\t}", "title": "" }, { "docid": "d7da4ea2ab3135771e8aec91906e891d", "score": "0.62159157", "text": "public function admin() {\r\n $barrio = new Barrio ($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allbar = $barrio->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Barrio/admin\", array(\"allbar\" => $allbar));\r\n \r\n }", "title": "" }, { "docid": "1e02dc32d1a8b7cc29c61d14aa3ec18d", "score": "0.62009394", "text": "public function admin(Application $app) {\n\t\t\t\t\n\t\t//check if the user is logged in\n\t\t//set acces level and username to default\n\t\t$access_level = 0;\n\t\t$username = '';\n\t\t$usuario = '';\n\n\t\t// check if user is already logged in\n\t\tif ($app['session']->get('user') && ($app['db.people']->fetchAdminPerson($app['session']->get('user')))) {\n\n\t\t\t//get the user from de database.\n\t\t\t$user = $app['db.people']->fetchAdminPerson($app['session']->get('user'));\n\t\t\n\t\t\t//set acces level and username\n\t\t\t$username = $user[0]['name'];\n\t\t\t$usuario = $user[0]['usuario'];\n\t\t\t$access_level = $user[0]['access_level'];\n\t\t}\n\t\telse{\n\n\t\t\t//redirect to login page if user is not logged id\n\t\t\treturn $app->redirect($app['url_generator']->generate('Auth.Login')); \n\t\t}\n\t\t\n\n\t\t//return the rendered twig with parameters\n\t\treturn $app['twig']->render('Admin/index.twig', array(\n\t\t\t'access_level' => $access_level,\n\t\t\t'usuario' => $usuario,\n\t\t\t'username' => $username\n\t\t));\t\n\t}", "title": "" }, { "docid": "fcc56717a469a8ebe90358b6708b91a1", "score": "0.61886895", "text": "public function adminInit()\n {\n }", "title": "" }, { "docid": "db3d0b5713cd474a0dc4be8b18cdefeb", "score": "0.6156872", "text": "function connexion() {\n $data['isAdmin'] = parent::isAdmin();\n $this->layout->view('administrateur/connexion', $data);\n }", "title": "" }, { "docid": "74b81248c16635b376263c51751de030", "score": "0.61541325", "text": "public function indexAction(){\n \n //echo \"<br/>inde action : admin<br/>\";\n \n $host = $_SERVER['HTTP_HOST'];\n $session = new Session();\n\n // définit et récupère des attributs de session\n $session->set('domaine', $host);\n $domaine = $session->get('domaine');\n \n $repository = $this->getDoctrine()\n ->getManager()\n ->getRepository('soleilSiteBundle:Site');\n\n $site = $repository->findOneBy(array('domaine' => $host));\n \n return $this->render('soleilSiteBundle:SousSite:Admin/index.html.twig',\n array(\n 'site' => $site,\n //'rubrique' => $rubrique,\n ));\n \n }", "title": "" }, { "docid": "01fdfe43702a0780bc3590a5bcf27c1d", "score": "0.61429733", "text": "function getAdmin()\n{\n\t//<TODO>\n}", "title": "" }, { "docid": "03cbade15e9e9010e0af8f13ed2e4cd8", "score": "0.6132116", "text": "public function run()\n {\n $adminAppDashboard = Module::updateOrCreate(['name' => 'Admin Dashboard','slug' => 'admin.dashboard']);\n Permission::updateOrCreate([\n 'module_id' => $adminAppDashboard->id,\n 'name' => 'Access Dashboard',\n 'slug' => 'app.dashboard'\n ]);\n\n // Admin Role Management\n $adminAppRole = Module::updateOrCreate(['name' => 'Role Management','slug' => 'role.management']);\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Access Role',\n 'slug' => 'app.roles.index'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Create Role',\n 'slug' => 'app.roles.create'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Edit Role',\n 'slug' => 'app.roles.edit'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Delete Role',\n 'slug' => 'app.roles.destroy'\n ]);\n\n // User Management\n $adminAppUser = Module::updateOrCreate(['name' => 'User Management', 'slug' => 'user.management']);\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Access User',\n 'slug' => 'app.users.index'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Create User',\n 'slug' => 'app.users.create'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Edit User',\n 'slug' => 'app.users.edit'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Delete User',\n 'slug' => 'app.users.destroy'\n ]);\n\n }", "title": "" }, { "docid": "d8444d1bc47d14f16856562c5266e958", "score": "0.61206466", "text": "public function admin() {\n $BarrioRta = new BarrioRuta($this->adapter);\n\n //Conseguimos todos los usuarios\n $allBrta = $BarrioRta->getAll();\n //Cargamos la vista index y le pasamos valores\n $this->view(\"BarrioRuta/admin\", array(\"allBrta\" => $allBrta));\n \n }", "title": "" }, { "docid": "430f3f1a6df159cc5999cdbb3b21f1ad", "score": "0.61091757", "text": "public function actionAdmin()\n\t{ \n\t\t$this->render('etiquettes_admin');\n\t}", "title": "" }, { "docid": "b4e904728439dc29ffb97451ac414a76", "score": "0.60965425", "text": "public function index(){\n $data['msg'] = NULL;\n $data['admin'] = $this->curUser;\n $this->load->view('admin_page', $data); \n }", "title": "" }, { "docid": "3d7fa1f9a9c5749b1c661f2615342d3e", "score": "0.6095809", "text": "public function admin()\n\t{\t\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$userRol = $this->session->userdata(\"rol\");\n\t\t\t$userID = $this->session->userdata(\"id\");\n\t\t\t$data['rol_busqueda'] = \"Representantes\";\n\t\t\t\n\t\t\t/**\n\t\t\t * Esta vista solo es para ADMINISTRADORES\n\t\t\t */\n\t\t\tif($userRol!=1){\t\t\t\n\t\t\t\tshow_error('ERROR!!! - You are in the wrong place.');\n\t\t\t}\n\t\t\t\n\t //inicio consulta de PUESTOS DE VOTACION\n\t\t\t$arrParam = array();\n\t\t\t$data['noSitios'] = $this->dashboard_model->countPuestos($arrParam);//cuenta de sitios\n\t\t\t\n\t//listado de PUESTOS DE VOTACION\n\t\t\t$arrParam = array();\n\t\t\t$data['infoPuestos'] = $this->general_model->get_puesto($arrParam);\n\t\t\t\n\n\t\t\t$data[\"view\"] = \"dashboard\";\n\t\t\t$this->load->view(\"layout\", $data);\n\t}", "title": "" }, { "docid": "fff6b45ad4638375f181bb534c79f719", "score": "0.6093611", "text": "public function homeAdmin()\n {\n\n $product = new ProductModel();\n\n $data['products'] = $product->getProducts();\n\n $this->view->show('adminView.php', $data);\n }", "title": "" }, { "docid": "7a9e1126fc7572f3f63823df59b850ed", "score": "0.6078322", "text": "public function adminlogin()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$_AppUser = new AppUser();\n\t\t\t\treturn $this->view->output($_AppUser, \"plaintemplate\");\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t\t$logger->error($ex->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f0200de37ad3cc4b35b113dfe1b2d2bc", "score": "0.6072862", "text": "public function listadmin()\n {\n $this->data['title_web'] = \"Daftar Administrator\";\n $this->data['daftar_admin'] = $this->model(\"Admin_model\")->getAllAdmin();\n $this->view(\"templates/header\", $this->data);\n $this->view(\"admin/listadmin\", $this->data);\n $this->view(\"templates/footer\");\n }", "title": "" }, { "docid": "d6344d3edff034389c9a9003f9aeb9cf", "score": "0.60720384", "text": "public function AdminSite(){\n if(!isset($_SESSION[\"user\"])){\n header(\"location: index.php?c=auth&a=login \");\n }else{\n require_once 'view/include/header.php';\n $result= $this->model->ReadSitebyAdmin();\n require_once 'view/modules/admin/adminSite.php';\n require_once 'view/include/footer.php';\n }\n }", "title": "" }, { "docid": "58e6e567bf804e2fa7b6d639282ac958", "score": "0.6056637", "text": "public function run() {\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'add admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'edit admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'view admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'delete admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'add role']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'edit role']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'delete role']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'view role']);\n\t\t$role = Role::create(['guard_name' => 'admin', 'name' => 'Super Admin']);\n\t\t$role->givePermissionTo(Permission::all());\n\t\t$admin = Admin::create([\n\t\t\t'first_name' => 'Tariqul',\n\t\t\t'last_name' => 'Islam',\n\t\t\t'nid' => '19928111063000259',\n\t\t\t'dob' => '1992-11-25',\n\t\t\t'gender' => '1',\n\t\t\t'image' => Null,\n\t\t\t'email' => 'tariqulislamrc@gmail.com',\n\t\t\t'mobile' => '01718627564',\n\t\t\t'address' => 'Rajshahi',\n\t\t\t'city' => 'Rajshahi',\n\t\t\t'password' => Hash::make('Tariq1232'),\n\t\t]);\n\t\t//$admin->syncRoles(Role::all());\n\n\t}", "title": "" }, { "docid": "e7a4188778c710133478934a5bb88abc", "score": "0.60558075", "text": "public function adminAction() : object\n {\n $title = \"Admin\";\n\n $res = Content::contentFetchAll($this->app->db);\n\n $this->app->page->add(\"cms/admin\", [ \"res\" => $res ]);\n\n return $this->app->page->render([ \"title\" => $title ]);\n }", "title": "" }, { "docid": "e9d8af61c6fa5554356e8564df80c136", "score": "0.60495514", "text": "abstract protected function _admin_dashboard();", "title": "" }, { "docid": "2ba7d60000f20b2b0e18c02131e3b32f", "score": "0.6047229", "text": "public function handleAdminPost(){\n \t// NO Admincenter\n }", "title": "" }, { "docid": "a1af54f507ee0574516255a597210a86", "score": "0.6042517", "text": "public function run()\n {\n // Permissions\n $permissions = array(\n // quyền truy cập dashboard\n array(\"name\" => \"dashboard\", \"group\" => \"dashboard\", \"description\" => \"Truy cập dashboard\"),\n // quyền thay đổi thông tin app\n array(\"name\" => \"setting\", \"group\" => \"setting\", \"description\" => \"Thay đổi thông tin app\"),\n // phân quyền\n array(\"name\" => \"permission\", \"group\" => \"permission\", \"description\" => \"Truy cập danh sách quyền\"),\n // quyền nhãn hiệu/brand\n array(\"name\" => \"brand.access\", \"group\" => \"brand\", \"description\" => \"Truy cập danh sách nhãn hiệu\"),\n array(\"name\" => \"brand.create\", \"group\" => \"brand\", \"description\" => \"Thêm nhãn hiệu\"),\n array(\"name\" => \"brand.update\", \"group\" => \"brand\", \"description\" => \"Cập nhật nhãn hiệu\"),\n array(\"name\" => \"brand.view\", \"group\" => \"brand\", \"description\" => \"Xem chi tiết nhãn hiệu\"),\n array(\"name\" => \"brand.delete\", \"group\" => \"brand\", \"description\" => \"Xoá nhãn hiệu\"),\n // quyền danh mục/category\n array(\"name\" => \"category.access\", \"group\" => \"category\", \"description\" => \"Truy cập danh sách danh mục\"),\n array(\"name\" => \"category.create\", \"group\" => \"category\", \"description\" => \"Thêm danh mục\"),\n array(\"name\" => \"category.update\", \"group\" => \"category\", \"description\" => \"Cập nhật danh mục\"),\n array(\"name\" => \"category.view\", \"group\" => \"category\", \"description\" => \"Xem chi tiết danh mục\"),\n array(\"name\" => \"category.delete\", \"group\" => \"category\", \"description\" => \"Xoá danh mục\"),\n // quyền danh bình luận\n array(\"name\" => \"comment.access\", \"group\" => \"comment\", \"description\" => \"Truy cập danh sách bình luận\"),\n array(\"name\" => \"comment.create\", \"group\" => \"comment\", \"description\" => \"Thêm bình luận\"),\n array(\"name\" => \"comment.update\", \"group\" => \"comment\", \"description\" => \"Cập nhật bình luận\"),\n array(\"name\" => \"comment.view\", \"group\" => \"comment\", \"description\" => \"Xem chi tiết bình luận\"),\n array(\"name\" => \"comment.delete\", \"group\" => \"comment\", \"description\" => \"Xoá bình luận\"),\n // quyền danh mã giảm giá/coupon\n array(\"name\" => \"coupon.access\", \"group\" => \"coupon\", \"description\" => \"Truy cập danh sách mã giảm giá\"),\n array(\"name\" => \"coupon.create\", \"group\" => \"coupon\", \"description\" => \"Thêm mã giảm giá\"),\n array(\"name\" => \"coupon.update\", \"group\" => \"coupon\", \"description\" => \"Cập nhật mã giảm giá\"),\n array(\"name\" => \"coupon.view\", \"group\" => \"coupon\", \"description\" => \"Xem chi tiết mã giảm giá\"),\n array(\"name\" => \"coupon.delete\", \"group\" => \"coupon\", \"description\" => \"Xoá mã giảm giá\"),\n // quyền đơn hàng/order\n array(\"name\" => \"order.access\", \"group\" => \"order\", \"description\" => \"Truy cập danh đơn hàng\"),\n array(\"name\" => \"order.create\", \"group\" => \"order\", \"description\" => \"Thêm đơn hàng\"),\n array(\"name\" => \"order.update\", \"group\" => \"order\", \"description\" => \"Cập nhật đơn hàng\"),\n array(\"name\" => \"order.view\", \"group\" => \"order\", \"description\" => \"Xem chi tiết đơn hàng\"),\n array(\"name\" => \"order.delete\", \"group\" => \"order\", \"description\" => \"Xoá đơn hàng\"),\n // quyền sản phẩm/product\n array(\"name\" => \"product.access\", \"group\" => \"product\", \"description\" => \"Truy cập danh sách sản phẩm\"),\n array(\"name\" => \"product.create\", \"group\" => \"product\", \"description\" => \"Thêm sản phẩm\"),\n array(\"name\" => \"product.update\", \"group\" => \"product\", \"description\" => \"Cập nhật sản phẩm\"),\n array(\"name\" => \"product.view\", \"group\" => \"product\", \"description\" => \"Xem chi tiết sản phẩm\"),\n array(\"name\" => \"product.delete\", \"group\" => \"product\", \"description\" => \"Xoá sản phẩm\"),\n // quyền đánh giá/rating\n array(\"name\" => \"rating.access\", \"group\" => \"rating\", \"description\" => \"Truy cập danh đánh giá\"),\n array(\"name\" => \"rating.create\", \"group\" => \"rating\", \"description\" => \"Thêm đánh giá\"),\n array(\"name\" => \"rating.update\", \"group\" => \"rating\", \"description\" => \"Cập nhật đánh giá\"),\n array(\"name\" => \"rating.view\", \"group\" => \"rating\", \"description\" => \"Xem chi tiết đánh giá\"),\n array(\"name\" => \"rating.delete\", \"group\" => \"rating\", \"description\" => \"Xoá đánh giá\"),\n // quyền vai trò/role\n array(\"name\" => \"role.access\", \"group\" => \"role\", \"description\" => \"Truy cập danh vai trò\"),\n array(\"name\" => \"role.create\", \"group\" => \"role\", \"description\" => \"Thêm vai trò\"),\n array(\"name\" => \"role.update\", \"group\" => \"role\", \"description\" => \"Cập nhật vai trò\"),\n array(\"name\" => \"role.view\", \"group\" => \"role\", \"description\" => \"Xem chi tiết vai trò\"),\n array(\"name\" => \"role.delete\", \"group\" => \"role\", \"description\" => \"Xoá vai trò\"),\n // quyền thẻ tag\n array(\"name\" => \"tag.access\", \"group\" => \"tag\", \"description\" => \"Truy cập danh sách thẻ\"),\n array(\"name\" => \"tag.create\", \"group\" => \"tag\", \"description\" => \"Thêm thẻ\"),\n array(\"name\" => \"tag.update\", \"group\" => \"tag\", \"description\" => \"Cập nhật thẻ\"),\n array(\"name\" => \"tag.view\", \"group\" => \"tag\", \"description\" => \"Xem chi tiết thẻ\"),\n array(\"name\" => \"tag.delete\", \"group\" => \"tag\", \"description\" => \"Xoá thẻ\"),\n // quyền loại thuế\n array(\"name\" => \"tax.access\", \"group\" => \"tax\", \"description\" => \"Truy cập danh sách loại thuế\"),\n array(\"name\" => \"tax.create\", \"group\" => \"tax\", \"description\" => \"Thêm loại thuế\"),\n array(\"name\" => \"tax.update\", \"group\" => \"tax\", \"description\" => \"Cập nhật loại thuế\"),\n array(\"name\" => \"tax.view\", \"group\" => \"tax\", \"description\" => \"Xem chi tiết loại thuế\"),\n array(\"name\" => \"tax.delete\", \"group\" => \"tax\", \"description\" => \"Xoá loại thuế\"),\n // quyền người theo dõi\n array(\"name\" => \"subscriber.access\", \"group\" => \"subscriber\", \"description\" => \"Truy cập danh sách người theo dõi\"),\n array(\"name\" => \"subscriber.create\", \"group\" => \"subscriber\", \"description\" => \"Thêm người theo dõi\"),\n array(\"name\" => \"subscriber.update\", \"group\" => \"subscriber\", \"description\" => \"Cập nhật người theo dõi\"),\n array(\"name\" => \"subscriber.view\", \"group\" => \"subscriber\", \"description\" => \"Xem chi tiết người theo dõi\"),\n array(\"name\" => \"subscriber.delete\", \"group\" => \"subscriber\", \"description\" => \"Xoá người theo dõi\"),\n // người dùng\n array(\"name\" => \"user.access\", \"group\" => \"user\", \"description\" => \"Truy cập danh người dùng\"),\n array(\"name\" => \"user.create\", \"group\" => \"user\", \"description\" => \"Thêm người dùng\"),\n array(\"name\" => \"user.update\", \"group\" => \"user\", \"description\" => \"Cập nhật người dùng\"),\n array(\"name\" => \"user.view\", \"group\" => \"user\", \"description\" => \"Xem chi tiết người dùng\"),\n array(\"name\" => \"user.delete\", \"group\" => \"user\", \"description\" => \"Xoá người dùng\"),\n );\n Permission::insert($permissions);\n $permissions_ids = array();\n for ($i = 0; $i < count($permissions); ++$i) {\n $permissions_ids[] = $i + 1;\n }\n // Roles\n $role_admin = Role::firstOrCreate(['name' => 'Quản trị viên', 'slug' => 'admin']);\n $role_admin->permissions()->sync($permissions_ids);\n $role_customer = Role::firstOrCreate(['name' => 'customer', 'slug' => 'customer']);\n // Users\n $user = User::firstOrCreate(\n ['email' => 'admin@hifymart.com'],\n [\n 'name' => 'Admin',\n 'password' => Hash::make('12345678'),\n 'email_verified_at' => now()\n ]\n );\n $user->roles()->sync([$role_admin->id]);\n\n $user = User::firstOrCreate(\n ['email' => 'user@hifymart.com'],\n [\n 'name' => 'Customer',\n 'password' => Hash::make('12345678'),\n 'email_verified_at' => now()\n ]\n );\n $user->roles()->sync([$role_customer->id]);\n // Thuế\n Tax::firstOrCreate(['name' => 'None', 'value' => '0']);\n Tax::firstOrCreate(['name' => 'VAT', 'value' => '10']);\n /**\n * Cài đặt\n */\n // Cài đặt chung\n $settings = [\n ['name' => 'logo', 'value' => null],\n ['name' => 'favicon', 'value' => null],\n ['name' => 'app-name', 'value' => 'HifyMart'],\n ['name' => 'working-time', 'value' => '9h đến 20h, chủ nhật 10h đến 19h'],\n ['name' => 'contact-mail', 'value' => null],\n ['name' => 'contact-phone', 'value' => null],\n ['name' => 'contact-mobile', 'value' => null],\n ['name' => 'contact-address', 'value' => null],\n ['name' => 'facebook', 'value' => null],\n ['name' => 'twitter', 'value' => null],\n ['name' => 'instagram', 'value' => null],\n ['name' => 'youtube', 'value' => null],\n ['name' => 'bank-info', 'value' => '<p>Lưu ý: Quý khách vui lòng đợi nhân viên liên hệ xác nhận đơn hàng trước khi thực hiện thanh toán.</p><p>Công Ty TNHH HifyMart:</p><p>BIDV</p><p>Số tài khoản : 36210000123456</p><p>Ngân hàng TMCP Đầu tư và Phát triển Việt Nam – Hà Nội</p>'],\n ['name' => 'delivery', 'value' => '<p>Phí vận chuyển: 19.000đ</p><p>Miễn phí với đơn hàng từ 200.000đ trở lên</p><p>Chỉ hỗ trợ vận chuyển đối với đơn hàng từ 100.000đ. Với đơn hàng có giá trị thấp hơn, quý khách vui lòng mua tại showroom</p>'],\n ['name' => 'slides', 'value' => null]\n ];\n Setting::insert($settings);\n }", "title": "" }, { "docid": "5ba531a7c47d81c7d80d79e56d288372", "score": "0.6040172", "text": "public function manage(){\n\t\t\n\t\tif($this->input->post('vertify') === 'pass') //if webmaster access from admin/index\n\t\t\t$this->input->set_cookie('user','webmaster','1200'); //set cookie for webmaster user\n\t\t\t\n\t\telse if($this->input->cookie('user') !== 'webmaster') //else if user is not webmaster\n\t\t\theader(\"location:\".base_url()); //back to hompage\n\t\t\n\t\t\n\t\t$data['title'] = \"KMITL-BBS : Webmaster Manager\";\n\t\t\n\t\t//init all event list\n\t\t$this->load->model('eventlist');\n\t\t$this->eventlist->initList(true);\n\t\t$event['eventlist'] = $this->eventlist->sortList('id','ASC');\n\t\t//init all user list\n\t\t$this->load->model('adminservice');\n\t\t$user['userlist'] = $this->adminservice->getUserList();\n\t\t\n\t\t// -------------- view : show html ----------------//\n\t\t\n\t\t$this->load->view('header',$data);\n\n\t\t$this->load->view('adminviewer1' ,$event);\n\t\t\n\t\t$this->load->view('adminviewer2' ,$user);\n\t\t\n\t}", "title": "" }, { "docid": "9fdd487dd63a83f239fb9aad36e34f6a", "score": "0.60296786", "text": "public function index()\n {\n // $id = Auth::id();\n // $user = User::find($id);;\n // dd($user->isAdmin());\n $admins = Admin::all();\n return view('backend.admin.manage_admin.index', compact('admins'));\n }", "title": "" }, { "docid": "3462e5fb76504155691044dd5e159539", "score": "0.60237986", "text": "function isAdmin()\n{\n\t//<TODO>\n}", "title": "" }, { "docid": "1ee2b30efb1c364bd25e8cdd37f2d3e6", "score": "0.6020153", "text": "public function viewAdmin(){\n\t\t\t$con = new Connection();\n $db = $con->openConnection();\n\t\t\tif(isset($this->admin_id)){\n\t\t\t\t$data = $db->query(\"SELECT * FROM admin where admin_id='$this->admin_id'\");\n\t\t\t\t\t\t\t$admin = $data->fetchAll();\n\n\t\t\t}elseif (isset($this->username)) {\n\t\t\t\t$data = $db->query(\"SELECT * FROM admin where admin_username='$this->admin_username'\");\n\t\t\t\t\t\t\t$admin = $data->fetchAll();\n\t\t\t}\n\t\t\telse{\n\n\t$data = $db->query(\"SELECT * FROM admin\");\n\t\t\t\t$admin = $data->fetchAll();\n\n\t\t\t}\nreturn $admin;\n\n\n}", "title": "" }, { "docid": "499b0e2effb57929fda8c0a54b488b0c", "score": "0.6018518", "text": "public function run()\n {\n \n $role_platform_admin = Role::where('name', 'Platform Admin')->first();\n\n $role_org_admin = Role::where('name', 'Organization Admin')->first();\n \n $super_admin = new Admin();\n $super_admin->name = 'Rahul Mehta';\n $super_admin->username = 'rahul';\n $super_admin->email = 'rahulm.nmg@yopmail.com';\n $super_admin->password = bcrypt('123456');\n $super_admin->status = '1';\n $super_admin->save();\n $super_admin->roles()->attach($role_platform_admin);\n\n $admin = new Admin();\n $admin->name = 'Sandeep Kumar';\n $admin->username = 'sandeep';\n $admin->email = 'sandeepk.nmg@yopmail.com';\n $admin->password = bcrypt('123456');\n $admin->status = '1';\n $admin->save();\n $admin->roles()->attach($role_org_admin);\n\n }", "title": "" }, { "docid": "0f6c543f600e0787ad392f38c8252d33", "score": "0.60163754", "text": "abstract protected function _admin_login();", "title": "" }, { "docid": "f4ec6a0efc22c1575befd7232d6b903a", "score": "0.6015226", "text": "public function indexadmin() {\n\t\t\t$this->set('title_for_layout','Business Meeting - Pregunta');\n\t\t\t$this ->layout='admin';\n\t\t\t$this->set('questions', $this->Question->find('all'));\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fd4f23b3ac0a3402879840dc26a9af5e", "score": "0.6008195", "text": "public function admin_index() {\n if (!$this->DCAuth->isAdmin()) {\n $this->redirect($this->referer());\n }\n }", "title": "" }, { "docid": "7f24078ad5693859e666b106783e7a19", "score": "0.5994562", "text": "public function run()\n {\n //\n $role_admin = [\n \"slug\" => \"admin\",\n \"name\" => \"Admin\",\n \"permissions\" => [\n \"admin\" => true\n ]\n ];\n\n Sentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\n $adminrole = Sentinel::findRoleByName('Admin');\n $user_admin = [\"name\"=>\"Administrator\", \"phone\"=>\"01234567890\",\"address\"=>\"Admin Street\", \"email\"=>\"admin@gmail.com\", \"password\"=>'admin123'];\n $adminuser = Sentinel::registerAndActivate($user_admin);\n $adminuser->roles()->attach($adminrole);\n\n $role_supplier = [\n \"slug\" => \"supplier\",\n \"name\" => \"Supplier\",\n \"permissions\" => [\n \"admin.supplier\" => true\n ]\n ];\n Sentinel::getRoleRepository()->createModel()->fill($role_supplier)->save();\n $supplierrole = Sentinel::findRoleByName('Supplier');\n $user_supplier = [\"name\"=>\"Supplier\", \"phone\"=>\"01234567890\",\"address\"=>\"Supplier Address\", \"email\"=>\"supplier@gmail.com\", \"password\"=>'supplier123'];\n $supplieruser = Sentinel::registerAndActivate($user_supplier);\n $supplieruser->roles()->attach($supplierrole);\n\n $role_buyer = [\n \"slug\" => \"buyer\",\n \"name\" => \"Buyer\",\n \"permissions\" => [\n \"admin.belanja\" => true\n ]\n ];\n Sentinel::getRoleRepository()->createModel()->fill($role_buyer)->save();\n $buyerrole = Sentinel::findRoleByName('Buyer');\n $user_buyer = [\"name\"=>\"Buyer\", \"phone\"=>\"01234567890\",\"address\"=>\"Buyer Address\", \"email\"=>\"buyer@gmail.com\", \"password\"=>'buyer123'];\n $buyeruser = Sentinel::registerAndActivate($user_buyer);\n $buyeruser->roles()->attach($buyerrole);\n }", "title": "" }, { "docid": "7c0aae54ece2d3dbcc100f422428f287", "score": "0.5989522", "text": "public function index($conexion){\n // $data[\"admin\"] = $admin->getPrincipalView();\n require_once \"views/admin/admin.view.php\";\n }", "title": "" }, { "docid": "730220355455e7ec6ec8667e96825d51", "score": "0.5989073", "text": "function shortApp() {\n\t\t$this->loadAllModel(array('User','ShortApplication'));\n\t\t$this->layout = 'short_app';\n\t\tif(isset($this->request->data) && (!empty($this->request->data))){\n\t\t\t$this->ShortApplication->set($this->request->data['ShortApplication']);\n\t\t\tif($this->ShortApplication->validates()){\n\t\t\t\tunset($this->request->data['ShortApplication']['broker_name']);\n\t\t\t\t$this->Session->write('shortApp',$this->request->data['ShortApplication']);\n\t\t\t\t$this->redirect(array('controller'=>'homes','action' => 'shortAppStep2/'.base64_encode('step2')));\n\t\t\t}\n\t\t}\n\t\t$brokers = $this->User->find('list',array('conditions'=>array('User.user_type'=>2,'User.status'=>1,'User.is_deleted' =>0),'fields' => array('id','name'),'order'=>'name ASC'));\n\t\t$brokers['none'] = 'Your Mortgage Broker';\n\t\t$this->set('brokers',$brokers);\t\n\t}", "title": "" }, { "docid": "15b2e4051263a99c1de2a091e2a2470e", "score": "0.5984873", "text": "function sfa_adminadminspage()\r\n{\r\n sfa_render_admins_index();\r\n\r\n return;\r\n}", "title": "" }, { "docid": "458a458abab37cd6a5cd035b6d40412c", "score": "0.59821045", "text": "public function adminDefault() {\n\t\t$this->adminList();\n\t}", "title": "" }, { "docid": "2c748416e9f66a8e9ef81fe46643e6ca", "score": "0.59749377", "text": "function admin_init() {}", "title": "" }, { "docid": "659de9f6d9db67233acd255b27c810d8", "score": "0.5973237", "text": "function debet_adm()\n\t{\n\t\t$data['title'] = 'Debet Administrasi';\n\t\t$data['container'] = 'sys/debet_adm';\n\t\t$this->load->view('core',$data);\n\t}", "title": "" }, { "docid": "9e1b0c0a6c0de5a3a848c7753117d2e9", "score": "0.5967677", "text": "function makeadminAction(){\n $auth = Zend_Auth::getInstance();\n if($auth->hasIdentity()){\n $identity = $auth->getIdentity(); \n $user_id = $identity->id_user;\n $type = $identity->type;\n\n $admin_user = $this->getRequest()->getParam('id');\n if($type == 1){\n $user = $this->model->makeAdminUser($admin_user);\n $this->redirect('users/index');\n }\n else{\n $this->_redirect('cateogry/index');\n }\n }\n else{\n $this->_redirect('users/login');\n } \n }", "title": "" }, { "docid": "bd86e72d2b6fa3ce2b5fbf2dc5f1f26c", "score": "0.5957892", "text": "private function del_admins(object $pp1)\n {\n $tbl = $pp1->uriq->t = 'admins' ; \n $other=['caller'=>__FILE__.' '.', ln '.__LINE__, ', d e l in tbl '.$tbl] ;\n\n Tbl_crud_admin::dd($pp1, $other); //used for all t a b l e s !! \n Config_allsites::Redirect_to($pp1->admins) ;\n\n }", "title": "" }, { "docid": "3bfbec4c826418da9d14a8422402198f", "score": "0.59534746", "text": "public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'admin/question_list', 'refresh');\n \n \n }", "title": "" }, { "docid": "6aa1ae3793683ddfe04aeee7f772766a", "score": "0.5949223", "text": "public function index()\n {\n// echo date('H:i:s', time());\n// $is_login = Auth::check();\n// var_dump($is_login);\n// if (!$is_login){\n// return redirect()->guest('auth/login');\n// } else {\n// echo \"登陆状态\";\n// }\n $this->_adminUserSvc = new AdminUserSvc();\n $this->_adminRoleSvc = new AdminRoleSvc();\n $this->_adminModuleSvc = new AdminModuleSvc();\n\n $user = Auth::user();\n $current = $this->_adminUserSvc->getRow(array(array('id', '=', $user->id)));\n $currentRolePermission = array();\n if($current)$currentRolePermission = $this->_adminUserSvc->ownPermission($current);\n $currentOwnRole = array();\n if($current)$currentOwnRole = $this->_adminUserSvc->ownRole($current);\n\n $allStaticModule = $this->_adminModuleSvc->allStaticActionGroup();\n\n //共享数据\n view()->share('currentRolePermission',$currentRolePermission);\n view()->share('allStaticModule',$allStaticModule);\n view()->share('currentOwnRole',$currentOwnRole);\n view()->share('user',$user);\n return view('index');\n }", "title": "" }, { "docid": "52578a11a977407fe06e11c2f0117602", "score": "0.5947817", "text": "public function run()\n {\n $url = \"http://mariacanoied.herokuapp.com/home\";\n $home = \"http://mariacanoied.herokuapp.com/pages/\";\n\n /**\n * Permisos de control de usuarios\n * Rol = Coordinador\n * \n * Permiso padre = Usuario\n */\n\n $perUsu = new Permiso();\n $perUsu->nombre = 'Usuarios';\n $perUsu->name = 'Users';\n $perUsu->icon = 'people-circle';\n $perUsu->estado = 'Activo';\n $perUsu->save();\n\n /* Permisos hijo */\n $perHUR = new Permiso();\n $perHUR->nombre = \"Usuarios registrados\";\n $perHUR->name = \"Registered Users\";\n $perHUR->url = \"http://mariacanoied.herokuapp.com/pages/usuarios/index\";\n $perHUR->permiso_padre = $perUsu->id;\n $perHUR->estado = 'Activo';\n $perHUR->save();\n\n $perRol = new Permiso();\n $perRol->nombre = \"Roles\";\n $perRol->name = \"Roles\";\n $perRol->url = $url;\n $perRol->permiso_padre = $perUsu->id;\n $perRol->estado = 'Activo';\n $perRol->save();\n\n /**\n * Permisos de control de Servicio social\n * Rol = Coordinador - Estudiante\n * \n * Permiso padre = Servicio social\n */\n\n $perServ = new Permiso();\n $perServ->nombre = 'Servicio social';\n $perServ->name = 'Social service';\n $perServ->icon = 'walk';\n $perServ->estado = 'Activo';\n $perServ->save();\n\n /* Permisos hijo */\n $perZS = new Permiso();\n $perZS->nombre = \"Zonas de servicio\";\n $perZS->name = \"Service areas\";\n $perZS->url = $home.'zonas/index';\n $perZS->permiso_padre = $perServ->id;\n $perZS->estado = 'Activo';\n $perZS->save();\n\n $perBS = new Permiso();\n $perBS->nombre = \"Bitácoras de servicio\";\n $perBS->name = \"Service logs\";\n $perBS->url = $home.'bitacora/index';\n $perBS->permiso_padre = $perServ->id;\n $perBS->estado = 'Activo';\n $perBS->save();\n\n /**\n * Permisos de control de PQRS\n * Rol = Coordinador - Acudiente\n * \n * Permiso padre = PQRS\n */\n\n $perPqrs = new Permiso();\n $perPqrs->nombre = 'PQRS';\n $perPqrs->name = 'Consultations';\n $perPqrs->icon = 'help';\n $perPqrs->estado = 'Activo';\n $perPqrs->save();\n\n /* Permisos hijo */\n $perLP = new Permiso();\n $perLP->nombre = \"Lista de PQRS\";\n $perLP->name = \"List of queries\";\n $perLP->url = $home.'pqrs/index';\n $perLP->permiso_padre = $perPqrs->id;\n $perLP->estado = 'Activo';\n $perLP->save();\n\n $perMP = new Permiso();\n $perMP->nombre = \"Mis PQRS\";\n $perMP->name = \"My questions\";\n $perMP->url = $home.'pqrs/create';\n $perMP->permiso_padre = $perPqrs->id;\n $perMP->estado = 'Activo';\n $perMP->save();\n\n /**\n * Permisos de control de Citas\n * Rol = Coordinador - Acudiente\n * \n * Permiso padre = Citas\n */\n\n $perCit = new Permiso();\n $perCit->nombre = 'Citas';\n $perCit->name = 'Appointment';\n $perCit->icon = 'calendar-outline';\n $perCit->estado = 'Activo';\n $perCit->save();\n\n /* Permisos hijo */\n $perRC = new Permiso();\n $perRC->nombre = \"Atención por area\";\n $perRC->name = \"Attention by area\";\n $perRC->url = $home.'atencion_areas/index';\n $perRC->permiso_padre = $perCit->id;\n $perRC->estado = 'Activo';\n $perRC->save();\n\n $perRC = new Permiso();\n $perRC->nombre = \"Atención por curso\";\n $perRC->name = \"Attention by course\";\n $perRC->url = $home.'atencion_curso/index';\n $perRC->permiso_padre = $perCit->id;\n $perRC->estado = 'Activo';\n $perRC->save();\n \n $perCC = new Permiso();\n $perCC->nombre = \"Consultar citas\";\n $perCC->name = \"Consult appointments\";\n $perCC->url = $home.'citas/index';\n $perCC->permiso_padre = $perCit->id;\n $perCC->estado = 'Activo';\n $perCC->save();\n\n /**\n * Permisos de control de Administración academica\n * Rol = Coordinador\n * \n * Permiso padre = Administración academica\n */\n\n $perAA = new Permiso();\n $perAA->nombre = 'Administración académica';\n $perAA->name = 'Academic administration';\n $perAA->icon = 'school';\n $perAA->estado = 'Activo';\n $perAA->save();\n\n /* Permisos hijo */\n $perIG = new Permiso();\n $perIG->nombre = \"Información general\";\n $perIG->name = \"General information\";\n $perIG->url = $home.'administracion_academica/index';\n $perIG->permiso_padre = $perAA->id;\n $perIG->estado = 'Activo';\n $perIG->save();\n\n $perCur = new Permiso();\n $perCur->nombre = \"Docentes\";\n $perCur->name = \"Teachers\";\n $perCur->url = $url;\n $perCur->permiso_padre = $perAA->id;\n $perCur->estado = 'Activo';\n $perCur->save();\n \n $perHorC = new Permiso();\n $perHorC->nombre = \"Administrar horarios\";\n $perHorC->name = \"Manage schedules\";\n $perHorC->url = $url;\n $perHorC->permiso_padre = $perAA->id;\n $perHorC->estado = 'Activo';\n $perHorC->save();\n \n /**\n * Permisos de control de Noticias\n * Rol = Coordinador\n * \n * Permiso padre = Noticias\n */\n\n $perNot = new Permiso();\n $perNot->nombre = 'Noticias';\n $perNot->name = 'News';\n $perNot->icon = 'newspaper';\n $perNot->estado = 'Activo';\n $perNot->save();\n\n /* Permisos hijo */ \n $perCN = new Permiso();\n $perCN->nombre = \"Lista de noticias\";\n $perCN->name = \"News list\";\n $perCN->url = 'http://mariacanoied.herokuapp.com/pages/news/index';\n $perCN->permiso_padre = $perNot->id;\n $perCN->estado = 'Activo';\n $perCN->save();\n \n /**\n * Permisos de control de Portafolio\n * Rol = Docente\n * \n * Permiso padre = Portafolio\n */\n\n $perPor = new Permiso();\n $perPor->nombre = 'Portafolio';\n $perPor->name = 'Briefcase';\n $perPor->icon = 'briefcase';\n $perPor->estado = 'Activo';\n $perPor->save();\n \n /* Permisos hijo */\n $perAct = new Permiso();\n $perAct->nombre = \"Actividades\";\n $perAct->name = \"Activities\";\n $perAct->url = $home.'actividades/index';\n $perAct->permiso_padre = $perPor->id;\n $perAct->estado = 'Activo';\n $perAct->save();\n \n /**\n * Permisos de control de Agenda\n * Rol = Docente - Acudiente - Estudiante\n * \n * Permiso padre = Agenda\n */\n\n $perAge = new Permiso();\n $perAge->nombre = 'Agenda';\n $perAge->name = 'Schedule';\n $perAge->icon = 'book';\n $perAge->estado = 'Activo';\n $perAge->save();\n\n /* Permisos hijo */\n $perRO = new Permiso();\n $perRO->nombre = \"Registrar observación\";\n $perRO->name = \"Record observation\";\n $perRO->url = $home.'agendaWeb/create';\n $perRO->permiso_padre = $perAge->id;\n $perRO->estado = 'Activo';\n $perRO->save();\n \n $perCO = new Permiso();\n $perCO->nombre = \"Consultar observaciones\";\n $perCO->name = \"Consult observations\";\n $perCO->url = $home.'agendaWeb/index';\n $perCO->permiso_padre = $perAge->id;\n $perCO->estado = 'Activo';\n $perCO->save();\n \n /**\n * Permisos de control de Planillas\n * Rol = Docente\n * \n * Permiso padre = Planillas\n */\n\n $perPla = new Permiso();\n $perPla->nombre = 'Registros académicos';\n $perPla->name = 'Academic Records';\n $perPla->icon = 'clipboard';\n $perPla->estado = 'Activo';\n $perPla->save();\n /* Permisos hijo */\n $perCal = new Permiso();\n $perCal->nombre = \"Calificaciones\";\n $perCal->name = \"Ratings\";\n $perCal->url = $home.'notas/index';\n $perCal->permiso_padre = $perPla->id;\n $perCal->estado = 'Activo';\n $perCal->save();\n \n $perAsis = new Permiso();\n $perAsis->nombre = \"Asistencia\";\n $perAsis->name = \"Assistance\";\n $perAsis->url = $home.'asistencias/index';\n $perAsis->permiso_padre = $perPla->id;\n $perAsis->estado = 'Activo';\n $perAsis->save();\n }", "title": "" }, { "docid": "6bf9efa3d88ab78337823ebea2973a5e", "score": "0.59400624", "text": "public function index(){\n\t\tif($this->mdl_admin->logged_id()){\n\t\t\t$this->load->view(\"homee\");\n\t\t}else{redirect(\"login\");}\n\t}", "title": "" }, { "docid": "38fea318082954b95c69d13beddf8a85", "score": "0.59365106", "text": "public function admin()\n {\n $total_projects =Rent::where('status',0)->count();\n\n $total_users = User::count();\n\n $total_houses = House::count();\n\n $total_rent_houses=House::where('status',1)->count();\n\n $total_ava_houses=House::where('status',0)->count();\n\n $total_township=Township::count();\n\n if (Auth::user()->hasRole('admin')) {\n return view('backend.index')->with(['total'=>$total_projects])->with('totalusers', $total_users)->with(['totalhouse'=>$total_houses])->with('total_rent_houses', $total_rent_houses)->with('total_ava_houses', $total_ava_houses)->with('total_township', $total_township);\n } else {\n return redirect()->route('home');\n }\n }", "title": "" }, { "docid": "fd9dc8864c3dfcfffdbb04f69256d015", "score": "0.5929975", "text": "static function getAdminName() {\n\t\treturn MonitisConf::$adminName; \n\t}", "title": "" }, { "docid": "3c3984e27088de8dba7ff5664aeba7c8", "score": "0.59235615", "text": "public function run()\n {\n //\n $superadminRole = new Role();\n $superadminRole->name = \"superadmin\";\n $superadminRole->display_name=\"Super Admin\";\n $superadminRole->save();\n\n $adminRole = new Role();\n $adminRole->name = \"admin\";\n $adminRole->display_name=\"Admin\";\n $adminRole->save();\n\n $superadmin = new User();\n $superadmin->name = 'Super Admin Rangkas';\n $superadmin->email ='superadmin@gmail.com';\n $superadmin->password = bcrypt('rahasia');\n $superadmin->is_verified=1;\n $superadmin->save();\n $superadmin->attachRole($superadminRole);\n\n $admin = new User();\n $admin->name = \"Admin Rangkas\";\n $admin->email ='admin@gmail.com';\n $admin->password = bcrypt('rahasia');\n $admin->is_verified=1;\n $admin->save();\n $admin->attachRole($adminRole);\n }", "title": "" }, { "docid": "38e3809223a59bfcd752c0a8746e3c60", "score": "0.59220755", "text": "function admin_index() { \r\n \t$this->set('ruta_admin',$this->ruta_admin);\r\n \t$this->set('users',$this->paginate(\"User\"));\r\n }", "title": "" }, { "docid": "feead3369bef27d3ff43722e3ea92a2a", "score": "0.5921773", "text": "public function viewAdminIndex()\n {\n $admins = $this->admin::paginate(12);\n if (currentAdminType() == 'manager')\n return view('manager.index' , ['admins' => $admins]);\n \n return view('admin.index' , ['admins' => $admins]);\n }", "title": "" }, { "docid": "477662996f00e15a4dd7da3064a7ad12", "score": "0.59179974", "text": "public function run()\n {\n\n $backend = Menu::create([\n 'name' => '控制台',\n 'parent_id' => '0',\n 'slug' => 'system.login',\n 'url' => 'admin',\n 'heightlight_url' => 'admin',\n ]);\n\n $system = Menu::create([\n 'name' => '系统管理',\n 'parent_id' => '0',\n 'slug' => 'system.manage',\n 'url' => 'admin/menu',\n 'heightlight_url' => 'admin/menu*,admin/user*,admin/role*,admin/permission*',\n ]);\n\n Menu::create([\n 'name' => '菜单管理',\n 'parent_id' => $system->id,\n 'slug' => 'menu.list',\n 'url' => 'admin/menu',\n 'heightlight_url' => 'admin/menu*',\n ]);\n\n Menu::create([\n 'name' => '用户管理',\n 'parent_id' => $system->id,\n 'slug' => 'user.list',\n 'url' => 'admin/user',\n 'heightlight_url' => 'admin/user*',\n ]);\n\n Menu::create([\n 'name' => '权限管理',\n 'parent_id' => $system->id,\n 'slug' => 'permission.list',\n 'url' => 'admin/permission',\n 'heightlight_url' => 'admin/permission*',\n ]);\n\n Menu::create([\n 'name' => '角色管理',\n 'parent_id' => $system->id,\n 'slug' => 'role.list',\n 'url' => 'admin/role',\n 'heightlight_url' => 'admin/role*',\n ]);\n\n\n }", "title": "" }, { "docid": "c8aaf3d56e5ac0088d5a0c2e6a147498", "score": "0.59160626", "text": "public function run()\n {\n Admin::create(['name'=>'Admin','email'=>'admin@gmail.com','password'=>bcrypt('password')]);\n Admin::create(['name'=>'Manager','email'=>'manager@gmail.com','password'=>bcrypt('password')]);\n }", "title": "" }, { "docid": "c0a5e7f03358408b5d7e9259bec48ba1", "score": "0.59122515", "text": "public function run()\n {\n $admin = new User();\n $admin->name = \"admin\";\n $admin->email = \"admin@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->role =User::ROLE_SUPER_ADMIN ;\n $admin->save();\n\n $admin = new User();\n $admin->name = \"gv1\";\n $admin->email = \"gv1@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->class = 'CNTT';\n $admin->role =User::ROLE_ADMIN ;\n $admin->save();\n\n $admin = new User();\n $admin->name = \"gv2\";\n $admin->email = \"gv2@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->class = 'CNTT';\n $admin->role =User::ROLE_ADMIN ;\n $admin->save();\n\n $admin = new User();\n $admin->name = \"gv3\";\n $admin->email = \"gv3@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->class = 'CNTT';\n $admin->role =User::ROLE_ADMIN ;\n $admin->save();\n\n $user = new User();\n $user->name = \"viet hoang\";\n $user->birthday = \"02/3/1999\";\n $user->code = \"17020770\";\n $user->email = \"hoang@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-CD';\n $user->gender =User::GENDER_MALE ;\n $user->role =User::ROLE_USER ;\n $user->save();\n\n $user = new User();\n $user->name = \"viet tu\";\n $user->birthday = \"12/5/1999\";\n $user->code = \"1702624\";\n $user->email = \"tu@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-M';\n $user->gender =User::GENDER_MALE ;\n $user->role =User::ROLE_USER ;\n $user->save();\n\n $user = new User();\n $user->name = \"viet linh\";\n $user->birthday = \"23/9/1999\";\n $user->code = \"17025410\";\n $user->email = \"linh@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-L';\n $user->gender =User::GENDER_FEMALE ;\n $user->role =User::ROLE_USER ;\n $user->save();\n\n\n $user = new User();\n $user->name = \"khoa CNTT\";\n $user->email = \"cntt@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-L';\n $user->role = User::ROLE_ASSESSOR ;\n $user->save();\n\n\n }", "title": "" }, { "docid": "4b51b8d4cc3dff55ad6e256e2842d3a4", "score": "0.59091944", "text": "public function admin()\n\t{\n\t\t$data['pengaduan'] = $this->modelsystem->tampil_pengaduan();\n\t\tif ($num1 = $this->modelsystem->HitungData1()) {\n\t\t\t$data['hasil1'] = $num1;\n\t\t}\n\t\tif ($num2 = $this->modelsystem->HitungData2()) {\n\t\t\t$data['hasil2'] = $num2;\n\t\t}\n\t\tif ($num3 = $this->modelsystem->HitungData3()) {\n\t\t\t$data['hasil3'] = $num3;\n\t\t}\n\t\t$this->load->view('admin/admin-home', $data);\n\t}", "title": "" }, { "docid": "9f7702ff49f2ba2e9281fffb586333cf", "score": "0.59073824", "text": "public function run()\n {\n $index = new Menu;\n $index->name = \"控制台\";\n $index->pid = 0;\n $index->language = \"zh\";\n $index->icon = \"fa fa-dashboard\";\n $index->slug = \"admin.systems.index\";\n $index->url = \"admin\";\n $index->description = \"后台首页\";\n $index->save();\n\n $system = new Menu;\n $system->name = \"系统管理\";\n $system->pid = 0;\n $system->language = \"zh\";\n $system->icon = \"fa fa-cog\";\n $system->slug = \"admin.systems.manage\";\n $system->url = \"admin/role*,admin/permission*,admin/user*,admin/menu*,admin/log-viewer*\";\n $system->description = \"系统功能管理\";\n $system->save();\n\n $user = new Menu;\n $user->name = \"用户管理\";\n $user->pid = $system->id;\n $user->language = \"zh\";\n $user->icon = \"fa fa-users\";\n $user->slug = \"admin.users.list\";\n $user->url = \"admin/user\";\n $user->description = \"显示用户管理\";\n $user->save();\n\n\n $role = new Menu;\n $role->name = \"角色管理\";\n $role->pid = $system->id;\n $role->language = \"zh\";\n $role->icon = \"fa fa-male\";\n $role->slug = \"admin.roles.list\";\n $role->url = \"admin/role\";\n $role->description = \"显示角色管理\";\n $role->save();\n\n\n $permission = new Menu;\n $permission->name = \"权限管理\";\n $permission->pid = $system->id;\n $permission->language = \"zh\";\n $permission->icon = \"fa fa-paper-plane\";\n $permission->slug = \"admin.permissions.list\";\n $permission->url = \"admin/permission\";\n $permission->description = \"显示权限管理\";\n $permission->save();\n\n $log = new Menu;\n $log->name = \"系统日志\";\n $log->pid = $system->id;\n $log->language = \"zh\";\n $log->icon = \"fa fa-file-text-o\";\n $log->slug = \"admin.logs.all\";\n $log->url = \"admin/log-viewer\";\n $log->description = \"显示系统日志\";\n $log->save();\n\n $menu = new Menu;\n $menu->name = \"菜单管理\";\n $menu->pid = $system->id;\n $menu->language = \"zh\";\n $menu->icon = \"fa fa-navicon\";\n $menu->slug = \"admin.menus.list\";\n $menu->url = \"admin/menu\";\n $menu->description = \"显示菜单管理\";\n $menu->save();\n\n $menu = new Menu;\n $menu->name = \"操作日志\";\n $menu->pid = $system->id;\n $menu->language = \"zh\";\n $menu->icon = \"fa fa-heart\";\n $menu->slug = \"admin.actionlog.list\";\n $menu->url = \"admin/actionlog\";\n $menu->description = \"操作日志\";\n $menu->save();\n\n $image = new Menu;\n $image->name = \"图片管理\";\n $image->pid = 0;\n $image->language = \"zh\";\n $image->icon = \"fa fa-heart\";\n $image->slug = \"admin.image.manage\";\n $image->url = \"admin/image/show*,admin/image/select*,admin/image/image_list*\";\n $image->description = \"图片管理\";\n $image->save();\n\n $imageUpload = new Menu;\n $imageUpload->name = \"图片上传\";\n $imageUpload->pid = $image->id;\n $imageUpload->language = \"zh\";\n $imageUpload->icon = \"fa fa-cloud-upload\";\n $imageUpload->slug = \"admin.image.upload\";\n $imageUpload->url = \"admin/image/show\";\n $imageUpload->description = \"图片上传\";\n $imageUpload->save();\n\n $imageSelect = new Menu;\n $imageSelect->name = \"图片选择器\";\n $imageSelect->pid = $image->id;\n $imageSelect->language = \"zh\";\n $imageSelect->icon = \"fa fa-photo\";\n $imageSelect->slug = \"admin.image.select\";\n $imageSelect->url = \"admin/image/select\";\n $imageSelect->description = \"图片选择器\";\n $imageSelect->save();\n\n $imageList = new Menu;\n $imageList->name = \"图片列表\";\n $imageList->pid = $image->id;\n $imageList->language = \"zh\";\n $imageList->icon = \"fa fa-photo\";\n $imageList->slug = \"admin.image.imagelist\";\n $imageList->url = \"admin/image/image_list\";\n $imageList->description = \"图片列表\";\n $imageList->save();\n\n $website = new Menu;\n $website->name = \"网站设置\";\n $website->pid = 0;\n $website->language = \"zh\";\n $website->icon = \"fa fa-globe\";\n $website->slug = \"admin.setting.manage\";\n $website->url = \"admin/setting/switch*,admin/setting/email*\";\n $website->description = \"网站设置相关\";\n $website->save();\n\n\n $websiteSwitch = new Menu;\n $websiteSwitch->name = \"功能开关\";\n $websiteSwitch->pid = $website->id;\n $websiteSwitch->language = \"zh\";\n $websiteSwitch->icon = \"fa fa-power-off\";\n $websiteSwitch->slug = \"admin.setting.switch\";\n $websiteSwitch->url = \"admin/setting/switch\";\n $websiteSwitch->description = \"网站功能开关\";\n $websiteSwitch->save();\n\n $websiteSwitch = new Menu;\n $websiteSwitch->name = \"邮件模板\";\n $websiteSwitch->pid = $website->id;\n $websiteSwitch->language = \"zh\";\n $websiteSwitch->icon = \"fa fa-envelope-o\";\n $websiteSwitch->slug = \"admin.setting.email\";\n $websiteSwitch->url = \"admin/setting/email\";\n $websiteSwitch->description = \"邮件模板\";\n $websiteSwitch->save();\n\n $article = new Menu;\n $article->name = \"文章管理\";\n $article->pid = 0;\n $article->language = \"zh\";\n $article->icon = \"fa fa-heart\";\n $article->slug = \"admin.article.manage\";\n $article->url = \"admin/article*,admin/ae_category*\";\n $article->description = \"文章管理\";\n $article->save();\n\n $articleList = new Menu;\n $articleList->name = \"文章列表\";\n $articleList->pid = $article->id;\n $articleList->language = \"zh\";\n $articleList->icon = \"fa fa-heart\";\n $articleList->slug = \"admin.article.list\";\n $articleList->url = \"admin/article\";\n $articleList->description = \"文章列表\";\n $articleList->save();\n\n $articleCategory = new Menu;\n $articleCategory->name = \"分类列表\";\n $articleCategory->pid = $article->id;\n $articleCategory->language = \"zh\";\n $articleCategory->icon = \"fa fa-heart\";\n $articleCategory->slug = \"admin.article.categorylist\";\n $articleCategory->url = \"admin/ae_category\";\n $articleCategory->description = \"分类列表\";\n $articleCategory->save();\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "13c355ced10d35d20b7b0d19272a3f29", "score": "0.5905425", "text": "public function index()\n {\n if(Gate::denies('manage-users')){\n return view('/student/stdhome');\n }\n else{\n return view('admin/adminhome');\n }\n }", "title": "" }, { "docid": "c85db6154f300ad997e3a381890c9645", "score": "0.5904747", "text": "function bp_admin() {}", "title": "" }, { "docid": "a4900a0b74b617f3e5874f71cb554601", "score": "0.59009933", "text": "public function actionAdmin() {\n $widgets = array();\n\t\t$this->render('dashboard', array('widgets'=>$widgets));\n\t}", "title": "" }, { "docid": "536108c5e2472320d8b6d523714a0474", "score": "0.5888395", "text": "public function run()\n {\n $rol = Permission();\n $rol->name= 'admin';\n $rol->slug='admin';\n $rol->save();\n }", "title": "" }, { "docid": "f894e8637dee60e9917c0d514f57ec8a", "score": "0.5887737", "text": "public function admin()\n {\n $data = array(\n 'page_title' => 'Users',\n 'page_active' => 'user'\n );\n\n\n $this->view->load_admin('users/admin/admin_view', $data);\n\n }", "title": "" }, { "docid": "c1c5d4c0888821ce986f5a9c73270d7d", "score": "0.5887728", "text": "public function run()\n {\n \t$password = bcrypt('password');\n \t$time = date('Y-m-d H:i:s',time());\n\n $datas = [\n \t[\n \t\t'phone' => '15108479103',\n 'name' => '超级管理员',\n \t\t'password'=>$password,\n \t\t'created_at' => $time,\n \t\t'updated_at' => $time\n \t],\n [\n 'phone' => '15108479104',\n 'name' => '管理员',\n 'password'=>$password,\n 'created_at' => $time,\n 'updated_at' => $time\n ],\n [\n 'phone' => '15108479112',\n 'name' => '推广1',\n 'password'=>$password,\n 'created_at' => $time,\n 'updated_at' => $time\n ],\n [\n 'phone' => '15108479111',\n 'name' => '推广2',\n 'password'=>$password,\n 'created_at' => $time,\n 'updated_at' => $time\n ],\n ];\n\n Admin::insert($datas);\n\n\n // 单独处理第一个用户的数据\n $admin = Admin::find(1);\n // 初始化用户角色,将 1 号用户指派为『站长』\n $admin->assignRole('超级管理员');\n\n // 将 2 号用户指派为『管理员』\n $admin = Admin::find(2);\n $admin->assignRole('管理员');\n\n // 指定为推广 \n $admin = Admin::find(3);\n $admin->assignRole('推广员');\n\n $admin = Admin::find(4);\n $admin->assignRole('推广员');\n }", "title": "" }, { "docid": "66b824c3f577b358928317322c340290", "score": "0.5887514", "text": "public function run() {\n\t\t$admin = new User();\n\t\t$admin->role_id = 1;\n\t\t$admin->username = 'juan_Admin';\n\t\t$admin->name = 'Juan Pérez';\n\t\t$admin->website = 'a.com';\n\t\t$admin->facebook = 'facebook/a';\n\t\t$admin->twitter = 'twitter/a';\n\t\t$admin->about = 'Soy el Admin de esta página, cualquier cosa que necesites estoy a tus ordenes.';\n\t\t$admin->email = 'admin@admin.com';\n\t\t$admin->password = bcrypt('admin123');\n\t\t$admin->save();\n\n\t\t$entrepreneur = new User();\n\t\t$entrepreneur->role_id = 2;\n\t\t$entrepreneur->username = 'pedro_emprendedor';\n\t\t$entrepreneur->name = 'Pedro Pérez';\n\t\t$entrepreneur->website = 'a.com';\n\t\t$entrepreneur->facebook = 'facebook/a';\n\t\t$entrepreneur->twitter = 'twitter/a';\n\t\t$entrepreneur->about = 'Que tal, soy Pedro un emprendedor que, como tu, busco ofertar mis servicios al publico para darme a conocer e iniciar mi negocio propio';\n\t\t$entrepreneur->email = 'emprendedor@emprendedor.com';\n\t\t$entrepreneur->password = bcrypt('emprendedor123');\n\t\t$entrepreneur->save();\n\n\t\t$user = new User();\n\t\t$user->role_id = 3;\n\t\t$user->username = 'jorge_usuario';\n\t\t$user->name = 'Jorge Pérez';\n\t\t$user->website = 'a.com';\n\t\t$user->facebook = 'facebook/a';\n\t\t$user->twitter = 'twitter/a';\n\t\t$user->about = 'Soy Jorge, estudiante de Derecho en busca de servicios de buena calidad a un costo accesible';\n\t\t$user->email = 'usuario@usuario.com';\n\t\t$user->password = bcrypt('usuario123');\n\t\t$user->save();\n\t}", "title": "" }, { "docid": "ee331657e6bf6ba35f2bcb9f1963776a", "score": "0.58863264", "text": "public function testAppAdminAccess()\n {\n \t$user = factory(User::class, 'appadmin')->make();\n \t$user->save();\n \t\n \t$this->actingAs($user);\n\n \t$this->get(URL::route('lists-index'))\n ->assertStatus(200);\n\n $this->get(URL::route('user.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('organization.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('region.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('transport.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('purpose.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('product_type.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('storage.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('institution.index'))\n ->assertStatus(200);\n\n }", "title": "" }, { "docid": "a2bf186155ef1af2b677e8777594f7bb", "score": "0.58863044", "text": "public function run()\n {\n $user = new \\App\\admin([\n 'name'=>'Paket 1',\n 'kode_pembelian'=>'1',\n 'BuktiPembayaran'=>'img/desain-grafis.jpg'\n ]);\n $user->save();\n $user = new \\App\\admin([\n 'name'=>'Paket 2',\n 'kode_pembelian'=>'2',\n 'BuktiPembayaran'=>'img/desain-grafis.jpg'\n ]);\n $user->save();\n }", "title": "" }, { "docid": "7052273a151e5b1f7c471cee138136eb", "score": "0.5886181", "text": "function displayHomeAdmin()\n\t{\n\t\t$this->isAdmin();\n\t\t$commentsRepository= new CommentsRepository();\n\t\t$commentsNb= $commentsRepository->getCommentsCount();\n\t\t$postsRepository= new PostsRepository();\n\t\t$postsNb= $postsRepository->getPostsCount();\n\t\t$storesRepository= new StoresRepository();\n\t\t$storesNb= $storesRepository->getStoresCount();\n\t\t$usersRepository= new UsersRepository();\n\t\t$usersNb= $usersRepository->getUsersCount();\n\t\tob_start();\n\t\trequire 'view/back/homeAdmin.php';\n\t\t$content=ob_get_clean();\n\t\trequire 'view/back/templateAdmin.php';\n\t}", "title": "" }, { "docid": "29242df599185fcb7d2a05d885ab559e", "score": "0.58846915", "text": "public function index()\n { \n $user = Auth::user();\n $admin = Auth::user()->get();//merr te gjithe recordet e userave nga databaza\n //nqs useri aktual qe po logohet e ka isAdmin 1 ath coje te admin.blade.php\n if($user->isAdmin==1){\n return view('admin')->with('admin',$admin);\n } \n \n else{\n return view('home',compact(['user']));\n }\n\n }", "title": "" }, { "docid": "df2a5a3eab8a7aaf1f14597cdcb62c84", "score": "0.5877286", "text": "public function run()\n { \n Admin::create([\n 'name' => 'Contatos',\n 'route' => 'contact.index',\n 'icon' => 'fa fa-envelope',\n 'parent_id' => 0,\n 'minimun_can' => 'list',\n 'order_at' => 7\n ]); \n\n }", "title": "" }, { "docid": "55b34f213a0655d420dcd122738431e0", "score": "0.58686876", "text": "public function actionAdmin()\n\t{ \n\t\t$this->render('nearest_admin');\n\t}", "title": "" }, { "docid": "9f04c97875d64326c1c485ecd112d186", "score": "0.5868589", "text": "public function index1()\n {\n if(accesoUser([1,2])){\n\n $modulo=\"mainUgel\";\n $idtipouser=Auth::user()->tipouser_id;\n $tipouser=Tipouser::find($idtipouser); \n $imagenPerfil=\"\";\n\n return view('ugel.index',compact('modulo','imagenPerfil','tipouser'));\n }\n else\n {\n return view('adminlte::home'); \n }\n }", "title": "" }, { "docid": "109accf528bf87b1a99e6fe1642e16de", "score": "0.58680075", "text": "public function run ()\n {\n $permission= new Permission;\n $permission->name = 'TAL_MODULE';\n $permission->display_name = 'HumTalent';\n $permission->description = 'Acceso completo a la modulo de recursos humanos.';\n $permission->module_id = 6;\n $permission ->save();\n\n //Inicio para crear los permisos para los crud de empleados.\n\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_EMP';\n $permission->display_name = 'Crear Empleado';\n $permission->description = 'Permiso para registrar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_EMP';\n $permission->display_name = 'Leer Empleado';\n $permission->description = 'Permiso para consultar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_EMP';\n $permission->display_name = 'Actualizar Empleado';\n $permission->description = 'Permiso para actualizar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_EMP';\n $permission->display_name = 'Borrar Empleado';\n $permission->description = 'Permiso para eliminar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n //permiso para enviar correos a los empleados.\n $permission= new Permission;\n $permission->name = 'TAL_SEND_EMAIL';\n $permission->display_name = 'Enviar Correo';\n $permission->description = 'Permiso para eliminar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para el CRUD de documentos.\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_DOC';\n $permission->display_name = 'Crear Documento';\n $permission->description = 'Permiso para registrar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_DOC';\n $permission->display_name = 'Leer Documento';\n $permission->description = 'Permiso para consultar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_DOC';\n $permission->display_name = 'Actualizar Documento';\n $permission->description = 'Permiso para actualizar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_DOC';\n $permission->display_name = 'Borrar Documento';\n $permission->description = 'Permiso para eliminar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para el CRUD de eventos.\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_EVENT';\n $permission->display_name = 'Crear Evento';\n $permission->description = 'Permiso para registrar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_EVENT';\n $permission->display_name = 'Leer Evento';\n $permission->description = 'Permiso para consultar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_EVENT';\n $permission->display_name = 'Actualizar Evento';\n $permission->description = 'Permiso para actualizar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_EVENT';\n $permission->display_name = 'Borrar Evento';\n $permission->description = 'Permiso para eliminar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para realizar inducción .\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_IND';\n $permission->display_name = 'Realizar Inducción';\n $permission->description = 'Permiso para realizar inducción';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para el CRUD de permisos o incapacidades.\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_PERM';\n $permission->display_name = 'Crear Permiso';\n $permission->description = 'Permiso para registrar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_PERM';\n $permission->display_name = 'Leer permiso';\n $permission->description = 'Permiso para consultar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_PERM';\n $permission->display_name = 'Actualizar Permiso';\n $permission->description = 'Permiso para actualizar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_PERM';\n $permission->display_name = 'Borrar Permiso';\n $permission->description = 'Permiso para eliminar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n\n //permisos para generar reportes.\n $permission= new Permission;\n $permission->name = 'TAL_GEN_REPORT';\n $permission->display_name = 'Generar reporte';\n $permission->description = 'Permiso para generar reportes';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para radicar documentos.\n $permission= new Permission;\n $permission->name = 'TAL_RAD_DOC';\n $permission->display_name = 'Radicar Documentos';\n $permission->description = 'Permiso para radicar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n\n }", "title": "" }, { "docid": "ee1da66be5e3b7a92e2b3fb997c6134f", "score": "0.586322", "text": "public function run()\n {\n $owner = new Role();\n $owner->name = 'owner';\n $owner->display_name = '网站管理员';\n $owner->description = '';\n $owner->save();\n\n $admin = new Role();\n $admin->name = 'Administrator';\n $admin->display_name = '超级管理员';\n $admin->description = '最高权限拥有者';\n $admin->save();\n\n\n $manageUsers = new Permission;\n $manageUsers->name = 'news_manage';\n $manageUsers->display_name = '新闻管理';\n $manageUsers->save();\n\n $power = new Permission;\n $power->name = 'power_manage';\n $power->display_name = '权限管理';\n $power->save();\n\n $ad = new Permission;\n $ad->name = 'ad_manage';\n $ad->display_name = '广告管理';\n $ad->save();\n\n $sys = new Permission;\n $sys->name = 'sys_manage';\n $sys->display_name = '系统设置';\n $sys->save();\n\n\n\n $user = \\App\\Http\\Model\\AdminModel::where('name', '=', 'admin1')->first();\n $user1 = \\App\\Http\\Model\\AdminModel::where('name', '=', 'admin')->first();\n //调用hasRole提供的attachRole方法\n $user->attachRole($owner); // 参数可以是Role对象,数组或id\n $user1->attachRole($admin); // 参数可以是Role对象,数组或id\n\n $admin->attachPermissions(array($manageUsers, $ad,$power,$sys));\n $owner->attachPermissions(array($manageUsers, $ad));\n // $owner->attachPermissions(array($manageUsers, $ad));\n }", "title": "" }, { "docid": "be31d241841e1f71eca8976cec2f1f44", "score": "0.58625275", "text": "public function index1()\n {\n if(accesoUser([1])){\n\n\n $idtipouser=Auth::user()->tipouser_id;\n $tipouser=Tipouser::find($idtipouser);\n\n\n $modulo=\"unidadorganica\";\n return view('unidadorganica.index',compact('tipouser','modulo'));\n }\n else\n {\n return view('adminlte::home'); \n }\n }", "title": "" }, { "docid": "a31c4bd10ad0eb45d3110fe26b19c953", "score": "0.58619136", "text": "public function indexAdmin()\n {\n $admin = Auth::user();\n\n if ($admin->id == 1)\n {\n $order = Order::all();\n return Response::json($order);\n }\n }", "title": "" }, { "docid": "f56a448ac29fb418919c49c4221e1129", "score": "0.5861265", "text": "public function actionAdmins()\r\n {\r\n \\Yii::$app->view->title = \"Gerenciador de Usuários Administrativos\";\r\n \\Yii::$app->view->params['title-page'] = 'Gerenciador de Usuários Administrativos';\r\n /*END: Define atributos da pagina*/\r\n\r\n $model = new AdmUserSearch;\r\n $dataProvider = $model->search(Yii::$app->request->queryParams);\r\n\r\n\r\n return $this->render('admins',[\r\n 'dataProvider'=>$dataProvider,\r\n 'model'=>$model,\r\n ]);\r\n }", "title": "" }, { "docid": "ea528721da809aa382d74594b2e13bd5", "score": "0.5858015", "text": "abstract public function is_admin();", "title": "" }, { "docid": "3ef5f38167f0b6e47b6cdfa3ee9efbd3", "score": "0.5853878", "text": "function site(){\r\n\t\t//just the facts maam\r\n\t\t$datas = $this->Admin->findAll();\r\n\t\t$this->set('data',$datas);\r\n\t\t$this->render('site','ajax');\r\n\t}", "title": "" }, { "docid": "1675050d6b72bbbdcd85cb7a4db2c863", "score": "0.5853784", "text": "public function auto_gen_sitecode()\n\t{\n\t\t$all_admin = $this->user_model->get_all_admindata();\n\t\tprint_r($all_admin);\n\t\t//die();\n\t}", "title": "" }, { "docid": "7733ddc076a77d558ce702077fa56691", "score": "0.58529544", "text": "public function admin_index() {\r\n if($this->Session->check('Auth.User')){\r\n\t\t if($this->Auth->user('user_type_id')==3)\t\r\n $this->redirect(array('deo' => true , 'action' => 'index'));\t\r\n\t\t} \r\n\t\t$this->layout = 'panel_layout';\r\n\t\t$this->set('title', 'Dashbord');\r\n\t\t// Call Values for the Dashboard from the session\r\n\t\t$user_id=$this->Auth->user('id'); // Login user's user id\r\n\t\t$user_type_id=$this->Auth->user('user_type_id'); // Login user's user type\r\n \r\n }", "title": "" }, { "docid": "ddcc7910e138f54b75d5f0d1d671bedf", "score": "0.58511186", "text": "public function run()\n {\n $role1 = Role::create(['name'=>'Superadmin']);\n $role2 = Role::create(['name'=>'Admin']);\n $role3 = Role::create(['name'=>'Usuario']);\n\n $permiso1= Permission::create(['name'=>'dash',\n 'description'=>'Ver panel de administracion'])->syncRoles([$role1,$role2]);\n\n $permiso2=Permission::create(['name'=>'admin.tramites.index',\n 'description'=>'Ver listado de tramites'])->syncRoles([$role1,$role2]);\n $permiso3=Permission::create(['name'=>'admin.tramites.create',\n 'description'=>'Crear tramites'])->syncRoles([$role1,$role2]);\n $permiso4=Permission::create(['name'=>'admin.tramites.edit',\n 'description'=>'Editar tramites'])->syncRoles([$role1,$role2]);\n $permiso5=Permission::create(['name'=>'admin.tramites.destroy',\n 'description'=>'Eliminar tramites'])->syncRoles([$role1,$role2]);\n\n $permiso6=Permission::create(['name'=>'admin.municipios.index',\n 'description'=>'Ver listado de municipios'])->syncRoles([$role1,$role2]);\n $permiso7=Permission::create(['name'=>'admin.municipios.create',\n 'description'=>'Registrar municipios'])->syncRoles([$role1,$role2]);\n $permiso8=Permission::create(['name'=>'admin.municipios.edit',\n 'description'=>'Editar municipios'])->syncRoles([$role1,$role2]);\n $permiso9=Permission::create(['name'=>'admin.municipios.destroy',\n 'description'=>'Eliminar municipios'])->syncRoles([$role1,$role2]);\n\n $permiso10=Permission::create(['name'=>'admin.categorias.index',\n 'description'=>'Ver categorias'])->syncRoles([$role1,$role2]);\n $permiso11=Permission::create(['name'=>'admin.categorias.create',\n 'description'=>'Crear categoria'])->syncRoles([$role1,$role2]);\n $permiso12=Permission::create(['name'=>'admin.categorias.edit',\n 'description'=>'Editar categoria'])->syncRoles([$role1,$role2]);\n $permiso13=Permission::create(['name'=>'admin.categorias.destroy',\n 'description'=>'Eliminar categoria'])->syncRoles([$role1,$role2]);\n\n $permiso14=Permission::create(['name'=>'admin.encuestas.index',\n 'description'=>'ver encuestas'])->syncRoles([$role1,$role2]);\n $permiso15=Permission::create(['name'=>'admin.encuestas.create',\n 'description'=>'Crear encuestas'])->syncRoles([$role1,$role2]);\n $permiso16=Permission::create(['name'=>'admin.encuestas.edit',\n 'description'=>'Editar encuesta'])->syncRoles([$role1,$role2]);\n $permiso17=Permission::create(['name'=>'admin.encuestas.destroy',\n 'description'=>'Eliminar encuesta'])->syncRoles([$role1,$role2]);\n\n $permiso18=Permission::create(['name'=>'admin.usuarios.index',\n 'description'=>'Ver listado de usuarios'])->assignRole($role1);\n $permiso19=Permission::create(['name'=>'admin.usuarios.create',\n 'description'=>'Crear Usuario'])->assignRole($role1);\n $permiso20=Permission::create(['name'=>'admin.usuarios.edit',\n 'description'=>'Editar usuario'])->assignRole($role1);\n $permiso21=Permission::create(['name'=>'admin.usuarios.destroy',\n 'description'=>'Eliminar usuario'])->assignRole($role1);\n\n $permiso22=Permission::create(['name'=>'admin.roles.index',\n 'description'=>'Ver listado de roles'])->assignRole($role1);\n $permiso23=Permission::create(['name'=>'admin.roles.create',\n 'description'=>'Crear rol'])->assignRole($role1);\n $permiso24=Permission::create(['name'=>'admin.role.edit',\n 'description'=>'Editar rol'])->assignRole($role1);\n $permiso25=Permission::create(['name'=>'admin.role.destroy',\n 'description'=>'Eliminar rol'])->assignRole($role1);\n \n $permiso26=Permission::create(['name'=>'admin.permisos.index',\n 'description'=>'Ver listado de permisos'])->assignRole($role1);\n $permiso27=Permission::create(['name'=>'admin.permisos.create',\n 'description'=>'Crear permiso'])->assignRole($role1);\n $permiso28=Permission::create(['name'=>'admin.permisos.edit',\n 'description'=>'Editar permisos'])->assignRole($role1);\n $permiso29=Permission::create(['name'=>'admin.permisos.destroy',\n 'description'=>'Eliminar permiso'])->assignRole($role1);\n\n $root= User::Create(['name'=>'root',\n 'email'=>'root@admin.com',\n 'password'=>bcrypt('root1234')])->assignRole($role1);\n }", "title": "" }, { "docid": "a41faed1cbe107ea5de0eb9f86e00080", "score": "0.58507264", "text": "public function actionAdminExample()\n\t{\n\t\t$this->viewData = array(\n\t\t\t'title' => 'Admin Somewhere',\n\t\t\t'some_key' => 'Example Admin Content',\n\t\t);\n\n\t\t$this->setupLayout();\n\t}", "title": "" }, { "docid": "819457597e0fcf974103a6200b46486b", "score": "0.5848751", "text": "static function setup_admin_pages() {\n\t\tMyCondo_Admin::setup(\n\t\t\tMyCondo_Config::get_setting_schema()\n\t\t);\n\t}", "title": "" }, { "docid": "7ab06581114b265cb2044c2077f09692", "score": "0.58473366", "text": "public function index1() {\n \n \n \n /************* Admin Access Check ****************/\n $adminAccess = User::adminAccessCheck();\n\n if($adminAccess==1) {\n $this->redirect('index/index');\n }\n /************* Admin Access Check End ************/\n Logger::info(\"hello world\");\n \n $this->view->setLayout(\"login\");\n PageContext::addScript(\"jquery.validate.js\");\n PageContext::addScript(\"adminlogin.js\");\n \n\n $status = NULL;\n $userData = array();\n\n if($this->isPost()) {\n\n $username \t= addslashes(($this->post('txtUsername')!='') ? $this->post('txtUsername') :$this->get('txtUsername'));\n $password \t= addslashes(($this->post('txtPassword')!='') ? $this->post('txtPassword') :$this->get('txtPassword'));\n\n $checkLogin = User::adminLoginCheck($username, $password);\n\n if($checkLogin['status']==1){\n $roleLogin = User::loggedUserRoleCheck();\n \n if(!$roleLogin){\n $checkLogin['status'] = 0;\n $checkLogin['errMsg'] = \"Your user role is no longer active!\";\n session_unset($_SESSION['adminUser']['username']);\n session_unset();\n }else{\n $checkLogin['status'] = 1;\n }\n }\n if($checkLogin['status']==1) {\n User::updateLastLogin();\n $this->redirect('index/index');\n }\n\n } // End IsPost\n\n if(isset($checkLogin['errMsg']) && !empty($checkLogin['errMsg'])) { // Error on Page\n $this->view->errMsg = $checkLogin['errMsg'];\n\n }\n }", "title": "" }, { "docid": "945da4e60623b227053a396d786388ba", "score": "0.5846351", "text": "public function adminHome()\n\t{\n\t\t$data['title'] = 'adminHome';\n\n\t\t$bulletin = $this->announcement->ordered_announcements();\n\t\t$data['bulletinList'] = $bulletin;\n\n\t\t$pending = $this->announcement->pending_ordered_announcements();\n\t\t$data['pendingList'] = $pending;\n\n\t\t$this->ifLogInAdmin();\n\t\t$this->load->view('IMMS', $data);\n\t\t$this->load->view('layouts/footer');\n\t}", "title": "" }, { "docid": "cae1610239f5a7dd489ffcca92c908da", "score": "0.58430064", "text": "public function home(){\n $info=session();\n // p($info);\n $roleid=session('admin_role_id');\n $rolename=M('role')->where('role_id='.$roleid)->field('role_name')->select();\n $win=pathinfo($_SERVER ['WINDIR']);\n mysql_connect(\"localhost\", \"root\", \"root\");\n $my= mysql_get_server_info();\n $apache=$_SERVER['SERVER_SOFTWARE'];\n $this->assign('win',$win['basename']);\n $this->assign('mysql',$my);\n $this->assign('apache',$apache);\n $this->assign('rolename',$rolename[0]);\n $this->assign('info',$info);\n $this->display();\n }", "title": "" }, { "docid": "e1cfa59c8abfe119a18f940f7d61c198", "score": "0.5833657", "text": "public function adminCreate()\n {\n //\n }", "title": "" } ]
d9bf71a72fd8d1084dcc5a80cab91cc7
Constructor to create a valid object
[ { "docid": "298e4bd7a4e83c6dd43d8bb18c10e416", "score": "0.0", "text": "public function __construct($strSystemid = \"\") {\n //base class\n parent::__construct($strSystemid);\n\n $this->objSortManager = new class_pages_sortmanager($this);\n }", "title": "" } ]
[ { "docid": "130418f7cb2e409a53c4b649aee236c7", "score": "0.7260301", "text": "function _construct(){ }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.7122245", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.7122245", "text": "final private function __construct() {}", "title": "" }, { "docid": "5fd062e12d4381e58b63d7ba8650dfe4", "score": "0.71042544", "text": "public function construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "9787340055b6ce991edd9860cd8c6394", "score": "0.70712906", "text": "public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}", "title": "" }, { "docid": "d95065509cc1d0b4a6050f28f4592eed", "score": "0.7040253", "text": "function __constructor(){}", "title": "" }, { "docid": "784710aa2c4b8df75b908eef03ed6b2c", "score": "0.7035676", "text": "function _construct() {\n \t\n\t\t\n\t}", "title": "" }, { "docid": "555bf54d00058dfd447d9f61218760b6", "score": "0.7002218", "text": "public function constructionWithObject()\n {\n $equalValidator = new stubEqualValidator(new stdClass());\n }", "title": "" }, { "docid": "62712a5e4ed975e04f15732e21e25484", "score": "0.7001275", "text": "protected abstract function __construct();", "title": "" }, { "docid": "d90a9b0c63a6578bcdcd5f3de46323bf", "score": "0.69928515", "text": "private function construct() {\n\n\t\t$this->is_json_valid = [\n\t\t\t'amp' => true,\n\t\t\t'nonamp' => true,\n\t\t];\n\n\t\t$this->init();\n\t}", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.69769865", "text": "private final function __construct() {}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.6953043", "text": "final private function __construct() { }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.6953043", "text": "final private function __construct() { }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.6953043", "text": "final private function __construct() { }", "title": "" }, { "docid": "13aa3b06317abf1417ae80e76839c19c", "score": "0.69415116", "text": "final private function __construct() {\n\t\t\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.692525", "text": "private function __construct(){}", "title": "" }, { "docid": "65a178a9c5c83671a6a41536db5192cd", "score": "0.68896264", "text": "public function construct() {\n\n }", "title": "" }, { "docid": "c8f8cdc3f0a27cf2fe91c3cd52a99f5a", "score": "0.68427515", "text": "public function _construct()\n\t{\n\n\t}", "title": "" }, { "docid": "3b75a19c3fac16ba29f5e0d01a7a8730", "score": "0.6826996", "text": "private function __construct()\t{}", "title": "" }, { "docid": "303c6463401e09821159820390808780", "score": "0.6818601", "text": "final private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "44244813de4b4bcb8842e212ad293304", "score": "0.6809917", "text": "protected final function __construct() {}", "title": "" }, { "docid": "e6521783e56af0d8f907315d16848595", "score": "0.6788748", "text": "public function test___construct() {\n\t\t}", "title": "" }, { "docid": "e6521783e56af0d8f907315d16848595", "score": "0.6788748", "text": "public function test___construct() {\n\t\t}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.67863405", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.67863405", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6786015", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.6785251", "text": "private function __construct() {}", "title": "" }, { "docid": "7f0e6609ca43aca579e163c250efc3f6", "score": "0.6768558", "text": "public function testCreateNewInstanceWithValidConstructorArgument()\r\n {\r\n $mock = $this->_createMockDataObject();\r\n $oUser = new D2LWS_User_Model($mock);\r\n $this->assertEquals($mock, $oUser->getRawData());\r\n }", "title": "" }, { "docid": "86539d2bb2ec81d8516b60b617e956db", "score": "0.67658323", "text": "final private function __construct()\n {\n }", "title": "" }, { "docid": "4035e742ed1810ce710a2d8ca00bc253", "score": "0.6732135", "text": "private function __construct()\r\n {}", "title": "" } ]
1eeee3e3e567d7a1aae4acd98e226c1c
initialize decks for a given user. The initialization is soft as it will be able to add new subquestions
[ { "docid": "5811bc00889b19110d520d290151b9a0", "score": "0.5715417", "text": "function flashcard_initialize(&$flashcard, $userid) {\n global $DB;\n\n // Get all cards (all decks).\n $select = 'flashcardid = ? AND userid = ?';\n $cards = $DB->get_records_select('flashcard_card', $select, array($flashcard->id, $userid));\n $registered = array();\n if (!empty($cards)) {\n foreach ($cards as $card) {\n $registered[] = $card->entryid;\n }\n }\n\n // Get all subquestions.\n $params = array('flashcardid' => $flashcard->id);\n if ($subquestions = $DB->get_records('flashcard_deckdata', $params, '', 'id,id')) {\n foreach ($subquestions as $subquestion) {\n if (in_array($subquestion->id, $registered)) {\n continue;\n }\n $card = new StdClass();\n $card->userid = $userid;\n $card->flashcardid = $flashcard->id;\n $card->lastaccessed = time() - ($flashcard->deck1_delay * HOURSECS);\n $card->deck = 1;\n $card->entryid = $subquestion->id;\n if (! $DB->insert_record('flashcard_card', $card)) {\n print_error('dbcouldnotinsert', 'flashcard');\n }\n }\n } else {\n return false;\n }\n\n return true;\n}", "title": "" } ]
[ { "docid": "b4b33e70d95928a99d21e041a5470b1f", "score": "0.6136086", "text": "private function init()\n {\n $this->setVariables($newcomer = false, $month = false, $em = true, $ids = false, $expense = false);\n $this->categories_for_user = $this->category_repository->findCategoriesByUser($this->user);\n }", "title": "" }, { "docid": "a29c5667b75f7af738dab78a9c587df4", "score": "0.6001422", "text": "public function init( stdClass $user_data ) {\n if ( $this->member_exists() ) {\n $this->flush_object();\n }\n \n $this->data = $user_data;\n $this->ID = intval( $user_data->member_id );\n $this->email = $user_data->email;\n $this->name = $user_data->name;\n \n if ( $carts = Cart::get_carts_by_member( $this->ID )) {\n $this->carts = $carts;\n }\n }", "title": "" }, { "docid": "723002519c63bcabb07e384db76fe644", "score": "0.5870187", "text": "public function __construct($user_id)\n {\n $this->user_id = $user_id;\n $this->loadData();\n }", "title": "" }, { "docid": "f58490aaeff0995c0bd6e2d757c22dbd", "score": "0.581248", "text": "protected function __blackJackInitDeck($userId){\n\t\t$cardDeck = array();\n\t\tfor($j=0; $j<52; $j++){\n\t\t\t$cardDeck[$j]['card'] = $j;\n\t\t\t$iRest=($j+1)%13;\n\t\t\tif($iRest>10 || $iRest === 0){\n\t\t\t\t$iRest=10;\n\t\t\t}\n\t\t\tif($iRest === 1){\n\t\t\t\t$iRest=11;\n\t\t\t}\n\t\t\t$cardDeck[$j]['value'] = $iRest;\n\t\t}\n\t\tshuffle($cardDeck);\n\t\t$this->redis->set($userId.':blackjack-deck', serialize($cardDeck));\n\t}", "title": "" }, { "docid": "d35542c9b051edf25e61bec9f7264710", "score": "0.5729253", "text": "public function __construct($user_id){\n\t\t$this->userInit($user_id);\n\t}", "title": "" }, { "docid": "7c31191396c9dd3f66c4e551604e552e", "score": "0.5697864", "text": "protected function _construct()\n {\n $this->_init('smile_user_questions', 'question_id');\n }", "title": "" }, { "docid": "2e5110d298a6877cf3e8576a19781800", "score": "0.56729543", "text": "public function initialize() : void\n {\n $this->question = new Question();\n $this->question->setDb($this->di->get(\"dbqb\"));\n $this->user = new User();\n $this->user->setDb($this->di->get(\"dbqb\"));\n $this->tag = new Tag();\n $this->tag->setDb($this->di->get(\"dbqb\"));\n $this->questionTag = new QuestionToTag();\n $this->questionTag->setDb($this->di->get(\"dbqb\"));\n $this->comment = new Comment();\n $this->comment->setDb($this->di->get(\"dbqb\"));\n $this->comThread = new CommentThread();\n $this->comThread->setDI($this->di);\n }", "title": "" }, { "docid": "f0e2df6d8693d3d1edcc4c665032ed5b", "score": "0.5632538", "text": "public function initTicketsRelatedByUserId()\n\t{\n\t\t$this->collTicketsRelatedByUserId = array();\n\t}", "title": "" }, { "docid": "d348a4b60ca96dc92267fc94051cff19", "score": "0.56106424", "text": "public function initialize()\n {\n $this->hasMany('user_id', 'QUIZUP\\Models\\QuestionCategory', 'user_id', array('alias' => 'QuestionCategory'));\n $this->hasMany('user_id', 'QUIZUP\\Models\\Quiz', 'user1_id', array('alias' => 'Quiz1'));\n $this->hasMany('user_id', 'QUIZUP\\Models\\Quiz', 'user2_id', array('alias' => 'Quiz2'));\n $this->belongsTo('cid', 'QUIZUP\\Models\\Country', 'cid', array('alias' => 'Country'));\n }", "title": "" }, { "docid": "fc04c30693b7f89a51aef4b29fa1561a", "score": "0.55501014", "text": "protected function init() {\n $this->resetAfterTest(true);\n\n /**\n * Get a new data generator\n */\n $this->datagenerator = $this->getDataGenerator();\n\n /**\n * Create a user\n */\n $this->user();\n }", "title": "" }, { "docid": "9fa0f4bcff5a3480954bc9f5ef809f72", "score": "0.54863787", "text": "public function initialize()\n {\n $this->session();\n\n $this->users = new \\Anax\\Users\\User();\n $this->users->setDI($this->di);\n }", "title": "" }, { "docid": "0f317f20565b21e5f37dff425b7fdb8a", "score": "0.53851575", "text": "public function __construct(User $user)\n {\n if($user) {\n $this->user_id = $user->id;\n\n $this->data = [\n 'balance' => $user->balance,\n 'freezed_balance' => $user->freezed_balance\n ];\n }\n }", "title": "" }, { "docid": "d8a40627f9ab38a72cff1998f5b7ace4", "score": "0.53781325", "text": "public function initialize()\r\n {\r\n $this->usersModel = new Userku();\r\n }", "title": "" }, { "docid": "a0b0d6268b6d404d5bed931add455855", "score": "0.5359545", "text": "public function __construct()\n {\n $this->deposits = new ArrayCollection();\n }", "title": "" }, { "docid": "379a917324e916aebf6a05bf54882a82", "score": "0.5359173", "text": "public function initialize()\n {\n $this->hasMany('id', 'Disque', 'idUtilisateur', array('alias' => 'Disque'));\n }", "title": "" }, { "docid": "a2586ec7e065b892203501b53f143fd2", "score": "0.535694", "text": "public function __construct()\n {\n $this->users = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "title": "" }, { "docid": "72383df6d7847506a0d6fc6598076667", "score": "0.5352948", "text": "public function initData()\n {\n Artisan::call('db:seed', [\n '--class' => UserRoleSeeder::class,\n '--force' => true\n ]);\n\n $this->superAdmin = User::create([\n 'name' => 'Super Admin',\n 'email' => 'super-admin@testing.com',\n 'password' => Hash::make('password'),\n ]);\n $this->superAdmin->assignRole('super-admin');\n\n $this->secondUser = User::create([\n 'name' => 'User 2',\n 'email' => 'user2@testing.com',\n 'password' => Hash::make('password'),\n ]);\n $this->secondUser->assignRole('writer');\n\n $this->tag = Tag::create([\n 'user_id' => $this->superAdmin->id,\n 'name' => 'tag1',\n ]);\n\n $this->category = Category::create([\n 'user_id' => $this->superAdmin->id,\n 'name' => 'cat1',\n ]);\n\n $this->article = Article::create([\n 'user_id' => $this->superAdmin->id,\n 'title' => 'PHPUnit Testing',\n 'excerpt' => 'Sample test text',\n 'body' => 'Lorem Ipsum',\n 'category_id' => $this->category->id,\n 'thumbnail_image' => 'static/images/default_thumbpng.jpg'\n ]);\n }", "title": "" }, { "docid": "577a644984edfbbf6ffae9c25fbd9da0", "score": "0.5341588", "text": "function setUserData($user)\n {\n $term = Modules::run('main/getCurrentQuarter');\n $settings = Modules::run('main/getSet');\n $position_id = \"\";\n $position = \"\";\n $is_admin = FALSE;\n $is_superAdmin = FALSE;\n $is_adviser = FALSE;\n $employee_id = '';\n $rfid = '';\n $advisory = 0;\n $section_id = \"\";\n $grade_id = \"\";\n $siblings = \"\";\n $is_parent = FALSE;\n $parent_id = \"\";\n $uType = Modules::run('users/getUserType', $user);\n $uType_id = $uType->utype;\n $parent = $uType->if_p;\n \n if($parent){\n $is_parent = TRUE; \n }\n\n if($is_parent){\n $position = 'Parent';\n $position_id = 4;\n $parent = Modules::run('users/getParentData', $user);\n if($parent->firstname!=\"\"):\n $name = $parent->firstname;\n else:\n $name = $parent->m_name;\n endif;\n $siblings = $parent->child_links;\n $parent_id = $parent->pid;\n $user_id = $uType->u_id;\n }else{\n \n if($uType_id!=4){ //if user type != to student\n $getPosition = Modules::run('users/getPositionInfo', $user);\n $position_id = $getPosition->p_id;\n $position = $getPosition->post; \n $basicInfo = Modules::run('users/getBasicInfo', $user);\n $name = $basicInfo->firstname;\n $user_id = $basicInfo->user_id;\n $employee_id = $basicInfo->employee_id;\n $rfid = $basicInfo->rfid;\n $getAdvisory = Modules::run('academic/getAdvisory', $user, $settings->school_year);\n if($getAdvisory->num_rows()>0):\n $is_adviser = TRUE;\n $advisory = $getAdvisory->row()->section_id;\n endif;\n \n }else{\n\n }\n $admin = Modules::run('hr/ifDepartmentHead', $user, $uType_id);\n if($admin){\n $is_admin = true;\n }\n \n if($position_id>=38 || $position_id <= 44):\n $is_admin = TRUE;\n endif;\n\n if($uType_id==1){\n $is_superAdmin = true;\n $is_admin = true;\n }\n if($position=='Faculty'):\n $is_admin = FALSE;\n endif;\n }\n \n if($settings->att_check==1){\n $attend_auto = TRUE;\n }else{\n $attend_auto = FALSE;\n }\n \n \n $data = array(\n 'is_logged_in' => TRUE,\n 'username' => $user,\n 'rfid' => $rfid,\n 'user_id' => $user_id,\n 'employee_id' => $employee_id,\n 'usertype' => $uType_id,\n 'position' => $position,\n 'position_id' => $position_id,\n 'is_superAdmin' => $is_superAdmin,\n 'is_admin' => $is_admin,\n 'dept_id' => $uType_id,\n 'is_adviser' => $is_adviser,\n 'advisory' => $advisory,\n 'name' => $name,\n 'siblings' => $siblings,\n 'parent_id' => $parent_id,\n 'term' => $term,\n 'attend_auto' => $attend_auto,\n 'school_year' => $settings->school_year,\n 'session_id' => session_id()\n\n );\n $this->session->set_userdata($data);\n }", "title": "" }, { "docid": "44ae23b755a990e7621560ea5cb42e63", "score": "0.5339794", "text": "function __construct($userID){\n \n $this->userID = $userID;\n $this->items = array();\n $this->subtotals = array();\n $this->totalPrice = 0;\n }", "title": "" }, { "docid": "dcdbf1de13169116c1936dd6b25991c3", "score": "0.53251827", "text": "public function initialize()\n {\n $this->session();\n\n $this->questionToAnswer = new \\Anax\\QuestionToAnswer\\Question2Answer();\n $this->questionToAnswer->setDI($this->di);\n }", "title": "" }, { "docid": "816708a5b809700ac687add5ad4d5698", "score": "0.53251314", "text": "public function initialize()\n {\n $this->setSource('UserChallenges');\n $this->belongsTo('ucChaId', '\\Paradoxis\\Models\\Challenges', 'chaId', array('alias' => 'Challenges'));\n $this->belongsTo('ucUserId', '\\Paradoxis\\Models\\Users', 'userId', array('alias' => 'Users'));\n }", "title": "" }, { "docid": "985c4e2134012b44e88701fc4c720bd6", "score": "0.5320607", "text": "public function __construct()\n {\n $faker = Faker::create();\n $collection = new Collection();\n\n // Create 10 dummy user objects\n for ($i = 0; $i < 10; $i++) {\n $user = new User([\n 'name' => $faker->name,\n 'email' => $faker->email\n ]);\n\n $collection->add($user);\n }\n\n $this->users = $collection;\n }", "title": "" }, { "docid": "95e9378f626c355146097995910ba2c0", "score": "0.53109884", "text": "public function initialize()\n {\n $this->setSource('tc_users');\n $this->hasMany('id', 'Models\\Recipe', 'id_user', ['alias' => 'recipes']);\n $this->hasOne('id', 'Models\\Recipe', 'id_user', [\n 'alias' => 'draftRecipe',\n 'params' => [\n 'state = \"draft\"'\n ]\n ]);\n }", "title": "" }, { "docid": "6d36be790ae9b495d77689ced2b3cd1b", "score": "0.53046155", "text": "public function init()\n {\n $this->user = new Hb_User();\n }", "title": "" }, { "docid": "688b5e896c8cd5f25b4ac12ad1dc278d", "score": "0.52949256", "text": "public function __construct(Devoir $devoir, User $user)\n {\n $this->devoir = $devoir;\n $this->user = $user;\n }", "title": "" }, { "docid": "3c4e66ee62ede6b34bdb81a04b715134", "score": "0.5290956", "text": "public function initialize() {\n\t\t$this->belongsTo( 'questions_id', 'Questions', 'id', array( 'alias' => 'Questions' ) );\n\t\t$this->belongsTo( 'users_id', 'Users', 'id', array( 'alias' => 'Users' ) );\n\t}", "title": "" }, { "docid": "f7030ae1bd9056e00394e55d2564ae4e", "score": "0.52621484", "text": "public function __construct($user = null) {\n // If a user identifier was passed, try and load said user\n if ($user) {\n if (is_int($user)) {\n $this->loadById($user);\n }\n \n if (is_string($user)) {\n $this->loadByUsername($user);\n }\n }\n }", "title": "" }, { "docid": "dba8511299afae68a2d2d830edf2749d", "score": "0.525044", "text": "public function initialize()\n {\n $this->belongsTo('question5', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question5'));\n $this->belongsTo('question4', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question4'));\n $this->belongsTo('user1_id', 'QUIZUP\\Models\\User', 'user_id', array('alias' => 'User1'));\n $this->belongsTo('user2_id', 'QUIZUP\\Models\\User', 'user_id', array('alias' => 'User2'));\n $this->belongsTo('cid', 'QUIZUP\\Models\\QuestionCategory', 'cid', array('alias' => 'QuestionCategory'));\n $this->belongsTo('question1', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question1'));\n $this->belongsTo('question2', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question2'));\n $this->belongsTo('question3', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question3'));\n }", "title": "" }, { "docid": "d58dae6449d57512f9322e57cb008fac", "score": "0.52418643", "text": "public function init()\n {\n $this->_user = new Disciples_User();\n $this->_userData = $this->_loadUserData();\n $this->view->userData = $this->_userData;\n $this->_currentInfo = $this->_helper->utils->getCurrentSemester();\n $this->_helper->layout->setLayout('index');\n\n $this->_session = new Zend_Session_Namespace('DISCIPLES');\n\n if ($this->_session->device->isMobile) {\n $this->_helper->redirector->gotoUrl('/mobile');\n }\n }", "title": "" }, { "docid": "a1e064a2b7b0bb4abf74745dab4d7c7a", "score": "0.5240803", "text": "public function __construct()\n {\n $this->users = new ArrayCollection;\n }", "title": "" }, { "docid": "27cef913a03e4124038b8ac484286992", "score": "0.5236871", "text": "public function __construct(User $user, CreateMenuRequest $request) {\n\t\t$this->auth = $user;\n\t\t$this->request = $request;\n\t}", "title": "" }, { "docid": "53059add85f4525cbfa94991baad774b", "score": "0.5236868", "text": "public function setUp()\n {\n $this->question = new Question(self::$di->get(\"db\"));\n $this->user = new User(self::$di->get(\"db\"));\n }", "title": "" }, { "docid": "9fbfdd77b29419e5b2f099fbf15a4efa", "score": "0.5236046", "text": "public function __construct ($user) {\n\t\t\n\t\t\tif (!is_null($user)) {\n\t\t\t\n\t\t\t\tif ($user instanceof MySQLRow) {\n\t\t\t\t\n\t\t\t\t\t$this->user=array();\n\t\t\t\t\t\n\t\t\t\t\tforeach ($user as $key=>$value) $this->user[$key]=$value->GetValue();\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t$this->user=$user;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->organization=null;\n\t\t\t$this->session_key=null;\n\t\t\n\t\t}", "title": "" }, { "docid": "f7bea708f7a60b26116715ba2271e602", "score": "0.52345055", "text": "public function __construct()\n {\n $this->users = new ArrayCollection();\n }", "title": "" }, { "docid": "c16010c07ffcb76ca43a9629524ebbfd", "score": "0.5230925", "text": "public function init() {\r\n $this -> user = User::byId(session('id'));\r\n }", "title": "" }, { "docid": "943dc64665f2014a5d28671d16b6c983", "score": "0.52287215", "text": "public function __construct()\n {\n $this->setViewsNumber(0);\n $this->viewsUsers = array();\n $this->comments = new ArrayCollection();\n $this->tags = new ArrayCollection();\n }", "title": "" }, { "docid": "e8e68babbefdff202978b184d78233ed", "score": "0.5208521", "text": "public function __construct($user = null){\n\t\t\t$this->_db = DB::getInstance();\n\n\t\t\t//get session form init class\n\t\t\t\n\t\t\t$this->_session_name_1 = Config::get('session/session_name_1');\n\t\t\t\n\t\t\t\n\n\t\t\t//for student\n\t\t\tif(!$user){\n\t\t\t\tif(Session::exists($this->_session_name_1)){\n\t\t\t\t\t$user = Session::get($this->_session_name_1);\n\n\t\t\t\t\tif($this->find($user)){\n\t\t\t\t\t\t$this->_isLoggedIn = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\t//process logout\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}else {\n\t\t\t\t$this->find($user);\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "1d71e58fdd1e3a40dc1be596e26552d4", "score": "0.5204242", "text": "private function __construct()\n {\n $this->user_id = REQUEST::readIn(\"uid\");\n $this->user_id = 199; //tmp override\n }", "title": "" }, { "docid": "d626186dcf26ae56b965935e629d7efe", "score": "0.5196709", "text": "function initUser( &$user ) {\n\t\t# I don't think I need this, do I?\n\t}", "title": "" }, { "docid": "304052bd78fb8f307e67e0c4a2fb9720", "score": "0.5196328", "text": "public function __construct($user_id)\n {\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "e780145475c9691ec8ed4b2b786d5ca3", "score": "0.5195982", "text": "public function __construct(DataUser $dataUser)\n {\n $this->dataUser = $dataUser;\n }", "title": "" }, { "docid": "4a48acad84f9d1cb077c8b3fa2771638", "score": "0.5195722", "text": "public function __construct($user){\r\n\t\t$this->user_id = $user->user_id;\r\n\t\t$this->username = $user->username;\r\n\t\t$this->email = $user->email;\r\n\t\t$this->password = $user->password;\t\r\n\t\t$this->user_identifier = $user->identifier;\r\n\t\t$this->login_token = $user->token;\r\n\t\t$this->login_timeout = $user->timeout;\t\r\n\t\t$this->load_data();\r\n\t}", "title": "" }, { "docid": "37bebd1fc088f534d674e1d0348f6406", "score": "0.51814", "text": "public function __construct($user)\n\t{\n\t\t$this->user = $user;\n\t}", "title": "" }, { "docid": "c0cbc2f634eeb0399f4de9c2936406a6", "score": "0.5175949", "text": "public function initialize()\n {\n $this->setSchema(\"gayathrib\");\n $this->setSource(\"usercard\");\n $this->belongsTo('userid', 'models\\User', 'userid', ['alias' => 'User']);\n }", "title": "" }, { "docid": "b6c85201599b4927d678d741c89365b2", "score": "0.5171724", "text": "public function __construct($user) {\n\t\t$this->user = ModelRegistry::loadModel('User', $user);\n\t}", "title": "" }, { "docid": "e8d75742caa663ad652ed9250fa64b72", "score": "0.51582336", "text": "public function initQuiz($userId) {\n\t\t// a user is about to start the quiz\n\t\t// generate a list of questions, insert into quiz_answersubmissions, with answersubmittime = NULL\n\t\tif ($this->checkQuizInitialized($userId))\n\t\t\treturn true;\n\n\t\t$this->deleteEntries($userId);\n\t\t$sectionList = getSectionList($this->quizId);\n\t\t$questionList = array();\n\t\t$sections = array();\n\t\tfor ($i = 0; $i < count($sectionList); ++$i) {\n\t\t\t$questionList[$i] = $this->getSectionQuestions($sectionList[$i]);\n\t\t\tfor ($j = 0; $j < count($questionList[$i]); ++$j)\n\t\t\t\t$sections[] = $i;\n\t\t}\n\n\t\tif ($this->quizRow['quiz_allowsectionrandomaccess'] == 0 && $this->quizRow['quiz_mixsections']) \n\t\t\tshuffle($sections);\n\n\t\t$offsets = array_fill(0, count($questionList), 0);\n\t\tfor ($i = 0; $i < count($sections); ++$i) {\n\t\t\t$insertQuery = \"INSERT INTO `quiz_answersubmissions`(`page_modulecomponentid`, `quiz_sectionid`, `quiz_questionid`, `user_id`, `quiz_questionrank`) VALUES\" .\n\t\t\t\t\t\"({$this->quizId}, {$sectionList[$sections[$i]]['quiz_sectionid']}, {$questionList[$sections[$i]][$offsets[$sections[$i]]]}, $userId, $i)\";\n\t\t\tif (!mysql_query($insertQuery)) {\n\t\t\t\tdisplayerror('Database Error. Could not initialize quiz.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$offsets[$sections[$i]]++;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a99cc02b5ae94329fb0a1e8b7e5db933", "score": "0.5155045", "text": "function __construct( $userCalories, $userSugar, $userSodium, $userProtein, $userCalcium ) {\n $this->userCalories = $userCalories;\n $this->userSugar = $userSugar;\n $this->userSodium = $userSodium;\n $this->userProtein = $userProtein;\n $this->userCalcium = $userCalcium;\n }", "title": "" }, { "docid": "b57839a96fcddbf6d2e07debaf722c2f", "score": "0.51531094", "text": "public function __construct($user) {\n $this->user = $user;\n }", "title": "" }, { "docid": "6f95b20858b25ffe11020fe7c4366ff6", "score": "0.51522064", "text": "function distributeInitialCards($userId) {\n\t$gameId = getGameOf($userId);\n\t$options = getUnusedCards($gameId);\n\t$hand = array();\n\n\tfor ($i = 0; $i < 7; $i++) {\n\t\t$chosen = array_rand($options); // index, not the card\n\n\t\t$sql = \"insert into decks (user_id, card_name) values ($userId, '$options[$chosen]')\";\n\t\tSQLInsert($sql);\n\t\tarray_push($hand, $options[$chosen]);\n\n\t\tarray_splice($options, $chosen, 1); // avoids calling getUnusedCards again\n\t}\n}", "title": "" }, { "docid": "576181e86ddaaad203e19495058d029f", "score": "0.51454556", "text": "public function initialize()\n {\n $this->setSchema(\"phalcon\");\n $this->setSource(\"user\");\n $this->hasMany('id', Book::class, 'uid', [\n 'alias' => 'book',\n ]);\n $this->hasOne('role_id', Role::class, 'id', [\n 'alias' => 'role',\n ]);\n $this->hasManyToMany(\n 'id',\n UserTitle::class,\n 'uid',\n 'title_id',\n Title::class,\n 'id',\n [\n 'alias' => 'title',\n 'reusable' => true,\n ]\n );\n parent::initialize();\n }", "title": "" }, { "docid": "8c50b1718e5e4e499019578d2e9e3239", "score": "0.5144251", "text": "public function init(){\n \n if(isset($_REQUEST['task'])){\n self::$task=filter_var($_REQUEST['task'],FILTER_SANITIZE_STRIPPED);\n }else{\n \n \n self::$task=self::$defaultTask;\n }\n \n $user=new User(); \n if(isset($_SESSION['uid'])){\n if($_SESSION['uid']!=\"\"){\n $user->loadDBData($_SESSION['uid']);\n \n }\n }\n Core::$user=$user; \n }", "title": "" }, { "docid": "1960c60c5a73c324d32c12b6bb089028", "score": "0.51438284", "text": "public function init(){\n\t\t$this->createFieldSet();\n\t\t$this->getWinner();\n\t}", "title": "" }, { "docid": "b9a2099b8f706e0b52941117d8e3e75b", "score": "0.51328176", "text": "public function __construct() {\n // initialize data\n $this->data = array ( 'sites' => array(),\n // 'users' => array() // future expansion: group by users\n );\n }", "title": "" }, { "docid": "29d44b2dba6adde7797d2a349f9abfe2", "score": "0.5132483", "text": "public function __construct()\n {\n $this->categories = new ArrayCollection();\n $this->participants = new ArrayCollection();\n $this->media = new ArrayCollection();\n $this->published = true;\n $this->translations = new ArrayCollection();\n $this->relativeProjects = new ArrayCollection();\n $this->usersWithPositions = new ArrayCollection();\n $this->projectReviews = new ArrayCollection();\n }", "title": "" }, { "docid": "30ba4c19388fb6f9efd7a112b10a4fdf", "score": "0.51321477", "text": "protected function beforeEach(): void\n {\n// Artisan::call()\n $this->user = Auth::loginUsingId(10);\n $this->postCategory = new PostCategory();\n $this->postCategory->scaffold();\n\n $this->post = new Post();\n $this->post->scaffold();\n }", "title": "" }, { "docid": "c7245ded3a0de6ddbc61834fc535f5f5", "score": "0.5126918", "text": "public function __construct($user = null) {\n $this->db_conn = SqlManager::getInstance();\n $this->sessionName = $GLOBALS['config']['session']['session_name'];\n if (!$user) {\n if (Session::exists($this->sessionName)) {\n $user = Session::get($this->sessionName);\n if ($this->find($user)) {\n $this->isLoggedIn = true;\n }\n }\n } else {\n $this->find($user);\n }\n }", "title": "" }, { "docid": "1fd419fc4652e8e91536129a8501caf6", "score": "0.5125794", "text": "public function init()\n {\n\t\t$this -> userModel = Application_Model_User::getInstance(); \n\t\t$this -> studyModel = Application_Model_Study::getInstance(); \n }", "title": "" }, { "docid": "d1c44f388265bd1c9e453e2b4699ec7c", "score": "0.5113661", "text": "protected function setUp()\n {\n parent::setUp();\n $this->_questionsBlock = new Oggetto_Faq_Block_Questions;\n }", "title": "" }, { "docid": "a9b362b3fae711bbca893f4f49a7e437", "score": "0.51106834", "text": "function __construct($user) {\n // Captcha and Honeypot must be disabled for form submission\n //module_disable(array('captcha', 'recaptcha', 'honeypot', 'mollom'), TRUE);\n //cache_clear_all();\n parent::__construct('user_pass');\n\n // $this->userObject = $user;\n // $this->setEntityObject($userObject);\n }", "title": "" }, { "docid": "f42d418376c61ee479de06fee2f5c9c7", "score": "0.5107444", "text": "public function init(){\n\t\t\tparent::init();\n\t\t\t\n\t\t\t//$userMapper = new Application_Model_Mapper_Users_UsersMapper();\n\t\t\t$this->user = new Application_Model_Users_User();\n\t\t\t$this->user->userID = 1;\n\t\t\t\n\t\t\t//$this->user = $userMapper->findByUniqueID('MqIquFxXrS');\n\t\t\t//$this->user->\n\t\t}", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "ce25f0f69c6dfaa91633a40ea426f947", "score": "0.5103807", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "06fc15db0194e7f2b4ba05992f7d329b", "score": "0.51030546", "text": "protected function setUp() {\n $this->object = new AuxUser;\n }", "title": "" }, { "docid": "3d84b0389d4cc7944b8dbfca420b75dd", "score": "0.51002944", "text": "public function __construct($user) \n {\n $this->user = $user;\n }", "title": "" }, { "docid": "37e75034b3d75686e3ea84c278a78b45", "score": "0.50947905", "text": "public function __construct() { \n $this->deck = [];\n $cardsIndex = 1;\n foreach (card::$suits as $suit=>$suitName) {\n foreach(card::$values as $value=>$valueName) {\n $this->deck[$cardsIndex] = new Card( $suit, $value, \"ND\");\n $cardsIndex++;\n }\n }\n $this->cardsUsed = 0;\n }", "title": "" }, { "docid": "ee476120fdf849b4fc1aa0e58c0cfa21", "score": "0.50919676", "text": "public function initialize()\n\t{\n\t\t$this->belongsTo('post_id', 'Post', 'id');\n\n\t\t// Used to select a user using a given user id\n\t\t//$this->belongsTo('user_id', 'User', 'id');\n\t}", "title": "" }, { "docid": "7d7c0707f6b61ec2d621f54a80141cbf", "score": "0.50918317", "text": "public function __construct($user)\n {\n $this->user = $user;\n\n }", "title": "" }, { "docid": "ef0a4ef1b58dbb2d59bc09f32e578690", "score": "0.508379", "text": "public function __construct(User $user, Answer $answer, MedicalExpert $expert)\n {\n $this->user = $user;\n $this->answer = $answer;\n $this->expert = $expert;\n }", "title": "" }, { "docid": "c289baf235114d3f5994a42e7eafe1a0", "score": "0.5078189", "text": "public function __construct($userId)\n\t{\n\t\t$this->userId = $userId;\n\t}", "title": "" }, { "docid": "8cb5a93104c8e6acbb4cd968d5e5712d", "score": "0.507758", "text": "public function __construct()\n {\n $this->makeDeck(self::$playerDeckConfig);\n $this->nrOfCards = count($this->arrDeck);\n\n }", "title": "" }, { "docid": "b82eb2370ed81e8ec4bc9dd530794751", "score": "0.5077146", "text": "public function __construct(User $user)\n {\n //$this->middleware('guest')->except('logout');\n\t\t//$this->users = $users;\n \t//parent::__construct();\n }", "title": "" }, { "docid": "dbedb6dad7e16c4eec20c49069655714", "score": "0.50745285", "text": "public function initUsers()\n {\n $this->collUsers = new PropelObjectCollection();\n $this->collUsers->setModel('User');\n }", "title": "" }, { "docid": "a690fd56e512b1b4d88b6e1648a8d427", "score": "0.50713104", "text": "public function __construct($user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "241d31b49af359ec40f8a41c4fdf02dc", "score": "0.50689363", "text": "public function __construct($identifier = 0)\r\n\t{\r\n\t\t// Create the user parameters object\r\n\t\t$this->_params = new JRegistry;\r\n\r\n\r\n\t\t$user = JFactory::getUser($identifier);\r\n\t\t$vars = get_object_vars ($user);\r\n\t\t\r\n\t\tforeach($vars as $name=>$value){\r\n\t\t\t$this->set($name, $value);\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t// Load the user if it exists\r\n\t\tif (!$user->guest)\r\n\t\t{\r\n\t\t\t$this->load($identifier);\r\n\t\t}else{\r\n\t\t\t//default data\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "00e4737fce050f44f28ec599dbccabdc", "score": "0.5065702", "text": "function __construct($userId) {\n\t\t$this->userId = $userId;\n\t}", "title": "" }, { "docid": "974858c5beecdff7bcee57a61f971f0e", "score": "0.5055158", "text": "public function setUp() {\n\t\t$this->data['standard'] = array(\n\t\t\t'firstname' => 'Jim',\n\t\t\t'lastname' => 'Morrison',\n\t\t\t'empty' => '',\n\t\t\t'integer' => '9',\n\t\t\t'float' => '1.11',\n\t\t\t'categories' => array('Poet','Composer'),\n\t\t\t'band' => array(\n\t\t\t\t'name' => 'The doors'\n\t\t\t),\n\t\t\t'friends' => array(\n\t\t\t\tarray('firstname' => 'Ray' , 'lastname' => 'Manzarek'),\n\t\t\t\tarray('firstname' => 'Robbie' , 'lastname' => 'Krieger'),\n\t\t\t\tarray('firstname' => 'John' , 'lastname' => 'Densmore')\n\t\t\t),\n\t\t\t'sub' => array(\n\t\t\t\tarray('integer' => '9', 'string' => 9)\n\t\t\t)\n\t\t) ;\n\n\t\t$this->data['source'] = array(\n\t\t\t'_index' => 'music',\n\t\t\t'_type' => 'artists',\n\t\t\t'_source' => array(\n\t\t\t\t'firstname' => 'Jim',\n\t\t\t\t'lastName' => 'Morrisson'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "744a528f926c72c12b76f5e44ba3aec4", "score": "0.5049491", "text": "protected function init()\n {\n $redisDataProvider = new RedisDataProvider($this);\n foreach ($this->initKeys as $key=>$type) {\n $keyValMapper = new RedisSetMapper($this->userPwd . $this->keySeparator . $key, $this->key);\n $redisDataProvider->set($keyValMapper);\n }\n $keyValMapper = new RedisSetMapper($this->userPwd.'_'.'init', 1);\n $redisDataProvider->set($keyValMapper);\n }", "title": "" }, { "docid": "748505bb8e52bfbca846f7ea741db854", "score": "0.5041792", "text": "public function __construct() {\n $this->_mongo = DBConnection::instantiate();\n $this->_collection = $this->_mongo->getCollection(User::COLLECTION);\n \n if ( $this->isLoggedIn() ) $this->_loadData();\n }", "title": "" }, { "docid": "9b6bd5502a67fece0d97d8ee3da596bd", "score": "0.50407785", "text": "public function setup(): void\n {\n\n parent::setUp();\n $this->user = factory(User::class)->create();\n $this->course = factory(Course::class)->create(['user_id' => $this->user->id]);\n $this->student_user = factory(User::class)->create();\n $this->student_user->role = 3;\n\n $this->student_user_2 = factory(User::class)->create();\n $this->student_user_2->role = 3;\n $this->student_user_ids = [$this->student_user->id, $this->student_user_2->id];\n $this->section = factory(Section::class)->create(['course_id' => $this->course->id]);\n\n $this->assignment = factory(Assignment::class)->create(['course_id' => $this->course->id]);\n $this->assignUserToAssignment($this->assignment->id, 'course', $this->course->id);\n\n\n $this->assignment_3 = factory(Assignment::class)->create(['course_id' => $this->course->id, 'order' => 2]);\n $this->question = factory(Question::class)->create(['page_id' => 1]);\n $this->original_assignment_question_id = DB::table('assignment_question')->insertGetId([\n 'assignment_id' => $this->assignment->id,\n 'question_id' => $this->question->id,\n 'points' => 10,\n 'order' => 1,\n 'open_ended_submission_type' => 'file'\n ]);\n\n\n $this->learning_tree = factory(LearningTree::class)->create(['user_id' => $this->user->id]);\n $this->original_assignment_question_learning_tree_id = DB::table('assignment_question_learning_tree')->insertGetId([\n 'assignment_question_id' => $this->original_assignment_question_id,\n 'learning_tree_id' => $this->learning_tree->id\n ]);\n\n $this->course_3 = factory(Course::class)->create(['user_id' => $this->user->id]);\n\n\n $this->user_2 = factory(User::class)->create();\n $this->course_2 = factory(Course::class)->create(['user_id' => $this->user_2->id]);\n $this->assignment_2 = factory(Assignment::class)->create(['course_id' => $this->course_2->id]);\n\n $this->grader_user = factory(User::class)->create();\n $this->grader_user->role = 4;\n Grader::create(['user_id' => $this->grader_user->id, 'section_id' => $this->section->id]);\n $finalGrade = new FinalGrade();\n\n FinalGrade::create(['course_id' => $this->course->id,\n 'letter_grades' => $finalGrade->defaultLetterGrades()]);\n\n\n $this->assign_tos = [\n [\n 'groups' => [['value' => ['course_id' => $this->course->id], 'text' => 'Everybody']],\n 'available_from' => '2020-06-10 09:00:00',\n 'available_from_date' => '2020-06-10',\n 'available_from_time' => '09:00:00',\n 'due' => '2020-06-12 09:00:00',\n 'due_date' => '2020-06-12',\n 'due_time' => '09:00:00',\n 'final_submission_deadline' => '2021-06-12 09:00:00',\n 'final_submission_deadline_date' => '2021-06-12',\n 'final_submission_deadline_time' => '09:00:00'\n ]\n ];\n $this->assignment_info = ['course_id' => $this->course->id,\n 'name' => 'First Assignment',\n 'assign_tos' => $this->assign_tos,\n 'scoring_type' => 'p',\n 'source' => 'a',\n 'default_points_per_question' => 2,\n 'students_can_view_assignment_statistics' => 0,\n 'include_in_weighted_average' => 1,\n 'late_policy' => 'not accepted',\n 'assessment_type' => 'delayed',\n 'default_open_ended_submission_type' => 'file',\n 'instructions' => 'Some instructions',\n \"number_of_randomized_assessments\" => null,\n 'notifications' => 1,\n 'assignment_group_id' => 1,\n 'file_upload_mode' => 'both'];\n\n foreach ($this->assign_tos[0]['groups'] as $key => $group) {\n $group_info = [\"groups_$key\" => ['Everybody'],\n \"due_$key\" => '2020-06-12 09:00:00',\n \"due_date_$key\" => '2020-06-12',\n \"due_time_$key\" => '09:00:00',\n \"available_from_$key\" => '2020-06-10',\n \"available_from_date_$key\" => '2020-06-12',\n \"available_from_time_$key\" => '09:00:00',\n \"final_submission_deadline_date_$key\" => '2021-06-12',\n \"final_submission_deadline_time_$key\" => '09:00:00'];\n foreach ($group_info as $info_key => $info_value) {\n $this->assignment_info[$info_key] = $info_value;\n }\n }\n\n $this->student_user = factory(User::class)->create();\n $this->student_user->role = 3;\n Enrollment::create(['course_id' => $this->course->id,\n 'section_id' => $this->section->id,\n 'user_id' => $this->student_user->id]);\n\n $this->student_user_2 = factory(User::class)->create();\n $this->student_user_2->role = 3;\n $this->section_1 = $this->section = factory(Section::class)->create(['course_id' => $this->course->id]);\n Enrollment::create(['course_id' => $this->course->id,\n 'section_id' => $this->section_1->id,\n 'user_id' => $this->student_user_2->id]);\n\n }", "title": "" }, { "docid": "fb2b8d7bf51d4b098e3ff70f2ee081b3", "score": "0.50379795", "text": "public function __construct()\n\t{\n\t\tadd_filter('acf/load_field/name=data_curator', function($field) {\t\n\t\t\n\t\t\t$field['choices'] = array();\n\t\t\t\n\t\t\t$users = get_users();\n\t\t\t\n\t\t\tforeach ($users as $user) {\n\t\t\t\t$field['choices'][ $user->ID ] = $user->user_firstname . ' ' . $user->user_lastname;\n\t\t\t}\n\t\t\n\t\t\treturn $field;\n\t\t});\n\t}", "title": "" }, { "docid": "b79a3b7a91ccb428a9b02665d25a22cf", "score": "0.50365657", "text": "public function initialize()\n\t{\n\t\t$this->setSource('Referrals');\n\t\t$this->hasOne('user_ik', 'User', 'ik');\n\t}", "title": "" }, { "docid": "b8e0630cbd6107a062f95d74fd0388cf", "score": "0.50351727", "text": "public function initialize()\n {\n $this->setSchema(\"EgFtyzVzTW\");\n $this->setSource(\"users\");\n $this->hasMany('id', 'Houses', 'userID', ['alias' => 'Houses']);\n $this->belongsTo('roleID', '\\UserRole', 'id', ['alias' => 'Userrole']);\n }", "title": "" }, { "docid": "41adc2672123fee3b72732aa8f03739f", "score": "0.5029247", "text": "public function setUp()\n {\n $this->user = new \\App\\Field;\n }", "title": "" }, { "docid": "c91fff2a7f8e29ec5f80e333646cea7b", "score": "0.50262403", "text": "public function __construct()\n {\n $this->created = new \\DateTime(\"now\");\n $this->userservices = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->usercomments = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->services = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }", "title": "" }, { "docid": "0927d3dfabca05259af7ed9a4b833340", "score": "0.50198966", "text": "protected function set_up()\n {\n $ids = [1, 2, 3, 5, 7, 11, 13];\n $names = ['foo', 'bar', 'baz', 'dib', 'zim', 'gir', 'irk'];\n $data = [];\n foreach ($names as $key => $name) {\n $data[] = (object) [\n 'id' => $ids[$key],\n 'name' => $name\n ];\n }\n\n $this->data = $data;\n $this->collection = new GenericCollection($data);\n $this->empty_collection = new GenericCollection([]);\n }", "title": "" }, { "docid": "456e56afff049ebd1ea5de76454692a4", "score": "0.50151", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t$this->dataSetStackBuffer = array('users'=>1);\n\t\t$this->loadDataSets();\n\t}", "title": "" }, { "docid": "1f1409d60bb85b73017ed76e29f95199", "score": "0.50141305", "text": "public function __construct( $user)\n {\n $this->user = $user;\n }", "title": "" }, { "docid": "8973f73bcd6d554d7d8cb55a857d204b", "score": "0.5013529", "text": "public final function init()\n {\n $this->data['permissions'] = $this\n ->user\n ->getUserGroup()\n ->getPermissions();\n }", "title": "" }, { "docid": "006198a8990d9a2c0920d394494a2a96", "score": "0.5005316", "text": "public function __construct(User $user)\n {\n $this->user = $user;\n\n $this->onQueue('import-queue');\n }", "title": "" }, { "docid": "6373b64ca52cc2831142f8d0730906ad", "score": "0.50020957", "text": "public function __construct($user = null){\n\n\t\t$this->_instance = DB::getInstance();\n\t\t$this->_exists = false;\n\n\t\tif (($user === null) && isset($_SESSION[Config::get('session/session_name')])) {\n\t\t\t$user = $_SESSION[Config::get('session/session_name')];\n\t\t}\n\t\ttrim($user);\n\t\t$this->getUser($user);\n\n\t}", "title": "" }, { "docid": "552bcc8a4454a39e7bf7c88faf08711d", "score": "0.49993646", "text": "public function initialiser() {\r\n }", "title": "" }, { "docid": "eb34a90c53a7db0d9bb690854d07e2fd", "score": "0.4996483", "text": "public function initialize()\n {\n $this->belongsTo('usersId', 'Modules\\Models\\Users', 'id', array(\n 'alias' => 'user'\n ));\n }", "title": "" }, { "docid": "aa7bd2717f9cd6b0e1b61df96f55e009", "score": "0.49959868", "text": "public function initUsers()\n\t{\n\t\t$this->collUsers = array();\n\t}", "title": "" } ]
586f613fd4f96dca4991ccc8bec5def6
Test case for languageProfilesUpsert Language Profiles: Upsert.
[ { "docid": "904b8ef256c6838d20883d75ebd1e840", "score": "0.8302745", "text": "public function testLanguageProfilesUpsert()\n {\n }", "title": "" } ]
[ { "docid": "26eaf97c06b1d0a1a5b618bd6349c841", "score": "0.6128322", "text": "public function testPredefinedProfilesUpdatePredefinedProfile()\n {\n }", "title": "" }, { "docid": "91d63cada85506c340b3fcd02ad87057", "score": "0.5678561", "text": "public function testPredefinedProfilesWritePredefinedProfile()\n {\n }", "title": "" }, { "docid": "b9d4ba3fcfca9424531d2cd7046cd2ce", "score": "0.54589295", "text": "public function testReviewUpsert()\n {\n\n }", "title": "" }, { "docid": "54ba9f811dbfaf0e93b7283ec45fd572", "score": "0.5453141", "text": "public function testLanguageProfilesDelete()\n {\n }", "title": "" }, { "docid": "27d6e5e5daffbda86459b473a7e2faab", "score": "0.5409647", "text": "public function testGetLanguageProfilesList()\n {\n }", "title": "" }, { "docid": "789faa9c5c0c681d4bfe306cbbc0615e", "score": "0.5402988", "text": "public function test_version1importsetsuserprofilefieldsonupdate() {\n global $CFG, $DB;\n\n // Perform default \"user create\" import.\n $this->run_core_user_import(array());\n\n // Create custom field category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Create custom profile fields.\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rliplegacydatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \"rlipoption1\\nrlipoption2\");\n $this->create_profile_field('rliptextarea', 'textarea', $category->id);\n $this->create_profile_field('rliptext', 'text', $category->id);\n\n // Run import.\n $data = array();\n $data['action'] = 'update';\n $data['username'] = 'rlipusername';\n $data['profile_field_rlipcheckbox'] = '1';\n $data['profile_field_rlipdatetime'] = 'jan/12/2011';\n $data['profile_field_rliplegacydatetime'] = '1/12/2011';\n $data['profile_field_rlipmenu'] = 'rlipoption1';\n $data['profile_field_rliptextarea'] = 'rliptextarea';\n $data['profile_field_rliptext'] = 'rliptext';\n\n $this->run_core_user_import($data, false);\n\n // Fetch the user and their profile field data.\n $user = $DB->get_record('user', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n\n // Validate data.\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), true);\n $this->assertEquals($user->profile_field_rlipcheckbox, 1);\n $this->assertEquals(isset($user->profile_field_rlipdatetime), true);\n $this->assertEquals($user->profile_field_rlipdatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rliplegacydatetime), true);\n $this->assertEquals($user->profile_field_rliplegacydatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rlipmenu), true);\n $this->assertEquals($user->profile_field_rlipmenu, 'rlipoption1');\n $this->assertEquals(isset($user->profile_field_rliptextarea['text']), true);\n $this->assertEquals($user->profile_field_rliptextarea['text'], 'rliptextarea');\n $this->assertEquals(isset($user->profile_field_rliptext), true);\n $this->assertEquals($user->profile_field_rliptext, 'rliptext');\n }", "title": "" }, { "docid": "c74455067248c277b7ec84854ecb260c", "score": "0.53937846", "text": "public function testPredefinedProfilesGetNew()\n {\n }", "title": "" }, { "docid": "c9c72b3005afa438f642d39c0ed0588d", "score": "0.52417797", "text": "public function test_version1importvalidatesprofilefieldsonupdate() {\n global $CFG, $DB;\n\n // Run the \"create user\" import.\n $this->run_core_user_import(array());\n\n $userid = $DB->get_field('user', 'id', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\n\n // Create the category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Try to insert bogus checkbox data.\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rlipcheckbox' => '2'\n );\n $this->run_core_user_import($params);\n $user = new stdClass;\n $user->id = $userid;\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\n\n // Try to insert bogus datetime data.\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id);\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rlipdatetime' => '1000000000'\n );\n $this->run_core_user_import($params);\n $user = new stdClass;\n $user->id = $userid;\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\n\n // Try to insert bogus menu data.\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \"rlipoption1\\nrlipoption1B\");\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rlipmenu' => 'rlipoption2'\n );\n $this->run_core_user_import($params);\n $user = new stdClass;\n $user->id = $userid;\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\n }", "title": "" }, { "docid": "a0aaebc4a883f3e09f549775ecadbf85", "score": "0.51919633", "text": "public function testPredefinedProfilesClone()\n {\n }", "title": "" }, { "docid": "d3ff17da63ec550d2062ef63dc5767c1", "score": "0.51858735", "text": "public function testGetLanguageProfilesGet()\n {\n }", "title": "" }, { "docid": "7f6c25332f44c2e5e879b457a1f6bae6", "score": "0.5164209", "text": "function testUpdateSettingUserTasksSettingCommand_MutilEntries_ExistingMutilUsersProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . \"user1.WeSayConfig\";\n\n\t\t// create 3 user profile\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user1.WeSayConfig\";\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n// \t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user2.WeSayConfig\";\n// \t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n// \t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user3.WeSayConfig\";\n// \t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n// \t\t$userName[]=\"user2\";\n// \t\t$userName[]=\"user3\";\n\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user2\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user3\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\t\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\"/*.WeSayConfig\");\n\n\t\t$isPatchincludeDefault = false;\n\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),4);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}\n\n\n\t\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\n\t}", "title": "" }, { "docid": "d63047349f130a3b9e33ce8ced20dd89", "score": "0.50178206", "text": "public function test_version1importpreventsinvaliduserlangonupdate() {\n global $DB, $CFG;\n\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'lang' => '12'\n );\n\n $this->run_core_user_import($data, false);\n\n // Make sure the data hasn't changed.\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'lang' => $CFG->lang\n ));\n }", "title": "" }, { "docid": "43cbdc0e4241288e90aebb05c35b0c63", "score": "0.4998867", "text": "function testUpdateSettingUserTasksSettingCommand_MutilEntries_NonExistingMutilUsersProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\n\t\t// copy default profile\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\t\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\"/*.WeSayConfig\");\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),0);\n\t\t}\n\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n// \t\t$userName[]=\"user2\";\n// \t\t$userName[]=\"user3\";\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user2\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user3\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\t\t$filePaths = glob($lexProjectMockObject->getLanguageForgeSetting() .\"/*.WeSayConfig\");\n\t\t$isPatchincludeDefault = false;\n\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),2);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}\n\n\n\t\tself::recursiveDelete($this->_path);\n\t}", "title": "" }, { "docid": "95de63e90d27e813460a0f486efab915", "score": "0.4949924", "text": "public function testDodgyUpsertParams()\n {\n $this->createBasicStore()->upsert([null, FALSE, TRUE, new stdClass()]);\n }", "title": "" }, { "docid": "ce1e75f944970a77cd131115e3b60b81", "score": "0.4917661", "text": "public function test_likeUpsert() {\n\n }", "title": "" }, { "docid": "5ac5feab510809243489183f1ec78049", "score": "0.48938617", "text": "public function testPredefinedProfilesGet()\n {\n }", "title": "" }, { "docid": "ef0c32ffc993fa02e404bee8474fceb4", "score": "0.48782527", "text": "function saveFirstPreferences($username, $lang_preferences, $topic_preferences)\n{\n\n\tglobal $db;\n\n $lang_query = \"INSERT INTO user_lang\n (username, lang_1, lang_2, lang_3)\n VALUES \n (:username, :lang_1, :lang_2, :lang_3)\n ON DUPLICATE KEY UPDATE\n lang_1 = :lang_1,\n lang_2 = :lang_2,\n lang_3 = :lang_3\";\n\n $statement = $db->prepare($lang_query);\n $statement->bindValue(':lang_1',$lang_preferences[0]);\n $statement->bindValue(':lang_2',$lang_preferences[1]);\n $statement->bindValue(':lang_3',$lang_preferences[2]);\n $statement->bindValue(':username',$username);\n\t$statement->execute();\n\n $topic_query = \"INSERT INTO user_topic\n (username, topic_1, topic_2, topic_3)\n VALUES \n (:username, :topic_1, :topic_2, :topic_3)\n ON DUPLICATE KEY UPDATE\n topic_1 = :topic_1,\n topic_2 = :topic_2,\n topic_3 = :topic_3\";\n $statement = $db->prepare($topic_query);\n $statement->bindValue(':topic_1',$topic_preferences[0]);\n $statement->bindValue(':topic_2',$topic_preferences[1]);\n $statement->bindValue(':topic_3',$topic_preferences[2]);\n $statement->bindValue(':username',$username);\n\t$statement->execute();\n\n\t$statement->closeCursor();\t\n\t\n}", "title": "" }, { "docid": "7e8cee28539d3eda498f6f560d285d93", "score": "0.48683143", "text": "public function testPredefinedProfilesDeletePredefinedProfile()\n {\n }", "title": "" }, { "docid": "94a1101d0a4bd10452afdc36bac4f480", "score": "0.48557958", "text": "public function updateProfile() : AffiliateProfile;", "title": "" }, { "docid": "74321016af433bb4211a9b11f5bc6619", "score": "0.48381144", "text": "public function testEtfsProfile()\n {\n }", "title": "" }, { "docid": "aca4538c8a8e8cad48ed29ac436879e0", "score": "0.48005694", "text": "public function test_elis_createorupdate_supports_underscores() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/course.class.php'));\n require_once(elispm::lib('data/pmclass.class.php'));\n require_once(elispm::lib('data/student.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array(\n 'courseid' => $course->id,\n // Idnumber has an underscore in it.\n 'idnumber' => 'testclass_idnumber'\n ));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Set up an existing enrolment.\n $student = new student(array(\n 'userid' => $user->id,\n 'classid' => $class->id,\n 'completestatusid' => student::STUSTATUS_FAILED\n ));\n $student->save();\n\n // Import the record, with create acting as an update.\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclass_idnumber';\n $record->user_idnumber = 'testuseridnumber';\n $record->completestatusid = student::STUSTATUS_PASSED;\n\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertEquals(1, $DB->count_records(student::TABLE));\n $params = array(\n 'userid' => $user->id,\n 'classid' => $class->id,\n 'completestatusid' => student::STUSTATUS_PASSED\n );\n $exists = $DB->record_exists(student::TABLE, $params);\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "46148e071cee513bb0bda23a69172225", "score": "0.4781433", "text": "private function saveProfiles() {\n switch(D3P_STORAGE) {\n\t case 'file':\n\t $this->saveProfilesToFile();\n\t break;\n }\n\t}", "title": "" }, { "docid": "f1123540895dba458b553cbb5b448fd3", "score": "0.47765467", "text": "function testUpdateSettingUserTasksSettingCommand_MutilEntries_NonExistingSingleUserProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\n\t\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\"/*.WeSayConfig\");\n\n\t\t$isPatchincludeDefault = false;\n\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),0);\n\t\t}\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\t\t$filePaths = glob($lexProjectMockObject->getUserSettingsFilePath(\"user1\") );\n\t\t$this->assertEqual(count($filePaths),1);\n\t\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\n\t}", "title": "" }, { "docid": "d069b7e1906937b0000635d53b2bf415", "score": "0.47629502", "text": "public function test_version1importpreventsinvalidusercountryonupdate() {\n global $CFG, $DB;\n\n $this->run_core_user_import(array('country' => 'CA'));\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'country' => 12\n );\n\n $this->run_core_user_import($data, false);\n\n // Make sure the data hasn't changed.\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'country' => 'CA'\n ));\n }", "title": "" }, { "docid": "cc45d7a7467e38287d5048d10ed77354", "score": "0.4754129", "text": "public function test_elis_createorupdate_updates_instructor_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Create the instructor enrolment user.\n $instructor = new instructor(array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n ));\n $instructor->save();\n\n // Run the instructor enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->role = 'instructor';\n $record->completetime = 'Jan/02/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\n )));\n }", "title": "" }, { "docid": "637bb48109ee95f14d651b111ad2559a", "score": "0.47501665", "text": "function testUpdateSettingUserTasksSettingCommand_MutilEntries_ExistingSingleUserProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . \"user1.WeSayConfig\";\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user1.WeSayConfig\";\n\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\t\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\n\t}", "title": "" }, { "docid": "059e9d577aeac800501759f74f6ece88", "score": "0.4743711", "text": "public function test_version1importsetsuserprofilefieldsoncreate() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/user/profile/lib.php');\n require_once($CFG->dirroot.'/user/profile/definelib.php');\n\n // Create custom field category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Create custom profile fields.\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rliplegacydatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \"rlipoption1\\nrlipoption2\");\n $this->create_profile_field('rliptextarea', 'textarea', $category->id);\n $this->create_profile_field('rliptext', 'text', $category->id);\n\n // Run import.\n $data = array();\n $data['profile_field_rlipcheckbox'] = '1';\n $data['profile_field_rlipdatetime'] = 'jan/12/2011';\n $data['profile_field_rliplegacydatetime'] = '1/12/2011';\n $data['profile_field_rlipmenu'] = 'rlipoption1';\n $data['profile_field_rliptextarea'] = 'rliptextarea';\n $data['profile_field_rliptext'] = 'rliptext';\n\n $this->run_core_user_import($data);\n\n // Fetch the user and their profile field data.\n $user = $DB->get_record('user', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n\n // Validate data.\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), true);\n $this->assertEquals($user->profile_field_rlipcheckbox, 1);\n $this->assertEquals(isset($user->profile_field_rlipdatetime), true);\n $this->assertEquals($user->profile_field_rlipdatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rliplegacydatetime), true);\n $this->assertEquals($user->profile_field_rliplegacydatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rlipmenu), true);\n $this->assertEquals($user->profile_field_rlipmenu, 'rlipoption1');\n $this->assertEquals(isset($user->profile_field_rliptextarea['text']), true);\n $this->assertEquals($user->profile_field_rliptextarea['text'], 'rliptextarea');\n $this->assertEquals(isset($user->profile_field_rliptext), true);\n $this->assertEquals($user->profile_field_rliptext, 'rliptext');\n }", "title": "" }, { "docid": "2eb8e57fa4af6d29999b55b93ed5ffe7", "score": "0.47398433", "text": "public function test_version1importpreventslonguserfieldsonupdate() {\n global $CFG, $DB;\n\n $this->run_core_user_import(array(\n 'idnumber' => 'rlipidnumber',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'firstname' => str_repeat('a', 101)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'firstname' => 'rlipfirstname'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'lastname' => str_repeat('a', 101)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'lastname' => 'rliplastname'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'email' => str_repeat('a', 50).'@'.str_repeat('b', 50)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'email' => 'rlipuser@rlipdomain.com'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'city' => str_repeat('a', 256)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'city' => 'rlipcity'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'idnumber' => str_repeat('a', 256)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'rlipidnumber'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'institution' => str_repeat('a', 41)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'institution' => 'rlipinstitution'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'department' => str_repeat('a', 31)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'department' => 'rlipdepartment'\n ));\n }", "title": "" }, { "docid": "0e3e70b7257060ad4c6649310116085d", "score": "0.4738639", "text": "public function test_elis_createorupdate_updates_student_and_instructor_enrolment() {\n global $CFG, $DB;\n\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array(\n 'courseid' => $course->id,\n 'idnumber' => 'testclassidnumber')\n );\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n\n // 1 Run the first student enrolment.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->role = 'student';\n $record->completetime = 'Jan/01/2012';\n\n // NOTE: we clone() the record because the createorupdate setting will rewrite the action parameter.\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n\n // Validation of the enrolment record.\n $params = array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n );\n\n $this->assertTrue($DB->record_exists(student::TABLE, $params));\n\n // 2 Run the second student enrolment.\n $record->completetime = 'Jan/02/2012';\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 2, 2012);\n $this->assertTrue($DB->record_exists(student::TABLE, $params));\n\n // 3 Run the first teacher enrolment.\n $record->role = 'instructor';\n $record->completetime = 'Jan/01/2012';\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 1, 2012);\n $this->assertTrue($DB->record_exists(instructor::TABLE, $params));\n\n // 4 Run the second teacher enrolment.\n $record->completetime = 'Jan/02/2012';\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 2, 2012);\n $this->assertTrue($DB->record_exists(instructor::TABLE, $params));\n }", "title": "" }, { "docid": "e35e8cc6096cafd35ad1eed9110f6113", "score": "0.4726015", "text": "public function testUsersIdProfilePut()\n {\n\n }", "title": "" }, { "docid": "926b34852e47421c1f94ab605c73f33d", "score": "0.47234473", "text": "public function testProfileOperations() {\n $user = $this->createUser([], [\n \"update own {$this->type1->id()} profile\",\n \"update own {$this->type2->id()} profile\",\n ]);\n $profile1 = $this->createProfile($this->type1, $user);\n // Test access to a profile type with no role requirement.\n $this->assertTrue($this->accessHandler->access($profile1, 'update', $user));\n\n $profile2 = $this->createProfile($this->type2, $user);\n $this->assertFalse($this->accessHandler->access($profile2, 'update', $user));\n $this->accessHandler->resetCache();\n\n $user->addRole($this->role2->id());\n $user->save();\n $profile2 = $this->reloadEntity($profile2);\n $this->assertTrue($this->accessHandler->access($profile2, 'update', $user));\n\n $operations = ['view', 'update', 'delete'];\n $user2 = $this->createUser([], [\n \"view any {$this->type2->id()} profile\",\n \"update any {$this->type2->id()} profile\",\n \"delete any {$this->type2->id()} profile\",\n ]);\n foreach ($operations as $operation) {\n $this->assertTrue($this->accessHandler->access($profile2, $operation, $user2));\n }\n\n $user->removeRole($this->role2->id());\n $user->save();\n $this->accessHandler->resetCache();\n $profile2 = $this->reloadEntity($profile2);\n // Assert that each operation is denied if the profile owner doesn't have\n // one of the allowed roles.\n foreach ($operations as $operation) {\n $this->assertFalse($this->accessHandler->access($profile2, $operation, $user2));\n }\n\n $user3 = $this->createUser([], [\n \"view own {$this->type3->id()} profile\",\n \"update own {$this->type3->id()} profile\",\n \"delete own {$this->type3->id()} profile\",\n ]);\n $profile3 = $this->createProfile($this->type3, $user3);\n // Test the operations without the role affected.\n foreach ($operations as $operation) {\n $this->assertFalse($this->accessHandler->access($profile3, $operation, $user3));\n }\n $user3->addRole($this->role1->id());\n $user3->save();\n $this->accessHandler->resetCache();\n $profile3 = $this->reloadEntity($profile3);\n foreach ($operations as $operation) {\n $this->assertTrue($this->accessHandler->access($profile3, $operation, $user3));\n }\n }", "title": "" }, { "docid": "e2f015abe692006cb10dbb8f6802be4a", "score": "0.47168595", "text": "public function test_version1importsetsfieldsonextendeduserupdate() {\n global $CFG, $DB;\n $CFG->allowuserthemes = true;\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'user_username' => 'rlipusername',\n 'auth' => 'mnet',\n 'maildigest' => 2,\n 'autosubscribe' => 1,\n 'trackforums' => 1,\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n\n $this->run_core_user_import($data, false);\n\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $data['username'] = $data['user_username'];\n unset($data['user_username']);\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n institution = :institution AND\n department = :department\";\n\n $exists = $DB->record_exists_select('user', $select, $data);\n\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "d7009aeb7d65450c6dbc6bfd7cf4d9ec", "score": "0.46921903", "text": "public function test_version1importdetectsduplicateswhenmultipleexist() {\n global $DB, $CFG;\n $userone = array(\n 'username' => 'three',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'one',\n 'email' => 'email@example.com',\n 'firstname' => 'Test',\n 'lastname' => 'User'\n );\n\n $usertwo = array(\n 'username' => 'two',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'two',\n 'email' => 'email2@example.com',\n 'firstname' => 'Test',\n 'lastname' => 'User'\n );\n $DB->insert_record('user', $userone);\n $DB->insert_record('user', $usertwo);\n set_config('allowduplicateemails', 1, 'rlipimport_version1');\n $usertoimport = array(\n 'username' => 'two',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'two',\n 'email' => 'email@example.com'\n );\n // Run the import.\n $this->run_core_user_import($usertoimport);\n }", "title": "" }, { "docid": "1625a799a96cc85affd7960439a27429", "score": "0.46704412", "text": "public function testUpsertRow()\n {\n $values = ['emailAddress' => 'nothing@nothing.com'];\n $test = $this->api->upsertRow('primaryKey', '2', $values, 'ETApiTest');\n $delete = $this->api->deleteRow('ETApiTest', ['primaryKey' => 2]);\n $this->assertEquals(200, $test);\n }", "title": "" }, { "docid": "cec56c6c459d2785f6142ff94afc7b18", "score": "0.46518192", "text": "public function test_elis_createorupdate_updates_userset() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/userset.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test user set.\n $userset = new userset(array('name' => 'testusersetname', 'display' => 'testusersetdisplay'));\n $userset->save();\n\n // Run the user set create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'cluster';\n $record->name = 'testusersetname';\n $record->display = 'updatedtestusersetdisplay';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(userset::TABLE, array(\n 'name' => 'testusersetname',\n 'display' => 'updatedtestusersetdisplay'\n )));\n }", "title": "" }, { "docid": "2c7c49f9abc659745327adf87576b392", "score": "0.46117076", "text": "public function testGetOrganizationConfigTemplateSwitchProfiles()\n {\n }", "title": "" }, { "docid": "8f36ef0120a8433e5cad49f362381011", "score": "0.46075556", "text": "public function test_version1importdoesnotupdatenonmatchingusers() {\n global $CFG;\n\n $this->run_core_user_import(array('idnumber' => 'rlipidnumber', 'firstname' => 'oldfirstname'));\n\n $checkdata = array(\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'username' => 'rlipusername',\n 'email' => 'rlipuser@rlipdomain.com',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'oldfirstname'\n );\n\n // Bogus username.\n $data = array(\n 'action' => 'update',\n 'username' => 'bogususername',\n 'firstname' => 'newfirstname'\n );\n $this->run_core_user_import($data, false);\n $this->assert_record_exists('user', $checkdata);\n\n // Bogus email.\n $data = array(\n 'action' => 'update',\n 'email' => 'bogus@domain.com',\n 'firstname' => 'newfirstname'\n );\n $this->run_core_user_import($data, false);\n $this->assert_record_exists('user', $checkdata);\n\n // Bogus idnumber.\n $data = array(\n 'action' => 'update',\n 'idnumber' => 'bogusidnumber',\n 'firstname' => 'newfirstname'\n );\n $this->run_core_user_import($data, false);\n $this->assert_record_exists('user', $checkdata);\n }", "title": "" }, { "docid": "d24f1001ec85c248c35890c45d9e3ecf", "score": "0.46034402", "text": "public function testCopyImport(): void\n {\n /** @var array{id:string} $table */\n $table = $this->_client->apiPost('buckets/' . $this->getTestBucketId(self::STAGE_IN) . '/tables', [\n 'dataString' => 'Id,Name,update',\n 'name' => 'languages',\n 'primaryKey' => 'Id',\n ]);\n\n // create workspace and source table in workspace\n $workspace = $this->initTestWorkspace();\n\n $backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace);\n $backend->dropTableIfExists('test_Languages3');\n $backend->createTable('test_Languages3', [\n 'Id' => 'integer',\n 'Name' => 'string',\n 'update' => 'string',\n ]);\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'INSERT INTO %s.`test_Languages3` (`Id`, `Name`) VALUES (1, \\'cz\\'), (2, \\'en\\');',\n $workspace['connection']['schema']\n ));\n\n $this->_client->writeTableAsyncDirect($table['id'], [\n 'dataWorkspaceId' => $workspace['id'],\n 'dataTableName' => 'test_Languages3',\n ]);\n\n $expected = [\n '\"Id\",\"Name\",\"update\"',\n '\"1\",\"cz\",\"\"',\n '\"2\",\"en\",\"\"',\n ];\n\n $this->assertLinesEqualsSorted(implode(\"\\n\", $expected) . \"\\n\", $this->_client->getTableDataPreview($table['id'], [\n 'format' => 'rfc',\n ]), 'imported data comparsion');\n\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'TRUNCATE TABLE %s.`test_Languages3`',\n $workspace['connection']['schema']\n ));\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'INSERT INTO %s.`test_Languages3` VALUES (1, \\'cz\\', \\'1\\'), (3, \\'sk\\', \\'1\\');',\n $workspace['connection']['schema']\n ));\n\n $this->_client->writeTableAsyncDirect($table['id'], [\n 'dataWorkspaceId' => $workspace['id'],\n 'dataTableName' => 'test_Languages3',\n 'incremental' => true,\n ]);\n\n $expected = [\n '\"Id\",\"Name\",\"update\"',\n '\"1\",\"cz\",\"1\"',\n '\"2\",\"en\",\"\"',\n '\"3\",\"sk\",\"1\"',\n ];\n $this->assertLinesEqualsSorted(implode(\"\\n\", $expected) . \"\\n\", $this->_client->getTableDataPreview($table['id'], [\n 'format' => 'rfc',\n ]), 'previously null column updated');\n\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'TRUNCATE TABLE %s.`test_Languages3`',\n $workspace['connection']['schema']\n ));\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'ALTER TABLE %s.`test_Languages3` ADD COLUMN `new_col` string(10)',\n $workspace['connection']['schema']\n ));\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'INSERT INTO %s.`test_Languages3` VALUES (1, \\'cz\\', \\'1\\', NULL), (3, \\'sk\\', \\'1\\', \\'newValue\\');',\n $workspace['connection']['schema']\n ));\n\n $this->expectException(ClientException::class);\n $this->expectExceptionMessage('During the import of typed tables new columns can\\'t be added. Extra columns found: \"new_col\".');\n $this->_client->writeTableAsyncDirect($table['id'], [\n 'dataWorkspaceId' => $workspace['id'],\n 'dataTableName' => 'test_Languages3',\n 'incremental' => true,\n ]);\n\n// $expected = [\n// '\"Id\",\"Name\",\"update\",\"new_col\"',\n// '\"1\",\"cz\",\"1\",\"\"',\n// '\"2\",\"en\",\"\",\"\"',\n// '\"3\",\"sk\",\"1\",\"newValue\"',\n// ];\n// $this->assertLinesEqualsSorted(implode(\"\\n\", $expected) . \"\\n\", $this->_client->getTableDataPreview($table['id'], [\n// 'format' => 'rfc',\n// ]), 'new column added');\n }", "title": "" }, { "docid": "a4f3452f324ff2c6216d9408d3590404", "score": "0.45906338", "text": "public function test_elis_createorupdate_updates_student_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/student.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Create the test student enrolment.\n $student = new student(array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n ));\n $student->save();\n\n // Run the student enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->completetime = 'Jan/02/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(student::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\n )));\n }", "title": "" }, { "docid": "2aff6640dd23e8bdbb0a674df55cdd77", "score": "0.45879143", "text": "public function test_version1importmapsfieldsonuserupdate() {\n global $CFG, $DB;\n $CFG->allowuserthemes = true;\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'auth' => 'mnet',\n 'maildigest' => 2,\n 'autosubscribe' => 'yes',\n 'trackforums' => 'yes',\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n\n $this->run_core_user_import($data, false);\n\n foreach ($data as $key => $val) {\n if (in_array((string)$val, array('no', 'yes'))) {\n $data[$key] = ((string)$val == 'yes') ? 1: 0;\n }\n }\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n institution = :institution AND\n department = :department\";\n\n $exists = $DB->record_exists_select('user', $select, $data);\n $this->assertEquals($exists, true);\n }", "title": "" }, { "docid": "f46617ef52f0c31bfd99609723ac8c0d", "score": "0.45829374", "text": "public function testPredefinedProfilesGetById()\n {\n }", "title": "" }, { "docid": "b47c631c8be17e925ad15b38e6124449", "score": "0.45806578", "text": "public function test_version1importsetsfieldsonuserupdate() {\n global $CFG, $DB;\n $CFG->allowuserthemes = true;\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'auth' => 'mnet',\n 'maildigest' => 2,\n 'autosubscribe' => 1,\n 'trackforums' => 1,\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n\n $this->run_core_user_import($data, false);\n\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n institution = :institution AND\n department = :department\";\n\n $exists = $DB->record_exists_select('user', $select, $data);\n\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "137df0c73beda95b82f05b8b9528820c", "score": "0.45683837", "text": "private function loadProfiles() {\n switch(D3P_STORAGE) {\n\t case 'file':\n\t $this->loadProfilesFromFile();\n\t break;\n }\n\t}", "title": "" }, { "docid": "e0e60299e6aaa3c794aa1eb23349016d", "score": "0.45519567", "text": "public function test_version1importnewuseremail() {\n global $CFG; // This is needed by the required files.\n require_once(dirname(__FILE__).'/other/rlip_importplugin_version1_fakeemail.php');\n $importplugin = new rlip_importplugin_version1_fakeemail();\n\n $testuser = new stdClass;\n $testuser->username = 'testusername';\n $testuser->idnumber = 'testidnumber';\n $testuser->firstname = 'testfirstname';\n $testuser->lastname = 'testlastname';\n $testuser->email = 'testemail@example.com';\n\n // Test false return when not enabled.\n set_config('newuseremailenabled', '0', 'rlipimport_version1');\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\n set_config('newuseremailtemplate', 'Test Body', 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertFalse($result);\n\n // Test false return when enabled but empty template.\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\n set_config('newuseremailtemplate', '', 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertFalse($result);\n\n // Test false return when enabled and has template, but user has empty email.\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\n set_config('newuseremailtemplate', 'Test Body', 'rlipimport_version1');\n $testuser->email = '';\n $result = $importplugin->newuseremail($testuser);\n $this->assertFalse($result);\n $testuser->email = 'test@example.com';\n\n // Test success when enabled, has template text, and user has email.\n $testsubject = 'Test Subject';\n $testbody = 'Test Body';\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertNotEmpty($result);\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('user', $result);\n $this->assertEquals($testuser, $result['user']);\n $this->assertArrayHasKey('subject', $result);\n $this->assertEquals($testsubject, $result['subject']);\n $this->assertArrayHasKey('body', $result);\n $this->assertEquals($testbody, $result['body']);\n\n // Test that subject is replaced by empty string when not present.\n $testsubject = null;\n $testbody = 'Test Body';\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertNotEmpty($result);\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('user', $result);\n $this->assertEquals($testuser, $result['user']);\n $this->assertArrayHasKey('subject', $result);\n $this->assertEquals('', $result['subject']);\n $this->assertArrayHasKey('body', $result);\n $this->assertEquals($testbody, $result['body']);\n\n // Full testing of replacement is done below, but just test that it's being done at all from the main function.\n $testsubject = 'Test Subject';\n $testbody = 'Test Body %%username%%';\n $expectedtestbody = 'Test Body '.$testuser->username;\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertNotEmpty($result);\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('user', $result);\n $this->assertEquals($testuser, $result['user']);\n $this->assertArrayHasKey('subject', $result);\n $this->assertEquals($testsubject, $result['subject']);\n $this->assertArrayHasKey('body', $result);\n $this->assertEquals($expectedtestbody, $result['body']);\n }", "title": "" }, { "docid": "83354809f4786af25eb5c7fe012719eb", "score": "0.4538639", "text": "public function test_elis_createorupdate_updates_user() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Run the user create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->username = 'testuserusername';\n $record->email = 'test@useremail.com';\n $record->idnumber = 'testuseridnumber';\n $record->firstname = 'updatedtestuserfirstname';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('user', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(user::TABLE, array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'updatedtestuserfirstname'\n )));\n }", "title": "" }, { "docid": "5f0100dac0d276cfde06e7aafa64f11c", "score": "0.45373005", "text": "public function testVariant6() {\n\n /* Setup\n ---------------------------------------------*/\n DbEntityHelper::setCon(self::$propelCon);\n\n list(\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\n ) = DbEntityHelper::setUpBonusMembers(true, [\n 'OL' => false,\n 'PM' => false,\n 'VS2' => false,\n ]);\n\n $new = DbEntityHelper::createSignupMember($VS1);\n\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\n $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS)\n + Transaction::getAmountForReason(Transaction::REASON_OL_BONUS)\n + Transaction::getAmountForReason(Transaction::REASON_PM_BONUS)\n + Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n // $trfOL += 1;\n // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\n\n $this->assertTransferTotal($trfIT, $IT);\n $this->assertTransferTotal($trfVL, $VL);\n // $this->assertTransferTotal($trfOL, $OL);\n // $this->assertTransferTotal($trfPM, $PM);\n // $this->assertTransferTotal($trfVS2, $VS2);\n $this->assertTransferTotal($trfVS1, $VS1);\n\n }", "title": "" }, { "docid": "1fd32c9c77a38f59d5c35f178ad44bc5", "score": "0.4532058", "text": "public function test_version1importsyncsusertoelisonupdate() {\n global $CFG, $DB;\n\n if (!$DB->record_exists('block', array('name' => 'curr_admin'))) {\n $this->markTestIncomplete('This test depends on the PM system');\n }\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once($CFG->dirroot.'/user/profile/definelib.php');\n require_once(elis::lib('data/customfield.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n\n // Make sure we are not auto-assigning idnumbers.\n set_config('auto_assign_user_idnumber', 0, 'elis_program');\n elis::$config = new elis_config();\n\n // Create Moodle custom field category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Create Moodle custom profile field.\n $this->create_profile_field('rliptext', 'text', $category->id);\n\n // Obtain the PM user context level.\n $contextlevel = CONTEXT_ELIS_USER;\n\n // Make sure the PM category and field exist.\n $category = new field_category(array('name' => 'rlipcategory'));\n\n $field = new field(array(\n 'shortname' => 'rliptext',\n 'name' => 'rliptext',\n 'datatype' => 'text',\n 'multivalued' => 0\n ));\n $field = field::ensure_field_exists_for_context_level($field, $contextlevel, $category);\n\n // Make sure the field owner is setup.\n field_owner::ensure_field_owner_exists($field, 'manual');\n $ownerid = $DB->get_field('elis_field_owner', 'id', array('fieldid' => $field->id, 'plugin' => 'manual'));\n $owner = new field_owner($ownerid);\n $owner->param_control = 'text';\n $owner->save();\n\n // Make sure the field is set up for synchronization.\n field_owner::ensure_field_owner_exists($field, 'moodle_profile');\n $ownerid = $DB->get_field('elis_field_owner', 'id', array('fieldid' => $field->id, 'plugin' => 'moodle_profile'));\n $owner = new field_owner($ownerid);\n $owner->exclude = pm_moodle_profile::sync_from_moodle;\n $owner->save();\n\n // Update the user class's static cache of define user custom fields.\n $tempuser = new user();\n $tempuser->reset_custom_field_list();\n\n // Create the user.\n $this->run_core_user_import(array(\n 'idnumber' => 'rlipidnumber',\n 'profile_field_rliptext' => 'rliptext'\n ));\n\n // Make sure PM user was created correctly.\n $this->assert_record_exists(user::TABLE, array(\n 'username' => 'rlipusername',\n 'idnumber' => 'rlipidnumber'\n ));\n\n // Run the import, updating the user.\n $this->run_core_user_import(array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rliptext' => 'rliptextupdated'\n ));\n\n // Make sure the PM custom field data was set.\n $sql = \"SELECT 'x'\n FROM {\".field::TABLE.\"} f\n JOIN {\".field_data_text::TABLE.\"} d ON f.id = d.fieldid\n WHERE f.shortname = ? AND d.data = ?\";\n $params = array('rliptext', 'rliptextupdated');\n $exists = $DB->record_exists_sql($sql, $params);\n $this->assertEquals($exists, true);\n }", "title": "" }, { "docid": "4832cbeb00d7e4780961b5bf2dd64c10", "score": "0.45289883", "text": "public function testPreference() {\r\n\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test1\",\r\n \"quantity\" => 1,\r\n \"currency_id\" => \"ARS\",\r\n \"unit_price\" => 10.2\r\n )\r\n )\r\n );\r\n\r\n // CREATE\r\n $preference = $this->mp->create_preference($preference_data);\r\n\r\n $this->assertTrue($preference[\"status\"] == 201);\r\n $this->assertTrue($preference[\"response\"][\"items\"][0][\"title\"] == \"test1\"\r\n && (int) $preference[\"response\"][\"items\"][0][\"quantity\"] == 1\r\n && (double) $preference[\"response\"][\"items\"][0][\"unit_price\"] == 10.2\r\n && $preference[\"response\"][\"items\"][0][\"currency_id\"] == \"ARS\");\r\n\r\n // GET\r\n $preference = $this->mp->get_preference($preference[\"response\"][\"id\"]);\r\n\r\n $this->assertTrue($preference[\"status\"] == 200);\r\n\r\n // UPDATE\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test2Modified\",\r\n \"quantity\" => 2,\r\n \"currency_id\" => \"USD\",\r\n \"unit_price\" => 100\r\n )\r\n )\r\n );\r\n\r\n $preferenceUpdatedResult = $this->mp->update_preference($preference[\"response\"][\"id\"], $preference_data);\r\n\r\n $this->assertTrue($preferenceUpdatedResult[\"status\"] == 200);\r\n\r\n $preferenceUpdatedResult = $this->mp->get_preference($preference[\"response\"][\"id\"]);\r\n\r\n $this->assertTrue((double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"unit_price\"] == 100\r\n && (double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"quantity\"] == 2\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"title\"] == \"test2Modified\"\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"currency_id\"] == \"USD\");\r\n }", "title": "" }, { "docid": "3613c21c3ec2f01bc3bd3bb085599953", "score": "0.45278534", "text": "public function test_elis_createorupdate_creates_instructor_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Run the instructor enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->role = 'instructor';\n $record->completetime = 'Jan/01/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n )));\n }", "title": "" }, { "docid": "ebf1a0658bfd314cfb51c31ac5335c76", "score": "0.45243627", "text": "public static function updateExtendedPropertiesUrl($upsert)\n\t{\n\t\t$url = \"/api/commerce/carts/current/extendedproperties?upsert={upsert}\";\n\t\t$mozuUrl = new MozuUrl($url, UrlLocation::TENANT_POD,\"PUT\", false) ;\n\t\t$url = $mozuUrl->formatUrl(\"upsert\", $upsert);\n\t\treturn $mozuUrl;\n\t}", "title": "" }, { "docid": "6f44c87fd57ee51e38ebd73afa380423", "score": "0.4512327", "text": "public function testUpdateUserProperties()\n {\n\n }", "title": "" }, { "docid": "f2ae1ba0746da0632421f8638d84a5ad", "score": "0.4489874", "text": "public function test_user_update_profile_success()\n {\n $body = [\n \"name\" => \"Top\",\n \"gender\" => 1,\n \"dob\" => \"1995-02-22\",\n 'phone' => '0123456781',\n 'address' => 'Da Nang',\n ];\n $response = $this->json('PUT', '/api/profile', $body);\n $response->assertStatus(200)\n ->assertJsonFragment($body)\n ->assertJsonStructure($this->json_structure_user_update_profile_success());\n $this->assertDatabaseHas('users', $body);\n }", "title": "" }, { "docid": "685d4a09b040186bf1c1c89e0bcaaee8", "score": "0.44851044", "text": "public function testPredefinedProfilesWritePermissionsById()\n {\n }", "title": "" }, { "docid": "a64833be2c3eefc4215e5f1a98e42286", "score": "0.44726658", "text": "public function testUpsertApp()\n {\n $isnogudApp = new \\stdClass;\n $isnogudApp->id = 'isnogud';\n $isnogudApp->name = new \\stdClass;\n $isnogudApp->name->en = 'I don\\'t exist';\n $isnogudApp->showInMenu = true;\n\n $client = static::createRestClient();\n $client->put('/core/app/isnogud', $isnogudApp);\n\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "f1a35e3df7217960156c5f7e2b2ca073", "score": "0.4460079", "text": "public function test_version1importusesuserfieldmappings() {\n global $CFG, $DB;\n $file = get_plugin_directory('rlipimport', 'version1').'/lib.php';\n require_once($file);\n $CFG->allowuserthemes = true;\n\n // Set up our mapping of standard field names to custom field names.\n $mapping = array(\n 'action' => 'action1',\n 'username' => 'username1',\n 'auth' => 'auth1',\n 'password' => 'password1',\n 'firstname' => 'firstname1',\n 'lastname' => 'lastname1',\n 'email' => 'email1',\n 'maildigest' => 'maildigest1',\n 'autosubscribe' => 'autosubscribe1',\n 'trackforums' => 'trackforums1',\n 'city' => 'city1',\n 'country' => 'country1',\n 'timezone' => 'timezone1',\n 'theme' => 'theme1',\n 'lang' => 'lang1',\n 'description' => 'description1',\n 'idnumber' => 'idnumber1',\n 'institution' => 'institution1',\n 'department' => 'department1'\n );\n\n // Store the mapping records in the database.\n foreach ($mapping as $standardfieldname => $customfieldname) {\n $record = new stdClass;\n $record->entitytype = 'user';\n $record->standardfieldname = $standardfieldname;\n $record->customfieldname = $customfieldname;\n $DB->insert_record(RLIPIMPORT_VERSION1_MAPPING_TABLE, $record);\n }\n\n // Run the import.\n $data = array(\n 'entity' => 'user',\n 'action1' => 'create',\n 'username1' => 'rlipusername',\n 'auth1' => 'mnet',\n 'password1' => 'Rlippassword!0',\n 'firstname1' => 'rlipfirstname',\n 'lastname1' => 'rliplastname',\n 'email1' => 'rlipuser@rlipdomain.com',\n 'maildigest1' => '2',\n 'autosubscribe1' => '1',\n 'trackforums1' => '1',\n 'city1' => 'rlipcity',\n 'country1' => 'CA',\n 'timezone1' => -5.0,\n 'theme1' => 'standard',\n 'lang1' => 'en',\n 'description1' => 'rlipdescription',\n 'idnumber1' => 'rlipidnumber',\n 'institution1' => 'rlipinstitution',\n 'department1' => 'rlipdepartment'\n );\n $this->run_core_user_import($data, false);\n\n // Validate user record.\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n firstname = :firstname AND\n lastname = :lastname AND\n email = :email AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n city = :city AND\n country = :country AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n idnumber = :idnumber AND\n institution = :institution AND\n department = :department\";\n $params = array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'auth' => 'mnet',\n 'firstname' => 'rlipfirstname',\n 'lastname' => 'rliplastname',\n 'email' => 'rlipuser@rlipdomain.com',\n 'maildigest' => 2,\n 'autosubscribe' => 1,\n 'trackforums' => 1,\n 'city' => 'rlipcity',\n 'country' => 'CA',\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'idnumber' => 'rlipidnumber',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n $exists = $DB->record_exists_select('user', $select, $params);\n $this->assertTrue($exists);\n\n // Validate password.\n $userrec = $DB->get_record('user', array('username' => $data['username1']));\n $this->assertTrue(validate_internal_user_password($userrec, $data['password1']));\n }", "title": "" }, { "docid": "a118f277b761f64aa11127310e5d5cb6", "score": "0.44599783", "text": "function updateRun (&$db, &$u, &$arg, &$t ) {\n\t//\t$this->presentor = \"debug\"; return;\n\t\t$user = lcUser::getUserByPkey($arg->getvars[1]);\n\t\t$user->groups = $arg->postvars[group_opt];\n\t\t$user->email = $arg->postvars[email];\n\t\tif ( $arg->postvars[password] != \"\") {\n\t\t\t$user->password = $arg->postvars[password];\n\t\t}\n\n\t\t$user->update();\n\n\t\t\t// PROFILE\n\t\t$user = lcUser::getUserByPkey($arg->getvars[1]);\n\t\t$user->updateProfile($arg->postvars[profile]);\n\n\theader(\"Location: \". _APP_URL.\"users\");\n\texit();\n\t}", "title": "" }, { "docid": "f64f5f61c0f2dbcbb9c4badfefc383c0", "score": "0.44530833", "text": "function setUp() : void {\n parent::setUp();\n $password = \"abc123\";\n $this->VALID_PROFILE_SALT = bin2hex(random_bytes(16));\n $this->VALID_PROFILE_HASH = hash_pbkdf2(\"sha512\", $password, $this->VALID_PROFILE_SALT, 262144);\n\n\n // create and insert a Profile to own the test Article\n $this->profile = new Profile (generateUuidV4(), null,\"name\", \"test@phpunit.de\",$this->VALID_PROFILE_HASH, \"+12125551212\", $this->VALID_PROFILE_SALT);\n $this->profile->insert($this->getPDO());\n\n // calculate the date (just use the time the unit test was setup...)\n $this->VALID_ARTICLEDATE = new \\DateTime();\n\n //format the sunrise date to use for testing\n $this->VALID_SUNRISEDATE = new \\DateTime();\n $this->VALID_SUNRISEDATE->sub(new \\DateInterval(\"P10D\"));\n\n //format the sunset date to use for testing\n $this->VALID_SUNSETDATE = new\\DateTime();\n $this->VALID_SUNSETDATE->add(new \\DateInterval(\"P10D\"));\n}", "title": "" }, { "docid": "d98ebb940a64a09431604c07cbe834dc", "score": "0.44510087", "text": "public function run(){\n\t\t$profiles = array(\n\t\t\tarray('user_id' => '1', 'gender' => 'Male', 'mobile' => '01914433307', 'present_address' => '', 'permanent_address' => '', 'created_at' => new DateTime(), 'updated_at' => new DateTime())\n\t\t);\n\n\t\tDB::table('profiles')->insert($profiles);\n\t}", "title": "" }, { "docid": "86935bd182996c9d9bddd0d60276e44f", "score": "0.44480315", "text": "public function testUpsertRowsetJson()\n {\n $values =\n '[\n {\n \"keys\":{\n \"primaryKey\": \"1\"\n },\n \"values\":{\n \"emailAddress\": \"newemail@email.com\"\n }\n },\n {\n \"keys\": {\n \"primaryKey\": \"2\"\n },\n \"values\":{\n \"emailAddress\": \"newemail2@email.com\"\n }\n }\n ]';\n\n $test = $this->api->upsertRowset($values, 'ETApiTest');\n $this->assertTrue(is_array($test));\n }", "title": "" }, { "docid": "a5e241048d48c74264421cf26a680d38", "score": "0.44450638", "text": "function TransferProfiles()\n {\n $moduleaccesses=array();\n foreach (array_keys($this->ModuleDependencies) as $module)\n {\n $access=$this->ReadPHPArray($this->MyMod_Setup_Profiles_File($module));\n\n $access=$access[ \"Access\" ];\n\n $moduleaccesses[ $module ]=array();\n foreach ($this->GetListOfProfiles() as $profile)\n {\n $moduleaccesses[ $module ][ $profile ]=$access[ $profile ];\n }\n }\n\n if (isset($this->DBHash[ \"Mod\" ]) && $this->DBHash[ \"Mod\" ])\n {\n $file=$this->MyMod_Setup_Profiles_File();\n $this->WritePHPArray($file,$moduleaccesses);\n\n print $this->H(4,\"System Accesses written to \".$file);\n }\n }", "title": "" }, { "docid": "c71b3bcbd65b251ceba3f97986e84de8", "score": "0.44346404", "text": "public function test_version1importpreventsinvaliduserlangoncreate() {\n $this->run_core_user_import(array('lang' => '12'));\n $this->assert_core_user_does_not_exist();\n }", "title": "" }, { "docid": "7c8af984f8599522e2212b2292e07415", "score": "0.44317287", "text": "function profile(string $avatarSrc, int $userId, string $userName, string $emailAddress, array $languages): void\n{\n try\n {\n $isValid = $userName == \"\" || isValidUsername($userName, $userId);\n $isValid = $emailAddress == \"\" || isValidEmailAddress($emailAddress, $userId) && $isValid;\n $isValid = isValidLanguages($languages) && $isValid;\n\n if ($isValid)\n {\n $hasEmailChanged = $emailAddress != \"\" && !isExistingEmailAddress($emailAddress);\n $hasUserNameChanged = $userName != \"\" && !isExistingUsername($userName);\n\n updateUser($userId, $userName, $emailAddress);\n updateAvatar($userId, $avatarSrc);\n updateLanguages($userId, $languages);\n $_SESSION['avatarSrc'] = $avatarSrc;\n\n if ($hasUserNameChanged)\n {\n $_SESSION[\"username\"] = $userName;\n }\n\n if ($hasEmailChanged)\n {\n $_SESSION[\"emailUser\"] = $emailAddress;\n \n $isSent = sendConfirmationEmail($emailAddress);\n\n if ($isSent)\n {\n \n header(\"Location: /homePage.php\" . createSuccessAlert(\"Les modifications ont bien été prises en compte. Un mail de confirmation d'adresse mail vous a été envoyé.\"));\n }\n else\n {\n createFailureAlert(\"Les modifications ont bien été prises en compte. Le mail de réinitialisation n'a pas pu être envoyé.\");\n }\n }\n\n header(\"Location: /homePage.php\" . createSuccessAlert(\"Les modifications ont bien été prises en compte.\"));\n }\n }\n catch (Exception $e)\n {\n echo \"Une erreur est survenue : \", $e->getMessage(), \"\\n\";\n }\n}", "title": "" }, { "docid": "27c410a051955a922abb311fd39ffb03", "score": "0.44262105", "text": "public function p_plowersignup() {\n\n $q = \"SELECT email\n FROM users \n WHERE email = '\" . $_POST['email'] . \"'\";\n\n $email_dupe = DB::instance(DB_NAME)->select_field($q);\n \n #If it does produce an error \n\n if($email_dupe){\n \n Router::redirect('/users/plowersignup/email_dupe');\n \n } \n\n #Otherwise proceed with sign up\n \n else {\n\n # Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n # Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # Insert this user into the database\n $user = DB::instance(DB_NAME)->insert('users', $_POST);\n\n Router::redirect(\"/users/login/\");\n }\n }", "title": "" }, { "docid": "6ff9f09cfaa18fcb3506e3b9ff3fc222", "score": "0.44260266", "text": "static public function uu( object $pp1, array $other=[]): string // *************** u u (\n {\n $AdminId = (int)$pp1->uriq->id ; //$AdminId = $_SESSION[\"userid\"];\n\n // 1. S U B M I T E D F L D V A L S - P R E U P D A T E\n list($AName, $AHeadline, $ABio, $Image, $Target) = self::get_submitted_uu() ;\n\n // 2. U U V A L I D A T I O N\n $err = '' ;\n switch (true) {\n //case (empty($PostTitle)): $err = \"Title Cant be empty\"; break ;\n case (strlen($AHeadline)>30): $err = \"Headline Should be max 30 characters\"; break ;\n case (strlen($ABio)>500): $err = \"Bio should be max 500 characters\"; break ;\n //default: break;\n }\n if ($err > '') {\n $_SESSION[\"ErrorMessage\"]= $err ;\n Config_allsites::Redirect_to($pp1->upd_user_loggedin);\n goto fnerr ; //exit(0) ;\n }\n\n // 3. U P D A T E D B T B L R O W\n // Query to Update u s e r in DB When everything is fine\n $flds = \"SET aname=:AName, aheadline=:AHeadline, abio=:ABio\" ;\n $qrywhere = \"WHERE id=:AdminId\" ;\n $binds = [\n ['placeh'=>':AName', 'valph'=>$AName, 'tip'=>'str']\n ,['placeh'=>':AHeadline', 'valph'=>$AHeadline, 'tip'=>'str']\n ,['placeh'=>':ABio', 'valph'=>$ABio, 'tip'=>'str']\n ,['placeh'=>':AdminId', 'valph'=>$AdminId, 'tip'=>'int']\n ] ;\n if (!empty($_FILES[\"Image\"][\"name\"])) {\n $flds .= \", aimage=:Image\" ;\n $binds[] = ['placeh'=>':Image', 'valph'=>$Image, 'tip'=>'str'] ;\n }\n\n $cursor = Db_allsites::uu(self::$tbl, $flds, $qrywhere, $binds\n //, $other=['caller' => __FILE__ .' '.', ln '. __LINE__]\n );\n\n if($cursor){ $_SESSION[\"SuccessMessage\"]=\"U s e r Updated Successfully\";\n }else {$_SESSION[\"ErrorMessage\"]= \"U s e r NOT Updated. Try Again !\";}\n\n // 4. U P L O A D I M A G E\n move_uploaded_file($_FILES[\"Image\"][\"tmp_name\"], $Target);\n\n return('1');\n fnerr:\n return('0');\n\n }", "title": "" }, { "docid": "594337a505474ae685da56e223f18fc5", "score": "0.44197235", "text": "public function test_batchUpsertCatalogObjects() {\n $batches = [];\n\n $numObjects = 0;\n // TODO s/$batchNum < 1/$batchNum < 3/\n for ($batchNum = 0; $batchNum < 1; $batchNum++) {\n $batch = [];\n\n for($i = 0; $i < 100; $i++) {\n $itemId = sprintf(\"Item-%d-%d\", $batchNum, $i);\n\n $variationId = sprintf(\"#ItemVariation-%d-%d\", $batchNum, $i);\n array_push($batch, new \\SquareConnect\\Model\\CatalogObject([\n \"type\" => \"ITEM\",\n \"id\" => \"#\" . $itemId,\n \"item_data\" => [\n \"name\" => $itemId,\n \"variations\" => [\n [\n \"type\" => \"ITEM_VARIATION\",\n \"id\" => $variationId,\n \"item_variation_data\" => [\n \"name\" => \"Regular\",\n \"item_id\" => \"#\" . $itemId,\n \"pricing_type\" => \"VARIABLE_PRICING\"\n ]\n ]\n ]\n ]\n ]));\n $numObjects++;\n }\n array_push($batches, [\"objects\" => $batch]);\n }\n\n $request = new \\SquareConnect\\Model\\BatchUpsertCatalogObjectsRequest([\n \"idempotency_key\" => uniqid(),\n \"batches\" => $batches\n ]);\n $response = self::$api->batchUpsertCatalogObjects($request);\n\n $this->assertCount($numObjects, $response->getObjects());\n }", "title": "" }, { "docid": "23d299e1fe973f0c6f146431c89a0592", "score": "0.44193205", "text": "function updateFromPack($lang=NULL)\r\n\t{\r\n\t\tglobal $db;\r\n\t\tif(!$lang)\r\n\t\t\t$lang = $this->lang;\r\n\t\t$file = BASEDIR.'/includes/langs/'.$lang.'.lang';\r\n\t\tif(file_exists($file))\r\n\t\t{\r\n\t\t\t$langData = file_get_contents($file);\r\n\t\t\t$phrases = json_decode($langData,true);\r\n\t\t\t//First lets delete all language phrases\r\n\t\t\t$db->delete(tbl(\"phrases\"),array(\"lang_iso\"),array($lang));\r\n\t\t\t//Now create query and then execute it\r\n\t\t\t$query = \"INSERT INTO \".tbl(\"phrases\").\"\r\n\t\t\t(`lang_iso` ,`varname` ,`text`)\r\n\t\t\tVALUES\";\r\n\t\t\t\r\n\t\t\t$count = 0;\r\n\t\t\tforeach($phrases as $key => $phrase)\r\n\t\t\t{\r\n\t\t\t\tif($count>0)\r\n\t\t\t\t\t$query .= \",\";\r\n\t\t\t\t$query .= \"('$lang', '$key', '\".addslashes($phrase).\"')\";\r\n\t\t\t\t$count++;\r\n\t\t\t}\r\n\t\t\t$query .= \";\";\r\n\t\t\t\r\n\t\t\t$db->Execute($query);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9a929d406911271480f8942d4920d259", "score": "0.4414494", "text": "public function testVariant11() {\n\n /* Setup\n ---------------------------------------------*/\n DbEntityHelper::setCon(self::$propelCon);\n\n list(\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\n ) = DbEntityHelper::setUpBonusMembers(true, [\n ]);\n\n $new = DbEntityHelper::createSignupMember($VL);\n\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\n $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_OL_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);\n // $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS);\n // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\n\n $this->assertTransferTotal($trfIT, $IT);\n $this->assertTransferTotal($trfVL, $VL);\n $this->assertTransferTotal($trfOL, $OL);\n $this->assertTransferTotal($trfPM, $PM);\n $this->assertTransferTotal($trfVS2, $VS2);\n $this->assertTransferTotal($trfVS1, $VS1);\n\n }", "title": "" }, { "docid": "a1af99d81a2120cde152226541fd1ccd", "score": "0.44045475", "text": "public function test_elis_createorupdate_creates_student_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/student.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Run the student enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->completetime = 'Jan/01/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(student::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n )));\n }", "title": "" }, { "docid": "88de5e7ccb8c68395fb627cc1c153ad8", "score": "0.43985716", "text": "function test_update_existing() {\n\t}", "title": "" }, { "docid": "9452069cb95852616082ca1e85a7ee25", "score": "0.4386919", "text": "public function test_modifyingmoodleuserupdatespmuser() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/admin/tool/uploaduser/locallib.php');\n $this->load_csv_data();\n\n // Update a record.\n $src = new stdClass;\n $src->id = 100;\n $src->firstname = 'Testuser';\n $src->lastname = 'One';\n $src->profile_field_sometext = 'boo';\n $src->profile_field_sometextfrompm = 'bla';\n $DB->update_record('user', $src);\n $mdluser = $DB->get_record('user', array('id' => 100));\n $mcopy = clone($src);\n $mcopy = uu_pre_process_custom_profile_data($mcopy);\n profile_save_data($mcopy);\n events_trigger('user_updated', $mdluser);\n\n // Read the PM user and compare.\n $retr = new user(103, null, array(), false, array());\n $retr->reset_custom_field_list();\n $this->assertEquals($mdluser->firstname, $retr->firstname);\n $this->assertEquals($mdluser->lastname, $retr->lastname);\n\n // Check custom fields.\n $result = new PHPUnit_Extensions_Database_DataSet_DefaultDataSet();\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_int::TABLE,\n $DB->get_recordset(field_data_int::TABLE, null, '', 'contextid, fieldid, data')));\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_char::TABLE,\n $DB->get_recordset(field_data_char::TABLE, null, '', 'contextid, fieldid, data')));\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_text::TABLE,\n $DB->get_recordset(field_data_text::TABLE, null, '', 'contextid, fieldid, data')));\n $usercontext = \\local_elisprogram\\context\\user::instance(103);\n $dataset = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();\n $dataset->addTable(field_data_int::TABLE, elispm::file('tests/fixtures/user_field_data_int.csv'));\n $dataset->addTable(field_data_char::TABLE, elispm::file('tests/fixtures/user_field_data_char.csv'));\n $dataset->addTable(field_data_text::TABLE, elispm::file('tests/fixtures/user_field_data_text.csv'));\n $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);\n $dataset->addFullReplacement('##USERCTXID##', $usercontext->id);\n $dataset->addFullReplacement('##USERCTXLVL##', CONTEXT_ELIS_USER);\n // Only the first text field should be changed; everything else should be the same.\n $dataset->addFullReplacement('First text entry field', $src->profile_field_sometext);\n $ret = $dataset->addFullReplacement('Second text entry field', $src->profile_field_sometextfrompm);\n\n $this->assertDataSetsEqual($dataset, $result);\n }", "title": "" }, { "docid": "bca8378fd3bc823b94606a7653607692", "score": "0.43822274", "text": "public function test_version1importupdatesbasedonidentifyingfields() {\n global $CFG;\n\n // Set up our data.\n $this->run_core_user_import(array('idnumber' => 'rlipidnumber'));\n\n // Update based on username.\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'firstname' => 'setfromusername'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on email.\n $data = array(\n 'action' => 'update',\n 'email' => 'rlipuser@rlipdomain.com',\n 'firstname' => 'setfromemail'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on idnumber.\n $data = array(\n 'action' => 'update',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'setfromidnumber'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on username, email.\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'email' => 'rlipuser@rlipdomain.com',\n 'firstname' => 'setfromusernameemail'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on username, idnumber.\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'setfromusernameidnumber'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on email, idnumber.\n $data = array(\n 'action' => 'update',\n 'email' => 'rlipuser@rlipdomain.com',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'setfromemailidnumber'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n }", "title": "" }, { "docid": "185f57ee28911c58a94861efc658a6e9", "score": "0.4378387", "text": "public function test_elis_createorupdate_creates_userset() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/userset.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Run the user set create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'cluster';\n $record->name = 'testusersetname';\n $record->display = 'testusersetdisplay';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(userset::TABLE, array(\n 'name' => 'testusersetname',\n 'display' => 'testusersetdisplay'\n )));\n }", "title": "" }, { "docid": "33f0aef79efc84864e1986cac3048acf", "score": "0.43720922", "text": "public function syncWithProfile($profileId)\n {\n $addressCollectionId = Mage::helper('marketingsoftware/config')->getAddressesCollectionId(); \n \n if ($addressCollectionId) { \n Mage::helper('marketingsoftware/rest_request')->put(\n '/profile/'.$profileId.'/subprofiles/'.$addressCollectionId, $this->_getSubprofileData(), array(\n 'fields[]' => 'address_id=='.$this->_addressEntity->getId(),\n 'create' => 'true'\n )\n );\n \n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f936c19ebfc5e644d50aefb4507d19e4", "score": "0.43571404", "text": "function test_overwrite() {\n $sub = new MockupSubscription();\n\n $sub->add(':', 'admin', 'digest', '123456789');\n $sub->add(':wiki:', 'admin', 'digest', '123456789');\n $sub->add(':', 'admin', 'digest', '1234');\n $sub->add(':wiki:', 'admin', 'digest', '1234');\n\n $subscriptions = $sub->subscribers(':wiki:', 'admin');\n\n $this->assertCount(1, $subscriptions[':'], 'More than one subscription saved for the root namespace even though the old one should have been overwritten.');\n $this->assertCount(1, $subscriptions[':wiki:'], 'More than one subscription saved for the wiki namespace even though the old one should have been overwritten.');\n $this->assertCount(2, $subscriptions, 'Didn\\'t find the expected two subscriptions');\n }", "title": "" }, { "docid": "dd0852c1f3faacd98b6e268b3dfd7973", "score": "0.43519944", "text": "protected function registerProfiles() {\n // Generate Variable Profiles \n\t\t \n\t \t//--- Boolean (Type 0)\n\t\t \n\t \t//--- Integer (Type 1)\n if ( !IPS_VariableProfileExists('RCTPOWER_Ampere') ) {\n IPS_CreateVariableProfile('RCTPOWER_Ampere', 1 );\n \tIPS_SetVariableProfileDigits('RCTPOWER_Ampere', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Ampere', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Ampere', \"\", \" A\" );\n }\n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_Voltage') ) {\n IPS_CreateVariableProfile('RCTPOWER_Voltage', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Voltage', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Voltage', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Voltage', \"\", \" V\" );\n } \n \n if ( !IPS_VariableProfileExists('RCTPOWER_Power') ) {\n IPS_CreateVariableProfile('RCTPOWER_Power', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Power', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Power', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Power', \"\", \" W\" );\n } \n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_Energy') ) {\n IPS_CreateVariableProfile('RCTPOWER_Energy', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Energy', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Energy', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Energy', \"\", \" Wh\" );\n } \n\t\t \n //--- Float (Type 2)\n if ( !IPS_VariableProfileExists('RCTPOWER_Capacity.2') ) {\n IPS_CreateVariableProfile('RCTPOWER_Capacity.2', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_Capacity.2', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_Capacity.2', 'Battery' );\n IPS_SetVariableProfileText('RCTPOWER_Capacity.2', \"\", \" kWh\" );\n }\n \n if ( !IPS_VariableProfileExists('RCTPOWER_SoC.1') ) {\n IPS_CreateVariableProfile('RCTPOWER_SoC.1', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_SoC.1', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_SoC.1', 'Battery' );\n IPS_SetVariableProfileText('RCTPOWER_SoC.1', \"\", \" %\" );\n }\n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_PVPower.2') ) {\n IPS_CreateVariableProfile('RCTPOWER_PVPower.2', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_PVPower.2', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_PVPower.2', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_PVPower.2', \"\", \" kWp\" );\n }\n\t\t \n\t \t\t//--- String (Type 3)\n\t\t \n }", "title": "" }, { "docid": "c965b3d986e82ecb4a2b2c67e28eb7a4", "score": "0.4342288", "text": "public function upgradeAuProperties() : void {\n $callback = function ($row) {\n $property = new AuProperty();\n $property->setParent($this->findEntity(AuProperty::class, $row['parent_id']));\n $property->setAu($this->findEntity(Au::class, $row['au_id']));\n $property->setPropertyKey($row['property_key']);\n $property->setPropertyValue($row['property_value']);\n\n return $property;\n };\n $this->upgradeTable('au_properties', $callback);\n }", "title": "" }, { "docid": "ef1b02fd41b7751f0264be731d4b7c14", "score": "0.43302292", "text": "public function testHeCanUpdateProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::factory()->create())\n ->visit('/user/profile')\n ->type('@name', 'Edited')\n ->type('@phone', '0606070708')\n ->type('@email', 'edited@test.fr')\n ->click('@submit')\n ->waitForText('Enregistré')\n ->refresh()\n ->assertInputValue('@name', 'Edited')\n ->assertInputValue('@phone', '0606070708')\n ->assertInputValue('@email', 'edited@test.fr');\n });\n }", "title": "" }, { "docid": "2be25cafecc0594016a39f953149df57", "score": "0.4326639", "text": "private function loadProfilesFromFile() {\n $this->profiles = json_decode(file_get_contents(D3P_DATAFILE));\n\t}", "title": "" }, { "docid": "f7a371ae83e1a5d8b0d05b7288982955", "score": "0.43233198", "text": "public function testPropertyPurposeInsertionInDb()\n {\n $this->seeInDatabase('property_purposes', ['purpose' =>'usa']);\n }", "title": "" }, { "docid": "8925936133b3b13e0a0375e569e2527c", "score": "0.43198892", "text": "public function testTranscripts()\n {\n }", "title": "" }, { "docid": "3fce8461adc071f4d24831d56ee98479", "score": "0.4315168", "text": "public function usersignup($email,$password ,$otp)\n {\n \t$users = new Users();\n \treturn $result = $users->usersignup($email, $password ,$otp);\n \n }", "title": "" }, { "docid": "ae47e6e7f805c07147cad372aac53c3c", "score": "0.43149284", "text": "function ups() {\n $this->code = 'ups';\n $this->version = '1.0';\n }", "title": "" }, { "docid": "e6dfd7d39ce65330aa489bd90e527026", "score": "0.4309657", "text": "function TransferModuleProfiles()\n {\n foreach (array_keys($this->ModuleDependencies) as $module)\n {\n $class=$this->ApplicationClass;\n\n $mhash=array\n (\n \"ReadOnly\" => $this->ReadOnly,\n \"DBHash\" => $this->DBHash,\n \"LoginType\" => $this->LoginType,\n \"LoginData\" => $this->LoginData,\n \"LoginID\" => $this->LoginID,\n \"AuthHash\" => $this->AuthHash,\n \"ModuleName\" => $module,\n \"SqlTable\" => $this->SqlTable,\n \"SqlTableVars\" => $this->SqlTableVars,\n \"DefaultAction\" => $this->DefaultAction,\n \"DefaultProfile\" => $this->DefaultProfile,\n \"Profile\" => $this->Profile,\n \"ModuleLevel\" => 1,\n \"CompanyHash\" => $this->CompanyHash,\n \"MailInfo\" => $this->ApplicationObj()->MyApp_Mail_Info_Get(),\n \"URL_CommonArgs\" => $this->URL_CommonArgs,\n \"MySqlActions\" => $this->MySqlActions,\n \"Handle\" => FALSE,\n );\n\n if (isset($this->Period))\n {\n $mhash[ \"Period\" ]=$this->Period;\n }\n\n $object=new $class ($mhash);\n $object->InitModule($module,array(),FALSE);\n\n $object->Module->TransferProfiles();\n }\n }", "title": "" }, { "docid": "c681f4b4b80b7086ebc4b165dde001a6", "score": "0.4301642", "text": "public function test_version1importsetsdefaultsonusercreate() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/core/lib/setup.php');\n\n set_config('forcetimezone', 99);\n\n // Make sure we are not auto-assigning idnumbers.\n set_config('auto_assign_user_idnumber', 0, 'elis_program');\n elis::$config = new elis_config();\n\n $this->run_core_user_import(array());\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n idnumber = :idnumber AND\n institution = :institution AND\n department = :department\";\n $params = array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'auth' => 'manual',\n 'maildigest' => 0,\n 'autosubscribe' => 1,\n 'trackforums' => 0,\n 'timezone' => 99,\n 'theme' => '',\n 'lang' => $CFG->lang,\n 'description' => '',\n 'idnumber' => '',\n 'institution' => '',\n 'department' => ''\n );\n\n $exists = $DB->record_exists_select('user', $select, $params);\n\n $this->assertEquals($exists, true);\n }", "title": "" }, { "docid": "8b4d51e3807f64419229c4e31c0e13d2", "score": "0.42880878", "text": "public function testBindersAddProfilesToBinder()\n {\n }", "title": "" }, { "docid": "55e1f2b192fd61d78d65d9645fef9ba4", "score": "0.4287313", "text": "protected function initializeUpdateProfileAction()\n {\n $propertyMappingConfiguration = $this->arguments['communityUser']->getPropertyMappingConfiguration();\n $uploadConfiguration = array(\n UploadedFileReferenceConverter::CONFIGURATION_ALLOWED_FILE_EXTENSIONS => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],\n UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER => '1:/userimages/',\n );\n $propertyMappingConfiguration->allowAllProperties();\n $propertyMappingConfiguration->forProperty('falImage')\n ->setTypeConverterOptions(\n 'Visol\\\\Easyvote\\\\Property\\\\TypeConverter\\\\UploadedFileReferenceConverter',\n $uploadConfiguration\n );\n $propertyMappingConfiguration->forProperty('birthdate')->setTypeConverterOption('TYPO3\\\\CMS\\\\Extbase\\\\Property\\\\TypeConverter\\\\DateTimeConverter', \\TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'd.m.Y');\n }", "title": "" }, { "docid": "af753cad1d5a8511cc5c0e971624bb9a", "score": "0.42807645", "text": "public function testSubscriptionIsAltered()\n {\n $this->testUser->subscription('main')->features()->create(['tag' => 'social_dog_profiles', 'name' => 'Social profiles available for your dog', 'value' => 2, 'sort_order' => 25]);\n $this->assertTrue($this->testUser->subscription('main')->isAltered());\n }", "title": "" }, { "docid": "3039c8fdafa2c80eaf2c6f60798cb24b", "score": "0.42790192", "text": "public function installProfile($profile, $languages) {\n if (!$this->hasRequirementsMet($profile)) {\n throw new ZiboException('Could not install profile ' . $profile . ': The requirements are not met.');\n }\n\n $client = ClientModule::getClient();\n if (!$client) {\n throw new ZiboException('Could not install profile ' . $profile . ': The repository client is not properly configured.');\n }\n\n // install the necessairy modules\n $profile = $this->getProfile($profile);\n $modules = $profile->getModules();\n\n foreach ($modules as $module) {\n $client->installModule($module->getNamespace(), $module->getName());\n }\n\n // install the extra languages\n foreach ($languages as $languageCode) {\n if ($languageCode == 'en') {\n continue;\n }\n\n $client->installModule('zibo', 'l10n.' . $languageCode);\n }\n\n $profile->install();\n }", "title": "" }, { "docid": "657da10a59c3695da200ef5c88a2b98f", "score": "0.4276525", "text": "public function saveProfile() {\n if($this->profile) {\n foreach($this->profile as $prop => $value){\n $questionValue = new ProfileQuestionValue(array(\n 'question' => $prop,\n 'userId' => $this->id,\n 'value' => $value\n ));\n\n $questionValue->save();\n }\n }\n }", "title": "" }, { "docid": "c4b5d828f024cfd04b62b2b11f2b8ae6", "score": "0.42693198", "text": "public function testPeppolPostParticipant()\n {\n }", "title": "" }, { "docid": "e4eab28ee4b40d67a3c0e17cfc876940", "score": "0.42669758", "text": "public function testGenericPut() {\r\n\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test2\",\r\n \"quantity\" => 1,\r\n \"currency_id\" => \"ARS\",\r\n \"unit_price\" => 20.55\r\n )\r\n )\r\n );\r\n\r\n $request = array(\r\n \"uri\" => \"/checkout/preferences\",\r\n \"data\" => $preference_data\r\n );\r\n\r\n $preference = $this->mp->post($request);\r\n\r\n // Start updating\r\n\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test2Modified\",\r\n \"quantity\" => 2,\r\n \"currency_id\" => \"USD\",\r\n \"unit_price\" => 100\r\n )\r\n )\r\n );\r\n\r\n $request = array(\r\n \"uri\" => \"/checkout/preferences/\".$preference[\"response\"][\"id\"],\r\n \"data\" => $preference_data\r\n );\r\n\r\n $preferenceUpdatedResult = $this->mp->put($request);\r\n\r\n $this->assertTrue($preferenceUpdatedResult[\"status\"] == 200);\r\n\r\n $preferenceUpdatedResult = $this->mp->get_preference($preference[\"response\"][\"id\"]);\r\n\r\n $this->assertTrue((double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"unit_price\"] == 100\r\n && (double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"quantity\"] == 2\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"title\"] == \"test2Modified\"\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"currency_id\"] == \"USD\");\r\n }", "title": "" }, { "docid": "cb4a774d5b2bd3015478b9e18977f64d", "score": "0.42598513", "text": "public function test_version1importsupportsuserupdate() {\n $supports = plugin_supports('rlipimport', 'version1', 'user_update');\n $requiredfields = array(array('user_username', 'user_email', 'user_idnumber', 'idnumber', 'username', 'email'));\n $this->assertEquals($supports, $requiredfields);\n }", "title": "" }, { "docid": "2c0acb297b2c186dd763e1ec916e2ff2", "score": "0.42533287", "text": "function copy()\n\t{\n\t\t$model =& $this->getModel('profiles');\n\t\tif($model->copy())\n\t\t{\n\t\t\t// Show a \"COPY OK\" message\n\t\t\t$message = JText::_('PROFILE_COPY_OK');\n\t\t\t$type = 'message';\n\t\t\t$this->_switchProfile( $model->getId() );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Show message on failure\n\t\t\t$message = JText::_('PROFILE_COPY_ERROR');\n\t\t\t$message .= ' ['.$model->getError().']';\n\t\t\t$type = 'error';\n\t\t}\n\t\t// Redirect\n\t\t$this->setRedirect('index.php?option='.JRequest::getCmd('option').'&view='.JRequest::getCmd('view'), $message, $type);\n\t}", "title": "" }, { "docid": "8068d22ce86b12c23de4be6f740648e8", "score": "0.4251271", "text": "private function userProfileUpdate(){\n }", "title": "" }, { "docid": "069d782dcf27c197bd0cb1b150982a69", "score": "0.4241197", "text": "public function testVariant10() {\n\n /* Setup\n ---------------------------------------------*/\n DbEntityHelper::setCon(self::$propelCon);\n\n list(\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\n ) = DbEntityHelper::setUpBonusMembers(true, [\n 'VL' => false,\n 'OL' => false,\n ]);\n\n $new = DbEntityHelper::createSignupMember($PM);\n\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\n // $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS);\n // $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS);\n $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\n\n $this->assertTransferTotal($trfIT, $IT);\n // $this->assertTransferTotal($trfVL, $VL);\n // $this->assertTransferTotal($trfOL, $OL);\n $this->assertTransferTotal($trfPM, $PM);\n $this->assertTransferTotal($trfVS2, $VS2);\n $this->assertTransferTotal($trfVS1, $VS1);\n\n }", "title": "" }, { "docid": "d614980646705447fe4d5bc0c7beaa75", "score": "0.4239977", "text": "public function __construct(UserProfile $oldProfile, UserProfile $newProfile)\n {\n $this->oldProfile = $oldProfile;\n $this->newProfile = $newProfile;\n $this->subject(\"Обновлен профиль с id: \".$oldProfile->id);\n }", "title": "" }, { "docid": "91d8d778c8a6537b9c1bfe161ffe5a9b", "score": "0.42397067", "text": "public function update(){\n\t\n\t\t$email = $this->auth->get_info()->email;\n\t\t\n\t\t$data = array(\n\t\t\t'address'=> $this->input->post('inputProfileAddress'),\n\t\t\t'description' => $this->input->post('inputProfileAbout'),\n\t\t\t'edu_history' => $this->input->post('inputProfileEducation'),\n\t\t\t'work_history' => $this->input->post('inputProfileWork'),\n\t\t\t'skills' => $this->input->post('inputSkills'),\n\t\t\t'interest_area' => $this->input->post('inputInterest'),\n\t\t\t'location_pref' => $this->input->post('inputLocation'),\n\t\t);\n\t\t$this -> resume_profile_model -> update($email,$data); \n\t\t$this -> index();\t\n\t}", "title": "" }, { "docid": "357a3497a4774de618d823137fc109b6", "score": "0.42364475", "text": "public function test_mapping_applied_during_instructor_enrolment_update() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n\n $this->init_mapping();\n\n $userid = $this->create_test_user();\n\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n $pmclass = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $pmclass->save();\n\n $instructor = new instructor(array('classid' => $pmclass->id, 'userid' => $userid));\n $instructor->save();\n\n // Run the instructor enrolment update action.\n $record = new stdClass;\n $record->customaction = 'update';\n $record->customcontext = 'class_testclassidnumber';\n $record->customuser_username = 'testuserusername';\n $record->customuser_email = 'test@useremail.com';\n $record->customuser_idnumber = 'testuseridnumber';\n $record->customassigntime = 'Jan/02/2012';\n $record->customcompletetime = 'Jan/02/2012';\n $record->customrole = 'instructor';\n\n $this->run_enrolment_import((array)$record);\n\n // Validation.\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\n 'classid' => $pmclass->id,\n 'userid' => $userid,\n 'assigntime' => rlip_timestamp(0, 0, 0, 1, 2, 2012),\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\n )));\n }", "title": "" }, { "docid": "e44829ae38b5dc30d42b36ce14b87645", "score": "0.4234921", "text": "public function postUp()\n\t{\n\t}", "title": "" }, { "docid": "0b4a000c55467805cd129d634f05f5c1", "score": "0.42304605", "text": "public function safeUp()\n {\n $this->insert($this->tableName, [\n 'label' => 'укр',\n 'code' => 'ua',\n 'locale' => 'uk',\n 'visible' => 1,\n 'position' => 0,\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" } ]
2e640b2819e0e2483ca2c8015eacce77
Show the application dashboard.
[ { "docid": "d3a9b9fab616cf1bd8c5352ed0103a73", "score": "0.0", "text": "public function index()\n { \n $articles=Article::select('id','title','des','img')->get();\n return view('home')->with(['h1'=>$this->h1,'m'=>$this->m,'m2'=>$this->m2,'articles'=>$articles]);\n }", "title": "" } ]
[ { "docid": "6ca363f07685b1b797386a6d50b6d019", "score": "0.75147176", "text": "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "title": "" }, { "docid": "b996d9240f711f5adb19e49d08fd67fc", "score": "0.7503827", "text": "public function index()\n {\n\n //GET USER ID from AUTH\n $user_id = Auth::user()->id;\n\n //GET CURRENT USER\n $user = User::find($user_id);\n\n //STATUS\n $status = $user->status;\n\n $applications = Application::where('user_id', $user->id)->get();\n\n //get apps and take user to dashboard\n \n return view('dashboard', compact('applications', 'status')); \n }", "title": "" }, { "docid": "e4f160361f5ffec76c49ef2ed06ddad1", "score": "0.74601996", "text": "public function index()\n\t{\n\t\t$data = array();\n\t\t\n\t\t$this->template\n\t\t\t->title('Dashboard')\n\t\t\t->build('admin/dashboard', $data);\n\t}", "title": "" }, { "docid": "4be1965e2d8f6d6765bde0a21d9427dc", "score": "0.7436689", "text": "public function index()\n {\n return view(\"mbober-admin::dashboard\");\n }", "title": "" }, { "docid": "7c1b5dccf160c1b3c89c1795b8edf2a5", "score": "0.7381381", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "20126b0f7e7a05c57f543bbb237b6b38", "score": "0.7357348", "text": "public function actionDashboard()\n {\n $data['dashboardTotals'] = Advisers::get_dashboard_admin();\n $data['coordinators'] = Advisers::getCoordinadores();\n $data['campanasNoAsignadas'] = Advisers::campanas_sin_asignar();\n $data['campanasXclientes'] = [];\n $this->layout = 'layout_dashboad_profile_admin';\n $this->render('dashboard', $data);\n }", "title": "" }, { "docid": "1a8925153d4fdf57b36c041ec5d7a890", "score": "0.7350788", "text": "public function dashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "dd1c58722932c21baed4ca924c2a28f8", "score": "0.7346477", "text": "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "title": "" }, { "docid": "572a01cc7a78e633ff200ad99a1aec37", "score": "0.7326711", "text": "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "title": "" }, { "docid": "33b6803765d3413f8b109213b08a6ac3", "score": "0.7316215", "text": "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "title": "" }, { "docid": "0baf9d369e486c41890395b35bda251e", "score": "0.7312567", "text": "public function dashboard()\n\t{\n\t\treturn view('Admin_dashboard.dashboard_layout');\n\t}", "title": "" }, { "docid": "85bbb161a101a795a1694b0a4dc8a8a8", "score": "0.73072463", "text": "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "title": "" }, { "docid": "5c5f5c4d063143e0572107cb2f1fd42c", "score": "0.7287626", "text": "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "title": "" }, { "docid": "0a7d7f34ccb23c06f16ec5d29958081d", "score": "0.72826403", "text": "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "979df6f8245a87c8084d6a419248f035", "score": "0.727347", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "9a8895c8d16938e252d378911c16e538", "score": "0.7249155", "text": "public function index()\n\t{\n\t\treturn view('sanatorium/dashboards::dashboards.index');\n\t}", "title": "" }, { "docid": "eec112d88fa45423422bd62ba78455f7", "score": "0.7241342", "text": "public function index()\n {\n return view('adm.dashboard');\n }", "title": "" }, { "docid": "07677c91c06fb8b57e695e3780a0ed43", "score": "0.7235562", "text": "public function show()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "170c8bf6de673492828f0205cea49285", "score": "0.7235519", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "0864e36c5e3718d97ca20a891926e55e", "score": "0.72071123", "text": "public function index() {\n\t\t$this->dashboard();\n\t}", "title": "" }, { "docid": "0864e36c5e3718d97ca20a891926e55e", "score": "0.72071123", "text": "public function index() {\n\t\t$this->dashboard();\n\t}", "title": "" }, { "docid": "de280eb71f9d853a6bf22ee3821deaa6", "score": "0.71989936", "text": "public function index() {\n return view('modules.home.dashboard');\n }", "title": "" }, { "docid": "97dda8eae48a2e526ac848d1bda32d1f", "score": "0.7197427", "text": "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "title": "" }, { "docid": "6be9f228685ce6fdeb0759b9a817c00d", "score": "0.71913266", "text": "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "title": "" }, { "docid": "b88c0a9468d221b6b7183a454eceffd5", "score": "0.717969", "text": "public function index()\n {\n $packages = VibrantTools::get_vibrant_packages('backend', true);\n return view('vibrant::modules.dashboard.dashboard')->with(compact('packages'));\n }", "title": "" }, { "docid": "64888dc6dd659cb1029f72d6c60ca06f", "score": "0.71790016", "text": "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "title": "" }, { "docid": "c84cc86b718b2a1a5148e086405d4ba5", "score": "0.71684825", "text": "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "title": "" }, { "docid": "86e7903b433e6ae3ffa9c2222bfb7b67", "score": "0.71631765", "text": "public function index()\n\t{\n\n\t\treturn view('dashboard');\n\t}", "title": "" }, { "docid": "6ab8df0b0682c1366273ee1a9fe7ad24", "score": "0.7160822", "text": "public function index()\n {\n return view(\"studio.dashboard\");\n }", "title": "" }, { "docid": "e2de8e0dd9ab000633e243626cc45046", "score": "0.71503055", "text": "public function index(){\n return view('client.dashboard.index');\n }", "title": "" }, { "docid": "52ddeb03572361410e81d3460a9bfe57", "score": "0.7146797", "text": "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "title": "" }, { "docid": "dc50af2aef83e99d7a83c50f03b72521", "score": "0.7132746", "text": "public function index()\n {\n return view('admin.dashboard.index');\n }", "title": "" }, { "docid": "5eca04c3749a0e4bafeb08f4ebca8e57", "score": "0.71249074", "text": "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "title": "" }, { "docid": "a2500c1352afb9bf13101524781b97c3", "score": "0.71218014", "text": "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "title": "" }, { "docid": "61eae6c796370ac8612e77dd2b70a14f", "score": "0.71170413", "text": "public function getDashboard() {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "111cd1f21f2b70892ceca83a3b0f2d99", "score": "0.7107029", "text": "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "title": "" }, { "docid": "0ff31c767f948f8eb9ab9c7a67c408b9", "score": "0.70935637", "text": "public function dashboard()\n {\n return view('student.template.home');\n }", "title": "" }, { "docid": "e9e333d30b0a5fbbd74d7ac86380e64f", "score": "0.7088498", "text": "public function index()\n {\n return view('admin/dashboard');\n }", "title": "" }, { "docid": "38b41688951d0db23a22fb3508eccc5c", "score": "0.7081685", "text": "public function index() {\n $this->tplVars = $this->tplVars + [\n 'page_title' => $this->pageTitle\n ];\n \n //affichage\n \\Renderer::showAdmin(\"dashboard\",$this->tplVars);\n \n }", "title": "" }, { "docid": "07d52f7b1ea4ee50c7592fe576ea896b", "score": "0.708061", "text": "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "title": "" }, { "docid": "07d52f7b1ea4ee50c7592fe576ea896b", "score": "0.708061", "text": "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "title": "" }, { "docid": "1f38fc7d872c262628f3f0107ddb2501", "score": "0.70773643", "text": "public function dashboard()\n {\n $this->middleware('auth:admin');\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "7c62fe1f03fd48ba49ec4ac57acd9963", "score": "0.7075653", "text": "public function index()\n {\n return view('dashboard.dashboard');\n }", "title": "" }, { "docid": "c9e82b04a5cffddf30be74e089a4641e", "score": "0.70751685", "text": "public function show()\n {\n return view('dashboard::show');\n }", "title": "" }, { "docid": "bb7b6e579d9f60770094dbdec8f74217", "score": "0.7068705", "text": "public function index()\n {\n return view('layouts.admin')->with('dashboard_content', 'dashboards.admin.pages.home');\n }", "title": "" }, { "docid": "10d657e45e11a73ab81e1713a80978b3", "score": "0.70551085", "text": "public function index()\n {\n return view('dashboard', [\n 'page' => 'dashboard',\n 'pv' => $this->getPrioritizedVanalability(),\n 'heapMap' => $this->getHeapMap(),\n 'affteced_vendors' => $this->afftecedVendors()\n ]);\n }", "title": "" }, { "docid": "6596820b3e732832450690d996db27b0", "score": "0.70550084", "text": "public function dashboard(){\n return view('Admin.dashboard');\n }", "title": "" }, { "docid": "b2e66dbfb26fa2510d672cbb76a44c10", "score": "0.7053246", "text": "public static function dashboard() {\n\n LoggerHelper::log('DASHBOARD', trans('logs.msg.dashboard'));\n }", "title": "" }, { "docid": "3117d94bf9925c9d93a0e4ea862d6a95", "score": "0.7043605", "text": "public function index()\n { \n return view('admin-views.dashboard');\n }", "title": "" }, { "docid": "8043e6822834854fdd3f31af76d3ca8d", "score": "0.70401806", "text": "public function index()\n {\n $data = $this->dashboardRepository->GetData();\n return view('dashboard.index', $data);\n }", "title": "" }, { "docid": "db68bc26c375facb0c385bd915338d84", "score": "0.70393986", "text": "public function getDashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "0c4ec303804e59bb6c00128154470515", "score": "0.70197886", "text": "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "title": "" }, { "docid": "ac048fb69071d046c75e92b736a8032d", "score": "0.70190316", "text": "public function home()\n {\n return view('Espace_Admin.dashboard');\n }", "title": "" }, { "docid": "f31ad0d1b788b200758e4a29c3d1aa9c", "score": "0.70185125", "text": "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "title": "" }, { "docid": "f04045b88470c98bd7bb7c37e2c7c091", "score": "0.7014912", "text": "public function getDashboard()\n\t{\n\t\t$this->helpers->setPageTitle('Dashboard');\n\n\t\treturn $this->view->make('larapress::pages.cp.dashboard');\n\t}", "title": "" }, { "docid": "7c16e32b9d9db71b1e7bbfdc769d011c", "score": "0.70139873", "text": "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "9cbc1dee01ddc9d7811e0ba1e9baa698", "score": "0.6993952", "text": "function admindashboard() {\n $this->loadViews(\"admin-dashboard\", $this->global);\n }", "title": "" }, { "docid": "7fff9c47aadce83afc45ba921a3beca4", "score": "0.6983825", "text": "public function index()\n\t{\n\t\treturn View::make('pages.dashboard')->with('pageinfo', self::$pageinfo);\n\t}", "title": "" }, { "docid": "f12a63ce7853b6dc828657ef222c7ddf", "score": "0.6982444", "text": "public function indexAction()\n {\n $this->loadDashboard();\n return;\n }", "title": "" }, { "docid": "e2aadb15104199f3f5503dcc6999456d", "score": "0.69810367", "text": "public function index()\n {\n return view('pemeriksa.dashboard');\n }", "title": "" }, { "docid": "bdc3c91e624fcd10d692ec797ca3a15d", "score": "0.69776684", "text": "public function index()\n {\n $users = User::count();\n\n $workers = Worker::where('type', 'internal')->count();\n\n $outsource = Worker::where('type', 'external')->count();\n\n $customers = Customer::count();\n\n $widget = [\n 'users' => $users,\n 'customers' => $customers,\n 'workers' => $workers,\n 'outsources' => $outsource\n ];\n\n return view('admin.dashboard', compact('widget'));\n }", "title": "" }, { "docid": "dc41ce6f45347c107a8831c7eb795185", "score": "0.69741416", "text": "public function index() {\n return view('dashboard', []);\n }", "title": "" }, { "docid": "58a304c7b0ec63755342e2693b5f4bbf", "score": "0.6968815", "text": "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "title": "" }, { "docid": "056e97ec46471848aa31ad48e07a6f89", "score": "0.6968294", "text": "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "title": "" }, { "docid": "3ebc2b4f51f015764f2c12c0fa301b9b", "score": "0.69586027", "text": "public function index()\n {\n\n return view('dashboard');\n }", "title": "" }, { "docid": "b1bc9e66748e1ce3a6e08d92486fbadf", "score": "0.6953351", "text": "public function index()\n {\n $dashboard = true;\n $count = [\n 'products' => \\App\\Models\\Product::all()->count(),\n 'customProducts' => \\App\\Models\\CustomProduct::all()->count(),\n ];\n $sliders = \\App\\Models\\Slider::orderBy('order', 'asc')->get();\n $products = \\App\\Models\\Product::orderBy('created_at', 'desc')->take(5)->get();\n $customProducts = \\App\\Models\\CustomProduct::orderBy('new', 'desc')->take(5)->get();\n return view('admin.dashboard', compact('dashboard', 'sliders', 'count', 'products', 'customProducts'));\n }", "title": "" }, { "docid": "38295d33a0573422f88ee12bb5c31724", "score": "0.6941439", "text": "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "72c899cfcc22666e86f08a40d45d4219", "score": "0.6938837", "text": "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "title": "" }, { "docid": "01c798aad909315846e6bd472a26180f", "score": "0.6937524", "text": "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "title": "" }, { "docid": "2b5593b4af9be225b5166a23d9f3d08e", "score": "0.6937456", "text": "public function index()\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "2b5593b4af9be225b5166a23d9f3d08e", "score": "0.6937456", "text": "public function index()\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "bf7558a7b5b06153401330a223d006c7", "score": "0.6935287", "text": "public function index()\n {\n\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "b2a971d0b4fb5cffdb8f5c946e729fcd", "score": "0.69276494", "text": "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "title": "" }, { "docid": "922451fb6aecee980204982f6f19adc0", "score": "0.6923569", "text": "public function index()\n {\n return view('tecCard.dashboard');\n }", "title": "" }, { "docid": "d9465a826d2e1cfbc11bb14c61dad870", "score": "0.6921651", "text": "public function index()\n {\n return view('/dashboard');\n }", "title": "" }, { "docid": "3ad9c9aa5b812f8d2de51f71c4f11496", "score": "0.69074917", "text": "public function index()\n {\n \treturn view('dashboard');\n }", "title": "" }, { "docid": "614f95d18d05c465ca1fe75dd049502b", "score": "0.6906208", "text": "public function index() : object\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "1e2a1b1071b3223fbc25a29f11515ede", "score": "0.69062036", "text": "public function index()\n { \n return view('admin.dashboard');\n }", "title": "" }, { "docid": "5195827794be53d05a2d42516f683a8f", "score": "0.69032675", "text": "function dashboard()\n\t{\n\t\t// Save Menu\n\t\t$this->events->add_filter( 'admin_menus', array( $this, 'create_menus' ) );\n\t\t// Register Page\n\t\t$this->Gui->register_page( 'menu_builder', \tarray( $this, 'menu_builder_controller' ) );\n\t}", "title": "" }, { "docid": "658d2f5ba7785e7995a6291da73819fc", "score": "0.6894836", "text": "public function index() {\n\n // Add page stylesheets\n XCMS_Page::getInstance()->addStylesheet(array(\n \"assets/css/backend/mng_dashboard.css\"\n ));\n\n // Add page stylesheets\n XCMS_Page::getInstance()->addScript(array(\n \"assets/scripts/backend/mng_dashboard.js\"\n ));\n\n $this->load->view(\"dashboard.tpl\", array(\n \"cacheSize\" => formatBytes(getDirectorySize(XCMS_CONFIG::get(\"FOLDER_CACHE\")), 0),\n \"logSize\" => formatBytes(getDirectorySize(XCMS_CONFIG::get(\"FOLDER_LOGS\")), 0)\n ));\n\n }", "title": "" }, { "docid": "c29ae862edc655716b800196553b9de7", "score": "0.68922836", "text": "public function clientDashboard()\n {\n return view('clientuser.dashboard');\n }", "title": "" }, { "docid": "4721631599f0740d7a2b3b6cc23d2ad8", "score": "0.68902075", "text": "public function index()\n {\n\n return view('dashboard.dashboard');\n }", "title": "" }, { "docid": "86f89b60098868c27d89d70c72ffe049", "score": "0.6881129", "text": "public function dashboard()\n {\n return view('content.content-dashboard');\n }", "title": "" }, { "docid": "53048283716bb8337e5e70c34bd6b4dc", "score": "0.6880131", "text": "public function dashboard()\n {\n if(Auth::user()->isAdmin()) {\n return view('admin.dashboard');\n } else {\n return 'Vous etes pas admin';\n }\n }", "title": "" }, { "docid": "3deb098dcca1d7bd9482b11c002bc480", "score": "0.686915", "text": "public function index()\n {\n return view('/dashboard/index');\n }", "title": "" }, { "docid": "20029478a2150db9aba3ddfaf7986e54", "score": "0.6858411", "text": "public function index()\n {\n $user = User::find(Sentry::getUser()->id)->load(\n array(\n 'episodeLinkRequests.episode.show',\n 'episodeLinks.episode.show',\n 'favourites.episode.show',\n 'watchlist.episode.show',\n 'favouriteShows.show',\n 'watchlistShow.show',\n 'watched.episode.show',\n 'watchedShow.show'\n )\n );\n return View::make('users.dashboard' , compact('user'));\n }", "title": "" }, { "docid": "f5838755aa909b6aa2a2ba61b7c5332a", "score": "0.68479055", "text": "public function index()\n {\n return view('dashboard.home');\n }", "title": "" }, { "docid": "55c0bbf8fa0cf56eff7cf67c0ae30ea8", "score": "0.6844151", "text": "public function show()\n {\n return view('barber.barber-dashboard');\n }", "title": "" }, { "docid": "f374d9f561f51446548bde73327a7974", "score": "0.6838798", "text": "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "title": "" } ]
66a9cc52e7fc1dbadd09b269b0d771bc
Checks if Twitter Tweet counts is enabled in Sweet tooth configuration section.
[ { "docid": "668dc86a472fa723c9503c00a154520d", "score": "0.82510644", "text": "public function isTweetCountEnabled()\n {\n return Mage::getStoreConfigFlag('rewards/twitter/enableTweetCount');\n }", "title": "" } ]
[ { "docid": "8b80c01bb5c455608386f88fe5ba1810", "score": "0.71392566", "text": "public function isTweetingEnabled()\n {\n return Mage::getStoreConfigFlag('rewards/twitter/enableTwitterTweet');\n }", "title": "" }, { "docid": "7de10cb28b47e6e40af7c728a3e8e93f", "score": "0.65991986", "text": "public function hasTwitter()\n\t{\n\t\treturn Session::has('access_token');\n\t}", "title": "" }, { "docid": "5c1d6193e7c116f9cbc1c4739989ade6", "score": "0.6119076", "text": "function get_twitter_tweet_count_from_api() {\n\t//ini_set(\"display_errors\", \"On\");\n\t//delete_transient ( 'acs_tweet_count_cron' );\n\tif (false === get_transient ( 'acs_tweet_count_cron' )) {\n\t\tset_transient ( 'acs_tweet_count_cron', true, 60 * 60 * 2 );\n\t\t\n\t\t$acs_twitter_options = get_option ( 'acs_plugin_twitter_api' );\n\t\t$acs_twitter_options ['oauth_access_token'] = '';\n\t\t$acs_twitter_options ['oauth_access_token_secret'] = '';\n\t\t$acs_plugin_twitter_username = get_option ( 'acs_plugin_twitter_username' );\n\t\tif (is_array ( $acs_twitter_options ) && ! empty ( $acs_plugin_twitter_username )) {\n\t\t\t\n\t\t\t$a = getTwitterTweetCountJSON ( $acs_twitter_options, $acs_plugin_twitter_username );\n\t\t\t\n\t\t\t$b = json_decode ( $a, true );\n\t\t\t\n\t\t\tif (json_last_error_msg () !== FALSE && is_array ( $b )) {\n\t\t\t\tif (isset ( $b [0] [\"statuses_count\"] )) {\n\t\t\t\t\tupdate_option ( 'acs_twitter_tweet_count', ( int ) $b [0] [\"statuses_count\"] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "af614f145f7b07665f8e4389723ad9ad", "score": "0.5972471", "text": "function tweet_updater_is_tweetable($post) \n{\n // retrieve the options\n $options = get_option('tweet_updater_options');\n \n if($options['limit_activate']) {\n \n // limiter is activated, check if the post is part of \n // a category which is tweetable\n if( $options['limit_to_category'] > 0 ) {\n $post_categories = wp_get_post_categories($post->ID);\n if( is_array($post_categories) && sizeof($post_categories) > 0 ) {\n if( in_array($options['limit_to_category'], $post_categories) ) {\n echo \"in cat: TRUE\";\n return true;\n } \n } \n } \n \n // Ok, no category found so continue with checking for the customfields \n if(! empty($options['limit_to_customfield_key']) && ! empty($options['limit_to_customfield_val']) ) {\n $customfield_val = get_post_meta($post->ID, $options['limit_to_customfield_key'], true);\n if( ! empty($customfield_val) && $customfield_val == $options['limit_to_customfield_val'] ) {\n echo \"fields match: true\";\n return true;\n } \n }\n\n // in all other cases return false\n return false;\n } else {\n // limit is not active so everything is tweetable\n return true;\n } \n}", "title": "" }, { "docid": "4240ac765b393de086a6f235215f70b4", "score": "0.59495264", "text": "public function hasTwofactorCode()\n {\n return $this->twofactor_code !== null;\n }", "title": "" }, { "docid": "cc5d2fc3167a0d660ee98ee1096e9e46", "score": "0.5870566", "text": "function set_twitter_count($twitter_count) {\n $this->twitter_count = $twitter_count;\n }", "title": "" }, { "docid": "71fb2af69d3405e236db9b8efd138b4d", "score": "0.5818554", "text": "function get_twitter_count() {\n return $this->twitter_count;\n }", "title": "" }, { "docid": "2777cb2d0372444ea75ce57694df7ca2", "score": "0.57719153", "text": "public function twitter(): bool\n {\n return false;\n }", "title": "" }, { "docid": "d5085bbcfd3f34006d5e9701b58dd257", "score": "0.5743547", "text": "static function _enabledSessionStatistics()\n\t{\n\t\tglobal $ilSetting;\n\t\t\n\t\treturn (bool)$ilSetting->get('session_statistics', 1);\n\t}", "title": "" }, { "docid": "1d423cf41f696444267805bf6a7a38c6", "score": "0.574134", "text": "public static function canAutoshare()\n\t{\n\t\tif ( $method = \\IPS\\Login\\Handler::findMethod( 'IPS\\Login\\Handler\\OAuth1\\Twitter' ) and $method->canProcess( \\IPS\\Member::loggedIn() ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "7b43c026d5a3020f5c2f959b18c0c240", "score": "0.56362104", "text": "public function fbttposts_tt_has_credentials()\n\t{\n\t\tself::$tt_instance->config['token'] = get_option( 'wm-ttToken');\n \t\tself::$tt_instance->config['secret'] = get_option( 'wm-ttSecret');\n \t\tif(!self::$tt_instance->config['token'] || !self::$tt_instance->config['secret'] ) \n \t\t{\n \t\t\tdie();\n \t\t}\n \t\tself::$tt_instance->reconfigure(self::$tt_instance->config);\n\t\t$code = self::$tt_instance->user_request(array(\n\t\t 'url' => self::$tt_instance->url('1.1/account/verify_credentials')\n\t\t));\n\t\tif($code === 200) return true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9afcdb9f54a5e5289cc3db79da8f5a25", "score": "0.5588693", "text": "public function hasSentiment(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "a760e10407dcaa7b0a96c05047df2351", "score": "0.5587917", "text": "public function hasTense(){\n return $this->_has(11);\n }", "title": "" }, { "docid": "8e2e525b2203244a9f3de929803b14e7", "score": "0.5569018", "text": "protected function hasSessionToken()\n {\n return $this->session->has('twitter.oauth_token') && $this->session->has('twitter.oauth_token_secret');\n }", "title": "" }, { "docid": "2c44ff9b42ed576db14675074d06e45e", "score": "0.55422276", "text": "private function isThrottlable()\n {\n return config('laravel-auth.throttles.enabled', false);\n }", "title": "" }, { "docid": "f0484d2c50665572722294ca5169f799", "score": "0.55344534", "text": "public function hasSentiment(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15b870e8379474d0e8953ba62f4c9402", "score": "0.5506052", "text": "public function hasSettings(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "6aba3eecec8d8e357399143abe97c84e", "score": "0.54935527", "text": "public function hasSentiment(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "fe87e4fdaa659b6c0c651132c3153d2b", "score": "0.5441704", "text": "function nv_hom_bookmarktwitter(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'bookmarktwitter','1');\n}", "title": "" }, { "docid": "f40c9d274f04a4ac87c10570c7c0586f", "score": "0.5414643", "text": "public function hasUser(){\n\t\treturn Session::has('user_id') AND $this->hasTwitter();\n\t}", "title": "" }, { "docid": "4039d3f48a3a5e7cd339c8014bfb91c9", "score": "0.54005426", "text": "function is_in_trial_promotion() {\n return $this->_admin_notices->has_sticky( 'trial_promotion' );\n }", "title": "" }, { "docid": "d7135a051ca2336f3b03ce87915732b6", "score": "0.53480995", "text": "public function hasExtractDocumentSentiment(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "76caea7e176f943f340859b4ae99399d", "score": "0.5336674", "text": "function tweet_updater_update_status($tweet)\n{\n\t\n\t$tokens = get_option('tweet_updater_auth');\n\t\n\tif( $tokens['auth3_flag'] == '1' )\n\t{\n\t\t// Initiate a TwitterOAuth with access tokens\n\t\t$connection = new TwitterOAuth($tokens['consumer_key'], $tokens['consumer_secret'], $tokens['access_key'], $tokens['access_secret']);\n\t\t\n\t\t// Post an update to Twitter via your application:\n\t\t$result = $connection->post('statuses/update', array('status' => $tweet));\n\n\t}\n\telse \n\t{\n\t\t$result = array( \n\t\t\t'plugin_error' => 'auth', \n\t\t\t'error_description' => 'TweetUpdater is not linked to a twitter account'\n\t\t\t\t);\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "d31fed659aa27fc665a1fbe1a3e85350", "score": "0.5324847", "text": "public function hasDocumentSentiment(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "f808e0eff338499e3cb68fa718961f2c", "score": "0.52900785", "text": "public function isEnableViewThrash(){\n return ($this->withThrash == 2);\n }", "title": "" }, { "docid": "59493aa2f94cabaae8f003312115ed4b", "score": "0.5266665", "text": "public function check()\n {\n $hasUser = $this->session->has('twitter.user_id') && $this->session->has('twitter.screen_name');\n\n return $this->hasSessionToken() && $hasUser;\n }", "title": "" }, { "docid": "13da2951661371d48b1e38ccd3b1a157", "score": "0.52652884", "text": "protected function is_text_link_counter_enabled() {\n\t\treturn WPSEO_Options::get( 'enable_text_link_counter' );\n\t}", "title": "" }, { "docid": "529cb5348a8ffe8fe05c6c6ceec710e5", "score": "0.52642393", "text": "public function checkSettings() {\n\t\t$data = $this->getSettings();\n\t\t$config = new kyConfig($data['kayako_url'], $data['kayako_key'], $data['kayako_secret']);\n\t\t$config->setDebugEnabled(false);\n\t\tkyConfig::set($config);\n\n\t\t$obj = kyTicketStatus::getAll()->first();\n\t\tupdate_option('kayako_settings_installed', is_object($obj));\n\t\treturn is_object($obj);\n\t}", "title": "" }, { "docid": "eaf7cc005c4785ddb7bd0ffe2dc90835", "score": "0.52600867", "text": "public function hasDocumentSentiment(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "4c5a0a78483113d03f12c4f5fc046f56", "score": "0.52526754", "text": "private function errorCheck($tweets)\n {\n if (array_key_exists('errors', $tweets)) {\n $message = 'We have encountered ' . count($tweets['errors']) . ' error(s): <br />';\n\n foreach ($tweets['errors'] as $error) {\n $message .= $error['message'].' Code:'.$error['code'].'<br />';\n }\n\n if (Director::isDev()) {\n throw new Exception($message, 1);\n }\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "1af5b88ddf2d4d731438a2372666cc11", "score": "0.52407235", "text": "public function hasSettings()\n {\n return false;\n }", "title": "" }, { "docid": "02a017f1d05439efd950d0dc711f0db2", "score": "0.5226045", "text": "public function isEnableViewThrashOnly(){\n return ($this->withThrash == 3);\n }", "title": "" }, { "docid": "c7ef36e6a5bf1960ff6115b70843c478", "score": "0.52080595", "text": "public function hasUpdatetall()\n {\n return $this->updatetall !== null;\n }", "title": "" }, { "docid": "e32b6e0bbc9529a04afc1491b1567ed9", "score": "0.52038145", "text": "function exist_twitter()\n{\n\tglobal $options;\n\n\tif( isset($options['theme_social_twitter_text']) && !empty($options['theme_social_twitter_text']) ) :\n\n\t$array = array(\n\t\t'exists' => true,\n\t\t'link' => $options['theme_social_twitter_text'],\n\t);\n\n\treturn $array;\n\t\n\telse: return false; endif;\n}", "title": "" }, { "docid": "6112d6e57f3773cdeb43a48ab17e4681", "score": "0.5201013", "text": "public function hasConinit(){\n return $this->_has(25);\n }", "title": "" }, { "docid": "4144fbbb6b5699c4f266cc0904d6a6dc", "score": "0.5197806", "text": "public function has_lti_config() {\n return (!empty($this->_host) &&\n !empty($this->_consumer_key) &&\n !empty($this->_shared_secret));\n }", "title": "" }, { "docid": "2a57ee11c37586c8c6c8bcde36cfb9a7", "score": "0.51810086", "text": "public function has_settings() {\n\t\treturn count( $this->setting_fields );\n\t}", "title": "" }, { "docid": "f1ea64c0fcfa0d52e87a92c6f81716cf", "score": "0.51594645", "text": "protected function checkTweets() {\n foreach($this->tweets as $tweet) {\n $return = $this->checkTID($tweet['tid']);\n \n if(empty($return)) {\n $this->insert($tweet);\n }\n } \n }", "title": "" }, { "docid": "de0e9c6c68805ff54b3e88e39ad62081", "score": "0.5158786", "text": "function nv_hom_rss(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'bookmarktwitter','1');\n}", "title": "" }, { "docid": "2816a86e51dbdda97b9c3e7d60009bb2", "score": "0.5147444", "text": "protected function is_insights_enabled()\n {\n }", "title": "" }, { "docid": "2816a86e51dbdda97b9c3e7d60009bb2", "score": "0.5147444", "text": "protected function is_insights_enabled()\n {\n }", "title": "" }, { "docid": "205d6bb20a8be3467b60bdf0d3535bdd", "score": "0.51397216", "text": "function smarty_function_mttypepadantispamcounter($args, &$ctx) {\n $blog = $ctx->stash('blog');\n $cfg = $ctx->mt->db->fetch_plugin_config('MT::Plugin::TypePadAntiSpam',\n 'blog:' . $blog->blog_id);\n $count = $cfg['blocked'];\n $count or $count = 0;\n return $ctx->count_format($count, $args);\n}", "title": "" }, { "docid": "0a50106c15d964462b518dbd342a72ee", "score": "0.51332206", "text": "protected function checkTweets() {\n foreach($this->tweets as $tweet) {\n $return = $this->checkTID($tweet);\n \n if(empty($return)) {\n $this->insert($tweet);\n }\n } \n }", "title": "" }, { "docid": "5aa7eba092a9ee3152b8a22147aa854b", "score": "0.5129937", "text": "public function hasExtractEntitySentiment(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "eb24f083fc4a6254c1bd2d8003435172", "score": "0.51161224", "text": "public function post($tweet)\n {\n $this->lastStatus = $this->objTwitterConnection->request('POST', $this->objTwitterConnection->url('1/statuses/update'), array('status' => $tweet));\n if ($this->lastStatus == 200) {\n $this->lastMessage = null;\n return true;\n } else {\n $this->lastMessage = $this->objTwitterConnection->response['response'];\n return false;\n }\n }", "title": "" }, { "docid": "f6b0a0fe0fe0653a8efba7b0fd8e8fac", "score": "0.5112428", "text": "public function isSocialEnabled()\n {\n return in_array('social', config('awemapl-auth.enabled'));\n }", "title": "" }, { "docid": "3604e1521f25b2fe41c39e1696ba3831", "score": "0.50876445", "text": "public function hasHealcount(){\n return $this->_has(20);\n }", "title": "" }, { "docid": "52b8e7df99a8f280cb197c67bc291e74", "score": "0.507802", "text": "public function used(): bool\n {\n return (bool) config('koel.itunes.enabled');\n }", "title": "" }, { "docid": "8c7f0db8f27c18b44c1a634381f2b1ed", "score": "0.5060387", "text": "public function checkToBeInfluencer()\n {\n return $this->have10Posts() and $this->validatedByAdmin();\n }", "title": "" }, { "docid": "66624976695725e463d7fcebbda36453", "score": "0.5040974", "text": "function count_all_scoreconfirm_step2($statustwo = 0){\n $this->db->where('view', 1);\n if ( $statustwo != 0 ) { $this->db->where('statustwo', $statustwo); }\n\n $query = $this->db->get($this->incubation_selection);\n\n return $query->num_rows();\n }", "title": "" }, { "docid": "ec174689e49d40da78275b86122b4613", "score": "0.50322247", "text": "public function enabledSessionStatistics()\n\t{\n\t\treturn (bool)$this->session_statistics_enabled;\n\t}", "title": "" }, { "docid": "9320776b79ac9aa8f1ced58cba182a64", "score": "0.5004856", "text": "function getTwitterTweetCountJSON($acs_twitter_options, $acs_plugin_twitter_username) {\n\t\n\t\n\t\n\trequire plugin_dir_path( __FILE__ ) . 'includes/TwitterAPIExchange.php';\n\t\n\t$url = 'https://api.twitter.com/1.1/users/lookup.json';\n\t$requestMethod = 'GET';\n\t$getfield = '?screen_name=' . esc_attr ( $acs_plugin_twitter_username );\n\ttry {\n\t\t$twitter = new TwitterAPIExchange ( $acs_twitter_options );\n\t\t$a = $twitter->setGetfield ( $getfield )->buildOauth ( $url, $requestMethod )->performRequest ();\n\t\treturn $a;\n\t} catch ( Exception $e ) {\n\t\techo $e->getMessage();\n\t}\n\treturn array ();\n}", "title": "" }, { "docid": "f217e301e07ddac171e1ebf6525fc5f9", "score": "0.50025976", "text": "function bunchy_is_post_trending( $p = null ) {\n\t$post_obj = get_post( $p );\n\n\t$meta_value = get_post_meta( $post_obj->ID, '_bunchy_trending', true );\n\n\treturn apply_filters( 'bunchy_is_post_trending', ! empty( $meta_value ), $post_obj->ID );\n}", "title": "" }, { "docid": "4b62f3378f3decb53f7952acb407651e", "score": "0.5002536", "text": "public function is_configured() {\n\t\treturn $this->access_token != '';\n\t}", "title": "" }, { "docid": "cb54d05aee9d9cf4753173eb674ffc85", "score": "0.49948376", "text": "function shariff3uu_checkbox_sharecounts_render() {\n\techo '<input type=\"checkbox\" name=\"shariff3uu_statistic[sharecounts]\" ';\n\tif ( isset( $GLOBALS['shariff3uu_statistic']['sharecounts'] ) ) {\n\t\techo checked( $GLOBALS['shariff3uu_statistic']['sharecounts'], 1, 0 );\n\t}\n\techo ' value=\"1\">';\n\tif ( ! isset( $GLOBALS['shariff3uu_statistic']['backend'] ) && isset( $GLOBALS['shariff3uu_statistic']['sharecounts'] ) ) {\n\t\techo ' ';\n\t\techo esc_html__( 'Warning: The statistic functionality must be enabled in order for the share counts to be shown.', 'shariff' );\n\t}\n}", "title": "" }, { "docid": "00b07affa1ffa62639fd0dc76bf88cdb", "score": "0.49911642", "text": "public function wpw_auto_poster_tweet_status( $post, $template, $title = '' ) {\r\n\t\t\t\r\n\t\tglobal $wpw_auto_poster_options;\r\n\t\t\r\n\t\t$prefix = WPW_AUTO_POSTER_META_PREFIX;\t\r\n\t\t\r\n\t\t$ispublished = get_post_meta( $post->ID, $prefix . 'tw_status', true );\r\n\t\t$unique = 'false';\r\n\r\n\t\t$post_type = $post->post_type; // Post type\r\n\r\n\t\t$tags_arr = array();\r\n\t\t$cats_arr = array();\r\n\t\t\r\n\t\tif( isset( $ispublished ) && $ispublished == '1' ) { //if post is published on facebook once then change url to prevent duplication\r\n\t\t\t//unique link for posting\r\n\t\t\t$unique = 'true';\r\n\t\t}\r\n\r\n\r\n\t\t// Get all selected tags for selected post type for hashtags support\r\n if(isset($wpw_auto_poster_options['tw_post_type_tags']) && !empty($wpw_auto_poster_options['tw_post_type_tags'])) {\r\n\r\n $custom_post_tags = $wpw_auto_poster_options['tw_post_type_tags'];\r\n if(isset($custom_post_tags[$post_type]) && !empty($custom_post_tags[$post_type])){ \r\n foreach($custom_post_tags[$post_type] as $key => $tag){\r\n $term_list = wp_get_post_terms( $post->ID, $tag, array(\"fields\" => \"names\") );\r\n foreach($term_list as $term_single) {\r\n $tags_arr[] = $term_single;\r\n }\r\n }\r\n \r\n }\r\n }\r\n\r\n // Get all selected categories for selected post type for hashcats support\r\n if(isset($wpw_auto_poster_options['tw_post_type_cats']) && !empty($wpw_auto_poster_options['tw_post_type_cats'])) {\r\n\r\n $custom_post_cats = $wpw_auto_poster_options['tw_post_type_cats'];\r\n if(isset($custom_post_cats[$post_type]) && !empty($custom_post_tags[$post_type])){ \r\n foreach($custom_post_cats[$post_type] as $key => $category){\r\n $term_list = wp_get_post_terms( $post->ID, $category, array(\"fields\" => \"names\") );\r\n foreach($term_list as $term_single) {\r\n $cats_arr[] = $term_single;\r\n }\r\n }\r\n \r\n }\r\n }\r\n\r\n\t\t\r\n\t\t$postlink = get_permalink( $post->ID );\t\r\n\t\t$postlink = $this->wpw_auto_poster_get_short_post_link( $postlink, $unique, $post->ID, 'false', 'tw' );\r\n\t\t\r\n\t\t$posttitle = $post->post_title;\r\n\t\t\r\n\t\t$post_content = strip_shortcodes( $post->post_content);\r\n \r\n //strip html kses and tags\r\n $post_content = $this->wpw_auto_poster_stripslashes_deep($post_content);\r\n \r\n //decode html entity\r\n $post_content = $this->wpw_auto_poster_html_decode($post_content);\r\n\r\n\t\t$userdata = get_userdata($post->post_author);\r\n\t\t\r\n\t\t$nicename = get_user_meta( $post->post_author, 'nickname', true);\r\n\t\t$first_name = get_user_meta( $post->post_author, 'first_name', true);\r\n\t\t$last_name = get_user_meta( $post->post_author, 'last_name', true);\r\n\t\t$fullauthor = $first_name . ' ' . $last_name;\r\n\t\t$posttype = $post->post_type;\r\n\r\n\t\t// Get post excerpt\r\n\t\t$excerpt = apply_filters( 'wpw_auto_poster_tweet_status_excerpt', $post->post_excerpt, $post );\r\n\r\n\t\t// Get post tags\r\n //$tags_arr = wp_get_post_tags( $post->ID, array( 'fields' => 'names' ) );\r\n $hashtags = ( !empty( $tags_arr ) ) ? '#'.implode( ' #', $tags_arr ) : '';\r\n\r\n\r\n // get post categories\r\n /*$hashcats = array();\r\n foreach((get_the_category( $post->ID )) as $category) {\r\n $hashcats[] = $category->cat_name;\r\n }*/\r\n $hashcats = ( !empty( $cats_arr ) ) ? '#'.implode( ' #', $cats_arr ) : '';\r\n\r\n\r\n\t\t//if title is passed from function parameter then use that title\r\n\t\t$posttitle = !empty($title) ? $title : $posttitle;\r\n\t\t\r\n\t\t$replacetags = array( '[link]','[title]', '[full_author]', '[nickname_author]', '[post_type]', '[excerpt]', '[hashtags]', '[hashcats]');\r\n\t\t$replaceval = array( $postlink, $posttitle, $fullauthor, $nicename, $posttype, $excerpt, $hashtags, $hashcats );\r\n\t\t$status = str_replace( $replacetags, $replaceval, $template );\r\n\t\t\r\n\t\t$replacetags = array( '{link}','{title}', '{full_author}', '{nickname_author}', '{post_type}', '{excerpt}', '{hashtags}', '{hashcats}', '{content}');\r\n\t\t$replaceval = array( $postlink, $posttitle, $fullauthor, $nicename, $posttype, $excerpt, $hashtags, $hashcats, $post_content);\r\n\r\n\t\t$code_matches = array();\r\n \r\n // check if template tags contains {content-numbers}\r\n if( preg_match_all( '/\\{(content)(-)(\\d*)\\}/', $status, $code_matches ) ) {\r\n $trim_tag = $code_matches[0][0];\r\n $trim_length = $code_matches[3][0];\r\n $post_content = substr( $post_content, 0, $trim_length);\r\n $replacetags[] = $trim_tag;\r\n $replaceval[] = $post_content;\r\n }\r\n\r\n\t\t$status = str_replace( $replacetags, $replaceval, $status );\r\n\t\t\r\n\t\treturn $this->wpw_auto_poster_html_decode( $status );\r\n\t}", "title": "" }, { "docid": "5993f3c4c6c5bd09228f7257ce2f136d", "score": "0.4982946", "text": "public function isTwoFactorEnabled()\n {\n return in_array('two_factor', config('awemapl-auth.enabled'));\n }", "title": "" }, { "docid": "2c80dbdcfdb0fa7ad2c9c970282198aa", "score": "0.49807167", "text": "static function _enabledObjectStatistics()\n\t{\n\t\tglobal $ilSetting;\n\t\t\n\t\treturn (bool)$ilSetting->get('object_statistics', 0);\n\t}", "title": "" }, { "docid": "193596aed39bb15e4f7f495fdbfbd67a", "score": "0.4971722", "text": "function twitterlogin_pagesetup() {\r\n \t// that do not have twitter control explicitly turned off\r\n \tif ((get_context() == 'profile') \r\n \t\t&& ($page_owner_entity = page_owner_entity()) \r\n \t\t&& ($page_owner_entity->getSubtype() == \"twitter\")\r\n \t\t&& ($page_owner_entity->twitter_controlled_profile != 'no')\r\n \t) {\r\n \t\textend_view('metatags','twitterlogin/hide_profile_embed');\r\n \t}\r\n \t\r\n \textend_elgg_settings_page('twitterlogin/settings/usersettings', 'usersettings/user');\r\n }", "title": "" }, { "docid": "c329fcd2bcb241ea96125ebbaa3a7281", "score": "0.49635383", "text": "public function getSiteStatsSharingEnabled()\n {\n return $this->site_stats_sharing_enabled;\n }", "title": "" }, { "docid": "46187559a7c9cc132f9978240478edf9", "score": "0.49615732", "text": "protected function isUsingThrottlesLoginsTrait()\n {\n return in_array(\n ThrottlesLogins::class, class_uses_recursive(get_class($this))\n );\n }", "title": "" }, { "docid": "46187559a7c9cc132f9978240478edf9", "score": "0.49615732", "text": "protected function isUsingThrottlesLoginsTrait()\n {\n return in_array(\n ThrottlesLogins::class, class_uses_recursive(get_class($this))\n );\n }", "title": "" }, { "docid": "69ab919657aa517d4f953b34353ff465", "score": "0.49615493", "text": "public function hasSecretPhraseMode()\n {\n return $this->secret_phrase_mode !== null;\n }", "title": "" }, { "docid": "8e1dcdfd5fce1df32f8f1bc036536018", "score": "0.49609312", "text": "function neat_get_twitter_count( $post_id ) {\r\n\t\t$number = 0;\r\n\t\tif( !$post_id )\r\n\t\t\treturn $number;\r\n\t\tif( false === ( $number = get_transient( $post_id . '_twitter' ) ) ){\r\n\t\t\t$args = array(\r\n\t\t\t\t'timeout'\t=>\t5\r\n\t\t\t);\r\n\t\t\t$args = apply_filters( 'neat_wp_remote_get_args' , $args);\r\n\t\t\t$apiurl = 'https://cdn.api.twitter.com/1/urls/count.json?url=' . get_permalink( $post_id );\r\n\t\t\t$response = wp_remote_get( apply_filters( 'neat_get_twitter_count_apiurl' , $apiurl), $args );\r\n\t\t\tif( is_wp_error( $response ) ){\r\n\t\t\t\treturn $number;\r\n\t\t\t}\r\n\t\t\tif( $response['response']['code'] == 200 ){\r\n\t\t\t\t// valid request.\r\n\t\t\t\t$response = json_decode($response['body']);\r\n\t\t\t\tif( (int)$response->count > 0 ){\r\n\t\t\t\t\t$number = $response->count;\r\n\t\t\t\t\tset_transient( $post_id . '_twitter' , $number, apply_filters( 'transient_expiration' , 600));\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\t\treturn $number;\r\n\t}", "title": "" }, { "docid": "1db115226606a8f05dea948d62b2a36d", "score": "0.49504572", "text": "function tyl_have_myalerts($check_activated = false, $check_tyl_registered = false, $check_tyl_enabled = false)\n{\n\t$ret = false;\n\n\tif(function_exists(\"myalerts_info\")) {\n\t\t$myalerts_info = myalerts_info();\n\t\tif(version_compare($myalerts_info['version'], \"2.0.0\") >= 0\n\t\t &&\n\t\t (!$check_activated\n\t\t ||\n\t\t (function_exists(\"myalerts_is_activated\") && myalerts_is_activated())\n\t\t )\n\t\t )\n\t\t{\n\t\t\tif (!$check_tyl_registered && !$check_tyl_enabled)\n\t\t\t{\n\t\t\t\t$ret = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tglobal $cache;\n\n\t\t\t\t$alert_types = $cache->read('mybbstuff_myalerts_alert_types');\n\n\t\t\t\tif((!$check_tyl_registered || (isset($alert_types['tyl']['code' ]) && $alert_types['tyl']['code' ] == 'tyl'))\n\t\t\t\t &&\n\t\t\t\t (!$check_tyl_enabled || (isset($alert_types['tyl']['enabled']) && $alert_types['tyl']['enabled'] == 1 )))\n\t\t\t\t{\n\t\t\t\t\t$ret = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn $ret;\n}", "title": "" }, { "docid": "f0e11345313005f9445891ef608224f9", "score": "0.4946608", "text": "public function hasUseTicket(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "458751357bf62ef406d18f2787b13591", "score": "0.49393058", "text": "public function twofactorSettings()\n {\n $secretCheck = $this->database->fetch('SELECT value FROM settings WHERE setting = \"secret\"');\n\n if (strlen($secretCheck['value']) !== 16) {\n if ($this->secret == '') {\n for ($i = 0; $i < 16; $i++) {\n $this->secret .= $this->base32Characters[rand(0, 31)];\n }\n }\n $html = str_replace('{{secret}}', $this->secret, $this->basic->htmlBlocks('twofactorEnable'));\n } else {\n $html = $this->basic->htmlBlocks('twofactorDisable');\n }\n\n return $html;\n }", "title": "" }, { "docid": "55b8c93b844aed7d4ed3a8df77b0ad62", "score": "0.49135914", "text": "private function smsEnabled() {\n\t\t$key = $this->ss->get_key();\n\t\tif(!empty($key)) {\n\t\t\t$c = $this->ss->get_config($key, false);\n\t\t\tif(!empty($c['server_settings']['sms'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "91f9d6fadc6bbeea5dafc0abfe2a152a", "score": "0.49115166", "text": "public function hasToolSettingsService()\n {\n $has = !empty($this->getSetting('custom_context_setting_url'));\n if (!$has) {\n $has = self::hasApiHook(self::$TOOL_SETTINGS_SERVICE_HOOK, $this->getConsumer()->getFamilyCode());\n }\n return $has;\n }", "title": "" }, { "docid": "f887e6abb61ba8d72df9278a8b217a27", "score": "0.49099445", "text": "public function isTotpAuthenticationEnabled(): bool\n {\n return null !== $this->totpAuth\n && TOTPAuth::PROVIDER_GOOGLE_AUTHENTICATOR !== $this->totpAuth->getProvider()\n && !empty($this->totpAuth->getTopSecret())\n && true === $this->totpAuth->isEnabled();\n }", "title": "" }, { "docid": "02e673f008f96ce2559be9ff2961bd8c", "score": "0.49076587", "text": "public function getTotalNumberOfEnabledSightTickets()\n {\n $qb = $this->createQueryBuilder('st');\n\n return (int) $qb->select('COUNT(st)')\n ->where($qb->expr()->eq('st.enabled', true))\n ->getQuery()\n ->getSingleScalarResult();\n }", "title": "" }, { "docid": "a8006bd2892dea593010dce5836c49cb", "score": "0.49021748", "text": "public function checkFilterPredicates() {\n\n\t\t$this->TrendingTopic = ClassRegistry::init('TrendingTopic');\n\n\t\t$now = date('Y-m-d H:i:s', time());\n\t\t$aTimeAgo = date('Y-m-d H:i:s', time()-(60*5));\n\t\t$lastCheckTT = CakeSession::read('last_check_tt');\n\n\t\tif (!$lastCheckTT || $lastCheckTT<$aTimeAgo) {\n\t\t\t// First, we set the current TTs from Twitter REST API\n\t\t\t$this->TrendingTopic->setTrendingTopicsTwitter();\n\t\t\tCakeSession::write('last_check_tt',$now);\n\t\t\techo \"Update TTs!\".PHP_EOL;\n\t\t} else {\n\t\t\techo \"Won't update TTs yet. Last time checked: \".$lastCheckTT.PHP_EOL;\n\t\t}\n\n\t\t// We get them from store\n\t\t$trendingTopics = $this->TrendingTopic->find('all',array(\n\t\t\t'conditions' => array(\n\t\t\t\t'current' => 1,\n\t\t\t\t'active' => 1\n\t\t\t)\n\t\t));\n\n\t\t$track = array();\n\t\tforeach ($trendingTopics as $trendingTopic) {\n\t\t\tarray_push($track,$trendingTopic['TrendingTopic']['topic']);\n\t\t}\n\n\t\t$this->setTrack($track);\n\t\tprint_r($track);\n\n\t\techo \"Updated track!\".PHP_EOL.PHP_EOL.PHP_EOL.PHP_EOL.PHP_EOL;\n\t}", "title": "" }, { "docid": "7b206dc9f11eb95e91dc95dc97e4e26f", "score": "0.4899423", "text": "public function isRssEnabled(){\r\n return Mage::getStoreConfigFlag('rss/config/active') && Mage::getStoreConfigFlag('zozoconcepts_blog/blog/rss');\r\n }", "title": "" }, { "docid": "3d4b028ca938a7ed77ef09f553e24028", "score": "0.4897632", "text": "public function getTweetedMessage()\n {\n return Mage::getStoreConfig('rewards/twitter/tweetedMessage');\n }", "title": "" }, { "docid": "70979ac674a63ed8f938315afee1225e", "score": "0.48935315", "text": "public function fanTweets(Request $request)\n {\n $count = $request->input('count') ? $request->input('count') : 5;\n\n $oauth_access_token = Settings::where('label', 'twitter_oauth_access_token')->limit(1)->pluck('value')[0];\n $oauth_access_token_secret = Settings::where('label', 'twitter_oauth_access_token_secret')->limit(1)->pluck('value')[0];\n $consumer_key = Settings::where('label', 'twitter_consumer_key')->limit(1)->pluck('value')[0];\n $consumer_secret = Settings::where('label', 'twitter_consumer_secret')->limit(1)->pluck('value')[0];\n\n $settings = array(\n 'oauth_access_token' => $oauth_access_token,\n 'oauth_access_token_secret' => $oauth_access_token_secret,\n 'consumer_key' => $consumer_key,\n 'consumer_secret' => $consumer_secret,\n );\n\n $url = 'https://api.twitter.com/1.1/search/tweets.json';\n $requestMethod = 'GET';\n $getfield = \"?q=%23odezenne&result_type=mixed&count={$count}\";\n\n $twitter = new TwitterAPIExchange($settings);\n $tweets = $twitter->setGetfield($getfield)\n ->buildOauth($url, $requestMethod)\n ->performRequest();\n\n $tweets = json_decode($tweets);\n\n foreach ($tweets->statuses as &$tweet) {\n $url = 'https://publish.twitter.com/oembed';\n $getfield= \"url=https://twitter.com/{$tweet->user->screen_name}/status/{$tweet->id}&omit_script=true\";\n $html = $twitter->setGetfield($getfield)\n ->buildOauth($url, $requestMethod)\n ->performRequest();\n $tweet->html = json_decode($html)->html;\n }\n\n return response()->json($tweets->statuses);\n }", "title": "" }, { "docid": "562a222e75c8202fd3493ba34eff3c9f", "score": "0.48880538", "text": "public function test_is_token_set() {\n $this->assertTrue($this->authplugin->is_wstoken_set());\n }", "title": "" }, { "docid": "0701eff7d12f0859a3be25b48a525ad3", "score": "0.4885425", "text": "public function hasStats()\n {\n return $this->isApc();\n }", "title": "" }, { "docid": "256d2fd07797ed5657b5ddae58e78650", "score": "0.48833883", "text": "public function hasWeekcount(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "bd348993f571bda36c588bc17a04aafe", "score": "0.488178", "text": "function testIsComingFromTwitter() {\n\t\n\t\t// Spoofing the HTTP_REFERER for purposes of this test and the companion blog post\n\t\t$_SERVER['HTTP_REFERER'] = 'http://twitter.com';\n\t\t$this->assertTrue( $this->plugin->is_from_twitter(), 'is_from_twitter() will return true when the referring site is Twitter.' );\n\t\t\n\t}", "title": "" }, { "docid": "5139bf4ae1014eadbc3c27a72798234f", "score": "0.48714948", "text": "function getNumOfYoutubeTweets($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://urls.api.twitter.com/1/urls/count.json\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, 'url=' . $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n $output = curl_exec($ch);\n curl_close($ch);\n $numOfTweets = json_decode($output);\n return $numOfTweets->count;\n}", "title": "" }, { "docid": "2438f2e177816210789dfcb37b26be47", "score": "0.48692426", "text": "public function fetchTweets()\n {\n \n // 1.) Get rate limit for timeline API and fetch an according amount of accounts for that\n if ($rateLimit = $this->rateLimitUtility->getRateLimitForMethod('statuses', 'user_timeline')) {\n\n $limit = ($rateLimit > intval($this->settings['max_fetch'])) ? intval($this->settings['max_fetch']) : $rateLimit;\n if (\n ($limit > 0)\n && ($accounts = $this->accountRepository->findAllSortedByLastFetchTimeline($limit))\n ){\n\n /** @var \\Madj2k\\TwitterAnalyser\\Model\\Account $account */\n foreach ($accounts as $account) {\n $this->fetchTweetsOfAccount($account);\n\n $account->setFetchTimelineTimestamp(time());\n $this->accountRepository->update($account);\n sleep(1);\n }\n\n // update rate limit\n $remainingRateLimit = $this->rateLimitUtility->setRateLimitForMethod('statuses', 'user_timeline', count($accounts));\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('Fetched timeline tweets for %s account(s). Remaining rate limit is %s.', count($accounts), $remainingRateLimit));\n } else {\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('No timeline tweets fetched. Rate limit reached or no accounts available.'));\n }\n }\n\n // 2.) Get rate limit for search APIand fetch an according amount of accounts for that\n if ($rateLimit = $this->rateLimitUtility->getRateLimitForMethod('search', 'tweets')) {\n\n $limit = ($rateLimit > intval($this->settings['max_fetch'])) ? intval($this->settings['max_fetch']) : $rateLimit;\n if (\n ($limit > 0)\n && ($accounts = $this->accountRepository->findAllSortedByLastFetchAddressed($limit))\n ){\n\n /** @var \\Madj2k\\TwitterAnalyser\\Model\\Account $account */\n foreach ($accounts as $account) {\n $this->fetchTweetsAddressedToAccount($account);\n\n $account->setFetchAddressedTimestamp(time());\n $this->accountRepository->update($account);\n sleep(1);\n }\n\n // update rate limit\n $remainingRateLimit = $this->rateLimitUtility->setRateLimitForMethod('search', 'tweets', count($accounts));\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('Fetched addressed-to tweets for %s account(s). Remaining rate limit is %s.', count($accounts), $remainingRateLimit));\n } else {\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('No addressed-to tweets fetched. Rate limit reached or no accounts available.'));\n }\n }\n }", "title": "" }, { "docid": "fed821955d41904ef8283d72bed2cfe4", "score": "0.4866199", "text": "public function hasTiers()\n {\n return $this->current()->hasTiers();\n }", "title": "" }, { "docid": "c59ddcba00c28f5eaaabefe521541425", "score": "0.48639867", "text": "function mkdf_twitter_theme_installed() {\n\t\treturn defined( 'MIKADO_ROOT' );\n\t}", "title": "" }, { "docid": "71bd896321f98c26699eea98e9dfc775", "score": "0.48553327", "text": "public static function hasT3SphinxThemeRtd()\n {\n $sphinxSourcePath = static::getSphinxSourcesPath();\n $setupFile = $sphinxSourcePath . 't3SphinxThemeRtd/setup.py';\n return is_file($setupFile);\n }", "title": "" }, { "docid": "87675599031302e7e214c24d388bcb60", "score": "0.4845332", "text": "public function getThemeSharecount()\n {\n return $this->theme_sharecount;\n }", "title": "" }, { "docid": "636c8db77492a7750511b1429bb3a328", "score": "0.48424003", "text": "public function hasMultipleweekcount(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "73936a0c97c7d1f8bbe57ef60c080e6b", "score": "0.48364937", "text": "public function hasLeveluptime(){\n return $this->_has(15);\n }", "title": "" }, { "docid": "75d8a859ab78bfe0aa09127b9f13c1b6", "score": "0.48355043", "text": "public function hasStatuses()\n {\n return true;\n }", "title": "" }, { "docid": "75d8a859ab78bfe0aa09127b9f13c1b6", "score": "0.48355043", "text": "public function hasStatuses()\n {\n return true;\n }", "title": "" }, { "docid": "f868d5da5ee93ef80f2b1fbdae6bee28", "score": "0.48332503", "text": "public function isConfigured() {\n\t\t$systemToken = $this->getSystemToken();\n\t\t$secretKey = $this->getSecretKey();\n\t\treturn (!empty($systemToken) AND !empty($secretKey));\n\t}", "title": "" }, { "docid": "00883e7d379675463a98fffa72653be3", "score": "0.48284435", "text": "function osc_search_alert_subscribed() {\n return View::newInstance()->_get('search_alert_subscribed')==1;\n }", "title": "" }, { "docid": "f178bb69bd97112d4bb255f7d0e88f95", "score": "0.4823692", "text": "function twentynineteen_comment_count() {}", "title": "" }, { "docid": "4c2662d67822c527b1ddc0013314d0fa", "score": "0.48227325", "text": "public function enabled()\n {\n return (bool) config('koel.youtube.key');\n }", "title": "" }, { "docid": "ab72045b67ff6c7c2e92210c00426133", "score": "0.48225275", "text": "protected function hasPreferenceCasts()\n {\n return property_exists($this, 'preference_casts') && is_array($this->preference_casts);\n }", "title": "" }, { "docid": "ae21180de11fdbc8420bdb055cc65fc3", "score": "0.4818596", "text": "public function getTalksCount()\n {\n return $this->count(self::TALKS);\n }", "title": "" }, { "docid": "705189f39034c301be424067613349c7", "score": "0.48176372", "text": "public function hasCount(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "a0deb9f0d698af5befb9021a829ef3e2", "score": "0.4817048", "text": "function getTweets($user,$list,$numTweets){\n\t\t\t$peticion = null;\n\n\t\t\t/* Parametros de autenticacion de la aplicacion de Twetter */\n\t\t\t$settings = array(\n\t\t\t\t'oauth_access_token' => \"4038782833-UZ8pLocc1mxAhASEi7oQa8e3tenCgGHK2feNh9F\",\n\t\t\t\t'oauth_access_token_secret' => \"hjG2zVHs59nKo4tISJJWF532VhrtK68zoQddNG8KAe0ZM\",\n\t\t\t\t'consumer_key' => \"Zf1DO4AOIaavguF9JRw0tQijo\",\n\t\t\t\t'consumer_secret' => \"4eWaOt4dDiHWWGVL0BUA9RuUN8wQB0jnccuzZtgdk8dVonQCEF\"\n\t\t\t);\n\n\t\t\tif( empty($user) && empty($list) ){\n\t\t\t\t/* Se debe de obtener todos los tweets del timeline */\n\t\t\t\t$url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';\n\t\t\t\t/* Se restringe el numero de tweets a obtener */\n\t\t\t\t$getfield = '?count='.$numTweets.'&include_rts=false';\n\t\t\t}\n\t\t\telseif( !empty($user) && !empty($list) ){\n\t\t\t\t/* Se debe de obtener los tweets de la lista especificada */\n\t\t\t\t$url = 'https://api.twitter.com/1.1/lists/statuses.json';\n\t\t\t\t/* Se restringe el numero de tweets a obtener */\n\t\t\t\t$getfield = '?slug='.$list.'&owner_screen_name='.$user.'&count='.$numTweets.'&include_rts=false';\n\t\t\t}\n\t\t\telseif( !empty($user) && empty($list) ){\n\t\t\t\t/* Se debe de obtener solo tweets del usuario especificado */\n\t\t\t\t$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';\n\t\t\t\t/* Se restringe el usuario y el numero de tweets a obtener */\n\t\t\t\t$getfield = '?screen_name='.$user.'&count='.$numTweets.'&include_rts=false';\n\t\t\t}\n\n\t\t\t/* Se debe de obtener los tweets de la lista especificada */\n\t\t\t#$url = 'https://api.twitter.com/1.1/search/tweets.json';\n\t\t\t/* Se restringe el numero de tweets a obtener */\n\t\t\t#$getfield = '?q=%23superbowl&result_type=recent';\n\n\t\t\tif( !empty($url) ){\n\t\t\t\t/* Se especifica el metodo para la peticion */\n\t\t\t\t$requestMethod = 'GET';\n\n\t\t\t\t/* Se crea la instancia de la clase con los parametros especificados */\n\t\t\t\t$twitter = new TwitterAPIExchange($settings);\n\n\t\t\t\t/* Se realiza la peticion */\n\t\t\t\t$peticion = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();\n\t\t\t}\n\n\t\t\t/* Se retorna el resultado de la peticion en formato json */\n\t\t\treturn $peticion;\n\t\t}", "title": "" }, { "docid": "c73722514a3577756c4b4854e10ca4c1", "score": "0.48081622", "text": "function shouldCountNumberOfWords() {\r\n $counter = new WordCounter(\"Keep the bar green to keep the code clean.\");\r\n // TODO Check that 9, $counter->numberOfWords().\r\n }", "title": "" }, { "docid": "46fa8c14dfec886c440fd9212f00d2ae", "score": "0.4800582", "text": "public function isEnabled()\n\t{\n\t\t$this->remote_url = $this->params->get('autoimport_url', '');\n\t\t$this->freq = $this->params->get('autoimport_freq', 0);\n\n\t\t// Do not run if we don't have an URL or a frequency set\n\t\treturn ($this->remote_url && ($this->freq > 0));\n\t}", "title": "" }, { "docid": "368f1d79c85fe109e4d195e2d09e2949", "score": "0.4799815", "text": "public function hasAuthTicket()\n {\n return $this->get(self::AUTHTICKET) !== null;\n }", "title": "" } ]
5dcb9175ab81057d47b6644fd8fc2ba9
/ Get all requisito activo
[ { "docid": "7c46647d6890d31d641e301f03db0808", "score": "0.7998188", "text": "function get_all_requisitoactivo()\n {\n $requisito = $this->db->query(\"\n SELECT\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\n FROM\n `requisito` r\n left join beca b on r.beca_id = b.beca_id\n left join estado e on r.estado_id = e.estado_id\n WHERE\n r.estado_id = 9\n ORDER BY `requisito_nombre` ASC\n \")->result_array();\n \n return $requisito;\n }", "title": "" } ]
[ { "docid": "bcd45e9a331148b173bdb52aeaa36c80", "score": "0.72356415", "text": "public function ListarInactivos()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=0\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "7942acb528530ee5e719ff2c86829c4b", "score": "0.7191359", "text": "function get_all_requisito()\n {\n $requisito = $this->db->query(\"\n SELECT\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\n FROM\n `requisito` r\n left join beca b on r.beca_id = b.beca_id\n left join estado e on r.estado_id = e.estado_id\n ORDER BY `requisito_nombre` ASC\n \")->result_array();\n \n return $requisito;\n }", "title": "" }, { "docid": "2e0641c4410fee92fec3496b7b9831a0", "score": "0.7186182", "text": "public static function getAll(){\n if(!isset($_SESSION)) session_start();\n $actividades = new Actividad();\n return $actividades->getAllActividades();\n }", "title": "" }, { "docid": "0a9a48437bef3b432be54e573dc13825", "score": "0.6943439", "text": "static function getAllActive() {\n\n\t\treturn TipoFamilia::All()->where('activo',1);\n\t}", "title": "" }, { "docid": "94fb5dac6a17772f2ddb0f4dd0fc5f32", "score": "0.68217033", "text": "public function get_all() {\n print_r($_SESSION);\n $this->db->select('activos.id, activos.fecha_compra, activos.monto_compra_sin_impuestos, activos.tipo, activos.descripcion');\n $this->db->from('activos');\n $this->db->join('personas', 'personas.id = persona_id');\n $this->db->where('personas.id', $_SESSION['persona_id']);\n $this->db->where('activos.status', 1);\n $result = $this->db->get();\n return $result->result_array();\n }", "title": "" }, { "docid": "9671e43d075eac3ff1745d84dd799b1c", "score": "0.6639607", "text": "public function ConsultarActivosSimple(){\n $sql = \"SELECT idactivo, activo, AC.detalle AS categoria FROM activo A LEFT JOIN activo_categoria AC ON A.idactivo_categoria = AC.idactivo_categoria\";\n $query = $this->conexion->query($sql);\n return $query;\n }", "title": "" }, { "docid": "9c160244c6f457aed1646bb062c8b2a3", "score": "0.65792596", "text": "public static function getAllTblnivelaccesoAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblniveleacceso WHERE tblniveleacceso_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "822aefa4e064e3823eab0d8d13903857", "score": "0.6567682", "text": "public static function getAllTblusuarioproveedorAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblusuarioproveedor WHERE tblusuarioproveedor_activado = ? \";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8afd77f1d84c202f8432da664276113f", "score": "0.6489286", "text": "public function getActividad()\n\t\t{\n\t\t\t$query = \"select * from act_economica\";\n\t\t\t$this->conexionDAO->Abrir();\n\t\t\t$resultado = $this->conexionDAO->select($query);\n\t\t\t$actividades = array();\n\t\t\twhile($row = $resultado->fetch_array()) \n\t\t\t{\n\t\t\t\t$actividad = new Actividad();\n\t\t\t\t$actividad->id = $row[\"ID\"];\n\t\t\t\t$actividad->detalle = $row[\"DETALLE\"];\n\t\t\t\t\n\t\t\t\t$actividades[] = $actividad;\n\t\t\t} \n\t\t\t$this->conexionDAO->Cerrar();\n\t\t\treturn $actividades;\n\t\t}", "title": "" }, { "docid": "871ae64948ceae2b1338451b0709daea", "score": "0.64850575", "text": "public function serviciosActivos(){\n return Servicio::where('estado', '=', 'activo')->orderBy('visitas','desc')->get();\n \n }", "title": "" }, { "docid": "4fefdae71073e4c6a584bd911520fab5", "score": "0.6432139", "text": "public static function getAllTbleventoAct(){\n\t \n\t $activado = 1;\n\t\t$consulta = \"SELECT * FROM tblevento WHERE tblevento_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e76f42d5cb569c8f019a86f751d83f0b", "score": "0.64252365", "text": "public static function getAllTblproveedoraAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproveedor WHERE tblproveedor_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f171a3cf6b9d8082e870c3385a3f1de3", "score": "0.6414372", "text": "public function ObtPosicionActivos()\n\t{\n\t\t$sql = \"SELECT * FROM posicion WHERE estatus = 1\";\n\t\t$resp = $this->db->consulta($sql);\n\t\t$cont = $this->db->num_rows($resp);\n\n\n\n\t\t$array=array();\n\t\t$contador=0;\n\n\t\tif ($cont>0) {\n\n\t\t\t\n\t\t\twhile ($objeto=$this->db->fetch_object($resp)) {\n\n\t\t\t\t$array[$contador]=$objeto;\n\t\t\t\t$contador++;\n\t\t\t} \n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "b34d12928e94098bf7a5a2012b50eae0", "score": "0.64113796", "text": "public function consultarActividadesModel(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM actividad WHERE eliminado=0\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}", "title": "" }, { "docid": "3f2e68d05974f4652fc7d34ad19f10df", "score": "0.6405063", "text": "public static function getAllTblproductcotizadorAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproductcotizador WHERE tblproductcotizador_activado = ? \";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1790800bf7fc2cd21c843440a80a8204", "score": "0.64002305", "text": "public static function getAllTblproductoAct(){\n \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproducto WHERE tblproducto_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fe3d2264463085477656fcb8c157c9f4", "score": "0.63770044", "text": "public function findUsariosActividad()\n {\n $sql = \"SELECT * FROM actividad INNER JOIN tipoActividad ON actividad.tipoActividad = tipoactividad.idTipoActividad INNER JOIN abuelito ON actividad.abuelito_idAbuelito = abuelito.idAbuelito INNER JOIN usuarios on actividad.usuario_idUsuario = usuarios.idUsuario WHERE idUsuario\";\n $finded = $this->db->query($sql);\n return $finded->fetch_object();\n }", "title": "" }, { "docid": "bdce213598cb414397078e9f86a27cbc", "score": "0.63707", "text": "public function getListActivar()\n {\n\n $sql = \"SELECT cod_distribuidor\n FROM distribuidor\n WHERE distribuidor.cod_estado = 2\n \";\n $list = array();\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n while ($row = pg_fetch_array($resultado)) {\n $item = new Distribuidor();\n $item->setCod_distribuidor($row[0]);\n \n array_push($list, $item);\n\n }\n return $list;\n\n }", "title": "" }, { "docid": "cb3efc93998c70a03f16d8d372d0ec8e", "score": "0.6350027", "text": "public function All()\n {\n return prueba::get();\n }", "title": "" }, { "docid": "c5b05883a4a7c5a8603c91d9047ccc40", "score": "0.63434", "text": "public function getComentarios(){\n\t\t$sql = \"SELECT c.Comentario, cli.Usuario FROM comentarios c, cliente cli, producto p where c.IdCliente=cli.IdCliente and p.IdProducto=c.IdProducto and c.Estado=1\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "0138d8efd99c97846a503da08c2aac0b", "score": "0.6341955", "text": "public static function getAllTblproductcomplemAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproductcomplem WHERE tblproductcomplem_activado= ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n \t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "05439ff977893b992b8849b80e490513", "score": "0.63194066", "text": "public static function getAllTblcupondescuentoAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblcupondescuento WHERE tblcupondescuento_activado = ? \";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8ee7c186f9344d1619da865114068f19", "score": "0.6309338", "text": "public function consultarActividadModel(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM actividad WHERE eliminado=0\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}", "title": "" }, { "docid": "ed524339b608ded809dac9530fa88336", "score": "0.63085026", "text": "function obtenerNivelesDeCriticidad(){\n $resultados=$this->as_array()->get_all();\n return $resultados;\n }", "title": "" }, { "docid": "689045280e69d1710a57b9b4d71fddba", "score": "0.6305962", "text": "public function consultarSesionActivaModel(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM sesion inner join alumno on sesion.id_alumno = alumno.id_alumno inner join actividad on sesion.id_actividad = actividad.id_actividad inner join maestro on sesion.id_maestro = maestro.id_maestro\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}", "title": "" }, { "docid": "0630cde8258b5779acb95830d3ab04c1", "score": "0.629903", "text": "public function getAll(){\n return $this->acteurArray;\n }", "title": "" }, { "docid": "5424f5a626a2627eeb1755a659111cd1", "score": "0.6297407", "text": "public function getListeAccompagnateurs() {\n\t\t$sql = \"SELECT * FROM \" . P . \"accompagnateur\";\n\n\t\t$this->result = $this->executeRequete($sql); // Requête simple\n\n\t\treturn $this->result->fetchall(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "89870fe4ab36ba2cab1bd21d39c53005", "score": "0.62823594", "text": "public function obtenerCampaniasActivas( $cliente = \"\" ){\r\n try{\r\n\r\n //// chequeo de parametros\r\n if( strcmp($cliente, \"\") == 0 ){\r\n throw new Exception(__CLASS__ . \"::\" . __METHOD__ . \" - line \" . __LINE__ . \" - :: \" . Mensajes::getMensaje( '001', array('cliente') ), 1);\r\n }\r\n // obtengo las campanias para un cliente determinado\r\n $consulta = ' SELECT * '.\r\n ' FROM campania '.\r\n ' WHERE activa = 1 AND '.\r\n ' fecha_fin_campania >= NOW() AND '.\r\n ' id_cliente = ? ';\r\n\r\n $rows\t = $this->basedatos->ExecuteQuery($consulta, array( $cliente ));\r\n\r\n $salida = array();\r\n foreach ( $rows as $k => $v){\r\n $salida[$v->id] = $v;\r\n }\r\n return $salida;\r\n }\r\n catch(Exception $e ) {\r\n\t\t\t $this->error = 1;\r\n throw $e;\r\n }\r\n }", "title": "" }, { "docid": "f75e46233aadd88794c953eb673559d1", "score": "0.62740034", "text": "public function listarAceitas(){\n $pdo = Database::conexao();\n $result = $pdo->query(\"SELECT r.*, u.idUsuario, u.nomeUsuario,d.nomeDisciplina, d.idDisciplina, c.idCurso, c.nomeCurso FROM tb_reserva r, tb_usuario u, tb_disciplina d, tb_curso c\n WHERE statusReserva='Aceita' AND u.idUsuario=r.idUsuarioFk and d.idDisciplina=r.idDisciplinaFk AND c.idCurso= d.idCursoFk\");\n $linhas = $result->fetchAll(\\PDO::FETCH_ASSOC);\n return $linhas;\n }", "title": "" }, { "docid": "b41cdf5c453688feb1aabc79f721be30", "score": "0.625947", "text": "function get_all_requisito_beca($beca_id)\n {\n $requisito = $this->db->query(\"\n SELECT\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\n FROM\n `requisito` r\n left join beca b on r.beca_id = b.beca_id\n left join estado e on r.estado_id = e.estado_id\n WHERE\n r.beca_id = 0 or r.beca_id = $beca_id\n ORDER BY `requisito_nombre` ASC\n \")->result_array();\n \n return $requisito;\n }", "title": "" }, { "docid": "54800442b305442bc75bc797d5200d38", "score": "0.6227341", "text": "public function obtener_trabajadores_activados(){\n try {\n $sql= \"SELECT * FROM `trabajadores` t1 INNER JOIN \".Cocineros::TABLA[0].\" t2 ON t1.dni = t2.dni WHERE t2.estado=1\";\n $resultado=$this->conexion->query($sql);\n //$salida = $resultado->fetch_object();\n\n $objetos=array();\n\n while ($fila=$resultado->fetch_object()){\n $objetos[]=$fila;\n }\n\n return $objetos;\n \n } catch (Exception $ex) {\n $salida = 'error '.$ex;\n return $salida;\n }\n }", "title": "" }, { "docid": "417864ed8dbfe5536a0b683d11814b66", "score": "0.6226251", "text": "public function listar() {\n $sql = \"SELECT nombre,descripcion,estado,id_fabricante from marca where estado='disponible'\";\n $this->objCon->Execute($sql);\n }", "title": "" }, { "docid": "2e5af48d0fe813dc77e165943204654d", "score": "0.621864", "text": "public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=1\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "da4aec081eda41f35539d746d7844600", "score": "0.6215112", "text": "public function findAllActives(){\n return $this->createQueryBuilder('c')\n ->andWhere('c.isActive = :active')\n ->setParameter('active', true)\n ->getQuery()\n ->execute();\n }", "title": "" }, { "docid": "241e96102d7567cc8278d7fd1e7cc72a", "score": "0.6202064", "text": "public function getBuscarRegistros()\n {\n return $this->repository->reserva->getTodasReservas();\n }", "title": "" }, { "docid": "1232fdccad2ef4b1bdd04066299ab098", "score": "0.6200199", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM comentarios';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "14d9e0ea8dccd3eb15798c479b11ec25", "score": "0.6184122", "text": "public function obtenerClientesActivos(){\r\n try{\r\n $consulta = ' SELECT * '.\r\n ' FROM cliente '.\r\n ' WHERE activo = 1 ';\r\n\r\n }\r\n catch(Exception $e ) {\r\n\t\t\t $this->error = 1;\r\n throw $e;\r\n }\r\n }", "title": "" }, { "docid": "1f364bdbe268993751d981754958152e", "score": "0.6168495", "text": "public static function getAll(){\n if(Auth::check()){\n return self::where('estatus', true)\n ->where('id_inversionista', Auth::user()->inversionista->id)\n ->get()\n ->toArray();\n }\n }", "title": "" }, { "docid": "db2b1d152a2943eb8f80d56283f710e8", "score": "0.61523956", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM caja_pagoefectivo';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "fcfdaf81aac8e688a9496787dab52c3c", "score": "0.61502534", "text": "public function all()\n {\n return $this->pdo->query(\"SELECT * FROM produits WHERE 1\")->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "793e25b58ff975ad798d51ac25064e07", "score": "0.6114401", "text": "public static function getAllTblpaisAct(){\n\t \n\t\t$activado = 1;\n\t\t$consulta = \"SELECT * FROM tblpais WHERE tblpais_activado = ?\";\n\t\t\n\t\ttry{\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos de todos los registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5022be2a264f86e83661ab4f4f797f22", "score": "0.6112469", "text": "public function listaDeEmpleadoActivos()\n {\n $sqlListaEmpleadosActivos = \"\n SELECT idEmpleado, ci, CONCAT_WS(' ',primerNombre,segundoNombre,apellidoPaterno,\n apellidoMaterno)as nombreEmpleado,celular, estado\n FROM empleado\n WHERE estado = 1\n ORDER BY primerNombre,segundoNombre,apellidoPaterno,apellidoMaterno;\";\n $cmd = $this->conexion->prepare($sqlListaEmpleadosActivos);\n $cmd->execute();\n $listaDeEmpleadosConsulta = $cmd->fetchAll();\n return $listaDeEmpleadosConsulta;\n }", "title": "" }, { "docid": "1d8f45e95261a062c72645353bf36185", "score": "0.61037225", "text": "public function obtActividades(Request $request)\n\t{\n\t\ttry {\n\t\t\t$nombre_sp = 'FOA_obtActividadesXFolio';\n\t\t\t$arrayParametros = array();\n\n\t\t\t// Obtener los parametros del request\n\t\t\t$arrayParametros[0] = $request->has(\"id\") ? $request->input(\"id\") : 0; // id del folio\n\t\t\t//$arrayParametros[1] = $request->has(\"usuario_id\") ? $request->input(\"usuario_id\") : 1;\n\n\t\t\t// Ejecutar SP Base de datos\n\t\t\t$responseSP = DB::select(\"CALL psm.\".$nombre_sp.\"(?);\", [$arrayParametros[0]]);\n\n\t\t\treturn $this->formatearRespuesta($responseSP, 200, 1);\n\t\t} catch (\\Throwable $th) {\n\t\t\tthrow $th;\n\t\t\treturn $this->formatearRespuesta([], 500, 2, 0, \"Error al procesar la solicitud\");\n\t\t}\n\t}", "title": "" }, { "docid": "8fdc7d3a3dc0750d6055f166c69f8da7", "score": "0.60967994", "text": "public function getEmpActivos($con)\n {\n $result=$this->adapter->query(\"select * \n from a_empleados \n where estado=0 \".$con.\" order by nombre,apellido\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "389305259271ec7c2a4a9b2a31703c38", "score": "0.60397106", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM auditoriaingreso';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "389306afd996d4e8e17c14e28d9f600a", "score": "0.6036305", "text": "public static function getAllTblmoduloventabpAct(){\n\t \n\t $activado = 1;\n\t\t$consulta = \"SELECT * FROM tblmoduloventabp WHERE tblmoduloventabp_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5de713cdea6b16f17415134855223ab5", "score": "0.60277", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM complejos_apartamentos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "9b5b9ec299f55db90fb76b79cc9d8844", "score": "0.6008884", "text": "function getActores($criterio, $orden) {\r\n $actores = null;\r\n $sql = \"select * from documento_actor where \" . $criterio . \" order by \" . $orden;\r\n //echo ($sql.\"<br>\");\r\n $r = $this->db->ejecutarConsulta($sql);\r\n if ($r) {\r\n $cont = 0;\r\n while ($w = mysql_fetch_array($r)) {\r\n $actores[$cont]['id'] = $w['doa_id'];\r\n $actores[$cont]['nombre'] = $w['doa_nombre'];\r\n $actores[$cont]['sigla'] = $w['doa_sigla'];\r\n $cont++;\r\n }\r\n }\r\n return $actores;\r\n }", "title": "" }, { "docid": "a156a17f3e0d8ad66ed59e29d9700007", "score": "0.60005575", "text": "function getActivo() {\n return $this -> activo;\n }", "title": "" }, { "docid": "329c7a8813bfdb62c7c95c444bdc1251", "score": "0.5992267", "text": "public function listar()\n\t{\n\t\t$sql=\"SELECT * FROM permiso\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "87ef75afc06a1e94326cf088f4723ad5", "score": "0.5990898", "text": "public function revRequisitos()\n {\n return $this->hasMany('App\\Models\\RevRequisito','cia_id','id');\n }", "title": "" }, { "docid": "3cea005f17d9f4223a96d96ecf54de57", "score": "0.5989824", "text": "public function index()\n {\n return TipoCuenta::all();\n }", "title": "" }, { "docid": "bb74fb5dd9111cde8a7220e7e1c7766c", "score": "0.59767103", "text": "function consultar(){\n\t\t//entonces listo los alumnos\n\t\tif(!isset($_REQUEST['accion'])){\n\t\t\t$curso_array = $this->modelo->cursoTodo();\t\n\t\t\t\t//incluir la vista para listar\n\t\t\t\tinclude('vista/cursoTabla.php');\n\t\t\t\t$vista = new cursoTabla();\n\t\t\t\t$vista -> mostrar_tabla($curso_array);\n\t\t}\n\t}", "title": "" }, { "docid": "befc82140a40bac695ec87707e7505bc", "score": "0.5976573", "text": "public function listar(){\n\t\t$sql=\"SELECT * FROM permiso\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "246729ae17400680995748fb81457942", "score": "0.5971648", "text": "public function readAll()\n {\n $sql = 'SELECT id_compra, direccion_env, impuestos, total, precio_env, nombres_cliente, estado From compra\n INNER JOIN clientes USING (id_cliente)\n INNER JOIN Estado_de_Compra USING (id_estado_de_comp)\n ORDER BY estado';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "7a01694d52fbee18689eeb0c46f764b2", "score": "0.5967634", "text": "public function usuariosActivos()\n\t{\n\t\t$busqueda = trim(\\Input::get('busqueda'));\n\t\t$estado = 1;\n\n\t\t$textobuscado=\"\";\n\n\t\tif ($busqueda == \"\")\n\t\t{\n\t\t\t// si el input de busqueda está vacio no es necesario realizar acciones \n\t\t}\n\t\telse if ($busqueda != \"\")\n\t\t{\n\t\t\t$textobuscado = $busqueda;\n\t\t\t//$usuarios = $this->usuarioRepo->busquedaUsuariosPorNombre($busqueda, $estado);\n\t\t\t\n\t\t\t$cuentas = $this->cuentaRepo->busquedaCuentasPorCorreoEstado($busqueda, $estado);\n\n\t\t\t# sizeof devuelve el tamaño del argumento recibido\n\t\t\tif (sizeof($cuentas) == 0)\n\t\t\t{\n\t\t\t\treturn \\Redirect::route('lista.usuarios.activos')->with('status_nohaycoincidencias', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'No hay resultados de búsqueda \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t para '.$textobuscado);\n\t\t\t}\n\t\t\t\n\t\t\treturn \\View::make('modulos.super.listausuariosactivos', \n\t\t\t\t\t\t\t\t\tcompact('cuentas','textobuscado', 'rolenvista')\n\t\t\t\t\t\t);\n\t\t}\n\n\t\t$cuentas = $this->cuentaRepo->cuentasActivas();\n\n\t\treturn \\View::make('modulos.super.listausuariosactivos', \n\t\t\t\t\t\t\tcompact('cuentas','textobuscado', 'rolenvista')\n\t\t\t\t);\n\t}", "title": "" }, { "docid": "2d97199736ecfe7d341850fc5129f27e", "score": "0.5964048", "text": "public function obterTodasCompras(){\n $compra = new CompraDAO();\n return $compra->getAll();\n }", "title": "" }, { "docid": "3a8c80cd1be7dda550341862469e07ef", "score": "0.5954499", "text": "public function getOrdenesRecogidas(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar($this -> CitaDAO -> getOrdenesRecogidas());\n $res = $this -> Conexion -> extraer();\n $this -> Conexion -> cerrar();\n return $res[0];\n }", "title": "" }, { "docid": "0ced293e3a9543925e6e72dfeeef44ac", "score": "0.5949738", "text": "public function listar()\n\t{\n\t\t$sql = \"SELECT * FROM permiso\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "9b4554cc626d619023100b5c4c166e7f", "score": "0.5944693", "text": "public function retournerCommissions()\n {\n $requete = $this->db->get('commission');\n return $requete->result_array(); // retour d'un tableau associatif\n // fin retournerAnnees\n }", "title": "" }, { "docid": "bed1b46f491ce141cde25ccadd09e314", "score": "0.5943541", "text": "function listarOrcamentos(){\n $orcamentoSel = new Orcamento();\n if(isset($_GET['texto'])){\n $orcamentoSel->buscarTodos($_GET['texto']);\n }else{\n $orcamentoSel->buscarTodos(\"\");\n }\n\t}", "title": "" }, { "docid": "c4b203e41d59ed06fefd465a50c30b0b", "score": "0.5938843", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM projeto_pesquisador';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "c5d8b7d24637867b630f544a671e3c0a", "score": "0.59377384", "text": "public function obtener_actividad($valor){\n\n \t$act=DB::table('muestra_actividad')->where('id_muestra','=',$valor)->get();\n\n \t$aux=array();\n\n foreach ($act as $key2) {\n \t$aux1=DB::table('actividad')->where('id_actividad','=',$key2->id_actividad)->get();\n \t$aux=array_merge($aux,$aux1);\n }\n\n return $aux;\n\n }", "title": "" }, { "docid": "3f1bb95395cab955a73a2c6abee1115e", "score": "0.5936975", "text": "public static function getAllTblclasifproductAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblclasifproduct WHERE tblclasifproduct_activado= ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4f2431368d3ef57ab041fcc609b28fa7", "score": "0.5934209", "text": "public function findAllActive() {\n return $this->findBy(array('status' => 1));\n }", "title": "" }, { "docid": "48f944cfdd83b424b483326d1bfc1eb6", "score": "0.5932357", "text": "public function getSupervisoresNombresActivos()\n {\n \n $result=$this->adapter->query(\"select a.id,concat(nombre,' ',apellido) as nomComp\n from n_supervisores a\n inner join a_empleados b on b.id=a.idEmp \n where a.estado=0\",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "226581f15ffc9aee2af6f61f33d4c82e", "score": "0.5928845", "text": "function obtener_todos()\n\t{\n\t\t// obetenemos el perfil que esta activo \n\t\t\t\n\t\t$conn = parent::conectar(\"\");\n\t\t\n\t\t$params = array( \n\t\t\t\t\tarray(&$this->idusuario),\n\t\t\t\t\tarray(&$this->password), \t\n\t\t\t\t\tarray(&$this->idempresa) ,\n\t\t\t\t\tarray(&$this->fecha_desde) ,\n\t\t\t\t\tarray(&$this->fecha_hasta),\n\t\t\t\t\tarray(&$this->idcomprobante) \n\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\n\t\t$rs = parent::ejecutar(\"Comprobantes_ObtenerTodos_x_Empresa\",\"SP\",\"\",$conn, $params);\n\n\t\t$array_return = array();\n\t\t\n\t\tif (sqlsrv_has_rows($rs)==0)\n\t\t{\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = sqlsrv_fetch_array($rs, SQLSRV_FETCH_ASSOC))\n\t\t\t{\n\t\t\t array_push($array_return, $row);\n\t\t\t}\n\n\t\t\treturn $array_return;\n\t\t}\t\n\t}", "title": "" }, { "docid": "5cdf3f47474a5be6252be4b4cd805c24", "score": "0.59285146", "text": "public function index() {\n //$user = auth()->user();\n // //dd($user);\n \n //$activos = \\CiberPYME\\Activo::with(array('amenazas',function(Builder $query){\n // $query->with('salvavulneras')->get();\n //}))->get();\n //=>function (Builder $query) {$query->select('tipo','descripcion')}\n\n //dd($activos);\n\n\n return view('activos/list_activos');\n }", "title": "" }, { "docid": "34e98b54eb1e1190a16a536c398cd0bc", "score": "0.5921397", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM reservaciones_pagos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "d2b049a4f29a4161b391869cf755170e", "score": "0.591562", "text": "private function consultarEspacios()\n\t {\n\t \t\t\treturn Espacio::find()->all();\n\t }", "title": "" }, { "docid": "c6a802e86b8b97c6886964359ffc04cb", "score": "0.59149396", "text": "public function PesquisarTodos(){\n try {\n //Conexão com o banco de dados pela classe PDO\n $pdo = Conexao::getinstance();\n //Comando em SQL para pesquisar os dados na tabela estoque_produto\n $sql = \"SELECT * FROM estoque_produto ep INNER JOIN produto p ON(ep.produto=p.id_produto) INNER JOIN estoque e ON(ep.estoque=e.id_estoque)\";\n //Prepara o sql para receber os binds\n $stmt = $pdo->prepare($sql);\n //Executa o SQL\n $stmt->execute();\n //Guarda em um array todos os dados da tabela\n $estoqueprodutos = $stmt->fetchAll(PDO::FETCH_ASSOC);\n //Retorna o array com todos os dados da tabela\n return $estoqueprodutos;\n \n } catch (PDOException $ex) {\n echo \"\".$ex;\n \n }\n }", "title": "" }, { "docid": "81649883baf90b04804d3d65cada663e", "score": "0.5914871", "text": "static public function orden_corte_unique_activas(){\n $sql = \" SELECT DISTINCT OC.orden_corte, OC.fecha_de_corte FROM \" . static::$table_name . \" as OC\";\n $sql .= \" LEFT JOIN enviados_a_servicio as AOC \";\n $sql .= \" ON OC.orden_corte = AOC.orden_corte AND OC.sku = AOC.sku WHERE AOC.sku IS NULL \";\n $sql .= \" ORDER BY OC.fecha_de_corte DESC\";\n //ChromePhp::log($sql);\n return static::find_by_sql($sql);\n }", "title": "" }, { "docid": "de51056193cd7d8ca3d351d521d92a52", "score": "0.59147507", "text": "function dame_todos_ejercicios($activos)\n {\n $this->load->model('tpoadminv1/Generales_model');\n\n if($activos == true){\n $this->db->where('active', '1');\n }\n $query = $this->db->get('cat_ejercicios');\n \n if($query->num_rows() > 0)\n {\n $array_items = [];\n $cont = 0;\n foreach ($query->result_array() as $row) \n {\n \n $array_items[$cont]['id_ejercicio'] = $row['id_ejercicio'];\n $array_items[$cont]['ejercicio'] = $row['ejercicio'];\n $cont++;\n }\n return $array_items;\n }\n }", "title": "" }, { "docid": "a4ed52e8904a3d0f50b1011ba65af675", "score": "0.5905028", "text": "public function list()\n {\n return \\App\\Compromisso::all();\n }", "title": "" }, { "docid": "d6a307827057c44472348d0667f93381", "score": "0.5889122", "text": "public static function getAllTblsistemapagoAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblsistemapago WHERE tblsistemapago_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_STR);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "2aa410f64fcd7f4933219865a9f267f4", "score": "0.5884585", "text": "public static function findAllActive()\n {\n return static::find()->active()->all();\n }", "title": "" }, { "docid": "29a946d8d9caf7314f669e8f06bdd4fd", "score": "0.5881597", "text": "public function readAll()\n {\n // Se hace la consullta para llevar a cabo la acción\n $sql = 'SELECT id_compra,fecha_compra, nombre_cliente,estado_compra\n FROM compra INNER JOIN clientes USING(id_cliente)\n ORDER BY id_compra';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "dd557fcf5403ed98c83a5b7779c858f9", "score": "0.587411", "text": "public function PesquisarTodos()\n {\n /* Executa a funçao PesquisarTodos contida na classe DAO e retorna\n seu resultado*/\n return $this->agendaDAO->PesquisarTodos();\n }", "title": "" }, { "docid": "73f3a595a211fe3f1a474799ccad2b1d", "score": "0.5870232", "text": "public function getAll() {\n return (Program::whereIn('status', [1])->orderBy('name', 'asc')->get());\n }", "title": "" }, { "docid": "cdce99550e79c05434900c038d9cf5fe", "score": "0.586174", "text": "public function getConsultores() {\n\t $consultores = CaoUsuario::join('permissao_sistema', 'cao_usuario.co_usuario', '=', 'permissao_sistema.co_usuario')\n ->select('cao_usuario.co_usuario', 'cao_usuario.no_usuario', 'cao_usuario.ds_senha',\n 'cao_usuario.co_usuario_autorizacao', 'cao_usuario.nu_matricula',\n 'cao_usuario.dt_nascimento')\n ->where('permissao_sistema.co_sistema', '=', 1)\n ->where('permissao_sistema.in_ativo', '=', 'S')\n ->whereIn('permissao_sistema.co_tipo_usuario', [0,1,2])->get();\n return $consultores;\n }", "title": "" }, { "docid": "9b021d2d296370cffb6bddc8fc4cc6db", "score": "0.5861466", "text": "function findAll(){\r\n $this->db->where('approve', 0);\r\n return $this->db->get('requests')->result_array();\r\n }", "title": "" }, { "docid": "1036f537c0bebfae0bd48782363a00ed", "score": "0.58454764", "text": "public function getConTalento()\n {\n $result=$this->adapter->query(\"select *, nombre as nomFiltro \n from t_conceptos order by nombre\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "5d1ab649f35d85c6f38867fd76869320", "score": "0.58417785", "text": "public function executeList()\n {\n if($this->getRequestParameter('actividad')) {\n $c = new Criteria();\n $c->add(FuenteActividadPeer::ACTIVIDAD_ID, $this->getRequestParameter('actividad'));\n\n $this->fuente_actividads = FuenteActividadPeer::doSelect($c);\n\n // mostrar la lista de actividades correspondiente al proyecto y mes\n } elseif (($this->getRequestParameter('proyecto')) && ($this->getRequestParameter('mes'))) {\n $c = new Criteria();\n $c->add(ActividadPeer::PROYECTO_ID, $this->getRequestParameter('proyecto'));\n $c->add(ActividadPeer::MES_INICIO_EJECUCION, $this->getRequestParameter('mes'));\n\n $this->actividads = ActividadPeer::doSelect($c);\n\n $this->setTemplate('ListActividades');\n // mostrar formulario de busqueda de actividad\n } else {\n $this->setTemplate('BuscarActividad');\n\n }\n }", "title": "" }, { "docid": "8a136ad935594093645e9045af2d008e", "score": "0.583059", "text": "public function getTodas()\n {\n return $this->registros;\n }", "title": "" }, { "docid": "88ad945ce174fcd8da3be03e53d8d1c8", "score": "0.58304197", "text": "public function executeList()\n {\n if($this->getRequestParameter('actividad')) {\n $c = new Criteria();\n $c->add(LocalidadActividadPeer::ACTIVIDAD_ID, $this->getRequestParameter('actividad'));\n\n $this->localidad_actividads = LocalidadActividadPeer::doSelect($c);\n\n // mostrar la lista de actividades correspondiente al proyecto y mes\n } elseif (($this->getRequestParameter('proyecto')) && ($this->getRequestParameter('mes'))) {\n $c = new Criteria();\n $c->add(ActividadPeer::PROYECTO_ID, $this->getRequestParameter('proyecto'));\n $c->add(ActividadPeer::MES_INICIO_EJECUCION, $this->getRequestParameter('mes'));\n\n $this->actividads = ActividadPeer::doSelect($c);\n\n $this->setTemplate('ListActividades');\n // mostrar formulario de busqueda de actividad\n } else {\n $this->setTemplate('BuscarActividad');\n }\n }", "title": "" }, { "docid": "d0c46f65cc0d1b6979ce001e89be9461", "score": "0.58266246", "text": "public function getActivo(){\n\t\treturn $this->activo;\n\t}", "title": "" }, { "docid": "bf8d8d919f65a959f3eb89b0a18d93c2", "score": "0.58211553", "text": "public static function getAllTblcoloniaAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblcolonia WHERE tblcolonia_activado=?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "18c3ba31791e534b37d2b1996dacded3", "score": "0.5818013", "text": "public function getRequisitosLegales()\n {\n $result=$this->adapter->query(\"select a.id, d.id as idCar, b.nombre as jerarquia, a.numero, a.ano, a.titulo, a.articulo,\n a.descripcion, d.nombre\n from t_requisitos_legales a \n inner join t_gerarquias_req b on b.id = a.idGquia\n inner join t_requisitos_legales_r c on c.idReqLeg = a.id \n inner join t_cargos d on d.id = c.idCar\n order by b.nombre\n \",Adapter::QUERY_MODE_EXECUTE);\n $datos = $result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "3f4b18a138b75af1ffe7d9c9f7491cf7", "score": "0.5812483", "text": "function getAllConteudo() {\r\n /* /// Status do Conteudo\r\n * 0 - pendente\r\n * 1 - publicado\r\n * 2 - rascunho\r\n * 3 - backup\r\n */\r\n\r\n $this->defaultDB->where('status', '1');\r\n $this->defaultDB->order_by(\"titulo ASC\");\r\n return $this->defaultDB->get(self::TABLE);\r\n }", "title": "" }, { "docid": "d07ace32def4c0dcd39e0b2925c0049b", "score": "0.5812335", "text": "public function riesgoAction()\n {\n\n $user = $this->getUser(); //Devuelve el usario que esta en sesion\n $em = $this->getDoctrine()->getManager();\n\n\n $activos = $em->getRepository('ActivoBundle:activo')->findBy(array('empresaId' => $user->getEmpresa())); //Filtramos los activos en base al empresa Id\n\n return $this->render('riesgo/indexActivo.html.twig', array(\n 'activos' => $activos,\n ));\n // return new Response('Holi');\n }", "title": "" }, { "docid": "984096b2fa2c0de3192efee83a0cb8a3", "score": "0.5809296", "text": "public function iniciarComprobantes(){\n\n\t\t$item = null;\n\t\t$valor = null;\n\n\t\t$respuesta = ControladorComprobantes::ctrIniciarComprobantes($item, $valor);\n\n\t\treturn $respuesta;\n\n\t}", "title": "" }, { "docid": "d895fd31b7f093e9a193cfa4a49045e5", "score": "0.58067364", "text": "public function getResponsablesActividades($id)\n {\n $result=$this->adapter->query(\"select d.id , d.nombre, d.apellido \n from t_riesgos a \n inner join t_riesgos_a b on a.id = b.idRies\n inner join t_riesgos_a_e c on c.idIries = b.id\n inner join a_empleados d on d.id = c.idEmp\n where b.id=\n \".$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n \n }", "title": "" }, { "docid": "11bcb079a912972befef7e01423a6759", "score": "0.5805376", "text": "public function consultarContratos()\n {\n $resultado = [];\n $sql = \"SELECT `idContrato`,`TipoContrato`,`contratista`,`contratistaRazonSocial`,`objetoContrato`,`rubro`,`fechaSuscripcion`, `fechaInicio`,`fechaFin`,`valor`,`valorAnticipo`,`supervisor`,`supervisorRazonSocial`,`numeroCdp`,`valorCdp`, `fechaCdp` FROM `contrato`\";\n $result = $this->con->query($sql);\n if ($result) {\n while ($row = $result->fetch_array(MYSQL_ASSOC)) {\n $resultado[] = $row;\n }\n }\n $result->close();\n $this->con->close();\n return $resultado;\n }", "title": "" }, { "docid": "be11577518b310e684d59a5ab3c10ec5", "score": "0.5803547", "text": "public function index()\n {\n $requisicoes = Requisicao::where('user_id', Auth::user()->id)->get();\n return view('requisicao.index', compact('requisicoes'));\n }", "title": "" }, { "docid": "80a3982eb2bae99922b84805483cc7a2", "score": "0.5801288", "text": "public function getEmpInactivos($con)\n {\n $result=$this->adapter->query(\"select * \n from a_empleados \n where estado=1 \".$con.\" order by nombre,apellido\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "0422e13fff2763d9f677aad87f062d0d", "score": "0.5799702", "text": "public function getAllCriteres(){\n $c = Base::getConnection();\n $query = $c->prepare(\"select * from critere\");\n $query->execute();\n\t\treturn $query->fetchAll();\n }", "title": "" }, { "docid": "9d1e60ff7a8d1ac8f996bc1ea37d02fc", "score": "0.579546", "text": "public function index()\n {\n return UnidadEjecutora::latest()->get();\n }", "title": "" }, { "docid": "ddada1a2aaac9ce447328edc0108a5bb", "score": "0.57930565", "text": "public function index()\n {\n return DB::table('requisito_procedimiento as rp')\n ->join('requisitos as re','rp.requisito_id','=','re.id')\n ->join('procedimientos as pr','rp.procedimiento_id','=','pr.id')\n ->select(\n 'rc.id','re.descripcion as requisito',\n 'pr.descripcion as procedimiento',\n 'rp.requisito_id','rp.procedimiento_id'\n )->latest()->paginate(5);\n }", "title": "" }, { "docid": "a513f8ad97e559a827478bc0af823c36", "score": "0.5790346", "text": "public function gets() {\r\n $query = $this->db->query(\"SELECT *\r\n FROM\r\n (articulos a\r\n LEFT JOIN\r\n planos pl\r\n ON \r\n a.idplano = pl.idplano)\r\n INNER JOIN\r\n productos p\r\n ON\r\n a.idproducto = p.idproducto AND\r\n a.activo = '1'\r\n ORDER BY\r\n a.articulo\");\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "e4e8d5782087d96afa6ff959b884de94", "score": "0.5786473", "text": "public function getCargos()\n {\n $result=$this->adapter->query(\"select * , nombre as nomFiltro \n from t_cargos\n order by nombre\",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" } ]
2e8ffe812d86dd0325d4317194abd110
Admin trails create route
[ { "docid": "d95fe2ede5ec9c97a6f2e8b3b505fd7c", "score": "0.0", "text": "public function create(Trail $trail)\n {\n // Get all the hospitals\n $hospitals = Hospital::all();\n\n // Return admin trails create view\n return view('admin.trails.create', ['hospitals' => $hospitals]);\n }", "title": "" } ]
[ { "docid": "c1822c40947a437080483796e72e4471", "score": "0.73166287", "text": "public function create()\n {\n //Not Used because using API Route\n }", "title": "" }, { "docid": "63cd30631c266249d26f922c6e0613d9", "score": "0.6722936", "text": "public function create()\n {\n return \\redirect()->route('admin-unit.index');\n }", "title": "" }, { "docid": "875a08dcafb13ec8526702b4b352a9e0", "score": "0.66605693", "text": "public function create()\n {\n //\n return redirect(\"/admin\");\n }", "title": "" }, { "docid": "beea0e830fd79e908936bdb57901fe0a", "score": "0.656376", "text": "public function create()\n {\n return view(\"auth.admin.crear\")->with([\"formulario\"=>\"I\",\n \"type\"=>\"A\",\n 'idnamereferido'=>'id_referido',\n 'urlreferido'=>'listardiferidos'])->with(self::url());\n }", "title": "" }, { "docid": "b85ed9fd2de02a148ae6ca8245ca449e", "score": "0.6563708", "text": "private function add(): Route {\n return new Route(\n '/admin/content/team-member/add',\n [\n '_entity_form' => 'team_member.add',\n '_title' => 'Add Team Member',\n ],\n [\n '_entity_create_access' => 'team_member',\n ]\n );\n }", "title": "" }, { "docid": "143b2920f785561a514e988dc243c052", "score": "0.6476957", "text": "public function create()\n {\n return \"create admin\";\n }", "title": "" }, { "docid": "1204fc46c860e6890178df7a59aa4242", "score": "0.64362675", "text": "public function create()\n {\n echo ('estamos dentro de la pagina de create');\n }", "title": "" }, { "docid": "aa656876603f62b659d8c11c3a67ad91", "score": "0.6415722", "text": "public static function create() {\n if (!Session::is_admin()) {\n $controller = 'Accueil';\n $view = 'listVide';\n $pagetitle = 'Error Accès';\n require File::build_path(array(\"view\", \"view.php\"));\n } else {\n\n $action = 'created';\n\n $titre = 'Ajout';\n\n $controller = 'Accueil';\n $view = 'create';\n $pagetitle = 'Formulaire d\\'ajout - COPO-Dashboard';\n\n require File::build_path(array(\"view\", \"view.php\"));\n }\n }", "title": "" }, { "docid": "d18e76d8a332aa47d0c247184e76c1ec", "score": "0.6404609", "text": "public function create()\n {\n return redirect(route('interalliances.origin'));\n //return view('alianzas.create');\n\n }", "title": "" }, { "docid": "e77ce2056b03d80b21765cc9c07ce763", "score": "0.6400376", "text": "public function admin_create()\n {\n return view(\"admin.admin_create\");\n }", "title": "" }, { "docid": "55c3967e8d449fc4b68b5e36c23741f4", "score": "0.63878417", "text": "public function create()\n {\n return redirect('admin/bedrijven');\n }", "title": "" }, { "docid": "1f0e486a896727167bdc98f63362e274", "score": "0.63780165", "text": "public function create()\n {\n return \\redirect()->route('akuntansi.index');\n }", "title": "" }, { "docid": "53fbf76c55f95705146675ca8331da19", "score": "0.6325153", "text": "public function create()\n {\n //return view('admin::create');\n }", "title": "" }, { "docid": "e218a70d7e85937a0bdc05e1a74bcb84", "score": "0.6319202", "text": "public function create()\n {\n if(User::isAdmin()){\n $agents = Agents::all();\n return view('destinations.create')->with('agents', $agents);\n }else{\n return redirect('destinations')->with('message', 'You are not authorized to use this action');\n }\n\n }", "title": "" }, { "docid": "f408d7ab79a2ac5fab5029669a5cdb9b", "score": "0.63178736", "text": "public function create()\n {\n //\n if (Auth::user()->role_id == 4){\n return view('internal.admin.nuevoTransportista');\n }\n elseif (Auth::user()->role_id == 6){\n return view('internal.usuarioIntermediario.nuevoTransportista');\n }\n\n \n }", "title": "" }, { "docid": "852475260732488ab203fdea91e59376", "score": "0.6316322", "text": "public function create()\n {\n //CREATE\n return view('admin.flight.create');\n \n }", "title": "" }, { "docid": "8462ff8b1bec51f4315773aab70e2a1e", "score": "0.63009566", "text": "public function create()\n {\n\n return redirect('admin/activiteiten');\n }", "title": "" }, { "docid": "fc4804b4fa8b134d57a60d056170defa", "score": "0.6271565", "text": "public function createAction()\n {\n $request = $this->getRequest();\n $type = $this->_getParam('type');\n if ($type === 'new') {\n $this->_helper->redirector('create-new-club', 'clubs', 'default');\n } elseif ($type === 'import') {\n echo \"lol\";//$this->_forward('createeClub');\n }\n }", "title": "" }, { "docid": "c860d50db5c95522d58ad442b93ef3ef", "score": "0.6266376", "text": "public function criarAction()\n {\n if($this->usuario['tp_id']==5){\n $this->_redirect('index');\n }\n $this->modeloTipoTelefone->insert($this->_getAllParams());\n\n $this->_redirect('tipo-telefone/index');\n }", "title": "" }, { "docid": "4a42044db6b652224a94e3d4c263b7ed", "score": "0.6257809", "text": "public function create()\n {\n if (auth()->user()->hasRole('admin')) {\n return view('restorants.create');\n } else {\n return redirect()->route('orders.index')->withStatus(__('No Access'));\n }\n }", "title": "" }, { "docid": "edc9554aeade5db451d41210d88881fe", "score": "0.62358147", "text": "public function create()\n {\n //\n return view('admin.tour.create');\n }", "title": "" }, { "docid": "55dd34a5d9124ff705e9225ffc5faea5", "score": "0.62348175", "text": "public function createAction()\n {\n\n\n }", "title": "" }, { "docid": "9a09bbb12e12398e520aa1261c967033", "score": "0.62244225", "text": "public function create()\n {\n\n// return view('system/admin/admin');\n }", "title": "" }, { "docid": "fd3d017227ff2c8618bd6581918a9e6f", "score": "0.62129974", "text": "public function actionCreate() {\n \n $this->redirect(array('index'));\n }", "title": "" }, { "docid": "ef68007de1d99cb4e05ffb3424609095", "score": "0.6211619", "text": "public function createRoute()\n {\n if ($this->mapType !== 'country' && $this->mapType !== 'hotel') {\n $this->endPos=trim($this->destination->longtiude).','.trim($this->destination->latitude);\n // dd($this->endPos);\n }\n if ($this->currentUserLocation) {\n $this->emit('createRoute',['startPos'=> $this->currentUserLocation , 'endPos'=>$this->endPos]);\n return;\n }\n // \\dd($this->hotelLocation);\n $this->emit('createRoute',['startPos'=> $this->hotelLocation , 'endPos'=>$this->endPos]);\n }", "title": "" }, { "docid": "8272d500912f094daae0cc98a0d36e81", "score": "0.6192516", "text": "public function create()\n {\n return redirect(route('vinyls.show', $vinyl));\n }", "title": "" }, { "docid": "172694fc8b2b676de78bcc91bacfcbd1", "score": "0.6191427", "text": "public function create()\n {\n // add by dandisy\n \n\n // edit by dandisy\n //return view('admin.testlagis.create');\n return view('admin.testlagis.create');\n }", "title": "" }, { "docid": "7a17b273cd652ac87ae454286173a50a", "score": "0.61888534", "text": "public function createAction()\n {\n\n }", "title": "" }, { "docid": "0705f824eef3f3baa9bacfde6a2dcfa5", "score": "0.6186932", "text": "public function create()\n\t{\n\t\tif(Auth::user()->user_role == 'Admin'){\n\n //Find all steps\n $steps = Steps::all();\n\n\n\t\tReturn View::make('steps.create')->with(['steps' => $steps]);\n\t\t}\n\t\telse{\n\t\tReturn \"Not Authorized!\";\n\t\t}\n\t}", "title": "" }, { "docid": "e5e1f4781dabe8055716efb645cb9e3a", "score": "0.6183511", "text": "public function url()\n {\n return '/admin/system_localization/create';\n }", "title": "" }, { "docid": "678d3c708dbf19deb4f7e277379bb78c", "score": "0.6182145", "text": "public function create()\n {\n if(Gate::denies(\"edit-parameter\")){\n abort(403,\"No tienes permisos para realizar esta acción\");\n }\n return view('configuracion.plan.create');\n }", "title": "" }, { "docid": "e800e43971b3890716e1d39ea6d38fe2", "score": "0.6179707", "text": "protected function createRoute()\n {\n $name = $this->argument('name');\n $this->callSilent('make:bundle:route', [\n 'name' => $this->getBundleName($name),\n '--namespace' => $this->relativeNamespace,\n ]);\n }", "title": "" }, { "docid": "f7ce5b8555a2a7962e5cd8c90ba74d0e", "score": "0.6161956", "text": "abstract public function actionCreate();", "title": "" }, { "docid": "0c6e62e918551c2ab6aa17e40d5a4e09", "score": "0.6161519", "text": "public function actionCreate()\n {\n\n }", "title": "" }, { "docid": "808c84a8873908e209c582ca3f812a25", "score": "0.61548203", "text": "public function create()\n {\n // dd('create ');\n return view('TravConstruction.create');\n\n\n }", "title": "" }, { "docid": "537bc981837ab4f40f39b23dc29e4c52", "score": "0.6146379", "text": "public function create()\n {\n return view(\"/admin/create\");\n }", "title": "" }, { "docid": "20291f81863c9e4bf10aad08bdc9abdc", "score": "0.6135495", "text": "protected function setupCreateOperation()\n {\n CRUD::addField(['name' => 'sitemap', 'type' => 'custom_html', 'value' => 'Sitemap sẽ được lưu tại đường dẫn: <i>' . url('/sitemap.xml') . '</i>']);\n $this->crud->addSaveAction([\n 'name' => 'save_and_new',\n 'redirect' => function ($crud, $request, $itemId) {\n return $crud->route;\n },\n 'button_text' => 'Tạo sitemap',\n ]);\n\n $this->crud->setOperationSetting('showSaveActionChange', false);\n }", "title": "" }, { "docid": "925e3ae8a09f60ea52a6ea8d57e248c7", "score": "0.61314976", "text": "public function create()\n {\n return redirect()->route('ware-completed.index');\n }", "title": "" }, { "docid": "b8edeaa1c8f7fe877c8db184f2542a0a", "score": "0.61277485", "text": "public function create() {\n\t\t// if guest or cannot tote.create, redirect -> home\n\t\tif(Entrust::can('tote.create') == false) return redirect()->route('home');\n\n\t\treturn view('pages.tote.create');\n\t}", "title": "" }, { "docid": "fcb7ed33753003bacddad2292e02575d", "score": "0.611909", "text": "public function create()\n {\n $route = self::ROUTE;\n return view(self::FOLDER.\"create\", compact(\"route\"));\n }", "title": "" }, { "docid": "3189a6b1dd06fcfb1524d9f747398e82", "score": "0.61164814", "text": "public function createAction()\n {\n $templateKey = 'edit';\n\n if (false === $this->admin->isGranted('CREATE')) {\n throw new AccessDeniedException();\n }\n\n $object = $this->admin->getNewInstance();\n\n // Добавляем родительский отзыв, если передали а параметрах\n $em = $this->getDoctrine()->getManager();\n $GET = $this->get('request')->query;\n $parentId = $GET->get('review_parent_id');\n if ($parentId > 0) {\n $parent = $em->getRepository('CoreReviewBundle:Review')->find($parentId);\n if (null !== $parent) {\n $object->setParent($parent);\n\n // Добавляем продукт в отзыв\n $productId = $GET->get('review_product_id');\n if ($productId > 0) {\n $product = $em->getRepository('CoreProductBundle:CommonProduct')->find($productId);\n if (null !== $product) {\n $object->setProduct($product);\n }\n }\n }\n }\n\n $this->admin->setSubject($object);\n\n /** @var $form \\Symfony\\Component\\Form\\Form */\n $form = $this->admin->getForm();\n $form->setData($object);\n\n if ($this->getRestMethod() == 'POST') {\n $form->bind($this->get('request'));\n\n $isFormValid = $form->isValid();\n\n // persist if the form was valid and if in preview mode the preview was approved\n if ($isFormValid && (!$this->isInPreviewMode() || $this->isPreviewApproved())) {\n $this->admin->create($object);\n\n if ($this->isXmlHttpRequest()) {\n return $this->renderJson(array(\n 'result' => 'ok',\n 'objectId' => $this->admin->getNormalizedIdentifier($object)\n ));\n }\n\n $this->addFlash('sonata_flash_success', $this->admin->trans('flash_create_success', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));\n\n // redirect to edit mode\n return $this->redirectTo($object);\n }\n\n // show an error message if the form failed validation\n if (!$isFormValid) {\n if (!$this->isXmlHttpRequest()) {\n $this->addFlash('sonata_flash_error', $this->admin->trans('flash_create_error', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));\n }\n } elseif ($this->isPreviewRequested()) {\n // pick the preview template if the form was valid and preview was requested\n $templateKey = 'preview';\n $this->admin->getShow();\n }\n }\n\n $view = $form->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($view, $this->admin->getFormTheme());\n\n return $this->render($this->admin->getTemplate($templateKey), array(\n 'action' => 'create',\n 'form' => $view,\n 'object' => $object,\n ));\n }", "title": "" }, { "docid": "c803ffa8b63157347188a1b04e6c3c48", "score": "0.6109311", "text": "public function create(){\n // return view($this->path . 'create');\n }", "title": "" }, { "docid": "abb145d9e6711e58ebb7ffcd4d6f8d1a", "score": "0.61084145", "text": "public function create()\n { return redirect('/Properties');}", "title": "" }, { "docid": "fe69aec8fe3691d1075c43fecde83cd2", "score": "0.60996044", "text": "public function createAction()\n {\n $this->apiException(\n 'This method is not allowed!',\n Response::HTTP_METHOD_NOT_ALLOWED\n );\n }", "title": "" }, { "docid": "a39f78b7fe898b769676ff367d4e9889", "score": "0.6095418", "text": "public function create()\n\t{\n\t\t$data = [\n\t\t\t'title' => $this->IFP_Sprt(__METHOD__),\n\t\t\t'breadcrumb' => [\n\t\t\t\t'Admin' => '/admin',\n\t\t\t\t'Create' => ''\n\t\t\t],\n\t\t\t'user' => session('login'),\n\t\t];\n\t\treturn view('admin/admin-create', compact('data'));\n\t}", "title": "" }, { "docid": "7dc6509881b42f2c5c795f112e45f4ea", "score": "0.60943913", "text": "public function create()\n {\n //\n return view(\"admin.rule.create\");\n }", "title": "" }, { "docid": "1f4459370afbf19e3e19214ae6db1790", "score": "0.6075212", "text": "public function routeToAddMember() {\n if($this->memberView->isSocialSecurityValid() && $this->memberView->checkSocialSecurityLength()) {\n $this->memberModel->reciveMemberData($this->memberView->getName(), $this->memberView->getSocialSecurity());\n $this->memberModel->addNewMemberToDatabase();\n }\n }", "title": "" }, { "docid": "3c64ec6529ab96548ee16fe41307b384", "score": "0.60700655", "text": "public function create()\n\t{\n\t \n\t \n\t return view('admin.teampage.create');\n\t}", "title": "" }, { "docid": "a4861666a5dc4b407f63a4216f831181", "score": "0.60578406", "text": "public function create()\n {\n if(!Gate::allows('admin_processing_create')) {\n abort('401');\n }\n //\n }", "title": "" }, { "docid": "eb41df029bd74c081c3079d7d4cf653f", "score": "0.60566837", "text": "public function create()\n {\n //\n return response(\"\",405);\n }", "title": "" }, { "docid": "bc56155417fc85cd4b5ad01b07c801c7", "score": "0.6051255", "text": "public function createPost(){\n\t\t\t$this->modelCreate();\n\t\t\t//quay tro lai trang quytac\n\t\t\theader(\"location:index.php?controller=quytac\");\n\t\t}", "title": "" }, { "docid": "a16417d1f9368bc0fb8f206cb13527d6", "score": "0.60422915", "text": "public function create()\n {\n echo 'create';\n }", "title": "" }, { "docid": "c1fbf111c740174ca185ac37a5f71380", "score": "0.6038764", "text": "public function create()\n {\n //\n return \"create method to show form\";\n }", "title": "" }, { "docid": "d17d7f1d76f5a33ee6b2fd1fbeafe6ba", "score": "0.60356516", "text": "public function create()\n {\n return view('admin.navigate.create');\n }", "title": "" }, { "docid": "b3145e6c27a92e6fcd8097fd97d07ca1", "score": "0.6031166", "text": "public function create()\n {\n return redirect()->route('index');\n }", "title": "" }, { "docid": "7aa9eaf9cbcd24c3d35a810ec557e448", "score": "0.60135484", "text": "public function create()\n {\n $routesModel = \\App\\Route::where('except', '<>', 1)->get();\n\n $routes = [];\n\n foreach ($routesModel as $route) {\n $routes[$route->id] = '[' . $route->method . '] ' . $route->path;\n }\n\n return view('admin.permission.create')->with(['permission' => new Permission(), 'routes' => $routes, 'selected' => []]);\n }", "title": "" }, { "docid": "fab2925b5ff7b1c2e848b9dbae6f712d", "score": "0.60081345", "text": "public function create()\n {\n return redirect()->route(\"admin.transaction-category.index\");\n }", "title": "" }, { "docid": "ad7562b8363fb1117d45c593a7a5e930", "score": "0.6006885", "text": "public function actionCreate()\n {\n $model = new User();\n\n if (Yii::$app->request->isPost) {\n $tempPassword = '';\n $model->load(Yii::$app->request->post());\n $tempPassword = $model->password_hash;\n $security = new Security();\n $model->password_hash = $security->generatePasswordHash($model->password_hash);\n $model->auth_key = $security->generateRandomString();\n\n $devices = Devices::findOne($model->devices_id);\n $devices->devicesstatus = 1;\n $devices->save();\n $model->save();\n User::mikrotikAdd($model, $tempPassword);\n $action = new Actionlist();\n $action->user_id = Yii::$app->user->identity->id;\n $action->action = 'Добавление';\n $action->parameters = $model->id ;\n $action->route = $this->route;\n $action->date = date('Y-m-d H-i-s');\n $action->save();\n /*-----------------------------------------------------------------------------*/\n// $service = Connection::findOne($model->connection_id);\n// $profile = Tariffs::findOne($model->tariffs_id);\n// try {\n// $client = new RouterOS\\Client('192.168.1.100', 'admin', 'admin');\n// } catch (Exception $e) {\n// die('Unable to connect to the router.');\n// }\n//\n// $addRequest = new RouterOS\\Request('/ppp/secret/add');\n//\n//// $addRequest->setArgument('name', 'MIKROVBROS');\n// $addRequest->setArgument('name', $model->username);\n// $addRequest->setArgument('service', $service->nameconnection);\n// $addRequest->setArgument('profile', $profile->name);\n//// $addRequest->setArgument('mac-address', '00:00:00:00:00:01');\n// if ($client->sendSync($addRequest)->getType() !== RouterOS\\Response::TYPE_FINAL) {\n// die(\"Error when creating ARP entry for 'Yii'\");\n// }\n /*-----------------------------------------------------------------------------*/\n\n\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n\n// if ($model->load(Yii::$app->request->post())) {\n// $security = new Security();\n// $user = new User();\n// $user->status = '10';\n// $user->password_hash = $security->generatePasswordHash(Yii::$app->request->post('password_hash'));\n// $user->auth_key = $user->generateAuthKey();\n//\n// $user->save(); die();\n// //echo $user->password_hash; die();\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n\n// if ($model->load(Yii::$app->request->post())) {\n// $security = new Security();\n// $model->password_hash = $security->generatePasswordHash($model->password_hash);\n// $model->auth_key = $model->generateAuthKey();\n// $model->save();\n// return $this->redirect(['/admin/user/index']);\n// //return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }", "title": "" }, { "docid": "d95d4eb33939c4799aed8ed01aa7149c", "score": "0.6002912", "text": "public function create() // delete later\n {\n return redirect('/home');\n }", "title": "" }, { "docid": "2a93c41870ee29d34e19bb91778eb320", "score": "0.6001153", "text": "public function create()\n { \n return Redirect::route('dashboard');\n }", "title": "" }, { "docid": "85d95900dcd2c27c2888a7e17000cabc", "score": "0.59998363", "text": "public function create()\n {\n echo \"create\";\n }", "title": "" }, { "docid": "cf33d388ce1cedc22fdbd54b84e92107", "score": "0.59975076", "text": "public function create()\n {\n //RESTfullのため必要ない\n }", "title": "" }, { "docid": "2fd41716f6f0bc8b9ab44bac42047abe", "score": "0.59974295", "text": "public function create()\n {\n return 'create';\n //\n }", "title": "" }, { "docid": "e793c546096eed9d3ed458d5437f3d84", "score": "0.5986522", "text": "public function create()\n {\n //\n return view ('theme.admin.create_admin');\n }", "title": "" }, { "docid": "634ca3c15e7c1be77ababe20088ac619", "score": "0.5984883", "text": "public function create()\n\t{\n\t\tif(Auth::user()->type=='admin'){\n\t\t\t$term_types=TermType::all();\n\t\t\t$array=['active'=>'cont','term_types'=>$term_types];\n\t\t\treturn view('contractor.add',$array);\n\t\t}else{\n\t\t\tabort('404');\n\t\t}\n\t}", "title": "" }, { "docid": "bd64183a46e78180f8ce10e516b94f5e", "score": "0.5983227", "text": "public function create()\n {\n //\n \n\n\n\n }", "title": "" }, { "docid": "c93605cb0700088224295f97b2883b6b", "score": "0.5980933", "text": "public function create()\n {\n $this->auth->restrict($this->permissionCreate);\n $this->edit();\n }", "title": "" }, { "docid": "2ad4e21b1afe25e5bfe3bf1f8ba95d1f", "score": "0.59807724", "text": "public function actionCreatePartner() {\n }", "title": "" }, { "docid": "48426499a17a8679735e2a3b9faa12cc", "score": "0.5968407", "text": "public function create()\n {\n //return add page\n return view('admin.special_offer.add');\n }", "title": "" }, { "docid": "86417db685197853b614963fa0f79e99", "score": "0.5968116", "text": "public function create()\n {\n return redirect(route('home'));\n }", "title": "" }, { "docid": "000c8f502258a84e7e55ec49429b8e73", "score": "0.5967478", "text": "public function create()\n {\n //\n if(auth()->user()->can('create',Resturant::class)){\n return view('resturant.create');\n }\n else{\n abort(401);\n }\n }", "title": "" }, { "docid": "393e6fecd3f2d6fd9126234eb814d34b", "score": "0.59658325", "text": "public function create()\n {\n return view('testingadmin.create');\n }", "title": "" }, { "docid": "0b5690872df3df971493709b5785ce77", "score": "0.5957629", "text": "public function create()\n {\n $this->authorize('permission_admin');\n //\n }", "title": "" }, { "docid": "419d2c512038ccd476fa0cec4612d045", "score": "0.5953912", "text": "public function create()\n\n { if (Auth::user() -> Hasrole('admin')) {\n $lugares=Lugar::all();\n return view('eventos.create',compact('lugares'));\n }}", "title": "" }, { "docid": "8cb6e3a63a9fcc7e109ca9e2fa80c74e", "score": "0.59529644", "text": "public function create()\n {\n //$this->isAuthorized('lead.create');\n Breadcrumbs::addCrumb('Create');\n Title::setSemiBold('New Lead');\n Title::useLeftArrow(true);\n return view('admin.lead.create');\n }", "title": "" }, { "docid": "6cdf2a5aa2e70ffee6e2ae05c6d79ef7", "score": "0.5951884", "text": "public function create()\n {\n return \\view('admin.destination.destinationCreate');\n }", "title": "" }, { "docid": "c28a660d85a2c6310cdc4b08fb8b4ba8", "score": "0.5951493", "text": "public function create(){\n //\n }", "title": "" }, { "docid": "c28a660d85a2c6310cdc4b08fb8b4ba8", "score": "0.5951493", "text": "public function create(){\n //\n }", "title": "" }, { "docid": "279742eece56f3fab333ec3df93117a3", "score": "0.59512526", "text": "public function actionCreate()\n {\n $this->getView()->pageTitle = 'Добавить направление';\n $this->getBreadCrumbs();\n $model = new PtmDirection();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "3f77ffd5ea29dfba2ff3dcf612cd715a", "score": "0.5947417", "text": "public function create() {\n\t\tsession(['tabpanel' => 'create']);\n\n\t\treturn redirect()->route('constants.index');\n\t}", "title": "" }, { "docid": "b00c305458cbbed53d99841c01a98bd2", "score": "0.59466", "text": "public function create()\n {\n if (Auth::user()->role == 'admin') {\n $vehicle = Vehicle::where('status', 'available')->get();\n $spv = User::where('role', 'supervisor')->get();\n $pool = User::where('role', 'pool-officer')->get();\n\n return view('admin.trx-create', compact('vehicle', 'spv', 'pool'));\n }\n\n abort(403);\n }", "title": "" }, { "docid": "9f6cf047e9eb43ff3c97641e73f8538f", "score": "0.5944559", "text": "public function create()\n {\n //\n return view('admin.create');\n }", "title": "" }, { "docid": "9f6cf047e9eb43ff3c97641e73f8538f", "score": "0.5944559", "text": "public function create()\n {\n //\n return view('admin.create');\n }", "title": "" }, { "docid": "31f8e9b35ccb166754f8f81a138234bc", "score": "0.59429324", "text": "function Create(){\n \n }", "title": "" }, { "docid": "72e118a2e9998dc8bf664c92f4f25bf4", "score": "0.59425086", "text": "public function create()\n {\n $destination = DB::table('destinations')->get();\n return view('route.create', compact('destination'));\n }", "title": "" }, { "docid": "2fc9cf4396c45c5d1b9a11ab1cecc70d", "score": "0.59415174", "text": "protected function generateRoute(array &$vars): void {\n $vars['route'] = $this->confirm('Would you like to create a route for this form?');\n if ($vars['route']) {\n $this->defaultPathPrefix = $this->defaultPathPrefix ?: '/' . $vars['machine_name'];\n $default_route_path = \\str_replace('_', '-', $this->defaultPathPrefix . '/' . $vars['raw_form_id']);\n $vars['route_name'] = $this->ask('Route name', '{machine_name}.' . $vars['raw_form_id']);\n $vars['route_path'] = $this->ask('Route path', $default_route_path);\n $vars['route_title'] = $this->ask('Route title', '{raw_form_id|m2h}');\n $vars['route_permission'] = $this->ask('Route permission', $this->defaultPermission);\n\n $this->addFile('{machine_name}.routing.yml')\n ->template('form/routing')\n ->appendIfExists();\n }\n }", "title": "" }, { "docid": "4dba5a58a37eb25fd00c230d6d7aa895", "score": "0.59412634", "text": "private function _routeAction (){\n \n if ((isset($_GET['add']) || isset($_GET['edit'])) && isset($_GET['save'])){ \n \n $message = EGGallery::save($this->instanceNum);\n $isError = $message ? 1 : '';\n \n if (!$isError)\n $message = i18n_r(EG_ID.'/EDIT_SAVED');\n \n $delete = @$_POST['delete'];\n \n if (!$isError && $delete)\n EGGallery::delete($this->instanceNum, $delete);\n \n EGTools::cleanUnusedThumbs();\n\n redirect('load.php?id='.$this->pluginId.'&edit&name='.$_POST['name'].'&message='.urlencode($message).'&isError='.$isError);\n }\n else if (isset($_GET['conf']) && @$_POST['save']){ //save settings\n if ( EGSettings::save($this->instanceNum) ){\n $message = i18n_r(EG_ID.'/CONF_SAVED');\n $isError = '';\n }\n else{\n $message = i18n_r(EG_ID.'/CONF_SAVE_ERROR');\n $isError = 1;\n }\n \n redirect('load.php?id='.$this->pluginId.'&conf&message='.urlencode($message).'&isError='.$isError);\n } \n \n }", "title": "" }, { "docid": "56c69de761d630891b4c3aee88c67e2e", "score": "0.59407765", "text": "public function create()\n {\n //\n return view('admin.admin.create');\n }", "title": "" }, { "docid": "7a4fe54fe58b18429747dcb02895e41e", "score": "0.59238845", "text": "public function run()\n {\n DB::table('routes')->delete();\n\n $admin = Role::userRole(self::SystemAdmin);\n $client_admin = Role::userRole(self::ClientAdmin);\n #### Dashboard\n $dashboard = new Route();\n $dashboard->route_name = 'Dashboard';\n $dashboard->save();\n $dashboard_id = $dashboard->id;\n\n $home = new Route();\n $home->route_name = 'Home';\n $home->url = 'home';\n $home->parent_route = $dashboard_id;\n $home->save();\n $home->roles()->attach($admin);\n $home->roles()->attach($client_admin);\n\n $home = new Route();\n $home->route_name = 'Home';\n $home->url = '/';\n $home->parent_route = $dashboard_id;\n $home->save();\n $home->roles()->attach($admin);\n $home->roles()->attach($client_admin);\n\n #### Dashboard child\n $analytics_dash = new Route();\n $analytics_dash->route_name = 'Analytics Dashboard';\n $analytics_dash->url = 'dashboard';\n $analytics_dash->parent_route = $dashboard_id;\n $analytics_dash->save();\n $analytics_dash->roles()->attach($admin);\n $analytics_dash->roles()->attach($client_admin);\n\n #### registration\n $reg = new Route();\n $reg->route_name = 'Registration';\n $reg->save();\n $reg_id = $reg->id;\n\n #### registration children\n $registration = new Route();\n $registration->route_name = 'User Registration';\n $registration->url = 'registration';\n $registration->parent_route = $reg_id;\n $registration->save();\n $registration->roles()->attach($admin);\n $registration->roles()->attach($client_admin);\n\n //all Registration\n $all_mfs = new Route();\n $all_mfs->route_name = 'All Registration';\n $all_mfs->url = 'all-mfs';\n $all_mfs->parent_route = $reg_id;\n $all_mfs->save();\n $all_mfs->roles()->attach($admin);\n $all_mfs->roles()->attach($client_admin);\n\n //all staff\n $all_staff = new Route();\n $all_staff->route_name = 'All Staff';\n $all_staff->url = 'all-staffs';\n $all_staff->parent_route = $reg_id;\n $all_staff->save();\n $all_staff->roles()->attach($admin);\n $all_staff->roles()->attach($client_admin);\n\n //all clients\n $all_clients = new Route();\n $all_clients->route_name = 'All Clients';\n $all_clients->url = 'all-clients';\n $all_clients->parent_route = $reg_id;\n $all_clients->save();\n $all_clients->roles()->attach($admin);\n $all_clients->roles()->attach($client_admin);\n\n // adding a user\n $add_reg = new Route();\n $add_reg->route_name = 'Add Registration';\n $add_reg->url = 'add-registration';\n $add_reg->parent_route = $reg_id;\n $add_reg->save();\n $add_reg->roles()->attach($admin);\n $add_reg->roles()->attach($client_admin);\n\n // edit user\n $edit_user = new Route();\n $edit_user->route_name = 'Edit User Registration';\n $edit_user->url = 'edit-mf/{id}';\n $edit_user->parent_route = $reg_id;\n $edit_user->save();\n $edit_user->roles()->attach($admin);\n $edit_user->roles()->attach($client_admin);\n\n ### soft delete user registration\n $soft_del = new Route();\n $soft_del->route_name = 'Soft Delete Masterfile';\n $soft_del->url = 'soft-delete-mf/{id}';\n $soft_del->parent_route = $reg_id;\n $soft_del->save();\n $soft_del->roles()->attach($admin);\n $soft_del->roles()->attach($client_admin);\n\n ### inactive users\n $inactive_users = new Route();\n $inactive_users->route_name = 'Inactive Users';\n $inactive_users->url = 'inactive-users';\n $inactive_users->parent_route = $reg_id;\n $inactive_users->save();\n $inactive_users->roles()->attach($admin);\n $inactive_users->roles()->attach($client_admin);\n\n ### permanently delete user\n $delete = new Route();\n $delete->route_name = 'Delete Masterfile Details';\n $delete->url = 'delete-masterfile/{id}';\n $delete->parent_route = $reg_id;\n $delete->save();\n $delete->roles()->attach($admin);\n $delete->roles()->attach($client_admin);\n\n ### restore inactive users\n $restore = new Route();\n $restore->route_name = 'Restore Inactive Users';\n $restore->url = 'restore-mf/{id}';\n $restore->parent_route = $reg_id;\n $restore->save();\n $restore->roles()->attach($admin);\n $restore->roles()->attach($client_admin);\n\n ### users profile\n $profile = new Route();\n $profile->route_name = 'Users Profile';\n $profile->url = 'mf-profile/{id}';\n $profile->parent_route = $reg_id;\n $profile->save();\n $profile->roles()->attach($admin);\n $profile->roles()->attach($client_admin);\n\n ### permanently delete user address\n $del_addr = new Route();\n $del_addr->route_name = 'Delete Users Address Details';\n $del_addr->url = 'delete-address/{id}';\n $del_addr->parent_route = $reg_id;\n $del_addr->save();\n $del_addr->roles()->attach($admin);\n $del_addr->roles()->attach($client_admin);\n\n ### adding a new address for a user\n $add_addr = new Route();\n $add_addr->route_name = 'Add New Address Details';\n $add_addr->url = 'add-address/{id}';\n $add_addr->parent_route = $reg_id;\n $add_addr->save();\n $add_addr->roles()->attach($admin);\n $add_addr->roles()->attach($client_admin);\n\n #### Application\n $app = new Route();\n $app->route_name = 'First Applications';\n $app->save();\n $app_id = $app->id;\n\n #### Application children\n $all_app = new Route();\n $all_app->route_name = 'All First Applications';\n $all_app->url = 'all_applications';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $all_app = new Route();\n $all_app->route_name = 'Approve Applications';\n $all_app->url = 'approve-applications';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $all_app = new Route();\n $all_app->route_name = 'Reject Applications';\n $all_app->url = 'reject-applications';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $all_app = new Route();\n $all_app->route_name = 'Load All Applications';\n $all_app->url = 'all_applications/fas';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $pend_app = new Route();\n $pend_app->route_name = 'Pending Application';\n $pend_app->url = 'pending_applications';\n $pend_app->parent_route = $app_id;\n $pend_app->save();\n $pend_app->roles()->attach($admin);\n $pend_app->roles()->attach($client_admin);\n\n $pend_app = new Route();\n $pend_app->route_name = 'Loading Pending Application';\n $pend_app->url = 'pending_applications/pending';\n $pend_app->parent_route = $app_id;\n $pend_app->save();\n $pend_app->roles()->attach($admin);\n $pend_app->roles()->attach($client_admin);\n\n $canc_app = new Route();\n $canc_app->route_name = 'Cancelled Application';\n $canc_app->url = 'canceled_applications';\n $canc_app->parent_route = $app_id;\n $canc_app->save();\n $canc_app->roles()->attach($admin);\n $canc_app->roles()->attach($client_admin);\n\n $canc_app = new Route();\n $canc_app->route_name = 'Cancelled Application';\n $canc_app->url = 'canceled_applications/canceled';\n $canc_app->parent_route = $app_id;\n $canc_app->save();\n $canc_app->roles()->attach($admin);\n $canc_app->roles()->attach($client_admin);\n\n $appr_app = new Route();\n $appr_app->route_name = 'Approved Application';\n $appr_app->url = 'approved_applications';\n $appr_app->parent_route = $app_id;\n $appr_app->save();\n $appr_app->roles()->attach($admin);\n $appr_app->roles()->attach($client_admin);\n\n\n $appr_app = new Route();\n $appr_app->route_name = 'Load Approved Application';\n $appr_app->url = 'approved_applications/approved';\n $appr_app->parent_route = $app_id;\n $appr_app->save();\n $appr_app->roles()->attach($admin);\n $appr_app->roles()->attach($client_admin);\n\n\n ##second applications\n $app = new Route();\n $app->route_name = 'Second Applications';\n $app->save();\n $app_id = $app->id;\n //all second applications\n $all_app = new Route();\n $all_app->route_name = 'All Second Applications';\n $all_app->url = 'list-second-application';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n #### inventory\n $inventory = new Route();\n $inventory->route_name = 'Inventory';\n $inventory->save();\n $inventory_id = $inventory->id;\n\n #### inventory children\n $item = new Route();\n $item->route_name = 'Manage Inventory';\n $item->url = 'manage_inventory';\n $item->parent_route = $inventory_id;\n $item->save();\n $item->roles()->attach($admin);\n $item->roles()->attach($client_admin);\n\n $item = new Route();\n $item->route_name = 'Manage Categories';\n $item->url = 'inventory-categories';\n $item->parent_route = $inventory_id;\n $item->save();\n $item->roles()->attach($admin);\n $item->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Inventory Allocation';\n $category->url = 'all-allocations';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Arrange Menu';\n $category->url = 'arrange-menu';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Get Menu Menu';\n $category->url = 'get-menu/{id}';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'get make';\n $category->url = '/subcats/{id}';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Manage Motorbikes';\n $category->url = '/bikes';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $model = new Route();\n $model->route_name = 'Motorbikes Models';\n $model->url = '/bikes-model';\n $model->parent_route = $inventory_id;\n $model->save();\n $model->roles()->attach($admin);\n $model->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Stock Transactions';\n $category->url = '/stock-transactions';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $insurance = new Route();\n $insurance->route_name = 'Bike Insurance';\n $insurance->url = '/bike-insurance/{id}';\n $insurance->parent_route = $inventory_id;\n $insurance->save();\n $insurance->roles()->attach($admin);\n $insurance->roles()->attach($client_admin);\n\n #### client\n $client = new Route();\n $client->route_name = 'Client';\n $client->save();\n $client_id = $client->id;\n\n #### client children\n $acc = new Route();\n $acc->route_name = 'Client Accounts';\n $acc->url = 'client_account';\n $acc->parent_route = $client_id;\n $acc->save();\n $acc->roles()->attach($admin);\n $acc->roles()->attach($client_admin);\n\n $wallet = new Route();\n $wallet->route_name = 'Client Wallet';\n $wallet->url = 'client_wallet';\n $wallet->parent_route = $client_id;\n $wallet->save();\n $wallet->roles()->attach($admin);\n $wallet->roles()->attach($client_admin);\n\n #### service\n $service = new Route();\n $service->route_name = 'Service';\n $service->save();\n $service_id = $service->id;\n\n #### service children\n $service_category = new Route();\n $service_category->route_name = 'Service Category';\n $service_category->url = 'service_category';\n $service_category->parent_route = $service_id;\n $service_category->save();\n $service_category->roles()->attach($admin);\n $service_category->roles()->attach($client_admin);\n\n ### rider wallet Profile\n $wallet = new Route();\n $wallet->route_name = 'Manage My Wallet';\n $wallet->url = 'my-wallet';\n $wallet->parent_route = $reg_id;\n $wallet->save();\n $wallet->roles()->attach($admin);\n $wallet->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Add Service Category';\n $route->url = 'add-sc-cats';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Get Service Category';\n $route->url = 'get-scat-details/{id}';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Update Service Category';\n $route->url = 'edit-sc-cats';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Delete Service Category';\n $route->url = 'delete-scats';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $manage_service = new Route();\n $manage_service->route_name = 'Manage Services';\n $manage_service->url = 'manage_services';\n $manage_service->parent_route = $service_id;\n $manage_service->save();\n $manage_service->roles()->attach($admin);\n $manage_service->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Add Service';\n $route->url = 'add-service';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Update Service';\n $route->url = 'update-service';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Get Service';\n $route->url = 'get-service/{id}';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Delete Service';\n $route->url = 'delete-service';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n #### bills and payments\n $bp = new Route();\n $bp->route_name = 'Bills and Payment';\n $bp->save();\n $bp_id = $bp->id;\n\n #### service children\n $all_bills = new Route();\n $all_bills->route_name = 'All Bills';\n $all_bills->url = 'all_bills';\n $all_bills->parent_route = $bp_id;\n $all_bills->save();\n $all_bills->roles()->attach($admin);\n $all_bills->roles()->attach($client_admin);\n\n $pending_bills = new Route();\n $pending_bills->route_name = 'Pending Bills';\n $pending_bills->url = 'pending_bills';\n $pending_bills->parent_route = $bp_id;\n $pending_bills->save();\n $pending_bills->roles()->attach($admin);\n $pending_bills->roles()->attach($client_admin);\n\n $all_payments = new Route();\n $all_payments->route_name = 'All Payments';\n $all_payments->url = 'all_payments';\n $all_payments->parent_route = $bp_id;\n $all_payments->save();\n $all_payments->roles()->attach($admin);\n $all_payments->roles()->attach($client_admin);\n\n #### reports\n $reports = new Route();\n $reports->route_name = 'Reports';\n $reports->save();\n $reports_id = $reports->id;\n\n #### service children\n $daily = new Route();\n $daily->route_name = 'Daily Summary Report';\n $daily->url = 'daily_summary_report';\n $daily->parent_route = $reports_id;\n $daily->save();\n $daily->roles()->attach($admin);\n $daily->roles()->attach($client_admin);\n\n $weekly = new Route();\n $weekly->route_name = 'Weekly Summary Reports';\n $weekly->url = 'weekly_summary_report';\n $weekly->parent_route = $reports_id;\n $weekly->save();\n $weekly->roles()->attach($admin);\n $weekly->roles()->attach($client_admin);\n\n $monthly = new Route();\n $monthly->route_name = 'Monthly Summary Reports';\n $monthly->url = 'monthly_summary_report';\n $monthly->parent_route = $reports_id;\n $monthly->save();\n $monthly->roles()->attach($admin);\n $monthly->roles()->attach($client_admin);\n\n #### system\n $system = new Route();\n $system->route_name = 'System';\n $system->save();\n $system_id = $system->id;\n\n #### system children\n $routes = new Route();\n $routes->route_name = 'System Routes';\n $routes->url = 'routes';\n $routes->parent_route = $system_id;\n $routes->save();\n $routes->roles()->attach($admin);\n $routes->roles()->attach($client_admin);\n\n $routes = new Route();\n $routes->route_name = 'Load System Routes';\n $routes->url = 'load-routes';\n $routes->parent_route = $system_id;\n $routes->save();\n $routes->roles()->attach($admin);\n $routes->roles()->attach($client_admin);\n\n $menu = new Route();\n $menu->route_name = 'System Menu';\n $menu->url = 'menu';\n $menu->parent_route = $system_id;\n $menu->save();\n $menu->roles()->attach($admin);\n $menu->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'System Configuration';\n $system_config->url = 'sys-config';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'System Settings';\n $system_config->url = 'load-config';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'Get Route Data';\n $system_config->url = 'get-route/{route_id}';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'Update Route';\n $system_config->url = 'edit-route';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'Load System Configuration';\n $system_config->url = 'load-config';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $theme_config = new Route();\n $theme_config->route_name = 'Theme Configuration';\n $theme_config->url = 'theme_config';\n $theme_config->parent_route = $system_id;\n $theme_config->save();\n $theme_config->roles()->attach($admin);\n $theme_config->roles()->attach($client_admin);\n\n $theme_config = new Route();\n $theme_config->route_name = 'Theme Select';\n $theme_config->url = 'theme-select/{theme}';\n $theme_config->parent_route = $system_id;\n $theme_config->save();\n $theme_config->roles()->attach($admin);\n $theme_config->roles()->attach($client_admin);\n\n $get_theme = new Route();\n $get_theme->route_name = 'Get Theme';\n $get_theme->url = 'get-theme';\n $get_theme->parent_route = $system_id;\n $get_theme->save();\n $get_theme->roles()->attach($admin);\n $get_theme->roles()->attach($client_admin);\n\n $backup = new Route();\n $backup->route_name = 'Backup';\n $backup->url = 'backup';\n $backup->parent_route = $system_id;\n $backup->save();\n $backup->roles()->attach($admin);\n $backup->roles()->attach($client_admin);\n\n #### user management\n $user_mngt = new Route();\n $user_mngt->route_name = 'User Management';\n $user_mngt->save();\n $user_mngt_id = $user_mngt->id;\n\n #### user management children\n $all_user = new Route();\n $all_user->route_name = 'All Users';\n $all_user->url = 'all_users';\n $all_user->parent_route = $user_mngt_id;\n $all_user->save();\n $all_user->roles()->attach($admin);\n $all_user->roles()->attach($client_admin);\n\n $roles = new Route();\n $roles->route_name = 'User Roles';\n $roles->url = 'user_roles';\n $roles->parent_route = $user_mngt_id;\n $roles->save();\n $roles->roles()->attach($admin);\n $roles->roles()->attach($client_admin);\n\n $role = new Route();\n $role->route_name = 'Delete User';\n $role->url = 'delete-user/{id}';\n $role->parent_route = $user_mngt_id;\n $role->save();\n $role->roles()->attach($admin);\n $role->roles()->attach($client_admin);\n\n $role = new Route();\n $role->route_name = 'Block User';\n $role->url = 'all_users/block-user';\n $role->parent_route = $user_mngt_id;\n $role->save();\n $role->roles()->attach($admin);\n $role->roles()->attach($client_admin);\n\n $role = new Route();\n $role->route_name = 'Unblock User';\n $role->url = 'all_users/unblock-user';\n $role->parent_route = $user_mngt_id;\n $role->save();\n $role->roles()->attach($admin);\n $role->roles()->attach($client_admin);\n\n $audit_trail = new Route();\n $audit_trail->route_name = 'Audit Trail';\n $audit_trail->url = 'audit_trails';\n $audit_trail->parent_route = $user_mngt_id;\n $audit_trail->save();\n $audit_trail->roles()->attach($admin);\n $audit_trail->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Load Routes Allocation';\n $route->url = 'load-routes-allocation';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'is Route Allocated';\n $route->url = 'check-allocated-route/{id}';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Attach Route';\n $route->url = 'attach-route';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Detach Route';\n $route->url = 'detach-route';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n #### Bills and Payments\n\n $route = new Route();\n $route->route_name = 'Bills And Payments';\n $route->save();\n $bps_parent = $route->id;\n\n $route = new Route();\n $route->route_name = 'Customer Bills';\n $route->url = 'customer-bills';\n $route->parent_route = $bps_parent;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Load Customer Bills';\n $route->url = 'load-customer-bills';\n $route->parent_route = $bps_parent;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n }", "title": "" }, { "docid": "213aa39ce66af928e04eb3976193c064", "score": "0.59228444", "text": "public function createAction()\n {\n $entity = new Tribunal();\n $request = $this->getRequest();\n $form = $this->createForm(new TribunalType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $entity->setHabilitado(true);\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('tribunal_show', array('id' => $entity->getId(),\n 'status' => $this->container->getParameter('EXITO_REGISTRO'),)));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'status' => $this->container->getParameter('FALLO_REGISTRO'),\n );\n }", "title": "" }, { "docid": "7efee3cf28cb6822bf9b5f4fc8e3ccaa", "score": "0.59221256", "text": "public function create()\n {\n Gate::authorize('rutapermiso', [[\"clienteguardar\"]]);\n }", "title": "" }, { "docid": "a32833fef2cec57673ac7cc5ab537079", "score": "0.5915183", "text": "public function create()\n {\n //\n Admin::where('')->get();\n $admin = new Admin();\n $admin->name = 1;\n $admin->save();\n }", "title": "" }, { "docid": "d0598527ff1e690d336eb4a62bae820e", "score": "0.59144527", "text": "public function create()\n {\n abort(404, 'The resource you are looking for could not be found');\n }", "title": "" }, { "docid": "5ec1a6f6493b74e9945ca522b9ecd18a", "score": "0.5911293", "text": "public function postCreate()\n\t\t{\n\n\n\t\t\t//si todo esta bien guardamos los datos\n\t\t\t$test = new Test;\n\t\t\t$test->users_id = Input::get('userAdmin');\n\t\t\t$test->estado = Input::get('estado');\n\t\t\t$form = DB::table('formularios')->where('nombre',Input::get('formulario'))->first();\n\t\t\t$test->form_id = $form->id; \n\n\t\t\t//$app = Input::get('aplicacion');\n\t\t\t$app = DB::table('aplicaciones')->where('nombre',Input::get('aplicacion'))->first();\n\t\t\t$test->app_id = $app->id;\n\t\t\t//guardamos\n\t\t\t$test->save();\n\n\t\t\t//redirigimos a partisipantes\n\t\t\treturn Redirect::to('tests')->with('status', 'ok_create');\n\n\t\t}", "title": "" }, { "docid": "c0e93c9855cc35b1e6519605f5d81bb4", "score": "0.5909618", "text": "public function create()\n {\n return '{\"status\":\"Route is not available\"}';\n }", "title": "" }, { "docid": "591a2bc9e3f0d307e1fd82ab33c5ecda", "score": "0.5909415", "text": "public function create()\n {\n //dd($this->accessLevel->getRouteList());\n $data['permissions'] = $this->accessLevel->getRouteList();\n return view('access_level.create', $data);\n }", "title": "" }, { "docid": "b3fa61e6df83d790d3a43be967aca94b", "score": "0.59054893", "text": "public function create_admin()\n\t{\n\t\t//GET REQUIRED DATA FROM DB\n\t\t$data['data_admin']\t\t= $this->AdminModel->tb_admin()->result();\n\t\t$data['data_photographer']\t\t= $this->AdminModel->tb_photographer()->result();\n\t\t$data['data_clerk']\t\t= $this->AdminModel->tb_clerk()->result();\n\t\t$data['data_customer']\t= $this->AdminModel->tb_customer()->result();\n\n\t\t\n\t\t$nav_data['page_name'] \t\t\t= \"users\";\n\n\t\t$this->load->view('admin/admin_required_pages/nav', $nav_data );\n\n\t\t$this->load->view('admin/Va_admin-create', $data);\n\t}", "title": "" }, { "docid": "5776398ee6b553cd026dcf6a17515884", "score": "0.5904952", "text": "public function create()\n {\n //create\n }", "title": "" }, { "docid": "48d5964b42bfbb774d8b11242f3a11e1", "score": "0.59048104", "text": "public function create()\n {\n return redirect('admin/drivers')->with('message', 'Opps not found!');\n //return view('admin.drivers.create');\n }", "title": "" }, { "docid": "000eb5de9f41e4010eeaf14979800d3e", "score": "0.5903924", "text": "public function create()\n {\n return view(\"admin/teacher/add\");\n }", "title": "" }, { "docid": "ebb2f77543d952f08a9a65ef6909f219", "score": "0.590243", "text": "public function create()\n { \n $data = [\n 'trip' => null,\n 'action' => 'create'\n ];\n return view('admin.content.trips.create', $data);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "3ca53e14e3e38135fa94fd05f5150494", "score": "0.0", "text": "public function index(ContractorDataTable $contractor)\n {\n // dd(app()->getLocale());\n // return Session::all();\n return $contractor->render('admin.contractors.index');\n }", "title": "" } ]
[ { "docid": "d37ee75c4feac8dcd7712d902a70bf82", "score": "0.7607344", "text": "public function listAction()\n {\n \t/**\n \t * @todo return a paginated and ordered list, selecting only valid elements (move valid clause to rowset)\n \t */\n \t$this->view->resources = $this->_table->fetchAll(null, null, 15);\n }", "title": "" }, { "docid": "de80270cda7dc6348112d1542c1c3b6a", "score": "0.7491118", "text": "public function listingAction() {\r\n\r\n\t\t// Search Params\r\n\r\n\t\t// Do the show thingy\r\n\t\t\t// Get an array of friend ids\r\n\t\t\t// Get stuff\r\n\t\t\t// unset($values['show']);\r\n\r\n\t\t// Get blog paginator\r\n\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "7a3b535f1a43231cd882da50772ec5ee", "score": "0.74615455", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "8e2e0cd6669d378062a560c70954d431", "score": "0.74168706", "text": "public function indexAction(): void\n {\n $limit = (int) $this->Request()->getParam('limit', 1000);\n $offset = (int) $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "c11d55ce36b9b6bf39c0094bfe5d0fd7", "score": "0.7369403", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n //add url parameter as hidden input in the search form\n $urlParameters = $this->getUrlParameters('search');\n $this->request->request->set('extraParameters', $urlParameters);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\n $searchForm = $this->{$customMethodName}();\n } else {\n $searchForm = $this->createSearchForm();\n }\n\n return $this->render($this->entity['templates']['list'], array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'searchForm' => $searchForm->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }", "title": "" }, { "docid": "e008dc293c8e1bdcbf38634c0f67a5d1", "score": "0.7354826", "text": "public function listAction() {\r\n\t\t// Preload info\r\n\r\n\r\n\t\t// Search Params\r\n\r\n\r\n\t\t// Get paginator\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "e508f26cee6b6110b5e315b37bf01715", "score": "0.73057467", "text": "public function actionList()\n {\n $entity = $this->getEntity();\n if (!$entity->canList()) {\n $this->setEntityFlash('error', 'Unable to list {name}.');\n $this->redirectParent();\n }\n $this->render('list', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "109b33b70bf69a93460d062b2f83502f", "score": "0.7226076", "text": "public function index()\n {\n $resources = $this->objStoreResource->getAllResource(auth()->id());\n return view('home.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "68f3dc8f909d1dfb5a37b582d41cec68", "score": "0.719963", "text": "public function index()\n {\n\n extract($this->getResourceNames());\n\n $items = $modelPath::sortable()->paginate();\n \n\n\n return $this->compileView($resourceMultiple . '.index', [$resourceMultiple => $items]);\n }", "title": "" }, { "docid": "97f3caf6ecee75a55fbfadca2b98a829", "score": "0.7182086", "text": "protected function index()\n {\n $categories = Listing::paginate(10);\n return ListingResource::collection($categories);\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.713195", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "9ee2301bbe5ddd99bc48b5c1f13682d6", "score": "0.7125178", "text": "public static function list()\n {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include(__DIR__ . '/../views/books/list.php');\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.71218187", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "7a45345cbd9a9dd304c36c4a494e5375", "score": "0.71166694", "text": "public function index()\n {\n return $this->response->paginator(\n $this->filterQuery()->orderBy('id', 'desc')->paginate(request('limit', 10)),\n $this->transformer,\n ['key' => $this->resource_key]\n );\n }", "title": "" }, { "docid": "7ca504ed4a4a2ab91d9d42ce768fbca1", "score": "0.7111673", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAll();\n\n return $this->render('resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "260bd7b6f859caf980dd2ec389de158f", "score": "0.70988476", "text": "public function listAction()\n {\n $this->users->denyAccessToPage('admin');\n \n $all = $this->users->findAll();\n $status = $this->users->IsAuthenticated();\n \n $this->theme->setTitle(\"Visa alla användare\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Visa alla användare\",\n 'status' => $status,\n ], 'main');\n \n $this->views->add('users/users-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "3ff8464571003af8b9340bbfec1e3e20", "score": "0.7088415", "text": "public static function listing()\n {\n echo new \\UMS\\Views\\Standard('listing.phtml');\n }", "title": "" }, { "docid": "24716f78fa1798ecee7344c0553e427b", "score": "0.70843154", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n $parameters = array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n );\n\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \n }", "title": "" }, { "docid": "f882d8455ca2c120342f2b2b1a1c2565", "score": "0.70281464", "text": "public function index()\n {\n $resources = DB::table('admin_resource')\n ->get()\n ->toArray();\n return view('admin.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "ceecc69a5c7cd4cd8ab66be42cbae5ba", "score": "0.6991042", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n\t\t//return view('bcrud::list', $this->data);\n }", "title": "" }, { "docid": "a7c37722ff451d4806db867c3084436e", "score": "0.6983112", "text": "public function listing() {\r\n\r\n\t\t// Get the list of incidents from the database\r\n\t\t$incidents = $this->incident_model->list_all();\r\n\r\n\t\t// Prepare the data for the page\r\n\t\t$data = array(\r\n\t\t\t\t'title' => 'Listing of Incidents',\r\n\t\t\t\t'view' => 'incident/list',\r\n\t\t\t\t'incident_listing' => $this->incident_model->list_all()\r\n\t\t\t);\r\n\r\n\t\t// Load the view\r\n\t\t$this->load->view('main_template', $data);\r\n\r\n\t}", "title": "" }, { "docid": "36e3954f88638a9532a787d2cc444a30", "score": "0.6979115", "text": "function listAction() {\n $existing_api = _factory('sitemin_api_model_api')->get_gateway();\n $rs['api'] = $existing_api;\n $rs['_token'] = defaultHelper::page_hash_set('api,list');\n $rs['tpl'] = '/sitemin/api/view/_api_list.phtml';\n $rs['TITLE'] = 'API LIST';\n return array('view' => '/sitemin/view/index.phtml', 'data' => array('rs' => $rs));\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "e04c1be5ce440db436266eabe923599a", "score": "0.6958369", "text": "public function index() {\n\t\tSession::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->tree();\n\n\t\tif(!$this->all_rows) $this->all_rows = array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "a4e3ca4a3d5bf61db50faf86a8841ea7", "score": "0.6958334", "text": "public function index()\n {\n return view('admin::resource.index');\n }", "title": "" }, { "docid": "61e25f17bfcad7555516a67f6d445d1a", "score": "0.6940597", "text": "public function indexAction()\n {\n $this->listentriesAction();\n }", "title": "" }, { "docid": "7f07ef0085f42180361c2986a0c246bc", "score": "0.6919749", "text": "public function index () {\n\t\t$this->showAll();\n\t}", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "cdbe57e5f68037a7d673227250684866", "score": "0.68880165", "text": "public function index()\n {\n return SpecializationResource::collection(Spec::paginate(10));\n }", "title": "" }, { "docid": "ce119cc9f5dd3ee1904e1fd10c2e5f4f", "score": "0.68733615", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oAwardModel = new model_award();\n\t\t$tAwards = $oAwardModel->findAll();\n\n\t\t$oView = new _view('awards::list');\n\t\t$oView->tAwards = $tAwards;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "5cbfcb7b405ab167a69ee36809e4e4c6", "score": "0.687026", "text": "public function index()\n {\n // Get items\n // $items = Item::orderBy('type', 'asc')->paginate(5);\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of items as a resource\n return (ItemResource::collection($items))->response()->setStatusCode(200);\n }", "title": "" }, { "docid": "3880db888810873a15926adf0aeab153", "score": "0.68675166", "text": "public function action_list()\n {\n $model = Request::$current->param('model');\n $this->template->main->content = Model_Annex_Content::show_list($model);\n }", "title": "" }, { "docid": "0c8e64e28536e6fe176ead46e1742dc1", "score": "0.6852622", "text": "public function list()\n\t{\n\t\tglobal $venus;\n\t\t$this->prepare_items();\n\n\t\t$venus->plugins->run($this->prefix . 'list', $this);\n\t}", "title": "" }, { "docid": "fdd2aa08ee39ff613dfb2d2d853d735e", "score": "0.683835", "text": "public function index()\n {\n $this->checkPermission('shg_management_view');\n try {\n $data = $this->service->viewAllPartOne();\n $data = ShgListingResource::collection($data);\n\n return $this->respondWithSuccess($data);\n } catch (\\Throwable $th) {\n\n return $this->respondWithError($th);\n }\n }", "title": "" }, { "docid": "e5f507dbbe2411d3908a15f2210bc3ea", "score": "0.6836425", "text": "public function listAction() {\n $this->view->books = R::getAll('SELECT * FROM book WHERE title = :title', [':title' => 'Nodejs']);\n\n $this->render('list');\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "0745910a7b8ed31535e75cefd27b7b8c", "score": "0.6801322", "text": "public function showAllAction()\n {\n //find all recipes in database\n $recipes = $this->getDoctrine()->getRepository('AppBundle:Recipe')->findAll();\n\n // show all recipes as links(it is set in Twig)\n return ['recipes' => $recipes];\n }", "title": "" }, { "docid": "41b8938878fc471b8e628e34cd112379", "score": "0.68005955", "text": "public function index(): ListResourceCollection\n {\n return new ListResourceCollection(TodoList::paginate(10));\n }", "title": "" }, { "docid": "d3a3617a0e0a9e2771655b1532f470c2", "score": "0.6792327", "text": "public function index()\n\t{\n\t\treturn BookResource::collection(Book::paginate(10));\n\t\t\n\t}", "title": "" }, { "docid": "6040a050b581e9888004ec972d7e09a0", "score": "0.6788249", "text": "public function listentriesAction()\n {\n // use app/MyFirstBlog/_templates/list.phtml for viewing\n $viewAllEntries = new View('list.phtml');\n $entries = $this->em->entry->getAll();\n\n // assign data to the template\n $viewAllEntries->assign('entries', $entries);\n\n echo $this->loadMainView($viewAllEntries);\n }", "title": "" }, { "docid": "8a85663335231f3143dcbf588b19dbfa", "score": "0.67871946", "text": "public function index()\n {\n $substances = $this->model->paginate();\n return $this->getView(__FUNCTION__ , compact('substances'));\n }", "title": "" }, { "docid": "1d602c01714319f06611ab4c66abd251", "score": "0.6786255", "text": "public function index()\n {\n //Retrieve all podcasts, ordered in descending order by their id value\n $podcasts = Podcast::orderBy('id', 'desc')->paginate(15);\n //Return the list of podcasts as a collection of PodcastResource instances\n return PodcastResource::collection($podcasts);\n }", "title": "" }, { "docid": "49c1d78d94eec140cbd39c5a0665f7cf", "score": "0.67806053", "text": "public function index()\n {\n // Get modules\n $modules = Module::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of modules as a resource\n return ModuleResource::collection($modules);\n }", "title": "" }, { "docid": "b8bbd5c4b2b076654ec4820cf0f4f302", "score": "0.67777556", "text": "public function index()\n {\n return ResponseHelper::findSuccess(\n 'Items',\n ItemResource::collection(Item::all())\n );\n }", "title": "" }, { "docid": "d73771ef09d730c6579f2a991515d849", "score": "0.67710793", "text": "public function index()\n {\n $loans = Loan::paginate();\n return LoanResource::collection($loans);\n }", "title": "" }, { "docid": "cdf88fbb286dc19c1ad1e099d34c24cd", "score": "0.67550325", "text": "public function indexAction() {\n $this->view->headTitle('List Student');\n\n $currentPageNumber = $this->getParam(\"page\", 1);\n $itemPerPage = $this->getParam(\"size\", 3);\n\n $paginator = $this->__factoryPaginator($currentPageNumber, $itemPerPage);\n $this->view->listStudents = $paginator;\n }", "title": "" }, { "docid": "a558183236ee0a06301b5345bfbe3fe1", "score": "0.67493373", "text": "public function index()\n {\n $companies = Company::paginate();\n\n return $this->resp->ok(eRespCode::C_LISTED_200_00, new CompaniesPaginationResourceCollection($companies));\n }", "title": "" }, { "docid": "79a7d6352cec8f118d68b28508fa7a97", "score": "0.6742735", "text": "public function index()\n {\n $lists = user()->lists()->get();\n\n return ListResource::collection($lists);\n }", "title": "" }, { "docid": "5f95d2756a5e123a83fb7c11ebb43128", "score": "0.6726971", "text": "public function showList()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\tHTML_showTableHeading($I18N_objectStorageObjectName, $I18N_description, $I18N_status/*, $I18N_action*/);\n\t\tforeach ($this->foundObjects as $object)\n\t\t\tHTML_showTableRow($this->getCOSName($object), $this->getCOSDescription($object), $this->getCOSStatusHumanReadable($object)/*, $this->getCOSStatus($object)*/);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a69ac66edc8a557759a001c94242c947", "score": "0.6707937", "text": "function list() {\n global $app;\n $sth = $this->PDO->prepare(\"SELECT * FROM person\");\n $sth->execute();\n $result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n $app->render('default.php', [\"data\" => $result], 200);\n }", "title": "" }, { "docid": "7199baaacb728985be1992dbc56397e3", "score": "0.6706126", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n\r\n //return resources listing view\r\n return view(\\OogleeUConfig::get('config.user_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "61a33e299a8771fe4e3edd28a88e59b8", "score": "0.6694361", "text": "public function index()\n {\n $studentRecords = $this->studentRepository->getAllStudentRecords();\n return StudentResource::collection($studentRecords);\n }", "title": "" }, { "docid": "d79dbba2d57614ef830362a19c63a970", "score": "0.66864055", "text": "public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }", "title": "" }, { "docid": "f87e4c930a716211a968b3d9cc7f28cb", "score": "0.6679537", "text": "public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }", "title": "" }, { "docid": "daba699beaeef91359ed7b10313414c0", "score": "0.6675206", "text": "public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }", "title": "" }, { "docid": "5278e85997fa12c693ce5b7a9a5f2e24", "score": "0.6659221", "text": "public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}", "title": "" }, { "docid": "601280f6c7a8fe1284080c1c22a3e447", "score": "0.6654493", "text": "public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "aa14178a7d612bc110499d18b35cfe1c", "score": "0.6653656", "text": "public function index()\n {\n return TodoResource::collection($this->todoRepository->findAll());\n }", "title": "" }, { "docid": "da0cc4a612f27e870e1a151346a2b1e3", "score": "0.66501856", "text": "public function index()\n {\n $sub_brand_details = SubBrandDetails::paginate(10);\n return SubBrandDetailsResource::collection($sub_brand_details);\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "d9dcf3302214d3795a06e4d23822d158", "score": "0.66456574", "text": "public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $sellingLists = $this->paginate($this->SellingLists);\n\n $this->set(compact('sellingLists'));\n $this->set('_serialize', ['sellingLists']);\n }", "title": "" }, { "docid": "875081e376ab728c3750171aff9d42f9", "score": "0.6645129", "text": "public function index()\n {\n $items = $this->item->paginate(10);\n\n return $this->response->view('admin.item.index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "e2eacd814cad9b8205ce83c08f3b5e18", "score": "0.6644318", "text": "public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "7ba8d3b39da88e11faeb12313b1810c2", "score": "0.6642726", "text": "public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }", "title": "" }, { "docid": "2e266895b57f5ca532a4517799527c81", "score": "0.6637523", "text": "public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }", "title": "" }, { "docid": "c7312e7e8966df50b49658cf582ce6ec", "score": "0.66348624", "text": "public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }", "title": "" }, { "docid": "ddd89648877f652ca4fa01f7cfa10b0c", "score": "0.6634571", "text": "public function index()\n {\n return \\response()->json($this->listing->all());\n }", "title": "" }, { "docid": "db782cdc73caf0645a9287f4d968586b", "score": "0.66271836", "text": "public function actionList()\n {\n $dataProvider = Event::getEventsForView();\n return $this->render('list', ['listDataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "9d24fae63c3b76b647f11d2a4ee6986d", "score": "0.6619498", "text": "public function listAction() {\n $this->layout('layout/json');\n\n $sSystemKey = $_REQUEST['systemkey'];\n\n # get list label from query\n $sLang = 'en_US';\n if(isset($_REQUEST['lang'])) {\n $sLang = $_REQUEST['lang'];\n }\n\n // translating system\n $translator = new Translator();\n $aLangs = ['en_US','de_DE'];\n foreach($aLangs as $sLoadLang) {\n if(file_exists(__DIR__.'/../../../oneplace-translation/language/'.$sLoadLang.'.mo')) {\n $translator->addTranslationFile('gettext', __DIR__.'/../../../oneplace-translation/language/'.$sLang.'.mo', 'skeleton', $sLoadLang);\n }\n }\n\n $translator->setLocale($sLang);\n\n try {\n $oInstanceTbl = CoreController::$oServiceManager->get(\\OnePlace\\Instance\\Model\\InstanceTable::class);\n } catch(\\RuntimeException $e) {\n echo 'could not load instances';\n return false;\n }\n\n try {\n $oInstance = $oInstanceTbl->getSingle($sSystemKey,'instance_apikey');\n } catch(\\RuntimeException $e) {\n echo 'could not find your instance sorry';\n return false;\n }\n\n try {\n $oTag = CoreController::$aCoreTables['core-tag']->select(['tag_key'=>'category']);\n $oTag = $oTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load tag';\n return false;\n }\n\n try {\n $oEntityTag = CoreController::$aCoreTables['core-entity-tag']->select(['tag_idfs'=>$oTag->Tag_ID,'entity_form_idfs'=>'article-single','tag_value'=>'Store Item']);\n $oEntityTag = $oEntityTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load entity tag';\n return false;\n }\n\n try {\n $oArticleTbl = CoreController::$oServiceManager->get(\\OnePlace\\Article\\Model\\ArticleTable::class);\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n try {\n $aFields = $this->getFormFields('article-single');\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n $aItems = [];\n\n if(count($oItemsDB) > 0) {\n foreach($oItemsDB as $oItem) {\n $aPublicItem = ['id'=>$oItem->getID()];\n # add all fields to item\n foreach($aFields as $oField) {\n switch($oField->type) {\n case 'multiselect':\n # get selected\n $oTags = $oItem->getMultiSelectField($oField->fieldkey);\n $aTags = [];\n foreach($oTags as $oTag) {\n $aTags[] = ['id'=>$oTag->id,'label'=>$translator->translate($oTag->text,'skeleton',$sLang)];\n }\n $aPublicItem[$oField->fieldkey] = $aTags;\n break;\n case 'select':\n # get selected\n $oTag = $oItem->getSelectField($oField->fieldkey);\n if($oTag) {\n if (property_exists($oTag, 'tag_value')) {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->id, 'label' => $translator->translate($oTag->tag_value,'skeleton',$sLang)];\n } else {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->getID(), 'label' => $translator->translate($oTag->getLabel(),'skeleton',$sLang)];\n }\n }\n break;\n case 'text':\n case 'date':\n case 'textarea':\n case 'currency':\n $aPublicItem[$oField->fieldkey] = $translator->translate($oItem->getTextField($oField->fieldkey),'skeleton',$sLang);\n break;\n default:\n break;\n }\n }\n $aItems[] = $aPublicItem;\n }\n }\n\n $aReturn = ['state'=>'success','message'=>'welcome '.$oInstance->getLabel(),'category'=>$oEntityTag->tag_value,'items'=>$aItems];\n echo json_encode($aReturn);\n\n return false;\n }", "title": "" }, { "docid": "fbeb130c8eeb567e7fad3c7305600c0c", "score": "0.66142017", "text": "public function index()\n {\n $this->authorize('list', Client::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "dd6a998d3bb458c37ae44d961b97d40b", "score": "0.6612911", "text": "public function index()\n {\n //get contacts \n $contacts = Contacts::all();\n\n //return collection of contacts as a resource\n return ContactsResource::collection($contacts);\n }", "title": "" }, { "docid": "cb2a32c859addaec7f6f5ede08ff0730", "score": "0.66128945", "text": "public function index()\n {\n $responds = Respond::all();\n return RespondForListResource::collection($responds);\n }", "title": "" }, { "docid": "1a54ebc6660394a2c42a760823c26a75", "score": "0.66118765", "text": "public function index()\n {\n //Get works\n $works = Work::paginate(15);\n \n //Return collection of works as a resource\n return WorkResource::collection($works);\n }", "title": "" }, { "docid": "5c88cf68eb91b67ee61edf19f3f2ae11", "score": "0.6608679", "text": "public function index()\n {\n $inven = Inventory::paginate(15);\n\n return InventoryResource::collection($inven);\n }", "title": "" }, { "docid": "68fd86bd147479dce20ee02a8707173a", "score": "0.6592657", "text": "public function index()\n {\n //\n return CardResource::collection($this->cardRepo->getAll());\n }", "title": "" }, { "docid": "42a6f7bb31023e697bf6d8fe877d4585", "score": "0.658499", "text": "public function index()\n {\n $items = Item::all();\n return $this->sendData('list', $items, 200);\n }", "title": "" }, { "docid": "209ce25a3fdacd16972a8a7301eac167", "score": "0.6584275", "text": "public function listAction()\n {\n $entities = $this->get('trip.repository')->findActive(5);\n\n return $this->render('TripBundle:Trip:list_block.html.twig', array(\n 'entities' => $entities,\n 'list_length' => 5,\n ));\n }", "title": "" }, { "docid": "c6efa0ee8e5b46e919fc3043bad53b51", "score": "0.65816754", "text": "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate());\n }", "title": "" }, { "docid": "28b9b7b045b952a1e51b3daabb3db025", "score": "0.65804577", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n//\t\t\tif (!isset($this->request->get['parent_id'])) $this->request->get['parent_id'] = '0';\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "679aeb0a886968964597db4d52db9f05", "score": "0.65769154", "text": "public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "bb496e1f3376022c7114e22d5ed48267", "score": "0.6573981", "text": "public function index()\n\t{\n\t\t$this->getItem();\n\t}", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "423da9caffc6ac8f568bcebdebf9afbe", "score": "0.65662223", "text": "public function listAction()\n {\n $this->view->users = UserCatalog::getInstance()->getActives();\n $this->setTitle('List the User');\n }", "title": "" }, { "docid": "2d21f0bc716b4c176e994f7636cae49f", "score": "0.65646654", "text": "public function index()\n {\n $branches = Branch::paginate(15);\n return BranchResource::collection($branches);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "367f38d2314314134a538ae223f4cd5d", "score": "0.6560926", "text": "public function index () {\n permiss ( 'user.list' );\n\n $data = $this->entity\n ->with(['role'])\n ->where('id', '<>', \\Auth::id())\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "title": "" }, { "docid": "32b26e83b4a0ac1871cecd5a10eb2445", "score": "0.65592414", "text": "public function actionList()\r\n {\r\n $option = $this->getParams();\r\n $table = $this->getTableName($option);\r\n $model = $this->model($table);\r\n\r\n $list = $model->all(\r\n function ($ar) use ($table, $model, $option) {\r\n return $model->handleActiveRecord($ar, $table, $option);\r\n },\r\n null,\r\n Yii::$app->params['use_cache']\r\n );\r\n\r\n $this->success($list);\r\n }", "title": "" }, { "docid": "04afb7d77b84ccf4a4dd5ac14fa2c226", "score": "0.6552952", "text": "public function index()\n { \n $this->paginate = [\n 'order' => ['Firms.name' => 'ASC'],\n 'maxLimit' => 20\n ];\n $firms = $this->paginate($this->Firms);\n\n $this->set(compact('firms'));\n }", "title": "" }, { "docid": "6463720c82b75c6c9ffdb8fa297632ea", "score": "0.65498865", "text": "public function index()\n\t{\n $inventaries = Inventary::orderBy('updated_at', 'desc')->paginate(12);\n return view(self::$prefixView . 'lists', compact('inventaries'));\n\t}", "title": "" }, { "docid": "04cfd6b456f88347b94d80eedaf2f138", "score": "0.65456504", "text": "public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }", "title": "" }, { "docid": "4b7799b0d4a4b471dbc995e613462306", "score": "0.6540187", "text": "public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "3ce1999f8313263a55f4c0a4a6d107fc", "score": "0.6527433", "text": "public function index()\n\t{\n\t\tif(!$this->permission->has_permission(\"specialization_viewall\")){\n\t\t\techo \"No permissions\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Get all specialization from db\n\t\t$specialization = $this->SpecializationModel->GetAll();\n\n\t\t// Define data array\n\t\t$data = array(\n\t\t\t\"specialization_list\" => $specialization\n\t\t);\n\n\t\t// Load specialization view\n\t\t$this->layout->view('manage_details/specialization/specialization',$data);\n\t}", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "0e0fe48e1d16e1503e2b168a9374594b", "score": "0.6524685", "text": "public function index()\n {\n $todos = $this->todo->fetchPaginated();\n\n if ($todos->count() > 0) {\n return $this->respondWithPaginatedData($todos);\n }\n return $this->respondWithNoContent();\n }", "title": "" }, { "docid": "c21960757730e605b84ad99c7f97a9e0", "score": "0.6521291", "text": "public function index() {\n\n // 1. Récupérer les cars\n\n $cars = $this->container->getCarManager()->findAll();\n\n // 2. Afficher les cars\n echo $this->container->getTwig()->render('cars/index.html.twig', [\n 'cars' => $cars\n ]);\n }", "title": "" }, { "docid": "b1dec5f0dac45e2b14cc0f57d1289acb", "score": "0.65199256", "text": "public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }", "title": "" } ]
4557752ac75105483d98706b2226a87d
Get Network Interface information for a server. Get server's network interfaces. Returns IP addresses and net masks. This call will use zmrcd to call /opt/zimbra/libexec/zmserverips
[ { "docid": "a88b2ce99dc2482ca35196e5420c4056", "score": "0.6261978", "text": "public function getServerNIfs(Server $server, IpType $type = null)\n {\n $request = new \\Zimbra\\Admin\\Request\\GetServerNIfs(\n $server, $type\n );\n return $this->getClient()->doRequest($request);\n }", "title": "" } ]
[ { "docid": "fa764e9b937c1eeef065e720a8a79eff", "score": "0.62304616", "text": "public function getNetworkInterfaces()\n {\n if (is_null($this->_all))\n {\n $this->_all = explode(\"\\n\", $this->getShellExec(self::NETWORKSETUP.\" | grep 'en' | grep -o en.\"));\n }\n\n return $this->_all;\n }", "title": "" }, { "docid": "916ede06634becc3d09eeaedae8dc7e1", "score": "0.6191964", "text": "private function get_interfaces_ip () {\n // init\n $this->connection_open ();\n // fetch\n try {\n $res1 = $this->snmp_session->walk( \"IP-MIB::ipAdEntAddr\" );\n $res2 = $this->snmp_session->walk( \"IP-MIB::ipAdEntNetMask\" );\n\t\t}\n\t\tcatch (Exception $e) {\n \t\tthrow new Exception ($e->getMessage());\n\t\t}\n\n // check for errors\n $this->connection_error_check ();\n\n // parse result\n $n=0;\n foreach ($res1 as $r) {\n $res[$n]['ip'] = $this->parse_snmp_result_value ($r);\n $n++;\n }\n $n=0;\n foreach ($res2 as $r) {\n $res[$n]['mac'] = $this->fill_mac_nulls ($r);\n // validate mac\n if ($this->validate_mac($res[$n]['mac'])===false) { $res[$n]['mac'] = \"\"; }\n $n++;\n };\n\n // save result\n $this->save_last_result ($res);\n\n // return response\n return isset($res) ? $res : false;\n }", "title": "" }, { "docid": "90379935cb13b1bd406607c44256e023", "score": "0.5889441", "text": "public function getHostInterfaces(){\n $process = new Process(['ip', 'link', 'show']);\n\n $process->run();\n\n $net_list = explode(PHP_EOL, $process->getOutput());\n $out = array();\n\n for($i = 0; $i < sizeof($net_list)-2; $i=$i+2){\n array_push($out, trim(explode(':', $net_list[$i])[1]));\n }\n\n return $out;\n\n\n }", "title": "" }, { "docid": "bb2df27b60dde02d720b387dda6f9fc8", "score": "0.56563", "text": "public function getNetworkInfo()\n {\n return $this->__call('getnetworkinfo');\n }", "title": "" }, { "docid": "f7eee974b5d49acd52709a0f546b46b3", "score": "0.5490413", "text": "public function getnetworkinfo()\n {\n return $this->client->execute('getnetworkinfo', array());\n }", "title": "" }, { "docid": "725efbd5d6ec4c132d15e918f69686e3", "score": "0.5371842", "text": "public function getNIC()\n {\n return $this->NIC;\n }", "title": "" }, { "docid": "725efbd5d6ec4c132d15e918f69686e3", "score": "0.5371842", "text": "public function getNIC()\n {\n return $this->NIC;\n }", "title": "" }, { "docid": "1d627422f8bb3a1030eb671770a7905d", "score": "0.5330466", "text": "public function getLogicalInterfaces()\n {\n return $this->logical_interfaces;\n }", "title": "" }, { "docid": "e1b8e1e7af5bf8edfc80ff348155536a", "score": "0.5201349", "text": "public function getNetmask() {\n if(is_null($this->version)) return null;\n return $this->Bin2Ip($this->netmask_long);\n }", "title": "" }, { "docid": "118e16958e229e6aee774d7a0cad0157", "score": "0.516977", "text": "public function describeNetworkInterfaces($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->describeNetworkInterfacesWithOptions($request, $runtime);\n }", "title": "" }, { "docid": "713cabcd13fb8c08a9bc8bb15c8c532c", "score": "0.5143671", "text": "public function getWiFiInterfaces()\n {\n if (is_null($this->_wifi))\n {\n $this->_wifi = explode(\"\\n\", $this->getShellExec(self::NETWORKSETUP.\" | grep -A2 'Wi-Fi\\|Airport' | grep -o en.\"));\n }\n\n return $this->_wifi;\n }", "title": "" }, { "docid": "1bd3409307043ad8ae61f10c881f15d2", "score": "0.50809765", "text": "protected function getInterfaces (String $ip)\n {\n exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_index $ip\",$intfirst);\n exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_index_ip $ip\" , $indexip);\n exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_ip $ip\" ,$intips);\n $a=true;\n if (empty($indexip))\n {\n $f=false;\n $a=false;\n }\n else\n {\n $j=0;\n $f=true;\n }\n foreach ($intfirst as $i) { \n $intdescr = shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_descr $ip $i\");\n $inttype= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_type $ip $i\");\n $intmtu= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_mtu $ip $i\");\n $intspeed= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_speed $ip $i\");\n $intadmin= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_admin $ip $i\");\n $intoper= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_oper $ip $i\");\n if ($a == false)\n {\n $intvlan = shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_vlan $ip $i\");\n if ($intvlan == NULL || strpos($intvlan, 'Null') !== false)\n {\n $intip = \"Unavailable\";\n }\n else\n {\n $intip = \"Vlan \".$intvlan;\n }\n }\n else if ($f && $i == $indexip[$j])\n {\n $intip = $intips[$j];\n if ( (count($indexip) - 1) == $j )\n {\n $f = false;\n }\n else\n {\n $j++;\n }\n }\n else\n {\n $intip = \"Unavailable\";\n }\n // if (strpos($intdescr, 'Null') == false)\n // {\n $interface = new Intdevice ;\n $interface -> ip = $ip;\n $interface -> id = $i;\n if ($intdescr == NULL || strpos($intdescr, 'Null') !== false)\n {\n $intdescr = \"Unavailable\";\n }\n if ($inttype == NULL || strpos($inttype, 'Null') !== false)\n {\n $inttype = \"Unavailable\";\n }\n if ($intmtu == NULL || strpos($intmtu, 'Null') !== false)\n {\n $intmtu = \"Unavailable\";\n }\n if ($intspeed == NULL || strpos($intspeed, 'Null') !== false)\n {\n $intspeed = \"Unavailable\";\n }\n if ($intadmin == NULL || strpos($intadmin, 'Null') !== false)\n {\n $intadmin = \"Unavailable\";\n }\n if ($intoper == NULL || strpos($intoper, 'Null') !== false)\n {\n $intoper = \"Unavailable\";\n }\n\n\n \n\n\n $interface -> description = $intdescr;\n $interface -> type = $inttype;\n $interface -> mtu = $intmtu;\n $interface -> speed = $intspeed; \n $interface -> adminstatus = $intadmin;\n $interface -> operstatus = $intoper;\n $interface -> intip = $intip;\n // exec(\"echo $intip >> /mnt/hgfs/NetworkManager/scans/interfaces\");\n\n if (Intdevice::where('ip',$ip)->where('id',$i)->first())\n {\n DB::table('intdevice')->where('ip',$ip)->where('id',$i)->update(['description'=> $interface ->description , 'type' => $interface->type , 'mtu' => $interface->mtu,'speed' => $interface->speed,'adminstatus' => $interface->adminstatus , 'operstatus' => $interface->operstatus , 'intip' => $interface->intip]);\n }\n else\n {\n $interface -> save();\n }\n // }\n }\n }", "title": "" }, { "docid": "da033c524a4d670cb0218dd72c77e7dc", "score": "0.5077077", "text": "public function returnAllIps()\n\t{\n\t\t$result = mysqli_query($this->con, \"SELECT sys.mac_address, ned.ip FROM system sys, network_details ned WHERE sys.mac_address = ned.system_id ORDER BY sys.status DESC, sys.timestamp DESC;\");\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4f7c100ed0fe7fe500b7db8640fa94d5", "score": "0.5074737", "text": "public function ips()\n {\n return $this->getClientIps();\n }", "title": "" }, { "docid": "3127120d2b7096fe2196ffe2c3b78ae5", "score": "0.50746506", "text": "function getInterface($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.common.objectuuid\");\n\t\t// Get the configuration object.\n\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t$object = $db->get(\"conf.system.network.interface\", $params['uuid']);\n\t\t// Modify the generic network interface configuration data.\n\t\t// Other interface type related data must be modified separately.\n\t\t$result = $object->getAssoc();\n\t\t$result['dnsnameservers'] = str_replace(\" \", \",\",\n\t\t $result['dnsnameservers']);\n\t\t$result['dnssearch'] = str_replace(\" \", \",\", $result['dnssearch']);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "41c05866c9f5c93debd488fb54320cad", "score": "0.50733626", "text": "public function getInterfacesAction()\n {\n // map physical interfaces to description / name\n $configObj = Config::getInstance()->object();\n $allInterfaces = array();\n foreach ($configObj->interfaces->children() as $key => $intf) {\n $allInterfaces[(string)$intf->if] = empty($intf->descr) ? $key : (string)$intf->descr;\n }\n return $allInterfaces;\n }", "title": "" }, { "docid": "2091098d59795a2bf36f48c873cc44e7", "score": "0.50632423", "text": "protected function getIpV4($interface)\n {\n if ($retval = $this->getShellExec(sprintf('/sbin/ifconfig %s 2>/dev/null', $interface)))\n {\n $lines = explode(\"\\n\", $retval);\n foreach ($lines as $line)\n {\n if (preg_match('#^\\s*inet\\s([0-9.]*).*#', $line, $matches))\n {\n return $matches[1];\n }\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "45a9bde3b50d2b04010874e47fce9389", "score": "0.505277", "text": "function get_aws_instance_network_interfaces() {\n $interface_parameters = array(\n 'device-number',\n 'interface-id',\n 'local-hostname',\n 'local-ipv4s',\n 'mac',\n 'owner-id',\n 'security-group-ids',\n 'security-groups',\n 'subnet-id',\n 'subnet-ipv4-cidr-block',\n 'vpc-id',\n 'vpc-ipv4-cidr-block',\n 'vpc-ipv4-cidr-blocks'\n );\n\n // get macs\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_URL => 'http://169.254.169.254/latest/meta-data/network/interfaces/macs/',\n ));\n $output = curl_exec($ch);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($code == '200') {\n $interfaces = array();\n foreach(preg_split(\"/((\\r?\\n)|(\\r\\n?))/\", $output) as $mac){\n $interface_details = array();\n\n // Get each parameter for interface\n foreach ($interface_parameters as $parameter) {\n curl_setopt_array($ch, array(\n CURLOPT_URL => \"http://169.254.169.254/latest/meta-data/network/interfaces/macs/$mac/$parameter\",\n ));\n $output = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($code == '200') {\n $interface_details[$parameter] = $output;\n }\n }\n $interfaces[] = $interface_details;\n }\n return $interfaces;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "eb22d38988eba4c1dd3a07dff9f4f510", "score": "0.50353885", "text": "public function ircInfo($server = null)\n {\n return $this->getIrcMessage('INFO', array($server));\n }", "title": "" }, { "docid": "9bd9f153023d85fe351723a411e67450", "score": "0.50322354", "text": "public function getServerIp()\n {\n $value = $this->get(self::SERVER_IP);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "745e5ff0c6bc96be61f642ce3f5515cd", "score": "0.4943413", "text": "function zerotier_list_joined_networks() {\n exec(\"/usr/local/bin/zerotier-cli -j listnetworks\", $netj);\n $nets = json_decode(implode('',$netj));\n return $nets;\n}", "title": "" }, { "docid": "937f099476ac50cc376f355b6d0106e9", "score": "0.48766026", "text": "protected function getHostIpAddress()\n\t{\n\t\t$BIN_DIR=APP_BINDIR;\n\n\t\t// step 1 - how many adapters do we have on this box?\n\t\t// @todo Maybe we want to move this somewhere more central later?\n\t\t$os = Os::getOs();\n\t\t$parser = IfconfigParser::fromDistributions($os->getPossibleClassNames());\n\t\t$netifaces = new netifaces($os, $parser);\n\n\t\t$adapters = $netifaces->listAdapters();\n\t\tif (empty($adapters)) {\n\t\t\tthrow new Exception(\"unable to parse host machine network adapters list\");\n\t\t}\n\n\t\t// step 2 - find an adapter that is most likely to have the IP address\n\t\t// that we want\n\t\t//\n\t\t// note: am not sure that the search list for OSX interfaces is\n\t\t// reliable :(\n\n\t\ttry {\n\t\t\t$searchList = array(\"br0\", \"p2p1\", \"eth0\", \"en2\", \"en0\", \"en1\", \"wlan0\", \"p6p1\");\n\t\t\tforeach ($searchList as $adapterToTest) {\n\t\t\t\t// skip over any adapters that don't exist on this machine\n\t\t\t\tif (!in_array($adapterToTest, $adapters)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// we think the adapter is present\n\t\t\t\t//\n\t\t\t\t// does it have an IP address?\n\t\t\t\ttry {\n\t\t\t\t\t$ipAddress = $netifaces->getIpAddress($adapterToTest);\n\t\t\t\t} catch(NetifacesException $e){\n\t\t\t\t\t// We couldn't get an IP address\n\t\t\t\t\t$ipAddress = null;\n\t\t\t\t}\n\n\t\t\t\t// did we get back a valid IP address?\n\t\t\t\t$parts = explode('.', $ipAddress);\n\t\t\t\tif (count($parts) == 4) {\n\t\t\t\t\t// success!\n\t\t\t\t\treturn array($adapterToTest, $ipAddress);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if we get here, we could not determine the IP address of our\n\t\t\t// host :(\n\t\t\t//\n\t\t\t// this sucks\n\t\t\tthrow new NetifacesException(\"Unable to determine IP address\");\n\n\t\t} catch (NetifacesException $e){\n\t\t\tthrow new Exception(\"could not determine IP address of host machine\");\n\t\t}\n\t}", "title": "" }, { "docid": "a6f6190f3b20667b9107e86a7bb68856", "score": "0.4870772", "text": "public static function getLocalIps()\n {\n return ['127.0.0.1', '1', '::1'];\n }", "title": "" }, { "docid": "dd73d5146f6a3c1f390be674f30399ee", "score": "0.4859878", "text": "private function discoverWANInterface()\n {\n $lines = preg_split(\"/\\n/\", trim(`/sbin/route -n |grep eth | sort -r`));\n\n $details = preg_split(\"/\\s+/\", $lines[0]);\n $this->wan->netmask = $details[2];\n $this->wan->iface = $details[7];\n $details = preg_split(\"/\\s+/\", end($lines));\n $this->wan->gateway = $details[1];\n\n $this->wan->mac = $this->discoverMAC($this->wan->iface);\n $this->wan->ipaddress = $this->discoverIPAddress($this->wan->iface);\n $this->discoverDNS($this->wan);\n\n }", "title": "" }, { "docid": "cd9b2b09dca66e48574457da1a62337f", "score": "0.4851467", "text": "public function getServerIp()\n {\n return $this->serverIp;\n }", "title": "" }, { "docid": "6535a86eca8bebbbb7b0d8e452a1ac0f", "score": "0.48429832", "text": "function get_configured_ip_addresses() {\n\tglobal $config;\n\n\tif (!function_exists('get_interface_ip')) {\n\t\trequire_once(\"interfaces.inc\");\n\t}\n\t$ip_array = array();\n\t$interfaces = get_configured_interface_list();\n\tif (is_array($interfaces)) {\n\t\tforeach ($interfaces as $int) {\n\t\t\t$ipaddr = get_interface_ip($int);\n\t\t\t$ip_array[$int] = $ipaddr;\n\t\t}\n\t}\n\t$interfaces = get_configured_vip_list('inet');\n\tif (is_array($interfaces)) {\n\t\tforeach ($interfaces as $int => $ipaddr) {\n\t\t\t$ip_array[$int] = $ipaddr;\n\t\t}\n\t}\n\n\t/* pppoe server */\n\tif (is_array($config['pppoes']) && is_array($config['pppoes']['pppoe'])) {\n\t\tforeach ($config['pppoes']['pppoe'] as $pppoe) {\n\t\t\tif ($pppoe['mode'] == \"server\") {\n\t\t\t\tif (is_ipaddr($pppoe['localip'])) {\n\t\t\t\t\t$int = \"poes\". $pppoe['pppoeid'];\n\t\t\t\t\t$ip_array[$int] = $pppoe['localip'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $ip_array;\n}", "title": "" }, { "docid": "5e488f5b09bd7804dc8023d7d4c9493e", "score": "0.48211935", "text": "public function getNetworkInterface($name, $nic){\n $info = $this->vmInfo($name);\n\n $info = explode(PHP_EOL, $info);\n\n foreach($info as $line){\n if (strpos($line, $nic) !== false){\n return explode(',',explode(':', $line)[3])[0];\n }\n }\n return $nic.' not found';\n }", "title": "" }, { "docid": "85c8f4e3932c4db5f9af2c973d3d63bd", "score": "0.48008832", "text": "public function getNIP()\n {\n return $this->nIP;\n }", "title": "" }, { "docid": "80ac3ff57220dfec0b29e7d86db735a8", "score": "0.47944614", "text": "public function getIPAddress() \n\t {\n\t\t$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\n\t\tforeach ($ip_keys as $key)\n\t\t{\n\t\t\tif (array_key_exists($key, $_SERVER) === true)\n\t\t\t{\n\t\t\t\tforeach (explode(',', $_SERVER[$key]) as $ip)\n\t\t\t\t{\n\t\t\t\t\t$ip = trim($ip);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ip;\n\t }", "title": "" }, { "docid": "72355b1e311e40d06b903b4aa28878c2", "score": "0.47629336", "text": "public function getIpis(): IPIList\n {\n return $this->ipis;\n }", "title": "" }, { "docid": "2d58bca7b0af5738585cffa2bea986b0", "score": "0.47032192", "text": "public function getEthernetConfiguration()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ETHERNET_CONFIGURATION, $payload);\n\n $payload = unpack('C1connection/C4ip/C4subnet_mask/C4gateway/v1port', $data);\n\n $result['connection'] = $payload['connection'];\n $result['ip'] = IPConnection::collectUnpackedArray($payload, 'ip', 4);\n $result['subnet_mask'] = IPConnection::collectUnpackedArray($payload, 'subnet_mask', 4);\n $result['gateway'] = IPConnection::collectUnpackedArray($payload, 'gateway', 4);\n $result['port'] = $payload['port'];\n\n return $result;\n }", "title": "" }, { "docid": "7249c12e17fc6a3e67cbcf07080c047f", "score": "0.4701846", "text": "function wg_interface_status() {\n\tglobal $wgg;\n\n\t$status = array();\n\texec(\"{$wgg['ifconfig']} -a -g {$wgg['if_group']}\", $status);\n\n\t$output = implode(\"\\n\", $status);\n\treturn htmlspecialchars($output);\n\n}", "title": "" }, { "docid": "9b58080a486a5c188eb69442de6d3556", "score": "0.4697919", "text": "function get_interface_list() {\n\t$devices = array();\n\t$file_name = \"/proc/net/dev\";\n\n\tif ($fopen_file = fopen($file_name, 'r')) {\n\t\twhile ($buffer = fgets($fopen_file, 4096)) {\n\t\t\tif (preg_match(\"/eth[0-9][0-9]*/i\", trim($buffer), $match)) {\n\t\t\t\t$devices[] = $match[0];\n\t\t\t}\n\t\t}\n\t\t$devices = array_unique($devices);\n\t\tsort($devices);\n\t\tfclose ($fopen_file);\n\t}\n\treturn $devices;\n}", "title": "" }, { "docid": "9dac1495b929fda5b221620f792694a9", "score": "0.4689412", "text": "function noOfInterfaces(){\n\t\t//get no of Interfaces\n\t\t$oid = \".1.3.6.1.2.1.2.1.0\";\n\t\t$out = $this->snmpGetandTrim($oid,\"INTEGER\");\n\t\tif($out != \"ERROR\"){\n\t\t\treturn $out;\n\t\t}else{\n\t\t\treturn $e100;\n\t\t}\n\t}", "title": "" }, { "docid": "aa222e62108d35d8ece7fea0e853ef46", "score": "0.46884146", "text": "public function setLogicalInterfaces($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\BareMetalSolution\\V2\\ServerNetworkTemplate\\LogicalInterface::class);\n $this->logical_interfaces = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "5d5e763613f64cec3cff1b4a2b71b8d7", "score": "0.46842262", "text": "public function GetIP();", "title": "" }, { "docid": "01016317b3a98014639af763a3ad9917", "score": "0.4672824", "text": "public function getILNS() {\n return $this->ilns;\n }", "title": "" }, { "docid": "79cb910d5ccb3cdf6784c36979c864ef", "score": "0.466658", "text": "public function serverInfo()\n {\n $url = $this->service_url . '/serverInfo';\n $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json');\n return json_decode($data, true);\n }", "title": "" }, { "docid": "4ac6164f75ce5b3184e04674eccd16aa", "score": "0.4665719", "text": "public function getSentinelServers();", "title": "" }, { "docid": "73e897f1411f628fda2cb2833b4a96db", "score": "0.46637505", "text": "function getServerIPAddress(){\n\treturn \"{$_SERVER['SERVER_ADDR']}\";\n}", "title": "" }, { "docid": "d97c99ebb210d288c221e86f33979b0b", "score": "0.46613893", "text": "function get_server_info() {\n\t\treturn array(\n\t\t\t'MySQL',\n\t\t\tmysql_get_server_info($this->connection)\n\t\t);\n\t}", "title": "" }, { "docid": "cc0183187ec76deb0965d0540cda194f", "score": "0.46559092", "text": "private function discoverLANInterface()\n {\n $details = preg_split(\"/\\s+/\", `/sbin/route -n |grep -v 10.64.6|grep tun`);\n $this->lan->netmask = $details[2];\n $this->lan->iface = $details[7];\n\n if ($this->lan->iface) {\n\n $this->lan->mac = $this->discoverMAC($this->lan->iface);\n $this->lan->ipaddress = $this->discoverIPAddress($this->lan->iface);\n $this->lan->netmask = $this->discoverNetmask($this->lan->iface);\n }\n\n }", "title": "" }, { "docid": "d568f7d4c302e9f718b342dabcd984bf", "score": "0.46465084", "text": "public static function getReservedIps()\n {\n return [\n 167772160 => 184549375, // 10.0.0.0 - 10.255.255.255\n 3232235520 => 3232301055, // 192.168.0.0 - 192.168.255.255\n 2130706432 => 2147483647, // 127.0.0.0 - 127.255.255.255\n 2851995648 => 2852061183, // 169.254.0.0 - 169.254.255.255\n 2886729728 => 2887778303, // 172.16.0.0 - 172.31.255.255\n 3758096384 => 4026531839, // 224.0.0.0 - 239.255.255.255\n ];\n }", "title": "" }, { "docid": "cc95111f3898ba26e0935bc62daa35af", "score": "0.46342754", "text": "function getInterfaceList($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.common.getlist\");\n\t\t// Get all network interface configuration objects.\n\t\t$result = $this->callMethod(\"enumerateConfiguredDevices\",\n\t\t $params, $context);\n\t\t// Filter the result.\n\t\treturn $this->applyFilter($result, $params['start'],\n\t\t $params['limit'], $params['sortfield'], $params['sortdir']);\n\t}", "title": "" }, { "docid": "111e2094777b6b92fa140dce1edaf653", "score": "0.4617867", "text": "function wg_get_configured_ifs() {\n\tglobal $wgg;\n\n\treturn array_map(fn($x) => $x['name'], (array) $wgg['tunnels']);\n}", "title": "" }, { "docid": "5c9f8874a69a3a745f1f9763b9a71e33", "score": "0.46163675", "text": "public function getNetworkKeys() {\n return Mage::helper('socnet')->getValidNetworks();\n }", "title": "" }, { "docid": "c11acdc716ebcf9eee2f11f58467db3b", "score": "0.46146652", "text": "public function getServerInfoMySQL()\n\t{\n\t\treturn @$this->_aFunctionsSql['mysqli_get_server_info']($this->_oConnect);\t\n\t}", "title": "" }, { "docid": "d560dcb1147e38f5948dbeef1e824687", "score": "0.46123928", "text": "function getServers();", "title": "" }, { "docid": "06eb9e8e6583d8e5ea36274f1a78187d", "score": "0.4610009", "text": "public function getAtosServerIpAddresses()\n {\n if (isset($_SERVER)) {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n } else {\n if (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_CLIENT_IP')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } else {\n $ip = getenv('REMOTE_ADDR');\n }\n }\n\n return explode(',', $ip);\n }", "title": "" }, { "docid": "2a90f9ae9d4c9ad76e2c14fdd56fd994", "score": "0.46071297", "text": "public function getAddressInfo()\n {\n if ($this->flagDir->isExist(self::IP_FILENAME)) {\n $temp = $this->flagDir->readFile(self::IP_FILENAME);\n return explode(',', trim($temp));\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "f8416a5a7375f482f82d33f5eea86617", "score": "0.46009865", "text": "function GetIP()\n{\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key)\n {\n if (array_key_exists($key, $_SERVER) === true)\n {\n foreach (array_map('trim', explode(',', $_SERVER[$key])) as $ip)\n {\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false)\n {\n return $ip;\n }\n }\n }\n }\n}", "title": "" }, { "docid": "60294f3811f19ae5678f13675fe3c9cc", "score": "0.45698002", "text": "function get_client_ip_server() {\n\t $ipaddress = '';\n\n\t if (array_key_exists('HTTP_CLIENT_IP', $_SERVER)){\n \t\t$clientIP = $_SERVER['HTTP_CLIENT_IP'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_X_FORWARDED', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_FORWARDED_FOR', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_FORWARDED', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('REMOTE_ADDR', $_SERVER)){\n\t $ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t else{\n\t $ipaddress = 'UNKNOWN';\n\t\t//console_log($ipaddress);\n\t\t}\n \n \treturn $ipaddress;\n\t}", "title": "" }, { "docid": "741582a3bcbd4310a175bed439bc0074", "score": "0.4560617", "text": "function find_vip_interface($vip) {\n\tglobal $log;\n\tglobal $_config;\n\t// Parse 'interface' command response into lines\n\t// Process interface lines to extract each interface entry\n\t// Determine if there's an interface with an IP address which corresponds to the VIP\n\t// If corresponding VIP found, set ethXX to its interface ID; e.g., $ethXX = \"eth0\"\n\t// Formulate the interface command\n\t$netdevices = glob('/sys/class/net/*');\n\tforeach($netdevices as $id => $device) {\n\t\t$cmd = 'ip addr show dev '.$device.' | grep inet | awk \\'{ print $2; }\\'';\n\t\t$result = sudo_execute($cmd);\n\t\tif ($result['rv'] != 0) {\n\t\t\t$errorMsg = \"interface command failure. Details: \" . $result['output_str'];\n\t\t\t$log->LogError($errorMsg);\n\t\t}\n\t\t$range = cidr2range($result['output_str']);\n\t\t$isInRange = cidrSearch($vip, $range);\n\t\tif ($isInRange) {\n\t\t\t$short_device = str_replace('/sys/class/net/', '', $device);\n\t\t\treturn $short_device;\n\t\t}\n\t}\n\treturn \"\"; // interface not found, return empty string\n}", "title": "" }, { "docid": "f2b5b5f5197b6211cfebeb707f359279", "score": "0.45567602", "text": "private function getConfigVLANInterfaces()\n {\n $physicalInterfaces = array();\n $configObj = Config::getInstance()->object();\n if (!empty($configObj->vlans)) {\n foreach ($configObj->vlans->children() as $key => $vlan) {\n if (!isset($physicalInterfaces[(string)$vlan->if])) {\n $physicalInterfaces[(string)$vlan->if] = array();\n }\n $physicalInterfaces[(string)$vlan->if][] = (string)$vlan->vlanif;\n }\n }\n return $physicalInterfaces;\n }", "title": "" }, { "docid": "d732639a87d47dc9454c41fde6675837", "score": "0.45512843", "text": "public function ircWhois($nickmasks, $server = null)\n {\n return $this->getIrcMessage('WHOIS', array($server, $nickmasks));\n }", "title": "" }, { "docid": "713dda4dbadf80da35c8add9e6a27f75", "score": "0.4547881", "text": "private function get_arp_table () {\n // init\n $this->connection_open ();\n // fetch\n try {\n $res1 = $this->snmp_session->walk( \"IP-MIB::ipNetToMediaNetAddress\" ); // ip\n $res2 = $this->snmp_session->walk( \"IP-MIB::ipNetToMediaPhysAddress\" ); // mac\n $res3 = $this->snmp_session->walk( \"IP-MIB::ipNetToMediaIfIndex\" ); // interface index\n\t\t}\n\t\tcatch (Exception $e) {\n \t\tthrow new Exception ($e->getMessage());\n\t\t}\n\n // check for errors\n $this->connection_error_check ();\n\n // parse IP\n $n=0;\n foreach ($res1 as $r) {\n $res[$n]['ip'] = $this->parse_snmp_result_value ($r);\n $n++;\n }\n // parse MAC\n $n=0;\n foreach ($res2 as $r) {\n $res[$n]['mac'] = $this->fill_mac_nulls ($r);\n // validate mac\n if ($this->validate_mac($res[$n]['mac'])===false) { $res[$n]['mac'] = \"\"; }\n $n++;\n };\n\n $interface_indexes = array(); // to avoid fetching if multiple times\n // fetch interface name\n $n=0;\n foreach ($res3 as $r) {\n $index = $this->parse_snmp_result_value ($r);\n // if already fetched\n if (array_key_exists($index, $interface_indexes)) {\n $res[$n]['port'] = $interface_indexes[$index];\n }\n else {\n try {\n //$res1 = $this->snmp_session->get( \".1.3.6.1.2.1.31.1.1.1.1.\".$index ); // if description\n //$res2 = $this->snmp_session->get( \".1.3.6.1.2.1.2.2.1.2.\".$index ); // if port\n\n $res1 = $this->snmp_session->get( \"IF-MIB::ifName.\".$index ); // if description\n $res2 = $this->snmp_session->get( \"IF-MIB::ifDescr.\".$index ); // if port\n\n //parse and save\n $res[$n]['port'] = $this->parse_snmp_result_value ($res1);\n $res[$n]['portname'] = $this->parse_snmp_result_value ($res2);\n $interface_indexes[$index] = $res[$n]['port'];\n }\n catch (Exception $e) {\n $res[$n]['port'] = \"\";\n $res[$n]['portname'] = \"\";\n }\n }\n $n++;\n }\n\n // save result\n $this->save_last_result ($res);\n\n // return response\n return isset($res) ? $res : false;\n }", "title": "" }, { "docid": "43069ae94afa93b5a0ed850e578f33d2", "score": "0.4526636", "text": "public function getRemoteIP(): string;", "title": "" }, { "docid": "60d71875a4886e42c015a878aeb14e67", "score": "0.4512118", "text": "public function getNetworks() {\n\n //GET NETWORK TABLE\n $tableNetwork = Engine_Api::_()->getDbtable('networks', 'network');\n\n //MAKE QUERY\n $select = $tableNetwork->select()\n ->from($tableNetwork->info('name'), array('network_id', 'title'))\n ->order('title');\n $result = $tableNetwork->fetchAll($select);\n\n $everyone = Zend_Registry::get('Zend_Translate')->_('Everyone');\n\n //MAKE DATA ARRAY\n $networksOptions = array('0' => $everyone);\n foreach ($result as $value) {\n $networksOptions[$value->network_id] = $value->title;\n }\n\n //RETURN\n return $networksOptions;\n }", "title": "" }, { "docid": "550f0a91aefe2e030200582fcddbea4c", "score": "0.45042542", "text": "public function getIdNetwork()\n {\n return $this->id_network;\n }", "title": "" }, { "docid": "9f2b7546cf0ac6cc74a8b045795f0cea", "score": "0.44631493", "text": "static public function getInterfaces()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "5061c9c6cfd8127ddf2821ad6eb8a54d", "score": "0.44625238", "text": "function get_IP_address(){\n foreach (array('HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR') as $key){\n if (array_key_exists($key, $_SERVER) === true){\n foreach (explode(',', $_SERVER[$key]) as $IPaddress){\n $IPaddress = trim($IPaddress); // Just to be safe\n\n if (filter_var($IPaddress,\n FILTER_VALIDATE_IP,\n FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)\n !== false) {\n\n return $IPaddress;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "9048f205eb44a3120115f687c0935e60", "score": "0.446232", "text": "function get_client_ip_server()\n{\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if ($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if ($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if ($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}", "title": "" }, { "docid": "09c2009ec88c9f22d1efecd606f9432f", "score": "0.44563833", "text": "private function getRepositoryInterfaces()\n {\n $interfaces = collect([]);\n if (! $this->files->isDirectory($directory = $this->getRepositoryInterfacesPath())) {\n return $interfaces;\n }\n $files = $this->files->files($directory);\n if (is_array($files)) {\n $interfaces = collect($files)->map(function (SplFileInfo $file) {\n return str_replace(\".php\", \"\", $file->getFilename());\n });\n }\n\n return $interfaces;\n }", "title": "" }, { "docid": "59bbccc9715b937a1798f04db468d180", "score": "0.4445729", "text": "function getEthernetIface($params, $context) {\n\t\t\treturn $this->callMethod(\"getInterface\", $params, $context);\n\t}", "title": "" }, { "docid": "12ce160d5d0dfaf9d983a885ccdbd780", "score": "0.444455", "text": "public function get_all_firewall_nat(){\n return $this->query('/ip/firewall/nat/getall');\n }", "title": "" }, { "docid": "42ee4e697a193f711d90483ebd36617b", "score": "0.4429698", "text": "public function getMailQueueInfo(NamedElement $server)\n {\n $request = new \\Zimbra\\Admin\\Request\\GetMailQueueInfo($server);\n return $this->getClient()->doRequest($request);\n }", "title": "" }, { "docid": "fc6306f2c1bd290da82d2bfc6de0d9ef", "score": "0.44263795", "text": "public static function getLocalIp() {\n try { // if exec can be used\n $preg = \"/\\A((([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\\.){3}(([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\\Z/\";\n \n if ( PATH_SEPARATOR==':' ) { // linux\n exec(\"ifconfig\", $out, $stats);\n if (!empty($out)) {\n if (isset($out[1]) && strstr($out[1], 'addr:')) {\n $tmpArray = explode(\":\", $out[1]);\n $tmpIp = explode(\" \", $tmpArray[1]);\n if (preg_match($preg, trim($tmpIp[0])))\n return trim($tmpIp[0]);\n }\n }\n } else { // windows PATH_SEPARATOR==';'\n exec(\"ipconfig\", $out, $stats);\n if (!empty($out)) {\n foreach ($out AS $row) {\n if (strstr($row, \"IP\") && strstr($row, \":\") && !strstr($row, \"IPv6\")) {\n $tmpIp = explode(\":\", $row);\n if (preg_match($preg, trim($tmpIp[1])))\n return trim($tmpIp[1]);\n }\n }\n }\n }\n } catch ( Exception $ex ){\n }\n \n if (isset($_ENV[\"HOSTNAME\"]))\n $MachineName = $_ENV[\"HOSTNAME\"];\n else if (isset($_ENV[\"COMPUTERNAME\"]))\n $MachineName = $_ENV[\"COMPUTERNAME\"];\n else\n $MachineName = \"\";\n if ($MachineName!=\"\")\n return $MachineName;\n \n return '127.0.0.1';\n }", "title": "" }, { "docid": "5cb0746e60a65a12a8a928fc975d92a8", "score": "0.44254747", "text": "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}", "title": "" }, { "docid": "b22bf2a046ca518feebf05765e26fb2d", "score": "0.4418804", "text": "public function getIp() { }", "title": "" }, { "docid": "03923a7fa807bc13bde11eb60a045788", "score": "0.44127178", "text": "public function getNetworks()\n {\n return $this->networks;\n }", "title": "" }, { "docid": "ecb7428e2e4dd216515486a3d74b4ac4", "score": "0.44115666", "text": "public function ipAddress()\n {\n $ip_keys = ['REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED'];\n foreach ($ip_keys as $key)\n {\n if ($this->server->has($key) === true)\n {\n foreach (explode(',', $this->server->get($key)) as $ip)\n {\n // trim for safety measures\n $ip = trim($ip);\n\n // attempt to validate IP\n if (valid_ip($ip))\n {\n return $ip;\n }\n }\n }\n }\n\n return '0.0.0.0';\n }", "title": "" }, { "docid": "269e6fe3ad3b102359377156c06911ee", "score": "0.43984568", "text": "function get_client_ip_server()\n{\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if ($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if ($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if ($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}", "title": "" }, { "docid": "d165439c6aa19b5d2cc2eefbfa247e30", "score": "0.43863028", "text": "public function serverIp() {\n\t\treturn $this->env('SERVER_ADDR');\n\t}", "title": "" }, { "docid": "b29544db4af65cfe5612115ea3a0e48b", "score": "0.43831635", "text": "public function getCurrentNetwork() {\n $arg = new getCurrentNetwork();\n $result = $this->__soapCall(\"getCurrentNetwork\", array($arg));\n return $result->rval;\n }", "title": "" }, { "docid": "b279c7695b175170a0775b14c801267b", "score": "0.43814048", "text": "function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}", "title": "" }, { "docid": "c7aff0639b9ba36ba1639ce6d23eefd8", "score": "0.4374239", "text": "public function getCidr()\n {\n return $this->cidr;\n }", "title": "" }, { "docid": "caf16a95bb05d6ac08a4deae9b0a911e", "score": "0.43720126", "text": "public function getEthernetCandidates($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t$mngr = \\OMV\\System\\Net\\NetworkInterfaceBackend\\Manager::getInstance();\n\t\t// Get all unused network interface devices, except loopback and\n\t\t// VLAN network interfaces.\n\t\tif (FALSE === ($devs = $mngr->enumerateUnused(\n\t\t OMV_NETWORK_INTERFACE_TYPE_ETHERNET))) {\n\t\t\tthrow new \\OMV\\Exception(\n\t\t\t \"Failed to get list of unused network interface devices.\");\n\t\t}\n\t\t// Get the network interface information.\n\t\t$result = [];\n\t\tforeach ($devs as $devk => $devv) {\n\t\t\t// Does a configuration object exists for the given network\n\t\t\t// interface device? In this case skip this device.\n\t\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t\tif ($db->exists(\"conf.system.network.interface\", [\n\t\t\t\t\"operator\" => \"and\",\n\t\t\t\t\"arg0\" => [\n\t\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\t\"arg0\" => \"type\",\n\t\t\t\t\t\"arg1\" => \"ethernet\"\n\t\t\t\t],\n\t\t\t\t\"arg1\" => [\n\t\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\t\"arg0\" => \"devicename\",\n\t\t\t\t\t\"arg1\" => $devv\n\t\t\t\t]\n\t\t\t]))\n\t\t\t\tcontinue;\n\t\t\t$result[] = $this->getIfaceInfo($devv);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6cdc715976e54b77b266cceb33e5d8d4", "score": "0.437137", "text": "public function getIpAddress() {\n return isset($this->serverData['REMOTE_ADDR']) ? $this->serverData['REMOTE_ADDR'] : null;\n }", "title": "" }, { "docid": "79889271c6847372c80bde16c381ac90", "score": "0.43705556", "text": "public static function GetIP()\n\t{\n\t\tself::initialize();\n\t\treturn self::$ip_test;\n\t}", "title": "" }, { "docid": "113e4f3d3ebc46c9eb757cc5bad50e38", "score": "0.43589327", "text": "public function getNetworkConfig()\n {\n return $this->network_config;\n }", "title": "" }, { "docid": "f137a21bbc03c94f7d56ec46a464c654", "score": "0.43516022", "text": "public function providerIpAddressGet()\n {\n $ipAddress0 = \"\";\n $ipAddress1 = \"192.96.76.1\";\n $ipAddress2 = \"145.38.5.6\";\n $ipAddress3 = \"/geo/forbidden\";\n return [\n [$ipAddress0],\n [$ipAddress1],\n [$ipAddress2],\n [$ipAddress1, $ipAddress2],\n [$ipAddress3],\n // [\"35.158.84.49\"],\n // [\"23.34\"],\n // [\"35.158.84.49, 23.34\"],\n ];\n }", "title": "" }, { "docid": "dfa0364ae2e4e610f090c1d94a5a8617", "score": "0.4350279", "text": "function getIPWhiteList() {\n\n\t\t\t$method = ORGANIZATION . \"/getipwhitelist\";\n\n\t\t\t$verbmethod = \"GET\";\n\n\t\t\t$params = array();\n\n\t\t\t$response = json_decode($this->zyncroApi->callApi( $method, $params, $verbmethod), true);\n\n\t\t\treturn $response;\n\t\t}", "title": "" }, { "docid": "7fbf1b2161e3d54457016ff6bc4b865f", "score": "0.4348501", "text": "public function get_all_networks() {\n\t\t$req = $this->db->conn_id->query('SELECT id, network AS network_img, network_name, country FROM networks ORDER BY network_name ASC');\n\t\t$req->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Network');\n\t\t$networks = $req->fetchAll();\n\n\t\treturn $networks;\n\t}", "title": "" }, { "docid": "154341cc1a41af839cec83d5893d7e0e", "score": "0.43286747", "text": "function foodbakery_get_all_server() {\r\n\t\treturn $_SERVER;\r\n\t}", "title": "" }, { "docid": "cd347540541057b9a0a12efc43279ac1", "score": "0.43249866", "text": "public function getServerInfo()\n {\n return $this->_request('server')->getBody();\n }", "title": "" }, { "docid": "c75a5286c0a86cde06f7bb79653ff578", "score": "0.4324652", "text": "function getIp() {\n // IP if shared internet connection\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n // IP through a proxy\n elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n // Else : simple IP\n else {\n return (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '');\n }\n}", "title": "" }, { "docid": "beff55b87953d0ad5add356859a0301b", "score": "0.43153152", "text": "public function getEthernetStatus()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ETHERNET_STATUS, $payload);\n\n $payload = unpack('C6mac_address/C4ip/C4subnet_mask/C4gateway/V1rx_count/V1tx_count/c32hostname', $data);\n\n $result['mac_address'] = IPConnection::collectUnpackedArray($payload, 'mac_address', 6);\n $result['ip'] = IPConnection::collectUnpackedArray($payload, 'ip', 4);\n $result['subnet_mask'] = IPConnection::collectUnpackedArray($payload, 'subnet_mask', 4);\n $result['gateway'] = IPConnection::collectUnpackedArray($payload, 'gateway', 4);\n $result['rx_count'] = IPConnection::fixUnpackedUInt32($payload['rx_count']);\n $result['tx_count'] = IPConnection::fixUnpackedUInt32($payload['tx_count']);\n $result['hostname'] = IPConnection::implodeUnpackedString($payload, 'hostname', 32);\n\n return $result;\n }", "title": "" }, { "docid": "20a46f44f0fc76bdf513392e0fe60b53", "score": "0.43082717", "text": "public function getBluetoothInterfaces()\n {\n if (is_null($this->_pan))\n {\n $this->_pan = explode(\"\\n\", $this->getShellExec(self::NETWORKSETUP.\" | grep -A2 'Bluetooth' | grep -o en.\"));\n }\n\n return $this->_pan;\n }", "title": "" }, { "docid": "14ee1d3fb617a545e81679781474661f", "score": "0.43011838", "text": "protected function GetUserIp()\n\t{\n\t\t$ips = ApiStatController::GetIPBinary(true);\n\t\treturn ['binary' => $ips[0], 'string' => $ips[1]];\n\t}", "title": "" }, { "docid": "976cd32e01cbdfb880f30bf9fb2a7991", "score": "0.4291041", "text": "public function ip__get( $ips_input = array( 'real', 'remote_addr', 'x_forwarded_for', 'x_real_ip', 'cloud_flare' ), $v4_only = true ){\n\t\t\n\t\t$result = Helper::ip__get( $ips_input, $v4_only );\n\t\t\n\t\treturn ! empty( $result ) ? array( 'real' => $result ) : array();\n\t\t\n\t}", "title": "" }, { "docid": "250cfc20afa6949df4450c793d03ec5c", "score": "0.42909658", "text": "public function getIP(){\n\t\t\ttry{\n\t\t\t\tforeach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key){\n\t\t\t\t\tif (array_key_exists($key, $_SERVER) === true){\n\t\t\t\t\t\tforeach (explode(',', $_SERVER[$key]) as $ip){\n\t\t\t\t\t\t\t$ip = trim($ip); // just to be safe\n\t\t\t\t\t\t\tif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false){\n\t\t\t\t\t\t\t\treturn $ip;\n\t\t\t\t\t\t\t\t}//if\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\treturn $ip;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}//foreach()\n\t\t\t\t\t\t}//if\n\t\t\t\t\t}//foreach()\n\t\t\t\t\t}catch(Exception $exc){\n\t\t\t\t\t\t$this->tempVar = $exc->getMessage();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}//catch()\n\t\t\t\t}", "title": "" }, { "docid": "d0a9ab6c717ab4f33149075a1a5ce99e", "score": "0.42899248", "text": "public function getIP(): string\n {\n $ips = explode(',',$this->getHeader('x-forwarded-for', $this->getServer('remote_addr', '0.0.0.0')));\n return trim($ips[0] ?? '');\n }", "title": "" }, { "docid": "140c7eb5aa8c2225dd0f07725fcc988a", "score": "0.42826954", "text": "function getIPList(){\n\t$url = 'https://api.sendgrid.com/apiv2/customer.ip.json';\n\t$postData['list'] = 'all';\n\t$results = callCURL($postData, $url);\n\treturn $results;\n}", "title": "" }, { "docid": "cc22acac29152fa01944ceac22045bd4", "score": "0.4281127", "text": "private function getIp()\n\t{\n\t\tif (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED'];\n\t\tif (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n\t\t\treturn $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n\t\tif (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\treturn $_SERVER['HTTP_FORWARDED_FOR'];\n\t\tif (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n\t\t\treturn $_SERVER['HTTP_FORWARDED'];\n\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}", "title": "" }, { "docid": "5ac0f91fd503ce82c4fe782af0f4bdb6", "score": "0.4272996", "text": "private function getAddressesFromNetwork( IXP $ixp, Network $n, $p ) {\n $addrs = [\n 'lan' => [], // same LAN\n 'ixp' => [], // same IXP\n ];\n\n foreach( $n->getAddresses() as $a ) {\n if( $a->getProtocol() != $p ) {\n continue;\n }\n\n if( $a->getLAN()->getIXP()->getId() == $ixp->getId() ) {\n $addrs['lan'][] = $a->getAddress();\n } else if( $a->getLAN()->getIXP()->getOrganisation() == $ixp->getOrganisation() ) {\n $addrs['ixp'][] = $a->getAddress();\n }\n }\n\n return $addrs;\n }", "title": "" }, { "docid": "fc9ae6498e85e20e9608413e110481ba", "score": "0.4272369", "text": "public function providerIpAddress()\n {\n return [\n [\"\"],\n [\"192.96.76.1\"],\n [\"145.38.5.6\"],\n [\"255.0.0.0\"],\n [\"23.34\"],\n // [\"35.158.84.49, 23.34\"],\n ];\n }", "title": "" }, { "docid": "367ac7c02913ef4782d9f48a50a237c1", "score": "0.42670992", "text": "public function ips()\n {\n return response()->json(\n Equipamento::pluck('ip')\n );\n }", "title": "" }, { "docid": "f4f7eaf8796521ac5ed33c8344c3909c", "score": "0.42652765", "text": "function guifi_device_print_interfaces($device) {\n\n if (empty($device['interfaces']))\n return NULL;\n\n $rows = array();\n $inamestr = '';\n $fo_connectors = guifi_types('fo_port');\n foreach ($device['interfaces'] as $inum => $if) {\n \t$ipstr='';\n \t$rows_if = array();\n guifi_log(GUIFILOG_TRACE,sprintf('function guifi_device_print_interfaces(interface %s)',$if['id']),$if);\n $connto_dev = array('data'=>'');\n if ($if['connto_did']) {\n $connto_dev['data'] = guifi_get_devicename($if['connto_did']);\n if ($if['connto_did']) {\n \t $rdev=db_fetch_object(db_query('SELECT interface_type FROM {guifi_interfaces} WHERE device_id=%d AND id=%d',\n \t $if['connto_did'],$if['connto_iid']\n \t ));\n $connto_dev['data'] .= ' / '.$rdev->interface_type;\n }\n }\n if (!empty($connto_dev['data'])) {\n $connto_dev['data'] = l($connto_dev['data'],'guifi/device/'.$if['connto_did']);\n } else\n $connto_dev['class'] = 'available';\n\n if ($if['ipv4']) foreach ($if['ipv4'] as $ipnum => $ipv4)\n {\n guifi_log(GUIFILOG_TRACE,sprintf('function guifi_device_print_interfaces(ip %s)',$ipv4['ipv4']),$ipv4);\n \t if ($ipv4['ipv4']) {\n $ipstr = $ipv4['ipv4'];\n \t } else\n \t $ipstr = t('n/a');\n $rows_if[] = array($ipstr,$ipv4['netmask']);\n } else\n $rows_if[] = array(null,null);\n\n $rspan = count($rows_if);\n if (empty($if['connector_type']))\n $if['connector_type'] = t('RJ45');\n if ($if['connector_type']!=t('RJ45'))\n $if['connector_type'] = $fo_connectors[$if['connector_type']];\n $begin = array(\n array('data'=>$if['interface_type']),\n array('data'=>$connto_dev['data'],'class'=>$connto_dev['class']),\n array('data'=>$if['connector_type']),\n array('data'=>$if['comments']),\n array('data'=>$if['mac']),\n );\n foreach ($begin as $i => $r)\n $begin[$i] = array_merge($r,array('rowspan'=>$rspan,'valign'=>'top'));\n foreach ($rows_if as $i=>$row)\n if ($i==0)\n $rows[] = array_merge($begin,$row);\n else\n $rows[] = $row;\n\n }\n return $rows;\n}", "title": "" }, { "docid": "6d7388e9a434ff996901201947be7df5", "score": "0.4258098", "text": "public function getEcsIpList($config = []);", "title": "" }, { "docid": "acfc46d2f4ebdf3fc1cdfa30fe914bba", "score": "0.42476216", "text": "protected function get_mail_config() {\n $interface = $this->config('system.mail')->get('interface');\n return $interface;\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "a661ce5e7c104ffb494cd03d67293e57", "score": "0.0", "text": "public function show(Inclusion $inclusion)\n {\n $this->authorize('show', $inclusion);\n\n return new InclusionResource($inclusion);\n }", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7593495", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.6845801", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6684253", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "9579e337a5325a82370abb431f646b6f", "score": "0.6490299", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.63472325", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.623589", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.6216249", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62105983", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.6198528", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.61824137", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.6155446", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.60641253", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.6063686", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512596", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6006895", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.5995527", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5986619", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.5962972", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.5881492", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.587919", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.58711755", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58684236", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.58634454", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.58409727", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.5838473", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.5811056", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57936835", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.57885426", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5787194", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.5785671", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57850385", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.5782477", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "39114f16312ac4920577af8887aaf740", "score": "0.57743496", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.5769528", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57693255", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.5768978", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.57409096", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.5735067", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57342285", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.5725927", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.5720744", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.5711622", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.570918", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5699814", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.56937706", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "7dc5ba4f66129deb94fcdcf0df35f0c4", "score": "0.0", "text": "public function authorize()\n {\n return auth()->user()->can('update', $this->route('classroom_discipline_user'));\n }", "title": "" } ]
[ { "docid": "adc35a96694d73041eb8bde60a1a3a34", "score": "0.8355789", "text": "public function authorize()\n {\n // Only authenticated user can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.8344406", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "266882932e546005ce5e72a1dfcad4a3", "score": "0.8311813", "text": "public function authorize()\n {\n // Only authenticated users can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6376534de447322dc42273a919390fb2", "score": "0.8263114", "text": "public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }", "title": "" }, { "docid": "a2f400e9b8822b6190b4dfb53c9dfb58", "score": "0.8225883", "text": "public function authorize()\n {\n return $this->user()->id === $this->user->id;\n }", "title": "" }, { "docid": "c68c0b9aa3d35004ad103595a7134e0d", "score": "0.81748027", "text": "public function authorize()\n {\n return $this->user() === Auth::user();\n }", "title": "" }, { "docid": "afe5d08385357718fec642473a52aac5", "score": "0.8172868", "text": "public function authorize() {\n $user = $this->route('user');\n return Auth::id() == $user->id;\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.8141564", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "1d9d94d60f24f4ee69318fc43d74c4c6", "score": "0.8141564", "text": "public function authorize()\n {\n return (bool) $this->user();\n }", "title": "" }, { "docid": "cd17c9e8a5fd125380008a18703accec", "score": "0.80771476", "text": "public function isAuthorized()\n {\n if ($this->api && method_exists($this->api, 'authorize')) {\n return $this->api->authorize();\n }\n\n return true;\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.8070438", "text": "public function isAuthorized();", "title": "" }, { "docid": "d88bc6352a6cb4cb86862a898807e468", "score": "0.80206347", "text": "public function authorize()\n {\n if (!empty(auth()->user())) return true;\n else return false;\n }", "title": "" }, { "docid": "07cf3e15d6a143b44b4d698b2d356d9d", "score": "0.7993011", "text": "public function authorize()\n {\n return request()->user()->id == auth()->user()->id;\n }", "title": "" }, { "docid": "df9c1983d1c3dc60d4f28281676c0a52", "score": "0.79590464", "text": "public function authorize()\n {\n $user = current_user();\n\n return $user === null || ! $user->isOwner();\n }", "title": "" }, { "docid": "d39cd74dd19725b319038fd93b77c139", "score": "0.7939632", "text": "public function authorize()\n {\n return !$this->user();\n }", "title": "" }, { "docid": "7f8b051ebd168a6c68f0514f0d8df105", "score": "0.79341745", "text": "public function isAuthorized() {\n\t\treturn !empty($this->auth_token);\n\t}", "title": "" }, { "docid": "7fa31e51d5d3fad2b2ee2dd759855dcd", "score": "0.7881839", "text": "public function authorize()\n {\n if(Session::has('is_user') || Session::get('is_user') === true){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "935a0da134c0bfa79ad09ddb3e7615c5", "score": "0.78689", "text": "public function authorize()\n {\n return request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "c8aacf9b7e9a68d571413875cf1baf9d", "score": "0.78665614", "text": "public function authorize()\n {\n return ($this->user() && $this->user()->isAdmin());\n }", "title": "" }, { "docid": "24d55f30f5c79b4402d7c629fe5c3737", "score": "0.7856002", "text": "public function authorize()\n {\n return Auth::user()->is_admin || $this->user()->id == Auth::user()->id;\n }", "title": "" }, { "docid": "5e6c586881f51e616e13fcb15a106181", "score": "0.78541803", "text": "public function authorize()\n {\n if (auth()->user()) {\n return true;\n }\n }", "title": "" }, { "docid": "340d335aaf485d507323dbdd50bd4d12", "score": "0.78414804", "text": "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "title": "" }, { "docid": "77744da8ec1c5d94f9fb4197ac00dd07", "score": "0.78403324", "text": "public function authorize()\n {\n return auth()->user()->id == $this->request->get('id') && (auth()->user()->hasRole('admin') || auth()->user()->hasRole('employee'));\n }", "title": "" }, { "docid": "738aafc40c5c974391a1185db2419767", "score": "0.7837965", "text": "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "title": "" }, { "docid": "b46b972356ffaf201da7c88abba560a5", "score": "0.78105783", "text": "public function authorize()\n {\n return $this->user()->is_admin && $this->user()->isPro();\n }", "title": "" }, { "docid": "fee0af343c9cfbc2d23e99952d86be99", "score": "0.7810181", "text": "public function isAuthorized() {\n return parent::isAuthorized();\n }", "title": "" }, { "docid": "9f7c39634419f2fce8c1349fddeee2cd", "score": "0.7809632", "text": "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "title": "" }, { "docid": "c35d64e364414093c2211107d6ba2cd7", "score": "0.7797828", "text": "public function authorize()\n {\n switch($this->method()) {\n case 'GET':\n return false;\n case 'POST':\n $user = User::findOrFail($this->id);\n return $this->user()->can('update', [User::class, $user]);\n case 'PUT':\n case 'PATCH': \n case 'DELETE':\n return false;\n default:\n break;\n }\n }", "title": "" }, { "docid": "0e0f88dd62b79b349871769f0c5ee5c0", "score": "0.7775089", "text": "function isAuthorized() {\n // Currently we do all meaningful checks in beforeFilter().\n \n return true;\n }", "title": "" }, { "docid": "166e1a3b11b8a0bf836a729ad64c740d", "score": "0.7769981", "text": "public function authorize()\n {\n $categoryOwner = Operation::find($this->route('id'))\n ->category()\n ->first()\n ->user()\n ->first();\n\n if ($categoryOwner->id === \\Auth::id())\n return true;\n\n return false;\n }", "title": "" }, { "docid": "96de3a0bca7b2354dce8c6c6a9ae7654", "score": "0.77589947", "text": "public function authorize()\n {\n $user = $this->user();\n return $user || $user->isAdmin();\n }", "title": "" }, { "docid": "f2dd197bc28c2a41168d4d4579952d22", "score": "0.77469796", "text": "public function authorize()\n {\n $subscriber = Subscriber::find($this->route('id'));\n\n return $subscriber && $subscriber->user_id == Auth::guard('api')->user()->id;\n }", "title": "" }, { "docid": "537138e05319644656ed0ed47b3d1d1a", "score": "0.7741953", "text": "public function authorize()\n {\n // @todo should anyone really be able to update a check-in?\n $check_in = CheckIn::query()->where('scheduled_checkin_id', '=', $this->route('id'))->first();\n if ($this->user()->isAdmin($check_in->organization_id)) {\n return true;\n }\n\n if ($this->user()->role === 'author' &&\n $this->user()->organization_id === $this->input('organization')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7b4f0f2f385e53224f8389cbfe400983", "score": "0.774003", "text": "public function authorize(): bool\n {\n if (! parent::authorize()) {\n return false;\n }\n\n // If there is a subuser present in the URL, validate that it is not the same as the\n // current request user. You're not allowed to modify yourself.\n if ($this->route()->hasParameter('subuser')) {\n if ($this->endpointSubuser()->user_id === $this->user()->id) {\n return false;\n }\n }\n\n // If this is a POST request, validate that the user can even assign the permissions they\n // have selected to assign.\n if ($this->method() === Request::METHOD_POST && $this->has('permissions')) {\n $this->validatePermissionsCanBeAssigned(\n $this->input('permissions') ?? []\n );\n }\n\n return true;\n }", "title": "" }, { "docid": "5b4c01003b40c31053fde7580331e0fc", "score": "0.77388614", "text": "public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ab2a1df217316960e99099a4734e0bf9", "score": "0.77383286", "text": "public function authorize()\n {\n if (!Auth::user())\n {\n return false;\n }\n if ($this->id && (Auth::id() !== $this->id) && !Auth::user()->is_admin)\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "ca4822d69ec5ae164a06238db46726f9", "score": "0.7727606", "text": "public function authorize()\n {\n // only allow if the user is logged in\n // return auth()->check();\n\n return true;\n }", "title": "" }, { "docid": "6867e5f786ce616034ffe506750fcb9c", "score": "0.7727508", "text": "public function authorize()\n {\n $dataSource = DataSource::find($this->route('datasource'));\n $dataSource = $dataSource ? $dataSource->first() : null;\n return $this->user()\n && ($dataSource ? $this->user()->id === $dataSource->owner->id : true);\n }", "title": "" }, { "docid": "f7f59a6d41ea922d7696cf92de80b77e", "score": "0.770588", "text": "public function authorize(): bool\n {\n return !! $this->user();\n }", "title": "" }, { "docid": "6d721947f3ade89e55924a2597b229ca", "score": "0.77030694", "text": "public function authorize()\n {\n $user = App::call( [ $this, 'findUser' ] );\n if ( is_null( $user ) )\n {\n return false;\n }\n\n $this -> merge( [ 'user' => $user ] );\n return true;\n }", "title": "" }, { "docid": "7adcf640538c1fd36664f332bcebca74", "score": "0.77019715", "text": "public function isAuthorized()\n {\n return ($_SESSION['user']['logged'] === true);\n }", "title": "" }, { "docid": "703f36ee75d24db3d967d5886b237643", "score": "0.76944697", "text": "public function authorize()\n {\n if($this->route('accounts') == auth()->user()->id) {\n return true;\n }\n\n return false;\n \n }", "title": "" }, { "docid": "1c2a0175bb5e73473c311c83d1588f13", "score": "0.769402", "text": "public function authorize()\n\t{\n if(!$this->has(\"user_id\") || !is_int((integer)$this->get(\"user_id\")) ||\n !$this->has(\"recommendation_id\") || !is_int((integer)$this->get(\"recommendation_id\")))\n {\n return false;\n }\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9f176845cb818d4b52c1e0514e271b22", "score": "0.7687097", "text": "public function isAuthorized(){\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "2d7c531ed28d1966e92137472df2320d", "score": "0.768582", "text": "public function authorize()\n {\n return $this->session()->has('jukebox.user');\n }", "title": "" }, { "docid": "a0ef39a48a6c1c6cd6f90576ccb029ed", "score": "0.7682679", "text": "public function authorize()\n {\n // If user_id is not empty it means admin views user's tasks\n // and we need to check permissions\n if(!empty($this->get('user_id'))) {\n return $this->user()->hasRole('admin');\n }\n\n return true;\n }", "title": "" }, { "docid": "3c54a64b7e414471108d31b4b58854b5", "score": "0.7674501", "text": "function is_authorized() {\n return ($this->access_token != NULL);\n }", "title": "" }, { "docid": "c4b2873df4aef92e1d39bd3f24ab9a6f", "score": "0.7668482", "text": "public function authorize()\n {\n return (auth()->check() && ! auth()->user()->finished_profile && auth()->user()->role != 'admin') ? true : false;\n }", "title": "" }, { "docid": "376844043f0222ed7a2a8aa3623b474f", "score": "0.7668466", "text": "public function authorize() {\n if ($this->getMethod() === 'PATCH') {\n return $this->user()->can('update', User::class);\n }\n\n return !auth()->check();\n }", "title": "" }, { "docid": "fb8dd0b89ad69c80bd32219b331d467a", "score": "0.76649845", "text": "function isAuthorized() {\r\n if ($this->isAdminRequest()) {\r\n if ($this->Auth->user('is_admin') != true) {\r\n return false;\r\n }\r\n }\r\r\n if (empty($this->params['prefix'])) {\r\n return true;\r\n }\r\r\n return true;\r\n }", "title": "" }, { "docid": "5f40d948a5e4ffe4776811ba667a52cf", "score": "0.7650565", "text": "private function isUserAuthorized(Request $request)\n {\n return $request->user->id == $this->auth->id();\n }", "title": "" }, { "docid": "ac3b3a019df28e1b6b5065c0839a12f8", "score": "0.7642991", "text": "public function authorize()\n {\n if (!$this->isRegister())\n return $this->user()->can('update', $this->route('user'));\n return true;\n }", "title": "" }, { "docid": "893fefcaa8f0bbabe2639b6e2fc59c84", "score": "0.76401085", "text": "public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d7c5080318027df1643993babed950ea", "score": "0.7632217", "text": "public function authorize()\n {\n if ($this->user()->hasRole('admin')) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "8c554c521daa52ec235580f10b15f4a8", "score": "0.76313287", "text": "public function authorize()\n {\n return app('Authority')->checkAuthority(134) || app('Authority')->checkAuthority(194);\n }", "title": "" }, { "docid": "1b700c9f91296110fce91a91292b658a", "score": "0.76300305", "text": "public function isAuthorized(): bool\n {\n return $this->authorized;\n }", "title": "" }, { "docid": "46db0b1864bc02cb5f1e50e7206d17bd", "score": "0.76140994", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "4060b7cebfc007f78995973323198b2c", "score": "0.76068926", "text": "public function authorize()\n {\n return ((\\Auth::check() && (\\Auth::user()->hasRole(\"admin\"))) || (\\Auth::check() && (\\Auth::user()->hasRole(\"owner\"))));\n }", "title": "" }, { "docid": "91f75f102cf6d36a864c523d88b43a90", "score": "0.7603521", "text": "function authorised() {\n\n\t\tglobal $api_config;\n\n\t\t$request = OAuthRequest::from_request();\n\n\t\t$api_config->oauth_parameters = $request->get_parameters();\n\n\t\tif (\t!isset($api_config->oauth_parameters['oauth_consumer_key']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_signature']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_timestamp']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_nonce'])\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$consumer_key = $api_config->oauth_parameters['oauth_consumer_key'];\n\t\t$consumer_secret = lookup_secret($consumer_key);\n\t\t$consumer = new OAuthConsumer($consumer_key, $consumer_secret);\n\n\t\t$signature_method = new OAuthSignatureMethod_HMAC_SHA1;\n\t\t$signature = $api_config->oauth_parameters['oauth_signature'];\n\n\t\t$timestamp = $api_config->oauth_parameters['oauth_timestamp'];\n\t\t$request_expired = (abs(time() - $timestamp) > 300);\n\n\t\treturn !$request_expired && valid_nonce() && $signature_method->check_signature($request, $consumer, null, $signature);\n\t}", "title": "" }, { "docid": "4c54020c6c60ab51e81a9670d68b022b", "score": "0.7582351", "text": "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ff794c28a968dce69d0449efe84e5bcc", "score": "0.7572131", "text": "public function authorize()\n {\n /*$robot = Robot::find($this->route('robot'));\n if ($robot) {\n return $this->user()->can('update', $robot);\n } else {\n return true;\n }*/\n return true;\n }", "title": "" }, { "docid": "10df13ce9600b5fb3463bbea159e1143", "score": "0.7571812", "text": "public function authorize(): bool\n {\n $user = Auth::user();\n return\n $user->can(\"create\", User::class) ||\n $user->can(\"update\", $user);\n }", "title": "" }, { "docid": "9fccab535480cb881f9768d3da7420e9", "score": "0.7570924", "text": "public function authorize()\n {\n try {\n $this->user = User::findOrFail(session('2fa:user:id'));\n } catch (\\Exception $ex) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "a0d3d7ca67a2980e7b293d330995059b", "score": "0.75684065", "text": "public function authorize()\n\t{\n\t\tif ( $this->alert != null ) {\n\t\t\treturn Auth::user()->isMyAlert( $this->alert );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1f5d34d0d7fcc23ad0e79bb7bba1d111", "score": "0.7567948", "text": "public function authorize()\n {\n $user = $this->user();\n $entry = $this->entry;\n if (strtoupper($this->method()) === 'POST') {\n return true;\n } else {\n return $user->can('update', $entry);\n }\n }", "title": "" }, { "docid": "ddf07a2b01ff2619fc5c7deaa69edc81", "score": "0.7561511", "text": "public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "353a39cee7ff65acadebf163114c0a91", "score": "0.7560446", "text": "public function authorize()\n {\n return Task::find($this->route()->parameters['id'])->user_id == Auth::id();\n }", "title": "" }, { "docid": "a12451b6af79fdf13141f94195a42ad0", "score": "0.7549059", "text": "public function authorize()\n {\n $user = User::where('id', Auth::id());\n\n return $user->exists() &&\n $user->first()->verified;\n }", "title": "" }, { "docid": "8c83d334e99dd9618951155e97f8687f", "score": "0.75449353", "text": "public function authorize()\n {\n switch ($this->method()){\n case 'POST':\n case 'GET':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->isAdmin();\n default:\n return false;\n\n }\n\n }", "title": "" }, { "docid": "f08d4c8687c0a867f9a48d889466aa39", "score": "0.7542998", "text": "public function authorize()\n {\n return $this->user()->is_dispatcher() && $this->user()->ownsOrder($this->id);\n }", "title": "" }, { "docid": "e9765550fc338490263d3391dd22e987", "score": "0.7533661", "text": "public function authorize()\n {\n if(!$this->route('comment')){\n return true;\n }\n\n $this->comment = Comment::find($this->route('comment'));\n\n if(!$this->comment){\n return false;\n }\n\n return $this->user()->isSuperAdmin() || $this->user()->id === $this->comment->user_id ;\n }", "title": "" }, { "docid": "c20f97fc4daa02e4cab5f9c7fba1fcea", "score": "0.75300336", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->user_role == 0;\n }", "title": "" }, { "docid": "ee75d6f38863c6db4488059a2d5f573b", "score": "0.75222874", "text": "function isAuthorized() {\n return true;\n }", "title": "" }, { "docid": "3064bebbce0683cd6210741cc8a3be57", "score": "0.75160164", "text": "public function authorize()\n {\n if (env('APP_ENV') == 'testing'):\n return true;\n endif;\n switch ($this->getMethod()):\n case \"POST\":\n case \"PUT\":\n return true;\n break;\n endswitch;\n return false;\n }", "title": "" }, { "docid": "cdc68b6902017dd60a773f887cf373d5", "score": "0.7512349", "text": "public function authorize()\n {\n $ticket = $this->route('ticket');\n\n return $ticket->property->landlord->id == $this->user()->landlord->id;\n }", "title": "" }, { "docid": "1f3b80daa6a71180d2bf0f924cbc93c4", "score": "0.75095665", "text": "public function authorize()\n {\n return auth()->user()->id === $this->route('comment')->user_id;\n }", "title": "" }, { "docid": "747a3cadb25faf5ef11b197c54891130", "score": "0.75075424", "text": "public function authorize()\n {\n if ($this->can('view-building')) {\n return true;\n }\n\n // permit residents to see their building\n $building = Building::where('id', $this->route('id'))->first();\n $resident = $this->user()->resident ?? null;\n\n\n return $resident && $resident->relations()->where('building_id', $building->id)->exists();\n }", "title": "" }, { "docid": "9cf7062eba5e301eed991dbfc61484f2", "score": "0.7502618", "text": "public function authorize()\n {\n\t\t// only allow updates if the user is logged in\n\t\treturn backpack_auth()->check();\n }", "title": "" }, { "docid": "2aceba7cfd4e8124409fc03af5d896d8", "score": "0.75019586", "text": "function isAuthorized() {\n //if( isset($this->params['prefix']))\n // return (strcasecmp($this->params['prefix'],$this->Auth->user('role'))===0);\n if (!$this->isLogin()) return false;\n return true;\n \n //shouldn't get here, better be safe than sorry\n //return false;\n }", "title": "" }, { "docid": "b8c138dfbf0a96d5b19051c395e3e939", "score": "0.7501601", "text": "public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }", "title": "" }, { "docid": "61a127d26cc95b5414689c2525a7cf17", "score": "0.74994856", "text": "public function authorize()\n {\n if (Auth::check() && Auth::user()->level === 'admin') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e60c253b47ba2de673da9b9ed8b83d5b", "score": "0.74960023", "text": "public function authorize()\n {\n if(Auth::check())\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "f9da0a87a777ed1680f5bdaddb08aaff", "score": "0.74959165", "text": "public function authorize()\n {\n $advert = $this->route('advert');\n\n return Auth::id() === $advert->user_id || Auth::user()->isAdministrator();\n }", "title": "" }, { "docid": "0cc11ac92ea784b1757a30c9ec928e22", "score": "0.74956346", "text": "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "title": "" }, { "docid": "9320f8ef578ca5b72252eaed0363faab", "score": "0.74941915", "text": "public function authorize()\n {\n return (auth()->check() && auth()->user()->is_admin);\n }", "title": "" }, { "docid": "4f62804fddb1c64b11f8c844b4d80ca8", "score": "0.74888283", "text": "public function authorize()\n {\n if (Auth::user()->roles()->first()->role === 'admin' && Auth::check()) return true;\n return false;\n }", "title": "" }, { "docid": "b57952e918adf46f4d6781431945241d", "score": "0.74884", "text": "public function authorize()\n {\n // in-case csrf has somehow been bypassed, ensure request is from this server\n return ($this->header('referer') == config('app.url'));\n }", "title": "" }, { "docid": "7591eba5812efb48cc00fe833e0023cd", "score": "0.7485698", "text": "public function authorize()\n {\n return $this->api_token &&\n \\DB::table('user')->where(['api_token' => $this->api_token])->first()==true;\n }", "title": "" }, { "docid": "94f792385fcb99b051b81a861c1dd2df", "score": "0.7483596", "text": "public function authorize() {\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "94f792385fcb99b051b81a861c1dd2df", "score": "0.7483596", "text": "public function authorize() {\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "f6a9e336b24566d18d73e703514851ae", "score": "0.74829066", "text": "public function authorize()\n\t{\n\t\tif ( ! \\Auth::check() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "42853719f6e9216772324775de4e90fb", "score": "0.74825495", "text": "public function authorize(): bool\n {\n return (bool) Auth::user();\n }", "title": "" }, { "docid": "96c9a6c7ec361f4005653c1f39cdb7d9", "score": "0.74794936", "text": "public function authorize ()\n {\n return TRUE;\n }", "title": "" }, { "docid": "8760c099bc57f5fa8739c65c1c696ac7", "score": "0.7476589", "text": "public function authorize()\n {\n // Already authorized by middleware on route.\n // No policy or gate defined for this resource thus returns true.\n return true;\n }", "title": "" }, { "docid": "7c346768ea98baf86426671339aa4d81", "score": "0.74726367", "text": "public function authorize()\n {\n return $this->user()->isSuperAdmin();\n }", "title": "" }, { "docid": "0f70212b6c7687c65179463bab4debd8", "score": "0.74722385", "text": "public function authorize()\n {\n //Should add check for user but for now just allow anyone to edit request.\n return true;\n }", "title": "" }, { "docid": "c953f72310cdb772858a87f750d36293", "score": "0.7468519", "text": "public function authorize()\n {\n $this->customer = (new FetchCustomer)\n ->actingAs($this->user())\n ->run([\n 'encoded_id' => $this->customer_id,\n ]);\n\n return $this->runningAs('object') || $this->user()->can('update', $this->customer);\n }", "title": "" }, { "docid": "a48586bdce6587a1b8d4007145196dac", "score": "0.7466968", "text": "public function authorize()\n {\n //TODO:: return true if user is admin\n return true;\n }", "title": "" }, { "docid": "8fe3797f9541eefa98c79fb818d6fb8e", "score": "0.7464665", "text": "public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n if ($this->isPost()) {\n return auth()->user()->can('create', OrderItem::class);\n }\n if ($this->isPut()) {\n return auth()->user()->can('update', $this->route('orderItem'));\n }\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('orderItem'));\n }\n\n return true;\n }", "title": "" }, { "docid": "f12f375cfb24327a150def25274a505e", "score": "0.7455374", "text": "public function authorize()\n {\n $reply = $this->route('reply');\n return $reply && $this->user()->can('updateOrDelete', $reply);\n }", "title": "" }, { "docid": "998aee2b24522e93c8d64676eed7b6d8", "score": "0.7455313", "text": "public function authorize() : bool\n {\n return $this->user()->can('viewAny', Contact::class);\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "761f978b91b59f9930eb0a8ed10d3b74", "score": "0.0", "text": "public function create()\n {\n return view('transaksi.create');\n }", "title": "" } ]
[ { "docid": "65c7e51c557119c4523c305976c470bc", "score": "0.80575514", "text": "public function create()\n {\n return view('Admin.acl.resource.form');\n }", "title": "" }, { "docid": "bb87b5e7b03ebf8127b27e4ff14ee77c", "score": "0.7914315", "text": "public function create()\n {\n return view('Backend/Resources/addResource');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "2378dd3b14ed3946fdc33fe245647ae5", "score": "0.75997573", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName().'.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "ee18d6d904526a51f41375d0bd093040", "score": "0.75147605", "text": "public function create()\n {\n $model = $this->resource;\n $resource = new Resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "14707811f9cdd58dcd07e882041856bc", "score": "0.74805194", "text": "public function create()\n\t{\n\t\treturn view('module.forms.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ecbbca86f1ca5794847773f086d5685e", "score": "0.7357543", "text": "public function create()\n {\n return view('backend.client.formcreate');\n }", "title": "" }, { "docid": "e24406181475135438d05ab2d48d4b36", "score": "0.73556155", "text": "public function create()\n\t{\n\t\treturn view('form');\n\t}", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "517ede7d413126a1373684f8f17be2b9", "score": "0.7247568", "text": "public function create()\n {\n return view('clothing.form');\n }", "title": "" }, { "docid": "5016b1af29a2cdfd8f026421109d1142", "score": "0.7241239", "text": "public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier');\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Create new supplier'),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\n\t\t));\n\t}", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "1e688bba9a7b271c2e7c26eb773383da", "score": "0.72305965", "text": "public function create()\n {\n //\n\n return view(\"student.form\");\n }", "title": "" }, { "docid": "1e47d9942ad3c42b28df121849c0197e", "score": "0.7225282", "text": "public function newAction()\n {\n $this->view->form = new PersonasForm(\n null,\n [\n 'edit' => true,\n ]\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "fabe91e71192c05e656f9056b41ad668", "score": "0.72117", "text": "public function showCreateForm()\n {\n return view('admin.accounts.create');\n }", "title": "" }, { "docid": "e816b62a64c3324cff6ccbc00e52514b", "score": "0.7202654", "text": "public function frontCreate()\n {\n $resource = new Resource;\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n\n return view('frontend.resources.create', compact(\n 'resource', 'countries', 'cities', 'categories'\n ));\n }", "title": "" }, { "docid": "a0f86f0603cbb921b500dd4fcb6185e6", "score": "0.71805054", "text": "public function create()\n {\n $data['action'] = 'absensi.store';\n return view('absensi.form', $data);\n }", "title": "" }, { "docid": "942a0a16c384247567b37ebeddf71971", "score": "0.7151351", "text": "public function create()\n {\n return view('Backend.student.new');\n }", "title": "" }, { "docid": "dc9ff50878e23f55a66dade7c29e9693", "score": "0.71423906", "text": "public function create()\n {\n return view('admin.trucks.forms.create');\n }", "title": "" }, { "docid": "b7f809ca4143f6da6ac8746ef0099f3a", "score": "0.71369606", "text": "public function create()\n {\n return view('backend.students.student-form-add');\n }", "title": "" }, { "docid": "0324ad3d56f56ecb8342812c78064a91", "score": "0.71342736", "text": "public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }", "title": "" }, { "docid": "871ecf60820ab50a5032377d975fc622", "score": "0.71342325", "text": "public function create()\n {\n return view('admin.ProviderCreateForm');\n }", "title": "" }, { "docid": "97209db276d73dfc71ffc10ef4a4037f", "score": "0.71315765", "text": "public function create()\n {\n return view('book.form');\n }", "title": "" }, { "docid": "1e082bee3084311021ae31460c5c0e39", "score": "0.7127698", "text": "public function create()\n {\n return view('forms.books.create');\n }", "title": "" }, { "docid": "fa54f02550ef87c9f8f5a27d06c382de", "score": "0.71258074", "text": "public function create() {\n return view('resources.edit');\n }", "title": "" }, { "docid": "33732dfef72a6d8b9b06cc792789e6df", "score": "0.71213603", "text": "public function create()\n\t{\n\t\treturn view('admin.product.form');\n\t}", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "d70c1ea684023a020e3557813873c2ca", "score": "0.70956016", "text": "public function create()\n {\n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "a5962b732b317d8491e1cd29bddb79a5", "score": "0.7095086", "text": "public function create()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "4b38db6737bb3fb8f108037fd62385fc", "score": "0.70905846", "text": "public function create()\n {\n return view('enterprise.new');\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "0ed27c8268deedd7d778400898a3117f", "score": "0.7051436", "text": "public function create()\n\t{\n return View::make('clerks.create');\n\t}", "title": "" }, { "docid": "991f766d6ac0e5a6f0b81f6a7483c64a", "score": "0.7049206", "text": "public function create()\n {\n //\n $page_title = 'Supplier';\n $page_description = 'Supplier Add Form';\n $form_title = 'Supplier - Add';\n $form_description = 'Enter details to add new supplier , field with * are required.';\n $supplier = new Supplier();\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\n }", "title": "" }, { "docid": "9954664a9c6b9b3ab69721566e0199bc", "score": "0.7044138", "text": "public function create()\n {\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "47df4583b4b1b0f104234ead33b0b361", "score": "0.7041365", "text": "public function create() {\n return view(\"ir.create\");\n }", "title": "" }, { "docid": "23ef4c6aae4638b7258db6105822d281", "score": "0.70397395", "text": "public function create()\n {\n $data['action'] = 'jadwalbelajar.store';\n return view ('jadwalbelajar.form', $data);\n }", "title": "" }, { "docid": "7bbb0d78cadef3c44a577d92d50a3e67", "score": "0.70380855", "text": "public function create()\n {\n $resources = Resource::all();\n return view('product.create', compact('resources'));\n }", "title": "" }, { "docid": "45f9c7429c98bc848636cf3e3af4a0b7", "score": "0.70367175", "text": "public function create()\n\t{\n\t\treturn view('admin.show.create');\n\t}", "title": "" }, { "docid": "4d21f7c9cf42b4d85338aca053e91032", "score": "0.70324284", "text": "public function create()\r\n {\r\n $title = trans('book.new');\r\n $this->generateParam();\r\n return view('layouts.create', compact('title'));\r\n }", "title": "" }, { "docid": "3be30800c76364ece9bf10bfffd9d576", "score": "0.7022247", "text": "public function create()\n {\n return view('penerbit.form');\n }", "title": "" }, { "docid": "5210b9361957c963c05861d35648076b", "score": "0.70178825", "text": "public function create()\n {\n $formInputs = $this->form();\n $formInputs['method'] = 'create';\n\n\n return view('students.create', compact('formInputs'));\n }", "title": "" }, { "docid": "804a6ca9dad7489200cc1f28102b0473", "score": "0.7002272", "text": "public function create()\n {\n return view('admin.restaurents.create');\n }", "title": "" }, { "docid": "e3189bc5490f564078b663c86cd3b554", "score": "0.69995284", "text": "public function create()\n {\n return view('admin.clubes.form')\n ->with(['action' => route('clubes.store')]);\n }", "title": "" }, { "docid": "27a713091aa62f5f81eb6b7a09310814", "score": "0.6997733", "text": "public function create()\n {\n return view('project.form');\n }", "title": "" }, { "docid": "76ecd9f94330c8bff719dad38ac5e742", "score": "0.69919205", "text": "public function create()\n {\n return view('forms.newPoetry');\n }", "title": "" }, { "docid": "75773cfa50c8a890d093cd7b4128f44b", "score": "0.6984025", "text": "public function create()\n {\n // INI REDIRECT KE HALAMAN FORM INPUT\n return view('admin.create');\n }", "title": "" }, { "docid": "c3119b97c0e321666818c6fe3e6116b4", "score": "0.697933", "text": "public function create()\n {\n return view($this->viewRoute.'.form');\n }", "title": "" }, { "docid": "7a36d29ededb118e48dc1f2b35700e81", "score": "0.697282", "text": "public function create()\n {\n //\n return view(\"billproducts.createForm\");\n }", "title": "" }, { "docid": "986fd11f3e8bfa985b902a8006b7d306", "score": "0.6968721", "text": "public function create()\n\t{\n\t\t$forms \t= $this->form_add();\n\t\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\n\n\t\tif(isset($this->disable_add))\n\t\t\t$disable_add = $this->disable_add;\n\n\t\tif(isset($this->disable_edit))\n\t\t\t$disable_edit = $this->disable_edit;\n\n\t\tif(isset($this->disable_delete))\n\t\t\t$disable_delete = $this->disable_delete;\n\n\t\tif(isset($this->custom_add))\n\t\t\t$custom_add = $this->custom_add;\n\n\t\treturn View::make('crud.create' , \n\t\t\tarray(\t\n\t\t\t\t'forms' \t\t\t=> $forms,\n\t\t\t\t'title'\t\t\t\t=> $this->title,\n\t\t\t\t'slug'\t\t\t\t=> $this->slug,\n\t\t\t\t'form_span'\t\t\t=> $this->form_span,\n\t\t\t\t'controller'\t\t=> $this->controller,\n\t\t\t\t'disable_edit'\t\t=> $disable_edit,\n\t\t\t\t'disable_delete' \t=> $disable_delete,\n\t\t\t\t'disable_add'\t\t=> $disable_add,\n\t\t\t\t'custom_add'\t\t=> $custom_add\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "8ced93e50c35698f25fcb388d463e032", "score": "0.6958418", "text": "public function create()\n {\n return view(\"pages.daftar.form\");\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "5225b1fd92184a478b2b9762321d1c23", "score": "0.69497955", "text": "public function create()\n {\n return view('hiperbolica.create');\n }", "title": "" }, { "docid": "593fbba523a02dd32ffe7ecf4fd50435", "score": "0.6946303", "text": "public function create()\n {\n return view('admin.site.form');\n }", "title": "" }, { "docid": "5700bb5603b363af554c788e226eff17", "score": "0.6945535", "text": "public function newAction()\n {\n $entity = new Reconocimiento();\n $form = $this->createForm(new ReconocimientoType(), $entity);\n\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "12fd2eae40d48367c7e6d8331f5ead34", "score": "0.69429785", "text": "public function create()\n\t{\n\t\t//\n return View::make('objects.addnew');\n\t}", "title": "" }, { "docid": "c7310471f43f53eaf4b8eff6831b36d3", "score": "0.6939984", "text": "public function create()\n {\n return view('linhas.create');\n }", "title": "" }, { "docid": "ad623548153e56c22245e48fee70a80f", "score": "0.69390464", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "6339cf25fff656067a9eaf3d5b7efb2a", "score": "0.6938875", "text": "public function create()\n {\n return view('admin.banner.banner-form')->with('title','add');\n }", "title": "" }, { "docid": "517e8eef100389973418652d54a823b1", "score": "0.69366604", "text": "public function create()\n {\n //no create view as ther create form is on the index page\n }", "title": "" }, { "docid": "9dc7ce932c1b23a833528346de52d671", "score": "0.69311243", "text": "public function create()\n {\n return view('admin.electrician.add');\n }", "title": "" }, { "docid": "a44e07047efd0e153e9c966db5bdabd0", "score": "0.69306445", "text": "public function create()\n {\n return view('dashboard.student.studentForm');\n }", "title": "" }, { "docid": "0b0f0931a087bfbc6677280f914ebfda", "score": "0.69298023", "text": "public function create()\n {\n return view('hocsinh.add');\n }", "title": "" }, { "docid": "8c2948fcee8393ed6a20bf84afb9cc88", "score": "0.6928795", "text": "public function create()\n {\n return view('manage.add');\n }", "title": "" }, { "docid": "1ba5eb9946214bea84f1480b6feabe1f", "score": "0.69276893", "text": "public function create()\n {\n return view('bspyl-form');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "5ed8a37a585288e035b28ed478757c41", "score": "0.6921601", "text": "public function create()\n {\n return view('elonlars.create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "9a0129f9c2c01a078afcdd438cc75b1f", "score": "0.69172627", "text": "public function create()\n {\n return view('vestiti.form');\n }", "title": "" }, { "docid": "92274cb7faf3de5d13f627815b8f4ba2", "score": "0.69144803", "text": "public function create()\n {\n\n //\n\n return view('addinformation');\n\n }", "title": "" }, { "docid": "8a7c33d5844900cbaaaebde7aa21e4dd", "score": "0.6911652", "text": "public function formCreateAction() {\n $this->view->form = new PartnersForm();\n }", "title": "" }, { "docid": "b43d8bd2e5fa832f2b86d77c64e5ad10", "score": "0.69116175", "text": "public function create()\n {\n $supplier = new Supplier;\n return view('supplierForm')->with('supplier',$supplier);\n }", "title": "" }, { "docid": "d6d7c0a46ec7af65d934ca4831a12435", "score": "0.6911027", "text": "public function create()\n {\n $this->authorize(__FUNCTION__);\n\n $specie = new Specie;\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "d0a17dffa7cd331b95da26311bfaf458", "score": "0.69106084", "text": "public function create()\n {\n return view('backend.actions.create');\n }", "title": "" }, { "docid": "bf90fc181239c9ee309df9b686f918de", "score": "0.69096845", "text": "public function create()\n {\n return view('kontraktor::create');\n }", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "2b077d4213a9e74657f7368e00d5d96e", "score": "0.69072443", "text": "public function create()\n\t{\n\t\t$person = new Person;\n \n return view('admin.people.form', ['person' => $person]); \n\t}", "title": "" }, { "docid": "8cfed7c03b1c2f9d9fc6996ae61ff1e3", "score": "0.6906446", "text": "public function create()\n {\n return view('admin.users.forms.create');\n }", "title": "" }, { "docid": "12c04608837ced3906ffa6fd0839aefc", "score": "0.6904492", "text": "public function create()\n {\n // return view('formname.create');\n }", "title": "" }, { "docid": "6fe9753acadb65e60f24f2784b8c57e8", "score": "0.6903352", "text": "public function create()\n {\n return view('showCreate');\n }", "title": "" }, { "docid": "be0ad6355f1cd2d306c6632b0178efe9", "score": "0.69000477", "text": "public function create()\n {\n return view('comuni.add');\n }", "title": "" }, { "docid": "1b96ed3b5237de2d9b8b93a0082346de", "score": "0.6898089", "text": "public function create()\n\t{\n $theme = $this->theme;\n $theme->set('title','New Employee');\n\n return $theme->layout('form')->scope('employees.create')->render();\n\t}", "title": "" }, { "docid": "c05139fcffc8ed34edf664b1dcababe1", "score": "0.6897515", "text": "public function actionCreate()\n {\n $this->layout = 'principal2';\n $model = new Registros();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "8f937ad7c5f9325dd1c12c02346f01a1", "score": "0.6897389", "text": "public function create()\n {\n return view('Job.form');\n }", "title": "" }, { "docid": "c6e630a8785e77f2934d7509a0426ed1", "score": "0.68941396", "text": "public function newAction()\n {\n $entity = new Formations();\n $form = $this->createCreateForm($entity);\n\n\n return $this->render('FormBundle:Formations:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f8dbbd8eb79b47b7dd8cbe07d9f8aa6c", "score": "0.68926984", "text": "public function create()\n {\n \n return view('falta.create'\n );\n }", "title": "" }, { "docid": "9d3fa77955670de89373a055d00ff3f2", "score": "0.68926096", "text": "public function create()\n {\n return view('terapis.create');\n }", "title": "" }, { "docid": "3ff70187ad516bfc1251de194f42b7f8", "score": "0.6892582", "text": "public function create()\n {\n //\n $title = 'Add Partner';\n return view('partnercompany.create_edit')->with(compact('title'));\n }", "title": "" }, { "docid": "ee157e1835fe293cefd0eceeafc16825", "score": "0.68916535", "text": "public function create()\n {\n return view('question.new');\n }", "title": "" }, { "docid": "eaeda1b26ca65d0dd32dbeb43e442328", "score": "0.6891185", "text": "public function create()\n\t{\n\t\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\n\t}", "title": "" } ]
eb3eb36e1da8034018ebbfcdd576e526
/////////////////////////////////////////////// Tests concerning access to the image upload. ///////////////////////////////////////////////
[ { "docid": "f3d8641ffe33303704a5a19958a5b487", "score": "0.0", "text": "public function checkAccessForImageUploadThrowsExceptionWithPleaseLoginMessageForAnInvalidUidAndNoUserLoggedIn() {\n\t\t$this->setExpectedException(\n\t\t\t'tx_oelib_Exception_AccessDenied', 'message_please_login'\n\t\t);\n\n\t\t$this->fixture->checkAccess('image_upload', array(\n\t\t\t'showUid' => $this->testingFramework->createRecord(\n\t\t\t\tREALTY_TABLE_OBJECTS, array('deleted' => 1)\n\t\t\t)\n\t\t));\n\t}", "title": "" } ]
[ { "docid": "b107068a5dd680fe755279d81665c1d8", "score": "0.8225248", "text": "public function testUploadOptionSetImage()\n {\n }", "title": "" }, { "docid": "cc640f407a5424ab2393e457988a5110", "score": "0.8173278", "text": "public function testUploadImage()\n {\n// Storage::fake('local');\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->withSession(['banned' => false])\n ->get('/');\n\n $images = Image::factory(Image::class)->create();\n $imagePath = $images->image;\n $this->post('/image', [\n 'image[]' => $images\n ]);\n if (file_exists($imagePath)) {\n $response = 0;\n } else $response = 1;\n // $imageDb= Image::where(config('constants.image.id'), 30)->get()->toArray();\n Storage::assertExists($imagePath);\n\n $response->assertOk();\n\n\n }", "title": "" }, { "docid": "08cfd2a0202857fd355281fdc1abc8ea", "score": "0.7680398", "text": "public function testSingleImageUpload() {\n\t\t$folder_location \t\t\t\t= isset($this->request->data['folder_location']) ? $this->request->data['folder_location'] : \"\";\n\t\t$attachment \t\t\t\t\t= isset($this->request->data['attachment']) ? $this->request->data['attachment'] : \"\";\n\t\t$image_data = isset($this->request->data['image_data']) ? $this->request->data['image_data'] : '';\n\n\n\t\t$arr = base64_decode($image_data);\n\t\t$fname = \"/var/www/AIMS/shoutoutcity/\".$attachment['name'];\n\t\t$handle = fopen($fname, \"w+\");\n\t\tfwrite($handle, $arr);\n\t\tfclose($handle);\n\t\tif(!file_exists($fname))\n\n\t\t$responce['status'] = 'error';\n\t\t$responce['message'] = 'Error occured while uploading images';\n\t\t$this->set(array(\n 'venues' \t\t=> $responce,\n '_serialize' \t=> array('venues'),\n ));\n unset($venues);\n\t\texit();\n\t}", "title": "" }, { "docid": "8cc05f50bdbf81622ed966dc2b3aab8e", "score": "0.7533741", "text": "public function test_upload_photo()\n {\n $response = $this->actingAs($this->user)\n ->json('POST', route('image.upload'), [\n 'image' => UploadedFile::fake()->image('avatar.jpg'),\n 'visibility' => 1,\n 'category' => 'Men'\n ]);\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "0b5c4436ab0f2be0edbdf7aabcf92bd0", "score": "0.74113375", "text": "public function testRetrieveImage1()\n {\n }", "title": "" }, { "docid": "858a925d3697906d4432698ad39d51da", "score": "0.7382886", "text": "public function testFileUpload()\n {\n Storage::fake('TestFile');\n\n $response = $this->json('POST', '/TestFile', [\n 'TestFile' => UploadedFile::fake()->image('TestFile.jpg')\n ]);\n\n // File is saved\n Storage::disk('TestFile')->assertExists('TestFile.jpg');\n\n // File is not saved\n Storage::disk('TestFile')->assertMissing('TestFile.jpg');\n }", "title": "" }, { "docid": "78d318d4381784c811625ab943fa39ac", "score": "0.728763", "text": "public function testUploading()\n {\n \t$client = static::createClient();\n\n $client->request('GET', '/');\n\n //create dummy file\n $file = tempnam(sys_get_temp_dir(), 'upl'); // create file\n imagepng(imagecreatetruecolor(10, 10), $file);\n\t\t$photo = new UploadedFile(\n $file,\n\t\t 'someFile.jpg',\n\t\t 'image/jpeg',\n\t\t 123\n\t\t);\n\n\t\t$client->request('POST', '/_uploader/gallery/upload', array('file' => $photo), array(), array(\n \t\t'HTTP_X-Requested-With' => 'XMLHttpRequest'\n\t\t));\n\n\t\t$this->assertTrue($client->getResponse()->isSuccessful());\n }", "title": "" }, { "docid": "b54348b93eabecb3332fe3764235303b", "score": "0.7099252", "text": "public function test_postPrototypeGetImage() {\n\n }", "title": "" }, { "docid": "8a7ce6c9b6679cb0788e9b60fd31bc46", "score": "0.70860523", "text": "public function testUpload () {\n\t\techo \"test elegant upload\";\n\t\treturn;\n\t}", "title": "" }, { "docid": "bd3330eb59faa24c2f635149f576e023", "score": "0.70811886", "text": "public function testUploadAnImageForAProduct()\n {\n $this->markTestSkipped();\n\n // TODO: create a mock image file\n\n $prod = $this->generateProducts()->first();\n $filePath = base_path().$product->id.\"-\".$file->getClientOriginalName();\n\n $response = $this->call('PUT', \"/products/{$prod->id}/image\");\n $this->seeInDatabase('products', [\n 'id' => $prod->id,\n 'image' => $filePath,\n ]);\n }", "title": "" }, { "docid": "b293538c0028512e7a06842cf16ef588", "score": "0.7074762", "text": "public function testOwnerUploadFile()\n {\n Storage::fake('upload');\n $file = UploadedFile::fake()->image('test.jpg');\n $project = Project::first();\n $user = User::first();\n\n $response = $this->actingAs($user)->post('/projects/'.$project->id.'/file', [\n 'attchement' => $file\n ]);\n $response->assertStatus(302);\n $response->assertSessionHas(\"success\",__(\"project.file_success\", ['filename' => $file->name]));\n\n //Storage::disk('upload')->assertExists($file->hashName());\n\n }", "title": "" }, { "docid": "e956c806dfa06274733e6a27bc98132b", "score": "0.7025675", "text": "public function test_image_can_be_upladed()\n {\n $this->withoutExceptionHandling();\n $this->actingAs($user = factory(User::class)->create(), 'api');\n\n $file = UploadedFile::fake()->image('user-image.png');\n\n $response = $this->post('api/users/' . $user->id . '/images', [\n 'image' => $file,\n 'heigh' => 200,\n 'width' => 300,\n 'location' => 'cover'\n ])->assertStatus(201);\n\n Storage::disk('s3')->assertExists('user-images/' . $file->hashName());\n\n $image = Image::first();\n $this->assertEquals('user-images/' . $file->hashName(), $image->path);\n $this->assertEquals('200', $image->heigh);\n $this->assertEquals('300', $image->width);\n\n $response->assertJson([\n 'data' => [\n 'type' => 'images',\n 'id' => $image->id,\n 'attributes' => [\n 'path' => Config::get('aws.s3_url').$image->path,\n 'width' => $image->width,\n 'heigh' => $image->heigh,\n 'location' => $image->location,\n ],\n 'links' => [\n 'self' => url('api/images/')\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "302cb6b449ba101a65d9bb155b7f5297", "score": "0.6983325", "text": "public function testStore() {\n Storage::fake('images');\n\n $response = $this->json('POST', 'api/v1/images', [\n 'fileNames' => [UploadedFile::fake()->image('photo1.jpg', 600, 600),\n UploadedFile::fake()->image('photo2.jpg', 1000, 1000)]\n ])->assertStatus(200)->decodeResponseJson();\n\n $imageOriginal1Path = $response['images'][0]['original']['path'];\n $imageOriginal1Thumb100 = $response['images'][0]['thumbs']['100x100']['path'];\n $imageOriginal1Thumb400 = $response['images'][0]['thumbs']['400x400']['path'];\n\n $imageOriginal2Path = $response['images'][1]['original']['path'];\n $imageOriginal2Thumb100 = $response['images'][1]['thumbs']['100x100']['path'];\n $imageOriginal2Thumb400 = $response['images'][1]['thumbs']['400x400']['path'];\ndd($this->get('/images/60647991540d2.jpeg')->assertOk());\n $this->get($imageOriginal1Path)->assertRedirect();\n $this->get($imageOriginal1Thumb100)->assertStatus(200);\n $this->get($imageOriginal1Thumb400)->assertStatus(200);\n\n $this->get($imageOriginal2Path)->assertStatus(200);\n $this->get($imageOriginal2Thumb100)->assertStatus(200);\n $this->get($imageOriginal2Thumb400)->assertStatus(200);\n\n }", "title": "" }, { "docid": "4329e3c6760db3bdc8b54e3a8d199ff0", "score": "0.69624776", "text": "public function testImagesUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "0b523e14d0d67d1986ad8aefcdff26ba", "score": "0.6958292", "text": "public function testImagesGet()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "062ab0083e320a2d17ec2175cecc97c3", "score": "0.6945325", "text": "function Trigger_ImageUpload1(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"logotipo\");\n $uploadObj->setDbFieldName(\"logotipo\");\n $uploadObj->setFolder(\"../../Uploads/fotos/\");\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "0b68a1f75a1868b35bd30053f7824a4e", "score": "0.6932921", "text": "public function testImagesGetFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ee3e588736b32e45e56ff379347e8d04", "score": "0.6928883", "text": "public function uploadAdPhoto(){\n $this->page()\n ->findAndAssertThat()\n ->existsOnlyOnce()\n ->elementWithCss(self::ELEMENT_IMG_INPUT_UPLOAD_CSS)\n ->sendKeys(self::STRING_IMG_LOCATION);\n }", "title": "" }, { "docid": "da0b77bac0130e17c0e8ac1bc9bfa06a", "score": "0.69245344", "text": "public function uploadAction()\n {\n if(strtolower($_SERVER['REQUEST_METHOD']) != 'post'){\n exit;\n }\n\n $original = APPLICATION_PATH_TMP . '/'. md5($_SERVER['REMOTE_ADDR'].rand()).'.jpg';\n\n // The JPEG snapshot is sent as raw input:\n $input = file_get_contents('php://input');\n\n if(md5($input) == '7d4df9cc423720b7f1f3d672b89362be'){\n // Blank image. We don't need this one.\n exit;\n }\n\n $result = file_put_contents($original, $input);\n if (!$result) {\n echo '{\n \"error\"\t\t: 1,\n \"message\"\t: \"Failed save the image. Make sure you chmod the uploads folder and its subfolders to 777.\"\n }';\n exit;\n }\n\n $info = getimagesize($original);\n if($info['mime'] != 'image/jpeg'){\n @unlink($original);\n exit;\n }\n\n $storage = Engine_Api::_()->getItemTable('storage_file');\n $file = $storage->createTemporaryFile($original);\n @unlink($original);\n\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $table = Engine_Api::_()->getDbtable('albums', 'album');\n $db = $table->getAdapter();\n $db->beginTransaction();\n\n try\n {\n $type = $this->_getParam('type', 'wall');\n\n if (empty($type)) $type = 'wall';\n\n $album = $table->getSpecialAlbum($viewer, $type);\n\n $photoTable = Engine_Api::_()->getDbtable('photos', 'album');\n $photo = $photoTable->createRow();\n $photo->setFromArray(array(\n 'owner_type' => 'user',\n 'owner_id' => Engine_Api::_()->user()->getViewer()->getIdentity()\n ));\n $photo->save();\n $photo->setPhoto($file);\n\n // delete old file\n $file->delete();\n\n if( $type == 'message' ) {\n $photo->title = Zend_Registry::get('Zend_Translate')->_('Attached Image');\n }\n\n $photo->album_id = $album->album_id;\n $photo->save();\n\n if( !$album->photo_id ) {\n $album->photo_id = $photo->getIdentity();\n $album->save();\n }\n\n if( $type != 'message' ) {\n // Authorizations\n $auth = Engine_Api::_()->authorization()->context;\n $auth->setAllowed($photo, 'everyone', 'view', true);\n $auth->setAllowed($photo, 'everyone', 'comment', true);\n }\n\n $db->commit();\n\n $this->view->status = true;\n $this->view->photo_id = $photo->photo_id;\n $this->view->album_id = $album->album_id;\n $this->view->src = $photo->getPhotoUrl();\n $this->view->message = Zend_Registry::get('Zend_Translate')->_('Photo saved successfully');\n \n }\n\n catch( Exception $e )\n {\n $db->rollBack();\n //throw $e;\n $this->view->status = false;\n }\n\n\n\n\n\n }", "title": "" }, { "docid": "9deb13879eacb6c60cb800097b392254", "score": "0.69205457", "text": "public function testFileUpload()\n {\n Storage::fake('profiles');\n $file = UploadedFile::fake()->image('profile_pic.jpg');\n\n $response = $this->post('/', [\n 'file' => $file,\n ]);\n\n // Redirect means we passed validation and uploaded file without error.\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "89f51e21ae2adcfa3ba969e11a8ef735", "score": "0.691341", "text": "function Trigger_ImageUpload1(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"logotipo\");\n $uploadObj->setDbFieldName(\"logotipo\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "82ceb3e1e5748cc6ad4aa47f972d94a4", "score": "0.690438", "text": "function _uploadImage()\n {\n global $_TABLES, $_DLM_CONF;\n\n $newimage_name = COM_applyFilter($_FILES['imgurl']['name']);\n if (!empty($newimage_name)) {\n $name = $this->_createFilename($newimage_name);\n if (DLM_uploadNewFile($_FILES['imgurl'], $_DLM_CONF['path_snapcat'], $name)) {\n $this->_imgurl = $name;\n }\n } else if ($this->_deleteimg) {\n $this->_imgurl = '';\n }\n }", "title": "" }, { "docid": "2dafbcf01e45f3a2a31c69033244475f", "score": "0.68846464", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"imagem\");\n $uploadObj->setDbFieldName(\"imagem\");\n $uploadObj->setFolder(\"../up/\");\n $uploadObj->setResize(\"true\", 500, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "fc4d65267af026682aa4145c1d6db35d", "score": "0.68828654", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto\");\n $uploadObj->setDbFieldName(\"foto\");\n $uploadObj->setFolder(\"../../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "e45160ed71571753711db38fbc9966c2", "score": "0.6871591", "text": "function Trigger_ImageUpload(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo1\");\r\r\n $uploadObj->setDbFieldName(\"photo1\");\r\r\n $uploadObj->setFolder(\"assets/images/produits/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "title": "" }, { "docid": "de5a9d03f374db529391f9bb6e0456ce", "score": "0.6871384", "text": "function img_upload()\n {\n }", "title": "" }, { "docid": "c0bb46224c88fb4c5312672083f7b71c", "score": "0.6869994", "text": "public function testImagesCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "1361da57092eb90c697741fd804ef6b8", "score": "0.6869558", "text": "function Trigger_ImageUpload1(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto1\");\n $uploadObj->setDbFieldName(\"foto1\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "b68ff889aee1c65787bacfb40e8dcf6e", "score": "0.68566394", "text": "public function getImageUpload()\n {\n $this->imageFile = UploadedFile::getInstance($this, 'imageFile');\n if($this->imageFile){\n if(!$this->isNewRecord)\n $this->tmp_imageUpdate = $this->gambar;\n $this->gambar = $this->getNewNameFile($this->imageFile);\n }\n }", "title": "" }, { "docid": "9657c9a409b18d98a3e6bfc33ef7cbb3", "score": "0.6837782", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto\");\n $uploadObj->setDbFieldName(\"foto\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 500, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "a0bc0ca533185a324df835c7f8c9490a", "score": "0.6812084", "text": "function Trigger_ImageUpload1(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo2\");\r\r\n $uploadObj->setDbFieldName(\"photo2\");\r\r\n $uploadObj->setFolder(\"assets/images/produits/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "title": "" }, { "docid": "da9feec384bda5a5e823290180c21559", "score": "0.6773777", "text": "public function uploadActionImage()\n {\n if ($this->request->hasFiles() == true) {\n $baseLocation = 'files/';\n\n // Print the real file names and sizes\n foreach ($this->request->getUploadedFiles() as $file) {\n $photos = new Photo(); \n $photos->name = $file->getName();\n $photos->size = $file->getSize();\n $photos->save();\n\n //Move the file into the application\n $file->moveTo($baseLocation . $file->getName());\n }\n }\n }", "title": "" }, { "docid": "8394a4838f97bf0bc96ada84cdac82a4", "score": "0.6759883", "text": "function Trigger_ImageUpload2(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto1\");\n $uploadObj->setDbFieldName(\"foto1\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "2a1726e76d4e18b721540a36d65433d1", "score": "0.6755998", "text": "public function test_postPrototypeUpdateImage() {\n\n }", "title": "" }, { "docid": "016d9ac2e5473d50d63943c2a716400b", "score": "0.6752567", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"fotoDestaque\");\n $uploadObj->setDbFieldName(\"fotoDestaque\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 400, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "9bfb3fa54b9db77c20830265b78e898f", "score": "0.6724284", "text": "function Trigger_ImageUpload2(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"gif_nome\");\n $uploadObj->setDbFieldName(\"gif_nome\");\n $uploadObj->setFolder(\"../../Uploads/fotos/\");\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "15d282dffc0e8e18cf200d368e48387d", "score": "0.6724155", "text": "function Trigger_ImageUpload2(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo3\");\r\r\n $uploadObj->setDbFieldName(\"photo3\");\r\r\n $uploadObj->setFolder(\"assets/images/produits/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "title": "" }, { "docid": "eed6bd62780f3e9bbd76e7efd31f8208", "score": "0.6711182", "text": "public function test_create_image_tag()\n {\n $data = Image::create([\n 'name' => UploadedFile::fake()->image('avatar.jpg'),\n 'path' => UploadedFile::fake()->image('avatar.jpg')->path(),\n 'user_id' => $this->user->id,\n 'visibility' => 1,\n 'category' => 'Men'\n ]);\n\n $response = $this->actingAs($this->user)\n ->json('POST', route('image.tag.add', $data->id), [\n 'coords' => \"10,10,60,105\",\n 'label' => 'Bag',\n 'description' => 'Unisex bags'\n ]);\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "615704248e8a1e9cb73d7a2a4d49eb04", "score": "0.66982895", "text": "function Trigger_ImageUpload4(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto3\");\n $uploadObj->setDbFieldName(\"foto3\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "42a1a768a0d91ecbc44b463507a8c52a", "score": "0.66964376", "text": "function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"i_imagem\");\n $uploadObj->setDbFieldName(\"i_imagem\");\n $uploadObj->setFolder(\"../images/instalacoes/\");\n $uploadObj->setResize(\"true\", 200, 140);\n $uploadObj->setMaxSize(5500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"{i_id}.{KT_ext}\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "d6727d2283bfcd287e80c236c0142912", "score": "0.66717464", "text": "function Trigger_ImageUpload2(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto2\");\n $uploadObj->setDbFieldName(\"foto2\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "95daf0f30d70228214f11a8041f040ef", "score": "0.6656197", "text": "public function testImageFail()\n {\n $this->auth(2);\n\n // Unique\n $response = $this->post('/image');\n $response->assertSessionHasErrors(['image', 'category_id']);\n\n // Image\n $response = $this->post('/image', [\n 'image' => 'texte',\n ]);\n $response->assertSessionHasErrors('image');\n\n // Max\n $response = $this->post('/image', [\n 'image' => UploadedFile::fake()->image('paysage.jpg')->size(2001),\n 'description' => str_random(256),\n ]);\n $response->assertSessionHasErrors(['image', 'description']);\n\n // Exists\n $response = $this->post('/image', [\n 'category_id' => 10,\n ]);\n $response->assertSessionHasErrors('category_id');\n }", "title": "" }, { "docid": "18d8df03243415b529f942364b36c836", "score": "0.6639438", "text": "public function test_postPrototypeCreateImage() {\n\n }", "title": "" }, { "docid": "6038038414e5c51624905f16a85d2b6a", "score": "0.66331", "text": "function Trigger_ImageUpload4(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto4\");\n $uploadObj->setDbFieldName(\"foto4\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "143e1a6ebb591d7bf9fd6502bb97984b", "score": "0.66112643", "text": "function Trigger_ImageUpload3(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto2\");\n $uploadObj->setDbFieldName(\"foto2\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "ab8e02aca7cb241e0d2f17b2c98b925c", "score": "0.65715206", "text": "public function testGetSetImageFullPath() \n\t{\n\t $this->assertEquals($this->testImage, $this->obj->getImageFullPath());\n\t}", "title": "" }, { "docid": "34684b9770ddf67f1181e890a605d9dd", "score": "0.65639955", "text": "function uploadImage($folder, $image)\n{\n $image->store('/', $folder);\n return $filename = $image->hashName();\n\n}", "title": "" }, { "docid": "cc3b045f1d0066cad3b0040fe72a5e6c", "score": "0.6540243", "text": "function Trigger_ImageUpload5(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto4\");\n $uploadObj->setDbFieldName(\"foto4\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "c35cf54d4f113b9165c1b75606205e90", "score": "0.6529705", "text": "public function uploadImage()\n\t{\n\t\tif (null === $this->getImage()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// use the original file name here but you should\n\t\t// sanitize it at least to avoid any security issues\n\n\t\t// move takes the target directory and then the\n\t\t// target filename to move to\n\t\t//die();\n\t\t$this->getImage()->move(\n\t\t\t$this->getUploadRootDir(),\n\t\t\t$this->getImage()->getClientOriginalName()\n\t\t);\n\n\t\t// set the path property to the filename where you've saved the file\n\t\t$this->image = $this->getImage()->getClientOriginalName();\n\n\n\t\t// clean up the file property as you won't need it anymore\n\t\t//$this->image = null;\n\t}", "title": "" }, { "docid": "010828048b0f4d824c68ea25f5d67300", "score": "0.64987665", "text": "public function test_profilePrototypeUpdateImage() {\n\n }", "title": "" }, { "docid": "f6b1257b8318de6a588c8fbd78f55e38", "score": "0.6484982", "text": "function imageUpload() {\n // echo 'test';exit;\n $arg['script_url'] = url('sposts/image/upload');\n $upload_handler = new UploadHandler($arg);\n }", "title": "" }, { "docid": "bfadde2c10cbfa62f0723fb08bc9190f", "score": "0.6476355", "text": "private function uploadImage(){\n\t\t// of $_FILES.\n\t\tif(!empty($_FILES)){\n\t\t\tif(filesize($_FILES['avatar']['tmp_name']) <= 512000){\n\t\t\t\t$uploaddir = '/images/avatars/';\n\t\t\t\t$uploadfile = $uploaddir.\"avatar_\". basename(substr($this->m_sEmail,0,7)).substr($_FILES['avatar']['name'],strpos($_FILES['avatar']['name'],\".\"));\n\t\t\t\tdefine ('SITE_ROOT', realpath(dirname(substr($this->m_sEmail,0,7))));\n\t\t\t\tif (!move_uploaded_file($_FILES['avatar']['tmp_name'], SITE_ROOT.$uploadfile)) {\n\t\t\t\t\tthrow new Exception(\"Avatar mag niet groter zijn dan 500KB.\");\n\t\t\t\t}else{\n\t\t\t\t\t$this->m_sAvatar = \"avatar_\". basename(substr($this->m_sEmail,0,7)).substr($_FILES['avatar']['name'],strpos($_FILES['avatar']['name'],\".\"));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthrow new Exception(\"Avatar mag niet groter zijn dan 500KB.\");\n\t\t\t}\n\t}\n}", "title": "" }, { "docid": "858f02f2211d70450f900bf037f58f97", "score": "0.6475186", "text": "function Trigger_ImageUpload5(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto5\");\n $uploadObj->setDbFieldName(\"foto5\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "26255964514affc3460f9f416436961a", "score": "0.64678323", "text": "public function testSecurimageAction() {\n // $img->show();\n\n // $this->status->ajaxReturn($result['code'], $result);\n }", "title": "" }, { "docid": "24757e7e3174989665a526e66c4ccd71", "score": "0.6457592", "text": "function Trigger_ImageUpload3(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto3\");\n $uploadObj->setDbFieldName(\"foto3\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "1c44c119a31f7515f23d741c65e97a01", "score": "0.6445629", "text": "public function testWidgetUpload() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n $driver = $this->getSession()->getDriver();\n\n foreach ($this->getTestFiles('image') as $image) {\n $extension = pathinfo($image->filename, PATHINFO_EXTENSION);\n if ($extension === 'png') {\n $png_image = $image;\n }\n elseif ($extension === 'jpg') {\n $jpg_image = $image;\n }\n }\n\n if (!isset($png_image) || !isset($jpg_image)) {\n $this->fail('Expected test files not present.');\n }\n\n // Create a user that can only add media of type four.\n $user = $this->drupalCreateUser([\n 'access administration pages',\n 'access content',\n 'create basic_page content',\n 'create type_one media',\n 'create type_four media',\n 'view media',\n ]);\n $this->drupalLogin($user);\n\n // Visit a node create page and open the media library.\n $this->drupalGet('node/add/basic_page');\n $this->openMediaLibraryForField('field_twin_media');\n\n // Assert the upload form is not visible for default tab type_three without\n // the proper permissions.\n $assert_session->elementNotExists('css', '.js-media-library-add-form');\n\n // Assert the upload form is not visible for the non-file based media type\n // type_one.\n $this->switchToMediaType('One');\n $assert_session->elementNotExists('css', '.js-media-library-add-form');\n\n // Assert the upload form is visible for type_four.\n $this->switchToMediaType('Four');\n $assert_session->fieldExists('Add files');\n $assert_session->pageTextContains('Maximum 2 files.');\n\n // Create a user that can create media for all media types.\n $user = $this->drupalCreateUser([\n 'access administration pages',\n 'access content',\n 'create basic_page content',\n 'create media',\n 'view media',\n ]);\n $this->drupalLogin($user);\n\n // Visit a node create page.\n $this->drupalGet('node/add/basic_page');\n\n $file_storage = $this->container->get('entity_type.manager')->getStorage('file');\n /** @var \\Drupal\\Core\\File\\FileSystemInterface $file_system */\n $file_system = $this->container->get('file_system');\n\n // Add to the twin media field.\n $this->openMediaLibraryForField('field_twin_media');\n\n // Assert the upload form is now visible for default tab type_three.\n $assert_session->elementExists('css', '.js-media-library-add-form');\n $assert_session->fieldExists('Add files');\n\n // Assert we can upload a file to the default tab type_three.\n $assert_session->elementNotExists('css', '.js-media-library-add-form[data-input]');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_image->uri));\n $this->assertMediaAdded();\n $assert_session->elementExists('css', '.js-media-library-add-form[data-input]');\n // We do not have pre-selected items, so the container should not be added\n // to the form.\n $assert_session->pageTextNotContains('Additional selected media');\n // Files are temporary until the form is saved.\n $files = $file_storage->loadMultiple();\n $file = array_pop($files);\n $this->assertSame('public://type-three-dir', $file_system->dirname($file->getFileUri()));\n $this->assertTrue($file->isTemporary());\n // Assert the revision_log_message field is not shown.\n $upload_form = $assert_session->elementExists('css', '.js-media-library-add-form');\n $assert_session->fieldNotExists('Revision log message', $upload_form);\n // Assert the name field contains the filename and the alt text is required.\n $assert_session->fieldValueEquals('Name', $png_image->filename);\n $this->pressSaveButton(TRUE);\n $this->waitForText('Alternative text field is required');\n $page->fillField('Alternative text', $this->randomString());\n $this->pressSaveButton();\n $this->assertJsCondition('jQuery(\"input[name=\\'media_library_select_form[0]\\']\").is(\":focus\")');\n // The file should be permanent now.\n $files = $file_storage->loadMultiple();\n $file = array_pop($files);\n $this->assertFalse($file->isTemporary());\n // Load the created media item.\n $media_items = Media::loadMultiple();\n $added_media = array_pop($media_items);\n // Ensure the media item was saved to the library and automatically\n // selected. The added media items should be in the first position of the\n // add form.\n $assert_session->pageTextContains('Add or select media');\n $assert_session->pageTextContains($png_image->filename);\n $assert_session->fieldValueEquals('media_library_select_form[0]', $added_media->id());\n $assert_session->checkboxChecked('media_library_select_form[0]');\n $assert_session->pageTextContains('1 of 2 items selected');\n $assert_session->hiddenFieldValueEquals('current_selection', $added_media->id());\n // Ensure the created item is added in the widget.\n $this->pressInsertSelected('Added one media item.');\n $this->waitForText($png_image->filename);\n\n // Remove the item.\n $assert_session->elementExists('css', '.field--name-field-twin-media')->pressButton('Remove');\n $this->waitForNoText($png_image->filename);\n\n $this->openMediaLibraryForField('field_twin_media');\n $this->switchToMediaType('Three');\n $png_uri_2 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_2));\n $this->waitForFieldExists('Alternative text')->setValue($this->randomString());\n $this->pressSaveButton();\n $this->pressInsertSelected('Added one media item.');\n $this->waitForText($file_system->basename($png_uri_2));\n\n // Also make sure that we can upload to the unlimited cardinality field.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n\n // Select a media item to check if the selection is persisted when adding\n // new items.\n $existing_media_name = $file_system->basename($png_uri_2);\n $checkbox = $page->findField(\"Select $existing_media_name\");\n $selected_item_id = $checkbox->getAttribute('value');\n $checkbox->click();\n $assert_session->pageTextContains('1 item selected');\n $assert_session->hiddenFieldValueEquals('current_selection', $selected_item_id);\n $png_uri_3 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_3));\n $this->waitForText('The media item has been created but has not yet been saved.');\n $page->fillField('Name', 'Unlimited Cardinality Image');\n $page->fillField('Alternative text', $this->randomString());\n $this->pressSaveButton();\n // Load the created media item.\n $media_items = Media::loadMultiple();\n $added_media = array_pop($media_items);\n $added_media_name = $added_media->label();\n // Ensure the media item was saved to the library and automatically\n // selected. The added media items should be in the first position of the\n // add form.\n $assert_session->pageTextContains('Add or select media');\n $assert_session->pageTextContains('Unlimited Cardinality Image');\n $assert_session->fieldValueEquals('media_library_select_form[0]', $added_media->id());\n $assert_session->checkboxChecked('media_library_select_form[0]');\n // Assert the item that was selected before uploading the file is still\n // selected.\n $assert_session->pageTextContains('2 items selected');\n $assert_session->checkboxChecked(\"Select $added_media_name\");\n $assert_session->checkboxChecked(\"Select $existing_media_name\");\n $assert_session->hiddenFieldValueEquals('current_selection', implode(',', [$selected_item_id, $added_media->id()]));\n $selected_checkboxes = [];\n foreach ($this->getCheckboxes() as $checkbox) {\n if ($checkbox->isChecked()) {\n $selected_checkboxes[] = $checkbox->getAttribute('value');\n }\n }\n $this->assertCount(2, $selected_checkboxes);\n // Ensure the created item is added in the widget.\n $this->pressInsertSelected('Added 2 media items.');\n $this->waitForText('Unlimited Cardinality Image');\n\n // Assert we can now only upload one more media item.\n $this->openMediaLibraryForField('field_twin_media');\n $this->switchToMediaType('Four');\n $this->assertFalse($assert_session->fieldExists('Add file')->hasAttribute('multiple'));\n $assert_session->pageTextContains('One file only.');\n\n // Assert media type four should only allow jpg files by trying a png file\n // first.\n $png_uri_4 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add file', $file_system->realpath($png_uri_4), FALSE);\n $this->waitForText('Only files with the following extensions are allowed');\n // Assert that jpg files are accepted by type four.\n $jpg_uri_2 = $file_system->copy($jpg_image->uri, 'public://');\n $this->addMediaFileToField('Add file', $file_system->realpath($jpg_uri_2));\n $this->waitForFieldExists('Alternative text')->setValue($this->randomString());\n // The type_four media type has another optional image field.\n $assert_session->pageTextContains('Extra Image');\n $jpg_uri_3 = $file_system->copy($jpg_image->uri, 'public://');\n $this->addMediaFileToField('Extra Image', $this->container->get('file_system')->realpath($jpg_uri_3));\n $this->waitForText($file_system->basename($jpg_uri_3));\n // Ensure that the extra image was uploaded to the correct directory.\n $files = $file_storage->loadMultiple();\n $file = array_pop($files);\n $this->assertSame('public://type-four-extra-dir', $file_system->dirname($file->getFileUri()));\n $this->pressSaveButton();\n // Ensure the media item was saved to the library and automatically\n // selected.\n $this->waitForText('Add or select media');\n $this->waitForText($file_system->basename($jpg_uri_2));\n // Ensure the created item is added in the widget.\n $this->pressInsertSelected('Added one media item.');\n $assert_session->pageTextContains($file_system->basename($jpg_uri_2));\n\n // Assert we can also remove selected items from the selection area in the\n // upload form.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n $checkbox = $page->findField(\"Select $existing_media_name\");\n $selected_item_id = $checkbox->getAttribute('value');\n $checkbox->click();\n $assert_session->hiddenFieldValueEquals('current_selection', $selected_item_id);\n $this->assertTrue($assert_session->fieldExists('Add files')->hasAttribute('multiple'));\n $png_uri_5 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_5));\n // assertWaitOnAjaxRequest() required for input \"id\" attributes to\n // consistently match their label's \"for\" attribute.\n $assert_session->assertWaitOnAjaxRequest();\n $page->fillField('Alternative text', $this->randomString());\n $this->pressSaveButton();\n $page->uncheckField('media_library_select_form[2]');\n $this->waitForText('1 item selected');\n $this->waitForText(\"Select $existing_media_name\");\n $media_items = Media::loadMultiple();\n $added_media = array_pop($media_items);\n $added_media_name = $added_media->label();\n $assert_session->pageTextContains('1 item selected');\n $assert_session->checkboxChecked(\"Select $added_media_name\");\n $assert_session->checkboxNotChecked(\"Select $existing_media_name\");\n $assert_session->hiddenFieldValueEquals('current_selection', $added_media->id());\n $this->pressInsertSelected('Added one media item.');\n $this->waitForText($file_system->basename($png_uri_5));\n\n // Assert removing an uploaded media item before save works as expected.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_image->uri));\n // Assert the media item fields are shown and the vertical tabs are no\n // longer shown.\n $this->waitForFieldExists('Alternative text');\n $this->assertMediaAdded();\n // Press the 'Remove button' and assert the user is sent back to the media\n // library.\n $page->pressButton('media-0-remove-button');\n // Assert the remove message is shown.\n $this->waitForText(\"The media item $png_image->filename has been removed.\");\n // Assert the focus is shifted to the first tabbable element of the add\n // form, which should be the source field.\n $this->assertNoMediaAdded();\n $assert_session->elementExists('css', '.ui-dialog-titlebar-close')->click();\n\n // Assert uploading multiple files.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n // Assert the existing items are remembered when adding and removing media.\n $checkbox = $page->findField(\"Select $existing_media_name\");\n $checkbox->click();\n // Assert we can add multiple files.\n $this->assertTrue($assert_session->fieldExists('Add files')->hasAttribute('multiple'));\n // Create a list of new files to upload.\n $filenames = [];\n $remote_paths = [];\n foreach (range(1, 4) as $i) {\n $path = $file_system->copy($png_image->uri, 'public://');\n $filenames[] = $file_system->basename($path);\n $remote_paths[] = $driver->uploadFileAndGetRemoteFilePath($file_system->realpath($path));\n }\n $page->findField('Add files')->setValue(implode(\"\\n\", $remote_paths));\n // Assert the media item fields are shown and the vertical tabs are no\n // longer shown.\n $this->assertMediaAdded();\n // Assert all files have been added.\n $assert_session->fieldValueEquals('media[0][fields][name][0][value]', $filenames[0]);\n $assert_session->fieldValueEquals('media[1][fields][name][0][value]', $filenames[1]);\n $assert_session->fieldValueEquals('media[2][fields][name][0][value]', $filenames[2]);\n $assert_session->fieldValueEquals('media[3][fields][name][0][value]', $filenames[3]);\n // Set alt texts for items 1 and 2, leave the alt text empty for items 3\n // and 4 to assert the field validation does not stop users from removing\n // items.\n $page->fillField('media[0][fields][field_media_test_image][0][alt]', $filenames[0]);\n $page->fillField('media[1][fields][field_media_test_image][0][alt]', $filenames[1]);\n // Assert the file is available in the file storage.\n $files = $file_storage->loadByProperties(['filename' => $filenames[1]]);\n $this->assertCount(1, $files);\n $file_1_uri = reset($files)->getFileUri();\n // Remove the second file and assert the focus is shifted to the container\n // of the next media item and field values are still correct.\n $page->pressButton('media-1-remove-button');\n $this->assertTrue($assert_session->waitForText('The media item ' . $filenames[1] . ' has been removed.'));\n $this->assertJsCondition('jQuery(\"[data-media-library-added-delta=2]\").is(\":focus\")');\n // Assert the file was deleted.\n $this->assertEmpty($file_storage->loadByProperties(['filename' => $filenames[1]]));\n $this->assertFileDoesNotExist($file_1_uri);\n\n // When a file is already in usage, it should not be deleted. To test,\n // let's add a usage for $filenames[3] (now in the third position).\n $files = $file_storage->loadByProperties(['filename' => $filenames[3]]);\n $this->assertCount(1, $files);\n $target_file = reset($files);\n Media::create([\n 'bundle' => 'type_three',\n 'name' => 'Disturbing',\n 'field_media_test_image' => [\n ['target_id' => $target_file->id()],\n ],\n ])->save();\n // Remove $filenames[3] (now in the third position) and assert the focus is\n // shifted to the container of the previous media item and field values are\n // still correct.\n $page->pressButton('media-3-remove-button');\n $this->assertTrue($assert_session->waitForText('The media item ' . $filenames[3] . ' has been removed.'));\n // Assert the file was not deleted, due to being in use elsewhere.\n $this->assertNotEmpty($file_storage->loadByProperties(['filename' => $filenames[3]]));\n $this->assertFileExists($target_file->getFileUri());\n\n // The second media item should be removed (this has the delta 1 since we\n // start counting from 0).\n $assert_session->elementNotExists('css', '[data-media-library-added-delta=1]');\n $media_item_one = $assert_session->elementExists('css', '[data-media-library-added-delta=0]');\n $assert_session->fieldValueEquals('Name', $filenames[0], $media_item_one);\n $assert_session->fieldValueEquals('Alternative text', $filenames[0], $media_item_one);\n $media_item_three = $assert_session->elementExists('css', '[data-media-library-added-delta=2]');\n $assert_session->fieldValueEquals('Name', $filenames[2], $media_item_three);\n $assert_session->fieldValueEquals('Alternative text', '', $media_item_three);\n }", "title": "" }, { "docid": "5535d8c37fa12df6a589a5a1ed9f8287", "score": "0.64451814", "text": "public function testUploadFromFile()\n {\n $config = require 'src/app/config.php';\n\n $storage = new StorageFacade(1, $config['storages']['1']);\n $result = $storage->uploadFromFile($this->files);\n\n $this->assertInstanceOf(Result::class, $result[0], 'Returned object is instance of \\AWS\\Reslut class');\n }", "title": "" }, { "docid": "dbf9403fe7832023ac99baf011336a3a", "score": "0.6442402", "text": "public function testUploadAll(){\n\t\t// $f = new Filemanager($extra);\n\t\t// $path = '/';\n\t\t// $files = array();\n\t\t// $p = __DIR__ .'/_data/Koala.jpg';\n\t\t// $files[] = new UploadedFile($p,'Koala.jpg','image/jpg',filesize($p));\n\t\t// $files[] = new UploadedFile($p,'Koala.jpg','image/jpg',filesize($p));\n\t\t// $r = $f->uploadAll($files,$path);\n\t\t// var_dump($r);\n\t\t// var_dump($files[0]);\t\t\n\n\t}", "title": "" }, { "docid": "c9a032cbc4de3d002588b7d2fedc9fda", "score": "0.6437217", "text": "public function uploadImage() {\n if (null === $this->image) {\n return;\n }\n\n if (!$this->id) {\n $this->image->move($this->getTmpUploadRootDir(), $this->image->getClientOriginalName());\n } else {\n $this->image->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n }\n $this->setImage($this->image->getClientOriginalName());\n }", "title": "" }, { "docid": "344ad76e5d5313b312fd48b59f43b297", "score": "0.6431518", "text": "public function testUpload()\n {\n $user = \\factory(User::class)->create();\n $file = UploadedFile::fake()->create('song.mp3', 7000);\n\n $this->actingAs($user)->post('songs', [\n \"song\" => $file\n ])->assertSeeText('metadata');\n }", "title": "" }, { "docid": "06f6216e1371d16828e8b2f008116594", "score": "0.6427026", "text": "function upload()\n{\n $uploader = new Uploader(\"image-data\"); // creating new Uploader class' object\n $uploader->saveIn(\"img\"); // setting 'img' as the folder name\n $fileUploaded = $uploader->save(); // attempting to save\n if($fileUploaded)\n {\n $out = \"<h1>File Uploaded successfully</h1>\";\n }\n else\n $out = \"<h1>Something went wrong</h1>\";\n return $out;\n}", "title": "" }, { "docid": "b994945516ff0a99b2a3a4d17529ea95", "score": "0.6418073", "text": "private function _handle_image_upload()\n\t{\n\n\t\t// load upload library\n\t\t$config = array('upload_path' => './uploads/item_pics/',\n\t\t\t'allowed_types' => 'gif|jpg|png',\n\t\t\t'max_size' => '100',\n\t\t\t'max_width' => '640',\n\t\t\t'max_height' => '480'\n\t\t);\n\t\t$this->load->library('upload', $config);\n\t\t$this->upload->do_upload('item_image');\n\n\t\treturn strlen($this->upload->display_errors()) == 0 || !strcmp($this->upload->display_errors(), '<p>'.$this->lang->line('upload_no_file_selected').'</p>');\n\t}", "title": "" }, { "docid": "9068113d0dd79237f568cbcf71454138", "score": "0.640626", "text": "function Trigger_ImageUpload6(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto6\");\n $uploadObj->setDbFieldName(\"foto6\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}", "title": "" }, { "docid": "221abd4b938dbafa1c0eec7e17b39e0d", "score": "0.64047205", "text": "public function testAdminGalleryAlbumPhotoUpdateTest()\n {\n \t$user = factory(User::class, 'admin')->create();\n \t$gallery = factory(Gallery::class)->create();\n $user->galleries()->save($gallery);\n $album = factory(Album::class)->create();\n $user->albums()->save($album);\n $gallery->albums()->save($album);\n\n $file = $this->prepareFileUpload('public/upload/test.png');\n\n $this->actingAs($user);\n\t $this->call('POST', route('admin.gallery.album.photo.store', ['gallery' => $gallery->id, 'album' => $album->id]), [], [], ['file' => $file], []);\n \t$this->assertResponseOk();\n\n $photo = \\App\\Photo::find(1);\n\n $this->visit(route('admin.gallery.album.photo.edit', ['gallery' => $gallery->id, 'album' => $album->id, 'photo' => $photo->id]))\n ->type('Testing Title', 'title')\n ->type('Testing Description', 'description')\n ->press('Update');\n }", "title": "" }, { "docid": "cf19bf2c19fed3ed1040f71372570772", "score": "0.6393064", "text": "function image_upload(){\r\n\t\tif ($_FILES['location_image']['size'] > 0 ) {\t\r\n\t\t \tif( !file_exists(ABSPATH.EM_IMAGE_UPLOAD_DIR) ){\r\n\t\t\t\tmkdir(ABSPATH.EM_IMAGE_UPLOAD_DIR, 0777);\r\n\t\t \t}\r\n\t\t\t$this->image_delete(); \r\n\t\t\tlist($width, $height, $type, $attr) = getimagesize($_FILES['location_image']['tmp_name']);\r\n\t\t\t$image_path = ABSPATH.EM_IMAGE_UPLOAD_DIR.\"/location-\".$this->id.\".\".$this->mime_types[$type];\r\n\t\t\tif (!move_uploaded_file($_FILES['location_image']['tmp_name'], $image_path)){\r\n\t\t\t\t$this->errors = __('The image could not be loaded','dbem');\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "cafe51238b84cf99086b95c02732bc5f", "score": "0.639273", "text": "public function testLoadImageFromUploadedFileObject()\n\t{\n\t\t$file = $this->getFile();\n\t\t\n\t\t$wam_file = $this->wam->load($file);\n\n\t\t$this->assertInstanceOf('Wam\\ImageBundle\\Image\\SourceImage', $wam_file);\n\n\t\t$params = $wam_file->getParams();\n\n\t\t$this->assertEquals('logo.jpg', $params['name']);\n\t\t$this->assertEquals('image/jpeg', $params['mime']);\n\t\t$this->assertEquals(__DIR__ . '/../../tmp/files/logo.jpg', $params['path']);\n\n\t\tcopy($wam_file->getTmpPath(), $wam_file->getRootPath());\n\t\tchmod($wam_file->getRootPath(), 0777);\n\t}", "title": "" }, { "docid": "5d16b86c590e6409d1fd4474e3aa6124", "score": "0.63871765", "text": "public function uploadMoreAdPhoto(){\n $this->page()\n ->findAndAssertThat()\n ->existsOnlyOnce()\n ->elementWithCss(self::ELEMENT_IMG_INPUT_UPLOAD_CSS)\n ->sendKeys(self::STRING_IMG_2_LOCATION);\n }", "title": "" }, { "docid": "a50d095b5b9c8e0e54dfa46e09bf3755", "score": "0.6382805", "text": "public static function uploadImageBlob()\n\t{\n\t\treturn self::forwardImageUploadCall(__FUNCTION__, func_get_args());\n\t}", "title": "" }, { "docid": "c0e6e459776e70273fb7072c49dec096", "score": "0.63761735", "text": "public function testAddNewClientImage2()\n {\n }", "title": "" }, { "docid": "086d3bd77b0d98459b20ab6b3ce2f6e2", "score": "0.63760746", "text": "public function uploadToTmp($imageUploader);", "title": "" }, { "docid": "d2fd38539aa34a23ff2608d70c9680cb", "score": "0.63668495", "text": "function Trigger_FileUpload(&$tNG) {\r\r\n $uploadObj = new tNG_FileUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"prod_imagem\");\r\r\n $uploadObj->setDbFieldName(\"prod_imagem\");\r\r\n $uploadObj->setFolder(\"{prod_id}/\");\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"pdf, txt, png, jpg\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}", "title": "" }, { "docid": "83c123f0b36bcb6737910d48d8bb8978", "score": "0.6363785", "text": "public function testUploadSingleFile()\n {\n // Sube un archivo como fake\n Storage::fake('public');\n $response = $this->json('POST', '/api/uploadfile', [\n 'file' => UploadedFile::fake()->image('avatar.jpg'),\n ]);\n\n $response->assertStatus(200);\n $response->assertJsonStructure(['name', 'mime', 'path', 'url']);\n $json = $response->json();\n\n // Assertion: El archivo fue cargado\n Storage::disk('public')->assertExists($json['path']);\n }", "title": "" }, { "docid": "0d3c1cfa7b52e244118a7ca2b783505f", "score": "0.6363597", "text": "function checkImage() {\n\t\tif($this->tmp_file[\"tmp_name\"]) {\n\t\t\t$check = getimagesize($this->tmp_file[\"tmp_name\"]);\n\t\t\tif($check !== false) {\n\t\t\t\t$this->uploadOk = 1;\n\t\t\t} else {\n\t\t\t\t$this->errorStatus = \"File is not an image.\";\n\t\t\t\t$this->uploadOk = 0;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "23e189699ebf07509075e6074523a00c", "score": "0.6363246", "text": "public function test_profilePrototypeGetImage() {\n\n }", "title": "" }, { "docid": "274c3cc7a3dd4dd6ca681360ce9aa44b", "score": "0.6354843", "text": "public function testImagesAddPreview()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "add3763ecf7604cabe2116c7840cecb8", "score": "0.63478345", "text": "function upload_img($file){\n\n }", "title": "" }, { "docid": "7f89f886997853b11966ad0b98d5b260", "score": "0.63375115", "text": "public function testImagesCopy()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "09a8cc6dd9814beb55c11f9dba78dea9", "score": "0.63356274", "text": "public function testDeleteClientImage1()\n {\n }", "title": "" }, { "docid": "18b91fd8cffe0cd3e715b5600fdd737f", "score": "0.6333932", "text": "public function testDeleteOptionSetImage()\n {\n }", "title": "" }, { "docid": "a07786e3a1cba1233c53856d18a9470d", "score": "0.633185", "text": "public function testFormStore()\n {\n Storage::fake('avatars');\n $file = UploadedFile::fake()->image('avatar.jpg');\n $data = [\n 'title'=>'test',\n 'description'=>'test des',\n 'file'=> $file,\n 'tags'=>[1, 2]\n ];\n $response = $this->post('/forms/create', $data);\n $response->assertRedirect();\n\n }", "title": "" }, { "docid": "3c0574cd149ce8c2ff717e850468810d", "score": "0.63315517", "text": "public function test_user_can_upload_new_avatar()\n {\n $result = $this->avatarUploader->make();\n $this->assertInstanceOf(Model::class, $this->user);\n $this->assertTrue(is_string($result) && Storage::exists($result));\n $this->seeInDatabase($this->table, ['avatar' => $result]);\n\n $oldAvatar = $this->user->avatar;\n $newAvatar = $this->avatarUploader->make();\n $this->assertTrue(! empty($oldAvatar), 'Old avatar not found in database');\n $this->assertTrue(is_string($newAvatar) && Storage::exists($newAvatar));\n $this->seeInDatabase($this->table, ['id' => $this->user->id, 'avatar' => $newAvatar]);\n $this->assertNotTrue(Storage::exists($oldAvatar));\n }", "title": "" }, { "docid": "bf3c66e11f25bb276fb63fd8dba279be", "score": "0.6331071", "text": "public function uploadImageAction()\n {\n $this->setJsonResponse();\n if(!isset($_FILES['Upload']) || empty($_FILES['Upload']['tmp_name'])){\n return array('success' => false,\n 'message' => 'Failed to upload image');\n }\n $service = new ImageUploaderService();\n $return = $service->uploadImage();\n if($return===false){\n return array('success' => false,\n 'message' => 'Failed to upload image');\n }\n return array('filename' => $return,\n 'success' => true);\n }", "title": "" }, { "docid": "3fe370f22464dc330b1a1800714e7f27", "score": "0.63235337", "text": "public function getImageUpload()\n {\n return parent::getImageUpload();\n }", "title": "" }, { "docid": "8275df46d87e516641b42d166de2b1a7", "score": "0.63105017", "text": "function upload_image($id = null) {\n if (!is_numeric($id) || $id == null) {\n Modules::run('site_security/not_allowed');\n }\n Modules::run('site_security/_is_admin');\n\n $submit = $this->input->post('submit', TRUE);\n\n if ($submit == \"cancel\") {\n redirect('store_items/create/' . $id);\n }\n\n $data['page_headline'] = \"Upload Image\";\n $data['update_id'] = $id;\n $data['view_module'] = 'store_items';\n $data['view_file'] = \"upload_image\";\n\n echo Modules::run('templates/admin', $data);\n }", "title": "" }, { "docid": "88f3bb9fbeddd6053c83842c728c0199", "score": "0.63070935", "text": "function checkAndPrepareImage($formname, $key = \"we_document\")\n{\n\tif (isset($_FILES[\"we_ui_$formname\"]) && is_array($_FILES[\"we_ui_$formname\"])) {\n\t\t\n\t\t$webuserId = isset($_SESSION[\"webuser\"][\"ID\"]) ? $_SESSION[\"webuser\"][\"ID\"] : 0;\n\t\t\n\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/\" . \"we_classes/we_imageDocument.inc.php\");\n\t\tif (isset($_FILES[\"we_ui_$formname\"][\"name\"]) && is_array($_FILES[\"we_ui_$formname\"][\"name\"])) {\n\t\t\tforeach ($_FILES[\"we_ui_$formname\"][\"name\"] as $imgName => $filename) {\n\t\t\t\t\n\t\t\t\t$_imgDataId = isset($_REQUEST['WE_UI_IMG_DATA_ID_' . $imgName]) ? $_REQUEST['WE_UI_IMG_DATA_ID_' . $imgName] : false;\n\t\t\t\t\n\t\t\t\tif ($_imgDataId !== false && isset($_SESSION[$_imgDataId])) {\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION[$_imgDataId]['doDelete'] = false;\n\t\t\t\t\t\n\t\t\t\t\tif (isset($_REQUEST[\"WE_UI_DEL_CHECKBOX_\" . $imgName]) && $_REQUEST[\"WE_UI_DEL_CHECKBOX_\" . $imgName] == 1) {\n\t\t\t\t\t\t$_SESSION[$_imgDataId]['doDelete'] = true;\n\t\t\t\t\t} else \n\t\t\t\t\t\tif ($filename) {\n\t\t\t\t\t\t\t// file is selected, check to see if it is an image\n\t\t\t\t\t\t\t$ct = getContentTypeFromFile($filename);\n\t\t\t\t\t\t\tif ($ct == \"image/*\") {\n\t\t\t\t\t\t\t\t$imgId = abs($GLOBALS[$key][$formname]->getElement($imgName));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// move document from upload location to tmp dir\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"serverPath\"] = TMP_DIR . \"/\" . md5(\n\t\t\t\t\t\t\t\t\t\tuniqid(rand(), 1));\n\t\t\t\t\t\t\t\tmove_uploaded_file(\n\t\t\t\t\t\t\t\t\t\t$_FILES[\"we_ui_$formname\"][\"tmp_name\"][$imgName], \n\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"serverPath\"]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/we_classes/base/we_thumbnail.class.php\");\n\t\t\t\t\t\t\t\t$we_size = we_thumbnail::getimagesize($_SESSION[$_imgDataId][\"serverPath\"]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (count($we_size) == 0) {\n\t\t\t\t\t\t\t\t\tunset($_SESSION[$_imgDataId]);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$tmp_Filename = $imgName . \"_\" . md5(uniqid(rand(), 1)) . \"_\" . preg_replace(\n\t\t\t\t\t\t\t\t\t\t\"/[^A-Za-z0-9._-]/\", \n\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t$_FILES[\"we_ui_$formname\"][\"name\"][$imgName]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($imgId) {\n\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"id\"] = $imgId;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"fileName\"] = eregi_replace(\n\t\t\t\t\t\t\t\t\t\t'^(.+)\\..+$', \n\t\t\t\t\t\t\t\t\t\t\"\\\\1\", \n\t\t\t\t\t\t\t\t\t\t$tmp_Filename);\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"extension\"] = (strpos($tmp_Filename, \".\") > 0) ? eregi_replace(\n\t\t\t\t\t\t\t\t\t\t'^.+(\\..+)$', \n\t\t\t\t\t\t\t\t\t\t\"\\\\1\", \n\t\t\t\t\t\t\t\t\t\t$tmp_Filename) : \"\";\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"text\"] = $_SESSION[$_imgDataId][\"fileName\"] . $_SESSION[$_imgDataId][\"extension\"];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//image needs to be scaled\n\t\t\t\t\t\t\t\tif ((isset(\n\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"width\"]) && $_SESSION[$_imgDataId][\"width\"]) || (isset(\n\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"height\"]) && $_SESSION[$_imgDataId][\"height\"])) {\n\t\t\t\t\t\t\t\t\t$fh = fopen($_SESSION[$_imgDataId][\"serverPath\"], \"rb\");\n\t\t\t\t\t\t\t\t\t$imageData = fread($fh, filesize($_SESSION[$_imgDataId][\"serverPath\"]));\n\t\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t\t\t$thumb = new we_thumbnail();\n\t\t\t\t\t\t\t\t\t$thumb->init(\n\t\t\t\t\t\t\t\t\t\t\t\"dummy\", \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"width\"], \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"height\"], \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"keepratio\"], \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"maximize\"], \n\t\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\t\t'', \n\t\t\t\t\t\t\t\t\t\t\t\"dummy\", \n\t\t\t\t\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"extension\"], \n\t\t\t\t\t\t\t\t\t\t\t$we_size[0], \n\t\t\t\t\t\t\t\t\t\t\t$we_size[1], \n\t\t\t\t\t\t\t\t\t\t\t$imageData, \n\t\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"quality\"]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$imgData = \"\";\n\t\t\t\t\t\t\t\t\t$thumb->getThumb($imgData);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$fh = fopen($_SESSION[$_imgDataId][\"serverPath\"], \"wb\");\n\t\t\t\t\t\t\t\t\tfwrite($fh, $imgData);\n\t\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$we_size = we_thumbnail::getimagesize($_SESSION[$_imgDataId][\"serverPath\"]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"imgwidth\"] = $we_size[0];\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"imgheight\"] = $we_size[1];\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"type\"] = $_FILES[\"we_ui_$formname\"][\"type\"][$imgName];\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"size\"] = $_FILES[\"we_ui_$formname\"][\"size\"][$imgName];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "1096df07216db9789774c8dfb0f56708", "score": "0.63034546", "text": "public function testUpload() {\n // setup\n $file = tempnam(null, null);\n file_put_contents($file, 'sample text');\n $_FILES['test_file'] = array();\n $_FILES['test_file']['error'] = false;\n $_FILES['test_file']['name'] = \"testfile.txt\";\n $_FILES['test_file']['type'] = \"text/plain\";\n $_FILES['test_file']['tmp_name'] = $file;\n // test upload\n $expected = 'sample text';\n $f = new Representation(null, 'multipart/form-data');\n $f->receive();\n // test name\n $this->assertEquals('testfile.txt', $f->getData()->files->test_file->name);\n $this->assertEquals('text/plain', $f->getData()->files->test_file->type);\n $this->assertEquals('sample text', $f->getData()->files->test_file->contents);\n $this->assertEquals(strlen('sample text'), $f->getData()->files->test_file->size);\n // teardown\n unlink($file);\n }", "title": "" }, { "docid": "0e2580e5c39cf8b65fb95fee618f5305", "score": "0.63025755", "text": "function handelWithImageFile()\n {\n try {\n\n // Undefined | Multiple Files | $_FILES Corruption Attack\n // If this request falls under any of them, treat it invalid.\n if (\n !isset($_FILES['upfile']['error']) ||\n is_array($_FILES['upfile']['error'])\n ) {\n $this->erorr=true;\n throw new RuntimeException('Invalid Image file parameters.');\n \n }\n\n // Check $_FILES['upfile']['error'] value.\n switch ($_FILES['upfile']['error']) {\n case UPLOAD_ERR_OK:\n break;\n case UPLOAD_ERR_NO_FILE:\n throw new RuntimeException('No file sent.');\n case UPLOAD_ERR_INI_SIZE:\n case UPLOAD_ERR_FORM_SIZE:\n throw new RuntimeException('Exceeded filesize limit.');\n default:\n throw new RuntimeException('Unknown errors.');\n }\n\n // You should also check filesize here. \n if ($_FILES['upfile']['size'] > 1000000) {\n throw new RuntimeException('Exceeded filesize limit of the Image.');\n }\n\n // DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!\n // Check MIME Type by yourself.\n $finfo = new finfo(FILEINFO_MIME_TYPE);\n if (false === $ext = array_search(\n $finfo->file($_FILES['upfile']['tmp_name']),\n array(\n 'jpg' => 'image/jpeg',\n 'png' => 'image/png',\n 'gif' => 'image/gif',\n ),\n true\n )) {\n throw new RuntimeException('Invalid image file format.');\n }\n\n // You should name it uniquely.\n // DO NOT USE $_FILES['upfile']['name'] WITHOUT ANY VALIDATION !!\n // On this example, obtain safe unique name from its binary data.\n if(!$this->error)\n {\n //this is just to check if there is error perviously\n $fileName = sha1_file($_FILES['upfile']['tmp_name']);\n file_put_contents(\"test.txt\", $fileName);\n $fileParts = array($_POST['name'], $_POST['familyName'], $fileName);\n $fileNewName = implode(\"_\", $fileParts);\n $fileNewName = str_replace(\" \", \"_\", $fileNewName);\n if (!move_uploaded_file(\n $_FILES['upfile']['tmp_name'],\n sprintf(\n './uploads/%s.%s',\n $fileNewName,\n $ext\n )\n )) {\n throw new RuntimeException('Failed to move uploaded image file.');\n }\n // $_POST['name'];\n }\n\n } catch (RuntimeException $e) {\n $this->erorr = true;\n $this->errors[\"file\"] = $e->getMessage();\n $this->status = \"error\";\n $this->handelResponse = \"Image could not be uploaded.\";\n $this->message = $e->getMessage();\n }\n }", "title": "" }, { "docid": "f101ac51252ce7bc4fda026e30d382dd", "score": "0.6300739", "text": "function upload_image(){\n global $wpdb;\n if($_FILES['file'] != null){\n $uploadedfile = $_FILES['file'];\n $upload_overrides = ['test_form' => false ];\n $movefile = wp_handle_upload( $uploadedfile,$upload_overrides );\n if($movefile && ! isset($movefile['error'])){\n return $movefile['url'];\n }else{\n return $movefile['error'];\n }\n }else{\n return \"missing file.\";\n }\n }", "title": "" }, { "docid": "cfbfdf0fc6c1edba624bd023921955a7", "score": "0.6290498", "text": "function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'withdraw_upload';\n $data['ret_Url'] = 'withdraw_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "57e552e0e9599cacfccae25dcde4eb55", "score": "0.6287532", "text": "public function testGetImageInfo()\n\t{\n\t $info = $this->obj->getImageInfo();\n\t\n\t $this->assertEquals($info['extension'], 'jpg');\n\t $this->assertEquals($info['height'], 406);\n\t $this->assertEquals($info['width'], 960);\n\t $this->assertEquals($info['mime'], 'image/jpeg');\n\t $this->assertEquals($info['channels'], 3);\n\t $this->assertEquals($info['bits'], 8);\n\t $this->assertEquals($info['filename'], 'berserkTest');\n\t $this->assertEquals($info['basename'], 'berserkTest.jpg');\n\t $this->assertEquals($info['dirname'], realpath('./data'));\n\t}", "title": "" }, { "docid": "82b19717f7d766f8eb92680fbbb64df9", "score": "0.6284364", "text": "public function uploadImage() {\n // get the uploaded file instance. for multiple file uploads\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstance($this, 'image');\n\n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n\n // store the source file name\n $this->filename = $image->name;\n $ext = end((explode(\".\", $image->name)));\n\n // generate a unique file name\n $this->file = Yii::$app->security->generateRandomString().\".{$ext}\";\n\n // the uploaded image instance\n return $image;\n }", "title": "" }, { "docid": "14ea5d9a7f97081df11fda9ef0c111b2", "score": "0.62815636", "text": "private function upload_image()\r\n {\r\n // Set upload preferences\r\n $config['upload_path'] = FCPATH . '/uploads/';\r\n $config['max_size'] = 4096; // KB\r\n $config['allowed_types'] = 'gif|jpg|png';\r\n\r\n // Load upload library\r\n $this->load->library('upload', $config);\r\n\r\n // Attempt upload\r\n if($this->upload->do_upload('upload-file') == false)\r\n {\r\n // Something went wrong\r\n $this->data['upload_errors'] = $this->upload->display_errors();\r\n }\r\n else\r\n {\r\n // Upload success\r\n $this->data['upload_errors'] = \"<h1>SUCCESS</h1>\";\r\n }\r\n }", "title": "" }, { "docid": "6c2fb977aaf0f8f8c538841fbcf42210", "score": "0.6260722", "text": "public function upload()\n {\n if (null === $this->getImage()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getImage()->move(\n $this->getUploadRootDir(),\n $this->getImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->image = $this->getUploadDir() . '/' . $this->getImage()->getClientOriginalName();\n }", "title": "" }, { "docid": "c0f5fa69ffd4e81ef5d4e8a05b9f3510", "score": "0.6257407", "text": "public function testFileUpload($data='') {\n if (isset($_POST[\"data\"]) && ($_POST[\"data\"] !=\"\")){\n $data = $_POST[\"data\"];\n $data = base64_decode($data);\n $im = imagecreatefromstring($data);\n }\n //make a file name\n $filename = \"test\";\n\n //save the image to the disk\n if (isset($im) && $im != false) {\n $imgFile = $path = realpath('.').\"/media/csimages/\".$filename.\".jpg\";\n\n //delete the file if it already exists\n if(file_exists($imgFile)){\n unlink($imgFile);\n }\n\n $result = imagepng($im, $imgFile);\n imagedestroy($im);\n return \"/\".$filename.\".jpg\";\n }\n else {\n return 'Error';\n }\n }", "title": "" }, { "docid": "7a3538ae4491db77738e798d78f10ef6", "score": "0.6256018", "text": "public function test_profilePrototypeCreateImage() {\n\n }", "title": "" }, { "docid": "fb3615f25287c06746baf02257c39485", "score": "0.6254192", "text": "public function testSignupWithOutAvatarFile() {\n $testfile = \"test.jpg\";\n $path = dirname(__DIR__) . '/storage/test_files/' . $testfile;\n $mime = Storage::disk('public')->mimeType('/test_files/' . $testfile);\n $file = new UploadedFile($path, $testfile, filesize($path), $mime, null, true); \n $data = [\n 'email' => 'sergi.redorta@hotmail.com',\n 'firstName' => 'sergi',\n 'lastName' => 'Redorta',\n 'mobile' => '0623133213',\n 'password'=> 'Secure0', \n ]; \n $response = $this->post('api/auth/signup', $data);\n $user = User::all()->last();\n //dd($user->attachments()->with('thumbs')->get()->toArray());\n //dd(Attachment::find(1)->with('thumbs')->get()->toArray());\n $response->assertStatus(200)->assertJson(['response'=>'success', 'message'=>'auth.signup_success']); \n $this->assertDatabaseHas('users', [\n 'email' => 'sergi.redorta@hotmail.com'\n ]); \n $this->assertDatabaseHas('attachments', [\n 'attachable_id' => 1,\n 'attachable_type' => User::class,\n 'alt_text' => 'avatar'\n ]); \n $this->assertDatabaseMissing('thumbs', [\n 'id' => 1,\n 'attachment_id' => 1,\n 'size' => 'full',\n 'width' => '285'\n ]); \n }", "title": "" }, { "docid": "e7afde1d2cad657fcb335ae7d1060299", "score": "0.6252463", "text": "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n if ($this->getImage()) {\n $filename = __DIR__ . \"/../../../web{$this->getImage()}\";\n if (file_exists($filename)) {\n unlink($filename);\n }\n }\n\n $uploadDir = UploadImageService::UPLOAD_IMAGE_PATH;\n $nameImage = $uploadDir.md5(uniqid(time(), true)).'.png';\n $this->getFile()->move($uploadDir, $nameImage);\n\n $this->image = $nameImage;\n $this->setFile(null);\n }", "title": "" }, { "docid": "d6de86a9f98844f1612640759df2bb7f", "score": "0.62504286", "text": "final public function upload($key){\n //Working with Images files\n if( is_array($this->uploadFields[$key]) && array_key_exists('isImage', $this->uploadFields[$key]) && $this->uploadFields[$key]['isImage'] ){\n try {\n //Moving the image files to storage config in the app\n $localStorage = \\Config::get('filesystems');\n $tmpRoute = $localStorage['disks']['local']['root'].'/LaCrud/';\n $tmpFileName = str_random(10).'-'.$this->attributes[$key]->getClientOriginalName();\n $tmpImage = $this->attributes[$key]->move($tmpRoute,$tmpFileName);\n\n //Creating the object image\n $imageManager = new ImageManager(array('driver' => 'imagick'));\n $image = $imageManager->make( $tmpImage );\n\n //Rsolve the permission path on app and sizes\n if( array_key_exists('public',$this->uploadFields[$key]) || array_key_exists('private',$this->uploadFields[$key]) ){\n if( array_key_exists('public',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'public',$image);\n }\n if( array_key_exists('private',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'private',$image);\n }\n }\n else{\n \\Storage::disk('local')->delete( 'LaCrud/'.$tmpFileName );\n throw new \\Exception(\"The field's configuration not has a public or private path to move the file\");\n }\n\n } catch (NotReadableException $e) {\n \\Storage::disk('local')->delete( 'LaCrud/'.$tmpFileName );\n throw new NotReadableException($e->getMessage());\n }\n }\n //Working with others files\n else{\n if( is_array($this->uploadFields[$key]) ){\n if( array_key_exists('public',$this->uploadFields[$key]) || array_key_exists('private',$this->uploadFields[$key]) ){\n if( array_key_exists('public',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'public');\n }\n if( array_key_exists('private',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'private');\n }\n }\n else{\n throw new \\Exception(\"The field's configuration not has a public or private path to move the file\");\n }\n }\n else{\n $tmpRoute = public_path().'/'.$this->uploadFields[$key];\n $tmpFileName = str_random(10).'-'.$this->attributes[$key]->getClientOriginalName();\n $this->attributes[$key]->move($tmpRoute,$tmpFileName);\n }\n }\n return $tmpFileName;\n }", "title": "" }, { "docid": "f61b4a32593ceccd7d70d22de14e73a6", "score": "0.62460035", "text": "public function testImagesUpdateFolder()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "a0056ce01961cf16e9a9a8890a35e02c", "score": "0.6226753", "text": "public function imagesFromUrlTest() {\n\n }", "title": "" }, { "docid": "5df6a299d5b5fdbb80c3d75e2ee7135d", "score": "0.6222244", "text": "public static function uploadImage() {\n // get the uploaded file instance. for multiple file uploads\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstance($this, 'gambar');\n\n \n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n \n // store the source file name\n //$this->gru_att_orgfile = $image->name;\n $ext = end((explode(\".\", $image->name)));\n \n // generate a unique file name\n $this->gambar = Yii::$app->security->generateRandomString().\".{$ext}\";\n \n // the uploaded image instance\n return $image;\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "bb28ad264f975b9f924d40421a112a2a", "score": "0.0", "text": "public function destroy($id)\n {\n Cart::remove($id);\n \n return redirect(route('panier.index'));\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "6f5cb91b0423a11c78f100fc165554df", "score": "0.6959094", "text": "public function delete(ResourceInterface $resource);", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "55490a425cec5f2c2efea8b737497612", "score": "0.6737496", "text": "public function deleteGameResource($resource){\n if($this->gameResourceExists($resource)){\n unlink($this->getResourceDataPath() . $resource . \".dat\");\n }\n }", "title": "" }, { "docid": "ef862fedfa2a9a53bdc0c931abd5b9ef", "score": "0.6707853", "text": "public function destroy()\n {\n $this->resource->delete();\n }", "title": "" }, { "docid": "033a3fd474fdaf2c9dbcf9853f451cd2", "score": "0.664397", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\"); \n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\", \n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "4f49f964d082c69a3fe92671d08d3bc7", "score": "0.66371554", "text": "public function delete($cacheResource, $ignoreLifetime = false);", "title": "" }, { "docid": "47236fb1482f779e9251fd6998158877", "score": "0.65373594", "text": "public function deleteResource(PersistentResource $resource, $unpublishResource = true)\n {\n $this->initialize();\n\n $collectionName = $resource->getCollectionName();\n\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\n if ($result > 1) {\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\n } else {\n if (!isset($this->collections[$collectionName])) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \"%s\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n $storage = $this->collections[$collectionName]->getStorage();\n if (!$storage instanceof WritableStorageInterface) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \"%s\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n try {\n $storage->deleteResource($resource);\n } catch (\\Exception $exception) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n if ($unpublishResource) {\n /** @var TargetInterface $target */\n $target = $this->collections[$collectionName]->getTarget();\n $target->unpublishResource($resource);\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n } else {\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n }\n }\n\n $resource->setDeleted();\n $this->resourceRepository->remove($resource);\n\n return true;\n }", "title": "" }, { "docid": "73af02f86d4e877d5ec7756885285cd4", "score": "0.6409313", "text": "function delete($resourceName);", "title": "" }, { "docid": "fd5668b2d59626254ea2b308c3b7b195", "score": "0.63944584", "text": "public function removeResource(Row_AclResource $resource)\r\n\t{\r\n\t\t$row = $this->_getAclRow($resource);\r\n\t\t$row->allow = 0;\r\n\t\t$row->save();\r\n\t}", "title": "" }, { "docid": "66cab78c708362190959631c44dd73a1", "score": "0.6300312", "text": "public function remove( $resource ) {\n \n $res = $this->get( $resource );\n \n if ($res == false) {\n return $this;\n }\n \n $resourceId = $res->getResourceId();\n \n $resourcesRemoved = array( $resourceId );\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\n }\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\n $this->remove( $childId );\n $resourcesRemoved[] = $childId;\n }\n // удаляет и правила для рессурса\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\n }\n }\n }\n\n unset( $this->_resources[$resourceId] );\n\n\n return $this;\n }", "title": "" }, { "docid": "2a10b35926876411b2e80108cfe22fca", "score": "0.6298291", "text": "public function remove() {\n // determine the name of the file\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\n @unlink($filename);\n }", "title": "" }, { "docid": "89ce35850dffc0e6605778465129a8fa", "score": "0.62484", "text": "public function destroy(Resource $resource)\n {\n if (count($resource->photos)) { // delete photos from filesystem and storage.\n foreach ($resource->photos as $key => $photo) {\n $resource->deletePhoto($photo);\n }\n }\n $resource->delete();\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\n }", "title": "" }, { "docid": "2367dd4337c36bfe160c73cbfe965a9c", "score": "0.6222181", "text": "public function testRemoveResource() {\n\n\t\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\n\t\tfile_put_contents($file, 'test');\n\n\t\t$this->assertTrue(file_exists($file));\n\n\t\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\n\t\t$container->remove('test.txt');\n\n\t\t$this->assertFalse(file_exists($file));\n\t}", "title": "" }, { "docid": "07b2c5af4c184e58bf2887516d95f2ee", "score": "0.6152366", "text": "public function clearResource(){\n\t\t\tif ($this->resource !== null){\n\t\t\t\timagedestroy($this->resource);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7e83a85a6ecaba18a97b363f757bfe88", "score": "0.61334383", "text": "public function remove() {\n\t\tunlink($this->getSrcImagePath());\n\t}", "title": "" }, { "docid": "0fd71148a5c7f18c479bf79390410ee6", "score": "0.6105545", "text": "public function delete(): void\n {\n if ($this->has($this->file))\n unlink($this->file);\n }", "title": "" }, { "docid": "eaf52922cf2f9f3851b5dee384bd6ceb", "score": "0.60544735", "text": "public static function remove($storageId) {\n\t\t$storageCache = new Storage($storageId);\n\t\t$numericId = $storageCache->getNumericId();\n\n\t\tif (strlen($storageId) > 64) {\n\t\t\t$storageId = md5($storageId);\n\t\t}\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($storageId));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($numericId));\n\t}", "title": "" }, { "docid": "5d67ccf5357bc568ae73bc2554b4fcb3", "score": "0.60279834", "text": "function destroying_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "98d22295493f0020f84c312075af1ad7", "score": "0.60123336", "text": "function deleting_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a7e206f667720084df5493157a69cfb1", "score": "0.59848213", "text": "static private function _delResCache($resource)\n {\n $hash = self::getHashByResource($resource);\n foreach (self::$res as &$items) {\n if (!empty($items[$hash])) {\n unset($items[$hash]);\n }\n } \n }", "title": "" }, { "docid": "896e95e8d1abd4f6c5eecd1940391bef", "score": "0.5978198", "text": "public function unlinkStorage(): self\n {\n unlink($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "46e2a3c32c6b5a596ae0cf2bf703c970", "score": "0.5958219", "text": "public function destroy($id)\n {\n $get=Document::where('id',$id)->first();\n if($get->photo!=null&&file_exists(\"/storage/$get->photo\")){\n unlink('storage/'.$get->photo);\n }\n $get->delete();\n return redirect()->route('listDocument');\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "970f51bb911499288a1748bfe0157efa", "score": "0.5912158", "text": "public function delete($id) {\n $this->connectStorage($id);\n $this->storage->delete();\n }", "title": "" }, { "docid": "f1553c7757cc3676299373a5d3a835f9", "score": "0.5907517", "text": "public function destroy($id)\n {\n $uniforme = Uniforme::find();\n Storage::delete('file.jpg');\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "47945b59946db62fc806604498e46323", "score": "0.58641815", "text": "public function remove(FileInterface $file): FileInterface;", "title": "" }, { "docid": "d3158d405d4b489191764d14126b6336", "score": "0.5857253", "text": "public function destroy($id)\n {\n $trigger = Resource::where('id', $id)->first();\n $file = $trigger->file;\n if (!empty($file)) {\n $upFile = new UploadFile();\n $upFile->deleteCurrentFile($file, 'resource');\n }\n $trigger->delete();\n return back();\n }", "title": "" }, { "docid": "ce513fb382cd88ef0817a244ce395271", "score": "0.5824645", "text": "public function destroy($id)\n {\n $image= Image::find($id); \n $name = $image->name;\n $file = '/images/'.$name;\n $thumbnail = '/uploads/thumbnail/'.$name;\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \n }", "title": "" }, { "docid": "b6078f9d34f26c367a9797120d6006ab", "score": "0.5818996", "text": "public function resourceHasBeenDeleted();", "title": "" }, { "docid": "c8394dead7326b95b49dd4f6c575a34a", "score": "0.58155316", "text": "public function destroy($resource, $id)\n {\n $model = $this->model->find($id);\n $model->delete();\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource', [\n 'resource' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "915ec80e489f9eed2bde0417b2f10a19", "score": "0.580295", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->addResource($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "b4ee6dc4b9942eba341457d6bf4d5638", "score": "0.5796796", "text": "public function removeFromStore()\n {\n if ($this->getHash() && $this->getType()) {\n $this->getFileStore()->delete($this->getHash(), $this->getType());\n } else {\n throw new SwompException(\"Cannot remove from Store - Hash and Type is required\");\n }\n }", "title": "" }, { "docid": "b48e565472dafa6e553cf8aee6f42a6a", "score": "0.578793", "text": "public function destroy($id)\n {\n $product = Pruduct::where('id', $id)->first();\n unlink('storage/' . $product->image);\n\n $product->delete();\n Session::flash('messege', 'Data berhasil di hapus.');\n return redirect()->back();\n }", "title": "" }, { "docid": "532f8d58b20e101c1f5035990ba18e7e", "score": "0.57871205", "text": "public function cleanStorage();", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "0009889a5268b3415309c6899e972909", "score": "0.57663226", "text": "public function delete()\r\n {\r\n $path = $this->path;\r\n parent::delete();\r\n\r\n // Delete file if exists\r\n if($this->id && file_exists($path))\r\n {\r\n unlink($path);\r\n }\r\n\r\n }", "title": "" }, { "docid": "62c6b6bfe5aeaa08992c1c1ff2c5e9ec", "score": "0.5732295", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n \n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "b6294af388de3ae8b010bbdd0e147a65", "score": "0.57102996", "text": "function destroyed_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a1d82443b72d201e5ede999d05bf59f5", "score": "0.57096094", "text": "public function unsetStorageId()\r\n\t{\r\n\t\tunset($this->_storage_id);\r\n\t}", "title": "" }, { "docid": "9591ec5177ac179477cbd3c3ccaa275a", "score": "0.5706215", "text": "public function destroy($id)\n {\n $file = FileTask::findOrFail($id);\n Storage::delete($file->path); //delete from disk\n $file->delete(); //delete from db\n flash('File was removed!');\n return back();\n }", "title": "" }, { "docid": "cf195d4a522e74edc7019e572a06923c", "score": "0.5694188", "text": "public function destroy($id)\n {\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return response()->json(['status' => 'success']);\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "fe53bca8d325675dd4f80c6d519ce470", "score": "0.5679682", "text": "public function destroy($id)\n {\n \n $delete = Product::find($id);\n $image_path ='public/image/'. $delete->photo;\n unlink( $image_path);\n $delete->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "c1ecca5c35e22313e1c38b1ddca48883", "score": "0.56521606", "text": "public function destroy(FILE $file)\n {\n \n\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n\n $file->delete();\n\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "ac44db6cd2e11be0502437646b98bec0", "score": "0.56515306", "text": "public function untagResource($payload, $headers=[]) {\n $method = 'DELETE';\n $path = sprintf('/%s/tag', $this->apiVersion);\n $headers = $this->buildCommonHeaders($method, $path, $headers);\n $content = json_encode($payload);\n $headers['content-length'] = strlen($content);\n return $this->doRequest($method, $path, $headers, $data = $content);\n }", "title": "" }, { "docid": "3c36d7803d6dcac2a74d7850bf05b529", "score": "0.56461364", "text": "function deleteResource($model)\n {\n }", "title": "" }, { "docid": "198fe5623de140ddb980a64f1228ee9c", "score": "0.5643258", "text": "public function shutdownObject()\n {\n /** @var PersistentResource $resource */\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\n if ($this->persistenceManager->isNewObject($resource)) {\n $this->deleteResource($resource, false);\n }\n }\n }", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "ddb7a7e1bd529da0193a6825c4588bde", "score": "0.5632143", "text": "function deleted_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "cfb60ffcc989888bf5132bd8f18d28f3", "score": "0.563189", "text": "public function destroy(string $storageKey): bool;", "title": "" }, { "docid": "227d7db0fe495cc1b0734cf71cbc6374", "score": "0.5627202", "text": "public function destroy($id)\n {\n try {\n $resource = Resource::findOrFail($id);\n auth()->user()->resources()->detach($id);\n } catch (\\Throwable $e) {\n throw abort(404);\n }\n\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-saved',\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\n 'resource_id' => $id\n ]);\n }", "title": "" }, { "docid": "b2deedc135e4e9a6d691a34bc62901e4", "score": "0.5602831", "text": "public function delete(): void\n {\n if ($this->exists()) {\n File::delete($this->path());\n }\n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "2551dae05d41b0f050dbd034df4e2093", "score": "0.5595374", "text": "public function remove()\n {\n $res = unlink($this->_path);\n return $res;\n }", "title": "" }, { "docid": "2dfd4b7a5b42f50b0f3186c2425fc4a3", "score": "0.55950236", "text": "public abstract function deleteAsset(Asset $asset);", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "eb676b82c99dc848aabda71793e9f00a", "score": "0.55856013", "text": "public function destroy()\n {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "0f5a2d5d4ccb6690f2c9b7c1ad81379c", "score": "0.55815697", "text": "public function delete() {\n\t\treturn unlink($this->path);\n\t}", "title": "" }, { "docid": "abcaf8d103f03089c84f7aa510afb02a", "score": "0.5578945", "text": "public function delete()\n {\n if (null !== $this->repository) {\n $this->repository->close();\n }\n\n $this->file->delete($this->filePath);\n $this->filePath = '';\n }", "title": "" }, { "docid": "6955ff701e4315c5cfa7e2767eafdbcf", "score": "0.55788815", "text": "public function clear($in_storage_too = true);", "title": "" }, { "docid": "f576b22c84d78e83b91d5036361a095c", "score": "0.55780953", "text": "public function delete($filename = null);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "930240c93dd67bc31042064adb044402", "score": "0.55683106", "text": "public function destroy($id) {\n $data = Product::findOrFail($id);\n @unlink(storage_path('app/public/product/' . $data->product_image));\n $data->delete();\n return redirect('product')->with('success', 'Product is successfully deleted');\n }", "title": "" }, { "docid": "f7e801c4eebb9a1d03e7feec4ecd5f21", "score": "0.5567041", "text": "public function destroy($id)\n {\n $realestate = Realestate::findOrfail($id);\n if( count($realestate->files) > 0 )\n {\n if(Storage::disk('public')->exists($realestate->files[0]->path))\n Storage::disk('public')->delete($realestate->files[0]->path);\n\n $realestate->files()->delete();\n }\n\n $realestate->delete();\n\n\n return redirect()->route('realestate_index');\n\n }", "title": "" }, { "docid": "f392b1ed7db16f604f843adb672ef950", "score": "0.55653834", "text": "public function destroy($id)\n {\n $slide = Slide::find($id);\n if(Storage::delete('public/slides/'.$slide->slides)){\n $slide->delete();\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\n }\n}", "title": "" }, { "docid": "0a10bad03f5df8b55f39176b0c613baa", "score": "0.55647546", "text": "public function remove(string $path)\n {\n $this->set($path, null);\n }", "title": "" }, { "docid": "adc4e9de22fd8f0d6314e35dcee0b8e0", "score": "0.5563022", "text": "public function remove(string $object): void;", "title": "" }, { "docid": "37d5927bb51b78bdcea795a632988120", "score": "0.55617017", "text": "public function removeTransactionResource($hash)\n\t{\n\t\t$path = $this->getTransactionResourcePath($hash);\n\t\treturn $this->deleteTransactionResource($path);\n\t}", "title": "" }, { "docid": "61d679086bf634ff55d0bc8a41a70710", "score": "0.5561249", "text": "public function destroy($id)\n {\n $user =DB::table('users')->where('id',$id)->first();\n $photo = $user->photo;\n \n unlink($photo);\n DB::table('users')->where('id',$id)->delete();\n \n }", "title": "" }, { "docid": "40424bbe7e79c788acc8e40fa96c2e17", "score": "0.5556214", "text": "public function destroy($id)\n {\n \n $product = Product::findOrFail($id);\n\n if($product->delete()) {\n\n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "b877c987e8cb3298dc4c9f11662792f9", "score": "0.55559146", "text": "public function destroy($id)\n {\n $path = File::findOrFail($id)->path; \n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\n Storage::delete( $path ); \n\t\tFile::findOrFail($id)->delete(); \n\t\treturn redirect('/home');\n }", "title": "" }, { "docid": "09d16b97894d6829ff484d20cf378f8f", "score": "0.555526", "text": "public function destroy(Request $request, $id){\n $file = File::whereCodeName($id)->firstOrFail();\n //unlink elimina el archivo de la aplicacion\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\n\n //eliminar de base de datos\n $file->delete();\n\n //avisar que se ha borrado archivo al usuario\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\n return back();\n }", "title": "" }, { "docid": "19530e0d90a5511cefec030646832ac7", "score": "0.55509293", "text": "function deleteResource($id)\n\t{\n\t if(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n\t\t$this->db_delete($this->_table, array('id'=>$id));\n\t}", "title": "" }, { "docid": "3fa04699fe14eb03c48cfde3470db201", "score": "0.55502915", "text": "public function destroy($id)\n {\n $file = Upload::findOrFail($id);\n if(File::exists(public_path($file->filename))){\n unlink(public_path($file->filename));\n File::delete(public_path($file->filename));\n }\n $file->delete();\n return redirect()->back()->with('success','Deleted Successfully');\n //\n }", "title": "" }, { "docid": "94b6f2ef01c97218c0ea77ca980a8947", "score": "0.55452746", "text": "public function wipeStorage(): void\n {\n $this->storageAdapter->wipeStorage();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "51ecf73cbf0ed20291ef32754f32287e", "score": "0.55377126", "text": "public function destroy($id)\n {\n $site_image = DB::table('site_images')->where('id',$id)->first();\n $image=$site_image->image_name;\n unlink($image);\n DB::table('site_images')->where('id',$id)->delete();\n\n redirect()->back()->with('success', 'site image removed successfully');\n }", "title": "" }, { "docid": "30d0b23b0b35054a9dcfaf9fdc529aa5", "score": "0.5532588", "text": "public function destroy($id)\n {\n\n $p = Product::where('id' , $id)->first();\n if(File::exists($p->image)){\n File::delete($p->image);\n }\n $p->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
54b779f0d94d9f1df21173d500f19ffa
Called by owning model.
[ { "docid": "7faf7cd112d6d4a3533bb37a82717e66", "score": "0.0", "text": "function Cleared(){}", "title": "" } ]
[ { "docid": "b6408c717c29f34496afaf584b18b025", "score": "0.6198525", "text": "protected function _postSaveRelatedRecords(){ }", "title": "" }, { "docid": "e5cf041c46405389186558e0cc86ec2b", "score": "0.616115", "text": "protected function afterSave(){}", "title": "" }, { "docid": "afb7d04a27c0630b3d877206e9486db8", "score": "0.61350775", "text": "protected function _preSaveRelatedRecords(){ }", "title": "" }, { "docid": "a5bafe9cb3892a15d4a498c1d648d21e", "score": "0.602487", "text": "public function approvableParentModel();", "title": "" }, { "docid": "f6c688a265b1401dc17586737b409f4a", "score": "0.60072666", "text": "protected function beforeSave(){}", "title": "" }, { "docid": "c463d31fb56fc25c32da1651c1fe9136", "score": "0.59547704", "text": "protected function _postSave(){ }", "title": "" }, { "docid": "c463d31fb56fc25c32da1651c1fe9136", "score": "0.59547704", "text": "protected function _postSave(){ }", "title": "" }, { "docid": "8e90f3fa43dca4f6bd5ce7d7caa8b797", "score": "0.5905165", "text": "protected function before_saving() {\n }", "title": "" }, { "docid": "3cbd449ff5e0734fc2fea7cd433f9e07", "score": "0.58882695", "text": "protected function _preSave(){ }", "title": "" }, { "docid": "3cbd449ff5e0734fc2fea7cd433f9e07", "score": "0.58882695", "text": "protected function _preSave(){ }", "title": "" }, { "docid": "581b5f090c276b53857fac8374197773", "score": "0.58799297", "text": "abstract protected function related();", "title": "" }, { "docid": "87e6630c97c96134a9fedd1135ae63ee", "score": "0.5874249", "text": "protected function afterSave()\n\t{\n\t}", "title": "" }, { "docid": "8042193c40943da0dfd4b5ed517f8153", "score": "0.58249485", "text": "protected function after_saving() {\n }", "title": "" }, { "docid": "2b40ff84015d8b85638aeb717847a7d6", "score": "0.58077294", "text": "protected function onBeforeSave()\n {\n //\n }", "title": "" }, { "docid": "d9f1c8fd8c51bb7764abc368ded60e27", "score": "0.57853353", "text": "protected function beforeSave()\n\t{\n\t}", "title": "" }, { "docid": "1973769cc92ce2350b739057eea3f2cb", "score": "0.57791674", "text": "protected function afterMergeWith(ActiveRecord $model){}", "title": "" }, { "docid": "9ba17753f72e11275c71039e17a2ac1d", "score": "0.57582533", "text": "protected function _postSave()\n {\n }", "title": "" }, { "docid": "9ebab246d8377e90b7a5b57a382c0750", "score": "0.570413", "text": "public function onSaving()\n {\n $entry = $this->getFormEntry();\n $parent = $this->getParent();\n\n if ($parent) {\n $entry->setAttribute('parent_id', $parent->getId());\n }\n }", "title": "" }, { "docid": "ca53282c22f7a041b534aca2d5ec3d6b", "score": "0.5693223", "text": "public function retrieved($model): void\n {\n//\n }", "title": "" }, { "docid": "9d59a8b4d54c84073d3265458dfffd05", "score": "0.56931245", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n }", "title": "" }, { "docid": "9d59a8b4d54c84073d3265458dfffd05", "score": "0.56931245", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n }", "title": "" }, { "docid": "5d520dd420e9bbd551efba693328f628", "score": "0.5690559", "text": "public function beforeSave()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "474dd8de71ed6f1fecc08020f1c8a822", "score": "0.56715006", "text": "public function ApplyChanges() \n\t\t{\n \t\t\t\tparent::ApplyChanges(); \t\t\t\t\n\t\t}", "title": "" }, { "docid": "41135007ee2cb98effc4c14c6e0c42ec", "score": "0.5660243", "text": "function afterSave()\n {\n $this->refresh();\n }", "title": "" }, { "docid": "7be7e3a4c7a2f9feb920b9a7eb0d6d81", "score": "0.563868", "text": "abstract public function setModel();", "title": "" }, { "docid": "f79e4d7eeee9504ad65499735ffd77e8", "score": "0.56279844", "text": "public function afterSave()\n {\n if (!$this->_cycling) {\n $this->_cycling = true;\n foreach (array_keys($this->relatedData) as $name) {\n $relation = $this->getOwnerRelation($name);\n if ($relation->multiple) {\n $this->saveMany($name);\n $this->owner->populateRelation($name, $this->relatedModels[$name]);\n unset($this->relatedData[$name]);\n }\n }\n $this->_cycling = false;\n }\n }", "title": "" }, { "docid": "671e67a74d2f35216c4ed533ccbcaed2", "score": "0.56246066", "text": "public function onSaving()\n {\n $parent = $this->getParent();\n $entry = $this->getFormEntry();\n\n if (!$entry->group_id && $group = $this->getGroup()) {\n $entry->group_id = $group->getId();\n }\n\n if (!$entry->type && $type = $this->getType()) {\n $entry->type = $type->getNamespace();\n }\n\n if ($parent) {\n $entry->parent_id = $parent->getId();\n }\n }", "title": "" }, { "docid": "73c8abbec9ea6bac01c8a158aba08621", "score": "0.5621982", "text": "protected function refreshCurrentValue() {\n $model = $this->model->findByPk($this->model->getPrimaryKey());\n if($model) {\n $this->model->{$this->attribute} = $model->{$this->attribute}; \n } else {\n $this->model->{$this->attribute} = '';\n }\n }", "title": "" }, { "docid": "84222ce305189b6a5f17ccdd76c00d73", "score": "0.56183076", "text": "abstract protected function model();", "title": "" }, { "docid": "5b69870e3715d39e990671c38bae8580", "score": "0.56128365", "text": "protected function after_save() {\n\n\t}", "title": "" }, { "docid": "24c94d746011ef2b6a97c8cd44c6ba4d", "score": "0.5600294", "text": "protected function onEdit(){\n\t\tparent::onEdit();\n\t}", "title": "" }, { "docid": "a59620aa06a81e228f4e99ac47db058e", "score": "0.55920756", "text": "protected function _beforeSave(){\n if ($this->getItem()){\n $this->setItemId($this->getItem()->getId());\n }\n return parent::_beforeSave();\n }", "title": "" }, { "docid": "c35e529771573263032b61e7ef58b28e", "score": "0.55860806", "text": "function SubscriberModel()\n\t\t{\n\t\t\tparent::Model();\n\t\t}", "title": "" }, { "docid": "e216e822aa9d0a3f27d91b96c4602411", "score": "0.55821806", "text": "protected function afterEdit()\n {\n }", "title": "" }, { "docid": "07fe3ebf364a25584d44048ab7bec162", "score": "0.5548612", "text": "protected function _beforeSave()\n {\n // No code please\n }", "title": "" }, { "docid": "239e8897ff4e966406310fc581055e58", "score": "0.5546707", "text": "public function save()\n\t{\n\t\tparent::save();\n\t}", "title": "" }, { "docid": "a171bf2e62b0ed3f7ebe1806aee548c8", "score": "0.5537757", "text": "protected function _applyObjectProperty()\r\t{\r\t\tparent::_applyObjectProperty();\r\r\t\t$Comment_Shop_Item = $this->_object->Comment_Shop_Item;\r\r\t\tif (is_null($Comment_Shop_Item->id))\r\t\t{\r\n\t\t\t$Comment_Shop_Item->shop_item_id = intval($this->_object->parent_id\r\n\t\t\t\t? Core_Entity::factory('Comment', $this->_object->parent_id)->Comment_Shop_Item->shop_item_id\r\n\t\t\t\t: Core_Array::getRequest('shop_item_id'));\r\t\t\t$Comment_Shop_Item->save();\r\t\t}\r\n\r\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\r\t}", "title": "" }, { "docid": "392ebad9c02bc4716e7a25dd7133ef91", "score": "0.5537291", "text": "protected function _preSave()\n {\n }", "title": "" }, { "docid": "6b60e0ce0f02ac781a8be95c15db9584", "score": "0.5535298", "text": "protected function beforeUpdate()\n {\n }", "title": "" }, { "docid": "466e275ed19a2a8dbcaadf640ba2b076", "score": "0.5534721", "text": "public function afterDelete()\n {\n Yii::$app->trigger(BaseActiveRecord::EVENT_AFTER_DELETE, new ModelEvent([\n 'sender' => $this\n ]));\n parent::afterDelete();\n }", "title": "" }, { "docid": "692182a273c216fdd803892dc9d86f83", "score": "0.55344456", "text": "public function afterSave()\n {\n }", "title": "" }, { "docid": "6c03284fa88bc17f4b38135e7f768c10", "score": "0.55341685", "text": "public function afterSave()\n {\n\n }", "title": "" }, { "docid": "6c03284fa88bc17f4b38135e7f768c10", "score": "0.55341685", "text": "public function afterSave()\n {\n\n }", "title": "" }, { "docid": "b39a8d1bf706a6e6c42578e913956d23", "score": "0.5510279", "text": "protected function preSave() {\n }", "title": "" }, { "docid": "ab6419ad09693deb01a15a7d5ab5edc6", "score": "0.5508789", "text": "public function afterSave()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "bdde03750b555920e78d1035899b28b4", "score": "0.5505903", "text": "public function run() {\n\t\tif ( ! empty( $this->parent_object ) ) {\n\t\t\tparent::run();\n\t\t}\n\t}", "title": "" }, { "docid": "8d1606ab37cb5373d885109be739e167", "score": "0.5505052", "text": "public function afterSave() {\n }", "title": "" }, { "docid": "edc0688c28aa8b3a81a938d1e14dd615", "score": "0.54972345", "text": "public function touch()\n {\n $model = $this->getRelated();\n\n // if (! $model::isIgnoringTouch()) {\n $this->rawUpdate([\n $model->getUpdatedAtColumn() => $model->freshTimestampString(),\n ]);\n // }\n }", "title": "" }, { "docid": "8067d3a97ecab58053b6402310d0c928", "score": "0.54962724", "text": "protected function realSave() {\n return parent::save();\n }", "title": "" }, { "docid": "084728d883ce962c2a6a6f7947593f34", "score": "0.54865277", "text": "public function save()\n {\n if ($this->isLoaded()) {\n $baseModel = $this->getModel();\n $assocModel = $this->getObject();\n $fkName = $this->getFkName();\n $pkName = $this->getPkName();\n\n // save associated object\n $assocModel->save();\n $baseModel->writeAttribute($fkName, $assocModel->$pkName);\n }\n }", "title": "" }, { "docid": "f3b75316417e64294f5b0b2e568625ac", "score": "0.5482263", "text": "public function onBeforeWrite()\n {\n if ($group = $this->owner->relatedGroup()) {\n $this->owner->OrganisationID = $group->ID;\n }\n }", "title": "" }, { "docid": "8aabf9d5e21d8509fa9bd421b6b065ce", "score": "0.5476181", "text": "public function touchOwners()\n {\n foreach ($this->touches as $relation) {\n $this->$relation()->touch();\n\n if ($this->$relation instanceof self) {\n $this->$relation->fireModelEvent('saved', false);\n\n $this->$relation->touchOwners();\n } elseif ($this->$relation instanceof Collection) {\n $this->$relation->each(function (Model $relation) {\n $relation->touchOwners();\n });\n }\n }\n }", "title": "" }, { "docid": "36148eaa86079cc84d507c7ac55ea43f", "score": "0.54737985", "text": "function Post()\n\t{\n\t\tparent::Model();\n\t}", "title": "" }, { "docid": "197b1bd75f296ea8d3ebf4085e2b182a", "score": "0.5471609", "text": "protected function before_update() {\n\n\t}", "title": "" }, { "docid": "7c898c4f1fa372ed02a5e88c1388720b", "score": "0.54714674", "text": "protected function beanModel()\n {\n $this->getFormBean()->beanModel($this->getModel(), $this->getView());\n }", "title": "" }, { "docid": "5cffcabc1d270d6eee4d3f10c82e567e", "score": "0.5471118", "text": "protected function beforeSave() {\n return parent::beforeSave();\n }", "title": "" }, { "docid": "25465388c6acef142241e3d93e6ca330", "score": "0.5470984", "text": "protected function onBeforeUpdate()\n {\n //\n }", "title": "" }, { "docid": "74619b6e929fa4a8f3d9703e5ab529df", "score": "0.5459011", "text": "public function beforeSave()\n {\n }", "title": "" }, { "docid": "ee6accfd15ed3d927bfd1cb19464ba6b", "score": "0.545575", "text": "protected function _beforeSave()\n {\n // Only populate defaults for new models.\n if (!$this->id) {\n $this->populateDefaults();\n }\n }", "title": "" }, { "docid": "cfa503f62ac22e746aff667439c2c7ab", "score": "0.5449882", "text": "function __clone()\r\n {\r\n if (isset($this->_data[$this->_model->id_field]))\r\n unset($this->_data[$this->_model->id_field]);\r\n $this->_model[] = $this->_data;\r\n $this->_data['id'] = $this->_model->last_id();\r\n $this->_old_data = $this->_data;\r\n }", "title": "" }, { "docid": "2061e98d6a7d2c9b32202ef6282bb192", "score": "0.5441876", "text": "public function initialize()\n {\n\n $this->setSource(\"useditem\");\n $this->hasMany('id', 'SurfRider\\Models\\Sessionuseditem', 'useditem_id', ['alias' => 'Sessionuseditem']);\n $this->belongsTo('entity_id', 'SurfRider\\Models\\Entity', 'id', ['alias' => 'Entity']);\n }", "title": "" }, { "docid": "432a75e90f0da59974df503019fb32a0", "score": "0.54415613", "text": "public function processChanges()\n {\n $needReset = false;\n\n if (count($this->uowAttach)) {\n $keys = array_keys($this->uowAttach);\n $query = new Query(Flame::getAdapter());\n\n $fk = $this->owner->getTable() . '_' . $this->owner->getPk();\n\n $query\n ->update($this->table)\n ->set(array(\n $fk => $this->owner->getPkValue()\n ))\n ->in('id', $keys)\n ->execute();\n echo $fk . '=>' .$this->owner->getPkValue();\n $needReset = true;\n }\n if (count($this->uowDetach)) {\n $keys = array_keys($this->uowDetach);\n $query = new Query(Flame::getAdapter());\n\n $fk = $this->owner->getTable() . '_' . $this->owner->getPk();\n\n $query\n ->update($this->table)\n ->set(array(\n $fk => 0\n ))\n ->in('id', $keys)\n ->execute();\n $needReset = true;\n }\n\n if ($needReset) {\n $this->reset();\n }\n }", "title": "" }, { "docid": "65897e9cfe8d86e67671586c73606c4c", "score": "0.54165286", "text": "public function beforeUpdate()\n\t{\n\t\tif ($this->updateAttribute !== null) {\n\t\t\t$this->owner->{$this->updateAttribute} = $this->evaluateTimestamp($this->updateAttribute);\n\t\t}\n\t}", "title": "" }, { "docid": "6962b39b8758e6c2e431681c9fb0450d", "score": "0.5411362", "text": "public function initialize()\n {\n $this->keepSnapshots(true);\n $this->addBehavior(new Blameable());\n $this->useDynamicUpdate(true);\n $this->hasMany('id', 'models\\Contents', 'parent_id', ['alias' => 'Children']);\n $this->belongsTo('parent_id', 'models\\Contents', 'id', ['alias' => 'Parent']);\n $this->belongsTo('page_id', 'models\\Pages', 'id', ['alias' => 'Pages']);\n }", "title": "" }, { "docid": "155aee897de11479ca9330c9b3c82391", "score": "0.5407073", "text": "abstract protected function initModel();", "title": "" }, { "docid": "a4f1d9a5ed82f0360bf3495ece05ea81", "score": "0.5406284", "text": "public function post_model_init($from_cache = FALSE)\n\t{\n\t}", "title": "" }, { "docid": "3973d2605fd98d45117bf12bb03ece49", "score": "0.5405568", "text": "protected function beforeEdit()\n {\n }", "title": "" }, { "docid": "14c51afe0228706afcb0954a17ed5647", "score": "0.5394768", "text": "protected function afterForeignKeysAdd()\n {\n \n }", "title": "" }, { "docid": "138eec7c0f1365301c4004989e4c47a3", "score": "0.5378349", "text": "protected function on_change() {}", "title": "" }, { "docid": "5dc1ca6caacaed20049c64dfb535fd55", "score": "0.5377176", "text": "protected function _prepareUpdate(){ }", "title": "" }, { "docid": "cbc90d341e6e65af055657309894ff64", "score": "0.5367905", "text": "public function beforeSaveCaller()\n\t{\n\t\t// Handle the autogen timestamps\n\t\tif (property_exists($this, 'createDate') && $this->createDate == null)\n\t\t\t$this->createDate = new \\DateTime();\n\t\tif (property_exists($this, 'modifiedDate'))\n\t\t\t$this->modifiedDate = new \\DateTime();\n\n\t\t$this->beforeSave();\n\t}", "title": "" }, { "docid": "14cf1eff9365983649826fc5918df7a6", "score": "0.5367365", "text": "public function syncForeignKeyMembers()\n {\n $this->getRelatedEntityGetters()->each([$this, 'syncForeignKeyMember']);\n }", "title": "" }, { "docid": "d4889ddf6906d3768d38627a94ceb10c", "score": "0.53650445", "text": "protected function before_save() {\n\n\t}", "title": "" }, { "docid": "e5ca35a165c6ea9be572858553cf640a", "score": "0.53549224", "text": "public function onInstanceSave() {\n if ($this->getConfig()->isManageTableStructure())\n $this->updateFields($this->getConfig()->getColumns());\n }", "title": "" }, { "docid": "886f2a19fae3ac3b6ad37bd66e64ae47", "score": "0.5350031", "text": "function save()\n {\n parent::save();\n }", "title": "" }, { "docid": "f5a5c86ce689af69913dabd84eb9655c", "score": "0.53490716", "text": "protected function post_model_init($from_cache = FALSE)\n\t{\n\t}", "title": "" }, { "docid": "edbd60abc382c94948fe4b3c40f81f5d", "score": "0.53475", "text": "public function initialize() {\r\n $this->belongsTo(\r\n \"product_id\", \r\n \"Products\", \r\n \"product_id\",\r\n array('reusable' => true));\r\n }", "title": "" }, { "docid": "bc34df6e535478c288265f3c4514bbee", "score": "0.5347163", "text": "public function beforeSave(){\n\t\t\t\n \t//$this->userId = 14;//Yii::app()->user->getId();\n \treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "5c986b77e6410ebd9a302f8f1bd852f3", "score": "0.53248745", "text": "public function initialize()\n {\n \t$this->belongsTo('id_verificacion', 'CobVerificacion', 'id_verificacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actafocalizacion', 'CobActafocalizacionDatos', 'id_actafocalizacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->hasMany('id_actafocalizacion', 'CobActafocalizacionPersona', 'id_actafocalizacion', array(\n \t\t\t'foreignKey' => array(\n \t\t\t\t\t'message' => 'El acta no puede ser eliminada porque existen empleados asociados a ésta'\n \t\t\t)\n \t));\n }", "title": "" }, { "docid": "ba4b704df95ac8a5f454b34575da37d4", "score": "0.5323188", "text": "function Project_model()\r\n {\r\n parent::Model();\r\n \r\n }", "title": "" }, { "docid": "1c37143e1f25a54e0a3489ca6d22e30a", "score": "0.5321167", "text": "public function initialize()\n {\n $this->belongsTo('pedido_cd_pedido', 'App\\Models\\Pedido', 'cd_pedido', array('alias' => 'Pedido'));\n $this->belongsTo('cd_usuario', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('pedido_cd_pedido', 'App\\Models\\Pedido', 'cd_pedido', array('foreignKey' => true,'alias' => 'Pedido'));\n $this->belongsTo('cd_usuario', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n }", "title": "" }, { "docid": "35597ff9e303fa20fa6f661867985d8e", "score": "0.53157264", "text": "public function before_save() {\n \n }", "title": "" }, { "docid": "75405507e2e1f6fb420990ec14dc5f42", "score": "0.5310005", "text": "public function afterFind()\n {\n if ($this->isRelationPopulated('location') && $related = $this->getRelatedRecords()['location']) {\n foreach ($related as $key => $value) {\n if ($this->hasAttribute($key) && !empty($value)) {\n $this->setAttribute($key, $value);\n }\n }\n }\n parent::afterFind();\n }", "title": "" }, { "docid": "a3d11459ace65777261c5e8d74c2c4a3", "score": "0.5307606", "text": "abstract protected function newRelatedInstanceFor(Model $parent);", "title": "" }, { "docid": "5a2d031b983ad0028aed5b665c059916", "score": "0.5307149", "text": "public function performDeleteOnModel()\n {\n if (static::isActive()) {\n throw new ReadOnlyException(__FUNCTION__, get_called_class());\n }\n parent::performDeleteOnModel();\n }", "title": "" }, { "docid": "b51f422c4842c95df6f7ae2d0f848795", "score": "0.5299663", "text": "public function initialize()\n {\n $this->belongsTo('id_events', 'Events', 'id_events', [\n 'alias' => 'Events',\n \"foreignKey\" => array(\n \"action\" => Relation::ACTION_CASCADE,\n )\n ]);\n }", "title": "" }, { "docid": "928405523f2a27190a855100aff291cc", "score": "0.52964383", "text": "public function initialize()\n {\n $this->belongsTo('id_bonus', 'Bonus', 'id_bonus', array('foreignKey' => true));\n $this->belongsTo('id_event', 'Event', 'id_event', array('foreignKey' => true));\n $this->belongsTo('id_user', 'User', 'id_user', array('foreignKey' => true));\n }", "title": "" }, { "docid": "0effe4297602a1347192c9c40fce10b6", "score": "0.5293726", "text": "function onBeforeSave() { return; }", "title": "" }, { "docid": "f5b619ff80aafb7a26b0c64f779c49dd", "score": "0.5292757", "text": "function Departamento_model()\n {\n parent::Model();\n }", "title": "" }, { "docid": "024ce3c47e5d7a58946815a1fe4ae867", "score": "0.52869", "text": "function SongModel()\r\n {\r\n parent::Model();\r\n\r\n }", "title": "" }, { "docid": "d4cf0083d77a87d67cae93cf2dd8f94b", "score": "0.52860373", "text": "public function preSave($native)\n {\n // at least for now, only belongs-to needs this\n }", "title": "" }, { "docid": "0b29038b9c34b38dd7d033d6edf2cf91", "score": "0.5286014", "text": "function post_model_init($from_cache = FALSE)\n {\n }", "title": "" }, { "docid": "27d869f996e82df1613c3f92e3912123", "score": "0.5284547", "text": "public function afterFind() {\n\t\t// log aside original attributes as they are later to be used to check for dirty-ness of 'this' object\n\t\t$this->originalAttributes = $this->attributes;\n\t\tparent::afterFind();\n\t}", "title": "" }, { "docid": "9e5fa56e215587fc2fb328eb8bb3e389", "score": "0.5284534", "text": "protected function bofore()\n {\n }", "title": "" }, { "docid": "5db9682c4bf31d052200051b28a042f1", "score": "0.5283826", "text": "public function handleAfterSave(): void\n {\n // Put the current attributes as the original ones.\n $this->syncOriginal();\n }", "title": "" }, { "docid": "b127ebcfb62466223f87fdd7fc9f2624", "score": "0.5276585", "text": "function save() {\n $count_cache_affected = $this->isNew() || $this->isModifiedField('state') || $this->isModifiedField('completed_on');\n $search_index_affected = $this->isNew() || $this->isModifiedField('state') || $this->isModifiedField('body');\n\n parent::save();\n\n if($count_cache_affected || $search_index_affected) {\n $parent = $this->getParent();\n\n if($search_index_affected && $parent instanceof ISearchItem) {\n $parent->search()->create();\n } // if\n\n if($count_cache_affected && $parent instanceof ISubtasks) {\n AngieApplication::cache()->removeByObject($this->getParent(), 'subtasks_count');\n } // if\n } // if\n }", "title": "" }, { "docid": "987708c10216f220c92f0bb6369b64c7", "score": "0.5270907", "text": "public function update()\n {\n $this->apply(function ($config) {\n $foreignKey = Str::snake($this->key($config['foreignKey']));\n\n if ($this->model->getOriginal($foreignKey) && $this->model->{$foreignKey} != $this->model->getOriginal($foreignKey)) {\n $this->updateCacheRecord($config, '-', 1, $this->model->getOriginal($foreignKey));\n $this->updateCacheRecord($config, '+', 1, $this->model->{$foreignKey});\n }\n });\n }", "title": "" }, { "docid": "cfbe4f85c1054cbc6ba97bc2fda1c750", "score": "0.5270309", "text": "public function model()\n {\n throw new Exception('model method not implemented');\n }", "title": "" }, { "docid": "d0cf71b0b323574f66a7f4db08746ac3", "score": "0.525424", "text": "protected function beforeForeignKeysAdd()\n {\n \n }", "title": "" }, { "docid": "d444ede5bb7544b480f3e7e8d3c32492", "score": "0.5245057", "text": "function __setAssociatedData() {\n\t\tforeach(array('belongsTo', 'hasAndBelongsToMany') as $association) {\n\t\t\tforeach ($this->{$this->modelClass}->{$association} as $alias => $values) {\n\t\t\t\t$theList = $this->{$this->modelClass}->{$alias}->find('list');\n\t\t\t\t$this->set($this->_pluralName($alias), $theList);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a7879a339a1bcf2f77582dff8ad82405", "score": "0.52422297", "text": "abstract function _on_update_object();", "title": "" } ]
ae32125935a140c1e805b99ef7ca79e6
end of method register Login User method
[ { "docid": "1549a34187d617edefa08c89e88c0654", "score": "0.0", "text": "public function login() {\n $data['title'] = 'Sign In';\n \n //setting errors\n $this->form_validation->set_rules('username', 'Username', 'required');\n $this->form_validation->set_rules('password', 'Password', 'required');\n \n if($this->form_validation->run() === FALSE){\n //displaying the register page with errors\n $this->load->view('templates/header');\n $this->load->view('users/login', $data);\n $this->load->view('templates/footer');\n }else{\n \n //Get username\n $username = $this->input->post('username');\n \n //Get and ecrypt the password\n $password = md5($this->input->post('password'));\n \n //Login user\n $user_id = $this->user_model->login($username, $password);\n \n //check for user id\n if($user_id){\n \n //get user data\n $user = $this->user_model->get_users($user_id);\n \n //check if user account is disabled\n $disabled = $user['disabled'];\n \n \n //if disabled redirect to login page and display message\n if($disabled){\n // set message in a session\n $this->session->set_flashdata('user_disabled', 'Your user has been disabled');\n \n //redirect user to home page after registration is successful\n redirect('login');\n }\n \n //check admin rights\n $role = $user['role_id'];\n \n //Saving the data returned from user model to $user_data variable\n $user_data = array(\n 'user_id' => $user_id,\n 'username' => $username,\n 'role' => $role,\n 'logged_in' => TRUE\n );\n \n \n //Set user data into a session\n $this->session->set_userdata($user_data);\n \n // set message in a session\n $this->session->set_flashdata('user_loggedin', 'You are now logged in.');\n \n //redirect user to home page after registration is successful\n redirect('home');\n \n }else {\n //set error message\n $this->session->set_flashdata('login_failed', 'Login is invalid.');\n \n //redirect user to home page after registration is successful\n redirect('users/login');\n }\n }\n }", "title": "" } ]
[ { "docid": "ac663c28d060996ad5dffd435b0defa5", "score": "0.7721084", "text": "public function registerUser();", "title": "" }, { "docid": "1dda688b5a0b4df0b171bffb0d0a8ded", "score": "0.71939015", "text": "function register()\n\t{\n\t\tif($this->data)\n\t\t{\n\t\t\tif(!$this->isFree($this->data['User']['name'], true))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Username \"' . $this->data['User']['name'] . '\" is already in use.');\n\t\t\t\tunset($this->data['User']['password']);\n\t\t\t\tunset($this->data['User']['password2']);\n\t\t\t\t$this->redirect('/menus');\n\t\t\t}\n\t\t\t\n\t\t\telse if($this->data['User']['password'] == \n\t\t\t\t\t$this->Auth->password($this->data['User']['password2']))\n\t\t\t{\n\t\t\t\tif($this->User->save($this->data))\n\t\t\t\t{\n\t\t\t\t\t$this->Auth->login();\n\t\t\t\t\t$this->redirect('/menus/registration_successful');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->setFlash('You did not enter the same password twice.');\n\t\t\t\tunset($this->data['User']['password']);\n\t\t\t\tunset($this->data['User']['password2']);\n\t\t\t\t$this->redirect('/menus');\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->redirect('/menus');\n\t\t}\n\t}", "title": "" }, { "docid": "472a13314c1dcffb2596a036a8c13769", "score": "0.71858066", "text": "public function saveLoginUser(){\n \n return $this->save();\n }", "title": "" }, { "docid": "a601408a7370d1709fe10c557775fac1", "score": "0.71441734", "text": "function regist_user(){\n\t\n}", "title": "" }, { "docid": "12b92406c78bbe81f9af7870dc9b4c02", "score": "0.7116995", "text": "public function register()\n\t{\n\t\t$user = new User;\n\n\t\t$user->email = $this->email;\n\t\t$user->username = $this->email;\n\t\t$user->password = hash('sha256', $this->password);\n\t\t$user->type = 'native';\n\t\t$user->last_login_time = date('Y-m-d h:i:s');\n\t\t$user->create_time = date('Y-m-d h:i:s');\n\n\t\t//create initial auth role for new user\n\t\t$auth = Yii::app()->authManager;\n\n\t\tif($user->save() && $auth->assign('Authenticated', $user->id))\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "10b51d96995e16c8c10fc30d54881ce7", "score": "0.70912397", "text": "public function register()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "507abdf34b2cdd94bcff6a9a22668e79", "score": "0.7082455", "text": "public function registration()\n {\n $user = new User();\n $user->username = $this->username;\n $user->email = $this->email;\n $user->password = md5(trim($this->password));\n\n if ($user->save()) {\n $_identity = new UserIdentity($this->username, $this->password);\n if ($_identity->authenticate()) {\n $duration = 3600*24*30; // 30 days\n Yii::app()->user->login($_identity, $duration);\n return true;\n } else {\n $this->addError('password', 'Неожиданная ошибка связанная с аутентификацией нового пользователя.');\n return false;\n }\n\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9e6be5917efd35567a20ef1a8a4ef811", "score": "0.70700294", "text": "public function register()\n {\n $validate = new UserFormValidator();\n if ($this->isLoggedIn()) { \n $this->redirect('');\n }\n\n $user = new User($this->db);\n if ($_SERVER['REQUEST_METHOD'] == 'POST') { \n\n if (!$validate->validate($_POST)) {\n $data = $validate->getErrors();\n return $this->render(\"users/register\", $data);\n } \n\n //bind form data to PDO object\n $userDTO = $this->dataBinder->bind($_POST, UserDTO::class);\n\n if ($user->findByEmail($userDTO->getEmail()) !== null) {\n flash('register_error', 'the user is exist already');\n return $this->render(\"users/register\");\n }\n\n //encrypt Password\n $password = $userDTO->getPassword();\n $passwordHash = password_hash($password, PASSWORD_DEFAULT);\n $userDTO->setPassword($passwordHash);\n $data = $user->create($userDTO);\n flash('register_success', 'You are now registered and can log in'); \n $this->render(\"users/login\", $data);\n\n } else {\n return $this->render(\"users/register\");\n\n }\n }", "title": "" }, { "docid": "73c983777aed0c5cfc4fa1243314b854", "score": "0.70482", "text": "public function register(){\n\t\tif($_POST == ' ' && $_POST['fullName'] == ' ' && $_POST['userEmail'] == ' ' && $_POST['password'] == ' '){\n\n\t\t\t$this->register();\n\n\t\t}else{\n $name = ucwords(strtolower($_POST['fullName']));\n $email = $_POST['userEmail'];\n $password = $_POST['password'];\n\n $pass = getHashedPassword($password);\n\n $result = $this->umodel->getWhere('users', 'EmailId', $email);\n if($result){\n \t\n echo \"Email Already Exist\";\n\n }else{\n\t \t$data = array(\n\t \t\"FullName\" => $name,\n\t \t\"EmailId\" => $email,\n\t \t\"Password\" => $pass,\n\t \t\"Created_at\" => date(\"Y-m-d\"),\n\t \t\"roleId\" => 4\n\t );\n\n\t $recordId = $this->umodel->registerUser(\"users\",$data);\n\n\t if($recordId > 0){\n\t \techo \"User registration successfull\";\n\t \t\n\t }else{\n\n\t \techo \"Somthing Wrong! Please try again\";\n\t }\n \t}\n\t\t}\n\t}", "title": "" }, { "docid": "6e8e940fbb9582373a2cd41a344f6665", "score": "0.70385236", "text": "public function register()\n {\n $data = $this->validate($this->request, [\n 'required' => ['username', 'password', 'password_confirmation'],\n 'equals' => [\n ['password', 'password_confirmation']\n ]\n ]);\n\n $query = app('db')->prepare(\"SELECT id FROM users WHERE `username` = ?\");\n $query->execute([\n $data['username'],\n ]);\n\n if ($query->rowCount() > 0) {\n app('session')->getFlashBag()->add('errors', ['username' => ['Username already in use.']]);\n Redirect::back();\n }\n\n $query = app('db')->prepare(\"INSERT INTO users (username, password) VALUES (?, ?)\");\n $query->execute([\n $data['username'],\n password_hash($data['password'], PASSWORD_BCRYPT),\n ]);\n\n $auth = app('auth');\n\n $auth->setUser(app('db')->lastInsertId('id'));\n\n if ($auth->check()) {\n Redirect::to('/');\n }\n\n Redirect::back();\n }", "title": "" }, { "docid": "23a2e090eb8321eb39bf72b4980622ab", "score": "0.7035782", "text": "public function registerUser() {\n\t\t\n\t\t$configRArray = $this -> CI -> config -> item('registerCheck');\n\t\t\n\t\t$this -> error = FALSE;\n\t\t\n\t\t// Check if somthing empty\n\t\tforeach( $configRArray as $field ) {\n\t\t\t\n\t\t\t$checkEmpty = trim( $this -> userData[$field] );\n\n\t\t\tif( empty( $checkEmpty ) ) {\n\t\t\t\t\n\t\t\t\t$this -> errorData['error_'.$field] = 'U hebt '. $field .' niet ingevuld!<br />';\n\t\t\t\t$this -> error = TRUE;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// Check the passwords\n\t\tif( $this -> error == FALSE ) {\n\n\t\t\tif( !$this -> checkPassword() ) {\n\t\t\t\t\n\t\t\t\t$this -> error = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check e-mail\n\t\tif( $this -> error == FALSE ) {\n\t\t\t\n\t\t\tif( $this -> error_email_adress ) {\n\t\t\t\t\n\t\t\t\t$this -> error = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Make the user in the database\n\t\tif( $this -> error == FALSE ) {\n\n\t\t\t$configDbArray = $this -> CI -> config -> item('registerDb');\n\t\t\t\n\t\t\tforeach( $configDbArray as $fieldName => $dbName ) {\n\t\t\t\t\n\t\t\t\t$dbArray[$dbName] = addslashes( $this -> userData[$fieldName] );\n\t\t\t}\n\t\t\t\n\t\t\tif( !$this -> CI -> mbInsert -> user($dbArray) ) {\n\t\t\t\t\n\t\t\t\t$this -> errorData['error_database'] = 'De gebruiker kon niet worden aangemaakt in de database.<br />';\n\t\t\t\t$this -> error = TRUE;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "1e3a1ac8887188f14ec79df88471a6b3", "score": "0.7007235", "text": "public function register() {\n $user_service = new UserService($this->cnx);\n echo $user_service->registerUser([\n \"device_id\" => $_POST[\"device_id\"],\n \"user_type\" => $_POST[\"user_type\"],\n \"first_name\" => $_POST[\"first_name\"],\n \"last_name\" => $_POST[\"last_name\"],\n \"email\" => $_POST[\"email\"],\n \"password\" => $_POST[\"password\"],\n ]);\n }", "title": "" }, { "docid": "54b0a4bef209be24bfaf15b8f2cb6528", "score": "0.7003736", "text": "public function register()\n {\n $user = $this->Users->newEntity($this->request->data);\n\n if ($this->request->is('post'))\n {\n if ($this->Users->save($user))\n {\n // $firstName = $user->first_name;\n // $lastName = $user->last_name;\n // $fullName = $firstname.\" \".$lastName;\n // $this->set('fullNam1e', $fullName);\n // echo $firstName;\n // echo $lastName;\n\n //$query = \"CREATE TABLE log_\".$firstName.\"_\".$lastName.\"\";\n\n $this->redirect(['action' => 'login']);\n }\n }\n }", "title": "" }, { "docid": "d8a003d09df694229c36fad246647dc2", "score": "0.69997025", "text": "function register_user(){\n}", "title": "" }, { "docid": "6a8a5b5db71e6a7a82420a8faa11b0d6", "score": "0.69893837", "text": "public function register()\n {\n if ($this->validate()) {\n if ($this && $this->save(false)) {\n Yii::$app->getResponse()->redirect('login');\n } else {\n // Yii::$app->getResponse()->redirect('login');\n }\n }\n }", "title": "" }, { "docid": "15459baf157f5a3c785874a86606228a", "score": "0.69890964", "text": "public function registerNewUser() {\n\t\t// check if user name already exists.\n\t\t//checkNewUserName()\n\t}", "title": "" }, { "docid": "7738d43043de665e2c02c8ae49ceec22", "score": "0.6948986", "text": "public function register()\r\n {\r\n\r\n\r\n $conn = DB::Connection();\r\n $statement = $conn->prepare('INSERT INTO user (email, username, password) values (:email, :username, :password)');\r\n $email = $this->getEmail();\r\n $username = $this->getUsername();\r\n $password = $this->getPassword();\r\n //$confirm_password = $this->getConfirm_password();\r\n\r\n\r\n $statement->bindvalue(\":email\", $email);\r\n $statement->bindvalue(\":username\", $username);\r\n $statement->bindvalue(\":password\", $password);\r\n\r\n $statement->execute();\r\n }", "title": "" }, { "docid": "9ff0eb1fa0ee9e63499e619a1d503dee", "score": "0.6936899", "text": "public function register() {\n if (empty($_POST)) header('location: ' . URL . 'error?not-post');\n \n $params = $_POST;\n $User = new User();\n \n $insert = $User->insert([\n 'password' => $params['password'],\n 'fullname' => $params['fullname'],\n 'email' => $params['email'],\n 'gender' => $params['gender'],\n 'security_question_id' => $params['question'],\n 'answer' => $params['answer']\n ]);\n \n if ($insert) {\n Auth::setUserId($insert);\n Auth::setAuthenticated(TRUE);\n \n header('location: ' . URL);\n } else {\n header('location: ' . URL . 'error');\n }\n }", "title": "" }, { "docid": "15c13e7eb07caf7adf1fd773ca2d8020", "score": "0.6935893", "text": "public function register()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Curatarea datelor venite prin POST\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // Init data\n $data = [\n 'username' => trim($_POST['username']),\n 'email' => trim($_POST['email']),\n 'password' => trim($_POST['password']),\n 'confirmPassword' => trim($_POST['confirmPassword']),\n 'usernameError' => '',\n 'emailError' => '',\n 'passwordError' => '',\n 'confirmPasswordError' => ''\n ];\n\n // Validare Email\n if (empty($data['email'])) {\n $data['emailError'] = 'Pleae enter email';\n } else {\n // Check email\n if ($this->userModel->findUserByEmail($data['email'])) {\n $data['emailError'] = 'Email is already taken';\n }\n }\n\n // Validare username\n if (empty($data['username'])) {\n $data['usernameError'] = 'Pleae enter name';\n }\n\n // Validare parola\n if (empty($data['password'])) {\n $data['passwordError'] = 'Please enter password';\n } elseif (strlen($data['password']) < 6) {\n $data['passwordError'] = 'Password must be at least 6 characters';\n }\n\n // Validare confirmare parola\n if (empty($data['confirmPassword'])) {\n $data['confirmPasswordError'] = 'Please confirm password';\n } else {\n if ($data['password'] != $data['confirmPassword']) {\n $data['confirmPasswordError'] = 'Passwords do not match';\n }\n }\n\n // Ne asiguram ca erorile sunt goale\n if (empty($data['emailError']) && empty($data['usernameError']) && empty($data['passwordError']) && empty($data['confirmPasswordError'])) {\n\n // Hash parola\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n\n // Register utilizator\n if ($this->userModel->register($data)) {\n flash('register_success', 'You are registered and can log in');\n redirect('users/login');\n } else {\n die('Something went wrong');\n }\n\n } else {\n // Incarcare Views cu erori\n $this->view('users/register', $data);\n }\n\n } else {\n // Init data\n $data = [\n 'username' => '',\n 'email' => '',\n 'password' => '',\n 'confirmPassword' => '',\n 'usernameError' => '',\n 'emailError' => '',\n 'passwordError' => '',\n 'confirmPasswordError' => ''\n ];\n\n // Load view\n $this->view('users/register', $data);\n }\n }", "title": "" }, { "docid": "b4155e281962eabceb76392d4bb0b69f", "score": "0.69352055", "text": "public function registerUser() {\n $username = basename(FILTER::get('REQUEST', 'user'));\n $nickname = basename(FILTER::get('REQUEST', 'nick'));\n if (!$this->checkUserName($username, 'Name')) {\n throw new Exception('Invalid user');\n }\n if (!$this->checkUserName($nickname, 'Nick')) {\n throw new Exception('Invalid nick');\n }\n if (!$this->checkPassword(FILTER::get('REQUEST', 'password'), FILTER::get('REQUEST', 'confirm'))) {\n throw new Exception('Invalid password');\n }\n if (file_exists(USERS.$username)) {\n throw new Exception('User with this username already exists');\n }\n $email = FILTER::get('REQUEST', 'email');\n if (!CMS::call('FILTER')->validEmail($email)) {\n throw new Exception('Invalid email');\n }\n global $LANG;\n $userdata = FILTER::get('REQUEST', 'fields');\n #\n # Also we must set a md5 hash of user's password to userdata\n #\n $user['user'] = $username;\n $user['nick'] = $nickname;\n $user['password'] = md5(FILTER::get('REQUEST', 'password'));\n $user['email'] = $email;\n #\n # Parse some system fields.\n #\n $user['tz'] = $userdata['tz'];\n $user['access'] = 1;\n $user['rights'] = '';\n $user['status'] = '';\n $user['stars'] = 0;\n $user['regdate'] = time();\n $user['visits'] = 1;\n $user['lastvisit'] = $user['regdate'];\n $user['posts'] = 0;\n $user['comments'] = 0;\n $user['topics'] = 0;\n $user['replies'] = 0;\n $user['blocked'] = 0;\n $user['website'] = $userdata['website'];\n $user['country'] = $userdata['country'];\n $user['city'] = $userdata['city'];\n $user['last_prr'] = 0;\n if (self::saveUserData($username, $user)) {\n CMS::call('LOG')->logPut('Note', self::$user['user'], 'Registation');\n #\n # Create user's PM file\n #\n return file_put_contents(PM_DATA.$username, json_encode(['inbox' => [], 'outbox' => []], JSON_UNESCAPED_UNICODE), LOCK_EX);\n }\n CMS::call('LOG')->logError('Cannot save profile '.$username);\n throw new Exception('Cannot save profile');\n }", "title": "" }, { "docid": "1c4c3331e3400b7d8caf7880d3f0778a", "score": "0.6929573", "text": "public function newUser($firstname, $gender, $lastname, $username, $email, $zip, $birthdate, $pw, $pw2){\n \n $user = new User();\n $ulregister = new Login();\n $m = \"\";\n \n if(isset($firstname) && !empty($firstname) && $firstname!=\"\"){\n \n $user->firstname = $firstname;\n }\n else{\n $m .= \"Fornavn ikke satt</br>\";\n }\n \n // Checks for valid input for lastname.\n if(isset($lastname) && !empty($lastname) && $lastname!=\"\"){\n \n $user->lastname = $lastname;\n }\n else{\n $m .= \"Etternavn ikke satt</br>\";\n }\n \n if(isset($birthdate) && !empty($birthdate) && $birthdate < date(\"Y\", time())-10 && $birthdate > 1900 ){\n \n $user->yearborn = $birthdate;\n }\n else{\n $m .= \"Født år ikke satt eller du er for ung.</br>\"; \n }\n \n if(!$user->usernameExists($username) && $username != \"\"){\n \n $user->username = $username;\n \n }\n else{\n $m .= \"Brukernavn er tomt eller eksisterer fra før<br>\";\n }\n \n \n if(!Login::existingEmail($email) && preg_match('/^[a-z0-9&\\'\\.\\-_\\+]+@[a-z0-9\\-]+\\.([a-z0-9\\-]+\\.)*+[a-z]{2}/is', $email)){\n \n $ulregister->email = $email;\n \n }\n else{\n \n $m .= \"Mailadressen er enten registert eller skrevet feil. <br>\";\n }\n \n if($gender == 'male' || $gender == 'female'){\n \n $user->sex = $gender;\n }\n else{\n $m .= 'Du må velge kjønn!<br>';\n }\n \n if($zip != \"\" && Location::zipcodeExists($zip)){\n \n $user->zipcode = $zip;\n }\n else{\n $m .= \"Postnummeret eksister ikke<br>\";\n }\n \n \n \n \n \n if($pw == $pw2){\n \n if (preg_match(\"#.*^(?=.{6,20})(?=.*[a-å])(?=.*[A-Å])(?=.*[0-9]).*$#\", $pw)){\n\n $ulregister->password = sha1($pw);\n \n\n\n\n }\n else{\n $m .= \"Passordet ditt er for svakt, vennligst bruk minimum 6 tegn, Minimum en stor bokstav og tall<br>\";\n }\n \n \n }else{\n $m .= \"Passordene du har skrevet inn stemmer ikke overens.<br>\";\n }\n \n if($m ==\"\" && empty($m)){\n \n $activtedstring = $ulregister->createaAString($email, $ulregister->password);\n $ulregister->activatestring = $activtedstring;\n $user->save();\n $userid = $user->id;\n $ulregister->user_id = $userid;\n\n $ulregister->save();\n /*\n $to = $uregisteremail;\n $subject = \"Ny Bruker i Forbrukermakt.com\";\n $message = \"Velkommen som ny bruker hos forbrukermakt.com, for å kunne bruke din konto er du nødt til å aktivere denne, det gjør du \n på følgende side= http://localhost/aktivering.php?activ={$activtedstring}\";\n $from = \"noreply@flowershopfucker.no\";\n $headers = \"From:\" . $from;\n mail($to,$subject,$message,$headers);\n */\n redirect_to(\"/public/activation.php?activ={$activtedstring}\");\n }\n else{\n return $m;\n\n }\n \n }", "title": "" }, { "docid": "5319fb099f171058e203038d313cfcc5", "score": "0.69065416", "text": "public function addUser($login,$pasword,$email){\n $response = Database::getDB()->prepare('INSERT INTO personne SET login=:login, password=:password, email=:email,role = 1,isActive=1');\n $response->execute([':login' => $login, ':password' => password_hash($pasword, PASSWORD_DEFAULT), ':email' => $email]);\n\n $response->closeCursor(); \n }", "title": "" }, { "docid": "79c3b56a754452570755600843263056", "score": "0.6896515", "text": "public function loginUser() {\n SessionUtilities::createSession('User', $this->username);\n /* Added userType */\n $this->setUsersTypeInSession();\n }", "title": "" }, { "docid": "30ae2b89dc2d7918d01d90e64f56dcfb", "score": "0.68913954", "text": "public function register()\n {\n $request = Request::createFromGlobals();\n $email = FormValidator::purify($request->get('email'));\n $username = FormValidator::purify($request->get('username'));\n $password = FormValidator::purify($request->get('password'));\n $passwordConfirm = FormValidator::purify($request->get('password_confirm'));\n\n if (!FormValidator::is_alphanum($username)) {\n $this->session->set('warning', \"Votre pseudo n'est pas valide\");\n $this->registerView();\n\n } elseif (!FormValidator::is_alphanum($password) || !FormValidator::is_alphanum($passwordConfirm)) {\n $this->session->set('warning', \"Votre mot de passe n'est pas valide\");\n $this->registerView();\n\n } elseif (!FormValidator::is_email($email)) {\n $this->session->set('warning', \"Votre email n'est pas valide\");\n $this->registerView();\n\n } else {\n\n if ($this->loginManager->isMemberExists($username, $email)) {\n if ($this->loginManager->checkPassword($password, $passwordConfirm)) {\n\n $this->loginManager->registerUser($username, $password, $email);\n $this->formManager->registerTraitment($email, $username);\n $this->session->set('success', \"Votre inscription a bien été prise en compte\");\n $this->login();\n\n } else {\n $this->session->set('warning', \"Les mots de passe ne sont pas identiques\");\n $this->registerView();\n }\n\n } else {\n $this->session->set('warning', \"Cet utilisateur existe déjà\");\n $this->registerView();\n }\n }\n }", "title": "" }, { "docid": "a7f698eeb0197721cfdff56ab7d06d4d", "score": "0.68760043", "text": "public function registerUser()\n {\n $user = new User;\n\n if($user->save())\n {\n Auth::loginUsingId($user->id);\n return Redirect::to('account/profile')->with('message','Thanks for register!');\n }\n else\n {\n return Redirect::to('register')->withErrors($user->errors())->withInput();\n }\n }", "title": "" }, { "docid": "e4f4537a7aac6681304ed8441c7bc66c", "score": "0.68575156", "text": "public function DoRegister() : void {\n\n if (!$this->auth()) {\n if (\n isset ($_POST ['email'])\n && isset ($_POST ['password'])\n && isset ($_POST ['password2'])\n && isset ($_POST ['username'])) {\n try {\n $validate = new Validation ();\n $validate->email($_POST ['email']);\n $validate->userName($_POST ['username']);\n $validate->password($_POST ['password']);\n $validate->comparePasswords($_POST ['password'], $_POST ['password2']);\n\n $h = new Humphree(Picnic::getInstance());\n\n $userID = $h->addUser($_POST ['username'], $_POST ['email'], $_POST ['password']);\n\n if ($userID != 0) {\n unset ($_POST ['email']);\n unset ($_POST ['password']);\n unset ($_POST ['password2']);\n unset ($_POST ['username']);\n\n $this->sendActivationEmail($userID);\n\n header('Location: ' . BASE . '/Account/RegisterSuccess');\n } else {\n $view = new View();\n\n if (isset($_SESSION['error'])) {\n $view->SetData('error', $_SESSION['error']);\n unset($_SESSION['error']);\n }\n\n $view->SetData('navData', new NavData(NavData::Account));\n $view->Render('register');\n }\n } catch (ValidationException $e) {\n $_SESSION['error'] = $e->getError();\n header('Location: ' . BASE . '/Account/Register');\n }\n } else {\n header('Location: ' . BASE . '/Account/Register');\n }\n } else {\n header('Location: ' . BASE . '/Home');\n }\n }", "title": "" }, { "docid": "0a98c77e90a5ba703e81bfe53f057268", "score": "0.68276244", "text": "public function login()\n {\n $validate = new UserFormValidator();\n if ($this->isLoggedIn()) {\n $this->redirect('');\n }\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') { \n \n $user = new User($this->db);\n if (!$validate->validateLoginForm($_POST)) {\n $data = $validate->getErrors(); \n return $this->render(\"users/login\", $data);\n } \n $userDTO = $user->findByEmail($_POST['email']);\n \n if (null == $userDTO) {\n flash('register_success','Invalid credentials!', 'alert alert-danger' );\n return $this->render(\"users/login\");\n }\n\n $userPasswordHash = $userDTO->getPassword();\n\n if (!password_verify($_POST['password'], $userPasswordHash)) {\n flash('register_success','Invalid password!', 'alert alert-danger' );\n return $this->render(\"users/login\");\n }\n $this->createUserSession($userDTO); \n return $this->redirect(\"\");\n \n } else {\n \n $this->render(\"users/login\");\n } \n }", "title": "" }, { "docid": "c92ec3ea591d0c5f9a8c450e04c6f866", "score": "0.6824909", "text": "public function login()\r\n\t{\r\n\t}", "title": "" }, { "docid": "b387025e63a4de039552b908ea783b15", "score": "0.68238556", "text": "private function _register()\n {\n $this->load->model('LoginModel');\n $this->LoginModel->register('admin', 'password', 'John', 'Doe');\n }", "title": "" }, { "docid": "68021881687d1ba035953e1e541aab8b", "score": "0.68175715", "text": "public function registerAction() {\n if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])) {\n try {\n $currentDate = new \\DateTime('NOW');\n\n $database = new Connection();\n $db = $database->openConnection();\n\n $sql = \"SELECT MAX(id) FROM platform_user\";\n foreach ($db->query($sql) as $row) {}\n\n $stm = $db->prepare(\n \"INSERT INTO platform_user (\n id,\n username,\n email,\n password,\n roles,\n first_name,\n last_name,\n brief_info,\n date_of_creation,\n date_of_change\n ) VALUES (\n :id,\n :username,\n :email,\n :password,\n :roles,\n :first_name,\n :last_name,\n :brief_info,\n :date_of_creation,\n :date_of_change\n )\"\n );\n $stm->execute([\n ':id' => (int) $row['max'] + 1,\n ':username' => $_POST['username'],\n ':email' => $_POST['email'],\n ':password' => password_hash($_POST['password'], PASSWORD_BCRYPT),\n ':roles' => implode(';', ['ROLE_USER']),\n ':first_name' => $_POST['firstName'],\n ':last_name' => $_POST['lastName'],\n ':brief_info' => $_POST['briefInfo'],\n ':date_of_creation' => $currentDate->format('Y-m-d H:i:s'),\n ':date_of_change' => $currentDate->format('Y-m-d H:i:s')]\n );\n\n $this->redirect('/login');\n } catch (PDOException $e) {\n echo \"There is some problem in connection: \" . $e->getMessage();\n }\n }\n\n View::renderTemplate('Registration/register.html.twig');\n }", "title": "" }, { "docid": "fac5abb56018e4ed392e14e97d9a72ac", "score": "0.68164265", "text": "public function register(){\n\n //title & sidebar\n $categorySidebar = true;\n $title = 'Registreren';\n\n //post komt terug in deze action voor validatie\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\n\n $errors = array();\n $values = array();\n\n $firstName = $lastName = $userName = $password =\n $repeatPassword = $email = $keeploggedin =null;\n\n //nieuwe UserRegistrationViewModel aanmaken en valideren\n if(isset($_POST['firstName'])){\n $firstName = trim($_POST['firstName']);\n }\n if(isset($_POST['lastName'])){\n $lastName = trim($_POST['lastName']);\n }\n if(isset($_POST['userName'])){\n $userName = trim($_POST['userName']);\n }\n if(isset($_POST['password'])){\n $password = trim($_POST['password']);\n }\n if(isset($_POST['repeatPassword'])){\n $repeatPassword = trim($_POST['repeatPassword']);\n }\n if(isset($_POST['email'])){\n $email = trim($_POST['email']);\n }\n if(isset($_POST['keeploggedin'])){\n $keeploggedin = $_POST['keeploggedin'];\n }\n\n\n\n $userRegistrationViewModel = new UserRegistrationViewModel(null, $firstName, $lastName, $userName,\n $password, $email, null, null, false, $repeatPassword);\n $urvmValidator = new UserRegistrationViewModelValidator($userRegistrationViewModel);\n $errors = $urvmValidator->getErrors();\n $values = $urvmValidator->getValues();\n\n if($this->isValidPost($errors)){\n\n //password en userName hash\n $user = $urvmValidator->getUser();\n $user->setUserName(md5($user->getUserName()));\n $user->setPassword(md5($user->getPassword()));\n\n //als user is toegevoegd aan de database: inloggen en eventueel cookie setten\n if($userAdded = UserDb::insertWithoutAddressIds($urvmValidator->getUser())){\n $values=array();\n $this->startSession();\n\n $user = UserDb::getByUsernameAndPassword(md5($userName),md5($password));\n\n $_SESSION['user'] = $user;\n $_SESSION['admin'] = $user->isAdmin();\n\n if($keeploggedin){\n setcookie('keeploggedin',\n \"{$user->getUserName()}:{$user->getPassword()}\",\n time() + 60 *60 *24*7);\n }\n }\n };\n }\n\n $view = ROOT . '/views/User/register.php';\n require_once ROOT . '/views/layout.php';\n }", "title": "" }, { "docid": "aa2d15d6d72f5de62ebb1e7fb1d132a0", "score": "0.68139666", "text": "public function register()\n {\n if ($this->isAdminAvailable() && $this->isEmailAndPhoneAvailable()) {\n if ($this->accountType === 'Store Owner'){\n // Primary indices: email - 0, phone - 1, password - 2, account type - 9\n $data = array($this->email, $this->phone, $this->password, $this->firstName, $this->lastName, $this->address, $this->city, $this->country, $this->zipcode, $this->accountType, $this->businessName, $this->storeName, $this->storeType);\n\n $registerInfo = implode('|',$data);\n file_put_contents(\"../storeOwners.txt\", $registerInfo.PHP_EOL, FILE_APPEND);\n echo '<p style=\"text-align:center\"><b>Successfully registered!</b></p><br>';\n echo '<p style=\"text-align:center\"><b>Redirecting to login page in 3 seconds...</b></p><br>';\n header(\"refresh:3; url=login.php\");\n die();\n }\n else {\n $data = array($this->email, $this->phone,$this->password, $this->firstName, $this->lastName, $this->address, $this->city, $this->country, $this->zipcode, $this->accountType);\n $registerInfo = implode('|',$data);\n file_put_contents(\"../users.txt\", $registerInfo.PHP_EOL, FILE_APPEND);\n echo '<p style=\"text-align:center\"><b>Successfully registered!</b></p><br>';\n echo '<p style=\"text-align:center\"><b>Redirecting to login page in 3 seconds...</b></p><br>';\n header(\"refresh:3; url=login.php\");\n die();\n }\n }\n else {\n header(\"Location: register.php?alreadyExists=true\");\n die();\n } \n }", "title": "" }, { "docid": "58f04d006015c4934770c031601dd7f7", "score": "0.67989737", "text": "abstract function login();", "title": "" }, { "docid": "610c829973b2074b43e030a9854b3d60", "score": "0.6797758", "text": "public static function create_user(){\n if (!hash_equals($_SESSION['key'], $_POST['token'])){\n echo '{\"status\":\"0\",\"message\":\"Invalid token\"}';\n exit;\n }\n\n\n // check if passwords mathces\n if($_POST['txtPassword'] != $_POST['txtConfirmPassword']){\n echo '{\"status\":\"0\",\"message\":\"Passwords don\\'t match\"}';\n exit;\n }\n\n // check length of password\n if(strlen($_POST['txtPassword']) < 8 ){\n echo '{\"status\":\"0\",\"message\":\"Password should be at least 8 characters\"}';\n exit;\n }\n\n // check length of username\n if (strlen($_POST['txtUsername']) < 4 || strlen($_POST['txtUsername']) > 20) {\n echo '{\"status\":\"0\",\"message\":\"Username should be between 6 and 20 character\"}';\n exit;\n }\n //Preventing the user to create admin or moderator \n if($_POST['txtUsername'] === 'admin' || $_POST['txtUsername'] === 'moderator' ){\n echo '{\"status\":\"0\",\"message\":\"Reservated usernames\"}';\n exit;\n }\n if ($_POST['txtUsername'] === 'admin' ||\n $_POST['txtUsername'] === 'moderator' ||\n strpos($_POST['txtUsername'], 'admin') !== false ||\n strpos($_POST['txtUsername'], 'moderator') !== false) {\n echo '{\"status\":\"0\",\"message\":\"Reserved username\"}';\n exit;\n }\n\n // check if it valid email\n if (!filter_var($_POST['txtEmail'], FILTER_VALIDATE_EMAIL)) {\n echo '{\"status\":\"0\",\"message\":\"Enter valid email\"}';\n exit;\n }\n // check if the fields are empty\n if (empty($_POST['txtUsername']) ||\n empty($_POST['txtEmail']) ||\n empty($_POST['txtPassword']) ||\n empty($_POST['txtConfirmPassword'])) {\n echo '{\"status\":\"0\",\"message\":\"Please fill all the fields\"}';\n exit;\n }\n\n // Validate password strength\n $uppercase = preg_match('@[A-Z]@', $_POST['txtPassword']);\n $lowercase = preg_match('@[a-z]@', $_POST['txtPassword']);\n $number = preg_match('@[0-9]@', $_POST['txtPassword']);\n $specialChars = preg_match('@[^\\w]@', $_POST['txtPassword']);\n\n if (!$uppercase || !$lowercase || !$number || !$specialChars || strlen($_POST['txtPassword']) < 8) {\n echo '{\"status\":\"0\",\"message\":\"The password is too weak\"}';\n die();\n }\n\n //hash the password\n $user_password = password_hash($_POST['txtPassword'], PASSWORD_BCRYPT);\n // trim variables\n $username = $_POST['txtUsername'];\n $email = trim($_POST['txtEmail']);\n\n $token = bin2hex(openssl_random_pseudo_bytes(16));\n $user_class = new Users;\n $user_class->sign_up_user($username, $user_password, $email, $token);\n }", "title": "" }, { "docid": "0d3c4277900c0ad5eacb1317af52f222", "score": "0.6795673", "text": "public function doRegistration()\n {\n //your form name fields must match the ones of the table fields\n $user = new User(Post::getAll());\n $user -> role='passageiro';\n\n if($user->is_valid()){\n $user->save();\n Redirect::toRoute('login/login');\n } else {\n //redirect to form with data and errors\n Redirect::flashToRoute('login/registration', ['user' => $user]);\n }\n }", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.6782666", "text": "public function login()\n {\n }", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.6782666", "text": "public function login()\n {\n }", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.6782666", "text": "public function login()\n {\n }", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.6782666", "text": "public function login()\n {\n }", "title": "" }, { "docid": "ef7386a8d7831322ad1b7fb697b552ce", "score": "0.6782666", "text": "public function login()\n {\n }", "title": "" }, { "docid": "e2d7cd6a5b055b87edab57987b8c24a9", "score": "0.6775364", "text": "public function login()\n {\n \n }", "title": "" }, { "docid": "2eee9263b6e1490293285a2f32e937fa", "score": "0.6769537", "text": "public function post_login()\n\t{\n\t\t$email = Input::post('email');\n\t\t$pass = Input::post('password');\n\n\t\t$user = Model_Users::find('all', array('where' => array(array('email', $email),)));\n\n\t\tif(isset($email))\n {\n \tif(isset($pass))\n \t{\n \t\tif (!empty($user))\n\t\t\t\t{\n\t\t\t\t\tforeach ($user as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$id = $user[$key]->id;\n\t\t\t\t\t\t$email = $user[$key]->email;\n\t\t\t\t\t\t$password = $user[$key]->password;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse return $this->notice($code = 'ERROR', $message = 'EMAIL ENTERED WRONG OR NOT REGISTERED.');\n\n\t\t\t\tif ($email == $email and $password == $pass)\n\t\t\t\t{\n\t\t\t\t\t$token = array(\n\t\t\t\t\t\t\"id\" => $id, \n\t\t\t\t\t\t\"email\" => $email, \n\t\t\t\t\t\t\"password\" => $password\n\t\t\t\t\t);\n\n\t\t\t\t\t$jwt = JWT::encode($token, $this->key);\n\n\t\t\t\t\treturn $this->notice($code = 'SUCCESSFUL ACTION', $message = $jwt);\n\t\t\t\t}\n\t\t\t\telse return $this->notice($code = 'ERROR', $message = 'PASSWORD ENTERED WRONG.');\n\t\t\t}\n\t\t\telse return $this->notice($code = 'ERROR', $message = 'REQUIRE PASSWORD.');\n\t\t}\n\t\telse return $this->notice($code = 'ERROR', $message = 'REQUIRE EMAIL.');\n\t}", "title": "" }, { "docid": "ff88570d3534fa20b6c203532910e9c5", "score": "0.6766653", "text": "public function register()\n {\n $user = new User();\n $user->email = $this->email;\n $user->new_pass = $this->password;\n $user->re_new_pass = $this->password_confirm;\n $user->username = $this->username;\n $user->type = $this->type;\n $user->phone = $this->phone;\n $user->created_at = time();\n $user->status = User::STATUS_DEACTIVE;\n if ($user->save())\n {\n $user->createUserType();\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "3c688270a0d26b3835e327a80005a3de", "score": "0.6764738", "text": "public function authUser($sloginusername,$sloginpassword){\n $sloginpassword1 = sha1($sloginpassword); // creates a crypted variable for the password\n\n\t$found_user = Login::auth($sloginusername, $sloginpassword1); /// Check database to see if username/password exist.\n\t\n\n if ($found_user) {// if the user exist do make a login object and a user object, and store theese in the database \n \n $uactivedo = new Login();\n $ulogins = Login::find_all();\n \n\n// This FOREACHloop get runs through all the login object until it finds a wich matches the email,then we\n// checks that the activeted variable is set to one. If so you can log inn. If not you get an\n// error message of that you have not activted your account.\n \n\n foreach($ulogins as $uactivedo){\n if ($uactivedo->email == $sloginusername){\n\n $uactiveone = $uactivedo->activated ;\n $auserid= $uactivedo->id;\n\n }\n }\n\n if($uactiveone==1){ // Checks if your account is activeted, if so u get get loggin in by session and redirected to admin area.\n $session = new Session();\n $session->login($found_user);\n\n redirect_to(\"view/admin/index.php\");\n }else{\n return \"bruker ikke aktivert!\";\n }\n } else {\n // username/password combo was not found in the database\n return \"Username/password combination incorrect.\";\n }\n \n }", "title": "" }, { "docid": "a287bc09dcc0f8a36027e2e8bc1a9096", "score": "0.675273", "text": "public function register() {\n // create/read session, absolutely necessary\n\n if (session_status() == PHP_SESSION_NONE && !headers_sent()) {\n session_start();\n }\n\n // check the possible login actions:\n // if user tried to log out (happen when user clicks logout button)\n if (isset($_GET[\"logout\"])) {\n $this->doLogout();\n } // login via post data (if user just submitted a login form)\n else if (isset($_POST[\"login\"])) {\n $username = isset($_POST['userName']) ? $_POST['userName'] : \"\";\n $password = isset($_POST['userPassword']) ? $_POST['userPassword'] : \"\";\n $this->doLogin($username, $password);\n }\n $this->showError();\n }", "title": "" }, { "docid": "f625f2461570b916e5ce00563c808f30", "score": "0.6746764", "text": "public function registerUser($user);", "title": "" }, { "docid": "fed0c564c3e7957da30af971ad1f4bc8", "score": "0.6745978", "text": "public function register()\n {\n $data = Request::all();\n // Si tous les champs ont été remplis\n \tif (!Validator::array_has_empty($data)) {\n \t\t// Si le password et la confirmation sont identiques\n \t\tif ($data['password'] == $data['password2']) {\n\n \t\t\t// Si l'email existe déjà dans la db -> erreur\n \t\t\tif ($this->User->findByMail($data['mail'])) {\n \t\t\t\t$this->setFlash(\"This email is already used\", 'warning');\n \t\t\t\t$this->view->render('users/register');\n \t\t\t}\n \t\t\t// Sinon on crée l'utilisateur et on le redirige vers l'index\n \t\t\telse {\n\n \t\t\t\t$this->User->save($data);\n $_SESSION['user'] = $data;\n $_SESSION['user']['role'] = \"member\";\n unset($_SESSION['user']['password'], $_SESSION['user']['password2']);\n \t\t\t\t$this->setFlash(\"You are successfully registered\", 'success');\n \t\t\t\t//$this->login();\n \t\t\t\t$this->view->redirect_to('user/index');\n \t\t\t}\n\n \t\t} else {\n \t\t\t$this->setFlash(\"Not same passwords\", 'warning');\n \t\t\t$this->view->render('users/register');\n \t\t}\n\n \t} elseif($data && Validator::array_has_empty($data)) {\n $this->setFlash(\"Please fill all the fields\", 'warning');\n $this->view->render('users/register');\n\n } else {\n \t $this->view->render('users/register');\n }\n }", "title": "" }, { "docid": "de6390c90fa513036165647d6e9fa6a4", "score": "0.6739674", "text": "public function register()\n\t{\n\t\t$username = $this->input->post('userid');\n\t\t$email = $this->input->post('email');\n\t\t$password = $this->input->post('pword');\n\n\t\t$this->auth_model->register_user(array(\n\t\t\t$username,\n\t\t\t$email,\n\t\t\tpassword_hash($password, PASSWORD_DEFAULT)\n\t\t));\n\n\t\tif (password_verify($password, $user->pword)) {\n\t\t\t// if sucessfull redirects to\n\t redirect('members/membership',@$data);\n\t\t}\n\t}", "title": "" }, { "docid": "51fd865e65e1917baff92ffc4eb02765", "score": "0.6733936", "text": "public function setNewUser(){\n\n if($this->isRegisterFormReady()){\n //Ingresar usuario a la base de datos.\n $sql = \"INSERT INTO Users (userMail, userName, userLastName ,userMonth,\n userDay, userYear, userPassword, userLogMonth, userLogYear) VALUES (:userMail, :userName, :userLastName, :userMonth, :userDay, :userYear, :userPassword, :userLogMonth, :userLogYear)\";\n\n //Preparar el statement\n $stmt = $this->connection->prepare($sql);\n\n //Guardar los parametros en la base de datos\n $stmt->bindParam('userMail', $this->userMail);\n $stmt->bindParam('userName', strtolower($this->userName));\n $stmt->bindParam('userLastName', strtolower($this->userLastName));\n $stmt->bindParam('userMonth', $this->userMonth);\n $stmt->bindParam('userDay', $this->userDay);\n $stmt->bindParam('userYear', $this->userYear);\n //Enviar la constrseña de forma protegida.\n $stmt->bindParam('userPassword', password_hash($this->userPassword, PASSWORD_BCRYPT ));\n $stmt->bindParam('userLogMonth', $this->userLogMonth);\n $stmt->bindParam('userLogYear', $this->userLogYear);\n\n if( $stmt->execute() ){\n header(\"Location: index.php\");\n //$message = \"Cuenta creada satisfactoriamente\";\n }else{\n $this->errorMessage = 'Ocurrio un error al crear tu cuenta intentalo otra vez';\n }\n }\n }", "title": "" }, { "docid": "19122981ad754288dde54ca311c468bc", "score": "0.6722038", "text": "private function RegisterUser()\n {\n $database = new Database();\n $password = sha1($_POST['pass1']);\n foreach (array(\"name\", \"surname\", \"email\", \"username\") as $campoForm) {\n $$campoForm = mysql_escape_string($_POST[$campoForm]);\n }\n $database->connect();\n $query = $database->Query(\"INSERT INTO utenti (NOME, COGNOME, EMAIL, USERNAME, PASSWORD) \" .\n \"VALUES ('$name','$surname','$email',$username','$password')\");\n $database->disconnect();\n }", "title": "" }, { "docid": "a581b700fa8bad80139585d11fb6c32a", "score": "0.6719115", "text": "public function registerUser()\n\t{\n\t\t$input = Input::all();\n\t try {\n\t \t$user = Sentry::register(array(\n\t\t 'email' => $input['email'],\n\t\t 'password' => $input['password'],\n\t\t 'first_name' => $input['firstName'],\n\t\t 'last_name' => $input['lastName'],\n\t\t 'activated' => 1\n\t\t ));\n\n\t \treturn 1;\n\t } catch (Exception $e) {\n\t \treturn 0;\n\t }\n\t \n\t}", "title": "" }, { "docid": "7c799542765d5ce3559771e8238519cc", "score": "0.67135656", "text": "public function LoginUser(){\n \n /** Zozbieranie zadaných údajov a prihlásenie */\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t$this->login->attributes=$_POST['LoginForm'];\n\t\t\t// Validacia prihlasenia a presmerovanie na pozadovanu stranku po prihlaseni\n\t\t\tif($this->login->validate() && $this->login->login()){\n //Ak prichadza z domovskej stranky tak presmerovanie na Dashboard\n if (Yii::app()->user->returnUrl == Yii::app()->homeUrl && Yii::app()->user->roles != 'admin')\n $this->redirect(Yii::app()->params->homePath.'/'.Yii::app()->language.'/dashboard');\n else //vsetci ostatni sa presmeruju tam kam pozaduju\n $this->redirect(Yii::app()->user->returnUrl);\n }\n \n\t\t\t\t\n\t\t}\n }", "title": "" }, { "docid": "2f7504f0407682ed3c882471970a63f0", "score": "0.67069197", "text": "public function registration()\n {\n\n\n $loginRepository = new LoginRepository();\n $passwortPattern = \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%èüÜÈéöÖÉÄÀäà_\\-?!'`^~\\]\\[£{}+*.°ç&()¢=]).{4,40})\";\n $errorMsg = null;\n $email = null;\n $nickname = null;\n $piss = '/Projekt_Bilder-DB/public'; // $GLOBALS['appurl'];\n if(isset($_POST['sendR'])) {\n $nickname = htmlspecialchars($_POST['nickname'], ENT_QUOTES, 'UTF-8');\n $email = htmlspecialchars($_POST['email'], ENT_QUOTES, 'UTF-8');\n $passwort = htmlspecialchars($_POST['passwort'], ENT_QUOTES, 'UTF-8');\n $v_passwort = htmlspecialchars($_POST['v_passwort'], ENT_QUOTES, 'UTF-8');\n if(empty($nickname) || empty($email) || empty($passwort) || empty($v_passwort)) {\n $errorMsg = $this->errMsg(\"empty\");\n }else {\n if(strlen($nickname) < 50 || strlen($nickname) > 3) {\n if(!$loginRepository->checkMail($email) > 0 && filter_var($email, FILTER_VALIDATE_EMAIL)) {\n if(preg_match($passwortPattern, $passwort) === 1){\n if($passwort == $v_passwort) {\n $loginRepository->addUser($nickname,$email,$passwort);\n $_SESSION[\"succMsg\"] = $this->errMsg(\"succ\");\n header(\"Location: \". $GLOBALS['appurl'] .\"/login\");\n }else {\n $errorMsg = $this->errMsg(\"vpasswort\"); // nicht gleiches Passwort\n }\n }else {\n $errorMsg = $this->errMsg(\"bpasswort\"); // schlechtes Passwort mind. 1Kleinbuchstaben, 1Grossbuchstaben, 1Zahl, 1Sonderzeichen und 5lang sein\n }\n\n }else {\n $errorMsg = $this->errMsg(\"mailInvalid\"); // mail gibt es schon oder ist ungültig\n }\n\n }else {\n $errorMsg = $this->errMsg(\"usrname\"); // username ungültig (zu lang oder zu kurz)\n }\n }\n\n\n\n }\n\n\n\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->error = $errorMsg;\n $view->mail = $email;\n $view->usr = $nickname;\n $view->display();\n }", "title": "" }, { "docid": "09f008040aeab30d688c20fd0e830d92", "score": "0.6696813", "text": "public function register()\n {\n $user = [\n 'name' => request('name'),\n 'email' => request('email'),\n 'password' => Hash::make(request('password')),\n ];\n if(User::create($user)){\n $credentials = request(['email', 'password']);\n if (! $token = auth('api')->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n return $this->respondWithToken($token);\n }else{\n return response()->json(['error' => 'error registering'], 401);\n }\n \n }", "title": "" }, { "docid": "52c381b5b5b38e1198467ed0bfb1a896", "score": "0.66935325", "text": "public function registerUser() {\n $request = new Request();\n $user = new User();\n\n $user->create($request->getData());\n }", "title": "" }, { "docid": "6e321bc6602f9567c54bb5227543639c", "score": "0.6692271", "text": "public function user_login()\n {\n echo \"This would be called on the user_register signal.\";\n }", "title": "" }, { "docid": "4c22e9b88a7bca21ea2dc40d4302baba", "score": "0.6690568", "text": "public function register() {\n $config = Config::current();\n if (!$config->can_register)\n error(__(\"Registration Disabled\"), __(\"I'm sorry, but this site is not allowing registration.\"));\n\n if (logged_in())\n error(__(\"Error\"), __(\"You're already logged in.\"));\n\n if (!empty($_POST)) {\n if (empty($_POST['login']))\n Flash::warning(__(\"Please enter a username for your account.\"));\n elseif (count(User::find(array(\"where\" => array(\"login\" => $_POST['login'])))))\n Flash::warning(__(\"That username is already in use.\"));\n\n if (empty($_POST['password1']))\n Flash::warning(__(\"Password cannot be blank.\"));\n elseif ($_POST['password1'] != $_POST['password2'])\n Flash::warning(__(\"Passwords do not match.\"));\n\n if (empty($_POST['email']))\n Flash::warning(__(\"E-mail address cannot be blank.\"));\n elseif (!preg_match(\"/^[_A-z0-9-]+((\\.|\\+)[_A-z0-9-]+)*@[A-z0-9-]+(\\.[A-z0-9-]+)*(\\.[A-z]{2,4})$/\", $_POST['email']))\n Flash::warning(__(\"Invalid e-mail address.\"));\n\n if ($config->enable_recaptcha and !check_captcha())\n Flash::warning(__(\"Incorrect captcha code. Please try again.\"));\n\n if (!Flash::exists(\"warning\")) {\n if ($config->email_activation) {\n $to = $_POST['email'];\n $subject = _f($config->name.\" Registration Pending\");\n $message = _f(\"Hello, \".fix($_POST['login']).\".\\n\\nYou are receiving this message because you recently registered at \".$config->chyrp_url.\"\\nTo complete your registration, go to \".$config->chyrp_url.\"/?action=validate&login=\".fix($_POST['login']).\"&token=\".sha1($_POST['login'].$_POST['email']));\n $headers = \"From:\".$config->email.\"\\r\\n\" .\n \"Reply-To:\".$config->email. \"\\r\\n\" .\n \"X-Mailer: PHP/\".phpversion() ;\n\n $user = User::add($_POST['login'], $_POST['password1'], $_POST['email'], '', '', '', false, 5);\n $sent = email($to, $subject, $message, $headers);\n\n if ($sent)\n Flash::notice(__(\"The email address you provided has been sent details to confirm registration.\"), \"/\");\n else\n Flash::notice(__(\"There was an error emailing the activation link to your email address.\"), \"/\");\n } else {\n $user = User::add($_POST['login'], $_POST['password1'], $_POST['email']);\n\n Trigger::current()->call(\"user_registered\", $user);\n\n $_SESSION['user_id'] = $user->id;\n\n Flash::notice(__(\"Registration successful.\"), \"/\");\n }\n }\n }\n\n $this->display(\"forms/user/register\", array(), __(\"Register\"));\n }", "title": "" }, { "docid": "f6ec9bb2d15e2f465ac4af6ea2f5fcde", "score": "0.66820097", "text": "public function register()\n \t{\n\t\ttry{\n\t\t\t// Check if exists\n\t\t\t$query=$this->con->prepare(\"SELECT * FROM user WHERE email=:email\");\n\t\t\t$query->bindParam(':email', $this->email);\n\t\t\t$query->execute();\n\t\t\t\n\t\t\t$result = $query -> fetch(PDO::FETCH_ASSOC);\n\n\t\t\t// check for empty result\n\t\t\tif (isset($result) && isset($result['email'])) {\n\t\t\t\t// user found - already registered\n\t\t\t\t$this->error['success'] = 1;\n\t\t\t\t$this->error['message'] = 'Esta email já se encontra registado.';\n\n\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t$this->con->beginTransaction();\n// print '<br><br><br><br><br><br><br><br><br>email: '.$this->email;\t\t\t\t\n// print '<br>name: '.$this->name;\t\t\t\t\n// print '<br>uid: '.$this->token;\t\t\t\t\n// print '<br>companyid: '.$this->companyid;\t\t\t\t\n// print '<br>uadmin: '.$this->uadmin;\t\t\t\t\n// print '<br>password: '.SHA1($this->password);\t\t\n\n\t\t\t\t// inserting new user\n\t\t\t\t$query = $this->con->prepare(\"\n INSERT INTO user(email, name, phonenumber, taxnumber, uid, pass, admin, status, deliveryname, deliverystreet, deliveryzipcode, deliverycity, invoicename, invoicestreet, invoicezipcode, invoicecity, creationdate) \n VALUES (:email, :name, :phonenumber, :taxnumber, :uid, :pass, :admin, :status, :deliveryname, :deliverystreet, :deliveryzipcode, :deliverycity, :invoicename, :invoicestreet, :invoicezipcode, :invoicecity, CURRENT_TIMESTAMP)\n \");\n\n\t\t\t\t$result = $query->execute(array(\n\t\t\t\t\t\"email\" \t\t => $this->email,\n\t\t\t\t\t\"name\" \t\t \t => $this->name,\n\t\t\t\t\t\"phonenumber\" \t => $this->phonenumber,\n\t\t\t\t\t\"taxnumber\" \t => $this->taxnumber,\n\t\t\t\t\t\"uid\" \t => $this->token,\n\t\t\t\t\t\"pass\" \t\t => '',\n\t\t\t\t\t\"admin\" \t\t => $this->admin,\n\t\t\t\t\t\"status\" \t\t => $this->status,\n\t\t\t\t\t\"deliveryname\" \t\t => $this->deliveryname,\n\t\t\t\t\t\"deliverystreet\" \t\t=> $this->deliverystreet,\n\t\t\t\t\t\"deliveryzipcode\" \t => $this->deliveryzipcode,\n\t\t\t\t\t\"deliverycity\" \t\t => $this->deliverycity,\n\t\t\t\t\t\"invoicename\" \t\t => $this->invoicename,\n\t\t\t\t\t\"invoicestreet\" \t\t=> $this->invoicestreet,\n\t\t\t\t\t\"invoicezipcode\" \t\t=> $this->invoicezipcode,\n\t\t\t\t\t\"invoicecity\" \t\t => $this->invoicecity\n\t\t\t\t));\n\n\t\t\t\tif (!$result) {\n\t\t\t\t\t$this->error['success'] = 1;\n\t\t\t\t\t$this->error['message'] = 'Ocorreu um erro no registo do utilizador.';\n\t\t\t\t\t$this->con->rollBack();\n\t\t\t\t} else {\n \n //authorization\n $this->client_id \t\t= $this->email;\n $this->client_secret \t= 'thisismysecret';\n $this->redirect_uri\t\t= 'http://127.0.0.1:8080/my-oauth2-walkthrough/error.php';\n $this->grant_types\t\t= 'refresh_token password client_credentials';\n $this->scope\t\t\t= null;\n $this->user_id\t\t= null;\n $ret = $this->registeroauth();\n\n $this->error['success'] = 0;\n $this->error['message'] = 'Criação com sucesso do utilizador';\n\n $this->con->commit();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $ex) {\n\t\t\t$this->error['success'] = 1;\n\t\t\t$this->error['message'] = $ex->getMessage();\n\t\t\t$this->con->rollBack();\n\t\t}\n }", "title": "" }, { "docid": "b36e7fcb89e2526f0546dbfe819ea5f0", "score": "0.6675069", "text": "public static function login() {\n $user_name = self::get_user_name();\n $user_exist = UserHome::exists($user_name);\n if (!$user_exist) {\n $user = self::get_shibboleth_user();\n UserHome::create($user);\n }\n Login::login_user($user_name);\n }", "title": "" }, { "docid": "4779706d85d2bacf4b027ceb20802878", "score": "0.66643214", "text": "public function registerUser(){\n if(!($this->slpaCoreApi->isUserRegistered())){\n $this->slpaCoreApi->registerWithCurrentUserId();\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "fa8674232e2f129f4ea71524a4f8fd06", "score": "0.66561395", "text": "public function login();", "title": "" }, { "docid": "92e561ee8888c8de57b75b6eda69bc2f", "score": "0.6655204", "text": "protected function registerNewUser ($login, $pass42)\n {\n $type = \"student\";\n\n // Liste des élèves 42 avec ce login\n $student = new Entities (\"c_42_logins[login_eleve=\\\"{$login}\\\"]\");\n\n // On génère le mot de passe\n $pass = $this->generatePassPhrase ();\n\n if ($student->current())\n {\n if ($student->current()->type == \"staff\")\n {\n $type = \"staff\";\n }\n }\n else\n {\n $auth = new Auth42();\n $info = $auth->search(\"uid=\".$login, $login, $pass42);\n if ($info and $info['count'] == 1)\n {\n Core::getBdd ()->insert (array(\n \"login_eleve\" => $login,\n \"nom\" => $info[0]['last-name'][0],\n \"prenom\" => $info[0]['first-name'][0]),\n 'c_42_logins');\n }\n }\n // Le hash qui sera dans la bdd\n $shapass = sha1 (trim (strtolower ($pass)));\n $loginsExists = new Entities (\"c_user[login=\\\"{$login}\\\"]\");\n\n if ($loginsExists->current())\n {\n $u = $loginsExists->current();\n $this->createSession($login, $u->pass, $u->id, $u->auths);\n echo \"1\";\n }\n else\n {\n if (Core::getBdd ()->insert(array (\"login\" => $login, \"pass\" => $shapass), 'c_user'))\n {\n $loginsExists = new Entities (\"c_user[login=\\\"{$login}\\\"]\");\n $mail = new MuffinMail($loginsExists->current());\n $mail->sendParralelMuffinPass($pass);\n $u = $loginsExists->current();\n $this->createSession($login, $u->pass, $u->id, $u->auths);\n echo \"1\";\n }\n else\n echo \"-1\";\n }\n }", "title": "" }, { "docid": "fa03a81c58ed53e8f751b756029797a0", "score": "0.66531146", "text": "function login() {\n $post = $this->input->post();\n if (isset($post['email'])) {\n $user = $this->users_m->get_by(array('email' => $post['email']));\n //means we have it.\n if (!empty($user)) {\n $user = $user[0];\n if (isset($user['status'])\n && $user['status'] == 'validated') {\n $user['password'] = Encrypt::aes256_decode($user['password']);\n if (isset($post['password']) &&\n $post['password'] == $user['password']) {\n $_SESSION['user'] = $user;\n $_SESSION['uid'] = $user['_id'];\n redirect('/');\n } else {\n $this->output->error('login error');\n }\n } else {\n $this->output->error('not validate error');\n }\n } else {\n $this->register();\n }\n }\n }", "title": "" }, { "docid": "c05e427de9f0775fa63346c97c71c7b7", "score": "0.6646754", "text": "public function loginUser(){\n\t\t$check = $this->validateUser();\n\t\t$validate = array(103,106);\n\t\t\n\t\t$ecode = array();\n\t\t$desc = array();\n\t\tforeach($validate as $vcode){\n\t\t\tif(in_array($vcode, $check)){\n\t\t\t\t$ecode[]= $vcode;\n\t\t\t\t$desc[] = $this->code[$vcode];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*** return if error detected***/\n\t\tif(!empty($ecode)){\n\t\t\t$this->_result['status'] \t\t\t\t\t = 'error';\n\t\t\t$this->_result['error_code'] \t\t\t\t= $ecode;\n\t\t\t$this->_result['data']['error_msg'] = $desc;\n\t\t\treturn $this->_result;\n\t\t}\n\t\t\n\t\t$filter = array(\n\t\t\t\t\t'username' => trim($this->param['username']),\n\t\t\t\t\t'password' => md5($this->param['password'])\n\t\t\t\t );\n\t\t$users = $this->get_data($filter);\n\t\t\n\t\tif($users){\t\t\n\t\t\tif($users[0]['status'] == 2){\n\t\t\t\t$this->_result['status'] = 'error';\n\t\t\t\t$this->_result['error_code'] = array(101);\n\t\t\t\t$this->_result['data']['error_msg'] = array($this->code[101]);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$this->_result['status'] = 'success';\n\t\t\t\t$this->_result['data'] = $this->generateSession($users[0]['u_id']);\t\n\t\t\t\t// Set user object\n\t\t\t\tforeach($users as $info){\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$this->user->set_memberid($info['u_id']);\n\t\t\t\t\t$this->user->set_memberemail($info['email']);\n\t\t\t\t\t$this->user->set_memberfullname($info['firstname'].\" \".$info['lastname']);\n\t\t\t\t\t$this->user->set_memberusername($info['username']);\n\t\t\t\t\t$this->user->set_memberrole($info['type']);\n\t\t\t\t\tif($info['type'] == 3){\n\t\t\t\t\t\t$prop = $this->residents_model->getByUser($this->user->get_memberid());\n\t\t\t\t\t\t$this->user->set_memberproperty($prop['data']['p_id']);\n\t\t\t\t\t}elseif($info['type'] == 2){\n\t\t\t\t\t\t$prop = $this->propertyAdmin_model->getByUser($this->user->get_memberid());\n\t\t\t\t\t\t$this->user->set_memberproperty($prop['data']['p_id']);\n\t\t\t\t\t}\n\t\t\t\t\t$this->user->set_memberonline(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t\n\t\t\t$this->_result['status'] = 'error';\n\t\t\t$this->_result['error_code'] = array(135);\n\t\t\t$this->_result['data']['error_msg'] = array($this->code[135]);\n\t\t}\n\t\t\n\t\treturn $this->_result;\n\t}", "title": "" }, { "docid": "b9dff4a482c8707149681dfb4246edd5", "score": "0.6644579", "text": "function register($password, $name, $realname, $language, $email) {\n\t\t// TODO: check not to change user name!!\n\t\tglobal $userdb, $db, $page;\n\t\tif(strlen($name)==0) {\n\t\t\tdebug(\"USERDB\", \"attempt to register with empty userid\");\n\t\t\treturn $page->getlocalized(\"invalid_username\");\n\t\t}\n\t\tdebug(\"USERDB\", \"registering user: \". $name);\n\t\t$name = sotf_Utils::magicQuotes($name);\n\t\t$passwd = sotf_Utils::magicQuotes($password);\n\t\t$query = \"INSERT INTO authenticate (username,passwd,general_id,user_type) VALUES('$name','$password',1,'member')\";\n\t\t$userdb->query($query);\n\t\t$id = $userdb->getOne(\"SELECT auth_id FROM authenticate WHERE username='$name'\");\n\t\t//\t\t$query = \"INSERT INTO user_preferences (RealName,language,last_visit,num_logins) \";\n // RealName taken out \t\t\t\t\t\t. sotf_Utils::magicQuotes($realname) . \"','\" \n\t\t$query = \"INSERT INTO user_preferences (auth_id, language,last_visit,num_logins) \";\n\t\t$query .= \"VALUES('$id','\" . sotf_Utils::magicQuotes($language) \n\t\t\t. \"','\". db_Wrap::getSQLDate() . \"',1)\";\n\t\t$userdb->query($query);\n // TODO: check email??\n $email = sotf_Utils::magicQuotes($email);\n $db->query(\"INSERT INTO sotf_user_prefs (id, username, email) VALUES('$id', '$name', '$email')\");\n\t}", "title": "" }, { "docid": "65be60e99527862142d156ef838b62da", "score": "0.66317046", "text": "function RegisterUser($email , $password , $name) {\n\tif(!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t{\n\t\treturn SetErrorMessage(\"Invalid email provided for registration \".$email.$name.$password);\n\t}\n\t//check if name provided\n\tif($name == '')\n\t{\n\t\treturn SetErrorMessage(\"Name not provided for registration\");\n\t}\n\t//check if password provided\n\tif($password == '')\n\t{\n\t\treturn SetErrorMessage(\"Password not provided for registration\");\n\t}\n\t\n\t//Password hash\n\t$password_hash = hash('sha1' , $password);\n\t//Access token\n\t$access_token = GenerateAccessToken($password);\n\t//When the user first registers he is inactive\n\t$is_active = False; \n\t\n\tif(GetUserByEmail($email))\n\t{\n\t\treturn(SetErrorMessage(\"User with email id already registered\"));\n\t}\n\t\n\t$result = InsertNewUser($email,$password_hash,$name,$is_active,$access_token);\n\t\n\tif($result == 0 )\n\t{\n\t\treturn(SetErrorMessage(\"User with email id already registered\"));\n\t} else\n\t{\n\t\t//TODO : Send the user's access_token to his email to verify his password\n\t\treturn(GetUserById($result));\n\t}\n\t\n}", "title": "" }, { "docid": "350b6aff71be2af30703103b059cf9de", "score": "0.6631536", "text": "public function doRegisterCases(){\n\t\n\t\tif($this->rv->getRegister()) {\n\n\t\t\tif(($this->rv->getIsRegisterUsernameEntered()) && ($this->rv->getIsRegisterPasswordEntered())){\n\t\t\t\t$this->rv->setUserAndPassRegisterErrorMsg();\n\t\t\t\t}\n\t\t\telse if(strlen($this->rv->getRegisterUsername()) < 3){\t\n\t\t\t\t$this->rv->setUserRegisterErrorMsg();\n\t\t\t\t}\n\t\t\telse if(strlen($this->rv->getRegisterPassword()) < 6){\t\t\n\t\t\t\t$this->rv->setPassRegisterErrorMsg();\n\t\t\t\t}\n\t\t\telse if($this->rv->getRegisterPassword() !== ($this->rv->getRegisterPasswordRepeat())){\t\n\t\t\t\t$this->rv->setPasswordsNotMatchMsg();\t\n\t\t\t\t}\n\t\t\telse if ($this->rv->getRegisterUsername() !== strip_tags($this->rv->getRegisterUsername())) {\n \t\t\t$this->rv->setInvalidCharsMsg();\n\t\t\t\t}\n\t\t\telse if($this->udal->getUsers()->userExists($this->rv->getRegisterUsername())){\n\t\t\t\t$this->rv->setUserExistsMsg();\n\t\t\t\t}\n\t\telse {\n\t\t\t\t//set Register session\n\t\t\t\t$this->s->setRegistered();\n\t\t\t\t//set User session\n\t\t\t\t$this->s->setUser($this->rv->getRegisterUsername());\n\t\t\t\t//adds user to UserDAL\n\t\t\t\t$this->udal->add(new User($this->rv->getRegisterUsername(), $this->rv->getRegisterPassword()));\n\t\t\t\t$this->nv->backToIndex();\n\t\t\t}\n\t\t}\t\n\n\t}", "title": "" }, { "docid": "82872eb7241f97f5915059276efcc3bc", "score": "0.6621656", "text": "function user_register($user_username, $user_password)\n {\n $this->user_username = $user_username;\n $this->user_password = $user_password;\n $this->sql = \"INSERT INTO tbl_user (user_username,user_password) VALUES ('$this->user_username','$this->user_password')\";\n }", "title": "" }, { "docid": "4c19518f002fbf131adb41b273e91744", "score": "0.6619469", "text": "public function register() {\n // we must be logged out to be able to register a new user\n if (!Auth::check()) {\n $validator = $this->getRegisterValidator();\n if ($validator->passes()) {\n try {\n $data = $this->getRegisterData();\n $theUser = new User();\n $theUser->username = $data['username'];\n $theUser->email = $data['email'];\n //the hash includes the salt\n $theUser->password = Hash::make($data['password']);\n $theUser->save();\n $data['success'] = 'New user registered succesfully';\n //finally we send the email\n Mail::send('emails.welcome', array('user' => $theUser), function($message) use ($theUser) {\n $message->to($theUser->email, $theUser->username)->subject('Welcome!');\n });\n } catch (Exception $e) {\n $data['error'] = 'An error occurred while trying to register the user: ' . $e->getMessage();\n }\n } else {\n $data['error'] = $this->addMessages($validator);\n }\n //if validation is not passed or the registration failed, \n //redirect to login form with errors\n return Redirect::route(\"user/login\")->with('data', $data);\n }\n }", "title": "" }, { "docid": "a2767000e23bc54b8b0a973aa80ec2eb", "score": "0.6613035", "text": "function registerNewUser()\n{\n $firstname = $_POST['firstname'];\n $lastname = $_POST['lastname'];\n $email = $_POST['email'];\n $password = $_POST['password'];\n $password = password_hash($password, PASSWORD_DEFAULT);\n\n //instantiation of user\n $newUser = new User([\n 'firstname' => $firstname,\n 'lastname' => $lastname,\n 'email' => $email,\n 'password' => $password\n ]);\n\n //instantiation of manager\n $db = new PDO('mysql:host=localhost;dbname=freshshop', 'root', '');\n $userManager = new UserManager($db);\n\n //add new user to database\n $userManager->add($newUser);\n\n header('Location: index.php');\n exit;\n}", "title": "" }, { "docid": "e5e7fcc169e991a07e46c649b86448b9", "score": "0.6606504", "text": "function register_user() \n\t{\n\t\t\n\t\t$uri = 'user/register_user';\n\t\t$details = urldecode ( $this->input->post ( 'details' ) );\n\t\t$params = $details;\n\t\t$registration_details = $this->rest->{$this->method} ( $uri, $params );\n\n\t\t///echo $this->rest->debug();exit;\n\n\t\tif (trim ( $registration_details ['status'] ) == 'failure' && trim ( $registration_details ['error_code'] ) == 100) \n\t\t{\n\t\t\techo json_encode ( array ('faliure' => $registration_details ['responseData'] ) );\n\t\t} \n\t\telseif (trim ( $deal_details ['status'] ) == 'failure' && trim ( $deal_details ['error_code'] ) == 20) \n\t\t{\n\t\t\t$this->get_token ();\n\t\t\t$this->index ();\n\t\t} \n\t\telseif (trim ( $registration_details ['status'] ) != 'success') \n\t\t{\n\t\t\techo json_encode ( array ('faliure' => $registration_details ['responseData'] ) );\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$this->verification_code = $registration_details ['responseData'];\n\t\t\techo json_encode ( array ('success' => 'true' ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "5eabf4ae4b0d47863e8b39ef072fe7e5", "score": "0.6598777", "text": "public function register()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n // Process form\n // Sanitize POST data\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // Init data\n // Trim clears white space\n $data = ['name' => trim($_POST['name']) , 'email' => trim($_POST['email']) , 'password' => trim($_POST['password']) , 'confirm_password' => trim($_POST['confirm_password']) , 'name_err' => '', 'email_err' => '', 'password_err' => '', 'confirm_password_err' => ''];\n\n // Validate Email\n // check email is not empty\n if (empty($data['email']))\n {\n $data['email_err'] = 'Please enter email';\n }\n else\n {\n // check email already exists\n if ($this->userModel->findUserByEmail($data['email']))\n {\n $data['email_err'] = 'Account with this email already exists';\n }\n }\n\n // Validate Name\n // check name is not empty\n if (empty($data['name']))\n {\n $data['name_err'] = 'Please enter name';\n }\n\n // Validate Password\n // check password is not empty and it is longer than 6 characters\n if (empty($data['password']))\n {\n $data['password_err'] = 'Please enter password';\n }\n elseif (strlen($data['password']) < 6)\n {\n $data['password_err'] = 'Password must be at least 6 characters';\n }\n\n // Validate Confirm Password\n // check confirm password is not empty and == password\n if (empty($data['confirm_password']))\n {\n $data['confirm_password_err'] = 'Please confirm password';\n }\n else\n {\n if ($data['password'] != $data['confirm_password'])\n {\n $data['confirm_password_err'] = 'Passwords do not match';\n }\n }\n\n // Make sure errors are empty\n if (empty($data['email_err']) && empty($data['name_err']) && empty($data['password_err']) && empty($data['confirm_password_err']))\n {\n // Validated\n // Hash Password\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n\n // Register User\n // if for checking it went well\n if ($this->userModel->register($data))\n {\n flash('register_success', 'You are successfully registered, please check your email for a verification link');\n redirect('/users/login');\n \n }\n else\n {\n die('Something went wrong');\n }\n }\n else\n {\n // Load view with errors\n $this->view('users/register', $data);\n }\n }\n else\n {\n // Init data\n $data = ['name' => '', 'email' => '', 'password' => '', 'confirm_password' => '', 'name_err' => '', 'email_err' => '', 'password_err' => '', 'confirm_password_err' => ''];\n\n // Load view\n $this->view('users/register', $data);\n }\n }", "title": "" }, { "docid": "a7a638f779b136e186564fd269e94d8a", "score": "0.65987194", "text": "private function authenticate_user_login()\n\t{\n\t\tif(is_object($this->password_salt))\n\t\t{\n\t\t\tif(verifyPasswordHash($this->input->post('password'),$this->password_salt->sb_hotel_userpasswd) === TRUE)\n\t\t\t{\n\t\t\t\t$this->logged_in_user_meta \t= $this->User_model->authenticated_hoteleir_records($this->input->post('username'),$this->password_salt->sb_hotel_userpasswd);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->redirectWithErrMsg(ERR_MSG_LEVEL_1);\n\t\t\t}\t\n\t\t}\n\t\t$this->register_user_session();\n\t}", "title": "" }, { "docid": "98e490bfe01f2f12bc22eca442065cd3", "score": "0.6596953", "text": "public function makeRegister()\n {\n $this->is_admin = User::IS_REGISTER;\n $this->save();\n }", "title": "" }, { "docid": "425c738d81c7c8ea74b03e4a15477e41", "score": "0.6594894", "text": "function addNewUser($email, $password)\n {\n\n }", "title": "" }, { "docid": "d2022ccaca95ec1ca4df9737b6b1bf2c", "score": "0.6592954", "text": "public function userLogin(){\n /*\n * login username and password saved in $username , $password\n * if user is loggedin return user info in assosiative array\n * else reutrn false\n */ \n\n }", "title": "" }, { "docid": "4e991554e12ec2a5fca8f45df27a2a59", "score": "0.65919733", "text": "function register(){\n\tglobal $db, $errors, $username, $email;\n\n\t// receive all input values from the form. Call the e() function\n // to escape form values\n\t$username = escapeString($_POST['user_name']);\n\t$email = escapeString($_POST['user_email']);\n\t$password_1 = escapeString($_POST['user_password']);\n\t$password_2 = escapeString($_POST['user_password_1']);\n\n\t// form validation: ensure that the form is correctly filled\n\tif (empty($username)) { \n\t\tarray_push($errors, \"Username is required\"); \n\t}\n\tif (empty($email)) { \n\t\tarray_push($errors, \"Email is required\");\n\t}\n\tif (empty($password_1)) { \n\t\tarray_push($errors, \"Password is required\"); \n\t}\n\tif ($password_1 !== $password_2) {\n\t\tarray_push($errors, \"Two passwords do not match\");\n\t}\n\n\t// register user if there are no errors in the form\n\tif (count($errors) == 0) {\n\t\t\n\t\t// $password = password_hash($password1, PASSWORD_DEFAULT);\n\t\t$password = md5($password_1);\n\t\t\n\t\t\t$query = \"INSERT INTO users (user_name, user_password, user_email) \n\t\t\t\t\t VALUES('{$username}', '{$password}', '{$email}')\";\n\t\t\tmysqli_query($db, $query);\n\n // get id of the created user\n\t\t\t$logged_in_user_id = mysqli_insert_id($db);\n\n $_SESSION['user_id'] = $logged_in_user_id; // put logged in user in session\n $_SESSION['user_name'] = $username;\n $_SESSION['user_email'] = $email;\n $_SESSION['user_type'] = $user_type;\n\t\t\theader('Location: ../index.php');\t\t\t\t\n\t\t\n\t}\n}", "title": "" }, { "docid": "55c99dd45ddd1476ec5339ce0d94e411", "score": "0.65858877", "text": "public function register()\n {\n // Validate register form data\n $data = request()->validate([\n 'first_name' => 'required|string|max:255',\n 'email' => 'required|string|max:255|email|unique:users',\n 'password' => 'required|string|min:5',\n 'payment_email' => 'required|string|max:255|email'\n ]);\n\n // set user name cutting email address before @ text\n $username = explode('@',request('email'));\n\n // Set user id for affiliate refer link\n $user_id = count(User::all()) + 1;\n\n // Add user to database\n User::create([\n 'first_name' => request('first_name'),\n 'email' => request('email'),\n 'username' => $username[0],\n 'password' => Hash::make(request('password')),\n 'payment_email' => request('payment_email'),\n 'promote_id' => request('promote'),\n 'affiliate_link' => url(env('APP_URL')).'?ref='.$user_id\n ]);\n\n // Redirect to login page\n return redirect()->route('client.member.login.view')->with('message', 'Successfully Register User...');\n }", "title": "" }, { "docid": "86eb410e79646c128134f20c330595e1", "score": "0.6581713", "text": "public function loginUser() {\n $username = $this->request->get(\"username\");\n $password = $this->request->get(\"password\");\n $this->userService->loginUser($username, $password);\n }", "title": "" }, { "docid": "6b563fa40a88b74316006effd72a6f9b", "score": "0.65787977", "text": "public function createUser()\n {\n\n echo \"im in create user function.\".\"<br/>\";\n }", "title": "" }, { "docid": "2e9c78302132ec43d80d6d2ed8d19524", "score": "0.6575012", "text": "public function register()\n\t{\n\t\t// Load the user model\n\t\t$this->load->model('user_model','usermodel');\n\t\t\n\t\t// If the expected paramters are found then register the user\n\t\tif (isset($_POST['email']) && isset($_POST['pass'])) {\n\t\t\t$result = $this->usermodel->register($_POST['email'],$_POST['pass'],1);\n\t\t\t// If registrationw as successful\n\t\t\tif ($result) {\n\t\t\t\t$data['status'] = \"true\";\n\t\t\t\t$data['uid'] = $result;\n\t\t\t}\n\t\t} else {\n\t\t\t$data['status'] = \"false\";\n\t\t}\n\t\n\t\t$this->load->view('api/user_view',$data);\n\t}", "title": "" }, { "docid": "a9d57d7c112b2a939a85508a05f4e321", "score": "0.6561175", "text": "public function login()\n {\n $this->autoRender = false;\n $userTbl = TableRegistry::get('users_old');\n\n if($this->request->is(['post']))\n { \n parent::checkIsset(['email','password','device_id','device_type'], $this->request->data);\n $email = parent::validateParameters(\"Email\", $this->request->data['email'], STRING);\n $password = parent::validateParameters(\"Password\", $this->request->data['password'], STRING);\n $device_id = parent::validateParameters(\"Device Id\", $this->request->data['device_id'], STRING);\n $device_type = parent::validateParameters(\"Device Type\", $this->request->data['device_type'], STRING);\n\n $userData = $userTbl->find('all')->where(['email' => $email])->orWhere([\"phone_number\" => $email])->first();\n if(!empty($userData))\n { \n $hasher = new DefaultPasswordHasher();\n $verify = $hasher->check($password, $userData['password']);\n if($verify)\n { \n if($userData['role_id'] == USER)\n {\n $updateUserData['device_type'] = $device_type; \n $updateUserData['device_id'] = $device_id;\n\n if($userData['status'] == ACTIVE)\n {\n if($userData['verified_status'] == ACTIVE)\n { \n $userPostData = $userTbl->patchEntity($userData, $updateUserData, ['validate'=>false]);\n if($userTbl->save($userPostData)){\n // USERDATA \n $user['user_id'] = $userData->id;\n $user['email'] = $userData->email;\n $user['username'] = $userData->name;\n $user['profile_picture'] = $this->General->checkFileExist('img/users/'.$userData->profile_picture);\n $user['verified_status'] = $userData->verified_status;\n try{\n // TOKEN\n $key = JWT_SECRET_KEY;\n $payload = array(\n \"iss\" => SITE_URL,\n \"aud\" => SITE_URL,\n \"iat\" => time(),\n \"exp\" => time() + (60 * 60), // 1 Hour\n \"user_id\" => $userData->id\n );\n\n $token = JWT::encode($payload, $key);\n parent::sendResponse(200, \"Login successfully.\", $user, [\"token\" => $token]);\n }catch(\\Exception $e){\n parent::throwError(401, $e->getMessage()); \n }\n }else{\n parent::throwError(500,\"Internal server error.\"); \n }\n }else{\n parent::throwError(401,\"Please verify your account first.\"); \n }\n }else{\n parent::throwError(401,\"Your account is deactive by admin. Please email us at \".EMAIL_SENT_FROM);\n }\n }else{\n parent::throwError(401,\"Please login as a user account.\"); \n }\n }else{\n parent::throwError(401,\"Invalid password.\"); \n } \n }else{\n parent::throwError(401,\"Invalid login credential.\"); \n }\n }else{\n parent::throwError(405,\"Something went wrong. Please try again.\"); \n }\n }", "title": "" }, { "docid": "a4f53d540824061cc104c76494a1b119", "score": "0.6552587", "text": "public function register() {\r\n\t\t$message = null;\r\n\r\n\t\tif (isset($_POST['registerSubmit'])) {\r\n\t\t\t$userModel = $this->getModel('UserModel');\r\n\t\t\t$user = $userModel->register();\r\n\t\t\tif ($user) {\r\n\t\t\t\t$message = ['Nice! You\\'re awesome. Now log in the system.'];\r\n\t\t\t} else {\r\n\t\t\t\t$message = ['Something went wrong. Please, try again.'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->getView('registerView', $message);\r\n\t}", "title": "" }, { "docid": "45f260b0e780f6c3afd1bbe64772448c", "score": "0.6551658", "text": "public function store()\n {\n $user = new User($this->db);\n if (isset($_POST)) { \n if (!UserFormValidator::validate($_POST)) {\n return $this->render(\"users/register\");\n } \n //bind form data to PDO object\n $userDTO = $this->dataBinder->bind($_POST, UserDTO::class);\n if ($user->findByEmail($userDTO->getEmail()) !== null) {\n flash('register_success', 'the user is exist already');\n return $this->render(\"users/register\");\n }\n //encrypt Password\n $password = $userDTO->getPassword();\n $passwordHash = password_hash($password, PASSWORD_DEFAULT);\n $userDTO->setPassword($passwordHash);\n $data = $user->create($userDTO); \n $this->render(\"home/index\", $data);\n }\n }", "title": "" }, { "docid": "a7036205d89e0ac1df97f48d163a50a9", "score": "0.65510356", "text": "public function registerpassAction()\n {\n $this->view->step = 1;\n //if is post\n if ($this->_request->isPost()) {\n $newPass = $this->_request->getPost('txtNewPw');\n $confirmPass = $this->_request->getPost('txtConfirmPw');\n $uuid = $this->_request->getPost('uuid');\n\n if (empty($newPass) || empty($confirmPass) || empty($uuid)) {\n $this->view->errmsg = 'パスワードは必要ですまたはキー(uuid)は必要です。';\n }\n else if ($newPass !== $confirmPass) {\n $this->view->errmsg = 'パスワードと異なります。';\n }\n else {\n //registe and set password\n require_once 'Admin/Bll/User.php';\n $bllResetPass = new Admin_Bll_User();\n $result = $bllResetPass->registerPassword($uuid, $newPass);\n if ($result) {\n $this->view->step = 2;\n }\n else {\n $this->_forward('error', 'error', 'admin', array('message' => 'エラーが出ました。登録失敗しました。'));\n return;\n }\n }\n }\n //init page\n else {\n $uuid = $this->_request->getParam('uuid');\n\n //check uuid\n if (empty($uuid)) {\n $this->_forward('noauthority', 'error', 'admin');\n return;\n }\n\n require_once 'Admin/Dal/User.php';\n $register = Admin_Dal_User::getDefaultInstance();\n $info = $register->getUserByUuid($uuid);\n\n //if the $info empty\n if (empty($info)) {\n $this->_forward('noauthority', 'error', 'admin');\n return;\n }\n\n if (1 == $info['status']) {\n $this->_forward('error', 'error', 'admin', array('message' => 'そのユーザーが既に登録しました。'));\n return;\n }\n $this->view->uuid = $uuid;\n }\n\n $this->view->title = '登録を確認|OPENSOCIAL APPS ADMIN|LinNo ( リンノ )';\n $this->render();\n }", "title": "" }, { "docid": "4c7845bf2450dbaa80c65407caf8522b", "score": "0.654716", "text": "public function signUp(){\r\n\r\n\r\n if( !empty($_POST['username']) && !empty($_POST['password']) && !empty($_POST['passwordTry']) && !empty($_POST['email']) ){\r\n \r\n $usernameEntre = htmlspecialchars($_POST['username']); \r\n $passwordEntre = htmlspecialchars($_POST['password']);\r\n $passwordTryEntre = htmlspecialchars($_POST['passwordTry']);\r\n $emailEntre = htmlspecialchars($_POST['email']);\r\n\r\n if($this->model->findByUsername($usernameEntre)){\r\n die(\"Cet username existe déjà\"); \r\n }\r\n\r\n\r\n if($passwordEntre == $passwordTryEntre) {\r\n $user = new \\Model\\User(); \r\n $user->username = $usernameEntre; \r\n $user->setPassword($passwordEntre); \r\n $user->email = $emailEntre; \r\n\r\n \r\n $this->model->register($user);\r\n \\Http::redirect(\"index.php?controller=gateau&task=index\");\r\n \r\n }\r\n\r\n }else{\r\n $userModel = new \\Model\\User();\r\n $user = $userModel->getUser(); \r\n $titreDeLaPage = \"Inscription\"; \r\n \\Rendering::render(\"users/signup\", compact('titreDeLaPage', 'user'));\r\n \r\n }\r\n\r\n }", "title": "" }, { "docid": "a7eab5343091416f2f883222d84d895b", "score": "0.65342426", "text": "public function action_register()\n\t{\n\t\t$errors = FALSE;\n\n\t\t// Create an instance of Model_Auth_User\n\t\t$user = Jelly::factory('user');\n $meta = Jelly::factory('meta');\n\n\t\t// Check if the form was submitted\n\t\tif ($_POST)\n\t\t{\n\t\t\t/**\n\t\t\t * Load the $_POST values into our model.\n\t\t\t *\n\t\t\t * We use Arr::extract() and specify the fields to add\n\t\t\t * by hand so that a malicious user can't do (for example)\n\t\t\t * `$_POST['roles'][] = 2;` and make themselves an administrator.\n\t\t\t */\n\t\t\t$user->set(Arr::extract($_POST, array(\n\t\t\t\t'email', 'username', 'password', 'password_confirm'\n\t\t\t)));\n\n\t\t\t// Add the 'login' role to the user model\n\t\t\t$user->add('roles', 1);\n\n $meta->set(Arr::extract($_POST, array(\n 'first_name', 'last_name', 'area', 'phone'\n )));\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Try to save our user model\n\t\t\t\t$user->save();\n $meta->user->user_id = $user->id;\n $meta->save();\n\n\t\t\t\t// Redirect to the index page\n\t\t\t\t$this->request->redirect(Route::get('default')->uri(array('action' => 'index')));\n\t\t\t}\n\t\t\t// There were errors saving our user model\n\t\t\tcatch (Validate_Exception $e)\n\t\t\t{\n\t\t\t\t// Load custom error messages from `messages/forms/user/register.php`\n\t\t\t\t$errors = $e->array->errors('forms/user/register');\n\t\t\t}\n\t\t}\n\n\t\t// Set template title\n\t\t$this->template->title = 'Register';\n\n\t\t// Display the 'register' template\n\t\t$this->template->content = View::factory('user/register')\n\t\t\t->set('user', $user)\n ->set('meta', $meta)\n\t\t\t->set('errors', $errors);\n\t}", "title": "" }, { "docid": "f51174ab152b9cfa1b2763cb46d2fb85", "score": "0.65334475", "text": "public function setUserRegistration()\n {\n if(!$this->databaseUsersTable) $this->getMessage('Users table in the database is not specified. Please specify it before any other operation using the method setDatabaseUserTable();','','','true');\n $user_name=$this->setEscape($_REQUEST['user_name']);\n $user_pass=$_REQUEST['user_pass'];\n\t$uid=$_REQUEST['uid'];\n\t$mobile=$_REQUEST['mobile'];\n\t$offset=$_REQUEST['offset'];\n\t$alias=$_REQUEST['alias'];\n //$user_confirm_pass=$_POST['user_confirm_pass'];\n $user_mail=$_REQUEST['user_mail'];\n // $user_confirm_mail=$_POST['user_confirm_mail'];\n $user_crypted_pass=$this->setCrypt($user_pass);\n\t\n $query=CLS_MYSQL::Query(\"SELECT a.*,b.* FROM\".\" \".$this->databaseUsersTable.\" AS a LEFT JOIN user_devices AS b on a.user_id=b.user_id WHERE a.user_name='$user_name'\");\n // $result_user_mail=CLS_MYSQL::Query(\"SELECT * FROM\".\" \".$this->databaseUsersTable.\" \".\"WHERE user_mail='$user_mail'\");\n\t $result_user_name=CLS_MYSQL::GetResultValue($query,0,'user_name');\n\t\t//$uid==CLS_MYSQL::GetResultValue($query,0,'uid');\n\t\t//var_dump($uid);\n\tif($uid==CLS_MYSQL::GetResultValue($query,0,'uid')) $this->display('device id already exist');\n elseif((strlen($user_name)<6) or (strlen($user_name)>16)) $this->display('Entered username length must be of 6 to 16 characters');\n //elseif(CLS_MYSQL::GetResultNumber($query)) $this->display('Entered username already exists in the database');\n elseif((strlen($user_pass)<6) or (strlen($user_pass)>16)) $this->display('Entered password length must be of 8 to 16 characters');\n //elseif($user_pass!=$user_confirm_pass) $this->getMessage('Passwords entered do not match.');\n // elseif(CLS_MYSQL::GetResultNumber($result_user_mail)) $this->display('Entered email already exists in the database.');\n // elseif($user_mail!=$user_confirm_mail) $this->getMessage('Email addresses entered do not match.');\n elseif(!preg_match(\"/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-]{4,})+\\.)+([a-zA-Z0-9]{2,})+$/\", $user_mail)) $this->display('Email address entered is not valid');\n else\n {\n if(CLS_MYSQL::Execute(\"INSERT INTO\".\" \".$this->databaseUsersTable.\" \".\"(user_name, user_pass, user_mail) VALUES ('$user_name', '$user_crypted_pass', '$user_mail')\")) \n$insert_id=mysql_insert_id();\nCLS_MYSQL::Execute(\"INSERT INTO user_devices (user_id, mobile, offset, uid, alias) VALUES ('$insert_id','$mobile','$offset','$uid','$alias')\");\n$Email = New VTSMail();\n$Email-> setName($user_name); //To name\n$Email-> setMail($user_mail); //To e-mail\n$Email-> setSubject(\"Registration\"); //Subject\n$Email-> setMessage(\"VTS Registration Successful \\n username:$user_name \\n password:$user_pass\");\n$Email-> sendMail();\n $this->display('Registration was successful');\n }\n }", "title": "" }, { "docid": "400c794a624b8481ad6e41d5a220e839", "score": "0.6531041", "text": "public function action_register()\n\t{\n\t\tif ( ! in_array('admin', Session::instance()->get('user_roles')))\n\t\t{\n\t\t\t$this->request->redirect(Route::get('admin')->uri(array('action' => 'notowner')));\n\t\t}\n\n\t\t$this->template->content = View::factory('admin/user/register')\n\t\t\t->bind('post', $post)\n\t\t\t->bind('errors', $errors);\n\t\t$this->template->content->title = 'User management > Register new user';\n\t\t\n\t\t$user = ORM::factory('user');\n\t\tif ( ! empty($_POST))\n\t\t{\n\t\t\t// get post values, load into object and check validation\n\t\t\t$post = $_POST;\n\t\t\t$user->values($post);\n\t\t\tif ($user->check() AND $user->save())\n\t\t\t{\n\t\t\t\t// add the basic login role\n\t\t\t\t$user->add('roles', ORM::factory('role', array('name' => 'login')));\n\n\t\t\t\t$details = $user->details;\n\t\t\t\tarr::unshift($post, 'user_id', $user->id);\n\t\t\t\t$details->values($post);\n\t\t\t\tif ($details->check() AND $details->save())\n\t\t\t\t{\n\t\t\t\t\t//cookie::set('message', 'Updated user '.$user->username);\n\t\t\t\t\t// save and redirect to index\n\t\t\t\t\t$this->request->redirect(Route::get('admin')->uri(array('controller' => 'users')));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$errors = $details->validate()->errors('admin_errors'); \n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// get errors to show in form\n\t\t\t\t$errors = $user->validate()->errors('admin_errors'); \n\t\t\t}\n\t\t}\n\t\t// shuffle up values for form\n\t\t$post = $user->as_array();\n\t\tarr::unshift($post, 'password_confirm', NULL);\n\t\tarr::unshift($post, 'first_name', NULL);\n\t\tarr::unshift($post, 'last_name', NULL);\n\t}", "title": "" }, { "docid": "bb3a6f05dd376dbfbffd101b63c4921e", "score": "0.6525235", "text": "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user already exists\n $sql = \"SELECT * FROM users WHERE user_name = '\" . $user_name . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"Sorry, that username is already taken.\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_password_hash)\n VALUES('\" . $user_name . \"', '\" . $user_password_hash . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"Your account has been created successfully. You can now log in.\";\n } else {\n $this->errors[] = \"Sorry, your registration failed. Please go back and try again.\";\n }\n }\n } else {\n $this->errors[] = \"Sorry, no database connection.\";\n }\n } else {\n $this->errors[] = \"An unknown error occurred.\";\n }\n }", "title": "" }, { "docid": "4a423dd3e590832e7de9ae9c8254090a", "score": "0.65178657", "text": "function register($login, $pass, $realName)\n{\n\t//generates pseudo random bytes worth 10 characters long\n\t//and sets $strong to true if the salt is strong enough\n\t//the is diferent(ish) for each user. the hash of password along with the salt is stored\n\t//in the roles table. This helps securing the data better.\n\t\t\n// \t$bytes = openssl_random_pseudo_bytes(10, $strong);\n// \t$salt = bin2hex($bytes); // convert to hex\n\n\t//unfortunately openssl is not supported (i have to install it)\n\t//so I will be generating random numbers and converting them to hex\n\t\n\t$r = mt_rand() * mt_rand();//long int\n\t$salt = dechex($r) ; // convert to hex\n\t\n\t$hash = getHash($pass, $salt);//get the hash of password and salt appended\n\t\n\ttry{\n\t\t$login = mysql_real_escape_string($login);\n\t\t\n\t\t$DBH = openConnection();\n\t\t$DBH->beginTransaction();\n\t\n\t\t$query = \"insert into Roles (user_name, client, admin, realName) values (?,?,?,?)\";\n\t\t$stmt = $DBH->prepare($query);\n\t\t$stmt->bindValue(1, $login);\n\t\t$stmt->bindValue(2, true);//client\n\t\t$stmt->bindValue(3, false);\n\t\t$stmt->bindValue(4, mysql_real_escape_string($realName));\n\t\n\t\t$stmt->execute();\n\t\t\n\t\t\n\t\t$query = \"insert into Users (user_name, password, salt) values (?,?,?)\";\n\t\t$stmt = $stmt = $DBH->prepare($query);\n\t\t$stmt->bindValue(1, $login);\n\t\t$stmt->bindValue(2, $hash);\n\t\t$stmt->bindValue(3, $salt);\t\t\n\t\t$stmt->execute();\n\t\t\n\t\t$DBH->commit();\n\t\treturn true;\n\t}\n\t\tcatch (PDOException $e) {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "92ef72cf25b298ec982fb2f308669a0b", "score": "0.651625", "text": "function newuser_init() {\n\t\t$username = $_POST['userName'];\n\t\t$password = $_POST['passUser'];\n\t\t$email = $_POST['email'];\n\t\t$nombre = $_POST['completeName'];\n\n\t\t$userdata = array(\n\t\t 'user_login' => $username,\n\t\t 'user_pass' => $password,\n\t\t 'user_email' => $email,\n\t\t 'user_nicename' => $nombre\n\t\t);\n\n\t\t// Insertar Usuario en DB\n\t\t$user_id = wp_insert_user( $userdata ) ;\n\n\t\t//On success\n\t\tif ( ! is_wp_error( $user_id ) ) {\n\t\t\techo \"Felicidades ya estas Registrado\";\n\t\t die();\n\t\t} else{\n\t\t echo \"El Usuario Ya Estaba Registrado\";\n\t\t\tdie();\n\t\t}\n\t}", "title": "" }, { "docid": "42dfdbdbd231f72770d2e631c8c76f07", "score": "0.6515607", "text": "public function registerNewUser() {\n\t\t$this->form_validation->set_rules('first_name','first_name','required');\n\t\tif($this->form_validation->run() == FALSE) {\n\t\t\t$this->index();\n\t\t\treturn;\n\t\t}\n\t\t$registerData\t= $this->frontend->getInput();\n\t\t$insertQuery\t= $this->backend->dbBI->insert_string('md_user',$registerData);\n\t\t$insertQuery\t= str_replace('INSERT INTO','INSERT IGNORE INTO',$insertQuery);\n\t\t$this->backend->dbBI->query($insertQuery);\n\t\tredirect($this->mainURL);\n\t\treturn;\n\t}", "title": "" }, { "docid": "86a9e16b1b483f7a564352ed0521c9cb", "score": "0.6511482", "text": "public function login() {\n $res = json_decode(\"{}\");\n \n $inputs = $this->validate_login();\n $user = $this->User_model->login($inputs);\n if ($user) { \n if ($user['password'] != md5($inputs['password'])) {\n return_data(false, 'Wrong password',$res);\n }\n if ($user['status'] == 1) {\n return_data(false, 'Your account is disabled', $res);\n } else if ($user['status'] == 2) {\n return_data(false, 'Your account has been deleted.', $res);\n } else {\n $this->User_model->blank_device_token($inputs['device_token']);\n $this->User_model->updt_device_token_type($inputs['email'], $inputs['device_token'], $inputs['device_type']);\n $user = $this->User_model->user_profile($user['id']);\n return_data(true, 'User authentication successful.', $user);\n }\n } else {\n return_data(false, 'User authentication failed.', $res); \n }\n }", "title": "" }, { "docid": "22eb3337a709bc3e01b3a31fadf5aeec", "score": "0.65037626", "text": "function register()\n{\n\t\tglobal $PSALT;\t\n\n\t\tif($this->Session->check('User'))\n\t\t{\n\t\t\t//we already are logged in, so you can't be here\n\t\t\t$userinfo['User'] = $this->Session->read('User');\n\t\t\t\n\t\t\tif( $userinfo['User']['role'] == \"admin\" )\n\t\t\t{\n\t\t\t\t//$this->Session->write('Admin', $userinfo['User']);\n\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'admin_home'));\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse if ($userinfo['User']['role'] == 'teacher' )\n\t\t\t{\n\t\t\t\t//Coder\n\t\t\t\t//$this->Session->write('teacher', $userinfo['User']);\n\t\t\t\t$this->redirect(array('controller' => 'teachers', 'action' => 'contentProfile'));\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//we are a student\n\t\t\t}\n\t\t}\n\n\t\t$this->layout = \"front_default\";\n\t\t\n\t\t$this->set(\"title_for_layout\", 'Teacher registration - LessonShark');\n\t\t \n\t\tApp::import('Model','User');\n\t\t$this->User = & new User();\n\t\t//App::import('Model','Profile');\n\t\t//$this->Profile = & new Profile();\n\t\t\n\t\t//used to start validation rule setup\n\t\t$this->User->set( $this->data['User'] );\n\t\t$this->User->Profile->set( $this->data['Profile'] );\n\t\t\n\t\tif( !empty( $this->data ) ) \n\t\t{\n\n\t\t\t// Transform ZIP\n\t\t\t$profileData = $this->User->Profile->zipToCity($this->data['Profile']['zip']);\n\t\t\tif ($profileData)\n\t\t\t{\n\t\t\t\t$this->data['Profile']['city'] = $profileData['city'];\n\t\t\t\t$this->data['Profile']['state_id'] = $profileData['state_id'];\n\t\t\t}\n\t\t\n\t\t\tif ($this->User->validates(array('fieldList' => array('password','cpassword','firstname','lastname','email'))) && $this->User->Profile->validates(array('fieldList' => array('zip'))) )\n\t\t\t//if($this->User->saveAll($this->data, array(\"validate\" => 'first')))\n\t\t\t{\n\t\t\t\t//updates\n\t\t\t\t$this->data['User']['password'] = md5($this->data['User']['email'].$this->data['User']['password'].$PSALT);\n\t\t\t\t$this->data['User']['cpassword'] = $this->data['User']['password'];\n\t\t\t\t$this->data['User']['role'] = 'teacher';\n\t\t\t\t\n\t\t\t\tif($this->User->saveAll($this->data, array(\"validate\" => false)))\n\t\t\t\t{\n\t\t\t\t\t//need to auto login here and set session\t\t\t\t\t\n\t\t\t\t\t$this->Session->destroy();\n\t\t\t\t\t\n\t\t\t\t\t$userinfo = $this->User->findByEmail($this->data['User']['email']);\n\t\t\t\t\t\n\t\t\t\t\t$this->Session->write('User', $userinfo['User']);\n\t\n\t\t\t\t\t//create a profile for this user\n\t\t\t\t\t#$profiles['Profile']['user_id'] = $userinfo['User']['id'];\n\t\t\t\t\t\n\t\t\t\t\t#if($this->User->Profile->save($profiles,false))\n\t\t\t\t\t#{\t\t\n\t\t\t\t\t#}\n\t\n\t\t\t\t\t$this->redirect(array('controller' => 'teachers', 'action' => 'contentProfile'));\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t//apparently this code isn't necessary, as validate => 'only' works to handle this\n\t\t\t\t$errors = $this->User->invalidFields(array('fieldList' => array('password','cpassword','firstname','lastname','email')));\n\t\t\t\t$this->User->set('errors',$errors);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$errorsProfile = $this->User->Profile->invalidFields(array('fieldList' => array('zip')));\n\t\t\t\t$this->User->Profile->set('errors',$errors);\n\t\t\t}//END: Else IF\n\n\t\t}//End: DATA check\n\t}", "title": "" }, { "docid": "17fe9d0aa7b49b43e37553d1144c3ee2", "score": "0.6496213", "text": "function registerUser() {\n global $con, $name, $username, $password, $email, $gender, $phone, $dob, $location, $type, $type_id, $otp, $otp_verified;\n $statement = mysqli_prepare($con, \"INSERT INTO user (name, username, password, email, gender, phone, location, dob, type, type_id, otp, otp_verified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n mysqli_stmt_bind_param($statement, \"sssssisssisi\", $name, $username, $password, $email, $gender, $phone, $location, $dob, $type, $type_id, $otp, $otp_verified);\n mysqli_stmt_execute($statement);\n mysqli_stmt_close($statement); \n }", "title": "" }, { "docid": "ad6ab82511bf372890cb06626e848b60", "score": "0.64959526", "text": "function login($oUser) {\n }", "title": "" }, { "docid": "a9787bc375bbb829091c2914460d766f", "score": "0.64949864", "text": "public function do_add_user(){\n\t\t$arr = array(\n\t\t\t'fullname' => $_POST['fullname'],\n\t\t\t'email' => $_POST['email'],\n\t\t\t'password' => md5($_POST['password']),\n\t\t\t'role' => 2\n\t\t);\n\t\t$res = $this->Management->add_user($arr);\n\t\tif($res == 1){\n\t\t\tredirect('Welcome/users','refresh');\n\t\t}\n\t\telse{\n\t\t\tredirect('Welcome/add_user','refresh');\n\t\t}\n\t}", "title": "" }, { "docid": "ab6ba8f2787076df55d7d875fbd8fe13", "score": "0.64816636", "text": "public function doRegistr() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n \t\t\n \t\tif ($validator->passes()) {\n \t\t\t$user = new User;\n\n\t\t $user->name = Input::get('name');\n\t\t $user->email = Input::get('email');\n\t\t $user->phone = Input::get('phone');\n\t\t $user->city = Input::get('city');\n\t\t $user->password = Hash::make(Input::get('password'));\n\t\t $user->save();\n \t\t\n \t\t return Redirect::route('login-link')\n \t\t \t->with('message', 'Thanks for registering!');\n \n \t} else {\n \t\treturn Redirect::route('registr')\n \t\t\t->with('message', 'The following errors occurred')\n\t \t\t->withErrors($validator)\n\t \t\t->withInput(); \n \t} \n\t}", "title": "" }, { "docid": "daa6e2193619a63a1650f95eba91b4b7", "score": "0.64798045", "text": "function register($username, $password, $repassword, $email , $auth = false){\n\t\n}", "title": "" }, { "docid": "9aaad632346fe92dc971e7f1947d4c29", "score": "0.6478739", "text": "protected function registerUser($data)\n\t {\n //user array\n\t \t $user=array(\n\t \t \t 'username'=>$data[0]['value'],\n\t \t \t 'email'=>$data[1]['value'],\n\t \t \t 'password'=>password_hash($data[2]['value'],PASSWORD_DEFAULT),\n\t \t \t 'token'=>$data[4]['value']\n\t \t );\n \n //messages array\n $message=array();\n\n\t \t //sql query \n\t \t $sql=\"insert into users (username,email,password) values('\".$user['username'].\"','\".$user['email'].\"','\".$user['password'].\"')\";\n\n\t \t //sql to check already registered or not\n\t \t $sql_to_check_alredy_registered_or_not='select email from users where email=\"'.$user['email'].'\"';\n\n\t \t //query the data into the database\n\t \t $conn=$this->getConnection();\n\n\t \t //check the user already existed !\n\n\t \t if($conn->query($sql_to_check_alredy_registered_or_not)->num_rows>0)\n\t \t {\n\t \t \t \n\t\t\t \t \t //push the messages into message array\n\n\t\t\t \t \t array_push($message,array(\n\t\t\t \t \t \t 'message'=>'User already existed !',\n\t\t\t \t \t \t 'redirect'=>false\n\t\t\t \t \t ));\n\t \t }else{\n\t \t \t //if not created users !\n\t \t \t if($conn->query($sql)==TRUE)\n\t\t\t \t {\n\t\t\t \t \t //get the inserted auto user id from the user table\n\t\t\t \t $user_id=mysqli_insert_id($conn);\n\n //set the user name and passwor and token into session\n $_SESSION['username']=$user['username'];\n $_SESSION['user_id']=$user_id;\n\t\t\t \t \t $_SESSION['email']=$user['email'];\n\t\t\t \t \t $_SESSION['password']=$user['password'];\n\t\t\t \t \t $_SESSION['token']=$user['token'];\n\n\t\t\t \t \t //sql the to update the suer\n\t\t\t \t \t $sql_to_update_online=\"update users set online='1' where id='\".$user_id.\"'\";\n\n\t\t\t \t \t $conn->query($sql_to_update_online);\n\n\t\t\t \t \t //push the messages into message array\n\n\t\t\t \t \t array_push($message,array(\n\t\t\t \t \t \t 'message'=>'Successfully registered !',\n\t\t\t \t \t \t 'redirect'=>true,\n\t\t\t \t \t \t 'token'=>$_SESSION['token']\n\t\t\t \t \t ));\n\n\n\t\t\t \t }else{\n\t\t\t \t \t \n\t\t\t \t \t //push the messages into message array\n\n\t\t\t \t \t array_push($message,array(\n\t\t\t \t \t \t 'message'=>'Error Creating !',\n\t\t\t \t \t \t 'redirect'=>false\n\t\t\t \t \t ));\n\t\t\t \t }\n\t \t }\n //return json message\n\t \t echo json_encode($message);\n\n\t \t \n\t }", "title": "" } ]
fbd54493c3fe95aeef757c813992ae12
Get the products from the Basket
[ { "docid": "44ba2008210d18a0d66cec21467ffbd9", "score": "0.6470745", "text": "public function products(): Collection\n {\n return $this->products;\n }", "title": "" } ]
[ { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.7853867", "text": "public function getProducts();", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.7853867", "text": "public function getProducts();", "title": "" }, { "docid": "02d6fce4ab517131df0ff855d9779e0b", "score": "0.74980664", "text": "public function GetProducts()\n\t{\t$this->products = array();\n\t\tif ($this->id)\n\t\t{\t$sql = 'SELECT bundleproducts.* FROM bundleproducts WHERE bid=' . $this->id . ' ORDER BY listorder, bpid';\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t\t{\t$this->products[$row['bpid']] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2fdd98d0a4afca48de7d1453633ce921", "score": "0.74925333", "text": "public function getProducts()\n {\n \treturn $this->products;\n }", "title": "" }, { "docid": "111ab3f4ed84c6711fc9af89d0808a0b", "score": "0.7473313", "text": "private function getProducts()\n {\n $params = [\n \t\t'catalogType' => 'generic'\n ];\n\n $itemList = $this->request->get(config('srs.product_base_url') . 'products/branch/' . $this->branchId, ['query' => $params]);\n\n $this->productList = json_decode($itemList->getBody(), true);\n\n if (ine($this->productList, 'branchItemList')) {\n foreach (array_chunk($this->productList['branchItemList'], 50) as $items) {\n $priceList = $this->getPrice($items);\n $this->saveFinancialProducts($items, $priceList);\n }\n }\n }", "title": "" }, { "docid": "01ea5cf8a69e1aac3cc4a89612406264", "score": "0.7458694", "text": "private function getProducts()\n {\n $products = [];\n return $products;\n }", "title": "" }, { "docid": "5fbc826e72a2a2816cbce951ad09fc04", "score": "0.7338712", "text": "public function getProducts()\n {\n return $this->products;\n }", "title": "" }, { "docid": "cee5e67887c4a9b6a8e68ae0d6c0ffb6", "score": "0.73139757", "text": "public function getProducts()\n {\n return $this->products()->get();\n }", "title": "" }, { "docid": "8752fce0980829eec73b1ac590b1342b", "score": "0.73", "text": "public function getProducts(): array;", "title": "" }, { "docid": "b530a4cd4c4b120c8e6ad966b03d33b9", "score": "0.72998136", "text": "public function getProducts()\n\t{\n\t\t$strCall = 'products';\n\t\t\n\t\treturn $this->doApiCall($strCall);\n\t}", "title": "" }, { "docid": "95c87d8d2b859aaac0251acc566b6bd2", "score": "0.7299392", "text": "public function get_products() {\n return $this->getProducts();\n }", "title": "" }, { "docid": "87b245ee1c38bb1feda54fc133e4f94a", "score": "0.7259361", "text": "public function products();", "title": "" }, { "docid": "87b245ee1c38bb1feda54fc133e4f94a", "score": "0.7259361", "text": "public function products();", "title": "" }, { "docid": "86d4600be5dec745d0935da813dbb1d6", "score": "0.7221556", "text": "public function getProducts() {\n return $this->products;\n }", "title": "" }, { "docid": "12b1166b28c7ca66883ecfe1c0f0e21e", "score": "0.72114897", "text": "abstract protected function getProductList();", "title": "" }, { "docid": "ced676da7f373b0c1b8f93b80be72ac9", "score": "0.72017443", "text": "public function getProducts() {\n $sql = \"SELECT DISTINCT p.pid, p.item_name FROM {$this->_table}product p\n INNER JOIN {$this->_table}product_certified c ON(p.pid=c.product_id)\n WHERE p.is_auction='yes' AND is_certified=1 AND c.product_store_id=\".$_SESSION['StoreID'] ;\n $this->_db->execute_query($sql);\n return $this->_db->fetch_records(true);\n }", "title": "" }, { "docid": "9f77eb03687541436ea960d72e44eb2b", "score": "0.71769", "text": "public function getProducts()\n {\n return $this->items[Entity::TYPE_PRODUCT];\n }", "title": "" }, { "docid": "13a9e303af00f6be002233b5c107c0e1", "score": "0.71572244", "text": "public function getProducts()\n\t{\n\t\treturn $this->products;\n\t}", "title": "" }, { "docid": "0db6bc8b005a698d4f1a4d8b08e5bb51", "score": "0.7133101", "text": "public function getShopProducts(){\r\n $this->products = array();\r\n try {\r\n include_once __DIR__.'\\..\\cruds\\productCrud.php';\r\n $productCrud = new ProductCrud($this->crud);\r\n $dbProducts = $productCrud->readAllProducts();\r\n $this->products = $dbProducts;\r\n }\r\n catch (PDOException $e){\r\n $this->exception = DATABASE_ERROR;\r\n $this->debugLog('Getting all the products failed with the following error: '. $e->getMessage());\r\n $this->debugLog = 'Getting all the products failed with the following error: '. $e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "5586662f3dd17c1d27378a87f10ab22d", "score": "0.7128864", "text": "public function getProducts(){\n $user = $this->_db->query('SELECT * FROM productos');\n return $user->fetchall();\n }", "title": "" }, { "docid": "c3a29e16a4eb9dd8fe92fe69c18ef8f1", "score": "0.71284795", "text": "public function getProducts() {\r\n\t\treturn $this->products;\r\n\t}", "title": "" }, { "docid": "e90c917ecaa8e54cea053e95a6967cab", "score": "0.7041086", "text": "public function getProducts() {\n\t\t$client = $this->createClient();\n\t\t$url = 'https://' . $this->_domain . '/admin/products.json';\n\t\t$response = $client->request($url);\n\t\t$products = json_decode($response['body']);\n\t\treturn $products->products;\n\t}", "title": "" }, { "docid": "e3605b48a0c8cbf709e42a10374edf22", "score": "0.70137614", "text": "public function getAllProducts(){\n\t\treturn $this->products->latest()->get();\n\t}", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.6982878", "text": "public function getProduct();", "title": "" }, { "docid": "ccc6017da99925a53000d81bc6091ad9", "score": "0.69776046", "text": "public function get(): array\n {\n return $this->allProducts;\n }", "title": "" }, { "docid": "b0f288db6e35113ad247161d1d114205", "score": "0.6968937", "text": "public function listProducts()\n {\n return $this->request('GET', '/products');\n }", "title": "" }, { "docid": "c7b14fdae44300c2951a8fd62661d5dc", "score": "0.6947384", "text": "public function getProducts()\n {\n\n $databaseResults = $this -> databaseInstance -> selectAllProductsReverse(\"products\");\n $resultsDecoded= Utility::jsonEncodeThenDecode($databaseResults);\n\n return $this -> productMapper($resultsDecoded);\n }", "title": "" }, { "docid": "d741c799340393765c6c2e94b9da24ab", "score": "0.6947009", "text": "public function getAll(){\n return $this->product->all();\n }", "title": "" }, { "docid": "2564c4fb4da187ef80b9e57e46fe9fc8", "score": "0.6940918", "text": "public function fetchProducts(): array;", "title": "" }, { "docid": "fab2ad9e533e40f63e21e1834708093d", "score": "0.6931043", "text": "public function get_product_list() {\n ConnectionManager::config('default');\n $conn = ConnectionManager::get('default');\n $product_list = $conn->query(\"SELECT OfferItems.id AS `OfferItems__id`, Products.productName AS `Products__productName`\"\n . \" FROM offer_items OfferItems INNER JOIN order_items OrderItems ON OrderItems.id = (OfferItems.order_items_id)\"\n . \" INNER JOIN products Products ON Products.id = (OrderItems.products_id) LIMIT 20 OFFSET 0\");\n \n $offerItem_product_list = [];\n foreach ($product_list as $prod){\n $offerItem_product_list[$prod['OfferItems__id']] = $prod['Products__productName'];\n }\n return $offerItem_product_list;\n }", "title": "" }, { "docid": "0e345a9bd9904afdee91dd8feddb87df", "score": "0.6883061", "text": "public function getProducts()\n {\n return [\n [\n 'sku' => 'burger',\n 'name' => 'Burger & fries',\n 'image' => '/img/burger.jpg',\n 'price' => 13.95\n ],\n [\n 'sku' => 'pizza',\n 'name' => 'Pizza funghi',\n 'image' => '/img/pizza.jpg',\n 'price' => 9.95\n ],\n [\n 'sku' => 'burrito',\n 'name' => 'Burrito chicken',\n 'image' => '/img/burrito.jpg',\n 'price' => 9.95\n ],\n [\n 'sku' => 'steak',\n 'name' => 'Steak',\n 'image' => '/img/steak.jpg',\n 'price' => 29.95\n ],\n [\n 'sku' => 'noodles',\n 'name' => 'Noodles',\n 'image' => '/img/noodles.jpg',\n 'price' => 12.95\n ],\n [\n 'sku' => 'sandwich',\n 'name' => 'Sandwich',\n 'image' => '/img/sandwich.jpg',\n 'price' => 4.95\n ]\n ];\n }", "title": "" }, { "docid": "b56b92aaec015e601821851120024a09", "score": "0.68804926", "text": "public function getCartProducts(){\r\n $this->products = array();\r\n $ids = $this->session->getProductIds();\r\n try {\r\n if (!empty($ids)){\r\n include_once __DIR__.'\\..\\cruds\\productCrud.php';\r\n $productCrud = new ProductCrud($this->crud);\r\n $dbProducts = $productCrud->readProductsByIds($ids);\r\n $this->priceTotal = 0;\r\n foreach($dbProducts as $product){\r\n include_once __DIR__.'\\..\\objects\\productWithExtra.php';\r\n $product = new ProductWithExtra($product);\r\n $amount = $this->session->getProductQuantity($product->product_id);\r\n $product->setAmount($amount);\r\n $product->calculateSubTotal();\r\n $this->products[$product->product_id] = $product;\r\n $this->priceTotal += $product->subTotal;\r\n }\r\n }\r\n }\r\n catch (PDOException $e){\r\n $this->exception = DATABASE_ERROR;\r\n $this->debugLog('Getting all the cart products failed with the following error: '.$e->getMessage());\r\n $this->debugLog = 'Getting all the cart products failed with the following error: '.$e->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "633c1ad40d755789b7ca82c1f771fab8", "score": "0.6853182", "text": "public function getProducts(){\n\t\t$products = array();\n\t\t$sql = \"SELECT * FROM product WHERE price_sale = 0 OR price_sale = null OR price_sale = '' ORDER BY id_product DESC\";\n\t\t$res = DB::query($sql);\n\t\twhile($row = mysqli_fetch_assoc($res)){\n\t\t\t$products[] = new Product (\n\t\t\t\t$row['id_product'],\n\t\t\t\t$row['id_category'],\n\t\t\t\t$row['name'],\n\t\t\t\t$row['description'],\n\t\t\t\t$row['price'],\n\t\t\t\t$row['price_sale'],\n\t\t\t\t\"\", \"\"/*,\n\t\t\t\t$row['frame_product'],\n\t\t\t\t$row['frame_type']*/\n\t\t\t);\n\t\t}\n\t\tDB::free($res);\n\t\treturn $products;\n\t}", "title": "" }, { "docid": "edac6aacccb370161a42c587e0668015", "score": "0.68433166", "text": "function ProductList(){\n\n\t\t$products = $this->extend('alterProducts');\n\n\t\tif(count($products)) {\n\t\t\t$products = array_pop($products);\n\t\t}\n\n\t\treturn $products ? $products : Product::get();\n\t}", "title": "" }, { "docid": "04b07a0f85199df8c8e5c63e3b2d3906", "score": "0.682912", "text": "public function getBasketItems() {\n return $this->itemsInBasket;\n }", "title": "" }, { "docid": "589a7734bc8cf3d5ece0d5e002ce9660", "score": "0.67826444", "text": "public function getAllProducts()\n {\n $sql = \"SELECT * FROM stock\";\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }", "title": "" }, { "docid": "a0e5dc8d94f557dc9b572664335478de", "score": "0.678151", "text": "public function getProducts() {\n\t\treturn clone $this->products;\n\t}", "title": "" }, { "docid": "08af2e9e79a866ec7c058a47ebe83131", "score": "0.67811185", "text": "function getProducts(){\n\t\t$id = $_GET['id'];\n\t\t$ptid = $_GET['elem_id'];\n\t\t\n\t\t$sql = \"SELECT id, name FROM products WHERE visible > 0 AND product_type_id = \".$ptid;\n\t\t$rows = sql_getRows($sql, true);\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "5888d09c9d5cb7b9ab4fbc103f669156", "score": "0.6776694", "text": "public function getProducts()\n {\n $products = Product::all();\n return $products->toArray();\n }", "title": "" }, { "docid": "ab22b7fba5507797177d532a9f2421f5", "score": "0.6755004", "text": "public function getProducts(){\n \n $prod = new ProductDb();\n $products = $prod->getDb();\n \n return $products;\n \n }", "title": "" }, { "docid": "6306fe53ec424d38c6d27555f47aee76", "score": "0.6754584", "text": "public function getBasket()\n {\n return oxRegistry::getSession()->getBasket();\n }", "title": "" }, { "docid": "03412356d45f5672da4108333b9c3e83", "score": "0.6753174", "text": "protected function product() {\n\t\tif ($this->method == 'GET') {\n\n\t\t\t$db = new \\PDO(\n\t\t\t\t'mysql:host=mysqldev.jetair.be;port=3306;dbname=*****;charset=UTF8;',\n\t\t\t\t'****',\n\t\t\t\t'****'\n\t\t\t);\n\n\t\t\t$repo = new ProductRepository( $db );\n\n\t\t\t$id = null;\n\t\t\tif( isset( $this->args[0] ) ) {\n\t\t\t\t$id = $this->args[0];\n\t\t\t}\n\n\t\t\t$type = null;\n\t\t\tif( isset( $this->args[1] ) ) {\n\t\t\t\t$type = $this->args[1];\n\t\t\t}\n\n\t\t\t$productList = $repo->find( $id, $type );\n\n\t\t\treturn $productList->toArray();\n\t\t} else {\n\t\t\treturn \"Only accepts GET requests\";\n\t\t}\n\t}", "title": "" }, { "docid": "1eb3242565952c03fa50a3e495878c16", "score": "0.67332095", "text": "public function getProducts()\n {\n // Connects to db\n $this->db->connect();\n\n // SQL statement\n $sql = \"SELECT * FROM products;\";\n\n // Executes SQL statement and fetches data from db\n $result = $this->db->executeFetchAll($sql);\n\n // Returns result\n return $result;\n }", "title": "" }, { "docid": "f55279ab3b7b26bc80e24678179807b4", "score": "0.6732141", "text": "public function getProducts(): Products\n {\n return $this->get('products');\n }", "title": "" }, { "docid": "32db104cd7219ce56b7e104af96e4d31", "score": "0.67061317", "text": "public function products()\n {\n $products = [];\n foreach ($this->orders as $key => $order) {\n // foreach ($order->product as $key => $value) {\n $products[] = $order->product;\n // }\n }\n return collect($products);\n }", "title": "" }, { "docid": "94a60f2820b25e5f14609708201643eb", "score": "0.66984123", "text": "public function cartProducts()\n {\n $collection = collect(Arr::pluck($this->items, 'product_id'));\n\n return $collection->map(function($product_id, $key){\n return Product::findOrFail($product_id);\n });\n }", "title": "" }, { "docid": "1d4735342ace018b61784038300e4f53", "score": "0.6696786", "text": "public function getAll()\n {\n $top = DB::findAll($this->table, 'ORDER BY pos DESC');\n\n if($top && count($top) > 0){\n $ids = array_map(function($item){ return $item['product_id']; }, $top);\n return $this->slim->Products->getByIds(array_unique($ids));\n }else{\n return array();\n }\n }", "title": "" }, { "docid": "135f0afbf326806bc4e34652493735cf", "score": "0.6686938", "text": "public function getBasket(): Basket;", "title": "" }, { "docid": "700a4a7de02ed58ad360917b3884d5a0", "score": "0.6686846", "text": "public static function getAllProducts() {\n\t\t$db = new Database();\n\t\t$q = \"select * from table(get_products(1,99999))\";\n\t\t$result = $db->fetchAll($q);\n\t\treturn $result;\n }", "title": "" }, { "docid": "1931b8a174938d3236ae17f5d7199261", "score": "0.66847587", "text": "public function getAllProducts() {\r\n $prod = $this->createQueryBuilder('p');\r\n\r\n return $prod\r\n ->select('p')\r\n ->orderBy('p.id', 'DESC')\r\n ->setMaxResults(25)\r\n ->getQuery()\r\n ->getResult()\r\n ;\r\n }", "title": "" }, { "docid": "bf3aff4f36e6563fc0e1d7c9c7138319", "score": "0.66659933", "text": "public function getProductList(){\n $products = Bigcommerce::getProducts();\n $product_list = array();\n foreach($products as $product) {\n $product_list[] = array(\n 'id' => $product->id,\n 'name' => $product->name,\n );\n }\n \n return $product_list;\n }", "title": "" }, { "docid": "ea2738a5cca9b314d5acdabd56b222e1", "score": "0.66532665", "text": "public function displayBasket() {\r\n return $this->items;\r\n }", "title": "" }, { "docid": "548aaf166050b5c22f5b9b6e9b186cd6", "score": "0.66476226", "text": "public function shopProducts() {\n\t\t\n\t\tif (!$this->_shop_products) {\n\t\t\t$spModel = Base::getModel('Shop_Products');\n\t\t\t$select = $spModel->select()\n\t\t\t ->where('common_user_id = ?', $this->id)\n\t\t\t\t\t ->where('active = ?', 1);\n\t\t\t\t\t\t\n\t\t\t$shop_products = $spModel->fetchAll($select);\n\t\t\t\n\t\t\t$this->_shop_products = $shop_products;\n\t\t}\n\t\t\n\t\treturn $this->_shop_products;\n\t}", "title": "" }, { "docid": "49cb6d32b8b51881381ab1fbcdf5af1d", "score": "0.6629912", "text": "public function listProducts() : array;", "title": "" }, { "docid": "7242612fc22280e9ac471b9fe1d102c7", "score": "0.6629731", "text": "public function get_product()\n {\n $ret=$this->latest()->get();\n return $ret;\n }", "title": "" }, { "docid": "46d05599251ce55bc3d1364db5b68809", "score": "0.6627053", "text": "public function getProductsToBuy()\n {\n $productsToBuy = array();\n $this->authenticate();\n\n $currentWeekSheet = $this->getCurrentWeekSheet();\n if ($currentWeekSheet) {\n $firstColumn = $this->getLetterForColumn(count($this->leftHeaders));\n $lastColumn = $this->getLetterForColumn(\n $currentWeekSheet->getProperties()->getGridProperties()->getColumnCount() - 2\n );\n\n $products = $this->ggService->spreadsheets_values->get(\n $this->spreadsheetId,\n $this->getSheetTitle() . '!' . $firstColumn . '1:' . $lastColumn . '1',\n array('valueRenderOption' => 'FORMULA')\n );\n $quantities = $this->ggService->spreadsheets_values->get(\n $this->spreadsheetId,\n $this->getSheetTitle() . '!' . $firstColumn . '4:' . $lastColumn . '4'\n );\n\n if (!empty($products)) {\n $products = $products->values[0];\n $quantities = $quantities->values[0];\n $length = count($quantities);\n for ($i = 0; $i < $length; $i++) {\n $qty = $quantities[$i];\n if ($qty !== \"\") {\n $product = $products[$i];\n\n $id = -1;\n\n preg_match('/\\/(\\d+)-.*\\.html/', $product, $matches);\n if (!empty($matches)) {\n $id = $matches[1];\n }\n\n $productsToBuy [] = array('id' => $id, 'qty' => $qty);\n }\n }\n }\n }\n\n return $productsToBuy;\n }", "title": "" }, { "docid": "8b62ab628176600f167494b91005a019", "score": "0.6626187", "text": "function rz_GetBasketItems() {\n\t$arItems = array();\n\n\tif (!CModule::IncludeModule('sale')) return $arItems;\n\n\t$bUseCatalog = CModule::IncludeModule('catalog');\n\n\t\\CSaleBasket::UpdateBasketPrices(\\CSaleBasket::GetBasketUserID(), SITE_ID);\n\t/* Check Values Begin */\n\n\t$arSelFields = array(\"ID\", \"CALLBACK_FUNC\", \"MODULE\", \"PRODUCT_ID\", \"QUANTITY\", \"DELAY\",\n\t\t\"CAN_BUY\", \"PRICE\", \"WEIGHT\", \"NAME\", \"CURRENCY\", \"CATALOG_XML_ID\", \"VAT_RATE\",\n\t\t\"NOTES\", \"DISCOUNT_PRICE\", \"PRODUCT_PROVIDER_CLASS\", \"DIMENSIONS\", \"TYPE\", \"SET_PARENT_ID\", \"DETAIL_PAGE_URL\"\n\t);\n\t$dbBasketItems = \\CSaleBasket::GetList(\n\t\t\tarray(\"ID\" => \"ASC\"),\n\t\t\tarray(\n\t\t\t\t\t\"FUSER_ID\" => \\CSaleBasket::GetBasketUserID(),\n\t\t\t\t\t\"LID\" => SITE_ID,\n\t\t\t\t\t\"ORDER_ID\" => \"NULL\"\n\t\t\t\t),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\t$arSelFields\n\t\t);\n\twhile ($arItem = $dbBasketItems->GetNext())\n\t{\n\t\tif ($arItem[\"DELAY\"] == \"N\" && $arItem[\"CAN_BUY\"] == \"Y\")\n\t\t{\n\t\t\t$arItem[\"PRICE\"] = roundEx($arItem[\"PRICE\"], SALE_VALUE_PRECISION);\n\t\t\t$arItem[\"QUANTITY\"] = DoubleVal($arItem[\"QUANTITY\"]);\n\n\t\t\t$arItem[\"WEIGHT\"] = DoubleVal($arItem[\"WEIGHT\"]);\n\t\t\t$arItem[\"VAT_RATE\"] = DoubleVal($arItem[\"VAT_RATE\"]);\n\n\t\t\t$arDim = unserialize($arItem[\"~DIMENSIONS\"]);\n\n\t\t\tif(is_array($arDim))\n\t\t\t{\n\t\t\t\t$arItem[\"DIMENSIONS\"] = $arDim;\n\t\t\t\tunset($arItem[\"~DIMENSIONS\"]);\n\t\t\t}\n\n\t\t\tif($arItem[\"VAT_RATE\"] > 0 && !\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\t{\n\t\t\t\t//$arItem[\"VAT_VALUE\"] = roundEx((($arItem[\"PRICE\"] / ($arItem[\"VAT_RATE\"] +1)) * $arItem[\"VAT_RATE\"]), SALE_VALUE_PRECISION);\n\t\t\t\t$arItem[\"VAT_VALUE\"] = roundEx((($arItem[\"PRICE\"] / ($arItem[\"VAT_RATE\"] +1)) * $arItem[\"VAT_RATE\"]), SALE_VALUE_PRECISION);\n\t\t\t}\n\n\t\t\tif($arItem[\"DISCOUNT_PRICE\"] > 0)\n\t\t\t{\n\t\t\t\t$arItem[\"DISCOUNT_PRICE_PERCENT\"] = $arItem[\"DISCOUNT_PRICE\"]*100 / ($arItem[\"DISCOUNT_PRICE\"] + $arItem[\"PRICE\"]);\n\t\t\t\t$arItem[\"DISCOUNT_PRICE_PERCENT_FORMATED\"] = roundEx($arItem[\"DISCOUNT_PRICE_PERCENT\"], 0).\"%\";\n\t\t\t}\n\n\t\t\t$arItem[\"PROPS\"] = array();\n\t\t\t$dbProp = \\CSaleBasket::GetPropsList(array(\"SORT\" => \"ASC\", \"ID\" => \"ASC\"), array(\"BASKET_ID\" => $arItem[\"ID\"], \"!CODE\" => array(\"CATALOG.XML_ID\", \"PRODUCT.XML_ID\")));\n\t\t\twhile($arProp = $dbProp -> GetNext())\n\t\t\t{\n\t\t\t\tif (array_key_exists('BASKET_ID', $arProp))\n\t\t\t\t{\n\t\t\t\t\tunset($arProp['BASKET_ID']);\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('~BASKET_ID', $arProp))\n\t\t\t\t{\n\t\t\t\t\tunset($arProp['~BASKET_ID']);\n\t\t\t\t}\n\n\t\t\t\t$arProp = array_filter($arProp, array(\"CSaleBasketHelper\", \"filterFields\"));\n\n\t\t\t\t$arItem[\"PROPS\"][] = $arProp;\n\t\t\t}\n\n\t\t\tif (!\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\t{\n\t\t\t\t$DISCOUNT_PRICE_ALL += $arItem[\"DISCOUNT_PRICE\"] * $arItem[\"QUANTITY\"];\n\t\t\t\t$arItem[\"DISCOUNT_PRICE\"] = roundEx($arItem[\"DISCOUNT_PRICE\"], SALE_VALUE_PRECISION);\n\t\t\t}\n\n\t\t\tif (\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\t\t$arSetParentWeight[$arItem[\"SET_PARENT_ID\"]] += $arItem[\"WEIGHT\"] * $arItem['QUANTITY'];\n\n\t\t\t$arItems[] = $arItem;\n\t\t}\n\n\t\t// count weight for set parent products\n\t\tforeach ($arItems as &$arItem)\n\t\t{\n\t\t\tif (\\CSaleBasketHelper::isSetParent($arItem))\n\t\t\t{\n\t\t\t\t$arItem[\"WEIGHT\"] = $arSetParentWeight[$arItem[\"ID\"]] / $arItem[\"QUANTITY\"];\n\t\t\t}\n\t\t}\n\n\t\tif ($bUseCatalog)\n\t\t{\n\t\t\t$arParent = \\CCatalogSku::GetProductInfo($arItem[\"PRODUCT_ID\"]);\n\t\t\tif ($arParent)\n\t\t\t{\n\t\t\t\t$arElementId[] = $arParent[\"ID\"];\n\t\t\t\t$arSku2Parent[$arItem[\"PRODUCT_ID\"]] = $arParent[\"ID\"];\n\t\t\t}\n\t\t}\n\t\tunset($arItem);\n\t}\n\n\tif (!empty($arResult[\"BASKET_ITEMS\"]))\n\t{\n\t\tif ($bUseCatalog)\n\t\t\t$arResult[\"BASKET_ITEMS\"] = getMeasures($arResult[\"BASKET_ITEMS\"]); // get measures\n\t}\n\n\t// use later only items not part of the sets\n\tforeach ($arItems as $id => $arItem)\n\t{\n\t\tif (\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\tunset($arItems[$id]);\n\t}\n\n\treturn $arItems;\n}", "title": "" }, { "docid": "b4eb907c90422661bac190db2ee0b845", "score": "0.660074", "text": "public function getAll(){\n \t$products = Product::all();\n\n \treturn $products;\n }", "title": "" }, { "docid": "20e3bf7682f55ba30960b4788f7068f9", "score": "0.659676", "text": "public function getOrderProduct() {\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$filter = $jinput->get('filter');\n\t\t$q = \"SELECT DISTINCT order_item_sku AS product_sku, order_item_name AS product_name\n\t\t\t\tFROM #__virtuemart_order_items o\n\t\t\t\tWHERE (order_item_sku LIKE \".$db->Quote('%'.$filter.'%').\"\n\t\t\t\t\tOR order_item_name LIKE \".$db->Quote('%'.$filter.'%').\")\n\t\t\t\tORDER BY order_item_name\n\t\t\t\tLIMIT 10;\";\n\t\t$db->setQuery($q);\n\t\treturn $db->loadObjectList();\n\t}", "title": "" }, { "docid": "9acdf3e7e47452e6d49281c5150ed5e6", "score": "0.659441", "text": "function getAllProducts()\r\n\t{\r\n\r\n\t\t$sql = \"SELECT `ProductID`,`ProductName`, `ProductDesc`, `UnitsInStock`, `Image`, `UnitPrice` FROM `ply1`.`Products`\";\r\n\t\t$rs = $this->executeQuery($sql, $_SERVER[\"SCRIPT_NAME\"]);\r\n\t\treturn $rs;\r\n\t}", "title": "" }, { "docid": "c595f06c9c586a436e29724dd32a9253", "score": "0.6589046", "text": "public function getProductos(){\n /* Aca tambien, los corchetes luego de productos estan de mas.\n return $this->productos[];\n * La forma correcta es */\n return $this->productos;\n }", "title": "" }, { "docid": "7fdf7edd226b88c40617183f28cb36af", "score": "0.6588649", "text": "protected function getAllProducts() {\n $sql = \"SELECT * FROM products\";\n $results = $this->connect()->query($sql);\n $numRows = $results->num_rows;\n\n if ($numRows > 0) {\n while ($row = $results->fetch_assoc()) {\n $data[] = $row;\n }\n return $data;\n }\n\n }", "title": "" }, { "docid": "4f029d4066e4e0386a92e8c38bc5cde9", "score": "0.6583599", "text": "public function getProducts()\n\t{\n\t\t$fields = array('id_product', 'reference', 'name', 'meta_title', 'meta_description','description', 'description_short', 'link_rewrite');\n\n\t\t$start = true;\n\t\t$page = 0;\n\t\twhile($start)\n\t\t{\n\t\t\t$limit1 = $page * 3;\n\t\t\t$opt = array('resource' => 'products', 'limit' => $limit1.',3');\n\n\t\t\t$xml = $this->prestashop->get($opt);\n\n\t\t $resources = $xml->products->children();\n\n\t\t if($resources)\n\t\t\t foreach ($resources as $resource)\n\t\t\t {\n\t\t\t \t $opt = Array();\n\t\t\t \t $id_product = $resource->attributes();\n\t\t\t \t $opt['resource'] = 'products';\n\t\t\t \t $opt['id'] = $id_product;\n\t\t\t \t $xml = $this->prestashop->get($opt);\n\n\t\t\t \t $o['resource'] = 'images/products';\n\t\t\t \t $o['display'] = 'full';\n\t\t\t \t $o['id'] = $id_product;\n\t\t\t \t $m = $this->prestashop->get($o);\n\n\t\t\t \t var_dump($m);\n\n\t\t\t \t exit;\n\n\t\t\t \t $data = array();\n\n\t\t\t \t $data['id_product'] = $id_product;\n\t\t\t \t $data['reference'] = utf8_decode($xml->product->reference);\n\t\t\t \t $data['name'] = utf8_decode($xml->product->name->language[0]);\n\t\t\t \t $data['meta_title'] = utf8_decode($xml->product->meta_title->language[0]);\n\t\t\t \t $data['meta_description'] = utf8_decode($xml->product->meta_description->language[0]);\n\t\t\t \t $data['description'] = utf8_decode($xml->product->description->language[0]);\n\t\t\t \t $data['description_short'] = utf8_decode($xml->product->description_short->language[0]);\n\t\t\t \t $data['link_rewrite'] = utf8_decode($xml->product->link_rewrite->language[0]);\n\n\t\t\t \t if($this->checkIsset($id_product, 'product', $fields))\n\t\t\t \t \t$this->update($id_product, 'product', $fields, $data);\n\t\t\t \t else\n\t\t\t \t \t$this->add($id_product, 'product', $fields, $data);\n\n\t\t\t }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$start = false;\n\t\t\t}\n\t\t\t$page ++;\n\t\t}\n\t}", "title": "" }, { "docid": "6bf6be9f1b9907faac3d5dfcc2658107", "score": "0.65795004", "text": "public function getAllProducts(){\n\t\t\n\t\t$sql = 'SELECT * FROM Products';\n\n\treturn $this->getEntityManager()->getConnection()->executeQuery($sql)->fetchAll();\n\t}", "title": "" }, { "docid": "ad99b0a5932d5d00f9de22a257d1ca36", "score": "0.6553689", "text": "public function getProductsAndProfileByShop()\n {\n $res = array();\n foreach ($this->product_list as $product) {\n if ($product['id_ebay_profile']) {\n $ebay_profile = new EbayProfile((int)$product['id_ebay_profile']);\n } else {\n $sql = 'SELECT epr.`id_ebay_profile`\n\t\t\t\tFROM `'._DB_PREFIX_.'ebay_product` epr\n\t\t\t\tWHERE epr.`id_product` = '.(int)$product['id_product'];\n $id_ebay_profile = (int)Db::getInstance()->getValue($sql);\n if ($id_ebay_profile) {\n $ebay_profile = new EbayProfile($id_ebay_profile);\n } else {\n // case where the row in ebay_product has disappeared like if the product has been removed from eBay before sync\n if (version_compare(_PS_VERSION_, '1.5', '>') && Shop::isFeatureActive()) {\n $sql = 'SELECT `id_ebay_profile`\n\t\t\t\t\t\t\tFROM `'._DB_PREFIX_.'ebay_profile` ep\n\t\t\t\t\t\t\tLEFT JOIN `'._DB_PREFIX_.'product_shop` ps\n\t\t\t\t\t\t\tON ep.`id_shop` = ps.`id_shop`\n\t\t\t\t\t\t\tAND ps.`id_product` = '.(int)$product['id_product'];\n $id_ebay_profile = (int)Db::getInstance()->getValue($sql);\n $ebay_profile = new EbayProfile($id_ebay_profile);\n } else {\n $ebay_profile = EbayProfile::getCurrent();\n }\n }\n }\n\n if (!isset($res[$ebay_profile->id_shop])) {\n $res[$ebay_profile->id_shop] = array(\n 'id_ebay_profiles' => array($ebay_profile->id),\n 'id_products' => array(),\n );\n } elseif (!in_array($ebay_profile->id, $res[$ebay_profile->id_shop]['id_ebay_profiles'])) {\n $res[$ebay_profile->id_shop]['id_ebay_profiles'][] = $ebay_profile->id;\n }\n\n // $res[$ebay_profile->id_shop]['id_products'][] = $product['id_product'];\n $res[$ebay_profile->id_shop]['id_products'][] = array(\n 'id_product' => $product['id_product'],\n 'id_product_attribute' => $product['id_product_attribute'],\n );\n }\n\n return $res;\n }", "title": "" }, { "docid": "a6b210dbb780145803f23e7f3a114180", "score": "0.6550909", "text": "public function getAllProduct() {\n try {\n $sql = \"SELECT * FROM product ORDER BY id DESC LIMIT ?,?\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindValue(1, ($current_page - 1) * $num_products_on_each_page, PDO::PARAM_INT);\n $stmt->bindValue(2, $num_products_on_each_page, PDO::PARAM_INT);\n $stmt->execute();\n\n $products = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $products;\n } catch (Exception $e) {\n die(\"Oh noes! There's an error in the query!\");\n }\n }", "title": "" }, { "docid": "22c6e30ca1b085eff549da773fa9c376", "score": "0.65506214", "text": "public function getProducts() \n {\n return $this->_fields['Products']['FieldValue'];\n }", "title": "" }, { "docid": "c61a2524f3289cd940a7de3534500fcd", "score": "0.6545158", "text": "public function getTopSellingProducts()\n {\n $databaseResults = $this -> databaseInstance -> queryTopSellingProducts(\"products\" , \"order\");\n $resultsDecoded= Utility::jsonEncodeThenDecode($databaseResults);\n\n return $this -> productMapper($resultsDecoded);\n }", "title": "" }, { "docid": "ec659651ac0998467947921f6f8b0ded", "score": "0.65406996", "text": "public function getAllProductsForCache()\n\t{\n\t\t$this->resetLocalCacheData('allProducts');\n\t\t$products = $this->getProducts(array(), array('join' => Brivium_Store_Model_Product::FETCH_FULL));\n\t\treturn $products;\n\t}", "title": "" }, { "docid": "e8bedec53238c1996b20012871cd305f", "score": "0.65386724", "text": "public function getProductList()\n {\n $products = Product::latest()->paginate(5);\n\n return $products;\n }", "title": "" }, { "docid": "de3f772b38beb7255dca9a4ac1d74ec1", "score": "0.65339315", "text": "function _affilinet_GetBasketItems(){\n\t$soapLogon = new SoapClient(WSDL_LOGON);\n\t$token = $soapLogon->Logon(array(\n\t 'Username' => USERNAME,\n\t 'Password' => PASSWORD,\n\t 'WebServiceType' => 'Publisher'\n\t));\n\t \n\t// Set parameters\n\t$basketId = ''; // ID of the basket you want to retrieve the items from\n\t \n\t// Send request to Publisher Statistics Service\n\t$soapRequest = new SoapClient(WSDL_PUBSTATS);\n\t$response = $soapRequest->GetBasketItems(array(\n\t 'CredentialToken' => $token,\n\t 'BasketId' => $basketId\n\t));\n\t\n\treturn $response;\n}", "title": "" }, { "docid": "ca88d3bf099496af307cacc6b9613977", "score": "0.6533833", "text": "public function readAllProducts(){\r\n $sql = 'SELECT * FROM products';\r\n $param = array();\r\n include_once __DIR__.'/../objects/Product.php';\r\n return $this->crud->readMultiRows($sql, $param, 'product_id', 'Product');\r\n }", "title": "" }, { "docid": "db053a8e5db1cb676e47eb328823e719", "score": "0.6519234", "text": "public function getAllProducts(){\n\t\t$res = $this->con->query(\"SELECT * FROM producto\".$this->order());\n\t\t\n\t\t$resultado = array();\n\t\twhile( $fila = $res->fetch_assoc() ){\n\t\t\t$resultado[] = $fila;\n\t\t}\n\t\treturn $resultado;\n\t\t\n\t}", "title": "" }, { "docid": "8c6cd8e22b052519075642c766ffd567", "score": "0.65116173", "text": "public function getProduct()\n {\n $query = \"SELECT * FROM produk WHERE stock > 0\";\n\n $this->db->query($query);\n $this->db->execute();\n\n return $this->db->resultSet();\n }", "title": "" }, { "docid": "1f7a3be872da1900ff2e344a17ba83d2", "score": "0.65068775", "text": "public function index()\n {\n //\n return auth()->user()->products()->get();\n }", "title": "" }, { "docid": "5251c048c0c661a6779db08aa587f1f7", "score": "0.6505019", "text": "function dcs_dropship_getProducts($pageNumber=1,$category=\"all\",$searchTerms=\"\")\r\n{\r\n\tglobal $dropshipProducts;\r\n\r\n\tif( $dropshopProducts == NULL )\r\n\t{\r\n\t\tdcs_dropship_loadProducts($pageNumber,$category,$searchTerms);\r\n\t}\r\n\r\n\treturn $dropshipProducts;\r\n}", "title": "" }, { "docid": "63c14347e5b5fe5246a1a9d5e87e64f6", "score": "0.6500783", "text": "private function query_products() {\n $query = \"SELECT Product2.Id, Product2.Name, Product2.ProductCode, Product2.Description, \"\n . \"Product2.isActiveOnlineProduct__c, PricebookEntry.UnitPrice FROM PricebookEntry\";\n\n $url = $this->instance_url . \"/services/data/\" . $this->api_version . \"/query?q=\" . urlencode( $query );\n\n return $this->get_response( $url );\n }", "title": "" }, { "docid": "09b85eeb0aaf5d0c4d996e81fe4e6e9a", "score": "0.6499381", "text": "public function getAllProduct()\n {\n $currentProductArray = (new ProductsModel())->findAll();\n if ($currentProductArray == []) {\n return $this->respond([\n \"status\" => \"failed\",\n \"message\" => \"Il n'y a aucun produit pour le moment!\"\n ]);\n } else {\n return $this->respond($currentProductArray);\n }\n }", "title": "" }, { "docid": "29a4627eb2d9b3966e4a646038bb0a82", "score": "0.64945906", "text": "public static function all() { \n return session(\"products\")? session(\"products\") : [];\n }", "title": "" }, { "docid": "6f65ecdb94751c95b3a4c393dc909ba2", "score": "0.64943093", "text": "public function productsAll()\n {\n $prods = products::all();\n\n return $prods->toJson();\n\n }", "title": "" }, { "docid": "e9dab2d0b79725637ced4fca4819ac3b", "score": "0.6493638", "text": "public function getAllProducts()\n {\n $product = new QueryBuilder();\n $products = $product->all('product');\n\n return $products;\n }", "title": "" }, { "docid": "a0e4be5fb616cb4d93b6f7a6e0bbfdd5", "score": "0.64884895", "text": "private function getProducts()\n {\n $query = $this->product->select();\n\n if (isset($this->selectedCategory) && $this->selectedCategory->count()) {\n $query->whereIn('categories_id', $this->productRetrieveConstraintCategories($this->selectedCategory)->pluck('id'));\n }\n\n if (isset($this->selectedBrand) && $this->selectedBrand->count()) {\n $query->whereIn('brands_id', $this->selectedBrand->pluck('id'));\n }\n\n if (isset($this->selectedModel) && $this->selectedModel->count()) {\n $query->whereHas('deviceModel', function ($query) {\n $query->whereIn('id', $this->selectedModel->pluck('id'));\n });\n }\n\n if (isset($this->selectedColor) && $this->selectedColor->count()) {\n $query->where(function ($query) {\n $query->whereIn('colors_id', $this->selectedColor->pluck('id'))\n ->orWhereNull('colors_id');\n });\n }\n\n if (isset($this->selectedQuality) && $this->selectedQuality->count()) {\n $query->whereIn('quality_id', $this->selectedQuality->pluck('id'));\n }\n\n $query->with('primaryImage');\n\n $query->with(['storageProduct' => function ($query) {\n $query->whereRaw('stock_quantity > reserved_quantity');\n }]);\n\n $query->with(['vendorProduct' => function ($query) {\n $query->where('stock_quantity', '>', 0);\n }]);\n\n $query->with('productBadge.badge');\n\n if (auth('web')->check()) {\n $query->with(['favouriteProduct' => function ($query) {\n $query->where('users_id', auth('web')->user()->id);\n }]);\n }\n\n return $this->isPaginable ? $query->paginate(config('shop.products_per_page')) : $query->get();\n }", "title": "" }, { "docid": "d59bbc9d7b3ce0b70d1baf70a9f05a05", "score": "0.64816785", "text": "public function getProductos() {\n return $this->productos;\n }", "title": "" }, { "docid": "53ab00d95115e327a5c89f8711262e04", "score": "0.64806294", "text": "public function get_order_product_all(){\n \t\t$this->db->from($this->table17);\n \t\t$this->db->where('id');\n \t\t$query = $this->db->get();\n \t\treturn $query->row();\n \t}", "title": "" }, { "docid": "cde37d2a3d1d852b0322cfe32f5ebf85", "score": "0.6470234", "text": "public function getBasket(){\n $sql = \"SELECT tb.id_items, sum(tb.amount) as qty,ti.name,ti.price as ttl from tbl_basket as tb inner join tbl_items as ti on tb.id_items = ti.id\nWHERE cookie_user = ? group by tb.id_items, ti.name \";\n try {\n $result = $this->_db->prepare($sql);\n $result->execute(array($_COOKIE['cookie_user']));\n $fetchData = $result->fetchAll();\n return $fetchData;\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "b279b4dc9cc7e27bdd8a2acc85392012", "score": "0.6465306", "text": "public static function getProducts()\n {\n if (isset($_SESSION['products'])) {\n return $_SESSION['products'];\n }\n return false;\n }", "title": "" }, { "docid": "b279b4dc9cc7e27bdd8a2acc85392012", "score": "0.6465306", "text": "public static function getProducts()\n {\n if (isset($_SESSION['products'])) {\n return $_SESSION['products'];\n }\n return false;\n }", "title": "" }, { "docid": "b279b4dc9cc7e27bdd8a2acc85392012", "score": "0.6465306", "text": "public static function getProducts()\n {\n if (isset($_SESSION['products'])) {\n return $_SESSION['products'];\n }\n return false;\n }", "title": "" }, { "docid": "be73489020f3d28f1db17bd1799f601b", "score": "0.6462441", "text": "public function getProduct()\n\t{\n\t\t$sql=\"select * from products\";\n\t\treturn $this->query($sql);\n\t}", "title": "" }, { "docid": "007f8791a9355600307ae51474aaf249", "score": "0.64566356", "text": "public function populate($basket);", "title": "" }, { "docid": "19d553b9ed529461b3eca08d5b564bed", "score": "0.6444449", "text": "public function getAllActiveProducts()\n {\n }", "title": "" }, { "docid": "6980bfb15d05f32562c3359f96bdc1a7", "score": "0.6438036", "text": "public function get_products() {\n $response = $this->query_products();\n\n $error_response = $this->get_error_status( $response );\n if ( $error_response == \"solved\" ) {\n $response = $this->query_products();\n } else if ( $error_response == \"failed\" ) {\n return null;\n }\n\n try {\n $products = array();\n foreach( $response[\"records\"] as $product ) {\n if ( !$this->is_product_id_in_array( $product[\"Product2\"][\"Id\"], $products ) ) {\n array_push( $products, array(\n \"id\" => trim( $product[\"Product2\"][\"Id\"] ),\n \"name\" => $product[\"Product2\"][\"Name\"],\n \"code\" => $product[\"Product2\"][\"ProductCode\"],\n \"unit_price\" => $product[\"UnitPrice\"],\n \"is_active\" => $product[\"Product2\"][\"isActiveOnlineProduct__c\"],\n \"wand_id\" => $product[\"Product2\"][\"Product_4D_Wand_ID__c\"]\n ) );\n }\n }\n return $products;\n } catch( Exception $e ) {\n return null;\n }\n }", "title": "" }, { "docid": "3d71d37968511c88667d62769626ea82", "score": "0.64379996", "text": "public function actionGetproducts(){\n $result = [\n 'products' => [],\n 'maxpage' => 0,\n ];\n if(Yii::$app->request->get('category_id')){\n $model_product = new ProductsSearch();\n $model_product->category_id = (int)Yii::$app->request->get('category_id');\n if(Yii::$app->request->get('get_cart')){\n $carts = Yii::$app->session->has(CartEnum::CART_KEY) ? Yii::$app->session->get(CartEnum::CART_KEY) :[] ;\n $products = $model_product->getProductsByCategory($carts);\n }\n else{\n $products = $model_product->getProductsByCategory();\n }\n $result['products'] = isset($products['products']) ? $products['products'] : [];\n $result['maxpage'] = isset($products['maxpage']) ? $products['maxpage'] : [];\n }\n return $result;\n }", "title": "" }, { "docid": "796807859be48becd6fce25c9c343f24", "score": "0.6436832", "text": "public function productsAction(){\n\t\tif(!$this->getPageNoIsValid('Product')) {\n\t\t\t$this->json = '';\n\t\t} else {\n\t\t\t$this->json = array_merge($this->json,$this->getProducts());\n\t\t}\n\t}", "title": "" }, { "docid": "84f62f27647d9ab4645e3daf0807459a", "score": "0.6428402", "text": "public function getProductsList() {\n return self::$productsList;\n }", "title": "" }, { "docid": "32c1bfd128bec9c9eb314d0a64ba9f3e", "score": "0.642184", "text": "public function getProductsFeed()\n {\n $product_id = $this->getRequest()->getQuery('product_id');\n $stores = array();\n $storeCollection = Mage::getModel('core/store')->getCollection();\n\n if (empty($product_id)) {\n\n $offset = $this->getRequest()->getQuery('offset');\n\n if ($offset == null) {\n echo '{\n \"success\": false,\n \"data\": {\n \"error_code\": \"QW-4003\",\n \"error\": \"Offset not set.\"\n }\n }'\n ;\n exit;\n }\n\n $limit = $this->getRequest()->getQuery('limit');\n\n if ($limit == null) {\n echo '{\n \"success\": false,\n \"data\": {\n \"error_code\": \"QW-4004\",\n \"error\": \"Limit not set.\"\n }\n }'\n ;\n exit;\n }\n //Magento uses pages and not offset amount. We calculate the page based on the limit and offset provided\n if ($offset == 0) {\n $page = 1;\n } else {\n $page = ($offset / $limit) + 1;\n }\n\n $store = Mage::app()->getStore();\n $store_id = $store->getId();\n $productslist = Mage::getResourceModel('catalog/product_collection')->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', 4)->setPage($page, $limit)->addStoreFilter($store_id);\n $json = array();\n\n foreach ($productslist as $theproduct) {\n $productId = $theproduct->getId();\n $product = Mage::getModel('catalog/product')->load($productId);\n $maincat = $subcats = '';\n $cats = $product->getCategoryIds();\n $category_ids = array();\n\n foreach ($cats as $category_id) {\n $_cat = Mage::getModel('catalog/category')->load($category_id);\n if ($_cat->getIsActive()) {\n $category_ids[] = $category_id;\n }\n }\n\n $product_data = array();\n $product_data['product_id'] = $productId;\n $parentIds = null;\n if ($product->getTypeId() == \"simple\") {\n $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId()); // check for grouped product\n if (!$parentIds)\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); //check for config product\n }\n\n /* if (!empty($parentIds)) {\n $product_data['parent_product_id'] = $parentIds[0];\n } else {\n $product_data['parent_product_id'] = null;\n } */\n $product_data['product_name'] = $product->getName();\n $product_data['sku_number'] = $product->getSku();\n $product_data['created'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getCreatedAt()));\n $product_data['updated'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getUpdatedAt()));\n\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL) {\n $product_data['downloadable'] = true;\n } else {\n $product_data['downloadable'] = false;\n }\n\n if ($product->getGtin()) {\n $product_data['gtin'] = $product->getGtin();\n $product_data['unique_identifier'] = true;\n } else {\n $product_data['gtin'] = null;\n $product_data['unique_identifier'] = false;\n }\n\n $product_data['mpn'] = $product->getMpn();\n $product_data['brand'] = $product->getBrand();\n $product_data['weight'] = $product->getWeight();\n $product_data['weight_unit'] = 'kg';\n if ($maincat) {\n $product_data['primary_category'] = $maincat;\n }\n $product_data['category_ids'] = $category_ids;\n $product_data['product_url'] = $product->getProductUrl();\n $product_data['product_image_urls'] = array();\n\n if ($product->getImage()) {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n $mainimage->main = true;\n $product_data['product_image_urls'][] = $mainimage;\n }\n\n foreach ($product->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $product_data['product_image_urls'][] = $subimage;\n }\n\n //$product_data['ProductImageURL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\n $product_data['short_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0) : \"No short description available\";\n $product_data['long_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0) : \"No description available\";\n }\n $product_data['sale_price'] = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $product_data['retail_price'] = number_format((float) $product->getPrice(), 2, '.', '');\n\n if ($product->getMspCashback()) {\n $product_data['cashback'] = $product->getMspCashback();\n }\n //$product_data['UniversalProductCode'] = $product->getData('upc'); //need variable\n /**\n * Get product tax rule\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\n $product_data['stock'] = (INT) $stockItem->getQty();\n\n $meta_data = array();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n if ($productdata->getMetaTitle() && $productdata->getMetaKeyword() && $productdata->getMetaDescription()) {\n $meta_data['title'][$language] = $productdata->getMetaTitle();\n $meta_data['keyword'][$language] = $productdata->getMetaKeyword();\n $meta_data['description'][$language] = $productdata->getMetaDescription();\n }\n }\n\n if (!empty($meta_data)) {\n $product_data['metadata'] = $meta_data;\n }\n\n $attr = array();\n $attributes = $product->getAttributes();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_condition = $product->getAttributeText($attribute->getAttributeCode());\n $_coditionDefault = $product->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product);\n $attribute = Mage::getModel('eav/entity_attribute')->load($attribute->getAttributeId());\n $langlabels = $attribute->getStoreLabels();\n\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n\n if (!empty($attr)) {\n $product_data['attributes'] = $attr;\n }\n if ($product->isConfigurable()) {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n $collection = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);\n $childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product->getId());\n if ($collection) {\n $processed = array();\n foreach ($collection as $childproduct) {\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n $variant = new stdclass();\n\n $variant->product_id = $childproduct->getId();\n $processed[] = $childproduct->getId();\n $variant->sku_number = $childproduct->getSku();\n if ($childproduct->getGtin()) {\n $variant->gtin = $childproduct->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $childproduct->getMpn();\n if ($childproduct->getImage()) {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n $childimages = $childproduct->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($childproduct->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n $attrchild = array();\n $attributes = $childproduct->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n } else {\n $processed = array();\n\n foreach ($childIds[0] as $key => $childid) {\n $childproduct = Mage::getModel('catalog/product')->load($childid);\n\n if (!in_array($childproduct->getId(), $processed)) {\n $variant = new stdclass();\n $variant->product_id = $childproduct->getId();\n $processed[] = $childproduct->getId();\n $variant->sku_number = $childproduct->getSku();\n if ($childproduct->getGtin()) {\n $variant->gtin = $childproduct->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $childproduct->getMpn();\n\n if ($childproduct->getImage() && $childproduct->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n $childimages = $childproduct->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($childproduct->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product->getPrice(), 2, '.', '');\n $variant->weight = $childproduct->getWeight();\n $variant->weight_unit = 'kg';\n\n if ($childproduct->getMspCashback()) {\n $variant->cashback = $childproduct->getMspCashback();\n }\n\n $attrchild = array();\n $attributes = $childproduct->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n }\n $product_data['variants'] = $variants;\n } elseif ($product->getTypeId() == \"grouped\") {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n\n $collection = Mage::getModel('catalog/product_type_grouped')->getAssociatedProductCollection($product);\n\n $processed = array();\n $prices = array();\n foreach ($collection as $childproduct) {\n\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n\n $variant = new stdclass();\n $variant->product_id = $product_child->getId();\n $processed[] = $product_child->getId();\n $variant->sku_number = $product_child->getSku();\n if ($product_child->getGtin()) {\n $variant->gtin = $product_child->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $product_child->getMpn();\n\n if ($product_child->getImage() && $product_child->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product_child->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n\n $childimages = $product_child->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($product_child->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_child->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product_child->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product_child->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n\n\n $prices[] = $variant->sale_price;\n\n $attrchild = array();\n $attributes = $product_child->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $product_child->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product_child);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n\n /**\n * Get child product tax rule. We need to set this as the main product is of type grouped and does not have this value.\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product_child->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product_child->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n\n\n $product_data['from_price'] = min($prices);\n $product_data['variants'] = $variants;\n }\n\n $options = $product->getOptions();\n\n if (!empty($options)) {\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\n foreach ($productdata->getOptions() as $value) {\n if (is_object($value)) {\n $optionobjects = $value->getValues();\n $values = array();\n foreach ($optionobjects as $options) {\n $data = $options->getData();\n $optiondata = new stdclass();\n $optiondata->id = $data['option_type_id'];\n $optiondata->label = $data['title'];\n $optiondata->pricing = $data['price'];\n $optiondata->price_type = $data['price_type'];\n $values[] = $optiondata;\n if (!empty($data['option_type_id'])) {\n $product_data['options']['global_options'][$language][$value->getTitle()] = array(\n 'id' => $data['option_id'],\n 'type' => 'custom',\n //'label' => $value->getTitle(),\n 'values' => $values\n );\n }\n }\n }\n }\n }\n }\n if ($product->getName() != null && $product->getTypeId() != \"bundle\" && $product->getTypeId() != \"downloadable\") {\n $json[] = $product_data;\n }\n }\n } elseif (!empty($product_id)) {\n $stores = array();\n $storeCollection = Mage::getModel('core/store')->getCollection();\n\n $json = array();\n $product = Mage::getModel('catalog/product')->load($product_id);\n\n if ($product->getTypeId() == \"bundle\" || $product->getTypeId() == \"downloadable\") {\n echo '{\n \"success\": false,\n \"data\": {\n \"error_code\": \"QW-4005\",\n \"error\": \"Product type not supported.\"\n }\n }'\n ;\n exit;\n }\n\n $maincat = $subcats = '';\n $cats = $product->getCategoryIds();\n $category_ids = array();\n foreach ($cats as $category_id) {\n $_cat = Mage::getModel('catalog/category')->load($category_id);\n if ($_cat->getIsActive()) {\n $category_ids[] = $category_id;\n }\n }\n\n $product_data = array();\n $product_data['product_id'] = $product_id;\n $parentIds = null;\n if ($product->getTypeId() == \"simple\") {\n $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId()); // check for grouped product\n if (!$parentIds)\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); //check for config product\n }\n\n /* if (!empty($parentIds)) {\n $product_data['parent_product_id'] = $parentIds[0];\n } else {\n $product_data['parent_product_id'] = null;\n } */\n $product_data['product_name'] = $product->getName();\n $product_data['sku_number'] = $product->getSku();\n $product_data['created'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getCreatedAt()));\n $product_data['updated'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getUpdatedAt()));\n\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL) {\n $product_data['downloadable'] = true;\n } else {\n $product_data['downloadable'] = false;\n }\n\n if ($product->getGtin()) {\n $product_data['gtin'] = $product->getGtin();\n $product_data['unique_identifier'] = true;\n } else {\n $product_data['gtin'] = null;\n $product_data['unique_identifier'] = false;\n }\n\n $product_data['mpn'] = $product->getMpn();\n $product_data['brand'] = $product->getBrand();\n $product_data['weight'] = $product->getWeight();\n $product_data['weight_unit'] = 'kg';\n $product_data['category_ids'] = $category_ids;\n $product_data['product_url'] = $product->getProductUrl();\n $product_data['product_image_urls'] = array();\n\n if ($product->getImage()) {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n $mainimage->main = true;\n $product_data['product_image_urls'][] = $mainimage;\n }\n\n foreach ($product->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $product_data['product_image_urls'][] = $subimage;\n }\n\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\n $product_data['short_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0) : \"No short description available\";\n $product_data['long_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0) : \"No description available\";\n }\n\n $product_data['sale_price'] = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $product_data['retail_price'] = number_format((float) $product->getPrice(), 2, '.', '');\n\n if ($product->getMspCashback()) {\n $product_data['cashback'] = $product->getMspCashback();\n }\n\n\n //$product_data['UniversalProductCode'] = $product->getData('upc'); //need variable\n\n /**\n * Get product tax rule\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id);\n $product_data['stock'] = (INT) $stockItem->getQty();\n\n $meta_data = array();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n if ($productdata->getMetaTitle() && $productdata->getMetaKeyword() && $productdata->getMetaDescription()) {\n $meta_data['title'][$language] = $productdata->getMetaTitle();\n $meta_data['keyword'][$language] = $productdata->getMetaKeyword();\n $meta_data['description'][$language] = $productdata->getMetaDescription();\n }\n }\n\n if (!empty($meta_data)) {\n $product_data['metadata'] = $meta_data;\n }\n $attr = array();\n $attributes = $product->getAttributes();\n\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_condition = $product->getAttributeText($attribute->getAttributeCode());\n $_coditionDefault = $product->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product);\n $attribute = Mage::getModel('eav/entity_attribute')->load($attribute->getAttributeId());\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attr)) {\n $product_data['attributes'] = $attr;\n }\n\n if ($product->isConfigurable()) {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n $collection = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);\n\n $processed = array();\n\n foreach ($collection as $childproduct) {\n\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n\n\n $variant = new stdclass();\n $variant->product_id = $childproduct->getId();\n $processed[] = $childproduct->getId();\n $variant->sku_number = $childproduct->getSku();\n if ($childproduct->getGtin()) {\n $variant->gtin = $childproduct->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $childproduct->getMpn();\n\n if ($childproduct->getImage() && $childproduct->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n\n $childimages = $childproduct->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($childproduct->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $childproduct->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $childproduct->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n\n $attrchild = array();\n $attributes = $childproduct->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n $product_data['variants'] = $variants;\n } elseif ($product->getTypeId() == \"grouped\") {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n\n $collection = Mage::getModel('catalog/product_type_grouped')->getAssociatedProductCollection($product);\n\n $processed = array();\n $prices = array();\n foreach ($collection as $childproduct) {\n\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n\n $variant = new stdclass();\n $variant->product_id = $product_child->getId();\n $processed[] = $product_child->getId();\n $variant->sku_number = $product_child->getSku();\n if ($product_child->getGtin()) {\n $variant->gtin = $product_child->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $product_child->getMpn();\n\n if ($product_child->getImage() && $product_child->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product_child->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n\n $childimages = $product_child->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($product_child->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_child->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product_child->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product_child->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n\n\n $prices[] = $variant->sale_price;\n\n $attrchild = array();\n $attributes = $product_child->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $product_child->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product_child);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n\n /**\n * Get child product tax rule. We need to set this as the main product is of type grouped and does not have this value.\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product_child->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product_child->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n\n\n $product_data['from_price'] = min($prices);\n $product_data['variants'] = $variants;\n }\n\n\n $options = $product->getOptions();\n\n if (!empty($options)) {\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\n foreach ($productdata->getOptions() as $value) {\n if (is_object($value)) {\n $optionobjects = $value->getValues();\n $values = array();\n foreach ($optionobjects as $options) {\n $data = $options->getData();\n $optiondata = new stdclass();\n $optiondata->id = $data['option_type_id'];\n $optiondata->label = $data['title'];\n $optiondata->pricing = $data['price'];\n $optiondata->price_type = $data['price_type'];\n $values[] = $optiondata;\n\n if (!empty($data['option_type_id'])) {\n $product_data['options']['global_options'][$language][$value->getTitle()] = array(\n 'id' => $data['option_id'],\n 'type' => 'custom',\n //'label' => $value->getTitle(),\n 'values' => $values\n );\n }\n }\n }\n }\n }\n }\n if ($product->getName() != null) {\n $json[] = $product_data;\n }\n }\n return json_encode($json);\n }", "title": "" }, { "docid": "9713a6a1199d9d50e44e2ec0e979130f", "score": "0.6421514", "text": "public function list_product()\n\t{\n\t\t$sql = $this->pdo->prepare(\"select * from product_tbl\");\n\t\t$sql->execute();\n\t\t$row = $sql->fetchAll(PDO::FETCH_OBJ);\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "99ac862c64deedeba1fd9c5fa0a4654b", "score": "0.64145136", "text": "function getProductList() {\n try {\n global $db;\n\n $sql = \"SELECT product_id, product, image \";\n $sql .= \"FROM `products`;\";\n\n $stmt = $db->prepare($sql);\n $stmt->execute();\n\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $results;\n\n } catch (PDOException $e) { die(\"Failed to get product listings\"); };\n }", "title": "" }, { "docid": "31076a3b3bac5c205ef11b510a6f383e", "score": "0.64063555", "text": "public function getAllProducts() {\n\n // Creates a new array to contain each product\n $products = array();\n\n // The SQL statement to get each product\n $sql = 'SELECT products.idProduct, products.name, products.description, products.price FROM products';\n\n\n // Queries the statement\n $result = $this->con->query($sql);\n\n // Puts each product into the products array\n while($row = $result->fetch_object()) {\n $products[] = new Product($row->idProduct, $row->name, $row->description, $row->price);\n }\n\n // Returns the products\n return $products;\n }", "title": "" }, { "docid": "0f47aae16193a9e00d5a8627d941944a", "score": "0.64004266", "text": "public function getProductList_bind() {\n\t\t$query = $this->db->select(array('p.product_id', 'pd.name', 'pd.slug', 'p.sku',\n\t\t\t'p.price', 'pd.description', 'p.image'))\n\t\t\t->from('products as p')\n\t\t\t->join('product_desc as pd', 'pd.product_id = p.product_id', 'inner')\n\t\t\t->where('p.status', $this->_status)\n\t\t\t->limit($this->_pageNumber, $this->_offset)\n\t\t\t->get();\n\t\treturn $query->result_array();\n\t}", "title": "" } ]
74d99e6f9cefa0216e663b78c62fbb04
Get all allowed currencies
[ { "docid": "c1e8f30afd3f66bfeeefc47697957ce9", "score": "0.7572188", "text": "public function getCurrencies()\n {\n return Mage::getModel('ml_converter/converter')->getAllCurrencies();\n }", "title": "" } ]
[ { "docid": "7851487edc9f9b500965bee534df3eff", "score": "0.8411949", "text": "public function getOptionAllCurrencies();", "title": "" }, { "docid": "ffceb262114a6f5be39c99760c392348", "score": "0.82192683", "text": "public function getAvailableCurrencies()\r\n {\r\n\t/*\r\n\t On liste les locales du répertoire WEB/currencies et vanilla currencies\r\n\t*/\r\n\r\n\t// TODO\r\n }", "title": "" }, { "docid": "c93a52d2bffc392357a497cdb770eb96", "score": "0.80391276", "text": "public function getAll(): array\n {\n return $this->aSupportedCurrencies;\n }", "title": "" }, { "docid": "627523d0b9b7be8c2f333c1988276dbe", "score": "0.7929088", "text": "public function getOptionCurrencies();", "title": "" }, { "docid": "aabc2b8bb9ff2f1a55058d4b2f181092", "score": "0.7861452", "text": "public function getCurrencies() {\r\n return $this->publicRequest('getcurrencies');\r\n }", "title": "" }, { "docid": "9e1cb51e11a35d84d29f5e60ba23490c", "score": "0.7775624", "text": "public static function getAllowedCurrencies()\n {\n return Common::getArrayKeys(self::$names);\n }", "title": "" }, { "docid": "501b21b2d2605ce1f94b2607a603f42f", "score": "0.7564946", "text": "public function availableCurrencies()\n {\n return array_merge(array_keys($this->money), array_keys($this->conversions));\n }", "title": "" }, { "docid": "cf5ccc60aec5caa5cba22be2f2133515", "score": "0.7479808", "text": "public static function getCurrencies() {\n return array(\n 'GBP',\n 'USD'\n );\n }", "title": "" }, { "docid": "47455e4fd442d9d6d8adc17e566f654d", "score": "0.74685156", "text": "public function getActiveCurrencies() {\n $active_currencies = array();\n $blockonomics_currencies = $this->getSupportedCurrencies();\n foreach ($blockonomics_currencies as $code => $currency) {\n $enabled = get_option('blockonomics_'.$code);\n if($enabled || ($code === 'btc' && $enabled === false )){\n $active_currencies[$code] = $currency;\n }\n }\n return $active_currencies;\n }", "title": "" }, { "docid": "b3a541d8049044c18bb57672eeb85f23", "score": "0.7455563", "text": "public function currencyList(){\n return $this->currencies;\n }", "title": "" }, { "docid": "09083eb7820dd37409abcdb3cec654de", "score": "0.7445249", "text": "public function getSupportedCurrencies() {\n return array(\n 'btc' => array(\n 'code' => 'btc',\n 'name' => 'Bitcoin',\n 'uri' => 'bitcoin'\n ),\n 'bch' => array(\n 'code' => 'bch',\n 'name' => 'Bitcoin Cash',\n 'uri' => 'bitcoincash'\n )\n );\n }", "title": "" }, { "docid": "25c584213e590060bb1383c54bfc33eb", "score": "0.73739165", "text": "public function getCurrencies() {\r\r\n return array(\"AUD\", \"BGN\", \"CAD\", \"CHF\", \"CZK\", \"DKK\", \"EEK\", \"EUR\", \"GBP\", \"HKD\",\r\r\n\t\t\t\"HUF\", \"LTL\", \"MYR\", \"MKD\", \"NOK\", \"NZD\", \"PLN\", \"RON\", \"SEK\", \"SGD\", \"USD\", \"ZAR\"\r\r\n\t\t);\r\r\n }", "title": "" }, { "docid": "adbb72c2e7c87603406369c933936f38", "score": "0.7327296", "text": "public function getAllCurrency(){\n\n\t\t$allCurrency = \\Models\\Currency::all();\n\n\t\treturn $allCurrency;\n\t}", "title": "" }, { "docid": "6e225ad7b82a5397eac9d436d33e3840", "score": "0.73106754", "text": "public function getAllCurrencies()\n\t{\n\n\t\tif(file_exists(self::$file_storage_path))\n\t\t{\n\t\t\t$currencies = file_get_contents(self::$file_storage_path);\n\t\t\treturn array_values(json_decode($currencies, true));\n\t\t}\n\n\t\treturn array();\n\t}", "title": "" }, { "docid": "983159a65ae7f3a3b27e330a692bf21d", "score": "0.73043096", "text": "public function getCurrencies() {\n return $this->currencyRepository->getDataForSelectbox();\n }", "title": "" }, { "docid": "41c381d80a63b43e87774534168508bc", "score": "0.7287583", "text": "public function getConfigAllowCurrencies()\n {\n $allowedCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_ALLOW);\n $appBaseCurrencyCode = Mage::app()->getBaseCurrencyCode();\n if (!in_array($appBaseCurrencyCode, $allowedCurrencies)) {\n $allowedCurrencies[] = $appBaseCurrencyCode;\n }\n foreach (Mage::app()->getStores() as $store) {\n $code = $store->getBaseCurrencyCode();\n if (!in_array($code, $allowedCurrencies)) {\n $allowedCurrencies[] = $code;\n }\n }\n\n return $allowedCurrencies;\n }", "title": "" }, { "docid": "f5408de507275cc58170d44c4147bea3", "score": "0.72822726", "text": "public function getCurrencies()\r\n {\r\n return $this->currencyManager->fetchList();\r\n }", "title": "" }, { "docid": "57d4a680e1b4e00c5c9138ee2e595d36", "score": "0.724433", "text": "public function getCurrencies() {\n\t\treturn array(\n\t\t\t'AUD',\n\t\t\t'BRL',\n\t\t\t'CAD',\n\t\t\t'CZK',\n\t\t\t'DKK',\n\t\t\t'EUR',\n\t\t\t'HKD',\n\t\t\t'HUF',\n\t\t\t'ILS',\n\t\t\t'JPY',\n\t\t\t'MYR',\n\t\t\t'MXN',\n\t\t\t'NOK',\n\t\t\t'NZD',\n\t\t\t'PHP',\n\t\t\t'PLN',\n\t\t\t'GBP',\n\t\t\t'SGD',\n\t\t\t'SEK',\n\t\t\t'CHF',\n\t\t\t'TWD',\n\t\t\t'THB',\n\t\t\t'TRY',\n\t\t\t'USD',\n\t\t);\n\t}", "title": "" }, { "docid": "658d19b14687116d913864195501219d", "score": "0.72340655", "text": "public function getList()\n {\n $response = $this->call(Request::METHOD_GET, '/api/v1/currencies');\n return $response->getApiData();\n }", "title": "" }, { "docid": "ec7255a5946b1da56149fe1080877976", "score": "0.7230057", "text": "public function getAcceptedCurrencyCodes()\n {\n return [$this->getConfigData('currency')];\n }", "title": "" }, { "docid": "360545ecf120a7697cca6afb4bb8c4e6", "score": "0.721829", "text": "private static function fetchCurrencies(): array\n {\n $output = file_get_contents(static::CURRENCY_URL);\n $currencies = json_decode($output);\n $currencies = $currencies->data;\n\n return $currencies;\n }", "title": "" }, { "docid": "0d7277eb68f9d0961c1c60cbbc1a6548", "score": "0.720895", "text": "public function getAllCurrenciesForCache()\n\t{\n\t\t$this->resetLocalCacheData('allBrcCurrencies');\n\n\t\t$currencies = $this->getAllCurrencies();\n\t\treturn $currencies;\n\t}", "title": "" }, { "docid": "f533002e72ef2f72f53ce6b31f0de38c", "score": "0.717648", "text": "public function getBaseCurrencies() {\n\n $currencies=ExchangeRate::select('baseCur')->distinct()->get();\n return $currencies;\n }", "title": "" }, { "docid": "ac740fd2906b80aea2448f0b26465ee9", "score": "0.7167307", "text": "function getSupportedCurrencies()\r\n {\r\n $currencies = array(\r\n array('ARS', 32, 2),\r\n array('AUD', 36, 2),\r\n array('KHR', 116, 0),\r\n array('CAD', 124, 2),\r\n array('CNY', 156, 1),\r\n array('HRK', 191, 2),\r\n array('CZK', 203, 2),\r\n array('DKK', 208, 2),\r\n array('EKK', 233, 2),\r\n array('HKD', 344, 2),\r\n array('HUF', 348, 2),\r\n array('ISK', 352, 0),\r\n array('IDR', 360, 0),\r\n array('JPY', 392, 0),\r\n array('KRW', 410, 0),\r\n array('LVL', 428, 2),\r\n array('LTL', 440, 2),\r\n array('MYR', 458, 2),\r\n array('MXN', 484, 2),\r\n array('NZD', 554, 2),\r\n array('NOK', 578, 2),\r\n array('PHP', 608, 2),\r\n array('RUB', 643, 2),\r\n array('SGD', 702, 2),\r\n array('ZAR', 710, 2),\r\n array('SEK', 752, 2),\r\n array('CHF', 756, 2),\r\n array('THB', 764, 2),\r\n array('GBP', 826, 2),\r\n array('USD', 840, 2),\r\n array('TWD', 901, 1),\r\n array('RON', 946, 2),\r\n array('TRY', 949, 2),\r\n array('XOF', 952, 0),\r\n array('BGN', 975, 2),\r\n array('EUR', 978, 2),\r\n array('PLN', 985, 2),\r\n array('BRL', 986, 2)\r\n );\r\n\r\n $payzenCurrencies = array();\r\n\r\n foreach ($currencies as $currency) {\r\n $payzenCurrencies[] = new PayzenCurrency($currency[0], $currency[1], $currency[2]);\r\n }\r\n\r\n return $payzenCurrencies;\r\n }", "title": "" }, { "docid": "115f23236e3655010aae1d588a8ea4bd", "score": "0.7109077", "text": "public function getBaseCurrencies()\n {\n if ($this->baseCurrencies) {\n return $this->baseCurrencies;\n }\n\n $baseCurrencies = [];\n foreach ($this->_storeManager->getWebsites() as $w) {\n $bc = $w->getBaseCurrency()->getCode();\n $allowedCurrencies = [];\n $_stores = $w->getStores();\n if (is_array($_stores)) {\n $_allowedCurrencies = [];\n foreach ($_stores as $s) {\n $_allowedCurrencies = $s->getAvailableCurrencyCodes();\n if ($_allowedCurrencies) {\n $allowedCurrencies = array_merge($allowedCurrencies, $_allowedCurrencies);\n }\n }\n }\n\n $baseCurrencies[$bc] = isset($baseCurrencies[$bc]) ?\n array_merge($baseCurrencies[$bc], $allowedCurrencies) :\n $allowedCurrencies;\n $baseCurrencies[$bc] = array_unique($baseCurrencies[$bc]);\n }\n\n $this->baseCurrencies = $baseCurrencies;\n return $this->baseCurrencies;\n }", "title": "" }, { "docid": "bde1c06af1baa4ccb2ee9a6b1678b3d4", "score": "0.70994127", "text": "public static function currencies()\n\t{\n\t\tstatic::_is_expired();\n\t\treturn static::$_currencies;\n\t}", "title": "" }, { "docid": "c66be3074bfbba8a1dd84748f763ccd2", "score": "0.7093258", "text": "public function getCurrencies(): array\n {\n return $this->items;\n }", "title": "" }, { "docid": "ca261ccb56e81ca13b7b4a1b1cb494e9", "score": "0.7092081", "text": "function caAvailableCurrenciesForConversion() {\n\t\trequire_once(__CA_LIB_DIR__.\"/core/Plugins/CurrencyConversion/EuroBank.php\");\n\t\t\n\t\ttry {\n\t\t\t$va_currency_list = WLPlugCurrencyConversionEuroBank::getCurrencyList();\n\t\t\tsort($va_currency_list);\n\t\t\treturn $va_currency_list;\n\t\t} catch (Exception $e) {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "ac96a20a474c617c4a371ad59a7fcbb6", "score": "0.70660913", "text": "public static function currencies()\n {\n return [\n self::CURRENCY_US_DOLLAR,\n self::CURRENCY_CN_YUAN,\n self::CURRENCY_UAE_DIRHAM,\n self::CURRENCY_UK_POUND,\n self::CURRENCY_EURO\n ];\n }", "title": "" }, { "docid": "4f12d530e367c3e00f1f6f2e14e962a1", "score": "0.70244503", "text": "public static function getCurrencies() {\n return array_keys(Connect2PayCurrencyHelper::$currencies);\n }", "title": "" }, { "docid": "19d5df7dbf2599223479e7418a5abd31", "score": "0.70197344", "text": "public function get_accepted_currencies() {\n\t\treturn $this->currencies;\n\t}", "title": "" }, { "docid": "1115de25f191af1dfc115cb7bb7255ab", "score": "0.7017534", "text": "private function getCurrencyList(): array\n {\n $curr = [];\n foreach (config('money') as $currency => $attrs) {\n $name = $attrs['name'].' ('.$attrs['symbol'].'/'.$currency.')';\n $curr[$currency] = $name;\n }\n\n return $curr;\n }", "title": "" }, { "docid": "c431e094acd2663d93ca07477ac10ffe", "score": "0.69313025", "text": "public function currencies()\n\t{\n\t $currencies = [\n 'SAR' => 'Saudi Riyal',\n 'USD' => 'US Dollar',\n 'GBP' => 'British Pound',\n 'EUR' => 'Euro',\n 'CHF' => 'Swiss Franc',\n 'CAD' => 'Canadian Dollar',\n 'AUD' => 'Australian Dollar',\n ];\n\n\t return $currencies;\n\t}", "title": "" }, { "docid": "5950ec1fd31cae86264b7999e5cb4c93", "score": "0.68730104", "text": "public function get_list_currency() {\n\t\t\t$currencies = $this->get_currencies();\n\t\t\t$list_currency = array();\n\t\t\tif ( $currencies ) {\n\n\t\t\t\tforeach ( $currencies as $currency => $data ) {\n\t\t\t\t\t$code = '';\n\t\t\t\t\t$lang = $data['languages'];\n\t\t\t\t\tforeach ( $lang as $key => $value ) {\n\t\t\t\t\t\tif ( $value ) {\n\t\t\t\t\t\t\t$code = $key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$list_currency[ $code ] = array(\n\t\t\t\t\t\t'currency' => $currency,\n\t\t\t\t\t\t'rate' => $data['rate'],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $list_currency;\n\t\t}", "title": "" }, { "docid": "48a7f2c306d59f012c037e4d527e4cf3", "score": "0.6862626", "text": "public function currencies() {\n return array(\n '#type' => 'currency_element',\n );\n }", "title": "" }, { "docid": "6f15e93efc8456afc6cc7aa934f562dc", "score": "0.6833175", "text": "public function getCurrencies()\n {\n $currencies = $this->getData('currencies');\n if (is_null($currencies)) {\n $currencies = array();\n $codes = Mage::app()->getStore()->getAvailableCurrencyCodes(true);\n if (is_array($codes) && count($codes) > 1) {\n $rates = Mage::getModel('directory/currency')->getCurrencyRates(\n Mage::app()->getStore()->getBaseCurrency(),\n $codes\n );\n\n foreach ($codes as $code) {\n if (isset($rates[$code])) {\n $currencies[$code] = Mage::app()->getLocale()\n ->getTranslation($code, 'nametocurrency');\n }\n }\n }\n\n $this->setData('currencies', $currencies);\n }\n return $currencies;\n }", "title": "" }, { "docid": "de0dcb69da904bdf3553cdd75238f5e9", "score": "0.68308306", "text": "protected function getCurrencies ()\n {\n $folder = IOHelper::getFolder(CRAFT_PLUGINS_PATH . 'currencyprice/lib/currencies/');\n $currencies = [ ];\n\n if ( $folder ) {\n $files = $folder->getContents($recursive = false, $filter = '.json');\n\n // Loop through and read\n foreach ($files as $file) {\n $content = IOHelper::getFileContents($file);\n $currencies[] = json_decode($content, true);\n }\n }\n\n return $currencies;\n }", "title": "" }, { "docid": "dbbdc4dcfcd3bbd1872abf65767f269c", "score": "0.682822", "text": "public function getAcceptedCurrencyCodes()\n {\n if (!$this->hasData('_accepted_currency')) {\n try {\n $this->_setApiKey();\n $currencies = Stripe_Account::retrieve()->currencies_supported;\n } catch (Stripe_Error $e) {\n Mage::log(\"Couldn't fetch the supported currencies for your stripe account\");\n $currencies = $this->_acceptedCurrencies;\n }\n $this->setData('_accepted_currency', $currencies);\n }\n return $this->_getData('_accepted_currency');\n }", "title": "" }, { "docid": "cf3c3bb1ba314d8020cb8234d8c4ef95", "score": "0.68088454", "text": "public static function getCurrencies() {\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare( \"SELECT shortdesc as codevalue, shortdesc FROM crm_lookup where codegroup = 'LG' and codeid = 'Currency' order by sortorder\");\n\t $st->execute();\n\t\n\t$list = array();\n\n while ( $row = $st->fetch() ) {\n $list[] = new crm_dropdown( $row );\n }\n\n $conn = null;\n return $list;\n\t}", "title": "" }, { "docid": "a6eaf1076322674f98a9abec90556ab5", "score": "0.68065816", "text": "public function getAllEnabled(): array\n {\n if (is_null($this->aEnabledCurrencies)) {\n\n $aEnabled = appSetting(Settings\\General::KEY_ENABLED_CURRENCIES, Constants::MODULE_SLUG, []);\n\n $this->aEnabledCurrencies = [];\n foreach ($aEnabled as $sCode) {\n $this->aEnabledCurrencies[$sCode] = $this->getByIsoCode($sCode);\n }\n }\n\n return $this->aEnabledCurrencies;\n }", "title": "" }, { "docid": "6208ccdaf5029ea54ad90cc976330056", "score": "0.6789835", "text": "public function getCurrencyCodeAllowableValues()\n {\n return [\n self::CURRENCY_CODE_AED,\n self::CURRENCY_CODE_ARS,\n self::CURRENCY_CODE_AUD,\n self::CURRENCY_CODE_AZN,\n self::CURRENCY_CODE_BGN,\n self::CURRENCY_CODE_BHD,\n self::CURRENCY_CODE_BRL,\n self::CURRENCY_CODE_CAD,\n self::CURRENCY_CODE_CHF,\n self::CURRENCY_CODE_CLP,\n self::CURRENCY_CODE_CNY,\n self::CURRENCY_CODE_COP,\n self::CURRENCY_CODE_CZK,\n self::CURRENCY_CODE_DKK,\n self::CURRENCY_CODE_EGP,\n self::CURRENCY_CODE_EUR,\n self::CURRENCY_CODE_FJD,\n self::CURRENCY_CODE_GBP,\n self::CURRENCY_CODE_GEL,\n self::CURRENCY_CODE_HKD,\n self::CURRENCY_CODE_HUF,\n self::CURRENCY_CODE_IDR,\n self::CURRENCY_CODE_ILS,\n self::CURRENCY_CODE_INR,\n self::CURRENCY_CODE_JOD,\n self::CURRENCY_CODE_JPY,\n self::CURRENCY_CODE_KRW,\n self::CURRENCY_CODE_KWD,\n self::CURRENCY_CODE_KZT,\n self::CURRENCY_CODE_MDL,\n self::CURRENCY_CODE_MXN,\n self::CURRENCY_CODE_MYR,\n self::CURRENCY_CODE_NAD,\n self::CURRENCY_CODE_NOK,\n self::CURRENCY_CODE_NZD,\n self::CURRENCY_CODE_OMR,\n self::CURRENCY_CODE_PLN,\n self::CURRENCY_CODE_QAR,\n self::CURRENCY_CODE_RON,\n self::CURRENCY_CODE_RUB,\n self::CURRENCY_CODE_SAR,\n self::CURRENCY_CODE_SEK,\n self::CURRENCY_CODE_SGD,\n self::CURRENCY_CODE_THB,\n self::CURRENCY_CODE__TRY,\n self::CURRENCY_CODE_TWD,\n self::CURRENCY_CODE_UAH,\n self::CURRENCY_CODE_USD,\n self::CURRENCY_CODE_XOF,\n self::CURRENCY_CODE_ZAR,\n ];\n }", "title": "" }, { "docid": "bafdf8349cc0332a90e8b4fd9fb1d1a4", "score": "0.67590326", "text": "public function getArrayCurrencies()\n {\n return $this->arrayCurrencies;\n }", "title": "" }, { "docid": "43fb041f2472ff0a53041007e0245c78", "score": "0.67089266", "text": "public function currency()\r\n\t{\r\n\t\t// set currency config\r\n\t\t$currencies = BLL_Currency::index();\r\n\t\treturn $currencies;\r\n\t}", "title": "" }, { "docid": "2d8b6234bccb5d3440a4b530440f79db", "score": "0.66843665", "text": "protected function getCurrencyCodeMap() {\n return [];\n }", "title": "" }, { "docid": "f460bd03b955d33d78e1f9c2110135f1", "score": "0.66691995", "text": "public function currencyCodes(){\n $currencies = collect($this->currencies)->pluck('code');\n return $currencies->toArray();\n }", "title": "" }, { "docid": "a3fcfc8764572ce2e743cb3d9f934d65", "score": "0.66668606", "text": "public function getSupportedCurrencies()\n\t{\n\t\treturn array(\n\t\t\t'AUD',\n\t\t\t'BRL',\n\t\t\t'CAD',\n\t\t\t'CZK',\n\t\t\t'DKK',\n\t\t\t'EUR',\n\t\t\t'HKD',\n\t\t\t'HUF',\n\t\t\t'ILS',\n\t\t\t'JPY',\n\t\t\t'MYR',\n\t\t\t'MXN',\n\t\t\t'NOK',\n\t\t\t'NZD',\n\t\t\t'PHP',\n\t\t\t'PLN',\n\t\t\t'GBP',\n\t\t\t'RUB',\n\t\t\t'SGD',\n\t\t\t'SEK',\n\t\t\t'CHF',\n\t\t\t'TWD',\n\t\t\t'THB',\n\t\t\t'TRY',\n\t\t\t'USD',\n\t\t);\n\t}", "title": "" }, { "docid": "430239acc06a9b728d9dd8e0c68b7ab6", "score": "0.66647667", "text": "public function getSupportedCurrencies()\n\t{\n\t\treturn array(\n\t\t\t'AUD',\n\t\t\t'BRL',\n\t\t\t'CAD',\n\t\t\t'CZK',\n\t\t\t'DKK',\n\t\t\t'EUR',\n\t\t\t'HKD',\n\t\t\t'HUF',\n\t\t\t'ILS',\n\t\t\t'JPY',\n\t\t\t'MYR',\n\t\t\t'MXN',\n\t\t\t'NOK',\n\t\t\t'NZD',\n\t\t\t'PHP',\n\t\t\t'PLN',\n\t\t\t'GBP',\n\t\t\t'RUB',\n\t\t\t'SGD',\n\t\t\t'SEK',\n\t\t\t'CHF',\n\t\t\t'TWD',\n\t\t\t'THB',\n\t\t\t'TRY',\n\t\t\t'USD'\n\t\t);\n\t}", "title": "" }, { "docid": "ccf4ce73f49b2ba21b71e69083390ebf", "score": "0.66570175", "text": "public function getCurrencies($showAll = false)\n {\n // Get a list of currencies that need to be displayed\n // On profile: only ones marked is_displayed\n // In bank: ones marked is_displayed + the ones the user has\n\n $owned = UserCurrency::where('user_id', $this->id)->pluck('quantity', 'currency_id')->toArray();\n\n $currencies = Currency::where('is_user_owned', 1);\n if($showAll) $currencies->where(function($query) use($owned) {\n $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));\n });\n else $currencies = $currencies->where('is_displayed', 1);\n\n $currencies = $currencies->orderBy('sort_user', 'DESC')->get();\n\n foreach($currencies as $currency) {\n $currency->quantity = isset($owned[$currency->id]) ? $owned[$currency->id] : 0;\n }\n\n return $currencies;\n }", "title": "" }, { "docid": "6ea8a33120227dbae0e18b1c78fcd237", "score": "0.664467", "text": "function it_exchange_authorizenet_addon_get_currency_options( $default_currencies ) {\n\t$IT_Exchange_AuthorizeNet_Add_On = new IT_Exchange_AuthorizeNet_Add_On();\n\t$authnet_currencies = $IT_Exchange_AuthorizeNet_Add_On->get_supported_currency_options();\n\treturn array_intersect_key( $default_currencies, $authnet_currencies );\n}", "title": "" }, { "docid": "161882efbc41d641040743c8f88db614", "score": "0.6638184", "text": "public function getActiveCurrencies()\n {\n return array_filter($this->getCurrencies(), function ($currency) {\n return $currency['active'] == true;\n });\n }", "title": "" }, { "docid": "8eed5bb4977e7f6478ee820796b2e736", "score": "0.662987", "text": "public function getCurrencies($base = null)\n {\n if ($base === null) {\n return $this->getAllowedCurrencies();\n }\n $baseCurrencies = $this->getBaseCurrencies();\n $currencies = $baseCurrencies[$base];\n $_currencies = array_flip($currencies);\n\n if (isset($_currencies[$base])) {\n $k = $_currencies[$base];\n unset($currencies[$k]);\n array_unshift($currencies, $base);\n }\n\n return $currencies;\n }", "title": "" }, { "docid": "94c40c9ba2b7940273dbb6167018f788", "score": "0.6629343", "text": "public function getActiveCurrencies()\n {\n return array_filter($this->getCurrencies(), function($currency) {\n return $currency['active'] == true;\n });\n }", "title": "" }, { "docid": "58ae065eb4d172571498500179026919", "score": "0.66194975", "text": "function getAllCurrencies($available='available') {\n\tglobal $adb, $log;\n\t$log->debug(\"Entering into function getAllCurrencies($available)\");\n\n\t$sql = \"select * from vtiger_currency_info\";\n\tif ($available != 'all') {\n\t\t$sql .= \" where currency_status='Active' and deleted=0\";\n\t}\n\t$res=$adb->pquery($sql, array());\n\t$noofrows = $adb->num_rows($res);\n\n\tfor($i=0;$i<$noofrows;$i++)\n\t{\n\t\t$currency_details[$i]['currencylabel'] = $adb->query_result($res,$i,'currency_name');\n\t\t$currency_details[$i]['currencycode'] = $adb->query_result($res,$i,'currency_code');\n\t\t$currency_details[$i]['currencysymbol'] = $adb->query_result($res,$i,'currency_symbol');\n\t\t$currency_details[$i]['curid'] = $adb->query_result($res,$i,'id');\n\t\t/* alias key added to be consistent with result of InventoryUtils::getInventoryCurrencyInfo */\n\t\t$currency_details[$i]['currency_id'] = $adb->query_result($res,$i,'id');\n\t\t$currency_details[$i]['conversionrate'] = $adb->query_result($res,$i,'conversion_rate');\n\t\t$currency_details[$i]['curname'] = 'curname' . $adb->query_result($res,$i,'id');\n\t}\n\n\t$log->debug(\"Entering into function getAllCurrencies($available)\");\n\treturn $currency_details;\n\n}", "title": "" }, { "docid": "00ebb312e12d2a7c8996c6937a8cfab9", "score": "0.6614048", "text": "public function getAvailableCurrency()\n {\n return array('AUD' => __('Australian Dollar (AUD)','paychoice'));\n }", "title": "" }, { "docid": "56c1ae8a1ce366deac34530cb1849e13", "score": "0.66126484", "text": "public static function get_currencies() {\n\t\t$currency_type = isset($_POST['currency_type']) ? $_POST['currency_type'] : NULL;\n\t\tif($currency_type) {\n\t\t\t$client = new Client();\n\t\t\t$crawler = $client->request('GET', 'http://bonbast.com/');\n\n\t\t\t$temp_currencies = [];\n\n\t\t\t$crawler->filter('.table tr > td')->each(function ($node) use (&$temp_currencies) {\n\t\t\t\t$text = $node->text();\n\t\t\t\tif($text != \"Code\" && $text != \"Currency\" && $text != \"Sell\" && $text != \"Buy\") {\n\t\t\t\t\t$temp_currencies[] = $text;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$interval \t= count($temp_currencies) / 4;\n\t\t\t$counter = 0;\n\t\t\t$interval_counter \t= 0;\n\t\t\t$currencies = [];\n\n\t\t\tif(!empty($temp_currencies)) {\n\t\t\t\twhile($interval_counter <= $interval) {\n\t\t\t\t\t$temp_array = array_slice($temp_currencies, $counter, 4);\n\t\t\t\t\t$currencies[$temp_array[0]] = [\"sell\" => $temp_array[2], \"buy\" => $temp_array[3]];\n\t\t\t\t\t$counter += 4;\n\t\t\t\t\t$interval_counter += 1;\n\t\t\t\t}\n\t\t\t\t// Found Currencies\n\t\t\t\twp_send_json_success([\"message\" => $currencies[$currency_type]]);\n\t\t\t} else {\n\t\t\t\t// Couldn't Find Currencies\n\t\t\t\twp_send_json_error([\"message\" => \"Could not find any currency\"]);\n\t\t\t}\n\t\t} else {\n\t\t\twp_send_json_error([\"message\" => \"No type found\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "ac144f6afc8a6d0243b764fb74aa8b1b", "score": "0.66113853", "text": "public function getList(){\n $sql = \"SELECT * FROM `currency`\";\n return $this->db->query($sql);\n }", "title": "" }, { "docid": "69ed816e02a7efeae5d50485e7899678", "score": "0.6585566", "text": "public static function all()\n\t{\n\t\tif (static::$_all !== null)\n\t\t\treturn static::$_all;\n\n\t\t// Try to get all from cache\n\t\t$cache = \\Yii::$app->getCache();\n\t\t$all = $cache->get(static::CACHE_KEY);\n\t\tif ($all === false || empty($all))\n\t\t{\n\t\t\t$all = null;\n\t\t\t$combinations = [];\n\t\t\t$currencies = [\n\t\t\t\t'ARS', 'BOB', 'BRL', 'CLP', 'COP', 'CRC', 'GTQ', 'HNL',\n\t\t\t\t'MXN', 'PAB', 'PEN', 'PYG', 'USD', 'UYU'\n\t\t\t];\n\t\t\t$currencies2 = ['USD'];\n\t\t\tforeach ($currencies as $cur)\n\t\t\t{\n\t\t\t\tforeach ($currencies2 as $cur2)\n\t\t\t\t{\n\t\t\t\t\tif ($cur != $cur2)\n\t\t\t\t\t\t$combinations[] = $cur . $cur2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$url = \"https://query.yahooapis.com/v1/public/yql?q=\";\n\t\t\t$query = 'select * from yahoo.finance.xchange where pair in (\"' . implode('\",\"', $combinations) . '\")';\n\t\t\t$url .= urlencode($query);\n\t\t\t$url .= \"&format=json\";\n\t\t\t$url .= \"&env=\" . urlencode(\"store://datatables.org/alltableswithkeys\");\n\n\t\t\t$res = @file_get_contents($url);\n\t\t\tif (!empty($res)) {\n\t\t\t\ttry {\n\t\t\t\t\t$resDecoded = json_decode($res, true);\n\t\t\t\t\tif (isset($resDecoded['query']['results']['rate']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_array($resDecoded['query']['results']['rate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$all = [];\n\t\t\t\t\t\t\tforeach ($resDecoded['query']['results']['rate'] as $rateInfo)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all[$rateInfo['id']] = floatval($rateInfo['Rate']);\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\tcatch (\\Exception $ex) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save to cache if could be obtained\n\t\t\tif (!empty($all))\n\t\t\t{\n\t\t\t\t// Add same to same conversions\n\t\t\t\tforeach ($currencies as $cur)\n\t\t\t\t\t$all[strtoupper($cur) . strtoupper($cur)] = 1;\n\t\t\t\t// Cache\n\t\t\t\t$cache->set(static::CACHE_KEY, $all, 3600 * 2); // Cache for 2 hours\n\t\t\t\tstatic::$_all = $all;\n\t\t\t}\n\t\t}\n\t\treturn $all;\n\t}", "title": "" }, { "docid": "df37b5f159e8bce9d0de25c94ad64bfe", "score": "0.6582513", "text": "public function provideValidCurrencyCodes()\n {\n return [\n 'French euro' => [\n 'EUR',\n ['fr-FR' => 'euro', 'en-US' => 'euro'],\n ['fr-FR' => '€', 'en-US' => '€'],\n ],\n 'Peace money' => [\n 'PCE',\n ['fr-FR' => 'paix', 'en-US' => 'peace'],\n ['fr-FR' => '☮', 'en-US' => '☮'],\n ],\n ];\n }", "title": "" }, { "docid": "6bd32b5167e6cfccd537289dc1774493", "score": "0.65728307", "text": "public function getCurrencies(): array\n {\n try {\n $responseJson = $this->_RESTcli->get(\"currencies\", null);\n } catch (BitPayException $e) {\n throw new CurrencyQueryException(\"failed to serialize Currency object : \".$e->getMessage(), null, null, $e->getApiCode());\n } catch (Exception $e) {\n throw new CurrencyQueryException(\"failed to serialize Currency object : \".$e->getMessage());\n }\n\n try {\n $mapper = new JsonMapper();\n $currencies = $mapper->mapArray(\n json_decode($responseJson),\n [],\n 'BitPaySDKLight\\Model\\Currency'\n );\n\n } catch (Exception $e) {\n throw new CurrencyQueryException(\n \"failed to deserialize BitPay server response (Currency) : \".$e->getMessage());\n }\n\n return $currencies;\n }", "title": "" }, { "docid": "22bc55bae72b57ecf223d8a3d9caa7d9", "score": "0.65410566", "text": "public static function getAllCachedCurrencies()\n {\n if (empty(self::$allCachedCurrencies))\n {\n return null;\n }\n return self::$allCachedCurrencies;\n }", "title": "" }, { "docid": "1d22d14712e7638ea72ba54e75d470d0", "score": "0.65362346", "text": "public function getAcceptedCurrencyCodes()\n {\n if (!$this->hasData('_accepted_currency')) {\n $acceptedCurrencyCodes = $this->dataHelper->getAllowedCurrencyCodes();\n $acceptedCurrencyCodes[] = $this->getConfigData('currency');\n $this->setData('_accepted_currency', $acceptedCurrencyCodes);\n }\n return $this->_getData('_accepted_currency');\n }", "title": "" }, { "docid": "f0a67a0d6a95ed750dd0888204321f99", "score": "0.6506289", "text": "public function getSupportedCurrenciesCodes(): array\n {\n $codes = [];\n\n /** @var ExchangeRate $eurExchangeRate */\n foreach ($this->items as $eurExchangeRate) {\n $codes[] = $eurExchangeRate->getToCurrency();\n }\n\n return $codes;\n }", "title": "" }, { "docid": "bdc26b894ef42e5d1111997f6501f62e", "score": "0.6499436", "text": "public function currencies(): CurrencyCollection\n {\n $currencies = $this->getCurrenciesByDate();\n\n return $currencies->isNotEmpty() ? $currencies : $this->saveAndGetCurrencies();\n }", "title": "" }, { "docid": "ec11494fe7a12d4f1f5660d455069ed4", "score": "0.6443551", "text": "public function getConfigBaseCurrencies()\n {\n $defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);\n return $defaultCurrencies;\n }", "title": "" }, { "docid": "44f4f618e620908bb94adff96a32d788", "score": "0.6427649", "text": "protected\n\tfunction getTemplateCurrencies()\n\t{\n\t\t$currencies = array();\n\n\t\tif($this->useCurrency) {\n\t\t\tif(isset($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'])) {\n\t\t\t\t$currencyFormat = \\CCurrencyLang::GetFormatDescription($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID']);\n\t\t\t\t$currencies = array(\n\t\t\t\t\t array(\n\t\t\t\t\t\t\t'CURRENCY' => $this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'],\n\t\t\t\t\t\t\t'FORMAT' => array(\n\t\t\t\t\t\t\t\t 'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],\n\t\t\t\t\t\t\t\t 'DEC_POINT' => $currencyFormat['DEC_POINT'],\n\t\t\t\t\t\t\t\t 'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],\n\t\t\t\t\t\t\t\t 'DECIMALS' => $currencyFormat['DECIMALS'],\n\t\t\t\t\t\t\t\t 'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],\n\t\t\t\t\t\t\t\t 'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],\n\t\t\t\t\t\t\t),\n\t\t\t\t\t ),\n\t\t\t\t);\n\t\t\t\tunset($currencyFormat);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$currencyIterator = Currency\\CurrencyTable::getList(array(\n\t\t\t\t\t 'select' => array('CURRENCY'),\n\t\t\t\t));\n\t\t\t\twhile($currency = $currencyIterator->fetch()) {\n\t\t\t\t\t$currencyFormat = \\CCurrencyLang::GetFormatDescription($currency['CURRENCY']);\n\t\t\t\t\t$currencies[] = array(\n\t\t\t\t\t\t 'CURRENCY' => $currency['CURRENCY'],\n\t\t\t\t\t\t 'FORMAT' => array(\n\t\t\t\t\t\t\t\t'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],\n\t\t\t\t\t\t\t\t'DEC_POINT' => $currencyFormat['DEC_POINT'],\n\t\t\t\t\t\t\t\t'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],\n\t\t\t\t\t\t\t\t'DECIMALS' => $currencyFormat['DECIMALS'],\n\t\t\t\t\t\t\t\t'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],\n\t\t\t\t\t\t\t\t'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],\n\t\t\t\t\t\t ),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tunset($currencyFormat, $currency, $currencyIterator);\n\t\t\t}\n\t\t}\n\n\t\treturn $currencies;\n\t}", "title": "" }, { "docid": "8118e13f85664112b0b13ebcda245085", "score": "0.6370458", "text": "public function stockCurrenciesList()\n {\n $url = '/admin/stock_currencies.json';\n\n return new Response\\Response(\n $this->client->get($url),\n sprintf('array<%s>', Model\\StockCurrency::class)\n );\n }", "title": "" }, { "docid": "fe1c0a2aee0a50c5b0c078a993b8c852", "score": "0.636961", "text": "function get_supported_currency_options() {\n\t\t$options = array(\n\t\t\t'USD' => __( 'United States Dollar' ),\n\t\t\t'CAD' => __( 'Canadian Dollar' ),\n\t\t\t'GBP' => __( 'British Pound' ),\n\t\t\t'EUR' => __( 'European Euro' ),\n\t\t);\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "1f3064bf80173f066ec36864d81639a4", "score": "0.63643676", "text": "protected function loadCurrencies()\n {\n $currencies = $this->apiCall('WHMCS_Misc', 'get_currencies');\n if (empty($currencies->currencies->currency))\n {\n throw new Exception('No currencies found in WHMCS');\n }\n\n $currenciesWrapper = new $this->config['currencies_class']($currencies->currencies->currency);\n\n // Save currencies array into Redis cache\n $this->redis->set('currencies', serialize($currenciesWrapper));\n // Set currencies expiration based on config value\n $this->redis->expire('currencies', $this->config['currencies_cache_expiration']);\n // Save currencies array in the current connection instance for further usage in current app run\n $this->currencies = $currenciesWrapper;\n\n return $this->currencies;\n }", "title": "" }, { "docid": "fcddbe68d5a909f2870a878771e8f419", "score": "0.6348973", "text": "public static function get_currency_codes()\n\t{\n\t\treturn internal_getAllCurrencyCodes();\n\t}", "title": "" }, { "docid": "ff407c2127045ab7ce9c2faccd333a52", "score": "0.63208085", "text": "public function getCurrenciesWithoutDecimal()\n {\n return array('JPY');\n }", "title": "" }, { "docid": "e7784d9f713c050180fd134a95796b6a", "score": "0.631086", "text": "public function index()\n {\n return response(Currency::all());\n }", "title": "" }, { "docid": "f3088d83cfd61281d2c93cf3c4962103", "score": "0.6286329", "text": "public static function getPayPalCurrencies() {\n return self::$currencyCodes;\n }", "title": "" }, { "docid": "fcb9f8a5e7b5d56b040d0b3fe75bba0c", "score": "0.6278225", "text": "public function listCurrencies(Request $request)\n {\n $currencies = $this->currencies;\n if ($request->wantsJson()) {\n return Helper::json($currencies);\n }\n\n $list = \"# Currency code - Currency name\" . PHP_EOL;\n foreach($currencies as $code => $name) {\n $list .= $code . \" - \" . $name . PHP_EOL;\n }\n return Helper::text($list);\n }", "title": "" }, { "docid": "a2da9cdc5bcf2a44639678cad3a50df3", "score": "0.6275059", "text": "public function getCurrencies($market = '')\n {\n return $this->makeRequest(\"core/3/currencies\", [\n \"market\" => $market\n ]);\n }", "title": "" }, { "docid": "06fc80c86247c696ee2302acf484cd2e", "score": "0.62570703", "text": "public function index()\n {\n try {\n $currencies = CurrencyResource::collection($this->service()->query()->paginate(20));\n }catch (QueryException $e) {\n return $this->respondInvalidQuery();\n }\n\n return $currencies;\n }", "title": "" }, { "docid": "61c299a73cb943070eba275558dad48c", "score": "0.62163955", "text": "function rcp_get_currencies() {\n\t$currencies = array(\n\t\t'USD' => __( 'US Dollars (&#36;)', 'rcp' ),\n\t\t'EUR' => __( 'Euros (&euro;)', 'rcp' ),\n\t\t'GBP' => __( 'Pounds Sterling (&pound;)', 'rcp' ),\n\t\t'AUD' => __( 'Australian Dollars (&#36;)', 'rcp' ),\n\t\t'BRL' => __( 'Brazilian Real (&#36;)', 'rcp' ),\n\t\t'CAD' => __( 'Canadian Dollars (&#36;)', 'rcp' ),\n\t\t'CZK' => __( 'Czech Koruna', 'rcp' ),\n\t\t'DKK' => __( 'Danish Krone', 'rcp' ),\n\t\t'HKD' => __( 'Hong Kong Dollar (&#36;)', 'rcp' ),\n\t\t'HUF' => __( 'Hungarian Forint', 'rcp' ),\n\t\t'ILS' => __( 'Israeli Shekel', 'rcp' ),\n\t\t'JPY' => __( 'Japanese Yen (&yen;)', 'rcp' ),\n\t\t'MYR' => __( 'Malaysian Ringgits', 'rcp' ),\n\t\t'MXN' => __( 'Mexican Peso (&#36;)', 'rcp' ),\n\t\t'NZD' => __( 'New Zealand Dollar (&#36;)', 'rcp' ),\n\t\t'NOK' => __( 'Norwegian Krone', 'rcp' ),\n\t\t'PHP' => __( 'Philippine Pesos', 'rcp' ),\n\t\t'PLN' => __( 'Polish Zloty', 'rcp' ),\n\t\t'SGD' => __( 'Singapore Dollar (&#36;)', 'rcp' ),\n\t\t'SEK' => __( 'Swedish Krona', 'rcp' ),\n\t\t'CHF' => __( 'Swiss Franc', 'rcp' ),\n\t\t'TWD' => __( 'Taiwan New Dollars', 'rcp' ),\n\t\t'THB' => __( 'Thai Baht', 'rcp' ),\n\t\t'TRY' => __( 'Turkish Lira', 'rcp' ),\n\t\t'RIAL'=> __( 'Iranian Rial (&#65020;)', 'rcp' ),\n\t\t'RUB' => __( 'Russian Rubles', 'rcp' )\n\t);\n\treturn apply_filters( 'rcp_currencies', $currencies );\n}", "title": "" }, { "docid": "9b31789d894ba19dce964f04732bd06e", "score": "0.616579", "text": "function getCurrencies ($pIncludeBlank=false) {\n\t\t\n\t\ttry {\n\t\t\t$db = new sentencia();\n\t\t\t\n\t\t\t$qy=\"select * from currencies order by name\";\n\t\t\t$result = $db->Query($qy);\n\t\t\t\n\t\t\t//*********NO ESTA BIEN MODELADO USAR ROWCOUNT*********\n\t\t\t//$rowcount=mysqli_num_rows($resultUsers);\n\t\t\t//return $rowcount;\n\t\t\t\n\t\t\t$list = array();\n\t\t\tif ($pIncludeBlank) $list[''] = '';\n\t\t\tforeach($result as $row){\n\t\t\t\t$list[$row['name']] = $row['id_currency'];\n\t\t\t}\n\t\t\treturn $list;\n\t\n\t\t} catch (Exception $e) {\n\t\t\treturn \"ERROR: \".$e->getMessage();\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "0535896147e7d7bbea0eda3608418e27", "score": "0.6153119", "text": "public function getAllowedMerchantCountries()\n {\n return ['US', 'CA', 'AU', 'NZ'];\n }", "title": "" }, { "docid": "fa7cb62eeebde0f255df3e8d01312e70", "score": "0.6152142", "text": "public function index()\n {\n $currencyRepository = new CurrencyRepository();\n\n return new CurrencyCollection($currencyRepository->all(false));\n }", "title": "" }, { "docid": "44dfa4028485d5aab6ebb39f56ea11f7", "score": "0.6149409", "text": "public function getCurrenciesRatios()\n {\n $currenciesRatios = [];\n $deprecatedDataProviders = [];\n foreach($this->_dataStorages as $priority => $dataStorage){\n if($dataStorage->hasActualRatios()){\n $currenciesRatios = $dataStorage->getRatios();\n } else {\n $deprecatedDataProviders[] = $dataStorage;\n }\n }\n\n if(count($deprecatedDataProviders) > 0 && !empty($currenciesRatios)){\n foreach($this->_dataStorages as $dataStorage){\n $dataStorage->storeRatios($currenciesRatios);\n }\n }\n\n if($currenciesRatios){\n throw new Exception(); // Throws exception, that signalize? that we could not load any currencies data\n }\n\n return $currenciesRatios;\n }", "title": "" }, { "docid": "20fb87e1e0a22ed60a34d48e0d603891", "score": "0.6149274", "text": "public function getAllFlat(): array\n {\n return $this->aSupportedCurrenciesFlat;\n }", "title": "" }, { "docid": "fcd98d47e40d512ac5e84c7c5e230ca5", "score": "0.6133739", "text": "public function retrieveCurrencies()\n {\n throw new \\RuntimeException('You must override this method in a converter');\n }", "title": "" }, { "docid": "ebbad146e194a5d49b38edf27f852fc7", "score": "0.61281174", "text": "public function service_list()\r\n {\r\n $service_list = array(\r\n \"get_currency_list\" => TRUE\r\n );\r\n return $service_list;\r\n }", "title": "" }, { "docid": "ad47f577a159df5fe77649510ba7be53", "score": "0.6089195", "text": "public static function getPayPalExpressCheckoutCurrencies() {\n\n $currencies = array();\n foreach(self::$ecCurrencies as $code => $currency) {\n $currencies[$code] = $currency;\n }\n return $currencies;\n }", "title": "" }, { "docid": "f7f8d179c00855a8f135beda0d82bd2f", "score": "0.60784596", "text": "public function getSupported(): array\n {\n return (array) json_decode(\n (string) file_get_contents(NAILS_PATH . 'module-currency/resources/currencies.json')\n );\n }", "title": "" }, { "docid": "0da0501cf8596f74d2f73e884d04045c", "score": "0.60561955", "text": "public function getAllowedCountries()\n {\n return explode(\",\", Mage::getStoreConfig(\"hermes/general/allowed_countries\"));\n }", "title": "" }, { "docid": "8bb666296658ae096e5c4d11d9b24813", "score": "0.6052799", "text": "public function get_currency_list()\r\n { \r\n // file dump -- for testing purpose -- Start --\r\n /*\r\n $current = \"\\n------------------------------\\n\";\r\n $current .= \"CB_Property -- upload_listing -- ori input\\n\";\r\n $current .= gettype($input_data);\r\n $current .= \"\\n\";\r\n $current .= json_encode($input_data);\r\n $current .= \"\\n\";\r\n $current .= \"\\nCB_Property -- upload_listing -- after init\\n\";\r\n $current .= json_encode($property_info);\r\n error_log($current, 3, \"D:/webdev/resphere_test_dump.txt\"); \r\n // file dump -- for testing purpose -- End --*/\r\n \r\n if($this->is_error){return 0;}\r\n \r\n // Build model array data\r\n $library_data = array(\r\n 'library' => $this->properties_library_name,\r\n 'function' => \"get_supported_currency\",\r\n 'data' =>''\r\n );\r\n\r\n // Pump in data (contain error check)\r\n $currency_return = $this->invoke_library_function($library_data);\r\n \r\n if($this->is_error){return 0;}\r\n\r\n $status_information = \"Info: Successfully get supported currency\";\r\n $return_data = $currency_return[\"data\"];\r\n $this->set_data($status_information,$return_data);\r\n\r\n }", "title": "" }, { "docid": "6c09753c790c4318bf3aea91d7e955da", "score": "0.60243773", "text": "public function actionCurrencies() {\n $searchModel = new FpListsSearch();\n $condition = \"in_list_of = 'currencies'\";\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $condition); \n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "8a19ebcc84d5367045277ed02400d052", "score": "0.6014311", "text": "function index() {\n $this->smarty->assign('currencies', Currencies::findAll());\n }", "title": "" }, { "docid": "547a8bc78bcf9c0d4e23c1f455106b0c", "score": "0.60140914", "text": "public function getUnSupportedCurrencies($bankName = null)\n\t{\n\t\tif (!$bankName) {\n\t\t\t$bankName = 'Settings_CurrencyUpdate_models_' . $this->getActiveBankName() . '_BankModel';\n\t\t}\n\t\t$bank = new $bankName();\n\n\t\t$supported = $bank->getSupportedCurrencies($bankName);\n\t\t$db = PearDatabase::getInstance();\n\n\t\t$query = 'SELECT `currency_name`, `currency_code` FROM vtiger_currency_info WHERE `currency_status` = \"Active\" && `deleted` = 0;';\n\t\t$result = $db->query($query);\n\n\t\t$unsupported = [];\n\t\twhile ($row = $db->fetchByAssoc($result)) {\n\t\t\t$name = $row['currency_name'];\n\t\t\t$code = $row['currency_code'];\n\n\t\t\t$unsupported[$name] = $code;\n\t\t}\n\n\t\treturn array_diff($unsupported, $supported);\n\t}", "title": "" }, { "docid": "2cd6ef0237d1033225421ae8348f572b", "score": "0.6004181", "text": "function quickpay_currency_codes() {\n static $currencies = array('DKK' => 100, 'USD' => 100, 'EUR' => 100,\n 'GBP' => 100);\n return $currencies;\n}", "title": "" }, { "docid": "4feef08b668f02d8a48f92d2c95ce2f8", "score": "0.59614563", "text": "public function getCurrencyCollection()\r\n\t\t{\r\n\t\t\treturn $this->getCollectionFor(\"FEParamGetTiposMonedas\");\r\n\t\t}", "title": "" }, { "docid": "dbd41478b104f2a43de080df30c71a56", "score": "0.5956906", "text": "public function getSupportedCurrencies($bankName = null)\n\t{\n\t\tif (!$bankName) {\n\t\t\t$bankName = 'Settings_CurrencyUpdate_models_' . $this->getActiveBankName() . '_BankModel';\n\t\t}\n\t\t$bank = new $bankName();\n\n\t\treturn $bank->getSupportedCurrencies();\n\t}", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.5951586", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.5951586", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.5951586", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.5951586", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.5951586", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.5951586", "text": "public function getCurrency();", "title": "" }, { "docid": "5dc46e254b7551428c7d81ee2d9d2fe6", "score": "0.59502494", "text": "private function collectData()\n {\n return $this->cache->remember('Moloni_Currencies', function() {\n $availableCurrencies = $this->currenciesApi->getAll();\n\n $currencies = [];\n\n foreach($availableCurrencies as $currency) {\n $currencies[$currency['iso4217']] = $currency['currency_id'];\n }\n\n return $currencies;\n });\n }", "title": "" } ]
f674bcc35f34ad229092e3a814cc226d
Constructs a coupon read service object.
[ { "docid": "ca1045de764aa63c97b0bfbacc963543", "score": "0.0", "text": "public function __construct(\n CartRepositoryInterface $quoteRepository,\n Totals $totals,\n QuoteIdMaskFactory $quoteIdMaskFactory\n ) {\n $this->quoteRepository = $quoteRepository;\n $this->quoteIdMaskFactory = $quoteIdMaskFactory;\n $this->totals = $totals;\n }", "title": "" } ]
[ { "docid": "0ef0ee16493bea6f9213648407a82214", "score": "0.586491", "text": "public function getById($id)\n {\n $coupon = null;\n\n $response = $this->request('coupons/' . $id);\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }", "title": "" }, { "docid": "976fb016a2e23ae79c03956613dad2a3", "score": "0.58585066", "text": "public function create($data)\n {\n $coupon = null;\n\n $response = $this->request('coupons', $data, 'POST');\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }", "title": "" }, { "docid": "59e9181754aeafc74d9a1702defa80c3", "score": "0.5513174", "text": "public function getByCode($code)\n {\n $coupon = null;\n\n $response = $this->request('coupons/find?code=' . $code);\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }", "title": "" }, { "docid": "f1bc9312d713c9eac660e3774965b79d", "score": "0.54116404", "text": "private function get_coupon()\n {\n //\n $this->coupon = null;\n if( isset( $_POST[ 'coupon' ] ) && $_POST[ 'coupon' ] != \"\" )\n {\n // Try to retrieve the coupon.\n //\n $this->coupon = Stripe_Coupon::retrieve( $_POST[ 'coupon' ] );\n $this->response[ 'coupon-id' ] = $this->coupon->id;\n $this->response[ 'coupon-max-redemptions' ] = $this->coupon->max_redemptions;\n $this->response[ 'coupon-times-redeemed' ] = $this->coupon->times_redeemed;\n $this->response[ 'coupon-redeem-by' ] = gmdate( \"M d Y H:i:s\", $this->coupon->redeem_by ) . ' UTC';\n $this->response[ 'coupon-percent' ] = $this->coupon->percent_off;\n\n // Check the validity of the coupon\n //\n if( $this->coupon->times_redeemed >= $this->coupon->max_redemptions )\n {\n $this->response[ 'error' ] = 'Coupon can only be redeemed ' . intval( $this->coupon->max_redemptions ) . ' time(s)';\n echo json_encode( $this->response );\n die();\n }\n $now = gmmktime();\n if( $now > $this->coupon->redeem_by )\n {\n $this->response[ 'error' ] = 'Coupon expired on ' . gmdate( \"M d Y H:i:s\", $this->coupon->redeem_by ) . ' UTC';\n echo json_encode( $this->response );\n die();\n }\n\n // If we made it here, the coupon is valid\n //\n }\n }", "title": "" }, { "docid": "4980aeaf781122d44fa308c2bbaa76a3", "score": "0.5239026", "text": "public function __construct(){\n\n //instância um cliente do webservice\n $this->dollar = Http::get('https://api.ratesapi.io/api/latest?base=USD&symbols=BRL');\n $this->euro = Http::get('https://api.ratesapi.io/api/latest?base=EUR&symbols=BRL');\n }", "title": "" }, { "docid": "a71c754638327870a1989cb6b4d626b6", "score": "0.5211153", "text": "public function show(Coupon $coupon)\n {\n return new CouponResource($coupon);\n }", "title": "" }, { "docid": "ea60e5c50d153a6c5b672cdda6d8cfa7", "score": "0.5173944", "text": "public function __construct(Discount $discount)\n {\n $this->discount = $discount;\n }", "title": "" }, { "docid": "7b6dcef7238c409b808c32cfccd37aaa", "score": "0.51374763", "text": "public function __construct(RechargeService $rechargeService)\n {\n $this->rechargeService = $rechargeService;\n }", "title": "" }, { "docid": "548d8f0d84e146e0d544f7b5a311cff0", "score": "0.5102947", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->orderService = new OrderService();\n $this->batchService = new BatchService();\n }", "title": "" }, { "docid": "ff0c064ebfc04eefb77c55fa1544d932", "score": "0.5098244", "text": "public function __construct()\n {\n $this->opencartService = new OpenCartService();\n parent::__construct();\n }", "title": "" }, { "docid": "73ebb5bbb29fbf727417be2bdf636e77", "score": "0.5097641", "text": "public function getReadConnectionService();", "title": "" }, { "docid": "db6e35ac309eb750de9a642885ec95d5", "score": "0.50887203", "text": "public function coupon() {\n return $this->hasOne('App\\Coupon', 'coupon_id', 'coupon_id');\n }", "title": "" }, { "docid": "af4c2a4c4ac11f1fb611d47d30691be9", "score": "0.5054945", "text": "Public Function __construct() {\n\t\t$this->importSourceReaderService =& t3lib_div::makeInstance(self::CLASS_IMPORTSOURCE_READERSERVICE);\n\t}", "title": "" }, { "docid": "ff4dd38653fcbe0335bf1698a99fa1f8", "score": "0.50477874", "text": "public function __construct()\r\n {\r\n parent::__construct();\r\n\r\n $this->service = clsProducts::getInstance();\r\n }", "title": "" }, { "docid": "733222163343e9c880fa7d71a9a79cb4", "score": "0.5045981", "text": "protected function _construct()\n {\n $this->_init(OrderReference::class, OrderReferenceResource::class);\n }", "title": "" }, { "docid": "cc0c1cba9f427b30bc014e53241bfaa8", "score": "0.5042396", "text": "public function __construct() {\n $this->produto = new Conceito();\n }", "title": "" }, { "docid": "3cab51383a8606af5e7d91644e7344dc", "score": "0.50051296", "text": "public function __construct()\n {\n $this->_client = Client::create([\n 'consumerKey' => $this->getConfigData('cardinity_key'),\n 'consumerSecret' => $this->getConfigData('cardinity_secret'),\n ]);\n }", "title": "" }, { "docid": "eefdfc376dcf930bef42803f106ba769", "score": "0.49847892", "text": "public function __construct(ZohoService $warranty)\n { \n $this->warranty = $warranty;\n }", "title": "" }, { "docid": "a96652c2b103a4d36d448e5a7fc3a6c4", "score": "0.49697733", "text": "public function setCoupon(?string $coupon): self\n {\n $this->coupon = $coupon;\n\n return $this;\n }", "title": "" }, { "docid": "47d7912e464333786816bd723b9b2e39", "score": "0.49676326", "text": "public function validate($code)\n {\n $coupon = null;\n\n $response = $this->request('coupons/validate?code=' . $code);\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }", "title": "" }, { "docid": "7dfec1a7606838cc57fcbded6b5bae19", "score": "0.49628016", "text": "public function __construct()\n {\n $this->currencies = new ISOCurrencies();\n }", "title": "" }, { "docid": "a7125553de1bd818363e499a1f808e38", "score": "0.49376395", "text": "public function __construct()\n\t{\n\t\t$this->client = $this->getSOLRClient();\n\t}", "title": "" }, { "docid": "43f35e22c417a9bd0b345cecee669c9c", "score": "0.49278036", "text": "public function __construct() {\n $this->bucket_slug = config('cosmic.slug');\n $this->read_key = config('cosmic.read');\n $this->write_key = config('cosmic.write');\n $this->locations_cosmic = new CosmicJS($this->bucket_slug, 'locations');\n $this->items_cosmic = new CosmicJS($this->bucket_slug, 'items', $this->read_key, $this->write_key);\n }", "title": "" }, { "docid": "686c2d2b40b27289f3d4bb7ec8d3394b", "score": "0.4917388", "text": "public function __construct()\n {\n $this->cotacao = new Client();\n }", "title": "" }, { "docid": "a53313d6b3a773ce9a72ae59d9e1d71d", "score": "0.49056873", "text": "public function __construct(ComicService $comicService)\n {\n //$this->middleware('auth');\n if(isset($comicService)){\n $this->comicService = $comicService;\n }\n }", "title": "" }, { "docid": "a63c8424780e880dab703dc46cbe0a03", "score": "0.49019986", "text": "public function __construct(CorreiosService $correiosService)\n {\n $this->correiosService = $correiosService;\n }", "title": "" }, { "docid": "bfa29e4938672af9d10179dd2468277c", "score": "0.489317", "text": "protected function _construct()\n {\n $this->_init('Dotpay\\Payment\\Model\\Resource\\CreditCard');\n }", "title": "" }, { "docid": "36d6bb2138eaf05ec2a3323e0b4f1cec", "score": "0.48886257", "text": "public function __construct(private readonly AdvancedMetadataFactoryInterface $reader)\n {\n }", "title": "" }, { "docid": "b922817e70438402c1f9e4cfccaca11a", "score": "0.488386", "text": "public function __construct($userId = null, OrderInterface $order, CouponInterface $coupon)\n {\n $this->userId = $userId;\n $this->order = $order;\n $this->coupon = $coupon;\n }", "title": "" }, { "docid": "b2b6fdc01b18bf65ba22879cf91c4675", "score": "0.48764122", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->client = RdsClient::factory([\n 'version' => 'latest',\n 'region' => 'us-east-1',\n 'credentials' => [\n 'key' => env('AWS_ACCESS_KEY_ID'),\n 'secret' => env('AWS_SECRET_ACCESS_KEY'),\n ]\n ]);\n }", "title": "" }, { "docid": "b34c95401dd057b9bc3e7901bad06cb7", "score": "0.4866063", "text": "public function list(){\n $retrieved = $this->retrieve(['list_coupon']);\n return $retrieved['coupon'];\n }", "title": "" }, { "docid": "379699f4ffad56d130e1aab09d8e48c8", "score": "0.48660627", "text": "public function __construct()\n {\n $this->readJsonConversionRates($this->exchangeRatePath);\n }", "title": "" }, { "docid": "f02cf9bbe5fcdeb90200c9fbc553ddea", "score": "0.48643902", "text": "public function getService() {\n if ($this->_service !== null) {\n return $this->_service;\n }\n\n $restaurantId = (integer) $this->getRestaurantId();\n $service = new Yourdelivery_Model_Servicetype_Restaurant($restaurantId);\n \n if ($service->isCatering()) {\n $service = new Yourdelivery_Model_Servicetype_Cater($restaurantId);\n \n } elseif ($service->isGreat() || $service->isFruit()) {\n $service = new Yourdelivery_Model_Servicetype_Great($restaurantId);\n \n }\n \n return $this->_service = $service;\n }", "title": "" }, { "docid": "32e58173dac3bde4d754542d50b36baa", "score": "0.48636386", "text": "public function __construct(Reader $reader)\n {\n $this->reader = $reader;\n }", "title": "" }, { "docid": "bad6e884d1152c76563e414c2127b427", "score": "0.48359388", "text": "public function __construct(SupplierService $service)\n {\n $this->middleware('role:company');\n\n $this->service = $service;\n }", "title": "" }, { "docid": "f84dac99025dfa226008eda77238322d", "score": "0.48230574", "text": "public function testCreateCoupon()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "8addfd4c05ca1a3c124d5a918c4622a1", "score": "0.48132032", "text": "public function __construct(){\r\n\t\t$this->data\t=\t$this->getFeedData();\r\n\t\t$this->data\t=\t$this->data->customer;\r\n\t}", "title": "" }, { "docid": "3eaa6a857d44e1c17eb6d0a48fd59a3d", "score": "0.48008516", "text": "public function __construct()\n {\n $this->catalogue = new InMemoryCatalogue();\n $this->basket = new Basket();\n }", "title": "" }, { "docid": "f5edd4c07941f3621d6fbbaa7d325479", "score": "0.47987378", "text": "protected function _construct()\n {\n $this->_init(\n 'GBPrimePay\\Payments\\Model\\Purchase',\n 'GBPrimePay\\Payments\\Model\\ResourceModel\\Purchase'\n );\n }", "title": "" }, { "docid": "cc7c6a89e0c08e5b362176171ecfce9c", "score": "0.47919694", "text": "public function __construct()\n {\n $this->setProduitOrCustom('custom');\n }", "title": "" }, { "docid": "5c04c7491a9dd7d84f98766f5ab64903", "score": "0.4791794", "text": "public function __construct($orderid) {\n\t\tparent::__construct();\n\n\t\t$this->orderid = $orderid;\n\t\t$this->useDropbox = true;\n\t\t$this->GUID = gen_uuid();\n\n\t\t/* NES\n\t\t * Mando HardReset (3er parametro) porque los orderproductid se comportan raro cuando los traemos de cache\n\t\t */\n\t\tif(!$this->order = getOrder($orderid, true, true))\n\t\t{\n\t\t\tlogAddError('No se pudo cargar la orderid \"'.$orderid.'\" para transmitir a IntelisisWebService');\n\t\t\t$this->setError('Ocurrio un error al cargar su pedido en nuestro sistema [1]. Favor de contactar al administrador del sistema con el ID de pedido \"'.$orderid.'\"');\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t * NES: REQ12891 - Obtengo los campos configurables de los productos\n\t\t */\n\t\t$orderFields = GetOrderProductFieldsData($orderid);\n\n\t\tif(($Cliente = $this->getCliente()) == ''){\n\t\t\tlogAddWarning('No se encontro el ID de WebUsuario del customer id \"'.$Cliente.'\"');\n\t\t\t$this->setError('Ocurrio un error al cargar su pedido en nuestro sistema [2]. Favor de contactar al administrador del sistema con el ID de pedido \"'.$orderid.'\"');\n\t\t}\n\t\t//$discount = $this->order['coupon_discount'] >= 0 ? ($this->order['coupon_discount'] / $this->order['subtotal_inc_tax']) * 100 : 0;\n\n\t\t/*\n\t\t NES BUGS 13066, 13102, 13154, 13155, 13148 de cupones\n\t\t Arreglo esto para poner descuentos globales, por producto, o al envío.\n\t\t */\n\t\t$discount_result = $GLOBALS['ISC_CLASS_DB']->Query(\"SELECT * FROM [|PREFIX|]order_coupons WHERE ordcouporderid = '\".$orderid.\"'\");\n\t\t$order_discount = $GLOBALS['ISC_CLASS_DB']->Fetch($discount_result);\n\n\t\t$shippingCost = $_SESSION['QUOTE']->getNonDiscountedShippingCost(true);\n\n\t\t$discount = 0;\n\t\t$discount_product = 0;\n\t\t$discount_product_percent = 0;\n\t\t$discount_shipping = 0;\n\n\t\tswitch($order_discount['ordcoupontype']){\n\t\t\tcase '0':\n\t\t\t\t$discount_product = $order_discount['ordcouponamount'];\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\t\t$discount_product_percent = $order_discount['ordcouponamount'];\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t$discount = ($order_discount['ordcouponamount'] * 100) / $this->order['subtotal_inc_tax'];\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tif($shippingCost == 0) $discount_shipping = 100;\n\t\t\t\t else $discount_shipping = ($order_discount['ordcouponamount'] * 100) / $shippingCost;\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t $discount_shipping = 100;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$customerData = $this->getCustomer();\n\n\t\t$customFieldsAccount = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_ACCOUNT, false, $customerData['custformsessionid']);\n\n\t\t$RFC = getCustomFieldByLabel($customFieldsAccount, FORMFIELDS_FORM_ACCOUNT, 'RFC');\n\n\t\t$extrafields = '';\n\t\t$invoice = '';\n\t\tfor($i=1;$i<=5;$i++){\n\t\t\tif(GetConfig('CheckoutExtraFieldActive'.$i)) {\n\t\t\t\t//ToDo: Probar bien este parseo para evitar XML mal formados, dependiendo de nombres de campos extras\n\t\t\t\t$fieldName = preg_replace(\"/[^A-Za-z0-9]|[\\s]/\", '', GetConfig('CheckoutExtraFieldName'.$i));\n\t\t\t\t$fieldValue = $this->order['extraField'.$i];\n\n\t\t\t\tif($fieldName == 'RequiereFactura'){\n\t\t\t\t\tif(strtoupper($fieldValue) == 'ON'){\n\t\t\t\t\t\tif(trim($RFC) == '') {\n\t\t\t\t\t\t\tlogAddError('Se intento hacer el orderid \"'.$orderid.'\" que requiere factura pero el RFC esta vacio');\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$invoice = 'SI';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$invoice = 'NO';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$extrafields .= \" \".$fieldName.\"='\".$fieldValue.\"'\";\n\t\t\t}\n\t\t}\n\n\t\t$deliveryDates = array();\n\t\tforeach($this->order['products'] as $product)\n\t\t{\n\t\t\t/*\n\t\t NES BUGS 13066, 13102, 13154, 13155, 13148 de cupones\n\t\t Aumento el descuento en linea. Convierto los descuentos en cantidad a porcentaje.\n\t\t */\n\t\t\t$this_product_discount = 0;\n\n\t\t\tif($discount_product > 0) {\n\t\t\t\t$this_product_discount = ($discount_product * 100) / $product['price_inc_tax'];\n\t\t\t}\n\t\t\telseif($discount_product_percent > 0){\n\t\t\t\t$this_product_discount = $discount_product_percent;\n\t\t\t}\n\n\t\t\t/* \n\t\t\t * NES: REQ12891 - Agrego esto para poner el nombre y valor del campo confiugrable, para luego agregarselo al XML\n\t\t\t * Si el producto no tiene campos confiugrables, el arreglo se deja vacio\n\t\t\t */\n\t\t\t$productFields = array();\n\t\t\tif(isset($orderFields[$product['orderprodid']])){\n\t\t\t\tforeach($orderFields[$product['orderprodid']] as $key => $field){\n\t\t\t\t\tif($field['fieldtype'] == 'checkbox') {\n\t\t\t\t\t\tif(in_array(strtoupper($field['textcontents']), array('ON', 'CHECKED'))) $field['textcontents'] = 'Si';\n\t\t\t\t\t\telse $field['textcontents'] = 'No';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$IDCampo = $this->getIDCampo($field['fieldid']);\n\t\t\t\t\t\n\t\t\t\t\t$productFields[] = array(\n\t\t\t\t\t\t'Nombre' => $field['fieldname'],\n\t\t\t\t\t\t//'Valor' => str_replace(array('\"'), array(\"'\"), $field['textcontents']),\n\t\t\t\t\t\t'Valor' => stripInvalidXml($field['textcontents']),\n\t\t\t\t\t\t'IDCampo' => $IDCampo,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($product['ordprodwrapid'] > 0){\n\t\t\t\t$productFields[] = array(\n\t\t\t\t\t'Nombre' => 'Envoltura Regalo #'.$GLOBALS['ISC_CLASS_DB']->FetchOne('SELECT IDEnvoltura FROM [|PREFIX|]intelisis_gift_wrapping WHERE wrapid = \"'.$product['ordprodwrapid'].'\"', 'IDEnvoltura'),\n\t\t\t\t\t//'Valor' => str_replace(array('\"'), array(\"'\"), $field['textcontents']),\n\t\t\t\t\t'Valor' => stripInvalidXml($product['ordprodwrapname'].' - '.$product['ordprodwrapmessage']),\n\t\t\t\t\t'IDCampo' => '',\n\t\t\t\t);\n\t\t\t}\n\n\n\t\t\t$pedidoD[] = array(\n\t\t\t\t'ID' => $product['orderprodid'],\n\t\t\t\t'Cantidad' => $product['ordprodqty'],\n\t\t\t\t'SKU' => $product['ordprodsku'],\n\t\t\t\t'Precio' => $product['price_inc_tax'],\n\t\t\t\t'DescuentoLinea' => $this_product_discount,\n\t\t\t\t// NES: REQ12891 - Agrego el arreglo de campos configurables\n\t\t\t\t'CamposConfigurables' => $productFields,\n\t\t\t);\n\n\t\t\tif($date = $this->getDeliveryDateFromStatus($product)){\n\t\t\t\t$deliveryDates[] = $date;\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($deliveryDates)){\n\t\t\trsort($deliveryDates);\n\t\t\t$maxdate = date('Y-m-d', $deliveryDates[0]);\n\t\t}\n\t\telse {\n\t\t\t$maxdate = '';\n\t\t}\n\n\t\tif(empty($pedidoD))\n\t\t{\n\t\t\tlogAddWarning('El orderid \"'.$this->orderid.'\" no tiene productos para transmitir a Intelisis');\n\t\t\t$this->setError('Ocurrio un error al procesar el XML de su pedido. Favor de contactar al administrador del sistema con el ID de pedido \"'.$this->orderid.'\" [2]');\n\t\t\treturn false;\n\t\t}\n\n\t\t$xml = \"<?xml version='1.0' encoding='windows-1252'?><Intelisis Sistema='Intelisis' Contenido='Solicitud' Referencia='Intelisis.eCommerce.Pedido' SubReferencia='\".$this->GUID.\"' Version='1.0'><Solicitud Sucursal='\".GetConfig('syncIWSintelisissucursal').\"' Estatus='ALTA' Empresa='\".$this->empresa.\"'><Pedido Empresa='\".$this->empresa.\"' Cliente='\".$Cliente.\"' Moneda='Pesos' TipoCambio='1' Importe='\".$this->order['total_ex_tax'].\"' Impuestos='\".$this->order['total_tax'].\"' Sucursal='\".GetConfig('syncIWSintelisissucursal').\"' Observaciones='\".$this->order['ordcustmessage'].\"' Referencia='Facturar:\".$invoice.\" ID#\".$orderid.\"' DescuentoGlobal='\".$discount.\"' CostoFlete='\".$shippingCost.\"' DescuentoFlete = '\".$discount_shipping.\"' FormaPago='\".$this->order['orderpaymentmodule'].\"' ReferenciaFormaPago='\".$this->order['ordpayproviderid'].\"' \".$extrafields.\" FechaEntrega='\".$maxdate.\"' PedidoID='\".$orderid.\"' >\";\n\n\t\tforeach($pedidoD as $D) {\n\t\t\t$line = \"<PedidoD\";\n\t\t\tforeach ($D as $attribute => $value) {\n\t\t\t\t/* NES: REQ12891 - Agrego validacion de is_array para no meter el arreglo de campos configurables\n\t\t\t\t* asi como cualquier otro arreglo que le podamos agregar al arreglo de productos\n\t\t\t\t* */\n\t\t\t\tif(!is_array($value)) $line .= ' '.$attribute.'=\"'.$value.'\"';\n\t\t\t}\n\t\t\t$line .= \">\";\n\n\t\t\t/*\n\t\t\t * NES: REQ12891 - Ahora si, agrego el XML de los campos configurables si no viene vacio\n\t\t\t */\n\t\t\tif(!empty($D['CamposConfigurables'])){\n\t\t\t\t$line .= '<CamposConfigurables>';\n\t\t\t\tforeach($D['CamposConfigurables'] as $key => $field) {\n\t\t\t\t\t$line .= '<CampoConfigurable IDCampo=\"'.$field['IDCampo'].'\" Campo=\"'.$field['Nombre'].'\" Valor=\"'.$field['Valor'].'\" />';\n\t\t\t\t}\n\t\t\t\t$line .= '</CamposConfigurables>';\n\t\t\t}\n\n\t\t\t$line .= \"</PedidoD>\";\n\t\t\t$xml .= $line;\n\t\t}\n\n\t\t$customFieldsBillingAddress = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_BILLING, false, $this->order['ordformsessionid']);\n\t\tforeach($customFieldsBillingAddress as $fieldid => $field){\n\t\t\tif($field->record['formfieldisimmutable'] > 0)\n\t\t\t\tunset($customFieldsBillingAddress[$fieldid]);\n\t\t}\n\t\t$customFieldsBillingXML = getCustomFieldsAsXMLAttributes($customFieldsBillingAddress);\n\t\t/*\n\t\t$Colonia = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Colonia');\n\t\t$Delegacion = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Delegacion');\n\t\t$NoExt = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Numero Exterior');\n\t\t$Vivienda = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Vivienda');\n\t\t*/\n\n\t\t$billingAddress = '<DireccionFactura Nombre=\"'.$this->order['ordbillfirstname'].'\" Apellido=\"'.$this->order['ordbilllastname'].'\" Direccion1=\"'.$this->order['ordbillstreet1'].'\" Direccion2=\"'.$this->order['ordbillstreet2'].'\" Ciudad=\"'.$this->order['ordbillsuburb'].'\" Pais=\"'.$this->order['ordbillcountry'].'\" Estado=\"'.$this->order['ordbillstate'].'\" CP=\"'.$this->order['ordbillzip'].'\" eMail=\"'.$this->order['ordbillemail'].'\" Telefono=\"'.$this->order['ordbillphone'].'\" '.$customFieldsBillingXML.' />';\n\n\t\t$shippingAddress = \"\";\n\t\t$cost = 0;\n\t\t// ToDo: Sacar las addresses de un lugar que no dependa de la variable de sesion\n\t\tforeach($_SESSION['QUOTE']->getAllAddresses() as $address) {\n\t\t\t//logAddNotice('add \"'.$address->getId().'\" g \"'.$address->getGUID().'\" type \"'.$address->getType().'\"');\n\t\t\tif($address->getType() == ISC_QUOTE_ADDRESS::TYPE_SHIPPING) {\n\t\t\t\t$cost += $address->getNonDiscountedBaseShippingCost();\n\t\t\t\t$GUID = $GLOBALS['ISC_CLASS_DB']->FetchOne('SELECT GUID FROM [|PREFIX|]intelisis_shipping_addresses WHERE shipid = \"'.$address->getCustomerAddressId().'\"', 'GUID');\n\t\t\t\tif(!$GUID){\n\t\t\t\t\t$GUID = $address->getGUID();\n\t\t\t\t\t//logAddNotice('No hubo GUID. \"'.$GUID.'\"');\n\t\t\t\t}\n\t\t\t\tif(!$GUID) {\n\t\t\t\t\tlogAddNotice('No hay GUID para la direccion de envío del pedido '.$this->orderid);\n\t\t\t\t}\n\t\t\t\t$customFieldsShippingAddress = $address->getCustomFields();\n\t\t\t\t$customFieldsShippingXML = '';\n\t\t\t\tforeach($customFieldsShippingAddress as $fieldid => $value){\n\t\t\t\t\t$field = getCustomFieldIdById($fieldid);\n\t\t\t\t\t$label = $field['formfieldlabel'];\n\t\t\t\t\t$label = iconv('UTF-8','ASCII//TRANSLIT',$label);\n\t\t\t\t\t$label = preg_replace(\"/[^A-Za-z0-9]|[\\s]/\", '', $label);\n\t\t\t\t\tif(is_array($value)){\n\t\t\t\t\t\t$value = implode(',', $value);\n\t\t\t\t\t}\n\t\t\t\t\t$customFieldsShippingXML .= $label . '=\"'.$value.'\" ';\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t$NoExtEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Numero Exterior'));\n\t\t\t\t$ColoniaEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Colonia'));\n\t\t\t\t$DelegacionEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Delegacion'));\n\t\t\t\t$ViviendaEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Vivienda'));\n\t\t\t\t*/\n\t\t\t\t$shippingAddress .= '<DireccionEnvio GUID=\"'.$GUID.'\" Nombre=\"'.$address->getFirstName().'\" Apellido=\"'.$address->getLastName().'\" Direccion1=\"'.$address->getAddress1().'\" Direccion2=\"'.$address->getAddress2().'\" Ciudad=\"'.$address->getCity().'\" Pais=\"'.$address->getCountryName().'\" Estado=\"'.$address->getStateName().'\" CP=\"'.$address->getZip().'\" eMail=\"'.$address->getEmail().'\" Telefono=\"'.$address->getPhone().'\" '.$customFieldsShippingXML.' />';\n\t\t\t\t//logAddSuccess('sefsefswef.'.$shippingAddress.$IDEnviarA.$address->getCustomerAddressId());\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($customFieldsAccount as $fieldid => $field){\n\t\t\tif($field->record['formfieldisimmutable'] > 0)\n\t\t\t\tunset($customFieldsAccount[$fieldid]);\n\t\t}\n\t\t$customFieldsAccountXML = getCustomFieldsAsXMLAttributes($customFieldsAccount);\n\n\t\t$customer = '<Usuario GUID=\"'.$customerData['GUID'].'\" Nombre=\"'.$customerData['custconfirstname'].'\" Apellidos=\"'.$customerData['custconlastname'].'\" eMail= \"'.$customerData['custconemail'].'\" Contrasena=\"'.$customerData['custpassword'].'\" Telefono=\"'.$customerData['custconphone']./*'\" RFC=\"'.$RFC.*/'\" Compania=\"'.$customerData['custconcompany'].'\" '.$customFieldsAccountXML.'/>';\n\n\t\t$xml .= $billingAddress.$shippingAddress.$customer. \"</Pedido></Solicitud></Intelisis>\";\n\n\t\t$this->xml = $xml;\n\t}", "title": "" }, { "docid": "706ed312e06d9a1001137f0999247836", "score": "0.47874957", "text": "function __construct() {\n $this->conexao = Conexao::getInstance();\n }", "title": "" }, { "docid": "b85707724dd8e19ba849e497d674a64a", "score": "0.47805414", "text": "public abstract function getService();", "title": "" }, { "docid": "61f3897828aea46aeb48d54a833cd9ba", "score": "0.47803566", "text": "public function getCouponByCode($code);", "title": "" }, { "docid": "e0bc624d912fa4bf65444bef644b0acd", "score": "0.47765297", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->clientCategoryService = app()->make(ClientCategoryService::class);\n }", "title": "" }, { "docid": "78de0f5f764ee52008096bd84ba797e1", "score": "0.47761735", "text": "public function __construct($class_name = '', $service_name = '') {\r\n\t\t$this->class_name = $class_name;\r\n\t\t$this->service_name = $service_name;\r\n\t}", "title": "" }, { "docid": "d3c8b2ef491b80d49583333540f8f8c4", "score": "0.4773977", "text": "abstract protected function getService();", "title": "" }, { "docid": "8343ce3c68411cb7886856a98d796fe6", "score": "0.47618508", "text": "public function getCouponForUser()\n {\n Stripe::setApiKey(config('services.stripe.secret'));\n\n if (count(Spark::plans()) === 0) {\n abort(404);\n }\n\n try {\n $customer = StripeCustomer::retrieve(Auth::user()->stripe_id);\n\n if ($customer->discount) {\n return response()->json(\n Coupon::fromStripeCoupon(\n StripeCoupon::retrieve($customer->discount->coupon->id)\n )\n );\n } else {\n abort(404);\n }\n } catch (Exception $e) {\n abort(404);\n }\n }", "title": "" }, { "docid": "37f40d8f9c370e402d10ec09947fc9d1", "score": "0.47584057", "text": "protected function getService()\n {\n }", "title": "" }, { "docid": "1fa9c7e2c5d596bf0164fd8f1c21522f", "score": "0.4752645", "text": "function DiscountLoggedInConstruct()\n\t{\tparent::DiscountLoggedInConstruct();\n\t\t$this->discount = new AdminDiscountCode($_GET['id']);\n\t\t\n\t\tswitch ($_GET['action']){\n\t\t\tcase 'list': echo $this->ListOptions($_GET['ptype'], $_GET['prodid'], $_GET['ticketid']);\n\t\t\t\tbreak;\n\t\t\tcase 'select': echo $this->discount->ProductTypeDetails($_GET['ptype'], $_GET['prodid'], true,$_GET['ticketid']);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "2775e1542064fbf89e8def0446a9e4f5", "score": "0.4747898", "text": "function & getService($className) {\n $className = strtolower($className);\n // require_once(t3lib_extMgm::extPath('bsg_regsteps').\"/services/class.{$className}.php\");\n require_once(dirname( __FILE__ ).\"/services/class.{$className}.php\");\n if(!class_exists($className)) {\n die(\"Error: {$className} doesn't exist\");\n }\n $obj = new $className();\n return $obj;\n }", "title": "" }, { "docid": "32c02fcff520c3518133f4aa0db14cdb", "score": "0.47460642", "text": "public function __construct() {\n parent::__construct();\n $this->comissaoService = resolve('App\\Modules\\Parla\\Services\\ComissaoService');\n }", "title": "" }, { "docid": "d5709ab76b6228fce75d6cd2ef968a8f", "score": "0.47451144", "text": "public function __construct(){\n $options = [\n 'soap_version' => SOAP_1_1,\n 'exceptions' => true,\n 'trace' => 1,\n 'cache_wsdl' => WSDL_CACHE_NONE,\n 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,\n 'connection_timeout' => 60,\n 'login' => HTTP_AUTH_1C_USR,\n 'password' => HTTP_AUTH_1C_PWD\n ];\n\n parent::__construct($_ENV['soapClients_oneC_Registartion_wsdl'], $options);\n }", "title": "" }, { "docid": "9c8bcb274b9e4607d4d4b8e38519d5ef", "score": "0.4741074", "text": "public function __construct(DiscountCalculatorInterface $discountCalculator)\n {\n parent::__construct();\n\n $this->discountCalculator = $discountCalculator;\n }", "title": "" }, { "docid": "817d01282a342c0fb162e5ab86b84146", "score": "0.47251222", "text": "public function __construct($reader, &$options = array())\n {\n parent::__construct($reader, $options);\n\n $data = $this->_reader->read\n ($this->getOffset() + $this->getSize() -\n $this->_reader->getOffset());\n $dataSize = strlen($data);\n for ($i = 1; $i <= $dataSize; $i++) {\n $this->_sampleDependencyTypeTable[$i] = array\n ('sampleDependsOn' => (($tmp = ord($data[$i - 1])) >> 4) & 0x3,\n 'sampleIsDependedOn' => ($tmp >> 2) & 0x3,\n 'sampleHasRedundancy' => $tmp & 0x3);\n }\n }", "title": "" }, { "docid": "2b28353055a7ec8c9c15e262120b66ad", "score": "0.4719737", "text": "public function __construct(ReadPlan $rp)\n {\n $this->rp=$rp;\n }", "title": "" }, { "docid": "e4f4122f7ad1e2e4d2c63a8d0629a784", "score": "0.47187692", "text": "public function __construct()\n {\n parent::__construct();\n\n if (Input::get('action') == 'generateInvoice')\n {\n CrmService::generateInvoice(Input::get('id'), Input::get('type'));\n }\n }", "title": "" }, { "docid": "300e67fa28d1762a93000224ae2ced15", "score": "0.4699765", "text": "public function withCoupon($coupon)\n {\n $this->coupon = $coupon;\n\n return $this;\n }", "title": "" }, { "docid": "300e67fa28d1762a93000224ae2ced15", "score": "0.4699765", "text": "public function withCoupon($coupon)\n {\n $this->coupon = $coupon;\n\n return $this;\n }", "title": "" }, { "docid": "65085da665b03973560455ae9f95883e", "score": "0.4694258", "text": "public function __construct()\n {\n $config = (object) parse_ini_file(BASE_PATH . '/config/config.ini');\n //TODO: config class to populate default values\n if (!isset($config->dbname) || $config->dbname == '') {\n $config->dbname = 'test';\n }\n $this->connection = new PDO(\"sqlite:\" . BASE_PATH . \"/../data/\".$config->dbname.\".sq3\");\n $this->userMapper = new UserMapper($this->connection);\n $serviceFactory = new ServiceFactory($this->connection);\n $this->userService = $serviceFactory->getService(\"User\");\n }", "title": "" }, { "docid": "3b87fcf6becae7d7cc014cb3f906b6cd", "score": "0.46905187", "text": "public function __construct()\n {\n $this->currency = new Currency(self::CURRENCY);\n $this->cost = new Money(self::AMOUNT, $this->currency);\n $this->userEmail = new EmailAddress(self::USER_EMAIL);\n $this->metaData = [\n 1 => 'abc',\n 'a' => 'xyz',\n ];\n $this->id = new PaymentId(self::ID);\n $this->gatewayId = new StripePaymentId(self::GATEWAY_ID);\n }", "title": "" }, { "docid": "7f320284034765803fe703ace5beef6d", "score": "0.46846375", "text": "public function read() {\r\n $rs = $this->connection->read(\"name, taxid, address, phone, idcity, city, iduser, `user`, email, contact\", \"vw_sus_customer\", \"idcustomer = \" . $this->observer->idcustomer);\r\n $this->observer->name = $rs->name;\r\n $this->observer->taxid = $rs->taxid;\r\n $this->observer->address = $rs->address;\r\n $this->observer->phone = $rs->phone;\r\n $this->observer->city = new \\sus\\entities\\CityEntity($rs->idcity);\r\n $this->observer->city->name = $rs->city;\r\n $this->observer->user = new \\gen\\entities\\UserEntity($rs->iduser);\r\n $this->observer->user->name = $rs->user;\r\n $this->observer->user->email = $rs->email;\r\n $this->observer->contact = $rs->contact;\r\n }", "title": "" }, { "docid": "5b5a0ce3f93a9966a30c785d6615a50d", "score": "0.46808472", "text": "private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_backend = new Billing_Backend_BankAccountUsage();\n\t\t$this->_modelName = 'Billing_Model_BankAccountUsage';\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t\t$this->_purgeRecords = FALSE;\n\t\t$this->_doContainerACLChecks = FALSE;\n\t\t$this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\n\t}", "title": "" }, { "docid": "6bd7e1c87ccbcfc926a97d837f493508", "score": "0.46760207", "text": "public function __construct() {\n\t\tDebug::mark(__METHOD__);\n\t\t$argv = func_get_args();\n\n\t\tswitch (func_num_args()) {\n\t\tcase 0:\n\t\t\tthrow new Exception(\"Missing URL.\");\n\n\t\tcase 1:\n\t\t\t\tif (is_array($argv[0])) {\n\t\t\t\t\t\t$this->__serviceURL = $argv[0];\n\t\t\t\t\t\t$this->__serviceType = array('json'); //Default service type.\n\t\t\t\t} else {\n\t\t\t\t\tif (WebTools::isValidUrl($argv[0])) {\n\t\t\t\t\t\t$this->__serviceURL = $argv[0];\n\t\t\t\t\t\t$this->__serviceType = array('json'); //Default service type.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"'$argv[0]' is not a valid argument.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t\tif (WebTools::isValidUrl($argv[0])) {\n\t\t\t\t\t$this->__serviceURL = $argv[0];\n\t\t\t\t\tswitch ($argv[1]) {\n\t\t\t\t\tcase 'json':\n\t\t\t\t\t\t\t$this->__serviceType = array('json');\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'xml':\n\t\t\t\t\t\t\t$this->__serviceType = array('xml');\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault: //default file type\n\t\t\t\t\t\tthrow new Exception(\"'$argv[1]' is not a valid type.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"'$argv[0]' is not a valid URL.\");\n\t\t\t\t}\n\t\t}//end switch\n\n\t\t$this->__serviceData = $this->__getData($this->__serviceURL);\n\t\t$this->__service = $this->__processData($this->__serviceData);\n\t\tDebug::mark(__METHOD__);\n\t}", "title": "" }, { "docid": "d2ba3aea355e3be60776fe41f3f83ae0", "score": "0.4673026", "text": "public function __construct()\n {\n $this->cnae = new Cnae();\n $this->relacao_cnae_cid = new RelacaoCnaeCid();\n }", "title": "" }, { "docid": "837ca7ef7793d9d3cab41682a733b493", "score": "0.46725315", "text": "public function __construct()\n {\n $this->vendSrv = new VendService;\n $this->shopifySvc = new ShopifyService;\n }", "title": "" }, { "docid": "be93e10836b69d627faef4fe4c57d2b0", "score": "0.46698558", "text": "public function __construct()\n {\n $consumerKey = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'consumer_key');\n $consumerSecret = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'consumer_secret');\n $token = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'token');\n $tokenSecret = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'token_secret');\n\n $metadata = new Metadata($consumerKey, $consumerSecret);\n $metadata->setOauthAccess($token, $tokenSecret);\n\n $this->factory = new ApiFactory($metadata, new GuzzleAdapter());\n\n error_log('CK=' . $consumerKey);\n\n if (!$consumerKey) {\n echo \"In order to import photographs Flickr key, secret and access token must be provided\";\n die;\n }\n }", "title": "" }, { "docid": "658f0f1854fa6c666fc123e438504ab4", "score": "0.46675527", "text": "public function __construct() {\n\t\t$this->jsonReader = new JsonReader('bookData');\n\t}", "title": "" }, { "docid": "841f6720626e7c58bc9f04440d4817d7", "score": "0.46635914", "text": "public function __construct()\n {\n // inject our services as class properties\n if ( isset($this->services) && is_array($this->services) ) {\n foreach ($this->services as $property => $class) {\n $this->{$property} = new $class;\n }\n }\n }", "title": "" }, { "docid": "ca533b6dfe7b37305ddc446e48d0d841", "score": "0.4643062", "text": "public function coupon()\n {\n return $this->belongsTo(Coupon::class);\n }", "title": "" }, { "docid": "852fffa29cb722ec467b5b64023b5746", "score": "0.4635599", "text": "function __construct() \n {\n parent::__construct();\n \n// $db = new DB($this -> _db);\n// $this -> _pdo = $db -> getConnected();\n \n $this -> _billing = new BillingManager( $this -> _pdo );\n $this -> _license = new LicenseRecord( $this -> _pdo );\n $this -> _usersNotes = new UsersNotes( $this -> _pdo );\n $this -> _gateway = new Gateway();\n \n // detected storeID\n $config = GlobalSettings::getFastSpringConfig();\n $this -> storeId = $config['storeId'];\n }", "title": "" }, { "docid": "f0d9744171d4a54a853177be6607490a", "score": "0.46348777", "text": "public function __construct($_enhancedCompleteRecoupRequestDetails = NULL)\r\n\t{\r\n\t\tPayPalWsdlClass::__construct(array('EnhancedCompleteRecoupRequestDetails'=>$_enhancedCompleteRecoupRequestDetails));\r\n\t}", "title": "" }, { "docid": "f1ad71ece42a169cf413930256001230", "score": "0.46287468", "text": "public function __construct( $coupons = null)\n {\n $this\n ->setCoupons($coupons);\n }", "title": "" }, { "docid": "3c72cad15f8dd2f19e40efcbd27b2934", "score": "0.46285266", "text": "public function __construct()\n\t{\n\t\t\t\n\t\t// step 1 load the base url from config;\n\t\t$this->base_url = self::getBaseUrlFromConfig();\n\t\t// step 2 load the data from aws dynamodb\n\t\t// if the data isn't found in dynamodb throw an exception\n\t\t// if the data is found in the dynamodb assign the variable, and return the object\n\t}", "title": "" }, { "docid": "bb1a48937616bc0a052a77891092d970", "score": "0.4623088", "text": "public function __construct() {\n\t\t\n $this->Rate = new Rate;\n \n }", "title": "" }, { "docid": "a56b1b7db6080e0aa32556ceba50421d", "score": "0.46225908", "text": "public function __construct() {\n \n /**\n * Inject the array contained in the configuration file.\n */\n $this->_config = require __DIR__ . '/../config/_config.php';\n \n /**\n * The ORM setup.\n */\n $this->_db();\n \n /**\n * Force the HTTPS protocol.\n */\n $this->_forceHttps();\n \n /**\n * Set the unique order ID or <sku>.\n */\n $this->_setSku();\n \n /**\n * Set the action.\n */\n $this->_setAction();\n \n /**\n * If the <sku> exists it sets the master object.\n */\n if ($this->_sku) {\n $this->_setMaster($this->_sku);\n }\n \n /**\n * If the master object doesn't exist, it triggers an exception\n * otherwise it sets the registry object.\n */\n if ($this->getMaster() === NULL) {\n $this->_error404();\n } else {\n $this->_setRegistry($this->getMaster()->client__id);\n }\n \n /**\n * If the <action> exists and matches.\n */\n if ($this->_action) {\n if ($this->_action === $this->getConfig('actionsHash')['setItemAsPaid']) {\n $this->_setItemAsPaid();\n } else if ($this->_action === $this->getConfig('actionsHash')['setItemAsDead']) {\n $this->_setItemAsDead();\n } else {\n $this->_error404();\n }\n }\n \n /**\n * Set the locale and the translations.\n */\n $this->_setLocale($this->getRegistry()->locale);\n \n /**\n * Validate and set the paramters needed\n * by the Stripe checkout.\n */\n $this->_setProcessParams();\n \n /**\n * Set the page title.\n */\n $this->_setPageTitle();\n \n /**\n * The order is closed.\n */\n if ($this->getMaster()->status == self::ITEM_STATUS_CLOSED) {\n echo $this->_('orderClosed');\n exit();\n }\n \n /**\n * If the parameters for the Stripe checkout exists\n * it processes the transaction.\n */\n if ($this->getProcessParams()) {\n $this->processCheckout();\n }\n \n }", "title": "" }, { "docid": "7e78b1fec2ff8b0c268f68a47de20565", "score": "0.46215734", "text": "public function __construct(OrderService $order_service)\n {\n $this->order_service = $order_service;\n }", "title": "" }, { "docid": "0c0a5af7b2b0ebd245955374dc4b4044", "score": "0.46202555", "text": "public function __construct() {\n\t\tparent::__construct();\n\n\t\t/** setup PayPal api context **/\n\t\t$paypal_conf = \\Config::get('paypal');\n\t\t$this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n\t\t$this->_api_context->setConfig($paypal_conf['settings']);\n\t\t$this->Currency = 'USD';\n\t}", "title": "" }, { "docid": "54be12a4399018a210a78d628b8ce348", "score": "0.4620236", "text": "public function __construct()\n {\n // Load the PayPal Checkout API\n Loader::load(dirname(__FILE__) . DS . 'lib' . DS . 'paypal_checkout_api.php');\n\n // Load configuration required by this gateway\n $this->loadConfig(dirname(__FILE__) . DS . 'config.json');\n\n // Load components required by this gateway\n Loader::loadComponents($this, ['Input']);\n\n // Load the language required by this gateway\n Language::loadLang('paypal_checkout', null, dirname(__FILE__) . DS . 'language' . DS);\n }", "title": "" }, { "docid": "7d70f2760b5091d96d46b6c86ff6ab29", "score": "0.46188328", "text": "function __construct( &$reader )\n\t{\n\t\tparent::__construct( $reader );\n\t}", "title": "" }, { "docid": "589e098df6954fb6495d04321a49c978", "score": "0.46161368", "text": "public function __construct()\n {\n //Novalnet Basic parameters\n $this->assignUtilities();\n $this->_vendorId = $this->_getConfigData('merchant_id', true);\n $this->_authcode = $this->_getConfigData('auth_code', true);\n $this->_productId = $this->_getConfigData('product_id', true);\n $this->_tariffId = $this->_getConfigData('tariff_id', true);\n $this->_referrerId = $this->_getConfigData('referrer_id', true);\n }", "title": "" }, { "docid": "9427c022fb64043594081822c99ec5cf", "score": "0.46160454", "text": "public function __construct()\n {\n try {\n // using guzzle\n $this->data->data = new stdClass();\n $this->data->fulfillment = new stdClass();\n\n $this->headers = array(\n 'Content-Type: application/json'\n );\n /*\n\n $this->endpoint = config('woocommerce.store_url');\n $this->headers = [\n 'header_total' => config('woocommerce.header_total') ?? 'X-WP-Total',\n 'header_total_pages' => config('woocommerce.header_total_pages') ?? 'X-WP-TotalPages',\n ];\n\n $this->woocommerce = new Client(\n $this->endpoint,\n config('woocommerce.store_url'),\n config('woocommerce.consumer_key'),\n config('woocommerce.consumer_secret'),\n [\n 'version' => 'wc/'.config('woocommerce.api_version'),\n 'wp_api' => config('woocommerce.wp_api_integration'),\n 'verify_ssl' => config('woocommerce.verify_ssl'),\n 'query_string_auth' => config('woocommerce.query_string_auth'),\n 'timeout' => config('woocommerce.timeout'),\n ]\n );\n */\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage(), 1);\n }\n }", "title": "" }, { "docid": "c21c69ee4af4a5890382cc61c7b66163", "score": "0.46133235", "text": "public function __construct(array $options = []){\n //will figure out how the fuck to add this to the SLIM APP\n $dotenv = new Dotenv(__DIR__.\"/../../\");\n $dotenv->load();\n\n\t\t/*\n * signature for wooclient\n url\n consumer key\n private key\n options - array\n */\n\t\t\n\t\t$this->theClient = new Client(\n\t\tgetenv(\"Site_Url\"),\n\t\tgetenv(\"Consumer_Key\"),\n\t\tgetenv(\"Consumer_Secret\"),\n\t\t$options\n\t\t);\n\t\t\n\t\t\n\t\treturn $this->theClient;\n\t\t\n\t}", "title": "" }, { "docid": "402637be4a04b42eff436f74be72901f", "score": "0.46087006", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->entity = app()->make(Payment::class);\n\n\t\t$this->interval = QuickBooks::getQuickBookSyncChangesInterval();\n\t}", "title": "" }, { "docid": "e98d5c9d2aa71d0920355dc3a32a2d34", "score": "0.46065676", "text": "public function __construct()\n {\n\n /** PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential(\n $paypal_conf['client_id'],\n $paypal_conf['secret'])\n );\n $this->_api_context->setConfig($paypal_conf['settings']);\n\n }", "title": "" }, { "docid": "5553fc0cea69bbcde918fe23cf7003de", "score": "0.46060827", "text": "public function __construct(){\n $arquivo = file_get_contents(CLASS_DIR.'MC/Cliente/Storage/clientes.json');\n $arrayClientes = json_decode($arquivo);\n foreach ($arrayClientes->items->item as $cli) {\n\n if (isset($cli->cnpj)){\n $cliente = new PessoaJuridica();\n $cliente->setCnpj($cli->cnpj);\n }else{\n $cliente = new PessoaFisica();\n $cliente->setCpf($cli->cpf);\n }\n\n $cliente->setNome($cli->nome)\n ->setIdade($cli->idade)\n ->setCep($cli->cep)\n ->setEndereco($cli->endereco)\n ->setNumero($cli->numero)\n ->setComplemento($cli->complemento)\n ->setBairro($cli->bairro)\n ->setCidade($cli->cidade)\n ->setEstado($cli->estado)\n ->setImportancia($cli->importancia);\n\n $this->clientes[$cli->nome] = $cliente->getDados();\n }\n\n }", "title": "" }, { "docid": "2c3ed7a998c073b042ea587a081bba2a", "score": "0.4602168", "text": "public function __construct(CardsService $service)\n {\n parent::__construct();\n\n $this->service = $service;\n }", "title": "" }, { "docid": "e9ec4d75c7580142fb268e313a5a9494", "score": "0.46009326", "text": "public function __construct()\n {\n $this->middleware('auth', ['only' => [\n 'getCouponForUser',\n ]]);\n }", "title": "" }, { "docid": "e27b00e4327ea3aa07aada15851dea5f", "score": "0.45973927", "text": "public function index()\n {\n $coupons = Coupon::filter()->paginate();\n\n return CouponResource::collection($coupons);\n }", "title": "" }, { "docid": "e44169f4ff4f5c6022124ccac69d8e2e", "score": "0.45907858", "text": "public function __construct() {\n\t\t$this->CI = &get_instance();\n\t\t\n\t\t$this->CI->config->load('bitcoin', TRUE);\n\t\t$this->config = $this->CI->config->item('bitcoin');\t\n\n\t\t$this->CI->load->library('jsonrpcclient', $this->config);\n\t\t$this->CI->load->model('bitcoin_model');\n\t}", "title": "" }, { "docid": "9b6ec8cbc3280c5a47302a84ca47ec35", "score": "0.4577877", "text": "protected function _construct()\n {\n $this->_init(\n Model\\Counter::class,\n Model\\ResourceModel\\Counter::class\n );\n }", "title": "" }, { "docid": "2786b55ca06b63e4a513c85a320f95f6", "score": "0.45754242", "text": "public function init() {\n $this->_service = new stdClass();\n $this->_service->baseurl = trim(get_config('blocks/intelligent_learning', 'ilpapi_url'));\n $connectionid = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionid'));\n $connectionpassword = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionpassword'));\n $this->_service->auth_header = $this->build_service_header($connectionid, $connectionpassword);\n $this->_service->is_ca_authority = trim(get_config('blocks/intelligent_learning', 'ilpapi_issslcaauthority'));\n $this->_service->cert_path = trim(get_config('blocks/intelligent_learning', 'ilpapi_certpath'));\n\n $this->_service->curldefaults = $this->get_curl_defaults();\n }", "title": "" }, { "docid": "e4bfd74f33471568ce8dae7d14e12481", "score": "0.4568178", "text": "public function __construct() {\n $this->availabilityManager = \\Drupal::service('commerce.availability_manager');\n $this->currentStore = \\Drupal::service('commerce_store.store_context')->getStore();\n $this->stockAvailabilityChecker = \\Drupal::service('commerce_stock.availability_checker');\n $this->stockServiceManager = \\Drupal::service('commerce_stock.service_manager');\n $this->localStockChecker = \\Drupal::service('commerce_stock.local_stock_service')->getStockChecker();\n $this->localStockUpdater = \\Drupal::service('commerce_stock.local_stock_service')->getStockUpdater();\n $this->variationStorage = \\Drupal::service('entity_type.manager')->getStorage('commerce_product_variation');\n }", "title": "" }, { "docid": "076cf50a06939bb681c6dc066b3ba5b2", "score": "0.45672846", "text": "function __construct($cocktailId) {\n\t $cocktail = $this->getCocktail($cocktailId);\n\n\t // Assign values to object instance\n\n\t $this->name = $cocktail[\"name\"];\n\t $this->instructions = $cocktail[\"instructions\"];\n\t $this->image = $cocktail[\"image\"];\n\n\t // Get cocktail ingredients from database and assign\n\t $this->ingredients = $this->getCocktailIngredients($cocktailId);\n }", "title": "" }, { "docid": "42d0c72e7b12ffb8a71d46049ff60ee2", "score": "0.45599455", "text": "public function __construct()\n {\n $this->defaultLang = env('SCRAPER_LOCALIZATION', 'en');\n $this->siteCountry = env('SCRAPER_COUNTRY', 'sa'); \n\n $this->sourceUrl = 'https://'.$this->siteCountry.'.pricena.com';\n\n $this->client = new Client();\n }", "title": "" }, { "docid": "f3caf1ba362f42c87ad601982f97f8c9", "score": "0.45569065", "text": "public function getService();", "title": "" }, { "docid": "f3caf1ba362f42c87ad601982f97f8c9", "score": "0.45569065", "text": "public function getService();", "title": "" }, { "docid": "f3caf1ba362f42c87ad601982f97f8c9", "score": "0.45569065", "text": "public function getService();", "title": "" }, { "docid": "cb3eb9d45ce59d6ff76e6f40bf7ed782", "score": "0.45536065", "text": "public function __construct(Cancellation $cancellation)\n {\n $this->cancellation = $cancellation;\n $this->order = $cancellation->order;\n }", "title": "" }, { "docid": "3a9664d9d2f30b05ee95ac01c49bc787", "score": "0.45510906", "text": "public function __construct()\n {\n $this->counterparty = new Client(config('bitcorn.cp.api'));\n $this->counterparty->authentication(config('bitcorn.cp.user'), config('bitcorn.cp.password'));\n\n parent::__construct();\n }", "title": "" }, { "docid": "3e34a4a6e58892b2e626a9f662efa7bc", "score": "0.45455423", "text": "public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => $this->base_uri\n ]);\n }", "title": "" } ]
1d3c3a5ce2d9c4971dd4027cd5c8a9ff
Page Data Rendering event
[ { "docid": "70098260caf46ec2d24e675ca9db27ad", "score": "0.0", "text": "function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}", "title": "" } ]
[ { "docid": "05506e5950f68b2a1e4d6c4e5d49222b", "score": "0.7066581", "text": "public function renderPage();", "title": "" }, { "docid": "959baae0e4bb1d899a2bc054ba1fa016", "score": "0.67980355", "text": "protected function initPageRenderer() {}", "title": "" }, { "docid": "959baae0e4bb1d899a2bc054ba1fa016", "score": "0.67974484", "text": "protected function initPageRenderer() {}", "title": "" }, { "docid": "9295251feffbcaafed807c6edffb1cc5", "score": "0.67871046", "text": "public function renderData();", "title": "" }, { "docid": "1d78b355affa13c3e25e15462f45a2a9", "score": "0.6756407", "text": "public function generatePage_postProcessing() {}", "title": "" }, { "docid": "d345cb48d834a4c0d34e55822244687d", "score": "0.6742592", "text": "public function drawPage()\n\t\t{\n\t\t}", "title": "" }, { "docid": "1fa42c7a86160ab93c4b407c65328322", "score": "0.6711823", "text": "abstract public function onAfterRender();", "title": "" }, { "docid": "559c44bff75595391c07a176a9c3ebe8", "score": "0.6664751", "text": "abstract function render_page();", "title": "" }, { "docid": "b322ea6d55d8c13cad4361105310bf14", "score": "0.6566766", "text": "protected function getPageRenderer() {}", "title": "" }, { "docid": "a4f1838cf2eaf96921e09a7d97639522", "score": "0.64949924", "text": "abstract protected function render_page_content(): void;", "title": "" }, { "docid": "a98f867c14dd2639ba4b4de03baf42e9", "score": "0.6487174", "text": "protected function prepareRendering() {}", "title": "" }, { "docid": "9201755c396fd80b4a041efa379b9203", "score": "0.64719206", "text": "public function generatePage_preProcessing() {}", "title": "" }, { "docid": "111a345c3d4f850431d008b8595d0d36", "score": "0.6445193", "text": "protected function collectPageData()\n {\n $currentPage = $this->pageManager->getCurrentPage();\n\n if (!is_null($currentPage)) {\n $this->data['currentPage'] = array(\n 'name' => $currentPage->getName(),\n 'type' => $currentPage->getType(),\n );\n $this->data['cache'] = array(\n 'enabled' => $this->cacheEnabled,\n 'private' => $currentPage->getCachePrivate(),\n 'max_age' => $currentPage->getCacheMaxAge(),\n 'shared_max_age' => $currentPage->getCacheSharedMaxAge(),\n 'must_revalidate' => $currentPage->getCacheMustRevalidate(),\n 'last_modified' => $currentPage->getLastCacheModifiedDate()\n );\n }\n }", "title": "" }, { "docid": "a515521046c2dbcb578171a7696cd9ea", "score": "0.6391249", "text": "public function onPageLoaded($page);", "title": "" }, { "docid": "b30e83554a2bea01573f96d03092d605", "score": "0.63276374", "text": "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "title": "" }, { "docid": "b30e83554a2bea01573f96d03092d605", "score": "0.63276374", "text": "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "title": "" }, { "docid": "9a803a71bd296bb1be4dcebb6bdc6d88", "score": "0.6323813", "text": "protected function callRenderHook() {}", "title": "" }, { "docid": "0e02b8585e97c28bfb7459124a551c27", "score": "0.63140345", "text": "public function render() {\n\t\t$this->render_page_content();\n\t}", "title": "" }, { "docid": "1f1a9de3c2afa643f251083d856bfd50", "score": "0.6298689", "text": "public function onPageFormatted($page);", "title": "" }, { "docid": "9385a325eec0cab7d39eb74857255fd5", "score": "0.6296541", "text": "public function render() {\n \t\tif (isset($_GET['eventId']) )\n\t\t\t$this->allElements[$_GET['eventId']]->callOnClickPreRenderFn();\n\n\t\tparent::render();\n \t\t\n\t\tif (isset($_GET['eventId']) )\n\t\t\t$this->allElements[$_GET['eventId']]->callOnClickPostRenderFn();\n\n\t}", "title": "" }, { "docid": "7de235ecfc7eca5d03e273e0e0020725", "score": "0.6262846", "text": "function onAfterRender()\n\t{\n\t}", "title": "" }, { "docid": "0a6ae6cc9fcaf41a934ffa6c42bed4e4", "score": "0.6224796", "text": "public function getPageRenderer() {}", "title": "" }, { "docid": "0a6ae6cc9fcaf41a934ffa6c42bed4e4", "score": "0.62230194", "text": "public function getPageRenderer() {}", "title": "" }, { "docid": "81e32f1f9aa94033f67e899691f77015", "score": "0.62028027", "text": "public function onPreRender() {\n\t\t$this->view->register('events', $this->events);\n\t\t$this->view->register('delta', $this->delta);\n\t\t$this->view->register('result', $this->result);\n\t}", "title": "" }, { "docid": "a73f9160357d5cfbeea416542aa2cae0", "score": "0.6184399", "text": "public function pageChanged($sender,$param)\n {\nPrado::trace('PAGER '.$param->NewPageIndex.' '. get_class($param),'Json');\n // if ($this->Page->IsCallback && !($param instanceof TCallbackEventParameter))\n // {\n // return;\n //}\n\n\n\t\t//$this->populateData($param->NewPageIndex);\n $this->Repeater->DataSource = $this->getProducts(true);\n $this->Repeater->CurrentPageIndex=$param->NewPageIndex;\n \t $this->Repeater->dataBind();\n\n //$this->Pager->render($param->getNewWriter());\n // $this->broadcastEvent('OnOrderChanged', $this, $param);\n\n }", "title": "" }, { "docid": "683729ba620ccfb808b0f281e9cd2992", "score": "0.615766", "text": "private function render()\r\n {\r\n \r\n }", "title": "" }, { "docid": "1df3de469c1830344aeb0367e4eb6f2e", "score": "0.6151105", "text": "public function beforerender() {\n parent::beforeRender();\n $this->Meta->data();\n }", "title": "" }, { "docid": "f5de2a31e1c10b1a8a83e850e8574901", "score": "0.6134922", "text": "protected function executePreRenderHook() {}", "title": "" }, { "docid": "3d806f132ccd1123d8fc76c64242be00", "score": "0.6126794", "text": "public function prePageContent();", "title": "" }, { "docid": "d656a52f5cf841ec5a75ce95465c8e67", "score": "0.61212707", "text": "public function render($pdf, $page, $data=null);", "title": "" }, { "docid": "887730797247065c2d05028dc6d809d2", "score": "0.6081925", "text": "public function pageDataRendering(&$header)\n {\n // Example:\n //$header = \"your header\";\n }", "title": "" }, { "docid": "887730797247065c2d05028dc6d809d2", "score": "0.6081925", "text": "public function pageDataRendering(&$header)\n {\n // Example:\n //$header = \"your header\";\n }", "title": "" }, { "docid": "35d4d8a45cf1ff8ab8a15329bb47522d", "score": "0.6067003", "text": "function onRenderWidget();", "title": "" }, { "docid": "3d2d0662379f73703a89e0041e3827ed", "score": "0.60550386", "text": "function onBeforeRender()\n\t{\n\t}", "title": "" }, { "docid": "2847e684c6d77a596ea4cf9e4ad30b01", "score": "0.6049237", "text": "abstract public function onBeforeRender($output);", "title": "" }, { "docid": "69312756ca7a56d05547bcba50d16097", "score": "0.6025232", "text": "public function onPageContentProcessed(Event $event)\n {\n $page = $event['page'];\n $config = $this->mergeConfig($page);\n\n // get current rendered content\n $content = $page->getRawContent();\n // replace marker(s) with Google map object(s)\n $page->setRawContent($this->processMarkdownContent($content, $config));\n\n // set this page's assets that where dynamically generated\n $this->setAssetsFromData();\n }", "title": "" }, { "docid": "2f00bcab39a1f3d2887730bcea5d1248", "score": "0.6015301", "text": "public function on_before_render()\n {\n $this->addFooterItem('<script type=\"text/javascript\">window.JanesWalk = window.JanesWalk || {}; Object.assign(window.JanesWalk, ' . json_encode($this->pageData) . ');</script>');\n }", "title": "" }, { "docid": "218a23e5a7d5949f49ed46c0ef298e6e", "score": "0.6005928", "text": "protected function callRenderMethod() {}", "title": "" }, { "docid": "0f70798957e1466122166b9a7001d868", "score": "0.59947467", "text": "function pagecreate()\r\n {\r\n $output = parent::pagecreate().\"\\n\";\r\n\r\n $output .= $this->_getJavascriptVar() . \" = document.getElementById('\" . $this->getName() . \"').getContext('\" . $this->getContext() . \"');\\n\";\r\n\r\n //Fire the event, if any\r\n if ($this->_jsonpaint != '')\r\n $output .= $this->_jsonpaint . \"(\" . $this->_getJavascriptVar() .\");\\n\";\r\n\r\n // bind standart events\r\n $output .= $this->bindJSEvent('click');\r\n $output .= $this->bindJSEvent('dblclick');\r\n $output .= $this->bindJSEvent('drag');\r\n $output .= $this->bindJSEvent('dragend');\r\n $output .= $this->bindJSEvent('dragenter');\r\n $output .= $this->bindJSEvent('dragleave');\r\n $output .= $this->bindJSEvent('dragover');\r\n $output .= $this->bindJSEvent('dragstart');\r\n $output .= $this->bindJSEvent('drop');\r\n $output .= $this->bindJSEvent('mousedown');\r\n $output .= $this->bindJSEvent('mousemove');\r\n $output .= $this->bindJSEvent('mouseout');\r\n $output .= $this->bindJSEvent('mouseover');\r\n $output .= $this->bindJSEvent('mouseup');\r\n $output .= $this->bindJSEvent('mousewheel');\r\n $output .= $this->bindJSEvent('scroll');\r\n $output .= $this->bindJSEvent('keydown');\r\n $output .= $this->bindJSEvent('keypress');\r\n $output .= $this->bindJSEvent('keyup');\r\n\r\n return $output;\r\n }", "title": "" }, { "docid": "1bbd0957747c342f7d7f1aae280f5394", "score": "0.59912163", "text": "function render() ;", "title": "" }, { "docid": "0a220ddaf6b5f45b4c109b19f4899bca", "score": "0.59862673", "text": "public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }", "title": "" }, { "docid": "894a66442d5a74fe98b9125a68cf5354", "score": "0.59658414", "text": "public function onRun()\n {\n $this->page['tagPage'] = $this->property('tagPage');\n $this->page['tagPageSlug'] = $this->paramName('tagPageSlug');\n $this->page['tagsPage'] = $this->property('tagsPage');\n $this->page['tagsPageSlug'] = $this->paramName('tagsPageSlug');\n }", "title": "" }, { "docid": "5b4be11b3339247b5378942a29f0b348", "score": "0.59639335", "text": "public function mainPage()\r\n {\r\n // $this->process();(Finished) https://eurodairy.eu/resources/two-webinars-on-the-principles-of-biodiversity/\r\n // $this->getData();\r\n $this->template();\r\n }", "title": "" }, { "docid": "58ea1f8d17b191aac97e36d0745ee19e", "score": "0.59612435", "text": "function _render_pages($view, $data=null)//I think this makes more sense\n\t{\n\t\t$user=$this->ion_auth->user()->row();\n\t\t$this->viewdata = (empty($data)) ? $this->data: $data;\n\t\t$this->viewdata['user'] = $this->ion_auth->user($this->session->userdata('user_id'))->row();\n\t\t$this->viewdata['application_count']=$this->application_model->myapps_process($this->session->userdata('user_id'));\n\t\t$this->viewdata['recent_messages']=$this->messages_model->get_new_messages('5');\n\t\t$this->viewdata['recent_normal_count']=$this->application_model->recent_count_normal();\n\t\t$this->viewdata['recent_immediate_count']=$this->application_model->recent_count_immediate();\n\t\t$this->viewdata['recent_urgent_count']=$this->application_model->recent_count_urgent();\n\t\t$this->_render_page('templates/header', $this->viewdata);\n\t\t$this->_render_page('templates/header_main', $this->viewdata);\n\t\t$this->_render_page($view, $this->viewdata);\n\t\t$this->_render_page('templates/footer_main', $this->viewdata);\n\t\t$this->_render_page('templates/footer', $this->viewdata);\n\t}", "title": "" }, { "docid": "06f5f6ee7bae4b76c7d87010e656b39a", "score": "0.5941234", "text": "private function runPage(){\n list($source, $formOptions, $logStatus, $tableData, $recordData, $group, $studentSchools, $tableSource, $studentData) = $this->model->preparePageContent($this->nav);\n print $this->view->pageView($source, $formOptions, $logStatus, $tableData, $this->url, $recordData, $group, $studentSchools, $tableSource, $studentData);\n }", "title": "" }, { "docid": "e218326604fe9d990fa36376a4130f98", "score": "0.5937778", "text": "protected function render() {}", "title": "" }, { "docid": "e218326604fe9d990fa36376a4130f98", "score": "0.5937778", "text": "protected function render() {}", "title": "" }, { "docid": "0da85f13b7cd1c7b46864f45092f20ea", "score": "0.59375167", "text": "public function process()\n\t{\n\t\t$this->_init();\n\t\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\n\n\t\t$this->_handle_forms();\n\t\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\n\n\t\t$this->_pre_render();\n\t\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\n\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "e218326604fe9d990fa36376a4130f98", "score": "0.5937463", "text": "protected function render() {}", "title": "" }, { "docid": "31be1e5f96145c948d424907e30885ad", "score": "0.593607", "text": "function _render( $data )\n\t{\n\t\t$params = array(\n\t\t\t\t'data' => $data,\n\t\t\t\t'format' => 'htmlbody',\n\t\t\t);\n\n\t\t#echo '<hr margin=\"2ex 0\" />';\n\n\t\t#$before = $params['data'];\n\n\t\t$this->Plugin->RenderItemAsHtml( $params );\n\n\t\t#pre_dump( $before, $params['data'] );\n\n\t\treturn $params['data'];\n\t}", "title": "" }, { "docid": "bd71921536c135a23b8575951fdff1d7", "score": "0.5932942", "text": "public function render()\n {\n //Attempt to handle any `POST`ed data that may be arriving at the page controller. If _processPostRequest\n //returns true, then simply return because the user will be redirected\n if($_SERVER['REQUEST_METHOD'] === 'POST' && $this->_processPostRequest()) {\n return;\n }\n\n $this->_recordPageView('/app/');\n if (IS_PRODUCTION)\n {\n $this->_renderProduction();\n }\n else if (IS_STAGING)\n {\n $this->_renderStaging();\n }\n else if (IS_DEVELOPMENT || IS_REFERENCE)\n {\n $this->_renderNonProduction();\n }\n else\n {\n throw new \\Exception('Somehow you got into the page controller without setting the appropriate define.');\n }\n }", "title": "" }, { "docid": "b497e7903265920e7274ba3f162609f5", "score": "0.59106773", "text": "public function render($data);", "title": "" }, { "docid": "2c3ecd703a19a6fbb90eefbce1fbe687", "score": "0.5910639", "text": "public function onSinglePageLoaded(array &$pageData)\n {\n $this->triggerEvent('get_page_data', array(&$pageData, $pageData['meta']));\n }", "title": "" }, { "docid": "8aca34216e749fb937082071e568d7db", "score": "0.5908648", "text": "function beforeRender(){\n\t\t$this->recordActivity();\n\t}", "title": "" }, { "docid": "f46bc0dae36fc6c47a1ba85a958b02f2", "score": "0.5895403", "text": "abstract protected function renderComplete();", "title": "" }, { "docid": "27a7fbbfb667df8500d612a43f3187c2", "score": "0.5890063", "text": "public function preRender()\n {\n }", "title": "" }, { "docid": "2b53bafabf36b5dccc947043813557b6", "score": "0.58825797", "text": "abstract protected function RenderContent();", "title": "" }, { "docid": "b435c6100c8803916caae58ba6fd7055", "score": "0.5877018", "text": "public function before_render() {}", "title": "" }, { "docid": "8c0fecaff1c7dadf848da61c7d56eec6", "score": "0.5876451", "text": "function render_callback() {\n\t\t$callback = NULL === $this->render_callback\n\t\t\t? array( $this, 'render_page' )\n\t\t\t: $this->render_callback;\n\n\t\tcall_user_func( $callback, $this );\n\t}", "title": "" }, { "docid": "0c4e1edb1f33bf7af9d951e792f59167", "score": "0.5841998", "text": "protected function afterRender() {\n\t}", "title": "" }, { "docid": "5a0954e43ca772bead0d006e0bc12b09", "score": "0.5838147", "text": "function redcap_every_page_before_render($project_id=null) {\n global $DDP, $project_id, $realtime_webservice_type;\n try {\n $page = PAGE ?: false;\n switch ($page) {\n case 'DynamicDataPull/fetch.php':\n // check if we are using a FHIR enabled project\n if($realtime_webservice_type != \"FHIR\") throw new \\Exception(\"This service is only available for FHIR endpoints\", 1); // exit if not FHIR\n // use a proxy to intercept the MRN and run custom code. also pass a reference to the module\n $ddp_proxy = new DynamicDataPullProxy($project_id, $realtime_webservice_type, $module=$this);\n $DDP = $ddp_proxy;\n break;\n \n case 'DataMartController:runRevision':\n $params = (object)$_POST;\n $mrn = $params->mrn ?: false;\n if(!$mrn) throw new \\Exception(\"Please provide an MRN to check the MyChart status\", 400);\n $response = $this->fetchMyChartData($mrn);\n $data = json_decode($response); //decode the response\n $record_id = $this->findRecordId($project_id, $mrn);\n if(empty($record_id)) throw new \\Exception(\"Cannot save MyChart status: no record ID found\", 400);\n $this->setMyChartStatus($project_id, $record_id, $data);\n break;\n \n default:\n break;\n }\n } catch (\\Exception $e) {\n $message = $e->getMessage();\n $code = $e->getCode();\n \\Logging::logEvent( \"\", \"mychart_lookup\", \"OTHER\", $display=null, $code, $message );\n }\n }", "title": "" }, { "docid": "8d8e559d083bd87eafeacb6ef4cbb8e8", "score": "0.5820585", "text": "protected function render() {\n\t\t\n\t}", "title": "" }, { "docid": "572053bf746884eefc32bd7d54f802d7", "score": "0.58194965", "text": "public function renderPage(): void\n {\n $starttime = microtime(true);\n if (!$this->options->render_body_only) {\n ?>\n <!DOCUMENT <?= $this->options->document_type; ?>>\n <?php\n if ($this->options->uses_angular) {\n ?>\n <html lang=\"en\" ng-app>\n <?php\n } else {\n ?>\n <html lang=\"en\">\n <?php\n }\n ?>\n <?php\n $this->renderHead();\n $this->renderBody($starttime);\n ?>\n </html>\n <?php\n } else {\n $this->renderHead();\n ?>\n <script type=\"text/javascript\">\n <?php\n $this->renderCustomJS();\n ?>\n </script>\n <?php\n $this->renderContent();\n }\n }", "title": "" }, { "docid": "4eee339dc14ba4d5a4bff307c71bab5f", "score": "0.5817889", "text": "public function postPageGeneration(OutputObjectInterface $page);", "title": "" }, { "docid": "addf81c65fcf27bd1c36377e26933662", "score": "0.58098084", "text": "public function renderContent() {}", "title": "" }, { "docid": "a3be1518b2ac6a1e6501b66e51e844ca", "score": "0.58096135", "text": "public function onRun()\n {\n $this->page['categoryPage'] = $this->property('categoryPage');\n $this->page['categoryPageSlug'] = $this->paramName('categoryPageSlug');\n $this->page['categoriesPage'] = $this->property('categoriesPage');\n $this->page['categoriesPageSlug'] = $this->paramName('categoriesPageSlug');\n }", "title": "" }, { "docid": "2ebc0866c4c45a31dbe91f8992aa2a11", "score": "0.5786704", "text": "private function _page(){\n\t\t$this->data['recent_news'] = $this->article_m->get_recent();\n// \t\tdump(\"Welcome from the Page template\");\n\t}", "title": "" }, { "docid": "6ede7b3a0f1c983cf89fbda91d37fac0", "score": "0.57748544", "text": "function draw_page(){\n\t\tif ($this->preprocess()){\n\t\t\t\n\t\t\tif ($this->window_dressing)\n\t\t\t\techo $this->get_header();\n\n\t\t\t$fn = $this->content_function;\n\t\t\techo $this->$fn();\n\n\t\t\tif ($this->window_dressing)\n\t\t\t\techo $this->get_footer();\n\n\t\t\tforeach($this->scripts as $s_url => $s_type){\n\t\t\t\tprintf('<script type=\"%s\" src=\"%s\"></script>',\n\t\t\t\t\t$s_type, $s_url);\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$js_content = $this->javascript_content();\n\t\t\tif (!empty($js_content) || !empty($this->onload_commands)){\n\t\t\t\techo '<script type=\"text/javascript\">';\n\t\t\t\techo $js_content;\n\t\t\t\techo \"\\n\\$(document).ready(function(){\\n\";\n\t\t\t\tforeach($this->onload_commands as $oc)\n\t\t\t\t\techo $oc.\"\\n\";\n\t\t\t\techo \"});\\n\";\n\t\t\t\techo '</script>';\n\t\t\t}\n\n\t\t\t$page_css = $this->css_content();\n\t\t\tif (!empty($page_css)){\n\t\t\t\techo '<style type=\"text/css\">';\n\t\t\t\techo $page_css;\n\t\t\t\techo '</style>';\n\t\t\t}\n\t\t\tforeach($this->css_files as $css_url){\n\t\t\t\tprintf('<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">',\n\t\t\t\t\t$css_url);\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "19df50a2d6590e0bfdc0ea05d6bae34b", "score": "0.5764835", "text": "protected function render() {\n\n\n\t}", "title": "" }, { "docid": "2f12a2e0de0035b61f8c50b4d321a9f4", "score": "0.57633114", "text": "protected function setupPage() {}", "title": "" }, { "docid": "1dbe251f7ae25139243c2d0f7fc8a79c", "score": "0.5747946", "text": "protected function render()\n {\n }", "title": "" }, { "docid": "64ea038eccb555d0d56d2f0d52015a08", "score": "0.5747361", "text": "function _display($data) {\r\n\t\t// Customize by overriding this function in the child class\r\n\t\t$this->load->view('header', $data);\r\n\t\t$this->load->view('${page.id.toLowerCase()}', $data);\r\n\t\t$this->load->view('footer', $data);\r\n\t}", "title": "" }, { "docid": "1dbe251f7ae25139243c2d0f7fc8a79c", "score": "0.5747033", "text": "protected function render()\n {\n }", "title": "" }, { "docid": "1dbe251f7ae25139243c2d0f7fc8a79c", "score": "0.5747033", "text": "protected function render()\n {\n }", "title": "" }, { "docid": "1dbe251f7ae25139243c2d0f7fc8a79c", "score": "0.5746868", "text": "protected function render()\n {\n }", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.57449245", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "8ee1a60d986761ac9687218c8b52a04d", "score": "0.57440424", "text": "protected function executeRenderPostTransformHook() {}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.57439303", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" } ]
6254fd8a69dc52a4c571d175bcae999f
_getFullName method this method will creata a full name to the user.
[ { "docid": "a0880d74ae1f666f91a4921eca3c782c", "score": "0.7450094", "text": "protected function _getFullName()\n {\n return $this->_properties['first_name'] . ' ' . $this->_properties['last_name'];\n }", "title": "" } ]
[ { "docid": "108a3ec699b0e7d6e2d1430068eae9b7", "score": "0.7973666", "text": "public function getFullName(){\n\t\treturn $this->user->getFirstName().' '.$this->user->getLastName();\n\t}", "title": "" }, { "docid": "ca44c2671a189035091bb78e59bc9fce", "score": "0.7904046", "text": "public function getFullName()\n {\n \tif (!empty($this->firstName) && !empty($this->lastName)){\n\t\t return sprintf(\"%s %s\", ucfirst($this->firstName) , ucfirst($this->lastName));\n\t }\n\t \n\t return (string) $this->username;\n }", "title": "" }, { "docid": "baf2388fa03b13a22f1843311cec731d", "score": "0.7848315", "text": "public function getFullName(){\r\n $full_name = $this->firstName.' '.$this->lastName;\r\n return trim($full_name) ? trim($full_name) : $this->getUsername();\r\n }", "title": "" }, { "docid": "2a52c76dce0168c8c4efd8c547b0bf5a", "score": "0.7712556", "text": "public function getFullName( ){\n if ( $this->verbose ) echo __METHOD__ . \"\\n\";\n if ( empty( $this->userData['fName'] ) && empty( $this->userData['mName'] ) && empty( $this->userData['lName'] ) ){ return false; }\n $fullName = $this->userData['fName'] . \" \";\n if ( empty( $this->userData['mName'] )){\n $fullName .= $this->userData['lName'];\n return $fullName;\n }\n $fullName .= $this->userData['mName'] . \" \" . $this->userData['lName'];\n return $fullName;\n }", "title": "" }, { "docid": "64300df9312070dfcb33d9e78664cf3c", "score": "0.76136446", "text": "public function getFullname()\n {\n \n }", "title": "" }, { "docid": "d3d860615dd90fa63b44a53bc545c6a7", "score": "0.7612304", "text": "public function userFullname() {\n return $this->fullname();\n }", "title": "" }, { "docid": "fe76d859b16afb2e6b2a85a95bfb5a6b", "score": "0.75969744", "text": "public function getFullName(){\r\n return \"{$this->firstname} {$this->surname}\";\r\n }", "title": "" }, { "docid": "51eb70ef93c7410012cc970d94fb8898", "score": "0.7561074", "text": "public function getFullName()\n {\n\n if ($this->firstName == null || $this->lastName == null) {\n return $this->username;\n }\n\n $fullName = $this->firstName . ' ' . $this->lastName;\n\n return $fullName;\n }", "title": "" }, { "docid": "3cb3d7c90c6412be77c1eb24886df0cb", "score": "0.74802446", "text": "public function full_name(){\n return $this->first_name .\" \". $this->last_name ;\n }", "title": "" }, { "docid": "5328bef963e72bbe9affc892ab83dc03", "score": "0.7467484", "text": "public function authUserFullName() {\n\t\treturn Auth::user()->firstname . ' ' . Auth::user()->lastname;\n\t}", "title": "" }, { "docid": "560b90e1de191a9b772a06af8cda7858", "score": "0.7458912", "text": "public function getFormattedFullName()\n\t{\n\t\tif (!empty($this->getFirstName()) && !empty($this->getLastName())){\n\t\t\treturn sprintf(\"%s.%s\", ucfirst($this->getFirstName()) , ucfirst($this->getLastName()[0]));\n\t\t}\n\t\t\n\t\treturn (string) $this->getUsername();\n\t}", "title": "" }, { "docid": "fd9843cd2a1210ce902c335aec83eba9", "score": "0.74152666", "text": "public abstract function fullName();", "title": "" }, { "docid": "337f7a2eeaa302187e626d563564f264", "score": "0.7408665", "text": "public function getFullName(){\n return $this->firstname.' '.$this->lastname;\n }", "title": "" }, { "docid": "90331681bd5ac2239f92cc2981e23a5e", "score": "0.73789126", "text": "public function full_name(){\n\t\tif (isset($this->first_name) && isset($this->last_name)) {\n\t\t\t\treturn $this->first_name.\" \".$this->last_name; \n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "a87ad364c79086f59bfb13e6da68ce10", "score": "0.7333211", "text": "public function getFullName()\r\n {\r\n return $this->getFirstname() . ' ' . $this->getLastname();\r\n }", "title": "" }, { "docid": "761f98dab881892af24191a6accabf69", "score": "0.73251534", "text": "function _form_usr_fullname($usr_info=null) {\n \n $USR_FULL_NAME = '';\n if( !empty($usr_info) ) {\n \n $USR_FULL_NAME = ucfirst($usr_info['s_fname']);\n $USR_FULL_NAME .= ( !empty($usr_info['s_lname']) )? ' '. ucfirst($usr_info['s_lname']): '';\n }\n \n return $USR_FULL_NAME;\n }", "title": "" }, { "docid": "220e8ce5068ed2425c3b4fcb71769cce", "score": "0.73096466", "text": "public function getUserFullNameAttribute()\n {\n return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'];\n }", "title": "" }, { "docid": "9ede23dfcf917f8abb2c894d7ebc3bbe", "score": "0.7307491", "text": "public function getFullName()\n {\n $nickname = $this->getNickname();\n\n return $this->firstname. (!empty($nickname) ? ' \"'.$nickname.'\" ': ' ').$this->lastname;\n }", "title": "" }, { "docid": "eb39bb2e36a096d431613c80cc0d8c22", "score": "0.7297678", "text": "protected function getFullname(){\n\t\treturn $this->firstname.\" \".$this->lastname.PHP_EOL;\n\t}", "title": "" }, { "docid": "0b41bc0e8279b4c856f6e2b059c7a2ed", "score": "0.7289682", "text": "public function getFullname()\n {\n return $this->firstname.' '.$this->lastname;\n }", "title": "" }, { "docid": "0b83324a9dbdaf8a2c92bf9eed615c1f", "score": "0.7266576", "text": "public function getFullName()\n {\n return $this->get('first_name') . ' ' . $this->get('last_name');\n }", "title": "" }, { "docid": "1621062bcbff1a3a3fccd596b01c6dac", "score": "0.7223102", "text": "public function getFullName()\n {\n return \"{$this->surname} {$this->name} {$this->middle_name}\";\n }", "title": "" }, { "docid": "1dd0ce7c519fa78c39abe917a1a8d3bd", "score": "0.72229576", "text": "public function full_name() {\r\n\t\tif(isset($this->first_name) && isset($this->last_name)) {\r\n\t\t\treturn $this->first_name . \" \" . $this->last_name;\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "40bbfa277468441d28c1f4897e8e272d", "score": "0.72178906", "text": "public function getFullName()\n {\n return $this->getFirstname() . ' ' . $this->getLastname();\n }", "title": "" }, { "docid": "40bbfa277468441d28c1f4897e8e272d", "score": "0.72178906", "text": "public function getFullName()\n {\n return $this->getFirstname() . ' ' . $this->getLastname();\n }", "title": "" }, { "docid": "5aea0788776badb40e2bcda7fc0f160c", "score": "0.7215795", "text": "public function getFullNameAttribute()\n {\n return $this->user->firstname.' '.$this->user->lastname;\n }", "title": "" }, { "docid": "e63b93099fc305237edbe4242702a0d2", "score": "0.721498", "text": "public static function getUserFullName(){\t\n\t\tif(is_user_logged_in()){\n\t\t\t$current_user = get_currentuserinfo();\n\t\t\t\t$firstname = $current_user->user_firstname;\n\t\t\t\t$lastname = $current_user->user_lastname;\n\t\t\t$display_name = $firstname .' '. $lastname;\n\t\t\treturn $display_name;\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a7b7d9b0da68b15f8a8f966bc52e8a6f", "score": "0.72125274", "text": "public function getFullName() : string\n {\n return $this->first_name . ' '\n . ($this->middle_name ? \"$this->middle_name \" : '')\n . $this->last_name;\n }", "title": "" }, { "docid": "7c5ac8ba1b39bb406f60d2d1c7707106", "score": "0.7195021", "text": "public function getFullName() {\n if($this->name != null || $this->surname!=null) {\n return $this->name . \" \" . $this->surname;\n } else {\n return $this->email;\n }\n }", "title": "" }, { "docid": "6fad09b6f4e1f28b83da2d318cc795e7", "score": "0.7183262", "text": "public function getFullName(){\n \n $fullName = $this->firstName . ' ' . $this->lastName;\n \n return $fullName;\n }", "title": "" }, { "docid": "0ca23181afbeef1914120c8a542bdb03", "score": "0.71825975", "text": "public function getFullNameAttribute() {\n\t\treturn ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);\n\t}", "title": "" }, { "docid": "884fb193aee1b5862bdd13ba2c2fa35d", "score": "0.71795535", "text": "static function getFullname ( $userData )\r\n {\r\n\t\t$fullname = '';\r\n\t\t\r\n\t\tif ( $userData->isLoaded() )\r\n\t\t{\r\n\t\t\t$fullname = !empty($userData->name) ? $userData->name : null;\r\n\t\t\tif ( !empty($userData->name) && !empty($userData->surname) )\r\n\t\t\t{\r\n\t\t\t\t$fullname .= ' ';\r\n\t\t\t}\r\n\t\t\t$fullname .= !empty($userData->surname) ? $userData->surname : null;\r\n\t\t}\r\n\t\t\r\n\t\treturn $fullname;\r\n }", "title": "" }, { "docid": "bb2f3a7dcd74afc078851752b94a4b24", "score": "0.7178446", "text": "public function getFullNameAttribute()\n {\n return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);\n }", "title": "" }, { "docid": "4b1a977897f6f19609d955ce915c181d", "score": "0.71661884", "text": "public function getFullName() {\n $firstname = $this->firstname;\n $lastname = $this->lastname;\n return $lastname . ' ' . $firstname;\n }", "title": "" }, { "docid": "80d7a762e26a5a8224c4cbb099e9accf", "score": "0.7151312", "text": "public function getFullName()\n {\n return \"{$this->name} {$this->lastname} {$this->second_lastname}\";\n }", "title": "" }, { "docid": "772be4aa4785ed4372186a81a081b1a3", "score": "0.7144981", "text": "public function getFullName() {\n return $this->lastName . ' ' . $this->firstName;\n }", "title": "" }, { "docid": "52c4458bedc57311241e754c76fe60db", "score": "0.7130986", "text": "public function getFullName()\n {\n return $this->getFirstName() . ' ' . $this->getLastname();\n }", "title": "" }, { "docid": "52c4458bedc57311241e754c76fe60db", "score": "0.7130986", "text": "public function getFullName()\n {\n return $this->getFirstName() . ' ' . $this->getLastname();\n }", "title": "" }, { "docid": "d5a05f356d4f15b2601800fa230a1095", "score": "0.712466", "text": "public function getFullName()\n\t {\n logger()->info(__METHOD__);\n if($fullname = $this->first_name . ' ' . $this->last_name){\n throw new Exception();\n }\n\t \treturn $fullname; \n\t // $profile = $this->entity->profile;\n\t // if (! is_null($profile) && ! empty($profile->name)) {\n\t // return $profile->name;\n\t // }\n\t // return $this->entity->username;\n\t }", "title": "" }, { "docid": "3d3c17de461ff52662536e3a55c225fe", "score": "0.71246415", "text": "public function getFullName()\n {\n return trim(\"$this->first_name $this->surname\");\n }", "title": "" }, { "docid": "15e524e6eb092286a87817f5cc0ee597", "score": "0.71112555", "text": "protected function updateFullName()\n {\n //====================================================================//\n // Stack Trace\n Splash::log()->trace();\n //====================================================================//\n // Get Current Values if Not Written\n $currentName = $this->decodeFullName($this->object->name);\n if (empty($this->firstName) && !empty($currentName[\"firstname\"])) {\n $this->firstName = $currentName[\"firstname\"];\n }\n if (empty($this->lastName) && !empty($currentName[\"lastname\"])) {\n $this->lastName = $currentName[\"lastname\"];\n }\n if (empty($this->companyName) && !empty($currentName[\"name\"])) {\n $this->companyName = $currentName[\"name\"];\n }\n //====================================================================//\n // No First or Last Name\n if (empty(trim($this->firstName)) && empty(trim($this->lastName))) {\n $this->setSimple(\"name\", $this->companyName);\n\n return;\n }\n //====================================================================//\n // Encode Full Name String\n $encodedFullName = $this->encodeFullName($this->firstName, $this->lastName, $this->companyName);\n $this->setSimple(\"name\", $encodedFullName);\n }", "title": "" }, { "docid": "d7d6fd0dc686817dc4df34b92be024c0", "score": "0.7104024", "text": "public function getFullname()\n {\n return $this->fullname;\n }", "title": "" }, { "docid": "9086048562bd2bc027a7bb6dd56b5fd5", "score": "0.7103031", "text": "public static function user_full_name() {\n global $USER;\n $user = $USER;\n $ismasquerading = manager::is_loggedinas();\n\n if ($ismasquerading) {\n $usereal = get_config('local_analytics', 'masquerade_handling');\n if ($usereal) {\n $user = manager::get_realuser();\n }\n }\n\n $realname = fullname($user);\n return $realname;\n }", "title": "" }, { "docid": "b30705943ae6562d1a72a7089e127252", "score": "0.70671827", "text": "public function setFullName($value){\n if(is_string($value)){\n $this->full_name = $value;\n }\n }", "title": "" }, { "docid": "4fb10a8cf077a847ae667c5e2d2be923", "score": "0.70423067", "text": "public function getFullNameAttribute()\n {\n return sprintf(\"%s %s\", $this->first_name, $this->last_name);\n }", "title": "" }, { "docid": "74b7495a18816721599003a4c218163d", "score": "0.70391136", "text": "public function get_fullname()\n {\n return self::fullname($this->get_firstname(), $this->get_lastname());\n }", "title": "" }, { "docid": "2f9193745bafff223654d7d3e7c2d4aa", "score": "0.7036912", "text": "public function getFullname() {\n return $this->fullname;\n }", "title": "" }, { "docid": "ab8043678668e4265c11458b2e666c68", "score": "0.70285845", "text": "public function getFullNameAttribute(){\n $full_name = $this->first_name . \" \" . $this->last_name ;\n return $full_name;\n }", "title": "" }, { "docid": "12dcd29e40d22d9d8f39460c9caf7e4b", "score": "0.6998786", "text": "public function getFullname()\n\t{\n\t\treturn $this->fullname;\n\t}", "title": "" }, { "docid": "5ae3c5fa439d8799951483ed06fd9798", "score": "0.6993718", "text": "public function Get_Full_Name()\n {\n return $this->First_Name . \" \" . $this->Last_Name;\n }", "title": "" }, { "docid": "d6864a4055fc9e45bd45349e0848202c", "score": "0.6993314", "text": "public function getFullName()\n\t{\n\t\t$firstName = trim($this->firstName);\n\t\t$lastName = trim($this->lastName);\n\n\t\treturn $firstName.($firstName && $lastName ? ' ' : '').$lastName;\n\t}", "title": "" }, { "docid": "373edc732af4dfd570ebbded30b65533", "score": "0.6992719", "text": "public function fullname($user){\r\n return $user->first_name.(isset($user->last_name)?\" \".$user->last_name:\"\");\r\n }", "title": "" }, { "docid": "3e69af68a89e054d8d2de76435728fa9", "score": "0.69899666", "text": "public function getFullNameAttribute()\n {\n return ucwords($this->first_name) .' '. ucwords($this->last_name);\n }", "title": "" }, { "docid": "51b6f707a91dbb3f59fb4f594e658fef", "score": "0.6966035", "text": "public function getFullNameAttribute()\n {\n return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'];\n }", "title": "" }, { "docid": "0a94052c4d4e12e9b1d1796789a9813e", "score": "0.6960084", "text": "public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }", "title": "" }, { "docid": "0a94052c4d4e12e9b1d1796789a9813e", "score": "0.6960084", "text": "public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }", "title": "" }, { "docid": "0a94052c4d4e12e9b1d1796789a9813e", "score": "0.6960084", "text": "public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }", "title": "" }, { "docid": "0a94052c4d4e12e9b1d1796789a9813e", "score": "0.6960084", "text": "public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }", "title": "" }, { "docid": "f45ee4aa3392cf63d7425fbe474ae656", "score": "0.6958541", "text": "public function getFullNameAttribute() {\n return $this->first_name . ' ' . $this->last_name;\n }", "title": "" }, { "docid": "9fcd67a3084150a9c5c08f541a4236d4", "score": "0.6955413", "text": "public function getFullname()\n {\n return $this->name. ' - '. $this->getSpeaker()->getFullname();\n }", "title": "" }, { "docid": "2e0b4a5f8e24bb8032cfe5016ce03afb", "score": "0.69524556", "text": "public function getFullNameAttribute()\n {\n return $this->first_name . ' ' . $this->last_name;\n }", "title": "" }, { "docid": "2e0b4a5f8e24bb8032cfe5016ce03afb", "score": "0.69524556", "text": "public function getFullNameAttribute()\n {\n return $this->first_name . ' ' . $this->last_name;\n }", "title": "" }, { "docid": "fd15172e69c72502db86f185ff1a906c", "score": "0.6944636", "text": "public function getFullNameAttribute()\n {\n return $this->first_name.' '.$this->last_name;\n }", "title": "" }, { "docid": "8f972b3202e795ff721eb6fcf04571a7", "score": "0.6940451", "text": "public function getFullNameAttribute()\n {\n if(!$this->profile) return null;\n return ($this->profile->first_name) ? $this->profile->first_name . ' ' . $this->profile->last_name : $this->profile->company_name;\n }", "title": "" }, { "docid": "c1b49fa8aeb84ccba83196e55ae11277", "score": "0.69343144", "text": "public function getFullName()\n {\n return $this->fullName;\n }", "title": "" }, { "docid": "fee30bf2a3b6402eb6a9c0fef9772ce3", "score": "0.6933014", "text": "public function getFullNameAttribute()\n {\n return \"{$this->name} {$this->last_name}\";\n }", "title": "" }, { "docid": "b68f1f6088cd520cbf40e21b613779a9", "score": "0.6927592", "text": "public function getFullNameAttribute()\n {\n if ($this->last_name) {\n return \"{$this->first_name} {$this->last_name}\";\n }\n\n return \"{$this->first_name}\";\n }", "title": "" }, { "docid": "460116f31593f76eb442c8ad051f03eb", "score": "0.69157666", "text": "public function getFullNameAttribute()\n {\n return $this->first_name . ' ' . $this->middle_name . ' ' . $this->last_name;\n }", "title": "" }, { "docid": "e52fd0c6f8b8eb0fa8551ffb18543b13", "score": "0.6907516", "text": "private function getFullName( array &$attributes ) {\n\t\t$nameKey = array_search($this->model() . '.user_fullname', $attributes);\n\n\t\tif ( $nameKey != false ) {\n\t\t\t$attributes[$nameKey] = DB::raw(\"CONCAT(\" . $this->model() . \".user_firstname, ' ', \" . $this->model() . \".user_lastname) `user_fullname`\");\n\t\t}\n\t}", "title": "" }, { "docid": "8020716accdf4b968fe1c9dd68a9a032", "score": "0.69073445", "text": "public function fullName()\n {\n return $this->first_name . ' ' . $this->last_name;\n }", "title": "" }, { "docid": "bf4fe0361b8eacf7f5f8d0098f2a0d0e", "score": "0.68913805", "text": "public function getFullNameAttribute(): string\n {\n return $this->first_name . ' ' . $this->last_name;\n }", "title": "" }, { "docid": "a6cc8d489a02522ab657ca3d614f767a", "score": "0.68729573", "text": "function complete_name():string{\n return $this->lastname.\" \".$this->firstname ;\n }", "title": "" }, { "docid": "b75b9ff4fd5813907584738f9127e55d", "score": "0.68708503", "text": "public function getFullNameAttribute()\n {\n $profileData = isset($this->profile) ? $this->profile->data:[];\n if (is_array($profileData)) {\n $first_name = (array_key_exists('first_name',$profileData)) ? $profileData['first_name'] : '';\n $last_name = (array_key_exists('last_name',$profileData)) ? $profileData['last_name'] : '';\n return trim(\"{$first_name} {$last_name}\");\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "06ffa697ff9e4793b20c2c30b02cbd29", "score": "0.6869545", "text": "public function getFullName()\n {\n $space = ' ';\n\n return $this->getFirstname() . $space . $this->getLastname();\n }", "title": "" }, { "docid": "8f8d17c69df79cb6aedfcf81044cbd87", "score": "0.68615544", "text": "public function getDisplayName() {\n if (empty($this->user['fullname'])) {\n return $this->user['username'];\n\n } else {\n return $this->user['fullname'];\n }\n }", "title": "" }, { "docid": "11d850b88faa85fd867432906beb8dc7", "score": "0.685524", "text": "public function getFullName()\n {\n $fullName = $this->getFirstName();\n\n if ($this->has('last_name'))\n $fullName .= ' '.$this->getLastName();\n\n return $fullName;\n }", "title": "" }, { "docid": "c022e1f3989bab55acca04e00eca1f0a", "score": "0.6853324", "text": "public function getFullName() {\n return $this->fullName;\n }", "title": "" }, { "docid": "57c96b1da5e113555f5ed1e0069bcc49", "score": "0.67983097", "text": "public function getFullNameAttribute()\n {\n $fullName=CustomHelper::getAdminConstants($this->id, 'full_name');\n return ($fullName != \"\") ? $fullName : NULL;\n }", "title": "" }, { "docid": "3495a4f6f2e5bf2a5a3c6250924cf1e0", "score": "0.6793594", "text": "function get_user_fullname($user_id = \"\")\n{\n $data = get_user_data($user_id);\n\n return $data['first_name'] . \" \" . $data['last_name'];\n}", "title": "" }, { "docid": "a96fdb604e7362fb02b4ff295bb607e5", "score": "0.6787529", "text": "public function getFullNameWithEmail()\n {\n return $this->firstName . ' ' . $this->lastName . ' (' . $this->email . ')';\n }", "title": "" }, { "docid": "143f313204bd61edd2678a4bd9171b76", "score": "0.67873406", "text": "public function getFullName()\n {\n return $this->_fullName;\n }", "title": "" }, { "docid": "a38b91693d356dbade8d3214b30024db", "score": "0.67858845", "text": "public function getFullNameAttribute(): string\n {\n return implode(' ', array_filter([$this->first_name, $this->last_name]));\n }", "title": "" }, { "docid": "e80de8589b573de27d61bea7ccf9649f", "score": "0.6779771", "text": "public function getFullNameAttribute() {\n\n return $this->name . ' ' . $this->surname;\n }", "title": "" }, { "docid": "a6c9068ebf2e2cce448b017748c85d34", "score": "0.67696595", "text": "public function getFullName()\n {\n return trim($this->fullName);\n }", "title": "" }, { "docid": "a4df5fd9fdb8485393455ec1bf45f0ba", "score": "0.67683786", "text": "public function getFullName() {\n\t\treturn $this->fullName;\n\t}", "title": "" }, { "docid": "41097064e94d81262c3bc3784b97031c", "score": "0.6760152", "text": "public function getFullName()\n {\n return $this->name . ' ' . $this->family;\n }", "title": "" }, { "docid": "e5c20906eb8b5fba833652ba72c8593c", "score": "0.67523074", "text": "public function getFullNameAttribute()\n\t{\n\t\treturn $this->firstname . ' ' . $this->lastname;\n\t}", "title": "" }, { "docid": "98ace2ae5fc37930bc576f97c0691da1", "score": "0.67362165", "text": "public static function get_name(){\n $User = User::get_user_info();\n $UserID = $User->UserID;\n $User = User::retrieve_user($UserID);\n return $User[\"First_Name\"] . \" \" . $User[\"Last_Name\"];\n }", "title": "" }, { "docid": "14e2c945db48d75936176963da8f73f4", "score": "0.6733791", "text": "public function getfullname()\n {\n return $this->fullname;\n }", "title": "" }, { "docid": "72a1ef2f3a295366b76e391029c0b2fe", "score": "0.6731241", "text": "public function setFullName($fullName)\n {\n $this->fullName = $fullName;\n }", "title": "" }, { "docid": "ccb36676167ae1bb8966316450f842dc", "score": "0.67057115", "text": "public function getFullNameAttribute()\n {\n $full_name = $this->name.' '.$this->last_name;\n return Str::limit($full_name,25);\n }", "title": "" }, { "docid": "89b2df061f5969e5678e153860cab0f8", "score": "0.6688322", "text": "public function getFullnameAttribute()\n {\n return trim($this->firstname) . \" \" . trim($this->lastname);\n }", "title": "" }, { "docid": "5c4b5f79ada9e638c2ed78da0dc6f4a1", "score": "0.6683156", "text": "public function get_full_name()\n\t{\n\t\treturn $this->_path . DS . $this->_name;\n\t}", "title": "" }, { "docid": "c82932c4a32973c5d9c3ccfc52cf7626", "score": "0.6665783", "text": "public function getFullNameAttribute()\n {\n return $this->given_names . ' ' . $this->surname;\n }", "title": "" }, { "docid": "d7edeafba3dd1b7c3744341368b81d97", "score": "0.6613892", "text": "public function getFullName()\n\t{\n\t\t$aPartsFullName = array();\n\n\t\t!empty($this->surname) && $aPartsFullName[] = $this->surname;\n\t\t!empty($this->name) && $aPartsFullName[] = $this->name;\n\t\t!empty($this->patronymic) && $aPartsFullName[] = $this->patronymic;\n\n\t\treturn implode(' ', $aPartsFullName);\n\t}", "title": "" }, { "docid": "1c7683f4711304622d542358ed903eed", "score": "0.65787905", "text": "public function fullName()\n {\n return $this->entity->first_name . ' ' . $this->entity->last_name;\n }", "title": "" }, { "docid": "c908aa2f3e11fe9d57a69ec1c0e3552f", "score": "0.6539839", "text": "function getNameForUser($user = false) {\n\t\tglobal $hyphaUser;\n\t\tif ($user === false)\n\t\t\t$user = $hyphaUser;\n\t\tif (!$user)\n\t\t\treturn __('anonymous');\n\t\treturn $user->getAttribute('fullname') ?: $user->getAttribute('username') ?: $user->getAttribute('email');\n\t}", "title": "" }, { "docid": "19e88ee5f8351b81611d0a790f46fd2c", "score": "0.6534116", "text": "public function setUserFullName(){\n \tif ($this->loggedin) {\n \t\tswitch ($this->pageID) {\n\t \t\tcase 'process_login':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'home':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'leaderboard':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'my_account':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'new_game':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'play':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tdefault:\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t}\n \t}\n }", "title": "" }, { "docid": "2118a9f38a04748c5fd9024c515f1c3d", "score": "0.65179765", "text": "public function getFullName()\n {\n return $this->lowerVendor.'/'.$this->lowerName;\n }", "title": "" }, { "docid": "0d268d58af0b4597291ae976de686394", "score": "0.6516592", "text": "function getUserFullName($user) {\n\t$name = null;\n\t$user = User::getDataArray($user);\n\tif ($user) {\n\t\t$name = '';\n\t\tif (isset($user['name']) && is_scalar($user['name'])) {\n\t\t\t$name = trim($user['name']);\n\t\t}\n\t\tif (isset($user['surname']) && is_scalar($user['surname'])) {\n\t\t\t$name .= ' '.trim($user['surname']);\n\t\t}\n\t\t$name = trim($name);\n\t\tif ($name == '' && isset($user['username']) && is_scalar($user['username'])) {\n\t\t\t$name = trim($user['username']);\n\t\t}\n\t}\n\treturn $name;\n}", "title": "" } ]
56559872530cc4c0794e7a719683cf0c
USADO PARA STATUS LEITURA EM PAG ANALISE
[ { "docid": "6655986950cf342e91b8f44a2630da58", "score": "0.0", "text": "public function recuperarFimLeitura($doc_id, $user_id = null)\n\n\t\t{ \t \n\t\t\t$user_id = (is_null($user_id)) ? auth()->id() : $user_id;\t\n\n\t\t\t$Acesso_fimLeitura = $this->where('doc_id', $doc_id)\n\t\t\t->where('tipo_id', 2)\n\t\t\t->where('user_id', $user_id)\n\t\t\t->orderBy('created_at', 'desc')\n\t\t\t->first();\n\n\n\t\t\tif(!is_null($Acesso_fimLeitura)){\n\n\t\t\t\t$horarioFimLeitura = $Acesso_fimLeitura->created_at;\n\t\t\t\treturn $horarioFimLeitura;\n\t\t\t}\n\n\n\t\t\treturn null;\n\n\t\t}", "title": "" } ]
[ { "docid": "226030e08b12da7e9b2c12d53af6577f", "score": "0.6955129", "text": "public function getStatus(){\n \n \t \n \tif(! $this->isVigente())\n \t\treturn $this->statusDescription[Plan::STATUS_CONCLUIDO];\n \t \n \t \n \tif ($this->DOCUMENTO_APROBATORIO === null) return $this->statusDescription[Plan::STATUS_CREADO];\n \telse return $this->statusDescription[Plan::STATUS_VALIDADO];\n \n }", "title": "" }, { "docid": "c46f657f2c072004d02a22c98b027bf6", "score": "0.67780817", "text": "public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.6501368", "text": "function getStatus() ;", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.65011007", "text": "function getStatus() ;", "title": "" }, { "docid": "6cbe5732d34f5a2b1c7cc18bc9747867", "score": "0.65011007", "text": "function getStatus() ;", "title": "" }, { "docid": "839aad5b1b4cbc09575a842ca7bca7d4", "score": "0.6494078", "text": "public function getCurrentStatus(){\n \n \n \tif(! $this->isVigente())\n \t\treturn Plan::STATUS_CONCLUIDO;\n \n \n \tif ($this->DOCUMENTO_APROBATORIO === null) return Plan::STATUS_CREADO;\n \telse return Plan::STATUS_VALIDADO;\n \n }", "title": "" }, { "docid": "1c0a519009fb56919efcd2f687a0502b", "score": "0.6483854", "text": "function getStato($row){\n\n\tif($row->imp_made == $row->imp_total){\n\t\treturn BANNER_TERMINATO;\n\t}\n\n\t$iRet = BANNER_NON_PUBBLICATO;\n\n\tif($row->state == '1'){\n\n\t\t$now = mosCurrentDate(\"%Y-%m-%d\");\n\t\t$time = mosCurrentDate(\"%H:%M:%S\");\n\n\t\tif($now < $row->publish_up_date){\n\t\t\t$iRet = BANNER_IN_ATTIVAZIONE;\n\t\t} else\n\t\t\tif($now == $row->publish_up_date && $time < $row->publish_up_time){\n\t\t\t\t$iRet = BANNER_IN_ATTIVAZIONE;\n\t\t\t} else\n\t\t\t\tif($now < $row->publish_down_date || $row->publish_down_date == '0000-00-00'){\n\n\t\t\t\t\t$iRet = BANNER_ATTIV0;\n\t\t\t\t\tif($row->publish_down_time < $time && $row->publish_down_time != '00:00:00'){\n\t\t\t\t\t\t$iRet = BANNER_TERMINATO;\n\t\t\t\t\t}\n\n\t\t\t\t} else\n\t\t\t\t\tif($now == $row->publish_down_date && ($time <= $row->publish_down_time || $row->publish_down_time == '00:00:00')){\n\t\t\t\t\t\t$iRet = BANNER_ATTIV0;\n\t\t\t\t\t} else\n\t\t\t\t\t\tif($now >= $row->publish_down_date){\n\t\t\t\t\t\t\t$iRet = BANNER_TERMINATO;\n\t\t\t\t\t\t}\n\t}\n\treturn $iRet;\n}", "title": "" }, { "docid": "5556b4ec085d8937e3fb7489f27a54cf", "score": "0.64268875", "text": "public function getStatusPuasa()\n\t{\n\t\t$a=$this->m_puasa->getStatusPuasa();\n\t\t$b = array('statusPuasa' => $a);\n\t\techo json_encode($b);\n\t}", "title": "" }, { "docid": "8008eca20bee944df5bc76b6688d0f29", "score": "0.63970375", "text": "abstract public function getStatus();", "title": "" }, { "docid": "ab466b84faa9c79c552467f6e2ca6642", "score": "0.62922955", "text": "public function retornoAtivacao(){\r\n\r\n\t if(isset($_GET['ccid'])){\r\n\t $ccid = $_GET['ccid'];\r\n\t }\r\n\t\tif(isset($_GET['apikey'])){\r\n\t\t\t$api_key = $_GET['apikey'];\r\n\t\t}\r\n\t\tif(isset($_GET['status'])){\r\n\t\t if($_GET['status'] == 'falha'){\r\n\t\t\t $status = 'N'; // não ativado\r\n\t\t\t $motivo = $_GET['motivo'];\r\n\t\t }else{\r\n\t\t $status = 'A'; // ativado\r\n\t\t\t $motivo = null;\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\t$resultado = $this->dao->atualizaStatusAtivacao($ccid,$status,$api_key,$motivo);\r\n\t\t\r\n\t\treturn $resultado;\r\n\t}", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.6257168", "text": "public function getStatus();", "title": "" }, { "docid": "7c055427df72d622a1fa08c0ace267bb", "score": "0.61871505", "text": "function siguienteEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_SIGAV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "bb28ee3790d97c4d967d96057b828679", "score": "0.6186483", "text": "public function getStatusAto()\n {\n return $this->status_ato;\n }", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.61860895", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.61860895", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.61860895", "text": "public function status();", "title": "" }, { "docid": "54dc666160b933cab0971cd00529f26d", "score": "0.6167752", "text": "function anteriorEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_ANTV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('estado_destino', 'estado_destino', 'varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "1869fa791adf7f41954bacee528589b0", "score": "0.61546934", "text": "public function get_status()\n {\n }", "title": "" }, { "docid": "1869fa791adf7f41954bacee528589b0", "score": "0.61546934", "text": "public function get_status()\n {\n }", "title": "" }, { "docid": "e7bcd94acd9b9ef2c716b64db3e0bafd", "score": "0.61473197", "text": "public function status()\n {\n $query = \"\n call sp_campanha_status(\n ? # campanha\n ,@1\n ,@2\n );\";\n $params = array(\n $this->id_campanha\n );\n $retorno = $this->getAdapter()\n ->query($query, $params)\n ->fetch();\n\n return $retorno['status'];\n }", "title": "" }, { "docid": "3460e82175d8d3439f169013f872d511", "score": "0.61312246", "text": "function getStatus(){\n $this->status = 'Unknown';\n if($this->finAid == 1 && $this->totalOwed != 0){\n if($this->finaidQuestion[1] == ''){\n $this->status = 'Waiting for finaid application';\n return;\n }else{\n $this->status = 'Waiting for finaid decision';\n return;\n }\n }\n if($this->schoolFeeOwed != 0){\n $this->status = 'Waiting for school fee payment';\n return;\n }\n if($this->countryId[1] == 0){\n $this->status = 'Waiting for country preferences';\n return;\n }\n if($this->countryId[1] != 0 && $this->countryConfirm != 1){\n $this->status = 'Waiting for country assignments';\n return;\n }\n if($this->delegateFeeOwed != 0){\n $this->status = 'Waiting for delegate fee payment';\n return;\n }\n if(sizeof($this->attendees) == 0){\n $this->status = 'Waiting for attendee info';\n return;\n }\n if($this->totalOwed < 0){\n $this->status = 'Need Refund';\n return;\n }\n if(sizeof($this->attendees) == $this->totalAttendees && $this->totalOwed == 0){\n $this->status = 'Ready';\n return;\n }\n }", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.61122787", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.6112191", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.6112191", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.6112191", "text": "public function getStatus() {}", "title": "" }, { "docid": "79cdc55c5025518a39c3400d64cb9960", "score": "0.6112191", "text": "public function getStatus() {}", "title": "" }, { "docid": "cc376d61630320dfe53434373fdc57e8", "score": "0.61081296", "text": "public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\t}", "title": "" }, { "docid": "89a6a6cd94e180f02d04fe0b58558c62", "score": "0.61038935", "text": "function getStatus() {\n \t\n \t$status = array();\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_contacter'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"to_contact\"] = $result['num_contact'];\n\n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'contacte'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"contacted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_rappeler'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"call_back\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'termine'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"deleted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_motif FROM mp_activation_motifs\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n\n $status[\"number_motif\"] = $result['num_motif'];\n \n \n return $status;\n }", "title": "" }, { "docid": "e56bda925b16737fb3943078e22b1f71", "score": "0.6100064", "text": "function anteriorEstadoPresupuesto(){\n $this->procedimiento='pre.ft_presupuesto_ime';\n $this->transaccion='PR_ANTEPR_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('obs','obs','varchar');\n\t\t$this->setParametro('estado_destino','estado_destino','varchar');\n\t\t\n\t\t\n\t\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "00e7872bd88462f965f2354a2de5c6fc", "score": "0.6059581", "text": "function get_status_progression( $id_parcours) {\n\n\tglobal $wpdb;\n\n\t$completed = 0;\n\n\t$episodes = get_field('episodes' , $id_parcours);\n\n\t$episodes_number = count($episodes);\n\t// init the array to be returned\n\t$progress_ar = [];\n\n\t$id_user = get_current_user_id();\n\n\t$rowcount = $wpdb->get_var(\"SELECT COUNT(*) FROM tracking WHERE id_user = $id_user AND id_parcours = $id_parcours\");\n\n\t$achieved = $rowcount;\n\t\n\tif($achieved == $episodes_number) {\n\t\t$completed = 1;\n\t}\n\n\n\t$percent = round(($achieved * 100) / $episodes_number);\n\n\t$progress_ar['completed'] = $completed;\n\t$progress_ar['percent'] = $percent;\n\t$progress_ar['achieved'] = $achieved;\n\t$progress_ar['episodes_number'] = $episodes_number;\n\n\treturn $progress_ar;\n}", "title": "" }, { "docid": "c1b862db11f3caac45d822dd39a7b02f", "score": "0.60355073", "text": "function getDetailedStatus() ;", "title": "" }, { "docid": "e6aab2931db5e5fb4707f029a2359125", "score": "0.6022373", "text": "function status($etapa,$idm){\n include(\"../../config.php\");\n $sqlh=\"SELECT fecha, estatus, idReg FROM historialchecklist WHERE idMenor = '$idm' AND etapa = '$etapa' \";\n $resultTable = $conexion->query($sqlh);\n if(!empty($resultTable)){\n $res = array();\n while($tupla = mysqli_fetch_array($resultTable, MYSQLI_ASSOC) ){\n $res[] = $tupla;\n }\n foreach ($res as $f){\n if($f['estatus']==0){ ?>\n <p id=\"rechazado\">Rechazado: [<?php echo $f['fecha'];?>]</p>\n <?php } else if($f['estatus']==1){ ?>\n <p id=\"date\">Llenado: [<?php echo $f['fecha'];?>]</p>\n <?php } else if($f['estatus']==2){ ?>\n <p id=\"verificado\">Verificado: [<?php echo $f['fecha'];?>]</p>\n <?php } ?>\n <?php\n }\n }\n }", "title": "" }, { "docid": "6fe434e15f3bb993ed6c07237bdfc48a", "score": "0.6002913", "text": "public function get_status(){\n\t\treturn (int) $this->v_status;\n\t}", "title": "" }, { "docid": "ff53cae1ab5bd2849fe7427a94156544", "score": "0.59674937", "text": "function motivoDeAnulacionDev(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDV' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "title": "" }, { "docid": "a490f5dda720cddff79156ed536d237f", "score": "0.5951839", "text": "public static function getAllStatus(){\n return array( self::ESTADO_PENDIENTE, self::ESTADO_ANEXADO, self::ESTADO_VALIDADO, self::ESTADO_CADUCADO, self::ESTADO_ANULADO );\n }", "title": "" }, { "docid": "455a66c5433d03688125b679e4e2facc", "score": "0.5943252", "text": "public function updateStatus($id_envio)\r\n {\r\n $sql = 'SELECT `id_envio_order`, `num_albaran`'\r\n . 'FROM `' . _DB_PREFIX_ . 'tipsa_envios`'\r\n . 'WHERE `id_envio` = ' . (int) $id_envio;\r\n $envioObj = Db::getInstance()->getRow($sql);\r\n\r\n $albaran = $envioObj['num_albaran'];\r\n $id_order = $envioObj['id_envio_order'];\r\n\r\n if (Configuration::get('TIPSA_MODE') == 1) {\r\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE');\r\n } else {\r\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE_TEST');\r\n }\r\n\r\n $urlws = $this->getUrlConfiguration('WS');\r\n\r\n $note = $this->loginTipsaUser();\r\n\r\n foreach ($note as $value) {\r\n $details = $value->getElementsByTagName(\"strSesion\");\r\n $idsesion = $details->item(0)->nodeValue;\r\n }\r\n\r\n $note = webservicetipsa::wsConsEnvEstado($idsesion, $tipsaCodigoAgencia, $tipsaCodigoAgencia, $albaran, $urlws);\r\n\r\n foreach ($note as $value) {\r\n $estado = $value->getElementsByTagName(\"strEnvEstados\")->item(0)->nodeValue;\r\n $error = (isset($value->getElementsByTagName(\"faultstring\")->item(0)->nodeValue)) ? $value->getElementsByTagName(\"faultstring\")->item(0)->nodeValue : null;\r\n }\r\n\r\n if (isset($error) && $error != null) {\r\n PrestaShopLogger::addLog('ErrorObtainingthestatesfromWebservice : ' . $error);\r\n }\r\n\r\n $estenv = explode('V_COD_TIPO_EST', $estado);\r\n $elements = count($estenv);\r\n $estado = explode('\"', $estenv[$elements - 1]);\r\n $estado = (int) $estado[1];\r\n\r\n //assing for the states in with information of dinapaq\r\n switch ($estado) {\r\n // $estado = 1 --> TRANSITO\r\n case 1:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\r\n break;\r\n // $estado = 2 --> REPARTO\r\n case 2:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\r\n break;\r\n // $estado = 3 --> ENTREGADO\r\n case 3:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_ENTREGADO'), $id_order);\r\n break;\r\n // $estado = 4 --> INCIDENCIA\r\n case 4:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_INCIDENCIA'), $id_order);\r\n break;\r\n default:\r\n PrestaShopLogger::addLog('Order State not exists in PrestaShop or not found. ID: ' . $estado);\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "27bf1ff7695169eb3a59109bed3527d7", "score": "0.5935767", "text": "function motivoDeAnulacionAsig(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNAS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "title": "" }, { "docid": "f67249ecaee1aaa21bd30d7973209685", "score": "0.5931585", "text": "function consultaEstudiantes() {\r\n if(!isset($_REQUEST['codProyecto'])||$_REQUEST['codProyecto']<0)\r\n {\r\n echo \"No se seleccionó Proyecto. Por favor regrese y seleccione una opci&oacute;n\";exit;\r\n }\r\n \r\n $estudiantes=array();\r\n $this->estudiantesExitosos=0;\r\n $codProyecto=$_REQUEST['codProyecto'];\r\n if ($codProyecto>10000)\r\n {\r\n $facultad=$codProyecto-10000;\r\n $proyectos=$this->consultarProyectos($facultad);\r\n foreach ($proyectos as $key => $proyecto) {\r\n $estudiantesProyecto=$this->consultarEstudiantes($proyecto['COD_PROYECTO']);\r\n if(is_array($estudiantesProyecto))\r\n {\r\n $estudiantes=array_merge($estudiantes,$estudiantesProyecto);\r\n }\r\n }\r\n $total=count($estudiantes);\r\n }else\r\n {\r\n $estudiantes=$this->consultarEstudiantes($codProyecto);\r\n $total=count($estudiantes);\r\n }\r\n ?>\r\n <html><head>\r\n <script language=\"javascript\">\r\n //Creo una función que imprimira en la hoja el valor del porcentanje asi como el relleno de la barra de progreso\r\n function callprogress(vValor,vItem,vTotal){\r\n document.getElementById(\"getprogress\").innerHTML = vItem+' de '+vTotal+' - '+vValor ;\r\n document.getElementById(\"getProgressBarFill\").innerHTML = '<div class=\"ProgressBarFill\" style=\"width: '+vValor+'%;\"></div>';\r\n }\r\n </script>\r\n <style type=\"text/css\">\r\n /* Ahora creo el estilo que hara que aparesca el porcentanje y relleno del mismoo*/\r\n .ProgressBar { width: 70%; border: 1px solid black; background: #eef; height: 1.25em; display: block; margin-left: auto;margin-right: auto }\r\n .ProgressBarText { position: absolute; font-size: 1em; width: 20em; text-align: center; font-weight: normal; }\r\n .ProgressBarFill { height: 100%; background: #aae; display: block; overflow: visible; }\r\n </style>\r\n </head>\r\n <body>\r\n <!-- Ahora creo la barra de progreso con etiquetas DIV -->\r\n <div class=\"ProgressBar\">\r\n <div class=\"ProgressBarText\"><span id=\"getprogress\"></span>&nbsp;% </div>\r\n <div id=\"getProgressBarFill\"></div>\r\n </div>\r\n </body>\r\n <?\r\n $a=1;\r\n if(is_array($estudiantes)&&!empty($estudiantes))\r\n {\r\n foreach ($estudiantes as $key => $estudiante) {\r\n $this->estudiante=$estudiante['COD_ESTUDIANTE'];\r\n $this->consultarDatos();\r\n $porcentaje = $a * 100 / $total; //saco mi valor en porcentaje\r\n echo \"<script>callprogress(\".round($porcentaje).\",\".$a.\",\".$total.\")</script>\"; //llamo a la función JS(JavaScript) para actualizar el progreso\r\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\r\n ob_flush();\r\n $a++;\r\n if(!isset($this->mensaje[$this->datosEstudiante['CODIGO']]))\r\n {\r\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\"Registro exitoso\";\r\n $this->estudiantesExitosos++;\r\n }\r\n }\r\n }else\r\n {\r\n echo \"<script>callprogress(100,0,0)</script>\"; //llamo a la función JS(JavaScript) para actualizar el progreso\r\n }\r\n \r\n $this->mostrarReporteResultadoProceso($total);\r\n \r\n }", "title": "" }, { "docid": "1488fe83d070b58b63fd0072d2272c1c", "score": "0.5926945", "text": "function procesar_vinculo ($datos){\n $hora_inicio=$this->s__aula_disponible['hora_inicio'];\n $hora_inicio_datos=\"{$datos['hora_inicio']}:00\";\n $hora_fin=$this->s__aula_disponible['hora_fin'];\n $hora_fin_datos=\"{$datos['hora_fin']}:00\";\n \n if(($hora_inicio_datos < $hora_fin_datos) && (($hora_inicio_datos >= $hora_inicio) && ($hora_inicio_datos <= $hora_fin)) && ($hora_fin_datos <= $hora_fin)){\n $this->procesar_carga($datos);\n $this->s__accion=\"Nop\";\n }\n else{\n $mensaje=\" El horario especificado no pertenece al rango disponible : $hora_inicio y $hora_fin hs \";\n toba::notificacion()->agregar($mensaje);\n }\n }", "title": "" }, { "docid": "e91e19c87fe1168338644b74639e8e4c", "score": "0.5919555", "text": "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "title": "" }, { "docid": "b6148921474a0bfb4b069431e89508ee", "score": "0.5896434", "text": "public function cekStatusTransaksi()\n {\n $order_id = \"order001\";\n return $this->client->prepaid() \n -> checkStatus($order_id);\n }", "title": "" }, { "docid": "12e19d55da39faee7a07610259f7763e", "score": "0.58796954", "text": "function siguienteEstadoPresupuesto(){\n $this->procedimiento = 'pre.ft_presupuesto_ime';\n $this->transaccion = 'PRE_SIGESTP_IME';\n $this->tipo_procedimiento = 'IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\t\t\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "5df190fd7a61e7e6b9d9cef5f555a002", "score": "0.5879645", "text": "function reportePagoVariable(){\n\t\t$this->procedimiento='oip.ft_archivo_horas_piloto_sel';\n\t\t$this->transaccion='OIP_REPPILO_SEL';\n\t\t$this->tipo_procedimiento='SEL';\t\t\t\t\t\t\n $this->setCount(false);\n\n $this->setParametro('id_archivo_horas_piloto','id_archivo_horas_piloto','integer');\n \n //captura de datos\n $this->captura('nombre', 'varchar');\n $this->captura('gestion', 'int4');\n $this->captura('periodo', 'varchar');\n $this->captura('pago_total', 'numeric');\n $this->captura('nombre_piloto', 'varchar');\n $this->captura('escala_salarial', 'varchar');\n $this->captura('ci', 'varchar');\n $this->captura('pic_sic', 'varchar');\n $this->captura('horas_vuelo','int4');\n $this->captura('horas_simulador_full', 'int4');\n $this->captura('horas_simulador_fix', 'int4');\n $this->captura('horas_simulador_full_efectivas', 'int4');\n $this->captura('horas_simulador_fix_efectivas', 'int4');\n $this->captura('pago_variable', 'numeric');\n $this->captura('factor_esfuerzo', 'numeric');\n $this->captura('monto_horas_vuelo', 'numeric');\n $this->captura('monto_horas_simulador_full', 'numeric');\n $this->captura('monto_horas_simulador_fix', 'numeric');\n $this->captura('tipo_flota', 'varchar');\n $this->captura('pic_sic_servicio', 'varchar');\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit; \n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n return $this->respuesta; \n }", "title": "" }, { "docid": "56fe63deaf4caabc6f47f034435e7773", "score": "0.5877223", "text": "public function get_status() \n {\n $sess_stat= Session::instance()->get(\"hana_status\", array());\n if(!empty($sess_stat)) $this->status=$sess_stat;\n return $this->status;\n }", "title": "" }, { "docid": "1eb270bac56f17dc451dfdc9e7e789e2", "score": "0.5864271", "text": "function AsignarVacacion(){\n\t $this->procedimiento='asis.ft_vacacion_sel';\n\t\t$this->transaccion='ASIS_ASIGVAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setCount(false); \n\t\t\n\t\t$this->tipo_conexion='seguridad';\n\t\t\n\t\t$this->arreglo=array(\"id_usuario\" =>1,\n\t\t\t\t\t\t\t \"tipo\"=>'TODOS'\n\t\t\t\t\t\t\t );\n\t\t\n\t\t$this->setParametro('id_usuario','id_usuario','int4');\t\t\t\t\t\t \n $this->captura('dias_asignados','int4');\n\n\t //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//echo (\"entro al cron modelo vacacion juan \".$this->consulta.' fin juan');\n\t\t//exit;\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "06f6be91af30217f4a00a5953ee3f055", "score": "0.5863313", "text": "public function getStatusPeriodeAction()\n {\t\t\n $params = $this->_request->getParams();\n\t\t$value = $this->_formula->getStatusPeriode($params);\n\t\tdie(json_encode($value));\n }", "title": "" }, { "docid": "b58ca11ced031fbe6f16769026b8d019", "score": "0.58562905", "text": "private function mapPagseguroStatus($status) {\n\n if (empty($status)) {\n throw new Exception('PagSeguro not return correct status!');\n }\n $return = '';\n switch ($status) {\n // t('Awaiting payment')\n case '1':\n $return = 'completed';\n break;\n\n // t('Under analysis')\n case '2':\n $return = 'completed';\n break;\n\n // t('Paid')\n case '3':\n $return = 'completed';\n break;\n\n // t('In dispute')\n case '5':\n $return = 'authorization';\n break;\n\n // t('Refunded')\n case '6':\n $return = 'authorization';\n break;\n\n // t('Canceled')\n case '7':\n $return = 'authorization';\n break;\n }\n return $return;\n }", "title": "" }, { "docid": "672f0dea9a5620fed40699b35416dd59", "score": "0.5848403", "text": "public function getJobStatus()\n {\n }", "title": "" }, { "docid": "0bbb544031c7244d2e8249b01b4840a6", "score": "0.58483726", "text": "public function status() {\n \n }", "title": "" }, { "docid": "421bd11153cdeec8a1777c2f3b470c1e", "score": "0.5830176", "text": "function cadNovaVisita() {\n\n $novVis = new ManipulateData();\n\n $hora = date(\"H:i:s\");\n $data = date(\"Y-m-d\");\n $quemVis = $this->quemVis;\n $obs = $this->obs;\n $idPessoa = $this->idPessoa;\n $status = 1;\n $cracha = $this->cracha;\n\n // SETANDO A TABELA A SER FEITA A INSERÇÃO\n $novVis->setTable(\"visita\");\n // SETANDO OS VALORES DO BANCO DE DADOS\n $novVis->setCamposBanco(\"visitante_data, visitante_hora, visitante_quem_vis, visitante_obs, id_pessoa, status, cracha\");\n // SETANDO OS DADOS A SEREM ADICIONADOS AO BANCO DE DADOS\n $novVis->setDados(\"'$data', '$hora', '$quemVis', '$obs', '$idPessoa', '$status', $cracha\");\n // CHAMANDO A FUNCAO DE INSERÇAO NO BANCO DE DADOS\n $novVis->insert();\n\n $sucesso = $novVis->registros_afetados(); // PASSA PARA A VARIAVEL UM BOOLEAN DE REGISTRO AFETADOS\n \n // RETORNA UMA BOOLEAN COM O STATUS DA GRAVAÇÃO\n return $sucesso;\n }", "title": "" }, { "docid": "68589a5841883b932af25478a060c511", "score": "0.5819135", "text": "private function _generatePagSeguroOrderStatus()\n\t{\n\n\t\t// getting order status id from order_status table\n\t\t$lastOrdersStatusId = tep_db_fetch_array(tep_db_query(\"select max(orders_status_id) as last_status_id from \" . TABLE_ORDERS_STATUS));\n\t\t// creating new order status id\n\t\t$newStatusId = (int) $lastOrdersStatusId['last_status_id'] + 1;\n\t\t// getting languages\n\t\t$languages = tep_get_languages();\n\t\t// performing new PagSeguro orders status insertions\n\t\tforeach (array_keys(PagSeguroTransactionStatus::getStatusList()) as $status) {\n\t\t\tforeach ($languages as $language) {\n\t\t\t\t// check if status is already on database, in affirmative case, will not be installed news PagSeguro orders statuses\n\t\t\t\tif (!$this->_checkIfOrderStatusExists(PagSeguroOrderStatusTranslation::getStatusTranslation($status, strtolower($language['code'])))) {\n\t\t\t\t\ttep_db_query(\"insert into \" . TABLE_ORDERS_STATUS . \" (orders_status_id, language_id, orders_status_name) values ('\" . $newStatusId . \"', '\" . $language['id'] . \"', '\" . PagSeguroOrderStatusTranslation::getStatusTranslation($status, strtolower($language['code'])) . \"')\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// incrementing status id after insertion of one status in all languages\n\t\t\t++$newStatusId;\n\t\t}\n\t}", "title": "" }, { "docid": "39cd2d80d92050c5f2ac310a57a199af", "score": "0.5810686", "text": "function status()\n {\n $db = Database::getinstance();\n\n $status = false;\n\n $id = $this->deviceCode;\n $housecode = $this->houseCode;\n\n $db->addBound($id);\n $db->addParam(':aktor_id');\n $db->addBound($housecode);\n $db->addParam(':housecode');\n\n $result = $db->query(\"SELECT `condition` FROM log_actuator WHERE `actuator_id` = (SELECT id FROM actuator WHERE devicecode = :aktor_id AND housecode = :housecode) ORDER BY id desc LIMIT 1 \");\n\n if (isset($result[0]['condition']) AND $result[0]['condition'] == 1) {\n $status = true;\n }\n $this->status = $status;\n }", "title": "" }, { "docid": "5b7a36b1f61165fe038382422d0f40bb", "score": "0.5792467", "text": "public function getEstadoPagos(){\n $pagos = $this->obtenerPagosElectronicos();\n foreach ($pagos as $pago) {\n if ($pago->estado != PagosElectronicos::PAGADO)\n return PagosElectronicos::PENDIENTE;\n }\n\n return PagosElectronicos::PAGADO;\n }", "title": "" }, { "docid": "a5e4dbd18a88b34164b05eec06922fe8", "score": "0.57870716", "text": "public function getStatusLabel()\n {\n return \\BFOS\\PagseguroBundle\\Utils\\Pagseguro::$transaction_status[$this->status];\n }", "title": "" }, { "docid": "82624717ad6c833eaf738c6f4cad4444", "score": "0.5782337", "text": "public function getEstado()\n {\n if (Ventas::find()->where(['copia_id' => $this->id])->exists()) {\n if (Ventas::find()->where(['copia_id' => $this->id])->andWhere(['not', ['finished_at' => null]])->exists()) {\n return 'Bloqueada';\n }\n return 'En venta';\n }\n\n return '';\n }", "title": "" }, { "docid": "b2068f202c4dd14e13828ae065a4077b", "score": "0.5780327", "text": "public function verificaAppartenenza(){\n \n $sess_user=$this->session->get_userdata('LOGGEDIN');\n $this->utente=$sess_user[\"LOGGEDIN\"][\"userid\"];\n if(isset($sess_user[\"LOGGEDIN\"][\"business\"])){\n \n $this->azienda=$sess_user[\"LOGGEDIN\"][\"business\"];\n \n \n }\n \n \n }", "title": "" }, { "docid": "9a00d64fbb16028c95b62aa38c9a0441", "score": "0.57728565", "text": "public function getOrdencompraStatus()\n {\n\n return $this->ordencompra_status;\n }", "title": "" }, { "docid": "c87f926037753ddad9b43e7b801ef214", "score": "0.5768423", "text": "public function statoattivazione(){\n return $this->stato_attivazione;\n }", "title": "" }, { "docid": "997cd5d67b76262207fcb54d6cc116dd", "score": "0.5762409", "text": "function anteriorEstadoPlanilla(){\n $this->procedimiento='plani.ft_planilla_ime';\n $this->transaccion='PLA_ANTEPLA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_plan_pago','id_plan_pago','int4');\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('operacion','operacion','varchar');\n \n $this->setParametro('id_funcionario','id_funcionario','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('obs','obs','text');\n\t\t\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "484f02b862b3951edb899de702ce56c2", "score": "0.5757657", "text": "public function getStatusPeriodeAction()\n { \n $params = $this->_request->getParams();\n $value = $this->_formula->getStatusPeriode($params);\n die(json_encode($value));\n }", "title": "" }, { "docid": "81dd6c803dd7e163dc651cdadd464b11", "score": "0.57522607", "text": "public function getStatus() {\n return $this->root->getAttribute('avancement');\n }", "title": "" }, { "docid": "caa6ce9d287105fb750cf3cccbecb582", "score": "0.57499176", "text": "public function estatusproyecto($idproyecto){\n $estatus=5;\n \n $em=$this->em;\n \n //busco si hay en proceso\n $dql = \"select x from ProyectoBundle:Tarea x where x.proyecto= :idproyecto\";\n $query = $em->createQuery($dql);\n $query->setParameter('idproyecto',$idproyecto);\n $pro = $query->getResult();\n \n $nuevo=false;$proceso=false;$culminado=false;\n foreach ($pro as $a) {\n if($a->getEstatus()==1)$nuevo=true; \n if($a->getEstatus()==2)$proceso=true;\n if($a->getEstatus()==3)$culminado=true;\n }\n \n //si hay en proceso\n if($proceso==true or $nuevo==true and $culminado==true)$estatus=2;\n //si estan nuevos pero hay cerrados\n else if($nuevo==true and $proceso==false and $culminado==false)$estatus=1;\n //si solo hay cerrados\n else if($culminado==true and $proceso==false and $nuevo==false)$estatus=3;\n\n \n //actualizo campos en ticket\n $query = $em->createQuery('update ProyectoBundle:Proyecto x set x.estatus= :estatus WHERE x.id = :idproyecto');\n $query->setParameter('estatus', $estatus);\n $query->setParameter('idproyecto', $idproyecto);\n $query->execute(); \n \n }", "title": "" }, { "docid": "2eca90dffce1e4b1e4f6dab386d9d1f7", "score": "0.57481045", "text": "function updateReservationStatus($codigo_reserva) {\r\n\r\n global $connect;\r\n\r\n $sql_update_query = \"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\";\r\n\r\n // Realizamos la consulta a la tabla \r\n $updated = $connect->executeIDU($sql_update_query);\r\n\r\n if (!$updated) { \r\n echo \"no se pudo acceder a la base\";\r\n return false;\r\n }\r\n\r\n }", "title": "" }, { "docid": "0593442e7d5705956d0e1c8d556c34b9", "score": "0.57463396", "text": "function reporteOtrosIngresos(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='plani.ft_planilla_sel';// nombre procedimiento almacenado\n $this->transaccion='PLA_RP_OTROS_ING_SEL';//nombre de la transaccion\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n //$this->setParametro('fecha_ini','fecha_ini','date');\n //$this->setParametro('fecha_fin','fecha_fin','date');\n $this->setParametro('gestion','gestion','integer');\n $this->setParametro('periodo','periodo','integer');\n //$this->setParametro('tipo','tipo','varchar');\n\n //defino varialbes que se capturan como retorno de la funcion\n\n\n $this->captura('nombre_empleado','text');\n $this->captura('id_funcionario','integer');\n $this->captura('sistema_fuente','varchar');\n $this->captura('monto','numeric');\n $this->captura('ci','varchar');\n $this->captura('cargo','varchar');\n $this->captura('contrato','varchar');\n $this->captura('categoria','varchar');\n $this->captura('area','varchar');\n $this->captura('regional','varchar');\n $this->captura('c31','varchar');\n $this->captura('fecha_pago','date');\n $this->captura('tipo','varchar');\n $this->captura('estado','varchar');\n $this->captura('tasa_nacional','numeric');\n $this->captura('tasa_internacional','numeric');\n $this->captura('importe_retencion','numeric');\n $this->captura('orden','varchar');\n $this->captura('ref_sep','numeric');\n $this->captura('id_fuente','integer');\n //$this->captura('prima','numeric');\n //$this->captura('retro','numeric');\n\n\n //Ejecuta la funcion\n $this->armarConsulta();\n //echo $this->getConsulta(); exit;\n $this->ejecutarConsulta();\n return $this->respuesta;\n }", "title": "" }, { "docid": "2b09151ec3821d51c02b5142a40266e4", "score": "0.5743826", "text": "function recuperarGanadores(){\n\t\t$votopro = new VotaProfesional();\n\t\t$res = $votopro->recuperarGanadores();\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "4de54408374b73e1ab1aeea4f5a66552", "score": "0.57427907", "text": "private function retornoTransacao(){\n $this->setTid();\n $this->setDadosPedido();\n $this->setFormaPagamento();\n $this->setStatus();\n $this->setAutenticacao();\n $this->setAutorizacao();\n $this->setToken();\n $this->setCapturada();\n $this->setCancelamento();\n }", "title": "" }, { "docid": "52841f5e4f8672684eb3cefd0023805f", "score": "0.5726464", "text": "public function get_status(){\n return $this->status;\n }", "title": "" }, { "docid": "434b77b5f4e639feacc23968dd67072f", "score": "0.5719836", "text": "public function getStatus()\n {\n $asStatus = array();\n $asStatus['pitched']= array('label' => 'Pitched', 'value' => 'pitched', 'probability' => 15, 'shortname' => 'pitched');\n $asStatus['proposal']= array('label' => 'Proposal', 'value' => 'proposal', 'probability' => 30, 'shortname' => 'proposal');\n $asStatus['verbal_agreement']= array('label' => 'Verbal Agreement', 'value' => 'verbal_agreement', 'probability' => 80, 'shortname' => 'agreement');\n $asStatus['signed']= array('label' => 'Signed', 'value' => 'signed', 'probability' => 100, 'shortname' => 'signed');\n $asStatus['stalled']= array('label' => 'Stalled', 'value' => 'stalled', 'probability' => 5, 'shortname' => 'stalled');\n $asStatus['failed']= array('label' => 'Failed', 'value' => 'failed', 'probability' => 0, 'shortname' => 'failed');\n\n return $asStatus;\n }", "title": "" }, { "docid": "2e078da589c797199abfcd86f2fe1e1c", "score": "0.57139325", "text": "function ocupados($data,$clinica){\n $sql = mysql_query(\"SELECT COUNT(status) as status FROM paciente WHERE status = '1' and clinica = '$clinica' \");\n\t$query = mysql_fetch_assoc($sql);\n\treturn $query['status'];\n }", "title": "" }, { "docid": "a68cb6a33be6be29e191ef32b681af4b", "score": "0.57027483", "text": "public function getEstadoProd(){\n $consulta = \"SELECT GRAL_PAR_PRO_COD,GRAL_PAR_PRO_DESC \n FROM gral_param_propios \n WHERE GRAL_PAR_PRO_GRP=2200 AND GRAL_PAR_PRO_COD <>0\";\n return $this->mysql->query($consulta);\n }", "title": "" }, { "docid": "2c434b124095b612b88cefe8272dd34c", "score": "0.5701447", "text": "public function CambiaEstatus()\n {\n \t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\n \t\n \tforeach ($consulta as $key) {\n \t\t$idoficio = $key->id_recepcion;\n\n \t\tif($this->db->query(\"CALL comparar_fechas('\".$idoficio.\"')\"))\n \t\t{\n \t\t\techo 'Ejecutando Cambios';\n \t\t}else{\n \t\t\tshow_error('Error! al ejecutar');\n \t\t}\n \t}\n\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\n }", "title": "" }, { "docid": "db135556bfa510554d80981422391a4d", "score": "0.5683316", "text": "public function getCurrentStatus() {\n\n date_default_timezone_set(\"Asia/Calcutta\");\n $time = date('H:i:s');\n $today = date('Y-m-d H:i:s');\n $numOfInstallments = DefaultData::getNumOfInstlByPeriodAndType($this->loan_period, $this->installment_type);\n $first_installment_date = '';\n $paid_aditional_interrest = 0;\n $total_paid_installment = 0;\n\n $INSTALLMENT = new Installment(NULL);\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $loan_amount = $numOfInstallments * $this->installment_amount;\n $actual_due = $loan_amount - $total_paid_installment;\n\n //daily installment\n if ($this->installment_type == 30) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n $last_od_amount = 0;\n $od_interest = 0;\n $allod = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n // $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $AllOd = $OD->allOdByLoan();\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n //get daily loan od amount \n if (!$AllOd || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($AllOd) {\n foreach ($AllOd as $key => $allod) {\n if (strtotime($allod['od_date_start']) <= strtotime($date) && strtotime($date) <= strtotime($allod['od_date_end']) && (-1 * ($allod['od_interest_limit'])) > $balance && $allod['od_interest_limit'] < $actual_due) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify(' +23 hours +59 minutes +58 seconds');\n\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n $paid_all_amount_before_ins_date1 = 0;\n $before_payment_amounts1 = $INSTALLMENT->getPaidAmountByBeforeDate($od_date_morning, $this->id);\n\n foreach ($before_payment_amounts1 as $before_payment_amount1) {\n $paid_all_amount_before_ins_date1 += $before_payment_amount1['paid_amount'];\n }\n\n $od_interest = $this->getOdIntereset1(-$ins_total + $paid_all_amount_before_ins_date1, $allod['od_interest_limit']);\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n }\n }\n }\n }\n $total_installment_amount += $installment_amount;\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $start->modify($modify_range);\n $x++;\n\n //end of the installment \n if ($numOfInstallments == $x) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify('+23 hours +59 minutes +58 seconds');\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n //check log ends with od or installment\n $last_od_date = date('D/M/Y', strtotime($od_date_morning));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+1 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n $days_between = floor(abs($end - $start) / 86400) - 1;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n $y = 0;\n\n $od_date_start1 = new DateTime($date);\n $od_date_start1->modify('+47 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n while ($y <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start1->format('Y-m-d H:i:s');\n //getting echo $od_date; before of date from current od date\n $OLDODDATE = new DateTime($od_date);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $y++;\n }\n }\n }\n }\n //weekly installment\n } else if ($this->installment_type == 4) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+7 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n\n $date = $start->format('Y-m-d ' . \" 00:00:01\");\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n\n\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total || $actual_due < $od['od_interest_limit']) {\n \n } else {\n if ($od !== false) {\n\n // Declare and define two dates \n $ins_date1 = strtotime($date);\n $ins_date2 = strtotime($second_installment_date);\n\n // Formulate the Difference between two dates \n $diff = abs($ins_date2 - $ins_date1);\n\n $daysbetween = floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24 -\n (floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24))) * 30 * 60 * 60 * 24) / (60 * 60 * 24));\n\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n $od_date_start = new DateTime($date);\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n $defult_val = $daysbetween;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysbetween && $od['od_date_start'] <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n //// od dates range\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date)) || strtotime($od['od_date_end'] . $time) <= strtotime($od_date)) {\n break;\n }\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n \n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n if (strtotime(date(\"Y/m/d\")) . \" \" . $time == $date) {\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n } else {\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n }\n\n\n $start->modify($modify_range);\n $x++;\n\n if ($numOfInstallments == $x) {\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+7 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n $defult_val = $days_between;\n\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d H:i:s');\n\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($old_od_date) || strtotime(date(\"Y/m/d\")) <= strtotime($od_date1)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n } else if ($this->installment_type == 1) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 months');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $no_of_installments = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d H:i:s');\n\n $paid_amount = 0;\n $last_od_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n $amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($od !== false) {\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n //get month and year from inst date\n $dateValue = strtotime($date);\n $year = date(\"Y\", $dateValue);\n $month = date(\"m\", $dateValue);\n\n $daysOfMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\n $od_date_start = new DateTime($date);\n\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n\n $defult_val = $daysOfMonth - 1;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysOfMonth - 1 && $this->od_date <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date))) {\n break;\n }\n\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_total, $od_amount_all);\n array_push($od_amount_all_array, $od_interest);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n\n $start->modify($modify_range);\n $x++;\n\n\n if ($numOfInstallments == $x) {\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+' . $daysOfMonth . ' day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n// $od_amount_all_array_1 = array();\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date1))) {\n break;\n }\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n }\n\n $INSTALLMENT = new Installment(NULL);\n $total_paid_installment = 0;\n $paid_aditional_interrest = 0;\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $last_od_amount_balance = $od_total_amount - $paid_aditional_interrest;\n\n $all_arress = ($total_paid_installment ) - ($total_installment_amount) - $od_total_amount;\n $system_due = $loan_amount - $total_installment_amount;\n $system_due_num_of_ins = $system_due / $this->installment_amount;\n $actual_due_num_of_ins = $actual_due / $this->installment_amount;\n\n\n\n return [\n 'od_amount' => $od_total_amount,\n 'all_arress' => $all_arress,\n 'all_amount' => $balance,\n 'system-due-num-of-ins' => $system_due_num_of_ins,\n 'system-due' => $system_due,\n 'actual-due-num-of-ins' => $actual_due_num_of_ins,\n 'actual-due' => $actual_due,\n 'receipt-num-of-ins' => $total_paid_installment / $this->installment_amount,\n 'receipt' => $total_paid_installment + $paid_aditional_interrest,\n 'arrears-excess-num-of-ins' => ($total_installment_amount - $total_paid_installment) / $this->installment_amount,\n 'arrears-excess' => ($total_installment_amount) - ($total_paid_installment),\n 'installment_amount' => $amount,\n ];\n }", "title": "" }, { "docid": "4f624a1800835f9c7d5fc9ef1e83dec7", "score": "0.5680113", "text": "function reportePOA(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPPOA_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n $this->captura('id_objetivo','int4');\n $this->captura('id_objetivo_fk','int4');\n $this->captura('codigo','varchar');\n $this->captura('nivel_objetivo','int4');\n $this->captura('hijos','int4');\n $this->captura('nietos','int4');\n $this->captura('hermanos','int4');\n $this->captura('sw_transaccional','varchar');\n $this->captura('cantidad_verificacion','numeric');\n $this->captura('unidad_verificacion','varchar');\n $this->captura('ponderacion','numeric');\n $this->captura('fecha_inicio','date');\n $this->captura('tipo_objetivo','varchar');\n $this->captura('descripcion','varchar');\n $this->captura('linea_base','varchar');\n $this->captura('indicador_logro','varchar');\n\n $this->captura('periodo_ejecucion','varchar');\n $this->captura('producto','varchar');\n $this->captura('fecha_fin','date');\n\n $this->captura('gestion','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "68bc8975472d60c7feeaf9ee0a1b9fe2", "score": "0.56798196", "text": "function motivoDeAnulacion(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNRE' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}", "title": "" }, { "docid": "8bf098a72cb6c98fc17753908ad6b9b5", "score": "0.56795245", "text": "protected function status()\n {\n }", "title": "" } ]
0e71ac8467a2cc53c258fb2a0e14438b
returns list of supported filetypes of this parser
[ { "docid": "0852b04be296a46ff0f25b37b792c57f", "score": "0.8152007", "text": "public static function getSupportedFiletypes() : array\n {\n return static::$supportedFiletypes;\n }", "title": "" } ]
[ { "docid": "7991efc46fb6b46813e34663d3e52b98", "score": "0.7941198", "text": "public function getSupportedFileTypes(): SupportedFileTypes\n\t{\n\t\t// TODO: Implement getSupportedFileTypes() method.\n\t}", "title": "" }, { "docid": "8dd23ca048ce8a6e0b08df1fdcfadb1e", "score": "0.77492476", "text": "public function getFileTypes()\n {\n return $this->fileTypes;\n }", "title": "" }, { "docid": "c765e9c1063a21d4941e40fc0d7d378d", "score": "0.7744338", "text": "public function getFileTypes()\n {\n return $this->_fileTypes;\n }", "title": "" }, { "docid": "5d252bee0fa01e34979d6dd29f94572b", "score": "0.7743971", "text": "function supported_filetypes() {\n return '*';\n }", "title": "" }, { "docid": "109175829014d0e26ebf5d3a703fc78c", "score": "0.76487833", "text": "function getSupportedFileFormats();", "title": "" }, { "docid": "26ecd478c34c9f8abef55096a5312056", "score": "0.76447797", "text": "public function getAllowedFileTypes() {\n return $this->__allowedFileTypes;\n }", "title": "" }, { "docid": "95075893d6825b7b9de32f5938348e4a", "score": "0.7618363", "text": "public function getFileTypes()\n {\n return $this->filetype;\n }", "title": "" }, { "docid": "01df91bf94acaa2cb8494eb855048b79", "score": "0.7365744", "text": "static function getTypesFile() {\n return array(\"pdf\");\n }", "title": "" }, { "docid": "c62e312c1ce562f194ceefb490b873be", "score": "0.7363318", "text": "public function getTypes() {\r\n\t\t$ext = $this->getExtension();\r\n\t\treturn ThairaUploadsFilePeer::getTypes($ext);\r\n\t}", "title": "" }, { "docid": "59feadaad995f71e5def661c1973eac7", "score": "0.7143862", "text": "function getMimeTypes();", "title": "" }, { "docid": "34975741d5ea924a372ee2050b4c71ca", "score": "0.71367306", "text": "public function getAllowedFilesTypesAsArray()\n {\n $fTypesArr = array();\n\n if(!empty($this->_allowedFileTypes)) {\n $fTypesArr = preg_split('/[,;]/', $this->_allowedFileTypes);\n }\n\n return $fTypesArr;\n }", "title": "" }, { "docid": "2cb581a1204b88fee42478b5fd15fe9f", "score": "0.7040511", "text": "public function getFilesWithType()\n {\n $files = array();\n $finfo = \\finfo_open(\\FILEINFO_MIME_TYPE);\n foreach ($this->getFiles() as $file) {\n $tmp['file'] = $file;\n $mimeType = \\finfo_file($finfo, $file->getPathname());\n $tmp['is_image'] = \\preg_match('/^image\\//', $mimeType);\n $files[] = $tmp;\n }\n\n return $files;\n }", "title": "" }, { "docid": "2bb34b081d9b6512512219cf51a7c5a6", "score": "0.70001", "text": "public function getFileExtensions()\n {\n return $this->parserFactory->getFileExtensions();\n }", "title": "" }, { "docid": "d60d7e9793638d9618587d214915790c", "score": "0.6908944", "text": "public function mimeTypes(): array\n {\n return $this->mimeTypes;\n }", "title": "" }, { "docid": "73fc4611d8bd82cb22e2406aeead703d", "score": "0.6903262", "text": "public function mimeTypes();", "title": "" }, { "docid": "021eaa774da93c3ded66b73e192ad5ad", "score": "0.6884486", "text": "public function getFileTypeAllowableValues()\n {\n return [\n self::FILE_TYPE_MP4,\n self::FILE_TYPE_M4_A,\n self::FILE_TYPE_TRANSCRIPT,\n self::FILE_TYPE_CHAT,\n self::FILE_TYPE_CC,\n self::FILE_TYPE_CSV,\n self::FILE_TYPE_CHAT_MESSAGE,\n ];\n }", "title": "" }, { "docid": "e7582015b429ee56bb3e431e9a2663bc", "score": "0.6826673", "text": "abstract protected function getImportFileTypes(): array;", "title": "" }, { "docid": "244dcde4a02b9b62f0c022d347258837", "score": "0.6822569", "text": "public function getHandledMimeTypes(): array;", "title": "" }, { "docid": "1e5884e05221eccba0c1d1bf7e08db49", "score": "0.6819619", "text": "public abstract function getSupportedTypes();", "title": "" }, { "docid": "1b80fab3e690f6701460e53b9826b8c5", "score": "0.673387", "text": "public function getMimetypes(): array {\n\t\treturn Capabilities::MIMETYPES;\n\t}", "title": "" }, { "docid": "662d69226d526f5487d90f47a8111f20", "score": "0.6712976", "text": "public function getAllowedFileTypesAsText()\n {\n return (string)$this->_allowedFileTypes;\n }", "title": "" }, { "docid": "9d7531f97e0408764eede666c0afd104", "score": "0.6690665", "text": "public function getFileTypes($format = 'map')\n\t{\n\t\t$list = $this->getConfig('filetypes','jpg,jpeg,gif,png,JPG,JPEG,GIF,PNG');\n\n\t\t// Remove excluded file types (those that have a - prefix character) from the list\n\t\t$data \t= array();\n\t\t\n\t\tforeach(explode(',', $list) as $group) {\t\n\t\t\tif (substr(trim($group), 0, 1) === '-') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// remove excluded file types (those that have a - prefix character) from the list\n\t\t\t$data[] = preg_replace('#(,)?-([\\w]+)#', '', $group);\n\t\t}\n\t\t\n\t\t$list = implode(',', $data);\n\n\t\tswitch ($format) {\n\t\t\tcase 'list':\n\t\t\t\treturn $this->listFileTypes($list);\n\t\t\t\tbreak;\n\t\t\tcase 'array':\n\t\t\t\treturn explode(',', $this->listFileTypes($list));\n\t\t\t\tbreak;\n\t\t\tcase 'reg':\n\t\t\t\treturn str_replace(',', '|', $list);\n\t\t\t\tbreak; \n\t\t\tdefault:\n\t\t\tcase 'map':\n\t\t\t\treturn $list;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "3defe8d19f626801f49b7c295fed536f", "score": "0.6672405", "text": "public static function getContentType()\n {\n return ['core', 'file'];\n }", "title": "" }, { "docid": "abb03ada3a3cf72e852cef1a87e49102", "score": "0.66678345", "text": "private function getAllowedMimeTypes() {\n $result = [];\n\n $allowedExtensions = c('Garden.Upload.AllowedFileExtensions', []);\n if (is_array($allowedExtensions)) {\n foreach ($allowedExtensions as $extension) {\n if ($mimeTypes = $this->lookupMime($extension)) {\n $result = array_merge($result, $mimeTypes);\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "f0b43d160b50527ff78aff99b970d8ea", "score": "0.665208", "text": "public static function getMimeTypes(): array\n {\n return [\n 'image/jpeg',\n 'image/png',\n 'image/tiff',\n 'text/plain',\n 'image/bmp',\n 'application/pdf',\n ];\n }", "title": "" }, { "docid": "321270fe45d2c3bfbaf2834fa5e384f5", "score": "0.66252023", "text": "public function get_option_toolset_types() {\n\t\treturn self::get_option( true, self::OPTION_EXTENSION_TYPES, [] );\n\t}", "title": "" }, { "docid": "f98c55c9c1ecf408dd00dd1e17183444", "score": "0.65908325", "text": "public static function getImageMimetypes()\n {\n return [\n 'image/jpg',\n 'image/jpeg',\n 'image/gif',\n 'image/png',\n ];\n }", "title": "" }, { "docid": "5dcf21aa5d2abebcb4971acfbe99d1ca", "score": "0.65899146", "text": "public function getSupportedTypes()\n {\n return array(\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel.sheet.macroEnabled.12',\n 'application/vnd.ms-excel'\n );\n }", "title": "" }, { "docid": "298142dcd485592f43de538f6ad2809a", "score": "0.65791494", "text": "function getMimeTypes() {\r\n $out = array();\r\n if (file_exists('/etc/mime.types')) {\r\n $file = fopen('/etc/mime.types', 'r');\r\n while(($line = fgets($file)) !== false) {\r\n $line = trim(preg_replace('/#.*/', '', $line));\r\n if(!$line)\r\n continue;\r\n $parts = preg_split('/\\s+/', $line);\r\n if(count($parts) == 1)\r\n continue;\r\n $type = array_shift($parts);\r\n foreach($parts as $part)\r\n $out[$part] = $type;\r\n }\r\n fclose($file);\r\n } else {\r\n $out['js'] = 'application/javascript';\r\n $out['png'] = 'image/png';\r\n $out['css'] = 'text/css';\r\n $out['txt'] = 'text/plain';\r\n $out['gif'] = 'image/gif';\r\n $out['jpg'] = 'image/jpeg';\r\n $out['svg'] = 'image/svg+xml';\r\n $out['mp4'] = 'video/mp4';\r\n $out['html'] = 'text/html';\r\n $out['ttf'] = 'application/octet-stream';\r\n $out['eot'] = 'application/octet-stream';\r\n $out['woff'] = 'application/octet-stream';\r\n }\r\n return $out;\r\n}", "title": "" }, { "docid": "1aca7c3d68a555139ab798e58cabc81c", "score": "0.65462744", "text": "function getMimeTypes()\n{\n return array(\n // text\n 'txt' => 'text/plain',\n 'ini' => 'text/plain',\n 'htm' => 'text/html',\n 'html' => 'text/html',\n 'php' => 'text/html',\n 'css' => 'text/css',\n 'js' => 'application/javascript',\n 'json' => 'application/json',\n 'xml' => 'application/xml',\n 'xsl' => 'application/xml',\n 'sql' => 'application/x-sql',\n 'wsdl' => 'text/xml',\n 'csv' => 'text/csv',\n\n // images / fonts\n 'png' => 'image/png',\n 'jpe' => 'image/jpeg',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/vnd.microsoft.icon',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'svg' => 'image/svg+xml',\n 'svgz' => 'image/svg+xml',\n 'ttf' => 'font/ttf',\n 'eot' => 'application/vnd.ms-fontobject',\n 'woff' => 'application/x-font-woff',\n\n // archives\n 'zip' => 'application/zip',\n 'rar' => 'application/x-rar-compressed',\n 'exe' => 'application/x-msdownload',\n 'msi' => 'application/x-msdownload',\n 'cab' => 'application/vnd.ms-cab-compressed',\n 'class' => 'application/java-vm',\n 'jar' => 'application/java-archive',\n\n // multimedia\n 'mp3' => 'audio/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n 'flv' => 'video/x-flv',\n 'swf' => 'application/x-shockwave-flash',\n\n // adobe\n 'pdf' => 'application/pdf',\n 'psd' => 'image/vnd.adobe.photoshop',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n\n // ms office\n 'doc' => 'application/msword',\n 'rtf' => 'application/rtf',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n\n // open office\n 'odt' => 'application/vnd.oasis.opendocument.text',\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n );\n}", "title": "" }, { "docid": "4910d6ac503afb1b8488255da12c0cc2", "score": "0.6543765", "text": "public function getAllowedMimeTypes() {\n\t\t$mime_types = explode(',', $this->settings['attachment']['allowedMimeTypes']);\n\t\tif (empty($mime_types)) {\n\t\t\t$res = array('text/plain');\n\t\t} else {\n\t\t\tforeach ($mime_types AS $mime_type) {\n\t\t\t\t$res[] = trim($mime_type);\n\t\t\t}\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "9f8a5d72766e081f7cd130d96897d25b", "score": "0.65183127", "text": "public function getAllowedMimeTypesAndExtensions() {\n\t\treturn $this->allowedMimeTypesAndExtensions;\n\t}", "title": "" }, { "docid": "6c570b3d6fe3a64de3238e1a14bd6703", "score": "0.65169644", "text": "public static function GetAllowedMediaTypes()\n {\n return ['gif', 'jpg', 'jpeg', 'jpe', 'png'];\n }", "title": "" }, { "docid": "01bd1a47f68da58b6ed5c6b4302021bf", "score": "0.6475976", "text": "public function getImageMimeTypes(): array\n {\n return $this->imageMimeTypes;\n }", "title": "" }, { "docid": "31dabccbce80d0d1d102e28dddee9bb6", "score": "0.6472951", "text": "public function getMimeTypes()\n {\n return $this->getResponse()->getMimeTypes();\n }", "title": "" }, { "docid": "e7abf0173b72b7079727e3fb6688b835", "score": "0.64470464", "text": "public function provideMimeTypes()\n {\n return array(\n array(ImageStrategy::MEDIA_TYPE , true),\n array(VideoStrategy::MEDIA_TYPE , false),\n array(AudioStrategy::MEDIA_TYPE , false),\n array(PdfStrategy::MEDIA_TYPE , false),\n array(DefaultStrategy::MEDIA_TYPE, false)\n );\n }", "title": "" }, { "docid": "32c2378ee57f0c17afc5c19a66a12a51", "score": "0.64294326", "text": "protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\n }", "title": "" }, { "docid": "e627c9d99248d1b06a10aab342247c70", "score": "0.6427188", "text": "public function getSupportedExtensions()\n {\n return [\n '*'\n ];\n }", "title": "" }, { "docid": "183705129fc65c8cd6987004ca7d82dc", "score": "0.6424038", "text": "function system_extension_mime_types() {\n $out = array();\n $file = fopen('/etc/mime.types', 'r');\n while (($line = fgets($file)) !== false) {\n $line = trim(preg_replace('/#.*/', '', $line));\n if (!$line)\n continue;\n $parts = preg_split('/\\s+/', $line);\n if (count($parts) == 1)\n continue;\n $type = array_shift($parts);\n foreach ($parts as $part)\n $out[$part] = $type;\n }\n fclose($file);\n return $out;\n}", "title": "" }, { "docid": "e00ce6989cb78add5fb9406317782566", "score": "0.6414168", "text": "public function getFileTypeRestrictions() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "7372947e7f32fb735da50ef56a59d88e", "score": "0.6399789", "text": "public function get_supported_extensions() {\n return $this->ext;\n }", "title": "" }, { "docid": "5477b12c9d0f910c4648e92ab4c7a7c3", "score": "0.6352156", "text": "public static function get_type_option_names() {\n return array('imageheight', 'maxfiles', 'pluginname');\n }", "title": "" }, { "docid": "e7821389602a45c59e4173ea0ad48c1d", "score": "0.6351792", "text": "protected function _getAllowedExtensions()\r\n {\r\n return array('ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg');\r\n }", "title": "" }, { "docid": "9b2cd74e4188e9c462cce6e9c8240a1a", "score": "0.6350954", "text": "public function getMimetypesOptional(): array {\n\t\treturn Capabilities::MIMETYPES_OPTIONAL;\n\t}", "title": "" }, { "docid": "a77e9be172d1aaebacbc0fcff61e391d", "score": "0.63348025", "text": "public function getAllowedMimeTypesAsArray() {\n\t\treturn \\array_keys($this->allowedMimeTypesAndExtensions);\n\t}", "title": "" }, { "docid": "da29a170fd2b95727801ea22479e89f4", "score": "0.6329699", "text": "function google_filetypes() {\n $types = array (\n 'doc' => array(\n 'name' => get_string('google_doc', 'mod_googledocs'),\n 'mimetype' => 'application/vnd.google-apps.document',\n 'icon' => 'docs.svg',\n ),\n 'sheet' => array(\n 'name' => get_string('google_sheet', 'mod_googledocs'),\n 'mimetype' => 'application/vnd.google-apps.spreadsheet',\n 'icon' => 'sheets.svg',\n ),\n 'slides' => array(\n 'name' => get_string('google_slides', 'mod_googledocs'),\n 'mimetype' => 'application/vnd.google-apps.presentation',\n 'icon' => 'slides.svg',\n ),\n );\n\n return $types;\n}", "title": "" }, { "docid": "949b9609563987d5f7fd185ba70146df", "score": "0.631274", "text": "public function getAllowedMimeTypes()\n {\n return sfConfig::get('app_rt_asset_allowed_mime_types', rtAssetToolkit::getCommonMimeTypes());\n }", "title": "" }, { "docid": "9c3ba2ed292b66bfdb9ea30156ea1175", "score": "0.63118184", "text": "function system_mime_type_extensions() {\n # extension listed to be canonical).\n $out = array();\n $file = fopen('/etc/mime.types', 'r');\n while (($line = fgets($file)) !== false) {\n $line = trim(preg_replace('/#.*/', '', $line));\n if (!$line) {\n continue;\n }\n $parts = preg_split('/\\s+/', $line);\n if (count($parts) == 1) {\n continue;\n }\n $type = array_shift($parts);\n if (!isset($out[$type])) {\n $out[$type] = array_shift($parts);\n }\n // we only support mp3s for now and lame expects the extentsion to be mp3\n // not mpga which is what is coming from the mimetype file.\n if ($type == 'audio/mpeg') {\n $out[$type] = 'mp3';\n }\n\n }\n fclose($file);\n return $out;\n}", "title": "" }, { "docid": "5d016198de73f486dd0d3431b7a2ba59", "score": "0.63104445", "text": "protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'png'];\n }", "title": "" }, { "docid": "119cdf19a044647e87f474ae8a0b584c", "score": "0.6232511", "text": "public function getMimeTypes(): ?array\n {\n if ($this->mimeTypes === null) {\n $mimeTypes = $this->wordpress->getAllowedMimeTypes();\n $fullMimeTypes = [];\n\n foreach ($mimeTypes as $extensions => $mineType) {\n $extensions = explode('|', $extensions);\n\n foreach ($extensions as $extension) {\n $fullMimeTypes[$extension] = $mineType;\n }\n }\n\n $this->mimeTypes = $fullMimeTypes;\n }\n\n return $this->mimeTypes;\n }", "title": "" }, { "docid": "3ab00b02d21c4a41dcf9528a6f633eac", "score": "0.620741", "text": "static function getList()\n\t{\n\t\tself::init();\n\t\t\n\t\tself::$exts = self::getExtensions();\n\t\t\n\t\t$liste = array();\n\t\t\n\t\tif (!empty( self::$exts ))\n\t\t\tforeach( self::$exts as $ext => &$e)\n\t\t\t\tif (!$e['disabled'])\n\t\t\t\t\t$liste[ $ext ] = $e['file'];\n\t\treturn $liste;\n\t}", "title": "" }, { "docid": "fd0dde2b9a91f1892f4ae99d3d6a3e9f", "score": "0.62058246", "text": "public function getTypes()\n {\n $result = array();\n foreach ($this->mime_types as $key => $val) {\n $result[] = array('name' => $key, 'value' => $val);\n }\n echo json_encode($result);\n }", "title": "" }, { "docid": "a6604c6cb83a2bf23e138affb35d710e", "score": "0.6199748", "text": "public function getFileType();", "title": "" }, { "docid": "425d6b61c489856356cf763e4ddf0206", "score": "0.6199347", "text": "function allowed_media_types($isVideo=false){\n\tif(!$isVideo)\n\t\treturn array_merge($GLOBALS['video_extensions'],$GLOBALS['audio_conf']['allowed_formats']);\n\telse\n\t\treturn $GLOBALS['video_extensions'];\n}", "title": "" }, { "docid": "9f96249e43be7d01074ac9cbfa201623", "score": "0.61980885", "text": "public function getSupportedTagTypes()\n {\n return [\n 'properties' => [],\n 'methods' => [],\n 'mixins' => [],\n 'other' => []\n ];\n }", "title": "" }, { "docid": "8142bf4f6cba19122d27f7b393a1ec53", "score": "0.61818004", "text": "function get_allowed_image_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_images'));\n return $supported;\n}", "title": "" }, { "docid": "c8d2e1553c2fe26d01e8cc2926a81a67", "score": "0.61596084", "text": "function get_allowed_audio_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_audios'));\n return $supported;\n}", "title": "" }, { "docid": "c3111ce62a9b333027509529d5bcf1a8", "score": "0.61575127", "text": "function get_allowed_video_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_videos'));\n if (get_option('allow_audio_videos') == '1') {\n $supported .= ',' . get_allowed_audio_file_types();\n }\n $supported .= ',pdf';\n if (has_privilege(get_member(), 'use_very_dangerous_comcode')) {\n $supported .= ',swf';\n }\n return $supported;\n}", "title": "" }, { "docid": "2cf424d8b49deb9ce8473113691ea91c", "score": "0.6125372", "text": "public function supported_returntypes() {\n return FILE_INTERNAL;\n }", "title": "" }, { "docid": "c1ef46dd771593d6f075fe0371bfa595", "score": "0.6124226", "text": "public function supportedTypes(): array\n {\n return array_reduce(\n $this->factories,\n function ($types, FormLayoutFactory $factory) {\n return array_merge($types, $factory->supportedTypes());\n },\n []\n );\n }", "title": "" }, { "docid": "48f83b5ef644a80ac216830d5e04fa0a", "score": "0.61239856", "text": "public function supported_returntypes() {\n return FILE_INTERNAL | FILE_EXTERNAL; // Does not appear to work if I return just FILE_EXTERNAL.\n // From moodle 2.3, we support file reference.\n // See moodle docs for more information. e.g return FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE;.\n }", "title": "" }, { "docid": "af1fcddf58c8f8d172b4931114ef187a", "score": "0.6122013", "text": "public function get_files() {\n if ($this->prototypetype != 0) { // Is this a prototype question?\n $files = array(); // Don't load the files twice.\n } else {\n // Load any files from the prototype.\n $this->get_prototype();\n $files = self::get_support_files($this->prototype);\n }\n $files = array_merge($files, self::get_support_files($this)); // Add in files for this question.\n return $files;\n }", "title": "" }, { "docid": "f247761eee27cd7af61c0bf1c1668ea2", "score": "0.6121582", "text": "public function getWatchedFileTypes()\n {\n $fileTypes = $this->watchedFileTypes;\n\n $this->extend('updateWatchedFileTypes', $fileTypes);\n\n return $fileTypes;\n }", "title": "" }, { "docid": "6f6d27e2a860e36af8d955aa005e1fbc", "score": "0.6116254", "text": "public function getTypes() {\n $dir = APPLICATION_PATH . \"/modules/managementtype/forms/\";\n if (is_dir($dir)) {\n $i = 1;\n if ($dh = opendir($dir)) {\n while (($file = readdir($dh)) !== false) {\n\n if (($file != \".\") AND ($file != \"..\")) {\n $type = explode(\".php\", $file);\n $managementype[$i] = $type['0'];\n $i++;\n }\n }\n }\n }\n closedir($dh);\n return $managementype;\n }", "title": "" }, { "docid": "c0241e4cf27142b4ff3f4da953839fee", "score": "0.6112363", "text": "public static function getTypes()\n\t{\n\t\treturn array(\n\t\t\tself::GALLERY\t\t=> 'Портфолио',\n\t\t\tself::DEVELOPMENT\t=> 'Производство',\n\t\t\tself::CAPABILITY\t=> 'Возможности',\n\t\t);\n\t}", "title": "" }, { "docid": "fc7ece2f2f8df48d5cce8e99c20a0023", "score": "0.6111798", "text": "static function parseableDataMediaTypes()\n\t{\n\t\tstatic $parseable_data_media_types = null;\n\t\t\n\t\tif ( is_null( $parseable_data_media_types ) )\n\t\t{\n\t\t\t$parseable_data_media_types =\n\t\t\t array( 'multipart/related', 'multipart/mixed' );\n\t\t}\n\t\t\n\t\treturn $parseable_data_media_types;\n\t}", "title": "" }, { "docid": "4e8a629f9b3ba3fa8d9f636865ce7b5a", "score": "0.6082294", "text": "public function listTypes();", "title": "" }, { "docid": "b05b7ecd05c2f1c654697b198346e24c", "score": "0.6076845", "text": "function get_content_types()\n\t{\n\t\treturn config::get_content_types($this->appname);\n\t}", "title": "" }, { "docid": "e460528c26993b5a63e86d5450ffe125", "score": "0.6067291", "text": "public function filter_upload_mime_types() {\n\n\t}", "title": "" }, { "docid": "31cb2fbd5de84991a64c8c0cf948eef6", "score": "0.60507447", "text": "public static function getAllowedExtensions()\n\t{\n\t $extensions = ModUtil::getVar('MUFiles', 'allowedExtensions');\n\t //$extensions = explode(',', $extensions);\n\t return $extensions;\n\t}", "title": "" }, { "docid": "8526283d38b12c5f7c07b67eeaa03351", "score": "0.6038998", "text": "function getAllowedExtensions()\r\n {\r\n global $config;\r\n $allowed_ext = array();\r\n if (!$this->getCurrentDir() or !$curr_dir_data = $this->getCurrentDirData()) {\r\n return $allowed_ext;\r\n }\r\n\r\n $filetypes = $config->getConfigValue('PG_SPAWFM_FILETYPES');\r\n\r\n if ($curr_type = $this->getCurrentType()) {\r\n $allowed_ext = $filetypes[$curr_type];\r\n } elseif (!empty($curr_dir_data['params']['allowed_filetypes'])) {\r\n if (!is_array($curr_dir_data['params']['allowed_filetypes'])) {\r\n $curr_dir_data['params']['allowed_filetypes'] = array($curr_dir_data['params']['allowed_filetypes']);\r\n }\r\n if (sizeof($curr_dir_data['params']['allowed_filetypes'])) {\r\n foreach ($curr_dir_data['params']['allowed_filetypes'] as $ftype) {\r\n if (strlen($ftype) and $ftype{0} == '.') { // extension specified\r\n $allowed_ext[] = $ftype;\r\n } elseif (isset($filetypes[$ftype])) { // filetype group specified\r\n $allowed_ext = array_merge($allowed_ext, $filetypes[$ftype]);\r\n }\r\n }\r\n }\r\n }\r\n return $allowed_ext;\r\n }", "title": "" }, { "docid": "47eae02497b97e6bb1f751a691bc3796", "score": "0.6034457", "text": "public static function getSupportedImageTypes ()\n {\n return self::$supportedImageTypes;\n }", "title": "" }, { "docid": "13c4500c71ef4611a1b693823b40f1d0", "score": "0.60326976", "text": "public function getSupportedExtensions()\n {\n if (array_key_exists(\"supportedExtensions\", $this->_propDict)) {\n return $this->_propDict[\"supportedExtensions\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1986b211aa7a59788152bc6a309176ad", "score": "0.601573", "text": "function list_files() {\n return array();\n }", "title": "" }, { "docid": "9d2960a438ff018c5c2863248e84e38a", "score": "0.6010392", "text": "function bpxcftr_get_allowed_file_extensions( $type ) {\n\n\t$extensions = array(\n\t\t'file' => array(\n\t\t\t'doc',\n\t\t\t'docx',\n\t\t\t'pdf',\n\t\t),\n\t\t'image' => array(\n\t\t\t'jpg',\n\t\t\t'jpeg',\n\t\t\t'gif',\n\t\t\t'png',\n\t\t),\n\t);\n\n\t$extensions = apply_filters( 'bpxcftr_allowed_extensions', $extensions );\n\n\treturn isset( $extensions[ $type ] ) ? $extensions[ $type ] : array();\n}", "title": "" }, { "docid": "68ff84d4908aaae6380d6693c236fa32", "score": "0.6010017", "text": "public function supported_formats() {\n return array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_RICHHTML);\n }", "title": "" }, { "docid": "4bc42b9b3b18d944a2dab897e49f8d69", "score": "0.599479", "text": "public function getValidImagesTypes()\n {\n return $this->validImagesTypes;\n }", "title": "" }, { "docid": "a47d338b135727eadf94e23e185f1c3b", "score": "0.59750664", "text": "public function get_image_exts()\n {\n return $this->_IMAGE_EXTS;\n }", "title": "" }, { "docid": "1074c74d5dfc5079be41d33a4a5a8659", "score": "0.5971304", "text": "public function getAllowedExtensionsAsArray() {\n\t\treturn \\array_values($this->allowedMimeTypesAndExtensions);\n\t}", "title": "" }, { "docid": "3ab9e1302c1215554de559a5b78b1ec3", "score": "0.5966371", "text": "public function allowedMimes()\n {\n return ['jpeg', 'png', 'jpg'];\n }", "title": "" }, { "docid": "afe75471aa38b7379be629ed749cc620", "score": "0.596345", "text": "function supported_returntypes() {\n if ($this->params['returntypes']) {\n return array_sum($this->params['returntypes']);\n }\n return FILE_EXTERNAL | FILE_REFERENCE | FILE_INTERNAL;\n }", "title": "" }, { "docid": "b47a9b2f0f4a74b938117f2035fad2e9", "score": "0.591452", "text": "public static function getTypes();", "title": "" }, { "docid": "62ca4eb18e5c61e8982efa101aaaeb85", "score": "0.5911369", "text": "public static function get_registered_document_types()\n {\n $document_types = Variable::get('print_document_types', false);\n if (!is_array($document_types)) {\n $document_types = array();\n }\n return $document_types;\n }", "title": "" }, { "docid": "a411e2cd7971eb910928f16a3c132c1f", "score": "0.5910788", "text": "public static function extensions($type = null) {\n if(is_null($type)) return array_keys(static::$mimes);\n return isset(static::$types[$type]) ? static::$types[$type] : array();\n }", "title": "" }, { "docid": "50546f2de27b87f7c4ac63d7569ab069", "score": "0.5901169", "text": "static function availableFormats() {\n return (new ReflectionClass(ThumbnailFormat::class))->getConstants();\n }", "title": "" }, { "docid": "0fd6bdf7190a95fe4c63e3e44830b0ba", "score": "0.5898918", "text": "public function getMimeList(): array;", "title": "" }, { "docid": "6077707b3b57bddefa17120a403d71bc", "score": "0.58985794", "text": "function _1p21_dv_allow_file_types($mimes) {\n\t\t$mimes['csv'] = 'text/csv';\n\t\t$mimes['tsv'] = 'text/tsv';\n\t\treturn $mimes;\n\t}", "title": "" }, { "docid": "fc3f5df0cc7ba6bdbcf9792e8be4793b", "score": "0.5889538", "text": "public static function mimes() {\n return static::$mimes;\n }", "title": "" }, { "docid": "f20793384614cb515b32c4526fa69793", "score": "0.5887401", "text": "public static function _mime_types($ext = '') {\n $mimes = array(\n 'hqx' => 'application/mac-binhex40',\n 'cpt' => 'application/mac-compactpro',\n 'doc' => 'application/msword',\n 'bin' => 'application/macbinary',\n 'dms' => 'application/octet-stream',\n 'lha' => 'application/octet-stream',\n 'lzh' => 'application/octet-stream',\n 'exe' => 'application/octet-stream',\n 'class' => 'application/octet-stream',\n 'psd' => 'application/octet-stream',\n 'so' => 'application/octet-stream',\n 'sea' => 'application/octet-stream',\n 'dll' => 'application/octet-stream',\n 'oda' => 'application/oda',\n 'pdf' => 'application/pdf',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n 'smi' => 'application/smil',\n 'smil' => 'application/smil',\n 'mif' => 'application/vnd.mif',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'wbxml' => 'application/vnd.wap.wbxml',\n 'wmlc' => 'application/vnd.wap.wmlc',\n 'dcr' => 'application/x-director',\n 'dir' => 'application/x-director',\n 'dxr' => 'application/x-director',\n 'dvi' => 'application/x-dvi',\n 'gtar' => 'application/x-gtar',\n 'php' => 'application/x-httpd-php',\n 'php4' => 'application/x-httpd-php',\n 'php3' => 'application/x-httpd-php',\n 'phtml' => 'application/x-httpd-php',\n 'phps' => 'application/x-httpd-php-source',\n 'js' => 'application/x-javascript',\n 'swf' => 'application/x-shockwave-flash',\n 'sit' => 'application/x-stuffit',\n 'tar' => 'application/x-tar',\n 'tgz' => 'application/x-tar',\n 'xhtml' => 'application/xhtml+xml',\n 'xht' => 'application/xhtml+xml',\n 'zip' => 'application/zip',\n 'mid' => 'audio/midi',\n 'midi' => 'audio/midi',\n 'mpga' => 'audio/mpeg',\n 'mp2' => 'audio/mpeg',\n 'mp3' => 'audio/mpeg',\n 'aif' => 'audio/x-aiff',\n 'aiff' => 'audio/x-aiff',\n 'aifc' => 'audio/x-aiff',\n 'ram' => 'audio/x-pn-realaudio',\n 'rm' => 'audio/x-pn-realaudio',\n 'rpm' => 'audio/x-pn-realaudio-plugin',\n 'ra' => 'audio/x-realaudio',\n 'rv' => 'video/vnd.rn-realvideo',\n 'wav' => 'audio/x-wav',\n 'bmp' => 'image/bmp',\n 'gif' => 'image/gif',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'jpe' => 'image/jpeg',\n 'png' => 'image/png',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'css' => 'text/css',\n 'html' => 'text/html',\n 'htm' => 'text/html',\n 'shtml' => 'text/html',\n 'txt' => 'text/plain',\n 'text' => 'text/plain',\n 'log' => 'text/plain',\n 'rtx' => 'text/richtext',\n 'rtf' => 'text/rtf',\n 'xml' => 'text/xml',\n 'xsl' => 'text/xml',\n 'mpeg' => 'video/mpeg',\n 'mpg' => 'video/mpeg',\n 'mpe' => 'video/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n 'avi' => 'video/x-msvideo',\n 'movie' => 'video/x-sgi-movie',\n 'doc' => 'application/msword',\n 'word' => 'application/msword',\n 'xl' => 'application/excel',\n 'eml' => 'message/rfc822'\n );\n return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\n }", "title": "" }, { "docid": "f20793384614cb515b32c4526fa69793", "score": "0.5887401", "text": "public static function _mime_types($ext = '') {\n $mimes = array(\n 'hqx' => 'application/mac-binhex40',\n 'cpt' => 'application/mac-compactpro',\n 'doc' => 'application/msword',\n 'bin' => 'application/macbinary',\n 'dms' => 'application/octet-stream',\n 'lha' => 'application/octet-stream',\n 'lzh' => 'application/octet-stream',\n 'exe' => 'application/octet-stream',\n 'class' => 'application/octet-stream',\n 'psd' => 'application/octet-stream',\n 'so' => 'application/octet-stream',\n 'sea' => 'application/octet-stream',\n 'dll' => 'application/octet-stream',\n 'oda' => 'application/oda',\n 'pdf' => 'application/pdf',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n 'smi' => 'application/smil',\n 'smil' => 'application/smil',\n 'mif' => 'application/vnd.mif',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'wbxml' => 'application/vnd.wap.wbxml',\n 'wmlc' => 'application/vnd.wap.wmlc',\n 'dcr' => 'application/x-director',\n 'dir' => 'application/x-director',\n 'dxr' => 'application/x-director',\n 'dvi' => 'application/x-dvi',\n 'gtar' => 'application/x-gtar',\n 'php' => 'application/x-httpd-php',\n 'php4' => 'application/x-httpd-php',\n 'php3' => 'application/x-httpd-php',\n 'phtml' => 'application/x-httpd-php',\n 'phps' => 'application/x-httpd-php-source',\n 'js' => 'application/x-javascript',\n 'swf' => 'application/x-shockwave-flash',\n 'sit' => 'application/x-stuffit',\n 'tar' => 'application/x-tar',\n 'tgz' => 'application/x-tar',\n 'xhtml' => 'application/xhtml+xml',\n 'xht' => 'application/xhtml+xml',\n 'zip' => 'application/zip',\n 'mid' => 'audio/midi',\n 'midi' => 'audio/midi',\n 'mpga' => 'audio/mpeg',\n 'mp2' => 'audio/mpeg',\n 'mp3' => 'audio/mpeg',\n 'aif' => 'audio/x-aiff',\n 'aiff' => 'audio/x-aiff',\n 'aifc' => 'audio/x-aiff',\n 'ram' => 'audio/x-pn-realaudio',\n 'rm' => 'audio/x-pn-realaudio',\n 'rpm' => 'audio/x-pn-realaudio-plugin',\n 'ra' => 'audio/x-realaudio',\n 'rv' => 'video/vnd.rn-realvideo',\n 'wav' => 'audio/x-wav',\n 'bmp' => 'image/bmp',\n 'gif' => 'image/gif',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'jpe' => 'image/jpeg',\n 'png' => 'image/png',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'css' => 'text/css',\n 'html' => 'text/html',\n 'htm' => 'text/html',\n 'shtml' => 'text/html',\n 'txt' => 'text/plain',\n 'text' => 'text/plain',\n 'log' => 'text/plain',\n 'rtx' => 'text/richtext',\n 'rtf' => 'text/rtf',\n 'xml' => 'text/xml',\n 'xsl' => 'text/xml',\n 'mpeg' => 'video/mpeg',\n 'mpg' => 'video/mpeg',\n 'mpe' => 'video/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n 'avi' => 'video/x-msvideo',\n 'movie' => 'video/x-sgi-movie',\n 'doc' => 'application/msword',\n 'word' => 'application/msword',\n 'xl' => 'application/excel',\n 'eml' => 'message/rfc822'\n );\n return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\n }", "title": "" }, { "docid": "d510006bf33edb2e0bbac131022cd525", "score": "0.58738476", "text": "public function getSupported()\n\t{\n\t\treturn $this->_aArchives;\n\t}", "title": "" }, { "docid": "332e8772ce9ed0d485ce3c6ec87a0383", "score": "0.5869314", "text": "public static function get_accepted_formats();", "title": "" }, { "docid": "0f5df3a0c21914df76863e3efe911760", "score": "0.5868263", "text": "function mimes_types($mime)\n\t{\n\t\treturn ( !isset(mime::$types[$mime]) ) ? FALSE : mime::$types[$mime];\n\t}", "title": "" }, { "docid": "140c39d04707b9e6ca25e6d1614b3688", "score": "0.5866099", "text": "private function _get_other_types() {\n\t\t$mime_types = include W3TC_INC_DIR . '/mime/other.php';\n\t\treturn $mime_types;\n\t}", "title": "" }, { "docid": "9610065fe1aeaf1fce9fd5b381191221", "score": "0.5861325", "text": "public function getFileTypes(): ?array {\n $val = $this->getBackingStore()->get('fileTypes');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n /** @var array<string>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fileTypes'\");\n }", "title": "" }, { "docid": "e2d9adc9741384bdd6f636a06639201f", "score": "0.58534676", "text": "public static function allowed_types()\n {\n return self::$allowed_types;\n }", "title": "" }, { "docid": "7ce03eca29e945cb20208c80f801a4a0", "score": "0.5850264", "text": "public function getAllowedExtensions()\n {\n return $this->allowedExtensions;\n }", "title": "" }, { "docid": "9fa6be9e32ae2b56d9a6354bd0803e49", "score": "0.58478963", "text": "public static function types()\n\t{\n\t\treturn self::$_types;\n\t}", "title": "" }, { "docid": "8ff18ade4ab40cae1a355d0fe645ee5a", "score": "0.58448166", "text": "public function type()\n {\n return (filetype($this->filename));\n }", "title": "" }, { "docid": "ba7e91ee597deecf4970cb1dd2a48328", "score": "0.5837215", "text": "public static function acceptedMimes()\n {\n $uppish = new UppishController;\n\n return $uppish->getAcceptedMimes();\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "0dea886f93ebb55e9ba981cd5e7b23bc", "score": "0.0", "text": "public function update($id) {\n //\n }", "title": "" } ]
[ { "docid": "b4e3ef83b1a29ff10f6ec4e5a5ce3acd", "score": "0.65113205", "text": "public function update(Resource $resource, ResourceRequest $request)\n {\n $resource->update($request->only('name'));\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "4e0f4f227895ae1ef285ecc22e5eb729", "score": "0.64805984", "text": "public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was updated');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }", "title": "" }, { "docid": "1d58cc0ac499a6369b9847fb37dc69a6", "score": "0.64793074", "text": "public function updateResource($resource, $id, array $data = []) {\n $result = $this->put($resource . '/' . $id, $data);\n return reset($result);\n }", "title": "" }, { "docid": "dc93534b04eb8b81463653bc1fe9b4b9", "score": "0.62045246", "text": "public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n $resource->update($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was updated');\n\n return redirect('/resources');\n }", "title": "" }, { "docid": "47e4c5326e79281be1ce31ec068dab77", "score": "0.61861783", "text": "public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "85d21a332b71fa821f58587ae26611d6", "score": "0.60594326", "text": "public function update(Request $request)\n {\n $validatedData = $request->validate([\n 'resource_name' => 'required',\n 'hourly_rate' => 'required|numeric',\n ]);\n\n $resource = Resource::find($request->id);\n\n $resource->resource_name = $request->resource_name;\n $resource->hourly_rate = $request->hourly_rate;\n \n if ($resource->save()) {\n $request->Session()->flash('alert-success', 'resources details updated was successful!');\n return redirect('admin/index-resource');\n } else {\n $request->Session()->flash('alert-error', 'resources details updated was failed!');\n }\n }", "title": "" }, { "docid": "a44cde5599b432199ba53bd6e695fbcc", "score": "0.60480636", "text": "public function update(Request $request, $resource)\n { \n $this->form()->setModel($resource)->save(function() {});\n \n return $this->redirect($request, $resource); \n }", "title": "" }, { "docid": "f73d66d218eef0be3b8199b19c37b26f", "score": "0.60452485", "text": "public function updateStream($path, $resource, Config $config)\n {\n $options = $config->get('options',[]);\n return $this->client->putObjectFromString($this->bucket,$path,$resource,$options);\n }", "title": "" }, { "docid": "a6e3d6ef1ecb867e394cc699e1165c81", "score": "0.6025207", "text": "public function update(SeriesRequest $request, Series $series)\n {\n //\n $this->authorize('author',$series);\n\n $series->update($request->all());\n\n if ($request->file('file')) {\n\n # code...\n $url = Storage::put('series',$request->file('file'));\n \n\n if ($series->image) {\n # code...\n Storage::delete($series->image->url);\n\n $series->image->update([\n\n 'url' => $url\n ]);\n } else{\n $series->image()->create([\n\n 'url' => $url\n ]);\n \n \n\n }\n\n}\n\nreturn redirect()->route('admin.series.edit', $series)->with('info','La serie se actualizo con éxito');\n}", "title": "" }, { "docid": "e0919a7b4ca0ee93949e8600cb6418f4", "score": "0.60211957", "text": "public function resourceUpdate($new = TRUE, $resource = NULL) {\n if (!$resource) {\n $resource = $this->resource;\n }\n\n $path = FALSE;\n $file = '';\n\n if (isset($resource['public_id'])) {\n $file = $resource['public_id'];\n $path = dirname($file);\n\n // Append file format into filename.\n if (!empty($resource['format'])) {\n $file .= '.' . $resource['format'];\n }\n\n $file = pathinfo($file, PATHINFO_BASENAME);\n\n if ($new) {\n $this->save($resource);\n }\n else {\n if ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FOLDER) {\n $this->deleteFolder($resource['public_id']);\n }\n elseif ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FILE) {\n $this->delete($resource['public_id']);\n }\n }\n }\n\n return array($path, $file);\n }", "title": "" }, { "docid": "ff76cc80d913540a356897bd9e7edf87", "score": "0.5980603", "text": "public function update(User $userAuthenticated, User $userResource)\n {\n //\n }", "title": "" }, { "docid": "748b4a954d0155bebbd137382c5201a0", "score": "0.59615195", "text": "public function update($id, CreateResourceRequest $request, Guard $auth)\n\t{ \n\t\t$resource = Resource::findOrFail($id);\n\t\t$user = $auth->user();\n\n\t\t$resource->name \t\t= $request->input('name');\n\t\t$resource->description \t= $request->input('description');\n\t\t$resource->type \t\t= $request->input('type');\n\t\t$resource->user_id \t\t= $user->id;\n\t\t$resource->signature_id = $request->input('signature');\n\t\t$resource->teacher_id \t= $request->input('teacher');\n\n\t\t$resource->save();\n\n\t\tif ( $request->hasFile('file') && $request->file('file')->isValid() ){\n\t\t\t$file = $request->file('file');\n\t\t\t$file_name = $resource->id . '_' . $user->id . '.' . $file->getClientOriginalExtension();\n\t\t\t\n\t\t\t$file->move($this->DESTINATION_PATH, $file_name);\n\n\t\t\t$resource->path = $file_name;\n\n\t\t\t$resource->save();\n\t\t}\n\n\t\t$this->log($resource, $auth->user(), 'update');\n\n\t\treturn redirect()->back();\n\t}", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.59242314", "text": "public function save($resource);", "title": "" }, { "docid": "7003560e3a9d31cfca396c50aa6ff75e", "score": "0.5859935", "text": "public function update(Request $request, $id)\n {\n //\n $resource = Resource::find($id);\n\n $resource->name = $request->resource_name;\n $resource->link = $request->resource_link;\n\n $resource->save();\n\n return [\"message\"=>\"Data updated\",\"status\"=>true];\n }", "title": "" }, { "docid": "ee8cdd9d7a907937ce79086e18097a3b", "score": "0.58592844", "text": "public function update(CompanyStorageRequest $request, $id)\n {\n return $this->save($request,$id); \n }", "title": "" }, { "docid": "bd52066336af51a1e0e57bbecc86f7ec", "score": "0.5848347", "text": "public function update(RequeteStoreRequest $request, $id)\n {\n$Requete=Requete::get()->where('id',$id)->first();\n if($Requete->update($request->toArray())) {\n return new RequeteResource($Requete);\n }\n }", "title": "" }, { "docid": "28c24d6c09bf3e40d09f31610f428cd7", "score": "0.5828425", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'ir_name' => 'required',\n 'ir_resource_type' => 'required',\n 'ir_subject' => 'required',\n 'ir_file' => ''\n ]);\n\n $refInstructional = InstructionalResource::find($id)->src_path;\n\n if (isset($request->ir_file)) {\n $newFileName = time() . '-' . str_replace(' ', '-', $request->ir_name) . '.' . $request->ir_file->extension();\n\n //store new file\n $request->file('ir_file')->storeAs('public', $newFileName);\n //delete old file\n if (Storage::disk('public')->exists($refInstructional)) {\n Storage::delete('public/' . $refInstructional);\n }\n } else {\n $newFileName = $refInstructional;\n }\n\n if (InstructionalResource::where('id', $id)\n ->update([\n 'name' => $request->ir_name,\n 'src_path' => $newFileName,\n 'user_id' => auth()->user()->id,\n 'resource_type_id' => $request->ir_resource_type,\n 'subject_id' => $request->ir_subject\n ])\n ) {\n $request->session()->flash('status', 'Task was successful!');\n }\n\n return back();\n }", "title": "" }, { "docid": "e67250003befec77cf9e6350d869f4c6", "score": "0.5821081", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required|max:100',\n 'desc' => 'required',\n 'link' => 'required',\n 'cat' => 'required',\n 'image' => 'image',\n ]);\n $update = Product::findOrFail($id);\n $update->title = $request->title;\n $update->description = $request->desc; \n $update->link = $request->link; \n $update->category_id = $request->cat; \n if($request->hasFile('image')){\n Storage::delete('products/'.$request->oldimage); \n $file = $request->image->store('products/');\n $update->image = $request->image->hashName(); \n // echo $request->oldimage; \n } \n $update->save(); \n return redirect()->route('product.index')->with('success','product updated');\n }", "title": "" }, { "docid": "ebf6708cd5a6c4cd7cc8acdfd9f26c08", "score": "0.5804868", "text": "public function update(Request $request, Product $product)\n {\n \\Storage::delete($product->image);\n $path=$request->file('image')->store('product');\n $params=$request->all();\n $params['image']=$path;\n $product->update($params);;\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "3e27d59acc6129f2d7e02abe1e9bdeb3", "score": "0.5781152", "text": "public function updateNote(NoteRequest $request, $resource)\n {\n $request->save($resource);\n }", "title": "" }, { "docid": "d29fc82b57f01c3fbe6bb99a3be246e9", "score": "0.5768848", "text": "public function putAction()\n\t{\n\t\t// get account\r\n\t\t$account = $this->getActiveAccount();\n\t\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->params = $this->_request->getParams();\n\t\t$this->view->message = sprintf('Resource #%s Updated', $id);\n\t\t$this->_response->ok();\n\n\t}", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "794e05bd3692d966cd063aa2041fc336", "score": "0.5736985", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "b743d37c52d097cc14915bd0a16b770e", "score": "0.5726298", "text": "public function update_put() {\n\n }", "title": "" }, { "docid": "8ca0679ea794f66a39eaf0ff1d531d9c", "score": "0.5721835", "text": "public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(202);\n }", "title": "" }, { "docid": "424bc30e7bfe2058299766d4dae981b9", "score": "0.57125896", "text": "public function setResource(Resource $resource)\n {\n $this->resource = $resource;\n $this->isResourceModified = true;\n $this->stopPropagation();\n }", "title": "" }, { "docid": "148c03384f2be8de6650d8fb7868c9e0", "score": "0.5700769", "text": "public function update(Request $request, $id)\n {\n \n $this->validate($request, [\n 'title' => 'required|max:100',\n 'desc' => 'required',\n 'link' => 'required',\n 'image' => 'image|dimensions:min_width=800,max_width=1920',\n ]);\n $update = Slide::findOrFail($id);\n $update->title = $request->title;\n $update->description = $request->desc; \n if($request->hasFile('image')){\n Storage::delete('slides/'.$request->oldimage); \n $file = $request->image->store('slides/');\n $update->image = $request->image->hashName(); \n // echo $request->oldimage; \n } \n $update->save(); \n return redirect()->route('slide.index')->with('success','slide updated');\n }", "title": "" }, { "docid": "f3207026fe10a78c71deeca618c87d18", "score": "0.5699133", "text": "public function update(Request $request, $id) : StudentResource\n {\n $student = Student::find($id);\n $student->first_name = $request->first_name;\n $student->last_name = $request->last_name;\n $student->gender = $request->gender;\n $student->phone = $request->phone;\n $student->class = $request->class;\n $student->country = $request->country;\n\n\n if ($request->image) {\n \n if (empty($student->image)) {\n $image_path = public_path(). '/images/students/' .$student->image;\n unlink($image_path);\n\n // here we check if the studet image is not null unlick the image \n // from the folder else skip and update new image\n }\n }\n // here is the image part okay\n\n if ($request->hasFile('image')) {\n \n $file = $request->file('image');\n $file->move(public_path(). '/images/students', $file->getClientOriginalName());\n\n $student->image = $file->getClientOriginalName();\n }\n\n $student->save();\n return new StudentResource($student);\n }", "title": "" }, { "docid": "9e5c6816a1cdb070e1c6800898771f34", "score": "0.5692049", "text": "public function updateStream($path, $resource, array $config = [])\n {\n list($prefix, $path) = $this->getPrefixAndPath($path);\n\n return $this->getFilesystem($prefix)->updateStream($path, $resource, $config);\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "df12e12fb31bd67805101fd587a91508", "score": "0.568933", "text": "public function update(Request $request, $id)\n {\n $validate = $request->validate([\n 'prev_image' => 'required|string',\n ]);\n // dd($request->all());\n\n if ($request->hasfile('image')) {\n $i = Storage::disk('public')->put('sliders', $request->image[0]);\n Storage::delete('/public/' . $request->prev_image);\n } else {\n $i = $request->prev_image;\n }\n $store = Slider::find($id);\n $store->title = $request->title;\n $store->link = $request->link;\n $store->link_name = $request->link_name;\n $store->description = $request->description;\n $store->image = $i;\n $store->update();\n if ($store) {\n return redirect()->back()->with('success', 'Slider Updated Successfully !!');\n } else {\n return redirect()->back()->with('error', 'Failed to Update !!');\n }\n\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "fcdf6c196ac99617a3c5a5718a18f7e9", "score": "0.5661846", "text": "public function update(Request $request, $id)\n {\n $rules = [\n 'name' => 'required|max:100',\n 'price' => 'required|numeric',\n 'photo_url' => 'image'\n ];\n\n $request->validate($rules);\n\n // $product = \\App\\Product::find($id);\n\n // if ($request->hasFile('photo_url')){\n // $newPath = $request->file('photo_url')->store('public/products');\n\n // Storage::delete($product->photo_url);\n\n // $product->photo_url = $newPath;\n // }\n//\n // if ($request->input('delete_photo') == true){\n // Storage::delete($product->photo_url);\n\n // $product->photo_url = null;\n // }\n\n // $product->name = $request->input('name');\n // $product->price = $request->input('price');\n // $product->save();\n\n $product = \\App\\Product::find($id);\n\n if ($request->hasFile('photo_url')){\n $newPath = $request->file('photo_url')->store('public/products');\n\n Storage::delete($product->photo_url);\n\n $product->photo_url = $newPath;\n }\n\n if ($request->input('delete_photo') == true){\n Storage::delete($product->photo_url);\n\n $product->photo_url = null;\n }\n\n $product->fill($request->all());\n\n $product->save();\n\n return redirect('products');\n }", "title": "" }, { "docid": "689842d3aad9dcb88b75b155c54181eb", "score": "0.56460696", "text": "public function updateStream($path, $resource, Config $config)\n {\n if ( ! $this->has($path)){\n return false;\n } else {\n return $this->write($path, $resource, $config);\n } \n }", "title": "" }, { "docid": "fbd22036cd27458692009f909599ca04", "score": "0.5634174", "text": "public function update(Request $request, $id)\n {\n //dd($request);\n $product = new Product();\n $product_updated = $product->validateRequest($request)->store($id);\n\n if ($product_updated) {\n if ($request->has('blocks')) {\n ProductBlock::store($request, $product_updated['id']);\n }\n\n $product_updated->storeImages($request);\n\n if ($request->hasFile('file')) {\n $filepath = Photo::imageUpload($request->file('file'), $product_updated, 'pdf', 'pdf');\n\n Product::updateFilePath($product_updated, $filepath);\n }\n\n return redirect()->back()->with(['success' => 'Proizvod je uspješno snimljen.!']);\n }\n\n return redirect()->back()->with(['error' => 'Whoops..! Došlo je do greške sa snimanjem proizvoda.']);\n }", "title": "" }, { "docid": "00b2a6a53c34699e9c9f5020017ef232", "score": "0.56193584", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::findorfail($id);\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n\n $resource->save();\n\n return redirect()->route('resources.show', [$resource->id]);\n }", "title": "" }, { "docid": "c6c472e9a208986431a784c1ec5cc1f6", "score": "0.56107134", "text": "public function update(){}", "title": "" }, { "docid": "c6c472e9a208986431a784c1ec5cc1f6", "score": "0.56101215", "text": "public function update(){}", "title": "" }, { "docid": "8ceb4c9e42d44542ef7be0dc09286ad0", "score": "0.5605276", "text": "public function update(Request $request, $id){\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');//meto los datos que hay en el array de recursos\n if(isset($resources[$id])) {//si existe ese id en el array de recursos\n $resource = $resources[$id];//cojo el id que esta en el array de recursos\n $idInput = $id;//en la variable idInput mete el id que hay(el que ponemos nosotros por defecto)\n $nameInput = $request->input('name');//en la variable nameInput meto el valor que estoy escribiendo en el input del name\n $prieceInput = $request->input('priece');//en la variable prieceInput meto el valor que estoy escribiendo en el input del price\n $resource['id'] = $idInput;//meto en el recurso del id el valor del idInput\n $resource['name'] = $nameInput;//meto en el recurso del name el valor del nameInput\n $resource['priece'] = $prieceInput;//meto en el recurso del precio el valor del prieceInput\n $resources[$idInput] = $resource;//mete el nuevo id en el array de recurso\n $request->session()->put('resources', $resources);\n return redirect('resource')->with('message', 'Se ha editado el elemento correctamente');\n }\n }\n return back()->withInput();//te lleva a la pantalla del index\n }", "title": "" }, { "docid": "fc59c0e54a38762a43464491404f10d3", "score": "0.5597341", "text": "function startPut($resource, $id, array $data);", "title": "" }, { "docid": "c0db760cd21841392ea5c5ef4b2148cc", "score": "0.559549", "text": "public function update(Request $request, $id)\n {\n $datos=request()->except('_token','_method');\n\n if($request->hasFile('imagen')){\n $dato=productos::findOrFail($id);\n Storage::delete('public/'.$dato->imagen);\n $datos['imagen']=$request->file('imagen')->store('uploads','public');\n }\n\n\n\n productos::where('id','=',$id)->update($datos);\n return redirect('productos');\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "dffb1371124c6ce8693c2368a83f9606", "score": "0.55781215", "text": "public function update($param = array()) {\n $tail = '/' . $this->getUrlTail() . '/' . $this->getId();\n\n $url = $this->getService()->getUrl($tail);\n return $this->getClient()->put($url, $param);\n }", "title": "" }, { "docid": "8a53b6bc58310fb381219eebcf9b209d", "score": "0.55695176", "text": "public function update(Request $request, $id)\n {\n $product = new Product;\n\n $productData['name'] = $request->name;\n $productData['slug'] = str_slug($request->name);\n $productData['cpu'] = $request->cpu;\n $productData['ram'] = $request->ram;\n $productData['storage'] = $request->storage;\n $productData['display'] = $request->display;\n $productData['vga'] = $request->vga;\n $productData['battery'] = $request->battery;\n $productData['weight'] = $request->weight;\n $productData['material'] = $request->material;\n $productData['kind'] = $request->kind;\n $productData['condition'] = $request->condition;\n $productData['price'] = $request->price;\n $productData['promotion'] = $request->promotion;\n $productData['status'] = $request->status;\n $productData['featured'] = $request->featured;\n $productData['warranty'] = $request->warranty;\n $productData['description'] = $request->description;\n $productData['category'] = $request->category;\n if ($request->hasFile('img')) {\n $img = $request->img->getClientOriginalName();\n $productData['img'] = $img;\n $request->img->storeAs('./public/img', $img);\n }\n\n $product::where('product_id', $id)->update($productData);\n\n return redirect('admin/product');\n }", "title": "" }, { "docid": "a86060f0afd44ec384ed886d347caa73", "score": "0.55676407", "text": "abstract protected function save($resource);", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "6696001dcc15e351e03c08acc8b2bcd9", "score": "0.5565939", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->has('file')) {\n $this->removeImage(FileConstant::PRODUCTS_IMAGES, $product->image_id);\n $image = GenericController::saveImage($request, 'file', FileConstant::PRODUCTS_IMAGES);\n $product->image_id = $image->id ?? null;\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->ingredient = $request->ingredient;\n $product->product_code = $request->product_code;\n $product->save();\n $product->tags()->detach();\n $product->tags()->attach($request->tags);\n return redirect()->route('manage_store')->with('success_message', 'Product successfully update.');\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "3e1652dc1efabe740a60dc879dc15b5a", "score": "0.5555882", "text": "public function update($id)\n\t{\n\t\t$this->resource->avatar = strlen(Input::get('_delete')) ? : STAPLER_NULL ; \n\t\tif ($this->resource->store(Input::all())) {\n\t return $this->respondTo(\n\t \tarray(\n\t \t\t'html' => function()\n\t \t\t\t\t {\n\t \t\t\t\t \treturn Redirect::route('admin.profiles.show', ['users' => $this->resource->id])\n\t \t\t\t\t->with('notice', 'Profile updated');\n\t \t\t\t\t }, \n\t \t\t'js' => function()\n\t \t\t\t\t{\n\t \t\t\t\t\treturn $this->resource;\n\t \t\t\t\t}\n\t \t\t)\n\t \t);\n\t }\n\t else {\n\t \treturn $this->respondTo(\n\t \t\tarray(\n\t \t\t\t'html' => function()\n\t \t\t\t\t\t {\n\t \t\t\t\t\t \treturn Redirect::action('admin\\Profiles@edit', ['user' => $this->resource])\n\t\t\t\t ->withInput(Input::all())\n\t\t\t\t ->withErrors($this->resource->errors());\n\t \t\t\t\t\t },\n\t \t\t\t'js' => function()\n\t \t\t\t{\n\t \t\t\t\treturn $this->resource->errors();\t\n\t \t\t\t},\n\t \t'status' => 422\n\t \t\t\t)\n\t \t\t);\n\t } \n\t}", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.55530256", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "6fd81565fe0197d15ae9c289b0ce5a96", "score": "0.5542752", "text": "public function updateResourceDimensions();", "title": "" }, { "docid": "b518a7b9f54c3cdcab6b1c0bdd364908", "score": "0.55392486", "text": "public function update(Request $request, $id)\n {\n $data=$this->validate($request,[\n 'icon'=>'required',\n 'main_title'=>'required',\n 'title'=>'required',\n 'description'=>'required',\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n unlink(\"/storage/$path\");\n $path=$request->file('thumbnail')->store('Thumbnail');\n $data['thumbnail']=$path;\n }\n \n ChooseUs::where('id',$id)->update($data);\n return redirect()->route('listChooseUs');\n\n }", "title": "" }, { "docid": "f876ddfae189152894b680ec80767669", "score": "0.553887", "text": "public function update(Request $request)\n {\n //\n //dd($request->all());\n\n $id = $request->input('eid');\n $name = $request->input('ename');\n $quantity = $request->input('equantity');\n $price = $request->input('eprice');\n $date = date(\"Y-m-d H:i:s\");\n\n //reading all products from file\n $products = Storage::disk('local')->get('public/products.json');\n $products = json_decode($products, true);\n\n //$id = count($products) + 1;\n //saving new producto in memory\n for ($i=0; $i < count($products); $i++) { \n if($products[$i]['id'] == $id){\n $products[$i] = [\n 'id' => $id\n ,'name' => $name\n , 'quantity' => $quantity\n , 'price' => $price\n , 'date' => $date\n ];\n }\n }\n \n\n Storage::put('public/products.json', json_encode($products));\n // dd($products);\n return redirect('/');\n }", "title": "" }, { "docid": "8c1b71d7fe33d5951e76205cc098ab6f", "score": "0.5534759", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeObject($path, $resource, $config);\n }", "title": "" }, { "docid": "fd7ccf27b5b1585736a504a174476b51", "score": "0.55280495", "text": "public abstract function update($entity);", "title": "" }, { "docid": "2ed29b085a06b0ff193e001c8b6edc77", "score": "0.55265594", "text": "public function update(Request $request)\n {\n\n\n\n $product = Product::Find($request->pid);\n\n $product->product_name = $request->productName;\n $product->cantidad = $request->cantidad;\n $product->pCompra = $request->pCompra;\n $product->pBase = $request->pBase;\n $product->isr = $request->isr;\n $product->iva = $request->iva;\n $product->pVenta = $request->pVenta;\n $product->utilidad = $request->utilidad;\n\n if( $request->imagenProducto ){\n\n $file = $request->file('imagenProducto');\n $nombre = $file->getClientOriginalName();\n\n Storage::disk('productos')->put( $nombre , File::get($file));\n\n $product->imagen = $file->getClientOriginalName();\n\n $product->save();\n\n return true;\n\n }else{\n\n $product->save();\n\n return true;\n\n }\n\n\n\n }", "title": "" }, { "docid": "030a7c4a93d5d783d93752dbd039d0a4", "score": "0.5526432", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n $product->fill($request->except('image'));\n\n if($request->offered == 'on'){\n $product->offered = true;\n }\n else{\n $product->offered = false;\n }\n\n if($request->hasFile('image'))\n {\n $image = $product->images->where('position', 1)->first();\n Storage::delete($image->url);\n $product->images()->detach($image);\n $image->delete();\n\n $imageProduct = $this->storeImage($request->file('image'), 1);\n $product->images()->attach($imageProduct);\n }\n\n $product->save();\n\n return redirect()->route('products.updated', $product->store);\n }", "title": "" }, { "docid": "57943537b2639b438b8481f3c079a88f", "score": "0.5518334", "text": "public function update(string $resourceId, array $params)\n {\n\n\n $isDefaultFile = $this->isDefaultFile($resourceId);\n $srcPath = $params['src_path'];\n $fileWasProvided = (null !== $srcPath);\n $content = $this->getCommitListContent();\n $userRelPath = $params['user_rel_path'];\n $files = $params['files'];\n\n if (true === $isDefaultFile) {\n $section = \"to_update\";\n } else {\n $section = \"to_add\";\n }\n\n\n $resources = $content[$section];\n if (array_key_exists($resourceId, $resources)) {\n\n /**\n * If the user doesn't provide a file, but the entry exists in the to_update section, this means\n * that the user already used the gui to upload a file previously, and so the entry (in to_update) has been created and files\n * exist already on the vfs, and now the user updates the file again, but this time just the meta-data (i.e. not the file).\n * In that case, we move the old files to the new location (if the name has changed).\n *\n */\n $resource = $resources[$resourceId];\n $this->updateResourceFilePaths($resource, $files, $userRelPath);\n }\n\n\n $this->storeEntry($params, [\n \"resourceId\" => $resourceId,\n \"dry\" => !$fileWasProvided,\n \"section\" => $section,\n ]);\n\n }", "title": "" }, { "docid": "4238630fe835e2630790aa3af70cdd6d", "score": "0.5511568", "text": "public function update($segement);", "title": "" }, { "docid": "6151cf096d056f5c54e0c8112d1f45b1", "score": "0.5504522", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->fill($request->except('image', 'product_categories'));\n $product->is_visible = $request->has('is_visible');\n $product->is_alcoholic = $request->has('is_alcoholic');\n $product->is_visible_when_no_stock = $request->has('is_visible_when_no_stock');\n $product->price = str_replace(',', '.', $request->price);\n\n if ($request->file('image')) {\n $file = new StorageEntry();\n $file->createFromFile($request->file('image'));\n\n $product->image()->associate($file);\n }\n\n $product->account()->associate(Account::findOrFail($request->input('account_id')));\n\n $categories = [];\n if ($request->has('product_categories') && count($request->input('product_categories')) > 0) {\n foreach ($request->input('product_categories') as $category) {\n $category = ProductCategory::find($category);\n if ($category != null) {\n $categories[] = $category->id;\n }\n }\n }\n $product->categories()->sync($categories);\n\n $this->setRanks();\n\n $product->save();\n\n $request->session()->flash('flash_message', 'The product has been updated.');\n\n return Redirect::route('omnomcom::products::edit', ['id' => $product->id]);\n\n }", "title": "" }, { "docid": "d5316b557cb97c988d4dd7ad08ef95bf", "score": "0.55043715", "text": "public function update(Request $request, $id)\n {\n $validatedData = $request->validate([\n 'name'=> 'required',\n 'email'=> 'required',\n 'phone'=> 'required',\n 'address'=> 'required',\n 'type'=> 'required',\n 'photo'=> 'nullable',\n 'shop'=> 'required',\n 'account_number'=> 'nullable',\n 'bank_name'=> 'nullable',\n ]);\n\n $supplier = Supplier::find($id);\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->type = $request->type;\n $supplier->shop = $request->shop;\n $supplier->account_number = $request->account_number;\n $supplier->bank_name = $request->bank_name;\n\n if($request->hasFile('photo') ){\n //delete old image first\n if(File::exists('images/supplier/'.$supplier->photo))\n {\n File::delete('images/supplier/'.$supplier->photo);\n }\n $image = $request->file('photo');\n $img = time().'.'. $image->getClientOriginalExtension();\n $location = public_path('images/supplier/'.$img);\n Image::make($image)->save($location);\n $supplier->photo = $img;\n }\n\n $supplier->save();\n\n $notification = array(\n 'message' => 'Successfully Supplier Updated!',\n 'alert-type' => 'success'\n );\n\n return Redirect()->route('supplier.index')->with($notification);\n }", "title": "" }, { "docid": "a58e121b784e418e2b8e2b169e227565", "score": "0.5503471", "text": "public function update(Request $request, $id)\n {\n $update = product::where('id', $id)->first();\n $update->name = $request['name'];\n $update->price = $request['price'];\n $update->stock = $request['stock'];\n $update->size = $request['size'];\n $update->category = $request['category'];\n $update->description = $request['description'];\n\n if($request->file('picture') == \"\")\n {\n $update->picture = $update->picture;\n } \n else\n {\n $file = $request->file('picture');\n $fileName = $file->getClientOriginalName();\n $request->file('picture')->move(\"image/\", $fileName);\n $update->picture = $fileName;\n }\n\n $update->update();\n\n Toast()->success('Edit Success');\n return redirect()->to('/product');\n }", "title": "" }, { "docid": "713a0d373529950deb3cb81f9c35f528", "score": "0.5502456", "text": "public function update(Request $request, $id)\n {\n // On check si la requête valide le schéma de données\n $this->validate($request, [\n 'name' => 'required|string|min:5|max:100',\n 'description' => 'required|string',\n 'price' => 'required|string|min:0|not_in:0',\n 'reference' => 'required|string',\n 'category_id' => 'required|integer',\n 'state' => 'required|in:standard,solde',\n 'sizes' => 'required|array',\n 'sizes.*' => 'integer', // pour vérifier un tableau d'entiers il faut mettre sizes.*\n 'status' => 'required|in:published,unpublished',\n 'title_image' => 'string|nullable', // pour le titre de l'image si il existe\n 'picture' => 'image|max:3000',\n ]);\n\n // On récupère le produit à modifier\n $product = Product::find($id);\n\n $product->update($request->all()); // associé les fillables\n \n // on utilisera la méthode sync pour mettre à jour les tailles dans la table de liaison\n $product->sizes()->sync($request->sizes);\n\n // on check si l'utilisateur entre un nom d'image et on utiliser la méthode update pour mettre à jour le titre de l'image dans la table de liaison\n if (isset($request->name_image)) {\n $product->picture()->update([\n 'title' => $request->name_image,\n ]);\n }\n \n // On récupère l'image de la requête\n $im = $request->file('picture');\n \n // On vérifie si l'image existe\n if (!empty($im)) {\n\n // On récupère le lien de l'image\n $link = $request->file('picture')->store('images');\n // On retire Homme ou Femme du lien\n $newLink = str_replace(['Homme', 'Femme'], '', $link);\n // suppression de l'image si elle existe \n if(!empty($product->picture)){\n $product->picture()->delete(); // supprimer l'information en base de données\n }\n\n // mettre à jour la table picture pour le lien vers l'image dans la base de données\n $product->picture()->create([\n 'link' => $newLink,\n 'title' => $request->new_name_image?? $request->new_name_image\n ]);\n \n }\n\n //On retourne l'utilisateur vers la vue products index\n return redirect()->route('products.index')->with('message', 'success');\n }", "title": "" }, { "docid": "cab0a1cd64b69a7208a1539e0b20d010", "score": "0.54981893", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $update_data = $request->all();\n if ($request->hasFile('image')) {\n $extension = $request->file('image')->getClientOriginalExtension();\n $name = 'product_' . Str::random(5) . '.' . $extension;\n $path = \"assets/images/product/\";\n $request->file('image')->move($path, $name);\n $update_data['image'] = $path . $name;\n }\n if ($request->commission_percent) {\n $update_data['reseller_commission'] = $request->sell_price * ($request->commission_percent / 100);\n }\n $product->fill($update_data)->save();\n Toastr::success('Product Updated Successfully', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect()->to('/admin/product');\n }", "title": "" }, { "docid": "42a9d3235a287a318bd9326858f1dd4f", "score": "0.5497566", "text": "public function update(Request $request, $id)\n {\n $data = $request->except(['_token']); \n \n if ($request->hasFile('photo')) { \n $file = $request->file('photo');\n $filename = $file->getClientOriginalName();\n \n $destinationPath = base_path() . '/public/uploads/product';\n $file->move($destinationPath, $filename);\n \n $data['photo'] = $filename; \n }\n \n $update = \\DB::table('products')->where('id',$id)->update($data);\n \n if($update){\n \n return back()->with('success', 'Product has been updated.');\n }\n \n return back()->withInput();\n }", "title": "" }, { "docid": "c7993a3cf0cd18ff840d680b772b6dfe", "score": "0.5492069", "text": "public function update($id)\n\t{\n $model = $this->model;\n $resource = $model::find($id);\n\n if (!$resource) {\n return Response::apiNotFound();\n }\n\n $input = Input::all();\n\n try {\n $this->validator->validate($input);\n $resource->update($input);\n return Response::api(['resource' => $resource]);\n } catch (InputValidationException $e) {\n return Response::apiValidationErrors($e->getValidationErrors(), $e->getMessage());\n }\n\t}", "title": "" }, { "docid": "2cdc5be0acb052f86187218c7c65a79e", "score": "0.54920435", "text": "public function update_resources()\n\t{\n\t\tglobal $Mysql;\n\t\t\n\t\t// TODO: Make a way for newly-completed building upgrades to change this calculation.\n\t\t$seconds_passed = time() - $this->last_resource_update;\n\t\t$hours_passed = $seconds_passed / 3600;\n\t\t$this->resources->update($hours_passed);\n\t\t$this->last_resource_update = time();\n\t}", "title": "" }, { "docid": "8ad8f4cfd5795198c9d578ad85ec6def", "score": "0.54816514", "text": "public function update(ProductRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n if($request->hasFile('cover'))\n\t\t{\n Storage::disk('gcs')->delete($product->cover);\n $product->cover = Storage::disk('gcs')->put('products', $request->file('cover'));\n }\n $product->name = $request->name;\n $product->stock = $request->stock;\n\t\t$product->description = $request->description;\n\t\t$product->short_description =$request->short_description;\n\t\t$product->price =$request->price;\n $product->url = substr(str_slug($request->name),0,191);\n $product->category_id =$request->category_id;\n $product->save();\n return response()->json($product);\n }", "title": "" }, { "docid": "50ed1ecdb9317f01c85501581feccf07", "score": "0.54803365", "text": "public function update(Request $request, $id)\n { \n \n /* $file = $request->file('image');\n \n $name = $request->file('image')->getClientOriginalName(); //obtener nombre de archivo\n $file->move('storage', $name); //mover archivo a la carpeta store */\n \n $Service = Service::find($id);\n\n /* $Service->descripcion = $request->descripcion;\n $Service->host = $request->host;\n $Service->ip = $request->ip;\n $Service->image = $name; */\n \n $Service->update($request->all());\n \n return response()->json($Service, 200);\n }", "title": "" }, { "docid": "9597f2dbc4718b9f333e4446e6945f31", "score": "0.5478411", "text": "public function update($data) {\n }", "title": "" }, { "docid": "a4f2a1763433a848120dc2bf3227c04e", "score": "0.5473484", "text": "public function update(Request $request, $id)\n {\n $market = Market::find($id);\n if(isset($request->path)){\n $path = $request->file('path')->store('uploads', 'public');\n } else {\n $path = $market->path;\n }\n\n $market->update([\n 'servicename' => $request->servicename,\n 'price' => intval($request->price),\n 'description' => $request->content,\n 'path' => $path\n ]);\n session()->flash('success', 'Продукт успешно обновлен');\n return redirect()->route('market.index');\n }", "title": "" }, { "docid": "cd38b27f190e5c07f073bbe2dbf11656", "score": "0.54676557", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n\n try {\n\n $filename = $product->image;\n\n if($request->hasFile('image')){\n\n $filename = $this->file_manager->manageFile($request->file('image'), 'images/products');\n }\n\n $product->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'image' => $filename,\n ]);\n \n } catch (Exception $e) {\n \n DB::rollBack();\n\n return back();\n }\n\n DB::commit();\n\n return redirect()->route('products.index')->with('success', 'Product successfully updated');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "d5e71c0d1e98d1666d257e78c12ddd49", "score": "0.54569525", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $extension = $file->getClientOriginalExtension();\n $filename = 'images/products/' . time() . '.' . $extension;\n $file->move('public/images/products', $filename);\n $product->image = $filename;\n $update_product = array(\n 'image' => $product->image,\n 'status' => $request->status\n\n );\n } else {\n $update_product = array(\n 'status' => $request->status\n );\n }\n $product->update($update_product);\n return redirect('admin/products');\n }", "title": "" }, { "docid": "b4084f98de3322212bce3e8332459ba2", "score": "0.5453466", "text": "public function update(ArticleStoreRequest $request, Article $article): ArticleResource\n {\n $article->update($request->validated());\n\n $updated_article = $this->attachOrDetachTagsOfArticle(\n $article,\n $request->tags\n );\n\n $updated_article->save();\n\n return new ArticleResource(\n $updated_article\n );\n }", "title": "" }, { "docid": "6bbe8dedc2a827e34e1daaab8e4e817f", "score": "0.5453419", "text": "public function update(Request $request, $id)\n {\n $asset = Asset::find($id);\n $asset->name = $request->name;\n $asset->quantity = $request->quantity;\n $asset->price = $request->price;\n $asset->save();\n\n $status = [\n 'status' => 'info',\n 'msg' => 'Data berhasil di update'\n ];\n\n return redirect()->route('asset.index')->with( $status );\n }", "title": "" }, { "docid": "5909b7d875e8ebaed077d9aaa3103ffe", "score": "0.54499286", "text": "public function update(Request $request, $id)\n {\n $resident = Resident::findOrFail($id);\n $resident->update($request->except('photo_path'));\n if ($request->hasFile('photo_path')) {\n if ($resident->photo_path != '') Storage::disk('public')->delete($resident->photo_path);\n $path = $request->file('photo_path')->store('residents', 'public');\n $resident->update(['photo_path'=>$path]);\n }\n return redirect()->route('resident.index')->with('updated', 'Morador atualizado com sucesso!');\n }", "title": "" }, { "docid": "2917b6683ccb6c65cb2fb9e85bb625aa", "score": "0.5445316", "text": "public function update(Request $request, $id)\n {\n //获取要编辑的信息\n $Resources = $request->only(['name','type','size','file','status']);\n DB::table(\"Resources\")->where(\"id\",$id)->update($Resources);\n //返回试图\n return redirect('admin/shangchuan');\n }", "title": "" }, { "docid": "0e009016b15cbda45fcf52d873daf0b4", "score": "0.5444949", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'short_description' => 'required',\n 'price' => 'required',\n ]);\n // File Upload\n if ($request->hasFile('image')){\n // Get Filename with extension\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n // Get just Filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just Ext\n $extension = $request->file('image')->getClientOriginalExtension();\n // Store Filename | Not overwrite image with same name\n $filenameStore = $filename.'_'.time().'.'.$extension;\n // Upload Image\n $path = $request->file('image')->storeAs('public/images/resto-product', $filenameStore);\n }\n // Create\n\n $resto_product = RestoProduct::find($id);\n $resto_product->title = $request->input('title');\n $resto_product->short_description = $request->input('short_description');\n $resto_product->price = $request->input('price');\n $resto_product->user_id = auth()->user()->id;\n if ($request->hasFile('image')){\n Storage::delete('public/images/resto-product'.$resto_product->image);\n $resto_product->image = $filenameStore;\n }\n $resto_product->save();\n\n return redirect('/menu-resto/resto-product')->with('success', 'Product Updated Successfully');\n }", "title": "" }, { "docid": "1d5c7db46310d9215057b0295ae4acf6", "score": "0.54426396", "text": "public function update($record, $request);", "title": "" }, { "docid": "8382479b28e811b0d9d1127b0c9f7585", "score": "0.54411286", "text": "public function update(Request $request, $id)\n {\n $scaleWeightItem = ScaleWeightItem::findOrFail($id);\n\n $scaleWeightItem->license_number = $request->get('license_number');\n $scaleWeightItem->driver = $request->get('driver');\n $scaleWeightItem->machine_code = $request->get('machine_code');\n $scaleWeightItem->user = $request->get('user');\n $scaleWeightItem->vendor = $request->get('vendor');\n $scaleWeightItem->item = $request->get('item');\n $scaleWeightItem->time = $request->get('time');\n $scaleWeightItem->gross_weight = $request->get('gross_weight');\n $scaleWeightItem->tare_weight = $request->get('tare_weight');\n $scaleWeightItem->net_weight = $request->get('net_weight');\n $scaleWeightItem->save();\n\n return new ApiResource($scaleWeightItem);\n }", "title": "" }, { "docid": "52cbf49d1c53df8eac032ede3b214556", "score": "0.5440425", "text": "public function update(Request $request, $id)\n {\n $this->authChecker();\n $item = $this->provider::findOrFail($id);\n $item->name = $request->name;\n $item->restoarea_id = $request->restoarea_id;\n $item->size = $request->size;\n $item->update();\n\n return redirect()->route($this->webroute_path.'index')->withStatus(__('crud.item_has_been_updated', ['item'=>__($this->title)]));\n }", "title": "" }, { "docid": "dfdcc32a6088cd7fa1a756fcbe3758df", "score": "0.5439689", "text": "public function update(UpdateResourceRequest $request, $id)\n {\n $user = $request->user();\n $resource = Resource::find($id);\n if ($request->has('resource_name')) {\n $resource->resource_name = $request->get('resource_name');\n }\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n\n return new ResourceResource($resource);\n }", "title": "" }, { "docid": "fcbb8aa272243ff1148fb420a9930d94", "score": "0.5439582", "text": "public function update()\n {\n $this->validate(request(), [\n 'title' => 'required|max:255',\n 'pages' => 'integer',\n 'year' => 'integer',\n 'isbn' => 'required',\n ]);\n\n $book = Book::findOrFail(request('id'));\n $raw = request(['title', 'isbn', 'price', 'description', 'format', 'year', 'pages', 'source', 'publisher', 'series', 'availability', 'bookbinding']);\n $raw['image'] = $book->image;\n $book->prepare($raw)->update();\n\n $book->attach(request(['author', 'category', 'publisher']));\n\n if (is_array(request('price'))) {\n $book->updatePrices(request('price'));\n }\n\n session()->flash('success_message', 'Книга обновлена');\n return redirect()->route('book.list');\n }", "title": "" }, { "docid": "85cc828ef538f860045b5d8fccb280b0", "score": "0.5435616", "text": "public function update($input, $id)\n {\n if (request()->hasFile('image')) {\n $destinationPath = 'storage/Stores/images';\n $file_info = getimagesize(request()->file('image'));\n if (empty($file_info)) { // No Image?\n Flash::error(trans('common.messages.valid_image'));\n return false;\n }\n $file = request()->file('image');\n $attach = $destinationPath . '/' . rand() . '-stores-' . date(\"d-m-y-H-M\") . '-' . $file->getClientOriginalName();\n $file->move($destinationPath, ($attach));\n $input['image'] = trim($attach);\n }\n\n $store = Store::findOrFail($id);\n $store->fill($input)->save();\n\n return $store;\n }", "title": "" }, { "docid": "5ad7cc720b3fecdc71fb75066e6e7715", "score": "0.5435329", "text": "public function update($id, Request $request)\n {\n $product = Product::find($id);\n $product->image_id = $request->image_id;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->sale_price = $request->sale_price ?? $request->price;\n\n $product->save();\n\n return redirect(route('product.edit', $id));\n }", "title": "" }, { "docid": "b8c2f01239a4821e25335f10d24bed76", "score": "0.5433148", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if (!$product) return redirect(route('products.index'));\n\n $this->validate($request,[\n 'name' => 'required',\n 'sell_price' => 'required|numeric',\n 'origin_price' => 'required|numeric',\n 'provider_id' => 'required|exists:providers,id',\n ]);\n Product::where('id',$id)\n ->update([\n 'name' => $request->name,\n 'sell_price' => $request->sell_price,\n 'origin_price' => $request->origin_price,\n 'provider_id' => $request->provider_id,\n ]);\n\n if ($request->hasFile('image')) {\n $file = $request->file('image'); \n $filename = time() . time() * 360 . time() * 1024 . \".\" . $file->extension();\n \n $oldImage = $product->image->filename;\n\n Photo::where('id',$product->image->id)\n ->update([\n 'filename' => $filename,\n 'filesize' => $file->getClientSize(),\n 'extension' => $file->extension(),\n 'product_id' => $product->id,\n ]);\n $path = $file->move($this->path,$filename);\n File::delete($this->path . '/' . $oldImage);\n \n }\n session()->flash('message', 'تمت عملية التعديل بنجاح');\n session()->flash('status', 'success');\n return redirect(route('products.index'));\n }", "title": "" }, { "docid": "d9dfa985a23d52a88c5d6e0bc4baac1d", "score": "0.5432292", "text": "public function updateAction()\n {\n if ($this->request->hasArgument('uUID')) {\n $uuid = $this->request->getArgument('uUID');\n }\n if (empty($uuid)) {\n $this->throwStatus(400, 'Required uUID not provided', null);\n }\n $ordenstypObj = $this->ordenstypRepository->findByIdentifier($uuid);\n if (is_object($ordenstypObj)) {\n $ordenstypObj->setOrdenstyp($this->request->getArgument('ordenstyp'));\n $this->ordenstypRepository->update($ordenstypObj);\n $this->persistenceManager->persistAll();\n $this->throwStatus(200, null, null);\n } else {\n $this->throwStatus(400, 'Entity Ordenstyp not available', null);\n }\n }", "title": "" }, { "docid": "82dea4a48b80657331cbfd5c532ed380", "score": "0.54306734", "text": "public function _put() {\n\t\tif (!empty($this->id)) {\n\t\t\t$row = $this->getDb()[$this->id];\n\t\t\tif ($row) {\n\t\t\t\t$this->result = $row->update($this->data);\n\t\t\t}\n\t\t}\n\t\t$this->result;\n\t}", "title": "" }, { "docid": "d0cf26e6c4b3f625b549a6d0140e162d", "score": "0.54216164", "text": "public function update(Request $request, $id)\n {\n\n $image = Image::find($id);\n\n if ($request->hasFile('image')) {\n $imageName = $request->image;\n $imageName_new_name = time().$imageName->getClientOriginalName();\n $imageName->move('storage/',$imageName_new_name);\n $imageName = '/storage/'.$imageName_new_name;\n\n $image->path = $imageName;\n }\n\n $image->name = $request->name;\n $image->product_id = $request->product_id;\n $image->save();\n Session::flash('success','cập nhật thành công thành công!');\n\n return redirect()->route('admin.image.index');\n }", "title": "" }, { "docid": "0159915c79f2e062ee97c0758cf5fc6d", "score": "0.54203194", "text": "public function update(string $data);", "title": "" }, { "docid": "50927265cd4834e00622acc58400363a", "score": "0.54201615", "text": "public function update(Request $request, $id)\n {\n $product = Product::Find($id);\n\n if($product === NULL)\n return view('errors.404');\n\n if(Gate::denies('update-product' , $product))\n return view('errors.refused');\n\n\n $request->validate([\n 'name' => ['required', 'string' , 'max:255'],\n 'description' => ['required' , 'string' , 'min:5' , 'max:500'],\n 'price' => ['required' , 'numeric'],\n 'quantity' => ['required' , 'numeric']\n ]);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->price = $request->input('price');\n $product->quantity = $request->input('quantity');\n $product->id_user = Auth::user()->id;\n $product->visible = 1;\n\n\n if($request->hasFile('image')){\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n Storage::disk('public')->put($filename, File::get($image));\n $product->image = $filename;\n };\n\n $product->save();\n\n return redirect('/products');\n\n }", "title": "" }, { "docid": "a9bd5cde4f91473c17011fa280d1ed6e", "score": "0.5419226", "text": "public function update(StoreEditBiographie $request, $id)\n {\n $biographie = Biographie::find($id);\n\n $biographie->titre = $request->titre;\n $biographie->contenu = $request->contenu;\n if ($request->image != null)\n {\n Storage::disk('imgBiographie')->delete($biographie->image);\n \n \n $image = [\n \"name\" => $request->image,\n \"disk\" => \"imgBiographie\",\n \"w\" => 1000,\n \"h\" => 1000\n ];\n $biographie->image = $this->imageResize->imageStore($image);\n }\n\n $biographie->save();\n return redirect()->route('biographies.index',['biographie'=> $biographie->id]);\n }", "title": "" } ]
334afee0fe3b6e82f2cee9ac994d75e5
Sets the 'scope' member. Defines the navigation scope of this web application's application context. This basically restricts what web pages can be viewed while the manifest is applied. If the user navigates the application outside the scope, it returns to being a normal web page. If the scope is a relative URL, the base URL will be the URL of the manifest.
[ { "docid": "ae7e02d8fb82ccefa7b51905cc3d543b", "score": "0.6396727", "text": "public function setScope(string $value):void\n {\n $this->webManifest['scope'] = $value;\n }", "title": "" } ]
[ { "docid": "74a459b59e402ce6d9dd03c7a2dcab9b", "score": "0.62918836", "text": "public function setScope($scope = null);", "title": "" }, { "docid": "3135448ad133e1c944282d582fc72465", "score": "0.62148005", "text": "function setScope()\n {\n global $imSettings;\n $scope = $imSettings['search']['general']['defaultScope'];\n\n // Logged users can search in their private pages\n $pa = new imPrivateArea();\n if ($user = $pa->who_is_logged()) {\n foreach ($imSettings['search']['general']['extendedScope'] as $key => $value) {\n if (in_array($user['uid'], $imSettings['access']['pages'][$key]))\n $scope[] = $value;\n }\n }\n\n $this->scope = $scope;\n }", "title": "" }, { "docid": "c13e0bb3602c075e7d2212d393b11a7e", "score": "0.58678615", "text": "public function setScope($value)\n {\n $this->setProperty(\"Scope\", $value, true);\n }", "title": "" }, { "docid": "478fd95eb34f520ed9ccd604cad1d486", "score": "0.5721581", "text": "public function setScope(?string $scope): void\n {\n $this->scope = $scope;\n }", "title": "" }, { "docid": "478fd95eb34f520ed9ccd604cad1d486", "score": "0.5721581", "text": "public function setScope(?string $scope): void\n {\n $this->scope = $scope;\n }", "title": "" }, { "docid": "8e94861ddbb61bfda8d59d6354ef4837", "score": "0.5595052", "text": "public function setScope($scope)\n {\n $this->_scope = $scope;\n }", "title": "" }, { "docid": "ef9c5508b5ae0c4f2c33f81b1d49a883", "score": "0.54742515", "text": "public function setScope($scope) {\n return $this->setAttr('scope', $scope);\n }", "title": "" }, { "docid": "9a296cadc6828cbb940472c549fc29fb", "score": "0.5452044", "text": "public function setSignInScope(?UserSignInRecommendationScope $value): void {\n $this->getBackingStore()->set('signInScope', $value);\n }", "title": "" }, { "docid": "5d04d30a02c3b5ea914464224c3d9d48", "score": "0.5402268", "text": "function set_scope($value)\r\n\t{\r\n\t\t$this->_scope=$value;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "e02b2975f05260a5d3281b972011ea30", "score": "0.53519255", "text": "public function setScope($var)\n {\n GPBUtil::checkString($var, True);\n $this->scope = $var;\n\n return $this;\n }", "title": "" }, { "docid": "17cdd98159d0c05fd2a967b6698887d8", "score": "0.53226805", "text": "public function setScopeAccess($scopeAccess);", "title": "" }, { "docid": "6d99289af0ec37455310c3b40bb39a9c", "score": "0.52851844", "text": "public function setScope($value)\n {\n return $this->set(self::SCOPE, $value);\n }", "title": "" }, { "docid": "d32ef8b3835f0fc6cb54a9b87cc63dcc", "score": "0.5253874", "text": "public function setScope($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scope = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "571b71bd5fdfa0dcd1c4dbae790fa1e8", "score": "0.5242017", "text": "function setScope($scope) {\n $this->scope = $scope;\n }", "title": "" }, { "docid": "c8438df6820c8cf6c9de4e41bedf8634", "score": "0.512309", "text": "public function setScope(?string $scope): self\n {\n $this->scope = $scope;\n\n return $this;\n }", "title": "" }, { "docid": "dd55ed6080a33ce589f5e023ca8eb761", "score": "0.50261444", "text": "private function defineScopes() {\r\n define('APPLICATION_NAME', $this->appName);\r\n define('CREDENTIALS_PATH', $this->credentials);\r\n define('CLIENT_SECRET_PATH', $this->secret);\r\n define('SCOPES', implode(' ', array(\r\n Google_Service_Drive::DRIVE\r\n )\r\n ));\r\n }", "title": "" }, { "docid": "922a52b9355f3b19be09ab24d55dfc92", "score": "0.49579072", "text": "public function makeScopedUrl($scope = null)\n {\n return \\admin\\helpers\\qsRoute(null, [\n 'scoped_to' => $scope,\n ]);\n }", "title": "" }, { "docid": "1e00671981330958885dcb671109f220", "score": "0.49204138", "text": "public function setScope($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scope = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "c8d69848d3b173de3cab0c369d4ffd04", "score": "0.49060518", "text": "protected function setScope($scope)\n {\n $this->scope = is_string($scope) ? explode(',', $scope) : $scope;\n return is_array($scope) ? join(',', $scope) : $scope;\n }", "title": "" }, { "docid": "77d8e78b67e9a16a3ccfdfd33b088320", "score": "0.48814327", "text": "public function getScope()\n {\n if ($this->_request->getParam('store') !== null && strlen($this->_request->getParam('store'))) {\n return StoreScopeInterface::SCOPE_STORES;\n }\n // user is on the admin website level\n if ($this->_request->getParam('website') !== null && strlen($this->_request->getParam('website'))) {\n return StoreScopeInterface::SCOPE_WEBSITES;\n }\n // is user is on admin page, try to automatically detect his website scope\n if ($this->isAdminPage() && $this->_storeManager->getStore()->getWebsiteId()) {\n return StoreScopeInterface::SCOPE_WEBSITES;\n }\n // user is on the storefront\n if ($this->_storeManager->getStore()->getStoreId()) {\n return StoreScopeInterface::SCOPE_STORES;\n }\n // user at admin default level\n return 'default';\n }", "title": "" }, { "docid": "3efe465dcd2412dd8a8f8155242b4f5b", "score": "0.48495638", "text": "public function getScope()\n {\n return $this->config['scope'];\n }", "title": "" }, { "docid": "f49d696e8cba8353ce568f464cbccb01", "score": "0.48333156", "text": "public function setDefaultScope($defaultScope)\n {\n $this->defaultScope = $defaultScope;\n }", "title": "" }, { "docid": "c63d43bea4c3bad4c46121931ed71b83", "score": "0.48241627", "text": "public function setAccessTokenScope(?array $accessTokenScope): self;", "title": "" }, { "docid": "302244516d08c99bf0a5818686c5c5ea", "score": "0.48005572", "text": "public function setScopeType($val)\n {\n $this->_propDict[\"scopeType\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fe99af943c58be2fe73e074fe9eb42c2", "score": "0.47983035", "text": "public function setScopeType(?string $value): void {\n $this->getBackingStore()->set('scopeType', $value);\n }", "title": "" }, { "docid": "700ff693fba6b156ff0bb4e1fe622a76", "score": "0.46606684", "text": "protected function scope()\n {\n $scope = array_merge(\n (array) $this->rook->getScope(),\n (array) $this->bishop->getScope()\n );\n\n foreach($scope as $key => $val) {\n $scope[$key] = !empty($val[0]) ? $val[0] : null;\n }\n\n $this->scope = (object) array_filter(array_unique($scope));\n }", "title": "" }, { "docid": "c98f0f717f6733d09c236fefe5e661c1", "score": "0.4643585", "text": "public function setSkipAuthorizationIfScopeIsAllowed($skipAuthIfScopeIsAllowed);", "title": "" }, { "docid": "0e7c49677f6a505f8c9bb1f720486a4e", "score": "0.46215734", "text": "protected function setRequestedScopes()\n\t{\n\t\tif ( ! $this->request)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$scopes = array_filter(explode($this->embedsSeparator, $this->request->get($this->embedsKey)));\n\n\t\t$this->fractal->setRequestedScopes($scopes);\n\t}", "title": "" }, { "docid": "6285586f23c18d029df7fc4369554637", "score": "0.46084115", "text": "public function setScope($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Analytics\\Admin\\V1alpha\\AudienceFilterScope::class);\n $this->scope = $var;\n\n return $this;\n }", "title": "" }, { "docid": "6285586f23c18d029df7fc4369554637", "score": "0.46084115", "text": "public function setScope($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Analytics\\Admin\\V1alpha\\AudienceFilterScope::class);\n $this->scope = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0d005190a69894e171ef4a1f07690ab8", "score": "0.4586714", "text": "public function scopes();", "title": "" }, { "docid": "615c2e1ed09353bed7a950730a1e4934", "score": "0.4582367", "text": "public function setUserExperienceAnalyticsDeviceScope($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceScope\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "c963b32f0376a7afc60bbc82ab899038", "score": "0.45468655", "text": "protected function getDefaultScopes() {\n\n\t}", "title": "" }, { "docid": "6c487fd342564fef9ec57c53ec8f5d6a", "score": "0.45465842", "text": "public function setScopes(array $scopes)\n {\n foreach ($scopes as $scope) {\n $this->addScope($scope);\n }\n }", "title": "" }, { "docid": "30f4603f06f812e408438faa13551c5a", "score": "0.45419273", "text": "public function getScope() {\n return $this->getAttr('scope');\n }", "title": "" }, { "docid": "253b670d616ce701470584ce53a991fd", "score": "0.45389038", "text": "public function addScope(string $scope, array $parameters = []): void;", "title": "" }, { "docid": "a991c9616cdeb5d7c7059e1fac80f583", "score": "0.45291466", "text": "public function setScopes(array $scopes): void\n {\n $this->scopes = $scopes;\n }", "title": "" }, { "docid": "10a70deea22b470de52c4f8706564ce8", "score": "0.4494993", "text": "public function automaticScope($data)\n\t{\n\t\tif (!isset($data['scope']) || !$data['scope'])\n\t\t{\n\t\t\t$data['scope'] = 'site';\n\t\t}\n\t\treturn preg_replace(\"/[^a-zA-Z0-9]/\", '', strtolower($data['scope']));\n\t}", "title": "" }, { "docid": "da777634bf11babc35397e3bd70a9445", "score": "0.4486915", "text": "private function defaultScope() {\n\t $configService = \\Factory::getConfigService();\n\t\t$scopes = $configService->getDefaultScopeName();\n\n\t\tif($scopes==null || trim($scopes) ==\"\"){\n\t\t return null;\n\t\t}else{\n\t\t return $scopes; \n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "e58acc8658e1ac04e0ee08dddf208d2c", "score": "0.44758543", "text": "public function setScopes(?array $scopes): void\n {\n $this->scopes = $scopes;\n }", "title": "" }, { "docid": "a7d33f3a009e3b7933208f8fe0dec082", "score": "0.44694343", "text": "public function setScope(array $permissions)\n {\n $this->scope = $permissions;\n return $this;\n }", "title": "" }, { "docid": "7b3e0709a90f3c87a197b512263b513c", "score": "0.4458297", "text": "public function setScope($scope)\n {\n $this->scope = $scope;\n\n return $this;\n }", "title": "" }, { "docid": "371c319a9c92c83aa23cfc7ae6155581", "score": "0.44561633", "text": "public function get_scope() {\n return $this->scope;\n }", "title": "" }, { "docid": "9c73f0cdae0080fba7124ea5a304ca3f", "score": "0.44509995", "text": "protected function setPageHistory() {\n $s = new Zend_Session_Namespace('ultima_pagina');\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n $s->uri = (count($s->uri)) ? $s->uri : array();\n if (!preg_match(\"/^.*\\.(php|js|ico|gif|jpeg|jpg|JPG|png|css|html)$/i\", $url)) {\n $s->uri[3] = $s->uri[2];\n $s->uri[2] = $s->uri[1];\n $s->uri[1] = $s->uri[0];\n $s->uri[0] = $url;\n }\n }", "title": "" }, { "docid": "52a71987d439b6d465fd88c7cd36a5af", "score": "0.4446406", "text": "public function getScope() {\r\n\t\treturn $this->scope;\r\n\t}", "title": "" }, { "docid": "d764d0777408563d8be90198b41d6161", "score": "0.44062075", "text": "function get_scope()\r\n\t{ \r\n\t\treturn $this->_scope;\r\n\t}", "title": "" }, { "docid": "3ab3faca589426b53e234896b7ace08f", "score": "0.43830332", "text": "protected function getDefaultScopes()\n {\n if (in_array(\"openid\", explode(\" \", $this->scope))) {\n return $this->scope;\n } else {\n $scopes = explode(\" \", $this->scope);\n array_push($scopes, \"openid\");\n return join(\" \", $scopes);\n }\n }", "title": "" }, { "docid": "854f7d8f58aef5d5124bb996c71821b8", "score": "0.43607992", "text": "function getScope() {\n return $this->scope; \n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.4354866", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.4354866", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.4354866", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.4354866", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.4354866", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "453c1ecf105608e590afaf1c3ca63530", "score": "0.4354866", "text": "public function getScope()\n {\n return $this->scope;\n }", "title": "" }, { "docid": "f1055e5e9de6cde56d19c1dc9be694cd", "score": "0.43434137", "text": "protected function getOauthUrl($_scope = '') {\n return 'https://oauth.yandex.ru/authorize'\n\t\t\t. '?client_id=' . urlencode($this->provider['clientId'])\n . '&response_type=code&display=popup';\n\t}", "title": "" }, { "docid": "57919500f6529aab489712993ad3a4b8", "score": "0.43290117", "text": "protected function getDefaultScopes()\n {\n return isset($this->scope) ? $this->scope : ['scope' => 'read'];\n }", "title": "" }, { "docid": "f88ed4d3b8f4a66f9f8a0c79500461e7", "score": "0.43212676", "text": "public function addScope($scope) {\n array_push($this->scopes, $scope);\n return $this;\n }", "title": "" }, { "docid": "f6654722a63fee8d503ae9cfd8d72be6", "score": "0.43018967", "text": "protected function get_supported_scopes() {\n // Example:\n // return array(\"my-friends\", \"photos\", \"whatever-else\");\n return array();\n }", "title": "" }, { "docid": "e774ab76adfdc9a4cae192a99b8551cc", "score": "0.42900878", "text": "public function scope(): ?string\n {\n return $this->getConfig('scope');\n }", "title": "" }, { "docid": "476e47f0ee74e4d6df28ce355c33761a", "score": "0.42896417", "text": "public function setMinScope($minScope)\n {\n // If we did not get an allowed value we will throw an exception\n $tmp = array_flip(array(\"structure\", \"function\", \"body\"));\n if (!isset($tmp[$minScope])) {\n\n throw new \\InvalidArgumentException(\n 'The minimal scope ' . $minScope . ' is not allowed. It may only be \"structure\", \"function\" or \"body\"'\n );\n }\n\n // Set the new minimal scope\n $this->minScope = $minScope;\n }", "title": "" }, { "docid": "8e3c0babc9acffed0a5043c956896ff9", "score": "0.4287025", "text": "public function isScope()\n {\n if ($this->role == \"nore\" || $this->role == \"lore\" ||\n $this->role == \"lore_assist\") {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "0e00443edf89bd880da9597f2d5bf613", "score": "0.42833677", "text": "public function setNavigateTo(string $values)\n\t{\n\t\t$this->policies[] = 'navigate-to ' . $values;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "55aab778cec0639e842b6e86a49b6855", "score": "0.4272866", "text": "protected function getDefaultScopes()\n {\n return ['basic'];\n }", "title": "" }, { "docid": "c93691706b046ec81c63ec090874fa1b", "score": "0.4272251", "text": "public function setScopes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scopes = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "d6ce1cb1d811d7bbe8196a02bff6e845", "score": "0.4272161", "text": "public function skipAuthorizationIfScopeIsAllowed();", "title": "" }, { "docid": "b98bdbf4ff926269cf4604528dd09b2c", "score": "0.4253475", "text": "protected function getDefaultScopes()\n {\n return ['sports_tracking_data:write email contacts sports_tracking_data profile'];\n }", "title": "" }, { "docid": "a9d1abf9bb365527056dda1b7f7eb843", "score": "0.42415643", "text": "public function setUserExperienceAnalyticsDeviceScopes($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceScopes\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d3aafd67b814f214cc86fda30d24a63c", "score": "0.42202553", "text": "protected function _getScope()\n {\n if (!$this->_scope) {\n $this->_scope = $this->_storeFactory->create(\n [\n 'url' => $this,\n 'data' => ['code' => 'admin', 'force_disable_rewrites' => false, 'disable_store_in_url' => true],\n ]\n );\n }\n return $this->_scope;\n }", "title": "" }, { "docid": "31f54df8a8c109ff2dccd19726832cad", "score": "0.42166835", "text": "public function getScopeConfig(){\n return $this->scopeConfig;\n }", "title": "" }, { "docid": "720214ec23397fbef522107cca17e899", "score": "0.4214254", "text": "protected function _getScope()\n {\n if (!$this->_scope) {\n $this->_scope = $this->_storeFactory->create(\n [\n 'url' => $this,\n 'data' => ['force_disable_rewrites' => false, 'disable_store_in_url' => true],\n ]\n );\n }\n return $this->_scope;\n }", "title": "" }, { "docid": "dc9257ba64e7c7e5eebebc4821c2df26", "score": "0.42100427", "text": "public function setScopeType($scopeType)\n {\n $this->scopeType = $scopeType;\n return $this;\n }", "title": "" }, { "docid": "3465f1111215acc27ebb5a49d619fac8", "score": "0.4210017", "text": "public function authorize($scope = 'openid email');", "title": "" }, { "docid": "96aa8964459a64e4c557a3e62cb4dfec", "score": "0.42004004", "text": "public function getScope()\n {\n return $this->_scope;\n }", "title": "" }, { "docid": "96aa8964459a64e4c557a3e62cb4dfec", "score": "0.42004004", "text": "public function getScope()\n {\n return $this->_scope;\n }", "title": "" }, { "docid": "f51df1d21b690b0b12dd3174a93e6171", "score": "0.41968825", "text": "public function setScope(array $scopesList)\n {\n $this->_scope = $scopesList;\n return $this;\n }", "title": "" }, { "docid": "7c00a5c86fed01d26ba5a8ae474caff3", "score": "0.4190621", "text": "protected function getDefaultScopes()\n {\n return ['all'];\n }", "title": "" }, { "docid": "777ccab91996d7f6d2f8703a711b441b", "score": "0.41833156", "text": "private function pushScope($scope) {\n $this->scopeStack[] = $scope;\n $len = count($this->scopeStack);\n $this->currentScope = &$this->scopeStack[$len - 1];\n }", "title": "" }, { "docid": "2f07034d9cbebed7956fb4b74e7f1e6f", "score": "0.41800812", "text": "public function setFrameAncestors(string $values)\n\t{\n\t\t$this->policies[] = 'frame-ancestors ' . $values;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "645150b386981265991e2698d181a55e", "score": "0.41416776", "text": "public function initScope($data)\n {\n $this->scopeConfig->initScope($data);\n }", "title": "" }, { "docid": "f05c24154c5b39f80dcbd098a184c8da", "score": "0.41396546", "text": "public function setRoleScopeTags($val)\n {\n $this->_propDict[\"roleScopeTags\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "67a4f2f64a98fb58b618849ad5ed2e7a", "score": "0.41321012", "text": "public function listAllowedScopes()\n\t{\n\t\treturn [\n\t\t\tController::SCOPE_AJAX,\n\t\t];\n\t}", "title": "" }, { "docid": "b2e9a0e9bebdbde0a4885f7ee672a6ce", "score": "0.4130556", "text": "public function setScopes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Clarifai\\Auth\\Scope\\S::class);\n $this->scopes = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "a71e64f6089dccab38e83544ec3180e4", "score": "0.41263175", "text": "public function putScopeValue($scope, $value)\n {\n if (is_string($scope)) {\n $scope = $this->getScope($scope);\n }\n\n // Set in session\n $cacheKey = 'scope-'.$scope->scopeName;\n $this->putSession($cacheKey, $value);\n\n // Set in memory\n $scope->setScopeValue($value);\n\n // Set in widget memory\n if ($scope->type === 'widget' && ($widget = $this->makeFilterScopeWidget($scope))) {\n $widget->getFilterScope()->setScopeValue($value);\n }\n }", "title": "" }, { "docid": "18c23cfd706da3e88275695509b31d02", "score": "0.41261828", "text": "public function getScope(): ?string\n {\n return $this->scope;\n }", "title": "" }, { "docid": "18c23cfd706da3e88275695509b31d02", "score": "0.41261828", "text": "public function getScope(): ?string\n {\n return $this->scope;\n }", "title": "" }, { "docid": "18c23cfd706da3e88275695509b31d02", "score": "0.41261828", "text": "public function getScope(): ?string\n {\n return $this->scope;\n }", "title": "" }, { "docid": "b74ea1b121a1c9e204acb13c13d26928", "score": "0.41244614", "text": "public static function setUri()\n\t{\n\t\t\n\t\tself::$requestUri = ($qsa = strpos($_SERVER['REQUEST_URI'],'?')) ? substr($_SERVER['REQUEST_URI'],0,$qsa) : $_SERVER['REQUEST_URI'];\n\t\tself::$requestA = array_slice(explode('/',self::$requestUri),1);\n\t\t\n\t\t\n\t\t//setConfig(\"CMS_ROOT\",substr($_SERVER['PHP_SELF'],0,-strlen('index.php')));\n\t\t\n\t\t//script name = last item in array\n\t\t$a = explode(\"/\",$_SERVER['PHP_SELF']);\n\t\t$t = $a[count($a)-1];\n\t\t\n\t\t/*\n\t\tif(isset($_SERVER[\"HTTP_REFERER\"])){\n\t\t\t$this->refA = explode(\"/\",$_SERVER[\"HTTP_REFERER\"]);\n\t\t\t$t = array_search($_SERVER['SERVER_NAME'],$this->refA);\n\t\t\t$this->refA = array_slice($this->refA, ($t+1));\n\t\t}\n\t\t*/\n\t\t\n\t\t$tA = explode(\"/\",substr($_SERVER['PHP_SELF'],1,-(strlen($t) + 1)));\n\t\tdefine('BASE',substr($_SERVER['PHP_SELF'],0,-strlen($t)));\n\t\tif($tA[0] != ''){\n\t\t\tarray_splice(self::$requestA,0,count($tA));\n\t\t\t/*\n\t\t\tif(isset($this->refA)){\n\t\t\t\t$this->refA = array_slice($this->refA,count($tA)); \n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\t\n\t\tself::$requestUri = '/' . join('/',self::$requestA);\n\t}", "title": "" }, { "docid": "bf843d41542d87469abd7973b64e1c31", "score": "0.41239193", "text": "public function getScope();", "title": "" }, { "docid": "bf843d41542d87469abd7973b64e1c31", "score": "0.41239193", "text": "public function getScope();", "title": "" }, { "docid": "bf843d41542d87469abd7973b64e1c31", "score": "0.41239193", "text": "public function getScope();", "title": "" }, { "docid": "9c47dea7127cc91c5e3bb53d8bb45d49", "score": "0.40986562", "text": "public function getClientScopes();", "title": "" }, { "docid": "18be776ed146331f2f003f2a9f899441", "score": "0.40955785", "text": "public function __construct(\\Magento\\Framework\\App\\Config\\ScopeConfigInterface $scopeConfig) {\n $this->scopeConfig = $scopeConfig;\n }", "title": "" }, { "docid": "90e76a87d6fadf720bbbb7de1dcc4cf8", "score": "0.40909588", "text": "private function resolveScope()\n {\n $scopes = ['store', 'website'];\n $params = $this->request->getParams();\n\n $scope = array_filter($params, function ($key) use ($scopes) {\n return in_array($key, $scopes);\n }, ARRAY_FILTER_USE_KEY);\n\n if (empty($scope)) {\n return ScopeInterface::SCOPE_DEFAULT;\n }\n\n $scope = key($scope) . 's'; // Make string plural.\n\n return $scope;\n }", "title": "" }, { "docid": "a0bb1a0bd768e72c7910009afa2cedcb", "score": "0.40840843", "text": "public function before(BeforeScenarioScope $scope)\r\n {\r\n if (!$scope->getFeature()->hasTags())\r\n return;\r\n\r\n $tags = $scope->getFeature()->getTags();\r\n foreach ($tags as $tag) {\r\n $this->setMinkParameter(\"base_url\", $this->config[$tag]);\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "72f52aff14b8474727b68bf5a6fdb920", "score": "0.40840766", "text": "public function addScope($hash = \"\", $scope = \"\") {\n\t\tif(empty($hash) || strlen($hash) < 1) {\n\t\t\tthrow new Exception(\"Store hash cannot be empty\");\n\t\t}\n\t\tif(empty($scope) || !is_array($scope) || count($scope) < 1) {\n\t\t\tthrow new Exception(\"Scope cannot be empty\");\n\t\t}\n\n\t\t$hash = $this->_db->EscapeQueryStmt($hash);\n\n\t\tforeach($scope as $i => $s) {\n\t\t\t$s = $this->_db->EscapeQueryStmt($s);\n\n\t\t\t$sql = \"INSERT INTO BigCommerceAccountAppScope (Id, BigCommerceAccountId, Scope, Active) VALUES (NULL, (SELECT Id FROM BigCommerceAccount WHERE StoreHash = '{$hash}'), '{$s}', 1)\";\n\t\t\tif(!$this->_db->Query($sql)) {\n\t\t\t\t//TODO HANDLE\n\t\t\t}\n\t\t\tif($this->_db->GetLastInsertedId() < 1) {\n\t\t\t\t// TODO HANDLE\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "a3de54fb485958675365e78704c1762f", "score": "0.40829816", "text": "public function fetchAccessTokenScope();", "title": "" }, { "docid": "071da1421fb983b18427ba3fff38bb4f", "score": "0.4081861", "text": "protected function getDefaultScopes() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "3a4d9d554e50510e1ea452f5d3a228e4", "score": "0.4075565", "text": "protected function getDefaultScopes()\n {\n return ['core:*:*'];\n }", "title": "" }, { "docid": "9d44c8d44fd07726d3cb2d355a6838b2", "score": "0.40687177", "text": "public function test__HasScope() {\n\t\t// Set initial state\n\t\t$result = $this->_behavior->setScope( \"foo\" );\n\n\t\t// Verify method return value\n\t\tverify( $result )->equals( $this->_mockRestfulRecord );\n\t\tverify( $this->_behavior->hasScope( \"foo\" ) )->true();\n\t\tverify( $this->_behavior->hasScope( \"bar\" ) )->false();\n\t}", "title": "" }, { "docid": "31364286c7b540873695de0da2fc7daa", "score": "0.40668988", "text": "public function setRequestedScopes(array $scopes)\n {\n $this->fractal->setRequestedScopes($scopes);\n\n return $this;\n }", "title": "" } ]
7565834f7989387a62cc3e6bf546ffe5
test login with valid parameters and expect a 201
[ { "docid": "11dcc5b93f27c61ca4299af0f0ad4fd3", "score": "0.0", "text": "public function testLoginSuccessAndGetOrdersOfService() {\n $request = $this->getRequest();\n $request->setMethod('POST');\n\n $service = $this->getRandomService();\n $service->setPassword(md5('testen'));\n $service->save();\n\n $countOrders = $service->getOrders()->count();\n\n $order = new Yourdelivery_Model_Order($this->placeOrder(array('service' => $service)));\n $order->setStatus(Yourdelivery_Model_Order::AFFIRMED, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::COMMENT, 'testcase API Partner testLoginSuccessAndGetOrdersOfService'));\n // should be affirmed and ready for picking by driver\n\n $serviceNew = new Yourdelivery_Model_Servicetype_Restaurant($service->getId());\n $countOrdersNew = $serviceNew->getOrders()->count();\n\n $this->assertEquals($countOrders + 1, $countOrdersNew);\n\n\n //clear password if available\n if ($service->getPartnerData() !== null) {\n $service->getPartnerData()->setTemporaryPassword('');\n $service->getPartnerData()->save();\n }\n\n $request->setPost(array(\n 'nr' => $service->getCustomerNr(),\n 'pass' => 'testen'\n ));\n\n $this->dispatch('/get_partner_customer');\n $this->assertResponseCode(201);\n\n $data = $this->getResponse()->getBody();\n\n $doc = new DOMDocument();\n $doc->loadXML($data);\n\n $success = $doc->getElementsByTagName(\"success\");\n $this->assertEquals('true', $success->item(0)->nodeValue);\n\n $access = $doc->getElementsByTagName(\"access\")->item(0)->nodeValue;\n $this->assertEquals($service->getSalt(), $access);\n\n // now try to get orders from this service by using this access\n $this->resetRequest();\n $this->resetResponse();\n\n $this->dispatch('/get_partner_order?access=' . $access);\n $this->assertAction('index');\n $this->assertResponseCode(200);\n\n $data = $this->getResponse()->getBody();\n\n $doc = new DOMDocument();\n $doc->loadXML($data);\n $this->assertGreaterThanOrEqual(1, $doc->getElementsByTagName(\"order\")->length);\n\n // place another order and check count again\n $order2 = new Yourdelivery_Model_Order($this->placeOrder(array('service' => $service)));\n $order2->setStatus(Yourdelivery_Model_Order::AFFIRMED, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::COMMENT, 'testcase API Partner testLoginSuccessAndGetOrdersOfService'));\n // should be affirmed and ready for picking by driver\n // now try to get orders from this service by using this access\n $this->resetRequest();\n $this->resetResponse();\n\n $this->dispatch('/get_partner_order?access=' . $access);\n $this->assertAction('index');\n $this->assertResponseCode(200);\n\n $data = $this->getResponse()->getBody();\n\n $doc = new DOMDocument();\n $doc->loadXML($data);\n $this->assertGreaterThanOrEqual(2, $doc->getElementsByTagName(\"order\")->length);\n }", "title": "" } ]
[ { "docid": "68463a19eb2f1aec0bdaf6efcfcdb1b3", "score": "0.8026949", "text": "protected function login() {\n list($r, $s) = self::jsonRequest('POST', '/api/login',\n array(\n 'username' => $this::USER_EMAIL,\n 'password' => $this::USER_PASSWORD\n )\n );\n $this->assertEquals(201, $s);\n }", "title": "" }, { "docid": "12e5a4ecff411f99d32fb2d2992d0c8d", "score": "0.7994173", "text": "public function test_user_can_login_with_valid_data()\n {\n $response = $this->post(\n 'api/login',\n [\n 'email' => 'super_admin@gmail.com',\n 'password' => 'superadmin'\n ]\n );\n $response->assertOk();\n }", "title": "" }, { "docid": "a43769eb74a503acd1d12e2f5c1d34fb", "score": "0.7871274", "text": "public function testLoginValidData()\n {\n $response = $this->post('http://127.0.0.1:8000/api/login', ['email' => 'ebasem653@gmail.com', 'password' => '123456']);\n $this->assertEquals(200, $response->status());\n }", "title": "" }, { "docid": "9c5a30cca1d69e5b3ee545afd6a00cab", "score": "0.78033483", "text": "public function testUserLoginPostUri()\n {\n \t$response = $this->call('POST', '/user/login', ['email' => 'test@gmail.com', 'password'=> bcrypt('password')]);\n \t$this->assertEquals(302, $response->status());\n }", "title": "" }, { "docid": "91f27bd6c66d72501d0102119500ce6f", "score": "0.7792334", "text": "public function test_successful_login()\n {\n $response = $this->postJson('/api/login', [\n 'email' => Config::get('api.apiEmail'),\n 'password' => Config::get('api.apiPassword')\n ]);\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n \"expires_in\",\n \"access_token\",\n \"token_type\"\n ]);\n }", "title": "" }, { "docid": "b3a66472fa6ab7e78d0f940aa3ec9499", "score": "0.7746466", "text": "public function testLoginApiUserSemCredenciais()\n {\n $credentials = [\n 'email' => '',\n 'password' => 123456\n ];\n\n $response = $this->post('/api/login', $credentials);\n $response->assertStatus(401);\n }", "title": "" }, { "docid": "57bdbae5f425ef7c83466dec61cfa287", "score": "0.77419245", "text": "public function testLogin()\n {\n $response = $this->action('POST', 'V1\\UserController@postLogin');\n $this->assertTrue($this->client->getResponse()->isOk());\n }", "title": "" }, { "docid": "d4ac7b6dad272b1b108f1324ddbd94b1", "score": "0.771954", "text": "public function testUserLoginSuccessfully()\n {\n\n $response = $this->post('/login', [\n 'email' => 'admin@gmail.com',\n 'password' => 'adminadmin',\n ]);\n $response->assertRedirect('/home');\n }", "title": "" }, { "docid": "a5b7738fa997c5a875f3699d8df79395", "score": "0.7715106", "text": "public function testLogin()\n {\n $data = [\n 'username' => 'superadmin',\n 'password' => 'secret'\n ];\n\n $response = $this->post(url('api/login'), $data)\n ->assertStatus(200);\n }", "title": "" }, { "docid": "0cd80432f611b75bf2791990275e2892", "score": "0.7689319", "text": "public function testLogin()\n {\n $email = $this->email;\n $password = $this->password;\n\n $response = $this->json('POST', '/api/login', [\n 'email' => $email,\n 'password' => $password\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'access_token', 'token_type', 'expires_in'\n ]);\n }", "title": "" }, { "docid": "c66d1fad240902a574f1067b3b937094", "score": "0.7678931", "text": "public function testSuccessfullLogin()\n {\n $response = $this->json('POST', '/login', [\n 'email' => $this->users['exists']['email'],\n 'password' => $this->users['exists']['password'],\n ], [\n 'apikey' => $this->apiAuth['uuid'],\n ]);\n\n $response->assertResponseOK();\n $response->seeJsonStructure([\n 'data' => [\n 'token',\n ],\n ]);\n }", "title": "" }, { "docid": "00af2e232fa27f0d79bd3e773691c12e", "score": "0.76739156", "text": "public function testLoginApiUser()\n {\n $credentials = [\n 'email' => 'teste@gmail.com',\n 'password' => 123456\n ];\n\n $response = $this->post('api/login', $credentials);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "db74c51643740096e6137edf4a47b650", "score": "0.7672186", "text": "public function testSuccess()\n {\n\n $response = $this->post('/login', [\n 'email' => 'name@studentmail.ul.ie',\n 'password' => 'pass'\n ]);\n\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "4ed7f2be434bde1b6cc4465b2b56f65e", "score": "0.7588173", "text": "public function testLogin()\n {\n $apiHandler = $this->application->getKernel()->getContainer()->get('vtally.api_handler');\n \n //Case where login successfully for 1st verifier\n $inputData = array('action' => 600, 'username' => 'verifier1', 'password' => 'test');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('first_name' => 'VERIFIER 1', 'pol_id' => 'Pol. Station 1', 'verifier_token' => 'ABCD1'));\n \n //Case where login successfully for 2nd verifier\n $inputData = array('action' => 600, 'username' => 'verifier2', 'password' => 'test');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('first_name' => 'VERIFIER 2', 'pol_id' => 'Pol. Station 1', 'verifier_token' => 'ABCD2'));\n \n //Case login faild: wrong username\n $inputData = array('username' => 'verifier11', 'password' => 'test');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('Bad credentials.'));\n \n //Case login faild: wrong password\n $inputData = array('username' => 'verifier1', 'password' => 'testt');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('Bad credentials.'));\n }", "title": "" }, { "docid": "e2f7d13d5ce4f27f39f07d3e116cbd50", "score": "0.75876343", "text": "public function test_login_user()\n {\n\n \n $this->actingAs($this->defaultUser());\n\n $response = $this->json('POST', '/api/v1/auth/login', ['email' => 'demo@demo.com', 'password' => bcrypt('demo')]);\n\n $response->assertStatus(200);\n\n }", "title": "" }, { "docid": "9130b9b83005072b651efa0a137187bf", "score": "0.7543246", "text": "public function testLogin()\n {\n $clientData = new ClientData();\n $request = $clientData->getData();\n\n $response = $this->post('/oauth/token', $request);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "8fcb7336262c6aa86be4f63189263e13", "score": "0.75410086", "text": "public function testLogin()\n {\n // Disable brute-force attack protection\n $this->withoutThrottleMiddleware();\n $route = route('api.login');\n\n // Test incomplete credentials\n $response = $this->post($route);\n $response->assertStatus(422);\n $response->assertJsonValidationErrors(['email', 'password']);\n\n // Test invalid credentials\n $response = $this->post($route, [\n 'email' => 'test@example.com',\n 'password' => 'random',\n ]);\n $response->assertStatus(401);\n $response->assertJsonStructure(['error']);\n\n // Test valid credentials\n $response = $this->post($route, [\n 'email' => $this->user->getEmail(),\n 'password' => 'verysecret',\n ]);\n $response->assertOk();\n $response->assertJsonStructure(static::TOKEN_STRUCTURE);\n }", "title": "" }, { "docid": "fd50c44be4606628db70e598e3711ee9", "score": "0.75396454", "text": "public function testSuccessLogin()\n {\n \n $user = factory('App\\User')->create();\n\n $response = $this->call('POST', '/v1/auth/login', \n [\n 'email' => $user->email,\n 'password' => env('TEMP_PASSWORD'),\n ]\n );\n\n $this->assertEquals(200, $response->status());\n\n }", "title": "" }, { "docid": "34e4962f4c4e236a6df1cd1c1e158af2", "score": "0.7520641", "text": "public function testLogin()\n {\n $password = $this->faker->word;\n $user = factory(User::class)->create([\n 'password' => bcrypt($password)\n ]);\n\n $response = $this->json('post', '/api/v1/login', [\n 'email' => $user->email,\n 'password' => $password\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'data' => [\n 'id' => true,\n 'name' => true,\n 'email' => true\n ],\n 'meta' => [\n 'headers' => [],\n 'original' => [\n 'access_token' => true,\n 'token_type' => 'bearer',\n 'expires_in' => 0\n ],\n 'exception' => null\n ]\n ]);\n }", "title": "" }, { "docid": "2b63ed312021caaad3da40e614a4872c", "score": "0.7519838", "text": "public function test_login_form()\n {\n $response = $this->get('/login');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "eb37a8ea0689a7894e9b371bc39f9fe3", "score": "0.751692", "text": "public function testLogin()\n {\n $params = [\n 'username' => 'admin@success-ss.com.vn',\n 'password' => '123456'\n ];\n\n $response = $this->json('POST', env('APP_URL') . '/login', $params);\n\n $user = Auth::user();\n\n $this->assertEquals($params['username'], $user->username);\n\n $response->assertRedirect('admin/dashboard');\n }", "title": "" }, { "docid": "f83fa5363800d6741c40173f0b9356a6", "score": "0.75088567", "text": "public function LoginSuccesfull()\n {\n // as a user, I wrongly type my email and password\n $data = ['email' => 'admin@app.com', 'password' => 'secret'];\n // and I submit it to the login api\n $response = $this->call('POST', 'login', $data);\n // I should be able to login\n $this->assertEquals(HttpResponse::HTTP_ACCEPTED, $response->status());\n // assert there is a TOKEN on the response\n $content = json_decode($response->getContent());\n $this->assertObjectHasAttribute('token', $content);\n $this->assertNotEmpty($content->token);\n }", "title": "" }, { "docid": "5eff4136f3ac51720a13b3935066c76b", "score": "0.74966544", "text": "public function testUserLogin()\n {\n \n // Test request to login\n $response = $this->call('POST', '/api/v1/api-login',array(\"email\"=>\"admin@admin.com\" , \"password\"=>\"123\"));\n // Test request is not authorized\n $this->assertTrue(strpos($response->getContent(),\"You has been logged in Successfully!\")!==false);\n }", "title": "" }, { "docid": "ed92d37413cefd9d80b533c0deacb127", "score": "0.7495021", "text": "public function testLoginActionCorrectLogin()\n {\n $postData = array(\n 'email' => $this->testUserEmail,\n 'password' => $this->testUserPassword,\n );\n $this->dispatch('/user/login', 'POST', $postData);\n $this->assertResponseStatusCode(302);\n }", "title": "" }, { "docid": "b897708e760e36219afd33221f02b29b", "score": "0.74917686", "text": "public function firstLoginTest()\n {\n $response = $this->postJson('/api/organization/login', ['email' => 'test333@test.test', 'password' => '88888888']);\n $response->assertStatus(200)->assertJson(['token' => true]);\n }", "title": "" }, { "docid": "f261f796a6a99d2f105dc611087df4fc", "score": "0.74759024", "text": "public function testTelaLoginUser()\n {\n $response = $this->get('/login');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "b0dac3d5b598bd59571ca1a7e3abb9f3", "score": "0.7440982", "text": "public function testLoginSuccess()\n {\n factory(\\App\\Models\\User::class)->create();\n\n $response = $this->call('post', 'api/v1/user/', $this->_userLoginDetails);\n $this->assertEquals(200, $response->status());\n }", "title": "" }, { "docid": "e5e0d212586e2c41be6b12941d59c825", "score": "0.74346155", "text": "public function testLogin()\n {\n $user = factory(User::class)->create();\n\n $this->postJson('api/auth/login', ['email' => $user->email, 'password' => 'password'])\n ->assertStatus(200)\n ->assertJson(['status' => 'success']);\n }", "title": "" }, { "docid": "0f86c57cdb2bc51c22ce6b8afc7ac8e7", "score": "0.74063957", "text": "public function testExample()\n {\n $loginData = ['account_number' => 123456, 'password' => 'sample123'];\n\n $this->json('POST', 'api/account/login', $loginData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n 'success',\n 'message',\n 'data' => [\n 'token'\n ]\n ]);\n\n $this->assertAuthenticated();\n }", "title": "" }, { "docid": "24a7a2229aeecb685d5fec637e61eab4", "score": "0.7400255", "text": "public function testLogin()\n {\n $data = [\n 'email' => 'michel.bolzon123@gmail.com',\n 'password' => '1525605'\n ];\n $response = $this->post('login', $data);\n\n $subDomain = Tenant::first()->sub_domain;\n\n $response\n ->assertStatus(302)\n ->assertRedirect(\"$subDomain/home\");\n }", "title": "" }, { "docid": "52b0cfa5922edbe733eea4726439594e", "score": "0.7379737", "text": "public function testLoginSuccess()\n {\n\n $this->visit('/auth/login')\n ->type('julien@meetserious.com', 'email')\n ->type('123456', 'password')\n ->press('Connexion')\n ->followRedirects()\n ->seePageIs('/admin');\n }", "title": "" }, { "docid": "452636ae84d50fd0487c19356e425582", "score": "0.7354774", "text": "public function testSuccessfulUserLogin()\n {\n $userData = [\n \"email\" => \"user1@test.com\",\n \"password\" => \"test123\",\n \"device_name\" => \"testing\"\n ];\n\n $this->json('POST', 'api/v1/login', $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"data\" => [\n \"token\",\n \"user\" => [\n \"id\",\n \"name\",\n \"email\"\n ]\n ],\n \"code\",\n \"message\"\n ]);\n }", "title": "" }, { "docid": "62c225dccff35eb0795ad6e98b38fa02", "score": "0.73436904", "text": "public function test_login_user()\n {\n //Create user\n //attempt login\n $response = $this->json('POST', route('api.v1.login'), [\n 'email' => 'superadmin@demo.dev',\n 'password' => '123456',\n ]);\n //Assert it was successful and a token was received\n $response->assertStatus(200);\n $result = $response->json();\n $this->assertArrayHasKey('token', ['token' => $result['data']['access_token']]);\n }", "title": "" }, { "docid": "cbb0d0e594eb60ac0c6c0c63b112eaba", "score": "0.73236734", "text": "public function testLoginURL()\n {\n $response = $this->call('GET', '/login');\n\n $this->assertEquals(200,$response->status());\n }", "title": "" }, { "docid": "21e33b391b68f83a1de4e65eec4fc6ce", "score": "0.7308743", "text": "public function testLoginSuccess() {\n $request = $this->getRequest();\n $request->setMethod('POST');\n\n $service = $this->getRandomService();\n $service->setPassword(md5('testen'));\n $service->save();\n\n //clear password if available\n if ($service->getPartnerData() !== null) {\n $service->getPartnerData()->setTemporaryPassword('');\n $service->getPartnerData()->save();\n }\n\n $request->setPost(array(\n 'nr' => $service->getCustomerNr(),\n 'pass' => 'testen'\n ));\n\n $this->dispatch('/get_partner_customer');\n $this->assertResponseCode(201);\n }", "title": "" }, { "docid": "71811cd98aef2c8456bd1c749d293ef9", "score": "0.7291715", "text": "public function secondLoginTest()\n {\n $response = $this->postJson('/api/organization/login', ['email' => 'test333@test.test', 'password' => '88888888']);\n $response->assertStatus(403);\n }", "title": "" }, { "docid": "1ac715160cf64d88bd142f8509c8d78e", "score": "0.7273247", "text": "public function testLoginWithoutErrors()\n {\n $this->withoutExceptionHandling();\n User::factory()->create([\n \"email\" => \"business@example.com\",\n \"password\" => \"password\",\n ]);\n $data = [\n 'email' => 'business@example.com',\n 'password' => 'password',\n ];\n //Send post request\n $response = $this->json('POST','api/login',$data);\n //Assert it was successful\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'success',\n 'data' => [\n 'name',\n 'token'\n ],\n 'message',\n ]);\n }", "title": "" }, { "docid": "f80ca77be3988cf00dfda5e96b445353", "score": "0.72316176", "text": "public function testLoginPage()\n {\n $response = $this->get('/login');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "32b483430bcc2e2cbe9ec8ba2f84b4e1", "score": "0.72260463", "text": "public function testLoginActionInvalidLogin()\n {\n $postData = array(\n 'email' => 'foo@example.com',\n 'password' => 'password',\n );\n $this->dispatch('/user/login', 'POST', $postData);\n $this->assertResponseStatusCode(200);\n }", "title": "" }, { "docid": "f5b048101a81f1dc94230a80b60924f0", "score": "0.7210539", "text": "public function test_login_user()\n {\n //Given is user\n $this->json('POST', '/login', [\n 'password' => '12345',\n 'email' => 'hahn.kellie@aufderhar.biz'\n ]);\n //When they hit the endpoint /register create a new user, while passing necessary data \n $content = json_decode($this->response->getContent());\n \n //Then there should be a new record \n $this->assertObjectHasAttribute('token', $content, 'Token does not exists');\n\n \n }", "title": "" }, { "docid": "6a9ca5e322c34b9e947e5663d116053d", "score": "0.72086847", "text": "public function testCanLogin()\n {\n $user = User::first();\n $response = $this->withHeaders([\n 'Accept' => 'application/json'\n ])->json('POST', '/api/auth/login', ['email' => $user->email, 'password' => 'secret']);\n $response->assertStatus(200)->assertJson(['token_type' => 'bearer']);\n }", "title": "" }, { "docid": "9b6587944f93cf6e9312122e5e707fb5", "score": "0.7203524", "text": "public function testValidationForLogin()\n {\n $this->json('POST', 'api/v1/login', ['Accept' => 'application/json'])\n ->assertStatus(422)\n ->assertJson([\n \"message\" => \"Validation failed.\",\n \"data\" => [\n \"email\" => [\"The email field is required.\"],\n \"password\" => [\"The password field is required.\"],\n \"device_name\" => [\"The device name field is required.\"],\n ]\n ]);\n }", "title": "" }, { "docid": "2e20699d33b8f4ac8ac57ffb42d76e8f", "score": "0.7195855", "text": "function testWithLogin() {\n $this->_login_user = $this->_users_for_registration['super'];\n $this->setLoginCookie();\n $response = helper::jsonDecode($this->_rest->post($this->_uri . Reports::NOT_GLUTEN_FREE));\n //helper::p($response);\n $this->assertEquals(ApiHelper::MESSAGE_200, $response['status']);\n }", "title": "" }, { "docid": "26405edac33ca3afe1b0980a95a3a14c", "score": "0.7188455", "text": "public function testLoginFails()\n {\n $response = $this->json('POST', '/api/login', [\n 'email' => 'joe@blogs.com',\n 'password' => '123445',\n ]);\n\n $response\n ->assertStatus(401)\n ->assertExactJson([\n 'error' => 'Unauthorized'\n ]);\n }", "title": "" }, { "docid": "69d6fa56e16e9b3afb98806695fcea7c", "score": "0.7170278", "text": "public function testLoginAValidUser()\n {\n $user = User::find(1);\n\n $response = $this->post('/login', [\n 'email' => $user->email,\n 'password' => $user->password,\n ]);\n\n $response->assertStatus(302);\n\n $response = $this->actingAs($user, 'web');\n }", "title": "" }, { "docid": "8b2969620996aa75be121d76fd430185", "score": "0.71438617", "text": "public function test_login()\n\t{\n\t\t$this->assertFalse($this->auth->login('dave@davewidmer.net','wrongpassword'));\n\t\t$this->assertTrue($this->login());\n\t\t$this->assertTrue($this->auth->logged_in());\n\t}", "title": "" }, { "docid": "ceb07667970f10f7b23a4966f8c3f4a3", "score": "0.7131785", "text": "public function test_login_response_api_token()\n {\n $user = factory(User::class)->create();\n \n $this->assertDatabaseHas('users', $user->toArray());\n \n $user->password = 'secret';\n \n //Submit post request to create an user endpoint\n $response = $this->post('api/login', $user->toArray());\n \n //Verify in the database\n \n $this->assertNotEmpty(json_decode($response->content(),true)['result']['api_token']);\n \n }", "title": "" }, { "docid": "58529ec78981e064e4a3236a9bb15cec", "score": "0.7110819", "text": "public function testLogin()\n {\n $response = $this->call('GET', '/auth/login');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $response = $this->call('POST', '/auth/login', [\n 'email' => $this->email,\n 'password' => $this->password,\n '_token' => csrf_token(),\n ]);\n $this->assertRedirectedTo('/');\n $this->assertTrue(Auth::check());\n }", "title": "" }, { "docid": "6a20d45bb7d06ad558d72e2aee1b0d7a", "score": "0.7069841", "text": "public function testSuccessfulAuthTestCase()\n\t{\n\t\t$this->open('site/login');\n\t\t$this->assertTextPresent('Login');\n\t\t$this->type('name=LoginForm[username]', 'demo');\n\t\t$this->type('name=LoginForm[password]', 'demo');\n\t\t$this->clickAndWait(\"//button[.='Login']\");\n\t\t$this->assertTextNotPresent('Incorrect username or password');\n\t}", "title": "" }, { "docid": "f83f20b1f1a7f4b22e0ad69e06c9f1e7", "score": "0.70455855", "text": "public function testLogin() \n {\n $result = $this->_model->authenticate($this->_email, $this->_password);\n \n $noError = $result['error'] === false;\n \n $this->assertTrue($noError);\n \n $this->assertEquals($this->_email, $result['data']['email']);\n }", "title": "" }, { "docid": "00b86636db39886272f312cf7ef4531c", "score": "0.7045538", "text": "public function testBasicTest()\n {\n $response = $this->json('POST', 'auth/login', \n [\n 'email' => 'dana54@example.org', \n 'password' => 'secret'\n ]);\n \n dd($response->headers);\n $response\n ->assertStatus(200)\n ->assertJson([\n 'created' => true,\n ]);\n }", "title": "" }, { "docid": "750bf0c0f0387b925abcd1c6ea176453", "score": "0.704362", "text": "public function testCanLogin()\n {\n $user = factory(User::class)->create([\n 'remember_token' => ''\n ])->makeVisible(['remember_token','password'])->toArray();\n\n $this->json('POST', '/api/user/login', [\n 'email' => $user['email'],\n 'password' => 'secret',\n ])->assertJson([\n 'error' => false\n ])->assertStatus(Response::HTTP_OK);\n }", "title": "" }, { "docid": "c7835e4d1fa81e09d35edc09c7f129c7", "score": "0.70311785", "text": "public function testLoginSuccess()\n {\n\n // Create a user, set username.\n $user = $this->__user($username = 'david', $password = 'poesypure');\n\n // Prepare the request.\n $this->request->setMethod('POST')\n ->setPost(array(\n 'username' => 'david',\n 'password' => 'poesypure'\n )\n );\n\n // Hit the route and check for redirect.\n $this->dispatch(NLWS_SLUG . 'nl-admin/login');\n $this->assertRedirectTo(nlws_url('exhibits'));\n\n // Login.\n $this->assertTrue(Zend_Auth::getInstance()->hasIdentity());\n\n }", "title": "" }, { "docid": "aaad9c118f8bc6de6381548f403e401f", "score": "0.7025381", "text": "public function test_user_can_login()\n {\n $user = $this->user();\n\n $response = $this->post('api/login', [\n 'email' => $user->email,\n 'password' => 'password'\n ]);\n\n $response->assertOk();\n }", "title": "" }, { "docid": "28dbebb9492d825288fd7bd35e7c4513", "score": "0.7009943", "text": "public function testLoginMissingParameter()\n {\n // Do request\n $this->_request('POST', '/api/1.5.0/login', ['phone' => '1234'])\n ->_result(['error' => 'login-error']);\n }", "title": "" }, { "docid": "1c46efee7b4caa2eca822b3dd330bfa1", "score": "0.70053476", "text": "public function LoginWithWrongData()\n {\n // as a user, I wrongly type my email and password\n $data = ['email' => 'email', 'password' => 'password'];\n // and I submit it to the login api\n $response = $this->call('POST', 'login', $data);\n // I shouldnt be able to login with wrong data\n $this->assertEquals(HttpResponse::HTTP_UNAUTHORIZED, $response->status());\n }", "title": "" }, { "docid": "64c86878113805375e5dffbd54fe1612", "score": "0.7001869", "text": "public function testSignedUpUserCanPostValidLogin(): void\n {\n \\Artisan::call('passport:install');\n\n $user = factory(User::class)->create();\n\n $request = [\n 'email' => $user['email'],\n 'password' => 'Password123!', // default factory password\n ];\n\n $this->post('/api/v1/auth/login', $request, self::HEADER)\n ->assertStatus(200)\n ->assertJsonStructure([\n 'access_token',\n 'token_type',\n 'expires_at',\n ]);\n }", "title": "" }, { "docid": "4cf53e478bd881ca99047ac3289479b8", "score": "0.70006233", "text": "public function test_login_user_correctly()\n {\n $user = factory(User::class)->create();\n \n $this->assertDatabaseHas('users', $user->toArray());\n \n $user->password = 'secret';\n \n //Submit post request to create an user endpoint\n $response = $this->post('api/login', $user->toArray());\n \n //Verify in the database\n \n // Verify status 200\n $response->assertStatus(200);\n \n // Verify values in response\n $response->assertJson(['success' => true]);\n $response->assertJson(['message' => 'User logged successfully.']);\n \n }", "title": "" }, { "docid": "22375656e14840752a62828607093f7f", "score": "0.6991598", "text": "public function testAuthenticationSuccess()\n {\n $this->visit('/')\n ->click('Login')\n ->seePageIs('/login')\n ->type('test+normal@example.ex', '#email')\n ->type('password123', '#password')\n ->click('#login-button')\n ->see('User: Normal User');\n }", "title": "" }, { "docid": "d2a99c07b8c4fb8576945bba727851cc", "score": "0.69909835", "text": "public function testLogin()\n {\n\n $user = factory(SmartBots\\User::class)->make()->save();\n\n $this->visit('/account/login')\n ->see('Login')\n ->type('demodemo','username')\n ->type('demodemo','password')\n ->check('remember')\n ->press('Login')\n ->seeJson([\n 'success' => true,\n ]);\n }", "title": "" }, { "docid": "334f9c4d984a6cf4a8cd58bfb69f7928", "score": "0.69724786", "text": "public function testLoginFail()\n {\n $data = factory(User::class)->create();\n\n $response = $this->postJson('/api/login', [\n 'email' => $data->email,\n 'password' => 'wrongpassword',\n ]);\n\n $response->assertStatus(401);\n }", "title": "" }, { "docid": "0aa441baf35ee2827cfbc5fa675c6964", "score": "0.6968539", "text": "public function testLoginSuccessful() {\n\n $username = 'test';\n $password = 'test';\n\n $this->url(\"/login.php\");\n $usernameInput = $this->byName(\"login\");\n $usernameInput->clear();\n $this->keys($username);\n\n $usernameInput = $this->byName(\"password\");\n $usernameInput->clear();\n $this->keys($password);\n\n $form = current($this->elements($this->using('css selector')->value('form.login')));\n $form->submit();\n\n /* Check for text on index page */\n $h1 = current($this->elements($this->using('css selector')->value('h1')));\n $this->assertEquals('Welcome to protected area!', $h1->text());\n\n /* Check that cookie user has been set */\n $authCookie = $this->cookie()->get('user');\n $this->assertEquals('loggedin', $authCookie);\n\n }", "title": "" }, { "docid": "f57cf22fb30380d070e6c2ea3d9acc75", "score": "0.6957994", "text": "public function testFailedLogin()\n {\n $response = $this->withHeaders([\n 'Content-Type' => 'application/json',\n ])->json('POST', '/api-login', ['email' => 'admin@movies.dev']);\n\n $response->assertStatus(400);\n }", "title": "" }, { "docid": "2bd078d3d5045a5843dc44bf61d283dc", "score": "0.6952731", "text": "public function test_for_user_can_logged_in()\n {\n $email = 'test@email.com';\n $password = 'secret';\n User::factory()->create(\n [\n 'email' => $email,\n 'password' => $password\n ]\n );\n\n $response = $this->post('/api/login', [\n 'email' => $email,\n 'password' => $password\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "e68f8ef0b6c3c6ca6b59e31d9a41d461", "score": "0.6951488", "text": "public function testBasicTest()\n {\n\n $response = $this->json('POST', '/api/login', [\n 'email' => 'demo@demo.com',\n 'password' => 'secret'\n ]);\n\n $response->assertStatus(200)->assertJsonStructure([\n 'success' => ['token']\n ]);\n }", "title": "" }, { "docid": "9930db11682b526bb32681f9a316893f", "score": "0.69208235", "text": "public function testSignInAsUserWithValidCredentials()\n {\n $crawler = $this->client->request('GET', '/login');\n\n $form = $crawler->selectButton('submit')->form();\n $form->setValues(\n [\n '_username' => 'username',\n '_password' => '12345'\n ]\n );\n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // TODO assert testing\n $this->assertNull(null);\n }", "title": "" }, { "docid": "b795b0297d22fed13722404f2a8aac14", "score": "0.6920733", "text": "public function testLoginFalse()\n {\n $response = $this->post('/login', [\n 'email' => 'user@ad.com',\n 'password' => 'incorrectpass',\n ]);\n\n $response->assertSessionHasErrors();\n }", "title": "" }, { "docid": "1b8813daf0d39c6ebd9e956ab645e8f9", "score": "0.6920275", "text": "public function test_a_user_can_login_on_the_website()\n {\n factory(\\App\\User::class)->create([\n 'email' => 'mark@timbol.com',\n 'password' => 'marktimbol'\n ]);\n\n \t$response = $this->json('POST', '/login', [\n \t\t'email' => 'mark@timbol.com',\n \t\t'password' => 'marktimbol',\n \t]);\n\n \t$this->isAuthenticated();\n }", "title": "" }, { "docid": "f6e73be5e931e8b41e8a1ef815dd7023", "score": "0.691059", "text": "public function testLoginPostTest()\n {\n $user = $this->_getAdminUser();\n $response = $this->post(route('admin.login.post'), ['email' => 'admin@admin.com', 'password' => 'admin123']);\n\n $response->assertRedirect(route('admin.dashboard'));\n }", "title": "" }, { "docid": "cd0b3e2feb8afb696500da3d902c6ff0", "score": "0.690393", "text": "public function testLogin() {\n \n $client = static::createClient(\n array(), array(\n 'HTTP_HOST' => static::$kernel->getContainer()->getParameter('test_http_host')\n ));\n \n $username = static::$kernel->getContainer()->getParameter('test_admin_username');\n $password = static::$kernel->getContainer()->getParameter('test_admin_password');\n \n $crawler = $client->request('GET', '/admin/login');\n\n $form = $crawler->selectButton('Sign In')->form(array(\n '_username' => $username,\n '_password' => $password,\n ));\n\n $client->submit($form);\n\n $this->assertTrue($client->getResponse()->isRedirect('/admin/dashboard')); // check if redirecting properly\n\n $client->followRedirect();\n }", "title": "" }, { "docid": "86a26366cb3e641feba4dd4e36b00895", "score": "0.6860138", "text": "public function testInvalidCredentialsForLogin()\n {\n $userData = [\n \"email\" => \"user1@test.com\",\n \"password\" => \"wrongpassword\",\n \"device_name\" => \"testing\"\n ];\n\n $this->json('POST', 'api/v1/login', $userData, ['Accept' => 'application/json'])\n ->assertStatus(422)\n ->assertJson([\n \"message\" => \"Invalid Credentials\",\n \"code\" => 422\n ]);\n }", "title": "" }, { "docid": "3f6773367628fce223bd26054c371fc1", "score": "0.68544894", "text": "public function test_login_goodLogin_returnsOkAndFlashAndUser() {\n\t\t$this->loginService->shouldReceive('login')->once()->andReturn(true);\n\t\t\n\t\t//setup a mock user to be returned from Auth should be returned\n\t\t//$this->user->id = 2;\n\t\t$this->mockedRepository->shouldReceive('toArray')->once()->andReturn(array('id'=>2));\n\t\tAuth::shouldReceive('user')->once()->andReturn($this->mockedRepository);\n\t\t\n\n\t\t$expectedResponse = $this->buildResponseArray($status=200,$hasFlash=true,$hasUser=true,2);\n\t\t\n\t\t$actualResponse = $this->buildActualResponseArray($this->apiCall('POST','/login', false),true);\n\t\t\n\t\t$this->assertEquals($expectedResponse,$actualResponse);\n\t}", "title": "" }, { "docid": "1db47b03db5181ef370030e9232fadff", "score": "0.6854297", "text": "public function testLoginSuccess()\n {\n $user = factory(App\\User::class)->create(['password' => bcrypt('senha1')]);\n\n $this->visit('/')->see('Product management')\n ->click('Login')\n ->type($user->email, 'email')\n ->type('senha1', 'password')\n ->press('Login')\n ->see('Dashboard')\n ->see('You are logged in!');\n }", "title": "" }, { "docid": "11e5d864f7c90eb9875a2ada4961283e", "score": "0.6840835", "text": "public function testLoginGetTest()\n {\n $response = $this->get(route('admin.login'));\n $response->assertStatus(200);\n $response->assertSee('AvoRed Admin Login');\n }", "title": "" }, { "docid": "a2984f4f34ba176ced762eee96caa051", "score": "0.6835911", "text": "public function testCustomerCanLogin()\n {\n $client = static::createClient();\n $client->request(\n 'POST',\n '/customersapi/login_check',\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json'),\n json_encode(array(\n 'username' => 'customer0@lolamarket.com',\n 'password' => 'lolamarket',\n ))\n );\n\n $response = $client->getResponse();\n $data = json_decode($response->getContent(), true);\n $this->assertTrue($response->headers->contains('Content-Type', 'application/json'));\n $this->assertJson($response->getContent());\n $this->assertArrayHasKey(\"token\",$data);\n }", "title": "" }, { "docid": "4bc1369eb39f5622e3c3d953be1c37b8", "score": "0.68353546", "text": "public function testApiAuthenticationOkWithCorrectCredentials()\n {\n $response = $this->post('/api/oauth/token', [\n 'grant_type' => 'password',\n 'client_id' => $this->token->id,\n 'client_secret' => $this->token->secret,\n 'username' => $this->randomEmail,\n 'password' => $this->password,\n 'scope' => '',\n ]);\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'expires_in',\n 'access_token',\n 'refresh_token'\n ]);\n }", "title": "" }, { "docid": "1d7e739afb6c28baa2d0d01fa8da9199", "score": "0.6827868", "text": "public function testLoginPageWithFalsePassword()\n {\n $client = $this->createClient();\n $client->request('POST', '/login', array(), array(), array(),\n '{\"username\":\"admin\",\"password\":\"toto\"}');\n\n $this->assertEquals(400, $client->getResponse()->getStatusCode());\n $this->assertEquals('Password false', $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "f5a2ae8a35836bbd1c30ab4615ad0ab2", "score": "0.68253833", "text": "public function test_login_is_successful()\n {\n $this->visit(route('login'))\n ->type($this->test_user_email, 'email')\n ->type($this->test_user_password, 'password')\n ->press('Login')\n ->seePageIs(route('showCreateOrganiser', ['first_run' => '1']));\n }", "title": "" }, { "docid": "13f0251f44be9683e1b9a38bda71f78f", "score": "0.6825347", "text": "public function login(){\n\t\ttry{\n \t$this->service->login(Input::all());\n \treturn $this->api->respondSuccessWithDetails(\n\t \t'Successfully logged in.', $this->transformer->transform($this->service->getUserDetails())\n\t );\n }catch(ValidationException $e){\n \treturn $this->api->respondInvalidParameters($e->getMessage());\n }\n\t}", "title": "" }, { "docid": "ef588cae4f2d82c9603980c46770f1b4", "score": "0.6818076", "text": "public function login()\n {\n// $mocObj = \\Codeception\\Util\\Stub::make(UserRepository::className(),[\n// 'findOne'=>new UserRepository\n// ]);\n//\n// $user->setRepository($mocObj);\n// $token = $user->login(\"username\",\"password\");\n// verify($token)->notNull();\n// return $token;\n }", "title": "" }, { "docid": "82f347c0d98fac0b7e24ab1f30c91100", "score": "0.6809552", "text": "public function testViewLoginPage()\n {\n $response = $this->get(route('user_login'));\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "a28be8eb854e0fdd1bc07c81e0dee9a6", "score": "0.6787016", "text": "public function testUserSigninSuccess()\n {\n $response = $this->post('/api/v1/auth/signin', $this->staticUserDetails);\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment([\n 'message' => 'Login successful'\n ]);\n }", "title": "" }, { "docid": "73aeb06f550eca74c136b6587f426477", "score": "0.6786416", "text": "public function testLoginInvalidParameters() {\n $request = $this->getRequest();\n $request->setMethod('POST');\n $this->dispatch('/get_partner_customer');\n $this->assertResponseCode(406);\n }", "title": "" }, { "docid": "5266675391b88c06ac1c7b637f1c0fb1", "score": "0.67832047", "text": "public function testLoginFormWorksCorrectly()\n {\n //create a user\n $this->createUser();\n $this->visit('/login')\n ->type('john@doe.com','email')\n ->type('password', 'password')\n ->press('action')\n ->seePageIs('/');\n }", "title": "" }, { "docid": "6194a23364a0daf7667ffec508b46801", "score": "0.67818004", "text": "public function testApiLoginWithNewPassword()\n {\n $client = $this->makeClient();\n $response = $this->makeJsonRequest(\n $client,\n Request::METHOD_POST,\n '/api/login_check',\n ['email' => self::TEST_EMAIL, 'password' => 'moomoo']\n );\n\n $this->assertCredentialsResponse($response, $client, self::TEST_EMAIL);\n }", "title": "" }, { "docid": "b8d520234fd63fd6f06db80be2571309", "score": "0.6778104", "text": "public function testUserCanLoginWithCorrectCredentials() {\n $user = factory(User::class)->create([\n 'password' => bcrypt($password = 'i-love-laravel'),\n ]);\n\n $response = $this->post('/login', [\n 'email' => $user->email,\n 'password' => $password,\n ]);\n\n $response->assertRedirect('/games');\n $this->assertAuthenticatedAs($user);\n }", "title": "" }, { "docid": "1515592fb10e69335068447f2d31c3c9", "score": "0.6776384", "text": "function test_login() {\n $user = new PHPFrame_User();\n $user->set('id', 0);\n $user->set('groupid', 0);\n $session = PHPFrame::Session();\n $session->setUser($user);\n \n // Fake posted form data\n PHPFrame::Request()->setAction('login');\n PHPFrame::Request()->set('username', 'admin');\n PHPFrame::Request()->set('password', 'Passw0rd');\n PHPFrame::Request()->set(PHPFrame_Utils_Crypt::getToken(), '1');\n \n $frontcontroller = PHPFrame::getFrontController();\n $frontcontroller->run();\n \n $controller = PHPFrame_MVC_ActionController::getInstance('com_login');\n $this->assertTrue($controller->getSuccess());\n }", "title": "" }, { "docid": "8a6ea11fb7baa4ce94d9f7a02fa0aef9", "score": "0.67599285", "text": "public function testSignupValid()\n {\n $this->request\n ->setMethod('POST')\n ->setPost(\n array(\n 'username' => 'NEWUSERPERSON',\n 'password' => 'admin',\n 'passwordConf' => 'admin',\n 'firstName' => 'John',\n 'lastName' => 'Smith',\n 'emailAddress' => 'srgraham@ncsu.edu',\n 'timezone' => 'America/New_York',\n 'realm' => 'local',\n )\n );\n $this->dispatch('/ot/login/signup/realm/local');\n $this->assertRedirectTo('/login/index/realm/local');\n }", "title": "" }, { "docid": "dad9da66af5e0676cbf5be7ca3613202", "score": "0.6757598", "text": "public function test_01_login_called_returnCorrectLoginInfo()\r\n\t{\r\n\t\t$expected = \"LIB META AVAIL SRCH\";\r\n\t\t$result = $this->service->login(self::clientKey, self::clientSecret);\r\n\t\t$this->assertEquals(\"stdClass\", get_class($result));\r\n\t\t$this->assertEquals($expected, $result->scope);\r\n\t\tself::$accessToken = $result->access_token;\r\n\t}", "title": "" }, { "docid": "85d2e30d129c8cc2b693cd59ee687620", "score": "0.67495406", "text": "public function testLoggedinRequest() {\n $user = factory(User::class)->create();\n $response = $this->actingAs($user)->get('/');\n\n $response->assertSuccessful();\n $response->assertViewIs('home');\n }", "title": "" }, { "docid": "12f42ce916e12aad471653db51c2b599", "score": "0.67479026", "text": "public function testLoginFailed()\n {\n $faker = Factory::create();\n\n $data = [\n 'username' => $faker->text(8),\n 'password' => $faker->text(8)\n ];\n\n $response = $this->post(url('api/login'), $data);\n $res_object = json_decode($response->content());\n\n $this->assertObjectHasAttribute('errorType',$res_object, \"errorType: false\");\n $this->assertEquals('INCORRECT_DATA_ERROR',$res_object->errorType,'errorType = LOGIN_ERROR: false');\n\n $this->assertObjectHasAttribute('errors',$res_object, \"errors: false\");\n\n $response->assertStatus(401);\n\n }", "title": "" }, { "docid": "cf19d810f528c24f056508396e5d0cd6", "score": "0.67453146", "text": "public function testApiAuthenticationFailsWithInCorrectCredentials()\n {\n $response = $this->post('/api/oauth/token', [\n 'grant_type' => 'password',\n 'client_id' => 2,\n 'client_secret' => $this->token->secret,\n 'username' => $this->randomEmail,\n 'password' => 'Invalid password',\n 'scope' => '',\n ]);\n $response->assertStatus(401);\n }", "title": "" }, { "docid": "db569378f94e0aa9ffc16cd912e487c3", "score": "0.67355186", "text": "public function testCreateLoginRequired()\n {\n\n $this->visit('/stores/create')\n ->seePageIs('/login');\n\n $this->visit('/products/create')\n ->seePageIs('/login');\n\n $this->visit('/reviews/create')\n ->seePageIs('/login');\n }", "title": "" }, { "docid": "8194c2ab026f04c68ec390c126cd228d", "score": "0.6733755", "text": "public function testSubmitCorrectAuthentication()\n\t{\n\t\t$crawler = $this->client->request('GET', '/login');\n\t\t$loginForm = $crawler->selectButton(\"Se connecter\")->form();\n\n\t\t$this->assertNotEquals(null, $loginForm);\n\n\t\t$loginForm['_username'] = 'admin';\n\t\t$loginForm['_password'] = 'admin';\n\n\t\t$crawler = $this->client->submit($loginForm);\n\t\t$crawler = $this->client->followRedirect();\n\n\t\t$this->assertStringContainsString('Créer une nouvelle tâche', $crawler->text());\n\t}", "title": "" }, { "docid": "eba6194036e4983bebdc88c5f3729927", "score": "0.672992", "text": "public function test_User_can_login()\n {\n $this->enableCsrfToken();\n $this->enableRetainFlashMessages();\n\n // Envío datos de un cliente que existe en el fixture 'UsersFixture'\n $loggingUser['email'] = 'user2@gmail.com';\n $loggingUser['password'] = 'pass';\n\n $this->post(['controller' => 'Users', 'action' => 'login'], $loggingUser);\n\n $this->assertFlashElement('Flash/success');\n }", "title": "" }, { "docid": "52bad86c9e7f1955b7798606e1a8b185", "score": "0.67241776", "text": "public function testLoginPageWithCorrectPassword()\n {\n $client = $this->createClient();\n $client->request('POST', '/login', array(), array(), array(),\n '{\"username\":\"admin\",\"password\":\"admin\"}');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $encoder = new PasswordEncoder();\n $this->assertEquals($encoder->encodePassword('Admin connected'), $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "5ce8fc8682761770296b71c4b4062e92", "score": "0.67200273", "text": "public function test_validations_auth()\n {\n $response = $this->postJson('/auth', []);\n\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "5246294569344f20d565ec24cbaca5dd", "score": "0.6702028", "text": "public function test_login_page(){ \n $this->visit('login')\n ->type('phi2902@yahoo.com', 'email')\n ->type('123456', 'password')\n ->press('Login')\n ->seePageIs('/');\n }", "title": "" }, { "docid": "be1092339a4d87bf9c6c3347eb57f41b", "score": "0.66911083", "text": "public function testLoginsGetUnauthorized(): void { }", "title": "" }, { "docid": "ee3fee0baeea3c6e716e73a21e331d94", "score": "0.66911036", "text": "public static function testSignIn() {\n $value = array(\"status\" => 404, \"title\" => 1);\n if ((empty($_REQUEST['userId'])) || (empty($_REQUEST['password']))) {\n // One of the fields is empty\n } else {\n $result = User::getUser($_REQUEST['userId']);\n // check if user was found in database\n if ($result) {\n $hash = $result[0]['password'];\n $password = $_REQUEST['password'];\n //check if password match\n if (!password_verify($password, $hash)) {\n // Wrong password\n } else {\n $value = array(\"status\" => 200, \"title\" => $result[0]['title']);\n }\n } else {\n //\"User was not found\";\n }\n }\n return $value;\n }", "title": "" }, { "docid": "aecc2ace22bbe49d5da82bd160b2f064", "score": "0.66822773", "text": "public function testLoginDataIsInvalid(){\n $data = [\n 'username' => '',\n 'password' => ''\n ];\n\n $response = $this->post(url('api/login'), $data);\n\n $res_object = json_decode($response->content());\n\n $this->assertObjectHasAttribute('errorType',$res_object, \"errorType: false\");\n $this->assertEquals('VALIDATION_ERROR',$res_object->errorType,'errorType = VALIDATION_ERROR: false');\n $this->assertObjectHasAttribute('errors',$res_object,\"errors: false\");\n $this->assertObjectHasAttribute('username',$res_object->errors,\"errors[username]: false\");\n $this->assertObjectHasAttribute('password',$res_object->errors,\"errors[password]: false\");\n\n $response->assertStatus(422);\n }", "title": "" } ]
058c181b0c0991a48f2c3788098a7030
Sets the starting center point of the map.
[ { "docid": "01bac4598010dd80cc5ac89828e4b46b", "score": "0.44127145", "text": "public function defaultCenter($lat, $lng, $zoom = 10)\n {\n return $this->config([\n 'defaultCenter' => [\n 'lat' => $lat,\n 'lng' => $lng,\n ],\n 'defaultZoom' => $zoom,\n ]);\n }", "title": "" } ]
[ { "docid": "6a9053a24fd5498964cafec7d9b13447", "score": "0.6044059", "text": "public function autoCenter()\n {\n $center = $this->bounds->getCenter();\n\n if($center->getLat() && $center->getLng()) {\n $this->setCenter($center->getLat(), $center->getLng());\n }\n\n return $this;\n }", "title": "" }, { "docid": "5ecf259fdfcd5e701aba88471b4eea28", "score": "0.5999467", "text": "public function setCenterCoords($centerCoords)\n {\n $this->center_coords = $centerCoords;\n }", "title": "" }, { "docid": "315bb2d1fc3633f398b8bdaf35cdbe1b", "score": "0.59718275", "text": "public function setStart(float $lat, float $lon)\n\t{\n\t\t$this->start = ['lat' => $lat, 'lon' => $lon];\n\t}", "title": "" }, { "docid": "6768a62fedbf9f5e9e2c8e3a283add5b", "score": "0.574154", "text": "public function setCenter($lat = NULL, $lng = NULL)\n {\n if ($lat == null && $lng == null)\n {\n $this->autoCenter();\n }\n else\n {\n if ($lat != NULL)\n {\n $this->lat = Tx_Listfeusers_Gmap::validate_latitude($lat);\n }\n if ($lng != NULL)\n {\n $this->lng = Tx_Listfeusers_Gmap::validate_longitude($lng);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "c0a0dc5fd4d92994252aadde435d89a2", "score": "0.5533244", "text": "public function setLatitudeSetsLatitude() {\n\t\t$this->subject->setlatitude(12.345678);\n\t\t$this->assertSame(12.345678, $this->subject->getlatitude());\n\t}", "title": "" }, { "docid": "ecf603c829bd9d728ddf95db3465b828", "score": "0.5509961", "text": "function centerHorizontally($center = 1) {\r\n $this->_hcenter = $center;\r\n }", "title": "" }, { "docid": "4fd4b63f3b71ca60e13daa0af4f6491a", "score": "0.549084", "text": "public function set_center($latitude, $longitude, $zoom = 4, $map_type = null)\n {\n return 'this.GMap.setCenter(' . $this->glatlng($latitude, $longitude) . ', ' . (int) $zoom . ( $map_type ? ', ' . $map_type : '' ) . \");\\n\";\n }", "title": "" }, { "docid": "93b7992c35ae8565c55c87ef729008dc", "score": "0.53637624", "text": "public function setStartPoint($start);", "title": "" }, { "docid": "d56e602e244262b48c05973306dbf211", "score": "0.53453296", "text": "public function setStart($val)\n {\n $this->start = $val;\n }", "title": "" }, { "docid": "5bbfe4e759f21acf99195d46e07239e6", "score": "0.5270356", "text": "public function getCentre()\n {\n $shapeParams = $this->getData();\n if ($this->getType() == \"circle\") {\n $this->setLatCenter($shapeParams[\"center\"][0]);\n $this->setLonCenter($shapeParams[\"center\"][1]);\n } else if ($this->getType() == \"rectangle\") {\n $swlat = $this->getSwLatitude();\n $swLon = $this->getSwLongitude();\n $neLat = $this->getNeLatitude();\n $neLon = $this->getNeLongitude();\n $this->setLatCenter($neLat + ($swlat - $neLat) / 2);\n $this->setLonCenter($neLon + ($swLon - $neLon) / 2);\n } else if ($this->getType() == \"polygon\" || $this->getType() == \"polyline\") {\n $PI = 22 / 7;\n $X = 0;\n $Y = 0;\n $Z = 0;\n foreach ($shapeParams[\"paths\"] as $point) {\n $lat1 = $point[0];\n $lon1 = $point[1];\n $lat1 = $lat1 * $PI / 180;\n $lon1 = $lon1 * $PI / 180;\n $X += cos($lat1) * cos($lon1);\n $Y += cos($lat1) * sin($lon1);\n $Z += sin($lat1);\n }\n $Lon = atan2($Y, $X);\n $Hyp = sqrt($X * $X + $Y * $Y);\n $Lat = atan2($Z, $Hyp);\n $Lat = $Lat * 180 / $PI;\n $Lon = $Lon * 180 / $PI;\n $this->setLatCenter($Lat);\n $this->setLonCenter($Lon);\n }\n }", "title": "" }, { "docid": "c4621c7b3fa4ab17d4b5ec8cd074a06f", "score": "0.52547723", "text": "public function setFirstPos(): void\n {\n if ($this->pvpAreaInfo === null) {\n $this->pvpAreaInfo = new stdClass();\n }\n\n $this->pvpAreaInfo->firstPos = $this->asVector3();\n\n $this->sendMessage(Utils::getPrefix() . TextFormat::GREEN . \" Successfully set the first position of the PvPArea.\");\n }", "title": "" }, { "docid": "7c39df8d736afc777d2511595b695429", "score": "0.5251983", "text": "public function setLat($lat) {\n $this->lat = $lat;\n }", "title": "" }, { "docid": "28140358df7ba59d01a8622b49b71a45", "score": "0.5249489", "text": "public function setStart($start) {\n\t\t$this->start = $start;\n\t}", "title": "" }, { "docid": "b004cc97092a3849f0a0f8fbfa0ee925", "score": "0.52478874", "text": "function setStart( $value )\n {\n if( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Start = $value;\n }", "title": "" }, { "docid": "0c37ebb91c12651612eb4037264c8a2d", "score": "0.52406216", "text": "public function setCentered($value)\r\n {\r\n $this->centered = $this->setBooleanProperty($this->centered, $value);\r\n }", "title": "" }, { "docid": "6240d054cd650a6ad387812a092716f2", "score": "0.51997125", "text": "public function setLat($lat)\n {\n $this->lat = $lat;\n\n }", "title": "" }, { "docid": "aa5c79367d90887ca7188bcd5286f8bd", "score": "0.51847386", "text": "abstract public function setStart($start);", "title": "" }, { "docid": "db383e4ef0937ff78bfe7eb85f1084eb", "score": "0.5184463", "text": "public function setStart($start)\n {\n $this->start = $start;\n }", "title": "" }, { "docid": "3ceec5f8af1c4cc7aef5ff0603284428", "score": "0.51594424", "text": "public function setLatitude($lat)\n {\n $this->campos['lat'] = $lat;\n return $this;\n }", "title": "" }, { "docid": "d67c54b93527f5c7af005408b2c63b00", "score": "0.5149759", "text": "public function getCenter()\n {\n return $this->center;\n }", "title": "" }, { "docid": "7a5eeb1942f866baa1698b8bea657f68", "score": "0.51357126", "text": "public function getCenter() {\n return $this->center;\n }", "title": "" }, { "docid": "2d36820673a3565e03e0fb5befc41616", "score": "0.5063625", "text": "public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }", "title": "" }, { "docid": "2d36820673a3565e03e0fb5befc41616", "score": "0.5063625", "text": "public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }", "title": "" }, { "docid": "da9fccd27df4aad4781a497d1f3bf588", "score": "0.50571316", "text": "function reCenter($x, $y) {}", "title": "" }, { "docid": "a093e3a575e8b6f84fdecb4fd9ab2080", "score": "0.5024473", "text": "public function setStart(?DateTimeTimeZone $value): void {\n $this->getBackingStore()->set('start', $value);\n }", "title": "" }, { "docid": "1f9849133d9899b71a6f1482f2055220", "score": "0.50210226", "text": "public function setOffset($start_offset) {\n $this->request->setOffset($start_offset);\n }", "title": "" }, { "docid": "b3e9e06f846a42408f9995619ad1a283", "score": "0.49848324", "text": "public function setStartBeginning($startbeginning)\n {\n $this->setData('start_beginning', $startbeginning);\n }", "title": "" }, { "docid": "f2682fedc6c5d1a4b6febcfbe2c69be5", "score": "0.49815136", "text": "public function setLat($value)\n {\n return $this->set(self::lat, $value);\n }", "title": "" }, { "docid": "b163e7ceb2fb26b7a23ee58771b49fcb", "score": "0.49801898", "text": "public function initializeAction()\r\n {\r\n $this->center = array(\r\n 'latitude' => $this->extConf->getDefaultLatitude(),\r\n 'longitude' => $this->extConf->getDefaultLongitude()\r\n );\r\n ArrayUtility::mergeRecursiveWithOverrule($this->center, $this->widgetConfiguration['center'], true);\r\n ArrayUtility::mergeRecursiveWithOverrule($this->mapOptions, $this->getMapOptions(), true);\r\n $this->width = $this->widgetConfiguration['width'];\r\n $this->height = $this->widgetConfiguration['height'];\r\n }", "title": "" }, { "docid": "c80b4617998950a3d31c64946460a9b1", "score": "0.49774024", "text": "public function center() {\n\t\t$this->set_setting( 'layout', 'centered' );\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ce5d421f7ec2a48c300e36fbadbcb401", "score": "0.4922508", "text": "public function setLatitude(float $latitude) {\n\t\t$this->latitude = $latitude;\n\t}", "title": "" }, { "docid": "46a1153f9b1ecdcf8c2d5b5ba55c8900", "score": "0.4899449", "text": "function getCenter() {}", "title": "" }, { "docid": "71e65638a15d75d99905939e3220ff1c", "score": "0.48753217", "text": "public function setLockScreenBlockControlCenter(?bool $value): void {\n $this->getBackingStore()->set('lockScreenBlockControlCenter', $value);\n }", "title": "" }, { "docid": "dafc605044104a805a00a32b9e82ef1b", "score": "0.48729238", "text": "private function assign_start_of_axis() {\r\n\t\t$this -> start_axis = array('USD' => 1, 'EUR' => 1, 'CNY' => 6);\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "121134a1b53f2e9b886f548ef4761121", "score": "0.48604578", "text": "public function setStartPage($start_page)\n {\n $this->json()->start_page = $start_page;\n }", "title": "" }, { "docid": "5d105f92367ee443c5ea4d49f7a2faed", "score": "0.485321", "text": "public function setSourceLat($sourceLat) {\n $this->sourceLat = $sourceLat;\n }", "title": "" }, { "docid": "b19669b3fb71d961ff0e3c25f5e48c64", "score": "0.48490983", "text": "public function setCenter($center)\n {\n if (!$this->person) {\n return;\n }\n\n $person = $this->person;\n $person->centerId = $center->id;\n $person->save();\n }", "title": "" }, { "docid": "8fff32b8d6981dfe7f897da3880a4532", "score": "0.48349935", "text": "public function setLat($lat)\n {\n $this->lat = $lat;\n return $this;\n }", "title": "" }, { "docid": "dd88835ecfad9fedf4f4a925d29abebf", "score": "0.48305115", "text": "public function setLatitude($latitude);", "title": "" }, { "docid": "dd88835ecfad9fedf4f4a925d29abebf", "score": "0.48305115", "text": "public function setLatitude($latitude);", "title": "" }, { "docid": "bd0e1224f5a0d5166fcc7503f15dd56b", "score": "0.47920635", "text": "public function setStartPage($page)\n {\n $this->setData('start_page', $page);\n }", "title": "" }, { "docid": "36b2d96086e9e86306cc473a90cb7f31", "score": "0.47865036", "text": "function InitialLat($North, $n0, $afo, $PHI0, $n, $bfo) {\n #Input: - _\n #northing of point (North) and northing of false origin (n0) in meters; _\n #semi major axis multiplied by central meridian scale factor (af0) in meters; _\n #latitude of false origin (PHI0) IN RADIANS; _\n #n (computed from a, b and f0) and _\n #ellipsoid semi major axis multiplied by central meridian scale factor (bf0) in meters.\n\n #REQUIRES THE \"Marc\" FUNCTION\n #THIS FUNCTION IS CALLED BY THE \"E_N_to_Lat\", \"E_N_to_Long\" and \"E_N_to_C\" FUNCTIONS\n #THIS FUNCTION IS ALSO USED ON IT'S OWN IN THE \"Projection and Transformation Calculations.xls\" SPREADSHEET\n\n #First PHI value (PHI1)\n $PHI1 = (($North - $n0) / $afo) + $PHI0;\n\n #Calculate M\n $M = $this->Marc($bfo, $n, $PHI0, $PHI1);\n\n #Calculate new PHI value (PHI2)\n $PHI2 = (($North - $n0 - $M) / $afo) + $PHI1;\n\n #Iterate to get final value for InitialLat\n While (abs($North - $n0 - $M) > 0.00001) {\n $PHI2 = (($North - $n0 - $M) / $afo) + $PHI1;\n $M = $this->Marc($bfo, $n, $PHI0, $PHI2);\n $PHI1 = $PHI2;\n }\n return $PHI2;\n }", "title": "" }, { "docid": "b9761a100f694e54492f9cf2ec36b34e", "score": "0.4780378", "text": "public function setLat(string $sLat): self\n {\n $this->sLat = $sLat;\n return $this;\n }", "title": "" }, { "docid": "61a5ffab9a131ba28c22691564239d5c", "score": "0.4779424", "text": "public function setLat($lat)\n {\n $this->lat = $lat;\n\n return $this;\n }", "title": "" }, { "docid": "b89c828daa4964ac4a5fcab813389f03", "score": "0.4768903", "text": "public function set_start_points($start_points) {\n $this->start_points = $start_points;\n }", "title": "" }, { "docid": "9a562a872d630b3d31cd0b43ccf62d92", "score": "0.4739748", "text": "public function setStartingNumber($startingNumber)\n {\n $this->startingNumber = $startingNumber;\n }", "title": "" }, { "docid": "9b3feb9bdba584cc4b5800a0a0915933", "score": "0.4734723", "text": "public function setStart($value)\n {\n return $this->set(self::START, $value);\n }", "title": "" }, { "docid": "afb023b1f46cf2c184e8ebc41048e0c7", "score": "0.4731699", "text": "public function testLatitudeFirstSet($value, array $expected)\n {\n Configuration::setOrder(Configuration::ORDER_LAT_FIRST);\n\n $point = new Point();\n\n $point->setLongitude($value)\n ->setLatitude($value);\n\n $this->assertEquals($expected, $point->toArray());\n $this->assertEquals($expected[0], $point->getX());\n $this->assertEquals($expected[1], $point->getLongitude());\n $this->assertEquals($expected[1], $point->getY());\n $this->assertEquals($expected[0], $point->getLatitude());\n }", "title": "" }, { "docid": "6a3f3a70e42688c4058a91b24901d317", "score": "0.4718747", "text": "public function recenter($coords)\n { $x=0;\n $y=0;\n $z=0;\n foreach ($coords as $k)\n {\n $x = $x + $k[0];\n $y = $y + $k[1];\n $z = $z + $k[2];\n }\n $center[0] = round($x / count($coords),8);\n $center[1] = round($y / count($coords),8);\n $center[2] = round($z / count($coords),8);\n return $center;\n }", "title": "" }, { "docid": "eb371452ef24f37de3634b280bde6764", "score": "0.4697521", "text": "public function setStartingId($id) {\n $this->startingId = $id;\n }", "title": "" }, { "docid": "fd48878df70bf8e545232f66c97edf94", "score": "0.46890584", "text": "public function setOriginalStart(?DateTime $value): void {\n $this->getBackingStore()->set('originalStart', $value);\n }", "title": "" }, { "docid": "839b7904e30c6626a50ae57bdd205e5d", "score": "0.4685115", "text": "function __construct() {\n\t\t$this->seat_map = array();\n\t\t$this->center = '';\n\t}", "title": "" }, { "docid": "02ad42b2e1d99c3bc0594337bd1227d6", "score": "0.46693614", "text": "function SetStartPath($StartPath)\n\t\t{\n\t\t\t$this->__startPath = $StartPath;\n\t\t}", "title": "" }, { "docid": "5b0570a91ba04bb0f5f198c3857972ca", "score": "0.4667684", "text": "public function setStartOffset($var)\n {\n GPBUtil::checkInt64($var);\n $this->start_offset = $var;\n\n return $this;\n }", "title": "" }, { "docid": "ddafbfb54f5ab372ac2ae3adb2eb47ae", "score": "0.4627626", "text": "public function setStartingTimestamp($timestamp) {\n $this->startingTimestamp = $timestamp;\n }", "title": "" }, { "docid": "44b144b61c97e92cda0fe4dbc2c0f8b7", "score": "0.46198806", "text": "public function center(bool $center = true)\n {\n $this->setAttribute('text_center', $center);\n\n if ($center) {\n $this->right(false);\n }\n\n return $this;\n }", "title": "" }, { "docid": "1f438ea4c9276b7d903a1b4ace10e27e", "score": "0.46084642", "text": "private function set_coordinates() {\n\n $coords = $this->get_coordinates();\n\n $this->base_query['lat'] = $coords->location->lat;\n $this->base_query['lon'] = $coords->location->lon;\n\n print_r($this->base_query);\n\n }", "title": "" }, { "docid": "f9d1c3b2826d983d0e9c0fd2d6086231", "score": "0.46072212", "text": "public function setRoot()\n\t{\n\t\t\n\t\t$this->root_path = STARTING_FOLDER;\n\t\t// get root path information\n\t\t\n\t\t$this->root_path = $this->DB->protectString($this->root_path);\n\t\t$this->DB->query(\"SELECT * FROM directory WHERE parent = '\".$this->root_path.\"'\",\"setRoot\");\n\t\t$root_info = $this->DB->fetchrow();\n\t\tif ($root_info==false)\n\t\t{\n\t\t\tif (!is_dir($this->root_path))\n\t\t\t{\n\t\t\t\techo 'error with root path';\n\t\t\t\texit();\n\t\t\t}\n\t\t\t// need to index root path...\n\t\t\t$this->root_id = $this->insertDirectory($this->root_path, '');\n\t\t\t// assign to administrator...\n\t\t\t$this->DB->query(\"INSERT into group_accesspath (group_id, directory_id) VALUES('1','\".$this->root_id.\"');\",\"setRoot\");\n\t\t\n\t\t}else{\n\t\t\t$this->root_id = $root_info['id']; \n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7ed3de86277a712b1790020fdb148884", "score": "0.46011183", "text": "public function setSelectionStart( $selectionStart )\n\t{\n\t\t$this->setAttribute( \"selectionstart\", $selectionStart );\n\t}", "title": "" }, { "docid": "abd8d2e08f4484c95664b6b21e32cc42", "score": "0.45970675", "text": "public function rewind() {\n \n $this->currentLat = $this->minLat;\n $this->currentLong = $this->minLong;\n \n $this->valid = true;\n \n $this->flipped = false;\n \n \n }", "title": "" }, { "docid": "8288cb4963648bfaf4a06b9f309b21cc", "score": "0.4592267", "text": "public function adjustCenterCoords($lon, $lat)\n {\n if (strlen((string) $lon) == 0 || strlen((string) $lat) == 0) {\n return false;\n }\n\n $this->_max_lon = (float) max($lon, $this->_max_lon);\n $this->_min_lon = (float) min($lon, $this->_min_lon);\n $this->_max_lat = (float) max($lat, $this->_max_lat);\n $this->_min_lat = (float) min($lat, $this->_min_lat);\n\n $this->center_lon = (float) ($this->_min_lon + $this->_max_lon) / 2;\n $this->center_lat = (float) ($this->_min_lat + $this->_max_lat) / 2;\n\n return true;\n }", "title": "" }, { "docid": "99261910faab07cf250e03f0026548c8", "score": "0.45840612", "text": "public function setStartCell(string $startCell):self\n {\n $this->startCell = $startCell;\n \n return $this;\n }", "title": "" }, { "docid": "14149431c7d8b969652bd798ed1fac71", "score": "0.45840245", "text": "public function setStart($var)\n {\n GPBUtil::checkInt64($var);\n $this->start = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7219ed0d1810668595735a50d5b21dcf", "score": "0.45685032", "text": "function centerVertically($center = 1) {\r\n $this->_vcenter = $center;\r\n }", "title": "" }, { "docid": "176b7ee14462258f15eff515c8199ce5", "score": "0.4568189", "text": "public function setNorth($north);", "title": "" }, { "docid": "3060e5bbf0747e8ddbaa299fa8cb29f8", "score": "0.4546857", "text": "public function setActiveCenter(Request $request)\n {\n if (!$request->has('id') || !is_numeric($request->get('id'))) {\n abort(400);\n }\n\n $center = Center::findOrFail($request->get('id'));\n\n $this->context->setCenter($center);\n\n Session::set('reportRedirect', 'center');\n\n return ['success' => true];\n }", "title": "" }, { "docid": "f6ded4373b6e1b701088c06bcf18ba03", "score": "0.4525008", "text": "public function setLatitude(float $value): Search\n {\n $this->latitude = $value;\n return $this;\n }", "title": "" }, { "docid": "3b6c71fd5ab89e2f142af4a24610eba9", "score": "0.44857547", "text": "public function setNortheastLatitude($value)\n {\n return $this->set('NortheastLatitude', $value);\n }", "title": "" }, { "docid": "09f2526f98490ab79606228f481ea35f", "score": "0.4457103", "text": "public function setStart(\\DateTime $value)\n {\n $this->start = $value->format(\\DateTime::ISO8601);\n }", "title": "" }, { "docid": "f9f9e224787b08297ede565d4889d758", "score": "0.444316", "text": "public function setMiddleinitial($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->middleinitial !== $v) {\n $this->middleinitial = $v;\n $this->modifiedColumns[EmployeeTableMap::COL_MIDDLEINITIAL] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "e2a1422bb369e79f3484c859270fe303", "score": "0.44192332", "text": "public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode)\n {\n $this->_rootProjectionNode = $rootProjectionNode;\n }", "title": "" }, { "docid": "aaba015949e39b65f1ffa7e97cb54e6a", "score": "0.441792", "text": "public function setStart($var)\n {\n GPBUtil::checkUint32($var);\n $this->start = $var;\n\n return $this;\n }", "title": "" }, { "docid": "ca71932e31de1f30edff31d99ea631ca", "score": "0.4415008", "text": "public static function setDateDefaultLatitude($floLatitude = 0.0000, $strOperation = null)\n {\n return self::iniSet('date.default_latitude', $floLatitude, $strOperation);\n }", "title": "" }, { "docid": "42a81c3354aa077793c54ec5eff3d2c2", "score": "0.44106832", "text": "public function setSouthwestLatitude($value)\n {\n return $this->set('SouthwestLatitude', $value);\n }", "title": "" }, { "docid": "6235fbe09204e28e6ebb1cd368a48a5d", "score": "0.44020778", "text": "public function set_min ($min) {\n $this->min = $min;\n }", "title": "" }, { "docid": "32f32cf0889a8a42249d51dbe98d9d47", "score": "0.43849802", "text": "public function setMin($min)\n {\n $this->_min = $min;\n }", "title": "" }, { "docid": "f8c7a5687a1ebfb430664a96e5684fca", "score": "0.43837643", "text": "public function setControllerMap(ControllerMap $controller_map )\r\n\t{\r\n\t\t$this->controller_map = $controller_map;\r\n\t}", "title": "" }, { "docid": "17a496622ea8422480b4ab31e72dc7ab", "score": "0.43837512", "text": "function SetStartURL($StartURL)\n\t\t{\n\t\t\t$this->__startURL = $StartURL;\n\t\t}", "title": "" }, { "docid": "ff32bfd036d035368ac8046f73b8c9b0", "score": "0.43823105", "text": "public function set_season_start_date( $value ) {\n\t\t$this -> start_date = $value;\n\t}", "title": "" }, { "docid": "d97b57355e27f9235efa6e46b203c022", "score": "0.43789932", "text": "private function calcCenter(): int {\n $score = $this->score * 2;\n $rebounds = $this->rebounds * 1;\n $assist = $this->assist * 3;\n\n $this->pointsRating = $score + $rebounds + $assist;\n\n return $this->pointsRating;\n }", "title": "" }, { "docid": "18a02860cdaec7d436e209b59817a290", "score": "0.43780056", "text": "public function latitude($value)\n {\n $this->latitude = $value;\n\n return $this;\n }", "title": "" }, { "docid": "e107c5e23428883734cf532b44a7bbeb", "score": "0.436942", "text": "private function setLocation(Point $p)\n {\n $x = $p->x;\n $y = $p->y;\n }", "title": "" }, { "docid": "f25647583eaa39bda5b9cf63c791164c", "score": "0.43663147", "text": "public function setNorthWest( Coordinate $coordinates )\n {\n $this->north = $coordinates->getLatitude( );\n $this->west = $coordinates->getLongitude( );\n return $this;\n }", "title": "" }, { "docid": "f89d29e7a35d947cefbfb8057854c99c", "score": "0.43630093", "text": "public function setInitialValue(mixed $initialValue): void\n {\n $this->initialValue = $initialValue;\n }", "title": "" }, { "docid": "3548d17d542d1961d05470487572f271", "score": "0.4362685", "text": "public function setStart($start = null)\n {\n $this->start = $start;\n\n return $this;\n }", "title": "" }, { "docid": "2db1a7108b3634233b038ac168877d61", "score": "0.43615833", "text": "public function setBeginAttribute($value){\n $this->attributes['begin'] = convertDateToAnotherTimeZone($value,'UTC')\n ->format('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "322c2f87b8d7abc643af18e53e513a21", "score": "0.43552417", "text": "public function getCenter () {\n // returns center point. since center is an object we can call point methods on this variable.\n $x = $this->center->getXCoord();\n $y = $this->center->getYCoord();\n $coords = \"[$x, $y]\";\n return $coords;\n }", "title": "" }, { "docid": "0ebbb539d82cac9c867d7010c7d8ea9b", "score": "0.43543258", "text": "public function setOffset() {\n $this->offset = filter_input(INPUT_GET, \"offset\", FILTER_SANITIZE_STRING);\n if ($this->offset === NULL) {\n $this->offset = 1;\n } else {\n $this->offset = intval($this->offset);\n }\n }", "title": "" }, { "docid": "181f14af91d726b3d8cb74cb1b4ec90e", "score": "0.43499032", "text": "public function SetCoordination($x,$y){\n $this->coordination[0] = $x;\n $this->coordination[1] = $y;\n }", "title": "" }, { "docid": "9108a70f38f8783cad3505111c1d7a6f", "score": "0.4344472", "text": "private function center($barrio_id){\n \n $datos = $this->extentsimple($barrio_id);\n\n $xmin = $datos[\"xmin\"];\n $ymin = $datos[\"ymin\"];\n $xmax = $datos[\"xmax\"];\n $ymax = $datos[\"ymax\"];\n $xcent = ($xmax + $xmin)/2;\n $ycent = ($ymax + $ymin)/2;\n \n\n $respuesta = ParcelaPos::select(DB::raw(\"ST_AsText(ST_Transform(ST_GeomFromText('POINT($xcent $ycent)',22182),4326)) as centro\"))->first();\n \n $centro = str_replace(\"POINT(\",\"\",$respuesta->centro);\n $centro = str_replace(\")\",\"\",$centro);\n $centro = explode(\" \",$centro);\n\n $result = array(\"xcent\"=>floatval($centro[0]),\"ycent\"=>floatval($centro[1]));\n\n return $result; \n \n }", "title": "" }, { "docid": "a5c31d49554e636f8f86e32777e71892", "score": "0.43412697", "text": "private function setStartUt(){\n\n\t\t// repopulate the form with criteria user selected\n\t\t$this->startMonth=$this->data['start']['month'];\n\t\t$this->startDay=$this->data['start']['day'];\n\t\t$this->startYear=$this->data['start']['year'];\n\t\t$this->start_ut=mktime(0,0,0,$this->startMonth,$this->startDay,$this->startYear);\n\n\t}", "title": "" }, { "docid": "ada0cd6fd017c052ac0a5b57cb1418c1", "score": "0.43362108", "text": "public function setStartsAt($starts_at)\n {\n $this->starts_at = $starts_at;\n }", "title": "" }, { "docid": "47c8bc4b727b7efb7ad44ba998e446b4", "score": "0.43261674", "text": "public function set_maps();", "title": "" }, { "docid": "44a9d68b68da63a99db4854b6a58365d", "score": "0.43222493", "text": "public function setUp()\n {\n // first location\n $this->latitude1 = '50.8538510000';\n $this->longitude1 = '3.3550450000';\n // second location\n $this->latitude2 = '50.8325600000';\n $this->longitude2 = '3.4787650000';\n\n }", "title": "" }, { "docid": "3f39a40dd65ab39980bad31da15e1b36", "score": "0.43220755", "text": "function setFirstSheet() {\r\n $this->firstsheet = $this->index;\r\n }", "title": "" }, { "docid": "a095b97850c8a018697f5dd46db90f92", "score": "0.43183166", "text": "public function setOffsetX(int $offset) : self {\n $this -> offsetX = $offset;\n return $this;\n }", "title": "" }, { "docid": "795a6b3645dcbbe2386e8c67eb1382f8", "score": "0.43024406", "text": "public function setMarker($marker) {\n $this->marker = $marker;\n }", "title": "" }, { "docid": "c6fa5a7d9ccd36c5f68e83900e765f54", "score": "0.42984173", "text": "public function set_start_date($start_date)\n {\n $this->set_default_property(self::PROPERTY_START_DATE, $start_date);\n }", "title": "" }, { "docid": "c0723af28cedbaf8d0c66fd01e17f1eb", "score": "0.42977983", "text": "function sunCenter($t) {\n $m = geoMeanAnomalySun($t);\n\n $m = deg2rad($m);\n $sinm = sin($m);\n $sin2m = sin(2*$m);\n $sin3m = sin(3*$m);\n\n $C = $sinm * (1.914602 - $t * (0.004817 + 0.000014 * $t)) + $sin2m * (0.019993 - 0.000101 * $t) + $sin3m * 0.000289;\n \n return $C;\t\t// in degrees\n}", "title": "" }, { "docid": "3491e565f2acc7f791534472ecf47ed9", "score": "0.42887214", "text": "public function getLatitudeReturnsInitialValueForFloat() {\n\t\t$this->assertSame(0.0, $this->subject->getlatitude());\n\t}", "title": "" } ]
1e7f38bdd092db0d2ed3d8869d55988a
Get the details of this booking
[ { "docid": "c9edf5e980e057c440c3a4ec63677cd6", "score": "0.0", "text": "function dspDayBooking($id)\n{\n\t$query = \"SELECT m.first_name, m.last_name, b.booking_id, b.status, b.booking_date,\n DATE_ADD(b.booking_date, INTERVAL 14 DAY) AS deposit_due\n\tFROM edelweiss_days AS d, edelweiss_booking AS b, edelweiss_members AS m\n\tWHERE b.booking_id = $id\n\tAND d.booking_id = b.booking_id\n\tAND b.member_id = m.member_id\n\tLIMIT 20\";\n\t$result = mysqli_query($conn, $query);\n\tif (! $result ) die (\"<hr>Database Error: <br><pre>\". mysqli_error() .\"</pre><hr>\");\n\t$query_data = mysqli_fetch_array($result);\n\t$name = $query_data[\"first_name\"].\" \".$query_data[\"last_name\"];\n\t$booking_date = $query_data[\"booking_date\"];\n\t$status = $query_data['status'];\n\t$colour = getStatusColour($status);\n $deposit_due = $query_data['deposit_due'];\n\n\t\n\techo \"<h2>\".$name.\"</h2>\";\n\techo \"Booking Number: \".$id.\"<p>\";\n\techo \"Booking was made on \".$booking_date.\"<p>\";\n\techo \"Current Status: <font color='$colour'>$status</font><p>\";\n\t\n\t// New Query to get each day of this booking\n\t$query = \"SELECT date, members, juniors, adult_guests, child_guests,\n\tmembers + juniors + adult_guests + child_guests AS total\n\tFROM edelweiss_days AS d, edelweiss_booking AS b\n\tWHERE b.booking_id = $id\n\tAND d.booking_id = b.booking_id\n\tORDER BY date\n\tLIMIT 20\";\n\t$result = mysqli_query($conn, $query);\n\tif (! $result ) die (\"<hr>Database Error: <br><pre>\". mysqli_error() .\"</pre><hr>\");\n\t$total_cost = 0;\n\t\n\techo \"<table border=1>\";\n\techo \"<thead><tr><td>Date</td><td>Members</td><td>Juniors</td>\".\n\t\t\"<td>Adult Guests</td><td>Child Guests</td><td>Total Beds</td><td>Cost</td></tr></thead>\";\n\twhile ($query_data = mysqli_fetch_array($result))\n\t{\n\t\t$date = $query_data[\"date\"];\n\t\t$members = $query_data[\"members\"];\n\t\t$juniors = $query_data[\"juniors\"];\n\t\t$adult_guests = $query_data[\"adult_guests\"];\n\t\t$child_guests = $query_data[\"child_guests\"];\n\t\t\n//\t\t$total_cost = $total_cost + $members * 16.50 + $juniors * 8.0 + $adult_guests * 40.0 + $child_guests * 16.50;\n\t\t$cost = getCost($date, $members, $juniors, $adult_guests, $child_guests);\n\t\t$total_cost = $total_cost + $cost;\n\t\t\n\t\tif ($members == 0) $members = \"-\";\n\t\tif ($juniors == 0) $juniors = \"-\";\n\t\tif ($adult_guests == 0) $adult_guests = \"-\";\n\t\tif ($child_guests == 0) $child_guests = \"-\";\n\t\t\n\t\techo \"<tr><td>\" . $date .\"</td>\";\n\t\techo \"<td align='right'>\" . $members .\"</td>\";\n\t\techo \"<td align='right'>\" . $juniors .\"</td>\";\n\t\techo \"<td align='right'>\" . $adult_guests .\"</td>\";\n\t\techo \"<td align='right'>\" . $child_guests .\"</td>\";\n\t\techo \"<td align='right'>\" . $query_data[\"total\"] .\"</td>\";\n\t\techo \"<td align='right'>\" . sprintf(\"$%01.2f\", $cost) .\"</td></tr>\";\n\t}\n\tprintf( \"<tr><td colspan=6><b>Total Cost</b></td><td><b>$%01.2f</b></td></tr>\", $total_cost);\n\techo \"</table><p>\";\n printf( \"<p>A deposit of $%01.2f is due by %s<br>\\n\", $total_cost * 0.30, $deposit_due);\n\t\n\techo \"<h2>Payments</h2>\";\n\t$query = \"SELECT date, amount, type, details \n\tFROM edelweiss_payments AS p\n\tWHERE p.booking_id = $id\n\tLIMIT 20\";\n\t$result = mysqli_query($conn, $query);\n\tif (! $result ) die (\"<hr>Database Error: <br><pre>\". mysqli_error() .\"</pre><hr>\");\n\t$paid = 0;\n\t\n\techo \"<table border=1>\";\n\techo \"<thead><tr><td>Date</td><td>Type</td><td>Detials</td>\".\n\t\t\"<td>Amount</td></tr></thead>\";\n\twhile ($query_data = mysqli_fetch_array($result))\n\t{\n\t\t$date = $query_data[\"date\"];\n\t\t$amount = $query_data[\"amount\"];\n\t\t$type = $query_data[\"type\"];\n\t\t$details = $query_data[\"details\"];\n\t\t\n\t\t$paid = $paid + $amount;\n\t\techo \"<tr><td>\" . $date .\"</td>\";\n\t\techo \"<td align='center'>\" . $type .\"</td>\";\n\t\techo \"<td align='left'>\" . $details .\"</td>\";\n\t\tprintf( \"<td align='right'>$%01.2f</td><tr>\", $amount);\n\t}\t\n\tprintf( \"<tr><td colspan=3><b>Total Amount Paid</b></td><td align='right'><b>$%01.2f</b></td><tr>\", $paid);\n\techo \"</table><p>\";\n}", "title": "" } ]
[ { "docid": "d5f494e83169eef2f81dba20d6b9d534", "score": "0.77704346", "text": "public function getBooking()\n {\n return $this->booking;\n }", "title": "" }, { "docid": "322ac690c81e6c20221706ff788467e0", "score": "0.7753924", "text": "public function getBooking() {\n return $this->booking;\n }", "title": "" }, { "docid": "2762e8c0b590a16f7049059c39680064", "score": "0.7576667", "text": "public function getBooking()\n {\n return isset($this->Booking) ? $this->Booking : null;\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "4e07aa9117806b50924bdc114c8948a5", "score": "0.7100773", "text": "public function show(Booking $booking)\n {\n //\n }", "title": "" }, { "docid": "0b9e09ed75838a0a1ac3919b84a9cac8", "score": "0.70689607", "text": "public function getInfoForBooking($booking_id) {\r\n\t\treturn $this->ilRoomSharingDatabaseBooking->getInfoForBooking($booking_id);\r\n\t}", "title": "" }, { "docid": "33502404a410143e3bea832c4a8517cd", "score": "0.7067205", "text": "public function show(booking $booking)\n {\n //\n }", "title": "" }, { "docid": "33502404a410143e3bea832c4a8517cd", "score": "0.7067205", "text": "public function show(booking $booking)\n {\n //\n }", "title": "" }, { "docid": "b16ee4ec029923e165cffc6aa980799e", "score": "0.7001648", "text": "public function getInfoForBooking($booking_id) {\r\n\t\t$set = $this->ilDB->query('SELECT * FROM ' . dbc::BOOKINGS_TABLE . ' b LEFT JOIN ' . dbc::ROOMS_TABLE\r\n\t\t\t. ' r ON r.id = b.room_id LEFT JOIN usr_data u ON u.usr_id = b.user_id WHERE b.id = ' . $this->ilDB->quote($booking_id, 'integer'));\r\n\t\t$info = array();\r\n\t\twhile ($row = $this->ilDB->fetchAssoc($set)) {\r\n\t\t\t$info['title'] = $row['subject'];\r\n\t\t\t$info['user'] = $row['public_booking'] == 1 ? 'Gebucht von ' . $row['firstname'] . ' ' . $row['lastname'] . '<BR>' : '';\r\n\t\t\t$info['description'] = $row['bookingcomment'];\r\n\t\t\t$info['room'] = $row['name'];\r\n\t\t\t$info['start'] = new ilDateTime($row['date_from'], IL_CAL_DATETIME);\r\n\t\t\t$info['end'] = new ilDateTime($row['date_to'], IL_CAL_DATETIME);\r\n\t\t}\r\n\r\n\t\treturn $info;\r\n\t}", "title": "" }, { "docid": "b3a8a76926d6dd6e22228c46bccda859", "score": "0.69776", "text": "public function getBooking($booking){\n $this->connect();\n $sql = \"SELECT `booking_id`, `booking_guest_name`, `booking_guest_surname`, booking_guests_number , `guest_tel_number`, \";\n $sql .= \" `booking_check_in`, `booking_check_out`, `booking_cost`, `booking_deposit`, `booking_commission`,\";\n $sql .= \" `booking_source`, `booking_asset_id`, `guest_email` , booking_notes FROM `booking_details` WHERE `booking_id` = ?\";\n $res = $this->execute($sql , [$booking->booking_id]);\n $row = $res->fetch();\n $booking->booking_id = $row['booking_id'];\n $booking->booking_guest_name = $row['booking_guest_name'];\n $booking->booking_guest_surname = $row['booking_guest_surname'];\n $booking->booking_guests_number = $row['booking_guests_number'];\n $booking->guest_tel_number = $row['guest_tel_number'];\n $booking->booking_check_in = $row['booking_check_in'];\n $booking->booking_check_out = $row['booking_check_out'];\n $booking->booking_cost = $row['booking_cost'];\n $booking->booking_deposit = $row['booking_deposit'];\n $booking->booking_commission = $row['booking_commission'];\n $booking->booking_source = $row['booking_source'];\n $booking->booking_asset_id = $row['booking_asset_id'];\n $booking->guest_email = $row['guest_email'];\n $booking->booking_notes = $row['booking_notes'];\n }", "title": "" }, { "docid": "01e1019f7a63c7aef8774609fb7fbf07", "score": "0.6938612", "text": "public function get()\n {\n $service_availability = $this->compareServiceAndResources();\n $booking_obj = new Booking();\n $bookings = $booking_obj->parseBookingsDates($this->service_bookings);\n return $this->compareServiceAvailabilityAndBookings($service_availability, $bookings);\n }", "title": "" }, { "docid": "2e7e2b6d8adeb52db1a061e0b5704fc9", "score": "0.68750626", "text": "public function getAllBooking(){\n return $this->bookingRequest->getAllBooking();\n }", "title": "" }, { "docid": "a60cf227a1ea30b37e92fb28685749d6", "score": "0.6805333", "text": "public function getBooking($id);", "title": "" }, { "docid": "028d8b8510effc243b326f2371438fad", "score": "0.67660123", "text": "public function bookingList()\n {\n \t$userId = $this->userId;\n \tif ( $userId ) {\n \t\t$data = [];\n\t \t$booking = $this->model->getAllBookings($userId);\n\t \tif( $booking ){\n $i = 0;\n\t \t\twhile( $row = $booking->fetch_assoc() ){\n $data[$i]['id'] = $row['bookId'];\n $data[$i]['name'] = $row['name'];\n $data[$i]['email'] = $row['email'];\n $data[$i]['cars'] = $row['carName'];\n $data[$i]['destination'] = $row['destiName'];\n $data[$i]['pickup'] = $row['pickName'];\n $data[$i]['booked'] = date('Y-m-d H:i',strtotime($row['booking_time']));\n $data[$i]['returned'] = date('Y-m-d H:i',strtotime($row['return_time']));\n $data[$i]['bookedAt'] = $row['booked_at'];\n $i++;\n }\n\t \t} \n \t\tinclude '../views/booking-list.php';\n\t \texit();\n \t}\n }", "title": "" }, { "docid": "21fd72d7f900b21cb5f65eb4c357f2ab", "score": "0.6742847", "text": "public function getBookingDetails($bookingId){\n $result = $data = $this->ThriftyClass->getBookingDetails($bookingId); \n return Response::json($result);\n }", "title": "" }, { "docid": "0a34d49b47bc2277154058cf5dbf6c3a", "score": "0.6741038", "text": "public function reservationDetailsAction()\r\n {\r\n $id = $this->params()->fromQuery('id');\r\n $dbAdapter = $this->getServiceLocator()->get(\"Adapter\");\r\n $model = new ReservationModel($dbAdapter);\r\n $model->setId($id);\r\n \r\n $out = [\r\n 'Reservation Id' => $id,\r\n 'Reserved By' => $model->clientName,\r\n 'Created At' => $model->created_at,\r\n 'Status' => $model->status,\r\n ];\r\n \r\n return $this->viewModel->setVariable('response', json_encode($out));\r\n }", "title": "" }, { "docid": "36c1c6d7915589624a07a3e512b76f0c", "score": "0.6697599", "text": "public function show($id)\n\t{\n $booking = Booking::find($id);\n return $booking;\n\t}", "title": "" }, { "docid": "fba7526c949078428b9709437fc271b1", "score": "0.6694696", "text": "public function getDetails($paramIncludeUnclassified = FALSE)\r\n {\r\n $ret = $this->getDataFromDatabaseById($this->bookingId);\r\n\t\t\r\n if(!is_null($ret))\r\n {\r\n // Make raw\r\n $ret['booking_code'] = stripslashes($ret['booking_code']);\r\n $ret['coupon_code'] = stripslashes($ret['coupon_code']);\r\n $ret['pickup_location_code'] = stripslashes($ret['pickup_location_code']);\r\n $ret['return_location_code'] = stripslashes($ret['return_location_code']);\r\n $ret['payment_method_code'] = stripslashes($ret['payment_method_code']);\r\n\r\n if($ret['booking_timestamp'] > 0)\r\n {\r\n $ret['booking_date'] = date_i18n($this->shortDateFormat, $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $ret['booking_time'] = date_i18n('H:i', $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printBookingDate = date_i18n(get_option('date_format'), $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printBookingTime = date_i18n(get_option('time_format'), $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n } else\r\n {\r\n $ret['booking_date'] = '';\r\n $ret['booking_time'] = '';\r\n $printBookingDate = '';\r\n $printBookingTime = '';\r\n }\r\n\r\n if($ret['pickup_timestamp'] > 0)\r\n {\r\n $ret['pickup_date'] = date_i18n($this->shortDateFormat, $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $ret['pickup_time'] = date_i18n('H:i', $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printPickupDate = date_i18n(get_option('date_format'), $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printPickupTime = date_i18n(get_option('time_format'), $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n } else\r\n {\r\n $ret['pickup_date'] = '';\r\n $ret['pickup_time'] = '';\r\n $printPickupDate = '';\r\n $printPickupTime = '';\r\n }\r\n\r\n if($ret['return_timestamp'] > 0)\r\n {\r\n $ret['return_date'] = date_i18n($this->shortDateFormat, $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $ret['return_time'] = date_i18n('H:i', $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printReturnDate = date_i18n(get_option('date_format'), $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printReturnTime = date_i18n(get_option('time_format'), $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n } else\r\n {\r\n $ret['return_date'] = '';\r\n $ret['return_time'] = '';\r\n $printReturnDate = '';\r\n $printReturnTime = '';\r\n }\r\n\r\n $validBookingId = intval($ret['booking_id']);\r\n $bookedItemsSQL = \"\r\n SELECT bo.option_id, bo.units_booked,\r\n it.item_id, it.manufacturer_id, it.body_type_id, it.transmission_type_id, it.fuel_type_id\r\n FROM {$this->conf->getPrefix()}booking_options bo\r\n JOIN {$this->conf->getPrefix()}items it ON it.item_sku=bo.item_sku AND it.blog_id='{$ret['blog_id']}'\r\n WHERE booking_id='{$validBookingId}'\r\n \";\r\n $bookedExtrasSQL = \"\r\n SELECT ex.extra_id, bo.option_id, bo.units_booked\r\n FROM {$this->conf->getPrefix()}booking_options bo\r\n JOIN {$this->conf->getPrefix()}extras ex ON ex.extra_sku=bo.extra_sku AND ex.blog_id='{$ret['blog_id']}'\r\n WHERE booking_id='{$validBookingId}'\r\n \";\r\n $bookedItems = $this->conf->getInternalWPDB()->get_results($bookedItemsSQL, ARRAY_A);\r\n $bookedExtras = $this->conf->getInternalWPDB()->get_results($bookedExtrasSQL, ARRAY_A);\r\n\r\n // DEBUG\r\n // echo \"<br />BOOKING: \".$validBookingId.\", ITEMS: \".nl2br(print_r($bookedItems, TRUE));\r\n\r\n // Cars and Car Units\r\n $ret['item_ids'] = array();\r\n $ret['item_units'] = array();\r\n $ret['item_options'] = array();\r\n $ret['items'] = array();\r\n foreach($bookedItems AS $reservedItem)\r\n {\r\n $ret['item_ids'][] = $reservedItem['item_id'];\r\n $ret['item_units'][$reservedItem['item_id']] = $reservedItem['units_booked'];\r\n $ret['item_options'][$reservedItem['item_id']] = $reservedItem['option_id'];\r\n $ret['items'][] = array(\r\n \"item_id\" => $reservedItem['item_id'],\r\n \"manufacturer_id\" => $reservedItem['manufacturer_id'],\r\n \"body_type_id\" => $reservedItem['body_type_id'],\r\n \"transmission_type_id\" => $reservedItem['transmission_type_id'],\r\n \"fuel_type_id\" => $reservedItem['fuel_type_id'],\r\n \"option_id\" => $reservedItem['option_id'],\r\n \"units_booked\" => $reservedItem['units_booked'],\r\n );\r\n }\r\n\r\n // Extras and Extra Units\r\n $ret['extra_ids'] = array();\r\n $ret['extra_options'] = array();\r\n $ret['extra_units'] = array();\r\n $ret['extras'] = array();\r\n foreach($bookedExtras AS $reservedExtra)\r\n {\r\n $ret['extra_ids'][] = $reservedExtra['extra_id'];\r\n $ret['extra_options'][$reservedExtra['extra_id']] = $reservedExtra['option_id'];\r\n $ret['extra_units'][$reservedExtra['extra_id']] = $reservedExtra['units_booked'];\r\n $ret['extras'][] = array(\r\n \"extra_id\" => $reservedExtra['extra_id'],\r\n \"option_id\" => $reservedExtra['option_id'],\r\n \"units_booked\" => $reservedExtra['units_booked'],\r\n );\r\n }\r\n\r\n // Get payment status text and color\r\n $ret['print_payment_status'] = \"\";\r\n $ret['payment_status_color'] = \"#FF0000\";\r\n if($ret['payment_successful'] == 0)\r\n {\r\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_UNPAID_TEXT');\r\n $ret['payment_status_color'] = \"#FF0000\";\r\n } else if($ret['payment_successful'] == 1)\r\n {\r\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_PAID_TEXT');\r\n $ret['payment_status_color'] = \"black\";\r\n } else if($ret['payment_successful'] == 2)\r\n {\r\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_REFUNDED_TEXT');\r\n $ret['payment_status_color'] = \"navy\";\r\n }\r\n\r\n // Get booking status text and color\r\n $ret['print_booking_status'] = \"\";\r\n $ret['booking_status_color'] = \"black\";\r\n if($ret['is_cancelled'] == 0 && $ret['return_timestamp'] >= time())\r\n {\r\n if($ret['pickup_timestamp'] <= time())\r\n {\r\n // Departed\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_DEPARTED_TEXT');\r\n $ret['booking_status_color'] = \"blue\";\r\n } else\r\n {\r\n // Upcoming\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_UPCOMING_TEXT');\r\n $ret['booking_status_color'] = \"green\";\r\n }\r\n } else if($ret['is_cancelled'] == 0 && $ret['return_timestamp'] < time())\r\n {\r\n if($ret['is_completed_early'] == 1)\r\n {\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_COMPLETED_EARLY_TEXT');\r\n $ret['booking_status_color'] = \"black\";\r\n } else\r\n {\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_COMPLETED_TEXT');\r\n $ret['booking_status_color'] = \"black\";\r\n }\r\n } else if($ret['is_cancelled'] == 1)\r\n {\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_CANCELLED_TEXT');\r\n $ret['booking_status_color'] = \"red\";\r\n }\r\n\r\n\r\n // Prepare output for print\r\n $ret['print_booking_date'] = $printBookingDate;\r\n $ret['print_booking_time'] = $printBookingTime;\r\n $ret['print_pickup_date'] = $printPickupDate;\r\n $ret['print_pickup_time'] = $printPickupTime;\r\n $ret['print_return_date'] = $printReturnDate;\r\n $ret['print_return_time'] = $printReturnTime;\r\n $ret['print_booking_code'] = esc_html($ret['booking_code']);\r\n $ret['print_coupon_code'] = esc_html($ret['coupon_code']);\r\n $ret['print_pickup_location_code'] = esc_html($ret['pickup_location_code']);\r\n $ret['print_return_location_code'] = esc_html($ret['return_location_code']);\r\n $ret['print_payment_method_code'] = esc_html($ret['payment_method_code']);\r\n $ret['print_block_name'] = esc_html($ret['block_name']);\r\n\r\n // Prepare output for edit\r\n $ret['edit_booking_code'] = esc_attr($ret['booking_code']); // for input field\r\n $ret['edit_coupon_code'] = esc_attr($ret['coupon_code']); // for input field\r\n $ret['edit_pickup_location_code'] = esc_attr($ret['pickup_location_code']); // for input field\r\n $ret['edit_return_location_code'] = esc_attr($ret['return_location_code']); // for input field\r\n $ret['edit_payment_method_code'] = esc_attr($ret['payment_method_code']); // for input field\r\n\t\t\t\r\n\t\t\t\r\n }\r\n\r\n return $ret;\r\n }", "title": "" }, { "docid": "0408c0b383e13fc9fea11449e1d21186", "score": "0.6646103", "text": "public function getBookingDetails($bookingId, $bookingHash){\n\t\t//For this function signature is required. (md5($bookingId . $bookingHash . $secretKey))\n\t\t$sign = md5($bookingId . $bookingHash. $this->_secretKey);\n\t\treturn $this->api()->execute(\"getBookingDetails\", array($bookingId, $sign), array(), null, $this->getHeaderParams());\n\t}", "title": "" }, { "docid": "be42e9cded8992e6006c23be67033659", "score": "0.66242254", "text": "public function customerOwnBookingDetails($id){\n $booking = Booking::where('user_id',$id)->get();\n return $booking;\n }", "title": "" }, { "docid": "08cb111f865fc97423a424676eec0f93", "score": "0.65902334", "text": "public function booking()\n {\n return $this->hasOne('App\\Booking');\n }", "title": "" }, { "docid": "b87d2a6daa031df55f3c5c9905a2dcd7", "score": "0.65802604", "text": "public function booking()\n {\n return $this->hasMany(Booking::class);\n }", "title": "" }, { "docid": "7d63b1f3734bb15ff3ec11d386fa4db3", "score": "0.6543312", "text": "public function show(BookingRoom $bookingRoom)\n {\n //\n }", "title": "" }, { "docid": "6bb251aab9eea5d141f9c7d456010cbf", "score": "0.65304047", "text": "public function getDetails();", "title": "" }, { "docid": "dee22053026546970a79fc1b4fd0dc05", "score": "0.65064144", "text": "public function get_transaction_details($booking_id) {\n $this->db->select('transaction_details.*');\n $this->db->from('transaction_details');\n $this->db->where('transaction_details.booking_id', $booking_id);\n $query = $this->db->get();\n $query_result = $query->result();\n if (count($query_result) == 0) {\n $transaction_details = $query_result;\n } else {\n $transaction_details = $query_result[0];\n }\n return $transaction_details;\n }", "title": "" }, { "docid": "fc182c740be519e9dbc7f18cd6524cb3", "score": "0.6498562", "text": "public function getId() {\n return $this->bookingId;\n }", "title": "" }, { "docid": "61eb2252ad53c3993ea899d0e426b46d", "score": "0.64578277", "text": "public function getBookingById($bookingId){\n return $this->bookingRequest->getBookingById($bookingId);\n }", "title": "" }, { "docid": "85fa6e801c63a3b33104d3b3e671e02a", "score": "0.64231545", "text": "public function getTempBookingDetails()\n {\n try\n {\n //set default booking id\n $booking_id = null;\n\n //set default start date\n $start_date = null;\n\n //set default end date\n $end_date = null;\n\n //set default adults, children and infants\n $adults = 0;\n $children = 0;\n $infants = 0;\n\n //set default customer data\n $full_name = null;\n $country = null;\n $phone = null;\n $email = null;\n\n //set default downpayment and remaining payment\n $downpayment = 0;\n $formatted_downpayment = 0;\n $remaining_payment = 0;\n $formatted_remaining_payment = 0;\n\n //set default due date\n $due_date = null;\n\n //if search dates session exists format start date and end date\n if (Session::has('search_dates'))\n {\n $search_dates = Session::get('search_dates');\n\n $start_date = date('d.m.Y.', strtotime(substr($search_dates, 0, 11)));\n $end_date = date('d.m.Y.', strtotime(substr($search_dates, 14, 25)));\n }\n\n //if temp booking session exists get temp booking data\n if (Session::has('booking'))\n {\n $booking = TempBooking::where('booking_token', '=', Session::get('booking'))->first();\n\n //if temp booking doesn't exist return error status\n if (!$booking)\n {\n return ['status' => 0];\n }\n\n //set booking id\n $booking_id = $booking->id;\n\n $villa = Villa::where('id', '=', $booking->villa_id)->first();\n\n //set start date and end date\n $start_date = date('d.m.Y.', strtotime($booking->start_date));\n $end_date = date('d.m.Y.', strtotime($booking->end_date));\n\n //set adults, children and infants\n $adults = $booking->adults;\n $children = $booking->children;\n $infants = $booking->infants;\n\n //if temp booking customer exists set customer data\n if ($booking->customer_id)\n {\n $customer = Customer::find($booking->customer_id);\n\n $full_name = $customer->full_name;\n $country = $customer->country;\n $phone = $customer->phone;\n $email = $customer->email;\n }\n\n //call calculateBookingPayment method to calculate booking downpayment and remaining payment\n $booking_payment = $this->calculateBookingPayment($villa->id, $start_date, $end_date);\n\n //set downpayment and remaining payment\n $downpayment = $booking_payment['downpayment'];\n $formatted_downpayment = $booking_payment['formatted_downpayment'];\n $remaining_payment = $booking_payment['remaining_payment'];\n $formatted_remaining_payment = $booking_payment['formatted_remaining_payment'];\n\n //call calculateDueDate method to calculate due date\n $due_date = $this->calculateDueDate($start_date);\n }\n\n return ['status' => 1, 'id' => $booking_id, 'start_date' => $start_date, 'end_date' => $end_date, 'adults' => $adults,\n 'children' => $children, 'infants' => $infants, 'full_name' => $full_name, 'country' => $country, 'phone' => $phone,\n 'email' => $email, 'downpayment' => $downpayment, 'formatted_downpayment' => $formatted_downpayment,\n 'remaining_payment' => $remaining_payment, 'formatted_remaining_payment' => $formatted_remaining_payment,\n 'due_date' => $due_date];\n }\n catch (Exception $e)\n {\n return ['status' => 0, 'error' => trans('errors.error')];\n }\n }", "title": "" }, { "docid": "6a010e0b1bc96a05a3dcc636a124a0be", "score": "0.6410199", "text": "public function getBookingId() {\n return $this->bookingId;\n }", "title": "" }, { "docid": "f9cc4c28e5587debb9995873c5308b6e", "score": "0.63809425", "text": "public function show(Booking $booking)\n { \n // $messages = collect();\n // $first_message = $booking->message;\n // if( $first_message != \"Sin message.\"){\n // $messages->push( $first_message);\n // }\n // $messages = $messages->toBase()->merge($booking->messages()->orderBy('created_at','ASC')->get());\n $firstMessage = new Message;\n $firstMessage->message = $booking->message;\n $firstMessage->status = 1;\n $firstMessage->destination = 0;\n $firstMessage->read = 2;\n $firstMessage->created_at = now(); \n $firstMessage->updated_at = now();\n $firstMessage->bookings_id = $booking->id;\n $messages = array();\n array_push($messages, $firstMessage);\n foreach ($booking->messages->sortBy('created_at') as $message) {\n array_push($messages, $message);\n }\n return response()->json($messages, 200);\n }", "title": "" }, { "docid": "0be0eafc876aa5f0ee9b216296699f3f", "score": "0.6364013", "text": "function getDetails() { return $this->details; }", "title": "" }, { "docid": "03caffe0277f52515df320aad93febd5", "score": "0.6344791", "text": "function get_booking_details($app_reference, $booking_source, $booking_status='')\r\n {\r\n $response['status'] = FAILURE_STATUS;\r\n $response['data'] = array();\r\n $bd_query = 'select * from sightseeing_booking_details AS BD WHERE BD.app_reference like '.$this->db->escape($app_reference);\r\n if (empty($booking_source) == false) {\r\n $bd_query .= ' AND BD.booking_source = '.$this->db->escape($booking_source);\r\n }\r\n if (empty($booking_status) == false) {\r\n $bd_query .= ' AND BD.status = '.$this->db->escape($booking_status);\r\n }\r\n $id_query = 'select * from sightseeing_booking_itinerary_details AS ID WHERE ID.app_reference='.$this->db->escape($app_reference);\r\n $cd_query = 'select * from sightseeing_booking_pax_details AS CD WHERE CD.app_reference='.$this->db->escape($app_reference);\r\n $cancellation_details_query = 'select HCD.* from sightseeing_cancellation_details AS HCD WHERE HCD.app_reference='.$this->db->escape($app_reference);\r\n $response['data']['booking_details'] = $this->db->query($bd_query)->result_array();\r\n $response['data']['booking_itinerary_details'] = $this->db->query($id_query)->result_array();\r\n $response['data']['booking_customer_details'] = $this->db->query($cd_query)->result_array();\r\n $response['data']['cancellation_details'] = $this->db->query($cancellation_details_query)->result_array();\r\n if (valid_array($response['data']['booking_details']) == true and valid_array($response['data']['booking_itinerary_details']) == true and valid_array($response['data']['booking_customer_details']) == true) {\r\n $response['status'] = SUCCESS_STATUS;\r\n }\r\n\r\n $response['data']['booking_details'][0]['attributes']= unserialized_data($response['data']['booking_details'][0]['attributes']);\r\n //debug($response);die('88');\r\n return $response;\r\n }", "title": "" }, { "docid": "05ecbb830ec58fd272db53ddd4229a13", "score": "0.6335857", "text": "function view_detail_bk($bk_id) {\n\t $pass_id = $this->getCurrentPassengerId();\n\t $bkInfo = $this->mod_fecustomize->bookingInfoByPassengerIDAndBookingID($bk_id, $pass_id);\n\t\n\t return $bkInfo;\n\t }", "title": "" }, { "docid": "9b2c634659a79b526c322147ce3c435e", "score": "0.63273805", "text": "function get_booking_details($app_reference, $booking_source, $booking_status = '') {\r\n\t\t$response ['status'] = FAILURE_STATUS;\r\n\t\t$response ['data'] = array ();\r\n\t\t$bd_query = 'select BD.* , ud.logo as user_image from hotel_booking_details AS BD INNER JOIN b2b_user_details as ud on BD.created_by_id=ud.user_oid WHERE BD.app_reference like ' . $this->db->escape ( $app_reference );\r\n\t\tif (empty ( $booking_source ) == false) {\r\n\t\t\t$bd_query .= '\tAND BD.booking_source = ' . $this->db->escape ( $booking_source );\r\n\t\t}\r\n\t\tif (empty ( $booking_status ) == false) {\r\n\t\t\t$bd_query .= ' AND BD.status = ' . $this->db->escape ( $booking_status );\r\n\t\t}\r\n\t\t$id_query = 'select * from hotel_booking_itinerary_details AS ID WHERE ID.app_reference=' . $this->db->escape ( $app_reference );\r\n\t\t$cd_query = 'select * from hotel_booking_pax_details AS CD WHERE CD.app_reference=' . $this->db->escape ( $app_reference );\r\n\t\t$cancellation_details_query = 'select HCD.* from hotel_cancellation_details AS HCD WHERE HCD.app_reference=' . $this->db->escape ( $app_reference );\r\n\t\t$response ['data'] ['booking_details'] = $this->db->query ( $bd_query )->result_array ();\r\n\t\t$response ['data'] ['booking_itinerary_details'] = $this->db->query ( $id_query )->result_array ();\r\n\t\t$response ['data'] ['booking_customer_details'] = $this->db->query ( $cd_query )->result_array ();\r\n\t\t$response ['data'] ['cancellation_details'] = $this->db->query ( $cancellation_details_query )->result_array ();\r\n\t\tif (valid_array ( $response ['data'] ['booking_details'] ) == true and valid_array ( $response ['data'] ['booking_itinerary_details'] ) == true and valid_array ( $response ['data'] ['booking_customer_details'] ) == true) {\r\n\t\t\t$response ['status'] = SUCCESS_STATUS;\r\n\t\t}\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "4c1321bb616a434c2c8d27c2695e64be", "score": "0.6326076", "text": "public function showBooking(Request $request, $booking_id) {\n\n //$booking = Booking::with('payments')->find($booking_id)->get();\n\n $booking = Booking::with('payments')->where(['id' => $booking_id])->get();\n\n\n return $this->prepareResult(true, $booking, [],\"All results fetched\");\n\n\n }", "title": "" }, { "docid": "931a2bec590ed48fc38ff1a6fdcb95a6", "score": "0.6321631", "text": "public function getBillingDetails();", "title": "" }, { "docid": "c3c3c5bc675d9ad87c97f8d20982ac6f", "score": "0.63180083", "text": "public function getDataBookingDetails(Request $request)\n {\n $id_booking = $request->get('id');\n $bookingDetail = Archive::GetDataBookingDetails($id_booking);\n $booking = Archive::GetBookingById($id_booking);\n return json_encode(['bookingDetail' => $bookingDetail, 'booking' => $booking]);\n\n return json_encode($data);\n }", "title": "" }, { "docid": "aa185a747d19cf8f0e6cfbf602941382", "score": "0.63115513", "text": "function showBookingDetail($bookingId)\n {\n $data['bookingDetail'] = $this->roombooking_model->getBookingDetailById($bookingId);\n $this->global['rooms'] = $this->room_model->getRoomsByBossId();\n $this->global['pageTitle'] = '活动详情';\n $this->loadViews(\"roombookingdetail\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "c3ce3c98bbcb5204e0789022ef10c92c", "score": "0.6292069", "text": "public function getDetails()\n {\n return $this->details;\n }", "title": "" }, { "docid": "df408d2feaa96540cf93d955d3915e08", "score": "0.6290209", "text": "public function show(SpaBooking $spaBooking)\n {\n return $spaBooking;\n }", "title": "" }, { "docid": "f93d3cbeb4eb960e723141fe37538b2e", "score": "0.6242207", "text": "public function getDetails()\n {\n return $this->_details;\n }", "title": "" }, { "docid": "03e476423763b5e0c18cfc3d0b4c4c80", "score": "0.6224165", "text": "public function show($id)\n {\n $bus_schedule_bookings = Bus_schedule_booking::find($id);\n if($bus_schedule_bookings)\n {\n return response()->json(['buses' => $bus_schedule_bookings], 200);\n }\n //if the id not found\n else\n {\n return response()->json(['message'=>'No Bus Booking Found'],404);\n }\n }", "title": "" }, { "docid": "2e93428909d990d5a267702cb5ba71e3", "score": "0.6186565", "text": "public function getBookingId(){\n return $this->bookingId;\n}", "title": "" }, { "docid": "e3bf8db4f118124a80138e2ba27cb17a", "score": "0.61703455", "text": "public function getDetail()\n {\n // populate fields\n $query = array(self::TRANSACTION_ID => $this->transactionId);\n // call request method\n $response = $this->request(self::GET_DETAIL, $query);\n\n return $response;\n }", "title": "" }, { "docid": "4b1f4de71d38e1cb778d61df1f2e8f71", "score": "0.6165811", "text": "public function customer(){\n return $this->hasOne('App\\Customer');\n //this customer belongs to this booking. access to any data of this customer\n }", "title": "" }, { "docid": "feacdb3bd641385b03d02802e9d0bee9", "score": "0.61597687", "text": "public function booking() {\n return $this->belongsTo('App\\Booking');\n }", "title": "" }, { "docid": "262e9854698e20ef91d17bfdbe7ecd8d", "score": "0.6129942", "text": "public function getDetails() {\n\t\treturn $this->details;\n\t}", "title": "" }, { "docid": "eba06708b5788c9705425292c88cb108", "score": "0.61190265", "text": "public function getReservation() {\n return $this->ReservationDao->getReservation();\n }", "title": "" }, { "docid": "75afdcacc2edc88168ddb4e56817f5ec", "score": "0.6107137", "text": "public function show($id){\n $booking=Booking::find($id);\n if(!$booking){\n return response()->json([\n 'error'=>404,\n 'message'=>'Not found',\n ],404);\n }\n return $booking;\n }", "title": "" }, { "docid": "4b888c40e18d08cc7fd4dd14ae35af3a", "score": "0.61058414", "text": "public function bookingList()\n {\n $booking_lists = BookingSlot::with('user')->where('student_id', '!=' , 0)->where('slote_date', date('Y-m-d'))->get();\n\n\n }", "title": "" }, { "docid": "11bd8cabf873598524479e53cb98ae5b", "score": "0.61036086", "text": "abstract public function getDetails();", "title": "" }, { "docid": "cd9a965d730192dc2541783e345700c9", "score": "0.6090413", "text": "public function show($id)\n {\n $booking = Booking::find($id);\n\n if(!$booking){\n return response()->json(['message' => 'This booking does not exist','success'=> 0 , 'code' => 404], 404);\n }\n\n return $booking;\n }", "title": "" }, { "docid": "87bedc0c7c72283f1893857567b06358", "score": "0.6087479", "text": "public function getBooking()\n {\n return $this->hasOne(Jobs::className(), ['booking_id' => 'booking_id']);\n }", "title": "" }, { "docid": "0eb3625ea8a6086d94d112b5e24ce457", "score": "0.6084558", "text": "public function getBook()\n {\n return $this->book;\n }", "title": "" }, { "docid": "cacd3b94dae178e47e06c22245116282", "score": "0.6076667", "text": "public function getBillDetails()\n {\n $bill = new BillModel('http://safe-plains-5453.herokuapp.com/bill.json');\n print $this->returnJson($bill->getBill('bill.json'));\n }", "title": "" }, { "docid": "ff5ff8fbbafe768853decdc0a7d56474", "score": "0.6067298", "text": "public function TripDetails() {\n /**\n * Get the Customer Detils\n */\n $customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n /**\n * Get the Customer ID\n */\n $customerId = $customer->getId ();\n $todayData = Mage::getModel ( 'core/date' )->timestamp ( time () );\n $todayDate = date ( 'Y-m-d', $todayData );\n /**\n * Get Colletion for the 'airhotels/airhotels/airhotels' with some filter\n * 'order_status'\n * 'fromDate'\n * 'Todate'\n * CustomerID\n */ \n return Mage::getModel ( 'airhotels/airhotels' )->getCollection ()->addFieldToFilter ( 'order_status', 1 )->addFieldToFilter ( 'todate', array (\n 'lteq' => $todayDate \n ) )->addFieldToFilter ( 'customer_id', $customerId )->setOrder ( 'id', 'DESC' );\n }", "title": "" }, { "docid": "e157b036dbacef71d4de58f1c41fa6c8", "score": "0.6057528", "text": "public function getBook()\n {\n return $this->book;\n }", "title": "" }, { "docid": "669deb11f94cf05762bcb17926e28570", "score": "0.60473156", "text": "public function show($id){\n $bookings = Booking::join('customers','bookings.customer_id','=','customers.customer_id')\n ->findOrFail($id);\n\n $paymentMethods = PaymentMethod::get();\n\n $customers = Customer::get();\n\n $guests = Guest::get();\n\n $rooms = Room::\n join('room_types','rooms.room_type_id','=','room_types.room_type_id')\n ->join('room_prices','rooms.room_price_id','=','room_prices.room_price_id')\n ->join('room_bands','rooms.room_band_id','=','room_bands.room_band_id')\n ->select('rooms.room_id','room_types.room_type','room_prices.room_price','room_bands.room_description')\n ->get();\n\n return view('bookings.show',[\n 'bookings' => $bookings,\n 'customers' => $customers,\n 'guests' => $guests,\n 'rooms' => $rooms,\n 'paymentMethods' => $paymentMethods\n ]);\n }", "title": "" }, { "docid": "e4aaab52f152b6667606f9bd1d89c4ac", "score": "0.60451174", "text": "public function show(Booking $booking) {\n\t\t$client = Client::all();\n\t\t$payment = Payment::all();\n\t\t$service = Service::all();\n\t\t$setting = Setting::first();\n\t\t$user = User::all();\n\n\t\treturn view('bookings.show', compact('booking', 'client', 'payment', 'service', 'setting', 'user'));\n\t}", "title": "" }, { "docid": "2007eb65f37f2626131f9fd81344ddb8", "score": "0.6043769", "text": "public function agentBookings()\n\t{\n\t\t$flightBooking = DB::select(\n 'SELECT * From flights \n WHERE booked_by = ? \n ORDER BY id DESC', ['agent']\n );\n\n \treturn response()->json([\n \t\t'flightBooking'=>$flightBooking, \n \t\t'message'=>'Flight Bookings for agent fetched Successfully'\n \t], 200);\n\t}", "title": "" }, { "docid": "c851523e929db9778f0b2b5f96f04662", "score": "0.60380363", "text": "private function get_details()\n {\n }", "title": "" }, { "docid": "107aacad2d94b054c036848737b11ee3", "score": "0.60310125", "text": "public function index()\n {\n //get data from database\n $Booking= BusScheduleBooking::all();\n\n //view data\n return new ScheduleResource($Booking);\n }", "title": "" }, { "docid": "7f7361b577b072acbe895399447d53fd", "score": "0.60013855", "text": "public function show(Booking $booking)\n {\n return responder()->success(['booking' => $booking]);\n }", "title": "" }, { "docid": "1317854ef9c6fada1d3bd1a05524076f", "score": "0.59978926", "text": "public function getBuyingDetails() {\n return $this->getParameter('buying_details');\n }", "title": "" }, { "docid": "8b77f133b229a8274c8cd127adfb0041", "score": "0.59977746", "text": "public function showBookings()\n {\n $bookings = Booking::where(['user_id' => auth()->user()->id])->with('event')->get();\n return view('my_bookings', compact('bookings'));\n }", "title": "" }, { "docid": "e0fa0576c4b1237fd5627a029838cef8", "score": "0.5991396", "text": "public function show(Reservation $reservation)\n {\n //\n }", "title": "" }, { "docid": "bd887c7d2f2ba38ef256cbcfd7c32ff5", "score": "0.59913266", "text": "public function getBookings(){\n return $this->hasMany(Booking::className(), ['event_id' => 'id']);\n }", "title": "" }, { "docid": "f0d2b3b716c8cb8fffb3f809d6cbeea5", "score": "0.59824353", "text": "public function booking(): BelongsTo\n {\n return $this->belongsTo(Booking::class);\n }", "title": "" }, { "docid": "e4dbbbe89c900064177e2b4320610d39", "score": "0.59808606", "text": "public function show(BilletReservation $billetReservation)\n {\n //\n }", "title": "" }, { "docid": "34b26129958f9e04878e1032bf17e498", "score": "0.59418666", "text": "public function budgetDetails()\n {\n return $this->activityService->getBudgetDetails();\n }", "title": "" }, { "docid": "f2341b1b189b0a3ac2e6c54983f57ca1", "score": "0.59338415", "text": "public function getBookingUrl(){\n return 'http://booking.brusselstangofestival.com/frontend/web/booking/create?event_uuid='.$this->uuid;\n }", "title": "" }, { "docid": "0063ff267681f7c590b4207543d13e3d", "score": "0.59333694", "text": "public function booking()\n {\n return view('templates.them6.booking');\n }", "title": "" }, { "docid": "499496274201732ee78473ff08dd66bc", "score": "0.5928207", "text": "public static function getBookingSummary($bookingDetails){\r\n\t\t$result = \"\";\r\n\t\t\r\n\t\t$result.=\"<div class=\\\"event-booking-details\\\">\";\r\n\t\t$result.=\"<div class=\\\"event-details\\\">\";\r\n\t\tif(isset($bookingDetails->event->pictures)){\r\n\t\t\t$result.=\"<div class=\\\"event-image\\\">\";\r\n\t\t\t$result.= \"<img src=\\\"\".JURI::root().PICTURES_PATH.$bookingDetails->event->pictures[0]->picture_path.\"\\\" title=\\\"\".$bookingDetails->event->name.\"\\\" />\";\r\n\t\t\t$result.=\"</div>\";\r\n\t\t}\r\n\t\t\r\n\t\t$result.=\"<h4 class=\\\"event-name\\\">\".$bookingDetails->event->name.\"</h4>\";\r\n\t\t$result.=\"<div class=\\\"event-adress\\\">\";\r\n\t\t$result.= JBusinessUtil::getAddressText($bookingDetails->event);\r\n\t\t$result.=\"</div>\";\r\n\t\t$result.=\"<div class=\\\"event-contact-details\\\">\";\r\n\t\t\r\n\t\tif(!empty($bookingDetails->event->contact_phone)){\r\n\t\t\t$result.=\"<span><strong>\".JText::_(\"LNG_PHONE\").\"</strong>: \".$bookingDetails->event->contact_phone.\"</span>&nbsp;&nbsp;&nbsp;&nbsp;\";\r\n\t\t}\r\n\t\t\r\n\t\tif(!empty($bookingDetails->event->contact_email)){\r\n\t\t\t$result.=\"<span><strong>\".JText::_(\"LNG_EMAIL\").\"</strong>: \".$bookingDetails->event->contact_email.\"</span>\";\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t$result.=\"</div>\";\r\n\t\t$result.=\"<div class=\\\"clear\\\"></div>\";\r\n\t\t$result.=\"</div>\";\r\n\t\r\n\t\t$result.=self::getTicketsSummary($bookingDetails);\r\n\t\t\r\n\t\t$result.=\"</div>\";\t\t\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "1d3ba0d564a442aac2f0bc9ec2dac5e9", "score": "0.5925387", "text": "public function book($p) {\n $p = $this->populateUserId($p);\n return $this->c['booking-service']->requestBooking($p)->attributes();\n }", "title": "" }, { "docid": "112ef6346b28d58b998aba8524b4a78d", "score": "0.592476", "text": "public function bookingHistory(){\n $bookingHistory = Booking::with('bookingCar')->where('user_id',auth()->user()->id)->orderBy('id','desc')->get();\n toastr()->success('Check Your Booking Info.');\n return view('frontend.pages.profile.bookingHistory',\\compact('bookingHistory'));\n }", "title": "" }, { "docid": "7405d783121a5845ee1f905701c64011", "score": "0.5924454", "text": "public function show($id)\n {\n //$bookinginfo = BookingInfo::findOrFail($id); //BookingInBookingInfo::findOrFail($id);\n $bookinginfo = DB::table('BookingInfo')->where('orderId', $id)->get()[0];\n //$bookinginfo = DB::table('BookingInfo')->get();\n return view('bookinginfos.show', compact('bookinginfo'));\n }", "title": "" }, { "docid": "df3bdb2f44170bff662a77c459158e44", "score": "0.59215194", "text": "public function getBooking( $booking_order_id, Request $request)\n {\n try {\n \n $booking = \\App\\Bookings::with(['participant', 'supportWorker','serviceProvider', 'registration_group'])\n ->userBookings()\n ->where( 'booking_orders.id', $booking_order_id )\n ->first();\n // dd($booking->toArray() );\n if(!$booking)\n return response()->json(['status'=>false,'message'=>\"booking not found!\"], 404);\n\n\n return response()->json(['status'=>true,'bookings'=>$booking->toArray()], 200);\n\n }\n catch(Exception $exception) {\n return reportAndRespond($exception, 400);\n }\n }", "title": "" }, { "docid": "1f19787a2a9a05960867859a00cf2505", "score": "0.59140575", "text": "function getBookingDetails ($db, $dep, $dest) {\n $query = '\n SELECT seats, email\n FROM users\n WHERE departure <= \"' . $dep . '\" AND destination >= \"' . $dest . '\"\n ORDER BY email;\n ';\n\n $details = '';\n $res = $db->query($query);\n\n if ($res) {\n $i = $res->num_rows;\n if ($i != 0)\n $details = ' -'; // just to format output\n\n while ($i--) {\n $line = $res->fetch_array(MYSQLI_NUM);\n $details = $details . \" \" . $line[1] . \" (\" . $line[0] . \")\";\n }\n\n $res->free();\n }\n\n return $details;\n }", "title": "" }, { "docid": "65e53374a9560a059b34846e7d2644a3", "score": "0.59103656", "text": "public function show($r_id)\n {\n // Method ini berfungsi bukan untuk mencari booking berdasarkan ID Tetapi \n // berdasarkan ID Ruangan yang diklik oleh user\n\n $booking_u_id = DB::table('bookings')->select('u_id')->where('bookings.r_id', '=', $r_id)->first();\n $user_nip_nama = $user_department = DB::table('users')->select('nip', 'nama')->where('users.id', '=', $booking_u_id->u_id)->first();\n $booking = DB::table('bookings')->select('tanggal_selesai', 'tanggal_mulai', 'keperluan')->where('bookings.r_id', '=', $r_id)->first();;\n $booking->nip = $user_nip_nama->nip;\n $booking->nama = $user_nip_nama->nama;\n\n if (is_null($booking)) {\n // return response\n $response = [\n 'error' => true,\n 'message' => 'Booking not found.',\n ];\n return response()->json($response, 404);\n }\n \n // return response\n $response = [\n 'error' => false,\n 'msg' => 'Booking retrieved successfully.',\n 'booking_room' => $booking \n ];\n return response()->json($response, 200);\n }", "title": "" }, { "docid": "b1c0fc09fc99df17660a0e62951c4aa3", "score": "0.5910247", "text": "function getBook()\n {\n $query = $GLOBALS['DB']->query(\"SELECT * FROM books_t WHERE id = {$this->getBookId()};\");\n $returned_book = $query->fetchAll(PDO::FETCH_ASSOC);\n\n $title = $returned_book[0]['title'];\n $id = $returned_book[0]['id'];\n $new_book = new Book($title, $id);\n return $new_book;\n }", "title": "" }, { "docid": "4db467559384590b8ad788531b44aaa1", "score": "0.5899562", "text": "public function getDetailsBooks() {\n try {\n $books = DB::table('books')\n ->select('title', 'total_pages', 'created_date', 'img_url', 'content')\n ->get();\n return $this->respondSuccess('Get details of the books succeed!', $books);\n } catch (Exception $e) {\n return $this->respondError($e);\n }\n }", "title": "" }, { "docid": "a8fe8a674c4212479991a581c39b195a", "score": "0.58945155", "text": "public function getAllBookingAttributes() {\r\n\t\treturn $this->ilRoomSharingDatabaseBookingAttribute->getAllBookingAttributes();\r\n\t}", "title": "" }, { "docid": "73ab1dc134cf52c643f653090aaaa822", "score": "0.589112", "text": "public function getDetails()\n {\n return $this->name . ' : ' . $this->location;\n }", "title": "" }, { "docid": "73ab1dc134cf52c643f653090aaaa822", "score": "0.589112", "text": "public function getDetails()\n {\n return $this->name . ' : ' . $this->location;\n }", "title": "" }, { "docid": "3e78bf0e761d22235a4636d5e8bd7a8d", "score": "0.58894825", "text": "function getBillingDetails()\n {\n $data = $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/billing\");\n return $data;\n }", "title": "" }, { "docid": "4e521fb364c59f56de495b03bba1cf90", "score": "0.5883522", "text": "public function reservation_detail(){\n return $this->hasOne('App\\Model\\ReservationDetail', 'cust_id', 'cust_id');\n }", "title": "" }, { "docid": "4a0bce668e88d1c132af0511fd7e02f1", "score": "0.5881713", "text": "public function show(Borrowing $borrowing)\n {\n //\n }", "title": "" }, { "docid": "9d3855e50c6163159d0d46d0f68e288a", "score": "0.5881545", "text": "public function find()\n {\n return $this->db->get( 'ref_obmp_booking' )->result() ;\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "1c2f1908928bd932b2e366897ef33ea7", "score": "0.0", "text": "public function create() {\n\t\t$title = 'COREVAT';\n\t\t$title_section = 'Catálogo de Empresas';\n\t\t$titleGrid = 'Catálogo de Empresas';\n\t\t$row = $this->table;\n\t\t$rows = Empresas::orderBy('rs', 'asc')->get();\n\t\treturn View::make('CorevatCatalogos.Empresas.create', compact('title', 'title_section', 'row', 'rows', 'titleGrid'));\n\t}", "title": "" } ]
[ { "docid": "847f003a4addf6820c7b7d4e542cfa95", "score": "0.7909494", "text": "public function create()\n {\n $resource = $this->prepResource('create');\n $this->showBreadcrumb($resource, [null => 'Create New']);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "452dfa44b6fc27ed6e2aa675caef8e17", "score": "0.7706946", "text": "public function create() {\n return view('acl::resource.create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "303de6e59e0dfcaa3323bed304cea7e1", "score": "0.7500156", "text": "public function create()\n {\n if(Gate::denies($this->resource.'-create'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n \n $this->addToView($this->options());\n\n return request()->wantsJson() \n ? null\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('label', 'title', 'icon')));\n }", "title": "" }, { "docid": "bb55b8b1372a305242b37dbd1e241a37", "score": "0.7487926", "text": "public function create() {\n return view('members.resources.createResource');\n }", "title": "" }, { "docid": "290e9e5c1e1c6771e2a48a7c39b658ae", "score": "0.73964167", "text": "public function create()\n\t{\n\t\treturn View::make('resourcetypes.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "7c2dc6aee3a7b173b42ae8f6ff0e9ac2", "score": "0.73191345", "text": "public function create() //represents forms user fills out.\n {\n return view('create');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "a079c2ff615466a913385f0f3bbf4c9d", "score": "0.7209733", "text": "public function create()\n {\n return view('project_resources/create');\n }", "title": "" }, { "docid": "56a59cf2c86c7085f5fdde712ee5ea06", "score": "0.7203657", "text": "public function create()\n {\n return view('sick.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "d52a8d55018a5452356ebfeb392dad33", "score": "0.7202316", "text": "public function newAction()\n {\n $entity = new \\Cumts\\MainBundle\\Entity\\Show();\n $form = $this->createForm(new ShowType(), $entity);\n\n return $this->render('CumtsAdminBundle:Show:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "50c363b98b85b902c0b33495df17fc28", "score": "0.71889836", "text": "public function create()\n {\n return view('Admin.Forms.create');\n }", "title": "" }, { "docid": "99c209c7d567bb6a386886e720582d3f", "score": "0.71736616", "text": "public function newAction()\n {\n $entity = $this->getNewEntity();\n $alias = $this->getAlias();\n $fields = $this->getFields('new');\n\n $form = $this->createCreateForm($entity, $alias, $fields);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView()\n )\n );\n }", "title": "" }, { "docid": "d7792233bdf3a051b8ecc8a3bf85491e", "score": "0.717068", "text": "public function create()\n {\n return view('admin.form.create');\n }", "title": "" }, { "docid": "182ce5c02e801fee3966edc96be1055e", "score": "0.7139064", "text": "public function create()\n {\n return view('form-create');\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7128814", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "9a87c89323c16332dd5980c005f9fd73", "score": "0.71161574", "text": "public function create()\n {\n return view('admin.retiros.partials.createForm');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "4618d70cb6b1be4af26372f030bb7274", "score": "0.710939", "text": "public function create()\n {\n return view('livro.form');\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "d42793f140a997f3a5618ebf3a790d1b", "score": "0.7097341", "text": "public function create()\n {\n return view('Admin.generals.form');\n }", "title": "" }, { "docid": "e1be67b632033f807b2cefd97a7e5682", "score": "0.7095487", "text": "public function create()\n {\n $meta = \"Create\";\n return view('driver.form', compact('meta'));\n }", "title": "" }, { "docid": "e6d14f751da329891ae59d3d0614b844", "score": "0.7088803", "text": "public function create()\n {\n return view('backend::module.form');\n }", "title": "" }, { "docid": "ba36d03e3181e8d29ef780e9f1b47d8e", "score": "0.70807815", "text": "public function create()\n {\n return view('applicationforms.create');\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "d91864a90a03af3679687f163da22716", "score": "0.7078707", "text": "public function create()\n {\n return view(\"pages-ui::backend.form\", [\n \"extends\" => config(\"pages-ui.backend.template_to_extend\", \"layouts.app\"),\n \"edit\" => false,\n ]);\n }", "title": "" }, { "docid": "19a8b4682806788e584645f302bff901", "score": "0.7070855", "text": "public function newAction()\n {\n $manager = $this->container->get('zimzim_construction_site_actionitemmanager');\n $entity = $manager->createEntity();\n $form = $this->createCreateForm($entity, $manager);\n\n return $this->render(\n self::DIR.':new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "868d619f6ddd72d0196bd0112e6d14a0", "score": "0.7068269", "text": "public function create()\n {\n $items = $this->model->get();\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'essence' => $this->essence,\n 'items' => $items,\n ]);\n }", "title": "" }, { "docid": "a717d49d12459178d0ea648de34b92f3", "score": "0.7053267", "text": "public function create()\n {\n return view('submit_forms.create');\n }", "title": "" }, { "docid": "88bddae014db0489caa5efa7d888b963", "score": "0.70453197", "text": "public function newAction()\n {\n $entity = new Cliente();\n $form = $this->createForm(new ClienteType(), $entity);\n\n return $this->render('ContadoresBundle:Cliente:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'cliente_new'\n ));\n }", "title": "" }, { "docid": "2885b0aa30fbd2b9a13afbabd00ca579", "score": "0.70360965", "text": "public function create()\n {\n return view('AdminPanel.Supplier.form');\n }", "title": "" }, { "docid": "0c1144eddfb806ac17f30214bdfede15", "score": "0.70316905", "text": "public function create()\n {\n return view('cat.form_create');\n }", "title": "" }, { "docid": "e1571e560aab196c00674cc03cd106df", "score": "0.7028034", "text": "public function newAction()\n {\n $entity = new Formation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FormationAdminBundle:Formation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "d12ec07b606c2d87e70c0e3602b230c7", "score": "0.7027543", "text": "public function create()\n {\n return view('admin.resources.person.create');\n }", "title": "" }, { "docid": "e2a9ae8284cc267325c107ada7cdb536", "score": "0.70238173", "text": "public function create()\n {\n return View::make('form.add');\n }", "title": "" }, { "docid": "40b5fe05bbe7fe1fc32074241497237e", "score": "0.70228195", "text": "public function create()\n {\n \treturn view ('backend.professor.create');\n }", "title": "" }, { "docid": "f8ec369da210a363de27940e92b3f84d", "score": "0.70125043", "text": "public function create()\n {\n return view('libro.formlibro');\n }", "title": "" }, { "docid": "df9822b231f9e125e4b3aa9bc0b50b54", "score": "0.7000799", "text": "public function newAction()\n {\n return $this->renderCreationForm(new User(), new UserType(), 'User', 'FsbMediaFilesIndexBundle');\n }", "title": "" }, { "docid": "d3818ee7b8a6f5feddcf93f25df0fe6b", "score": "0.6986593", "text": "public function create()\n {\n return view('students._form');\n }", "title": "" }, { "docid": "bad09d21897077a09fc9ba04b37aa535", "score": "0.69801325", "text": "public function create()\n\t{\n\t\treturn view('dienthoai.create');\n\t}", "title": "" }, { "docid": "bfc2f651a3ad53ba32a1f0624b2baf70", "score": "0.6976104", "text": "public function create()\n {\n return view('fabricante.form');\n }", "title": "" }, { "docid": "38d1a27327ac4a367aba240dedebaa0e", "score": "0.69747853", "text": "public function showCreateNewClientForm()\n {\n return view('admin.createNewClientForm');\n }", "title": "" }, { "docid": "65c79b36d9444a6beccf14aac7b2b045", "score": "0.6973617", "text": "public function create()\n {\n return view('product.form', \n [\n 'product' => new Product\n ]);\n }", "title": "" }, { "docid": "daf28f960dad10d136b88bf0cb698afe", "score": "0.69729453", "text": "public function create()\n\t{\n\t\treturn view('siswa.add');\n\t}", "title": "" }, { "docid": "77b32a1a2812f894a1084db4a0c3b2d8", "score": "0.6965231", "text": "public function create()\n {\n $title = trans('option.new');\n\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "80055340b1924d51914b16fcf2fee697", "score": "0.6960298", "text": "public function newAction()\n {\n $entity = new Client();\n $form = $this->createCreateForm($entity);\n return $this->render('ProjectFilmsBundle:Default:singup.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n}", "title": "" }, { "docid": "d607449c2320c1a6b73af5c48d80dea8", "score": "0.695971", "text": "public function create()\n {\n\t\treturn view('Master.SMD.product_form');\n }", "title": "" }, { "docid": "41eb11154e57dff75498fcf25564c134", "score": "0.6952435", "text": "public function create()\n {\n return view('admin.book.add');\n }", "title": "" }, { "docid": "c99a469be2dc77ac788affd5c609736e", "score": "0.69498503", "text": "public function create()\n\t{\n\t\treturn view('tanah.create');\n\t}", "title": "" }, { "docid": "9c1725367be54b1702af65b52b997aa8", "score": "0.69449973", "text": "public function create()\n {\n //\n return view('village.form');\n }", "title": "" }, { "docid": "72f0db297092df3a05f0662bbcf847e2", "score": "0.6942181", "text": "public function create()\n {\n return \"Provide a form for creating a new bookmark\";\n }", "title": "" }, { "docid": "fd3e19a66d87f8e5b9e62eeab1859fd6", "score": "0.694158", "text": "public function create()\n {\n return view ('admin.choice.create');\n }", "title": "" }, { "docid": "5a43ba5452e70f5a9984d0dd656c9e9d", "score": "0.6939963", "text": "public function create()\n {\n return view('admin.student.add');\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "8f8abe7734d2df10a7d0bf9300d89ffd", "score": "0.6936004", "text": "public function create()\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos', 'Insert')) return $this->accessFail();\n\t\t\n\t\t$objeto = new Objeto;\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => 'objetos.store', 'method' => 'POST');\n $action = 'Ingresar'; \n\t\t$action_label = \\Lang::get('utils.Ingresar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}", "title": "" }, { "docid": "8adebbe6d78e1269103db957362b2b48", "score": "0.6934276", "text": "public function create()\n {\n return view('admin.concepto.create');\n }", "title": "" }, { "docid": "cefebec03f775a193c7c4e8a62aa577f", "score": "0.6933069", "text": "public function create()\n {\n $this->data('model', new Question);\n\n $this->data('page_title', trans('labels.question_create'));\n\n $this->breadcrumbs(trans('labels.question_create'));\n\n return $this->render('views.question.create');\n }", "title": "" }, { "docid": "a0cec03d417a249e7b508d296e8928e7", "score": "0.6927707", "text": "public function new()\n {\n return view('backend.create');\n }", "title": "" }, { "docid": "b39914295738987f9eaa881efd81b08a", "score": "0.6924082", "text": "public function create()\n\t{\n\t\treturn view('hijos.create');\n\t}", "title": "" }, { "docid": "1b6fea0f3d627491bca24cc0ec1943b3", "score": "0.6922099", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['vendors'] = User::where([['status',1],['role',1]])->get();\n $data['brands'] = Brand::where('status',1)->get();\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "0db3c2ce6e391f38a76280c98d234b3e", "score": "0.6913334", "text": "public function create()\n {\n return view(\"admin.main.general.create\");\n }", "title": "" }, { "docid": "d88972ac1a628783a7fbb403d9a8dcfc", "score": "0.6907519", "text": "public function create()\n {\n return view ('darbuotojai.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "675ca45cdb19e54120f6c28ad08c6960", "score": "0.69062245", "text": "public function createAction(): object\n {\n $this->checkIfLoggedIn();\n\n $page = $this->di->get(\"page\");\n $form = new CreateQuestion($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ny fråga\",\n ]);\n }", "title": "" }, { "docid": "8a2147b2e963c3ef756e24bfe402ca2e", "score": "0.69051594", "text": "public function create()\n {\n return view(\"admin.driver.form\");\n }", "title": "" }, { "docid": "a30ccd806cf5bb09abba11f75d4178c0", "score": "0.69034714", "text": "public function newAction()\n {\n $form = $this->createForm(new RegistrationType(), new Registration());\n\n return $this->render('McmsEmployeeBundle:Admin:new.html.twig',array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "170085833f62c2562297ca840c892ec8", "score": "0.68962324", "text": "public function newAction()\n {\n $entity = new Carroceria();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColombiaAutosadministradorBundle:Carroceria:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "52b58d6fc4a50661368b682a572eca31", "score": "0.6890648", "text": "public function create()\n {\n return view('main.create');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "f06c8b94a60d9059ad36c228a0917999", "score": "0.68900883", "text": "public function create()\n {\n //\n\n\n //default active sidebar\n $this->setActiveParent();\n\n //[] = current query object\n //null = current request\n $form_fields = DynamicForm::form_fields('create', [], null, Person::form_fields() );\n\n return view('persons.create', compact('form_fields'));\n\n\n }", "title": "" }, { "docid": "78ad8491acd5385f24f5ae5f822678c9", "score": "0.6889061", "text": "public function create()\n\t{\n\t\treturn view('maquinas.create');\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "82fa764bee41d4c3cd502aeb977ac7aa", "score": "0.6887289", "text": "public function create()\r\n {\r\n //\r\n $title = ['title' => 'New Customer'];\r\n return view('forms.customer', $title);\r\n }", "title": "" }, { "docid": "cad48560e9ff66dc125cc429d28e9bff", "score": "0.6885613", "text": "public function create()\n\t{\n\t\treturn view('admin.add');\n\t}", "title": "" }, { "docid": "be02b3d6619c1ed55fce9db593195fb0", "score": "0.6883378", "text": "public function create()\n {\n return view ('rubro.create');\n }", "title": "" }, { "docid": "61f6eddf2e8e1651e313b0358ddb9d29", "score": "0.6880583", "text": "public function create()\n {\n $title = trans('religion.new');\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "ba7e10af83b6a9def1f1ab3ca7b230a1", "score": "0.6880075", "text": "public function create()\n {\n //\n return view('fasilitass.create');\n }", "title": "" }, { "docid": "bb899035deb9e2ae019bb95d733db21b", "score": "0.6877273", "text": "public function create()\n {\n $model = new SupplierModel();\n return view('dashboard.form', compact('model'));\n }", "title": "" }, { "docid": "e9fdb84b89fc16f5dc603f982295014a", "score": "0.6874308", "text": "public function create()\n\t{\n\t\treturn view('drama.create');\n\t}", "title": "" }, { "docid": "0cf738a5e59aa5d58e20e3538192db7d", "score": "0.6874174", "text": "public function create()\n {\n return view('port.main.create');\n }", "title": "" }, { "docid": "a052e9655360674093e5af6adf7d43e9", "score": "0.68733674", "text": "public function create()\n {\n $catalogs = CatalogServices::getAllCatalog();\n return view('components.products.add-form', compact('catalogs'));\n }", "title": "" }, { "docid": "021e8263ec26fa7e27d11fcfdc84da77", "score": "0.6870801", "text": "public function create()\n {\n return view('back.actions.create');\n }", "title": "" }, { "docid": "c503b35740e1792c403a88d8c50d856f", "score": "0.6869266", "text": "public function create()\n {\n return view(\"almacen.carrito.create\"); \n }", "title": "" }, { "docid": "5259e968b5dbb1b3e52be75d40a02866", "score": "0.68644255", "text": "public function create() {\n\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "8d3c38482140a40f4dbe44678bb1d515", "score": "0.6863528", "text": "public function create()\n {\n return view('master.form.sellout-form');\n }", "title": "" }, { "docid": "586b3f9f7932936d0639c9d4960679b7", "score": "0.68621755", "text": "public function create()\n\t{\n\t\treturn View::make('quantridanhmuchoithi.create');\n\t}", "title": "" }, { "docid": "7b28f26445b6881c693a90b24ca99ad8", "score": "0.6859603", "text": "public function create()\n {\n return view('manage.create');\n }", "title": "" } ]
ba9b6a8fe9c4f557838de18a0bf7f9b6
Enqueue scripts and styles.
[ { "docid": "bd68afae8332072c2c58b93b3b3be826", "score": "0.0", "text": "function grabjet_scripts() {\n\t\n\twp_enqueue_style('google-Roboto-font', '//fonts.googleapis.com/css?family=Roboto:300,400,500,700', array(), null );\n\twp_enqueue_style('google-Material-font', '//fonts.googleapis.com/icon?family=Material+Icons', array(), null );\n\t\n\t\n\twp_enqueue_style('font-awesome-min-css', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), null ); \n wp_enqueue_style('bootstrap-multiselect-css', get_theme_file_uri( '/css/bootstrap-multiselect.css' ), array(), null );\n wp_enqueue_style('bootstrap-datetimepicker-min-css', get_theme_file_uri( '/css/bootstrap-datetimepicker.min.css' ), array(), null ); \n wp_enqueue_style('bootstrap-min-css', get_theme_file_uri( '/css/bootstrap.min.css' ), array(), null );\n\t\n\twp_enqueue_style( 'html5shiv-min-js', '//oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js', array(), '3.7.3' );\n\twp_style_add_data( 'html5shiv-min-js', 'conditional', 'lt IE 9' );\n\n\twp_enqueue_style( 'respond-min-js', '//oss.maxcdn.com/respond/1.4.2/respond.min.js', array(), '1.4.2' );\n\twp_style_add_data( 'respond-min-js', 'conditional', 'lt IE 9' );\t\n \n\twp_enqueue_style( 'grabjet-style', get_stylesheet_uri() );\n\n\twp_deregister_script('jquery');\n\t\n wp_enqueue_script('jquery-min-js', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', array(), '1.12.4', true );\n\twp_enqueue_script('moment-with-locales-js', get_theme_file_uri( '/js/moment-with-locales.min.js' ), array(), '2.18.1', true );\n\twp_enqueue_script('bootstrap-min-js', get_theme_file_uri( '/js/bootstrap.min.js' ), array(), '3.3.7', true );\n\twp_enqueue_script('bootstrap-datetimepicker-min-js', get_theme_file_uri( '/js/bootstrap.datetimepicker.min.js' ), array(), '4.17.47', true );\n\twp_enqueue_script('bootstrap-multiselect-js', get_theme_file_uri( '/js/bootstrap.multiselect.js' ), array(), '2.0', true );\n\twp_enqueue_script('grab-main-js', get_theme_file_uri( '/js/main.js' ), array(), '1.0', true );\n\t\n}", "title": "" } ]
[ { "docid": "a5c67a74a8f6965c6affe9c64b24ab95", "score": "0.8440598", "text": "public function enqueueScripts() {}", "title": "" }, { "docid": "bd846b0b7767ea7f97bafacf9f4933f7", "score": "0.82236314", "text": "public function enqueueAssets ()\n\t\t{\t\n\t\t\tadd_action('wp_enqueue_scripts', array(&$this, 'registerScript'));\n\t\t}", "title": "" }, { "docid": "94f3c12f3a507ea40c237df4439053be", "score": "0.8191773", "text": "public function scripts() {\n\n\t\twp_enqueue_style( 'learnmultisitelander-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\n\t\twp_enqueue_script( 'learnmultisite-mainjs', get_theme_file_uri( '/assets/js/main.js' ), array(), wp_get_theme()->get( 'Version' ), true );\n\n\t}", "title": "" }, { "docid": "5e944cd91d51b6f02a6b6ecba4d4aa93", "score": "0.81909984", "text": "public function enqueueScripts()\n {\n wp_enqueue_style( 'cpt-' . $this->getName() . '-styles', $this->getStylesheetUrl() );\n wp_enqueue_script( 'cpt-' . $this->getName() . '-scripts', $this->getScriptsUrl() );\n }", "title": "" }, { "docid": "8c63822bf54b218a0eff9012000d6832", "score": "0.81890285", "text": "public function enqueueScripts()\n {\n $stylesheet = plugins_url('public/css/fvch-styles.css', dirname(__FILE__));\n if (file_exists( get_stylesheet_directory() . '/fvch-styles.css' )) {\n $stylesheet = get_stylesheet_directory_uri() . '/fvch-styles.css';\n }\n\n wp_register_style('fvch-styles', $stylesheet, false, '1.1');\n wp_enqueue_style('fvch-styles' );\n\n if ($this->_options->getOption('fvch-toolbox')) {\n wp_enqueue_script('fvch-toolbox', plugins_url('public/js/toolbox.js', dirname(__FILE__)), array('jquery'), '1.0', true);\n }\n }", "title": "" }, { "docid": "46052b227d8e465541ce47ddc86a0d6b", "score": "0.8131048", "text": "protected function enqueue_scripts() {\n\t\t//\n\t}", "title": "" }, { "docid": "699b96ffaf153b4b7773566b49a136ea", "score": "0.8126013", "text": "private function enqueue_scripts() {\n\t\twp_register_script( 'suggestions', plugins_url( 'js/jquery.suggestions.js', $this->baseDir ) );\n\t\twp_register_script( 'search', plugins_url( 'js/search.js', $this->baseDir ) );\n\t\twp_register_script( 'photocommons-admin', plugins_url( 'js/admin.js', $this->baseDir ) );\n\n\t\twp_localize_script(\n\t\t\t'photocommons-admin',\n\t\t\t'WP_PHOTOCOMMONS',\n\t\t\t[\n\t\t\t\t'imgButtonUrl' => plugins_url('img/button.png', $this->baseDir),\n\t\t\t\t'imgLoaderUrl' => plugins_url('img/loading.gif', $this->baseDir),\n\t\t\t\t'translations' => [\n\t\t\t\t\t'Insert images from Wikimedia Commons' => 'Insert images from Wikimedia Commons',\n\t\t\t\t\t'PhotoCommons' => 'PhotoCommons',\n\t\t\t\t\t'Search' => 'Search',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t// Enqueue external libraries\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-dialog' );\n\n\t\t// Enqueue our own scripts\n\t\twp_enqueue_script( 'suggestions' );\n\t\twp_enqueue_script( 'search' );\n\t\twp_enqueue_script( 'photocommons-admin' );\n\t}", "title": "" }, { "docid": "abbdf34d8fa3d2b63f8f278622c05109", "score": "0.8120988", "text": "public function enqueue_scripts() {\n wp_register_script($this->_token . '-plugins',\n esc_url($this->assets_url) . 'js/plugins' . $this->script_suffix . '.js', array('jquery'),\n $this->_version, true);\n wp_enqueue_script($this->_token . '-plugins');\n\n wp_register_script($this->_token . '-frontend',\n esc_url($this->assets_url) . 'js/frontend' . $this->script_suffix . '.js', array('jquery'),\n $this->_version, true);\n wp_enqueue_script($this->_token . '-frontend');\n\n }", "title": "" }, { "docid": "f9e1acead89a8b627af4110cc7e651d6", "score": "0.8084531", "text": "public function enqueueThemeScripts()\n {\n $js_uri = get_theme_file_uri( '/assets/dist/scripts/' );\n $js_dir = get_theme_file_path( '/assets/dist/scripts/' );\n\n $js_files = $this->getJsFiles();\n foreach ( $js_files as $handle => $data ) {\n $src = $js_uri . $data['file'];\n $version = logger()->getAssetVersion( $js_dir . $data['file'] );\n $deps = $data['deps'];\n $in_foot = $data['in_foot'];\n\n wp_enqueue_script( $handle, $src, $deps, $version, $in_foot );\n }\n\n if ( ! is_admin() ) {\n wp_dequeue_style( 'wp-block-library' );\n }\n }", "title": "" }, { "docid": "1992332625ffa3a24f28cba9dd2c58d7", "score": "0.8069915", "text": "public function enqueue_scripts() {\n\t\tif ( $this->scripts_enqueued ) {\n\t\t\treturn;\n\t\t}\n\t\t// Ensure scripts are registered\n\t\t$this->register_scripts();\n\n\t\t/* SCRIPTS */\n\t\twp_enqueue_script( 'blockrain-init' );\n\n\t\t/* STYLES */\n\t\twp_enqueue_style( 'blockrain' );\n\n\t\t// Prevent redundant calls\n\t\t$this->scripts_enqueued = true;\n\t}", "title": "" }, { "docid": "24138ea8bfc6d00502d68af6ac929e0f", "score": "0.80347174", "text": "public function scripts_and_styles() {\n\n\t\t\t// Stylesheets\n\t\t\twp_enqueue_style( 'asc-admin', ASCRIPTA_ENGINE_CSS_URL . 'admin/asc-admin.min.css', array(), ASCRIPTA_ENGINE_VERSION, 'all' );\n\n\t\t}", "title": "" }, { "docid": "532ec2167efde1f9f61a923c86db6efd", "score": "0.8027588", "text": "public function enqueue_styles_and_scripts_fronend() {\r\n\r\n\t\twp_enqueue_script( 'jquery-ui-core' );\r\n\t\twp_enqueue_script( 'jquery-ui-widget' );\r\n\t\twp_enqueue_script( 'jquery-ui-draggable' );\r\n\t\twp_enqueue_script( 'jquery-ui-mouse' );\r\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\r\n\t\twp_enqueue_script( 'jquery-touch-punch' );\r\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\r\n\t\twp_enqueue_style( 'jquery-custom-scroll-bar' );\r\n\r\n\t\twp_enqueue_style( 'lscf-bootstrap' );\r\n\t\twp_enqueue_style( 'px_base' );\r\n\t\twp_enqueue_script( 'px_vendor' );\r\n\t\twp_enqueue_script( 'angular' );\r\n\t\twp_enqueue_script( 'angular-ngAnimate' );\r\n\t\twp_enqueue_script( 'jquery-ui' );\r\n\t\twp_enqueue_style( 'jquery-ui-style' );\r\n\t\twp_enqueue_style( 'jquery-custom-scroll-bar' );\r\n\t\twp_enqueue_script( 'angular_sanitize' );\r\n\t\twp_enqueue_script( 'px_capf' );\r\n\t\twp_enqueue_script( 'px_main' );\r\n\r\n\t}", "title": "" }, { "docid": "97eea7acc014ad96b3996d5545b27cab", "score": "0.8027461", "text": "public function enqueue_scripts() {\n\t\t}", "title": "" }, { "docid": "34814737f785942ba0c3e0b61e1a0a96", "score": "0.79764956", "text": "public function enqueue() {\n\t\t// Remove default Gutenberg CSS.\n\t\twp_deregister_style( 'wp-block-library' );\n\n\t\twp_enqueue_script( 'vendor', SKELA_THEME_URL . '/dist/vendor.js', array(), SKELA_THEME_VERSION, true );\n\n\t\t// Enqueue custom js file, with cache busting.\n\t\twp_enqueue_script( 'script.js', SKELA_THEME_URL . '/dist/app.js', array(), SKELA_THEME_VERSION, true );\n\t}", "title": "" }, { "docid": "d243b820e78888ca601f68b2855f2f68", "score": "0.7928549", "text": "public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style(\n\t\t\t'bf-krumo',\n\t\t\t$this->plugin_url . '/bf-krumo.css',\n\t\t\tarray(),\n\t\t\t'1.1',\n\t\t\t'all'\n\t\t);\n\t}", "title": "" }, { "docid": "0e1606b61d2193f6ce89238746285d3f", "score": "0.79184645", "text": "public function enqueue()\n {\n $scripts = $this->scripts();\n\n foreach ($scripts as $script) {\n [\n 'handle' => $handle,\n 'src' => $src,\n 'dependencies' => $dependencies,\n 'version' => $version\n ] = $script;\n\n wp_register_script(\n $handle,\n $src,\n $dependencies,\n $version,\n $this->in_footer\n );\n\n if (isset($script['inline'])) {\n $inline = $script['inline'];\n\n [\n 'js_key' => $js_key,\n 'data' => $data,\n 'position' => $position\n ] = $inline;\n\n $json_data = json_encode($data);\n\n wp_add_inline_script(\n $handle,\n \"window.__{$js_key}__ = $json_data\",\n $position\n );\n }\n\n wp_enqueue_script($handle);\n }\n }", "title": "" }, { "docid": "75f688ea1d3423aa12facebc29564d3e", "score": "0.791233", "text": "private function enqueue_scripts()\n\t{\n\t\twp_enqueue_script('oometaboxdemo');\n\t\twp_enqueue_style('thickbox');\n\t}", "title": "" }, { "docid": "6e130d742b1cea54ff3fce889b2bac4b", "score": "0.79078156", "text": "public function enqueue_scripts() {\n\t}", "title": "" }, { "docid": "bd587159a3a84918aeea09074b6d7956", "score": "0.79021466", "text": "public function enqueue_scripts() {\n\t\twp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version, true );\n\t\twp_enqueue_script( $this->_token . '-frontend' );\n\t}", "title": "" }, { "docid": "98e2e921dac334e88b3432b7bb249e6e", "score": "0.788805", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Ap_Ss_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Ap_Ss_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\t// wp_enqueue_script( $this->ap_ss, plugin_dir_url( __FILE__ ) . 'js/ap-ss-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "c8da6a740f346d9c61eabe0183f94144", "score": "0.78803426", "text": "public function enqueue_scripts() {\n\n if ( ! current_user_can( 'administrator' ) && ! current_user_can( 'bbp_moderator' ) ) {\n return;\n }\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'bbpab-styles', plugins_url( 'assets/css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'heartbeat' );\n wp_enqueue_script( 'tinygrowl', plugins_url( 'assets/js/tinygrowl.min.js', __FILE__ ), array( 'jquery' ), false, true );\n wp_enqueue_script( 'bbpab-scripts', plugins_url( 'assets/js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n }", "title": "" }, { "docid": "74f44b0c118deba7063266c9a8560ab9", "score": "0.78757846", "text": "public function enqueue_styles_scripts() {\t\n\t\twp_enqueue_style( AIOVG_PLUGIN_SLUG . '-public' );\n\t}", "title": "" }, { "docid": "5e4000ed3dcd2623d72a98384035102f", "score": "0.785924", "text": "public function enqueue_scripts() {\n\n $main_script = '/skin/public/scripts/applicationAdmin.js';\n wp_register_script( $this->theme_name . '-scripts', get_template_directory_uri() . $main_script, array(), $this->general_helper->get_assets_version( $main_script ) );\n wp_enqueue_script( $this->theme_name . '-scripts' );\n\n }", "title": "" }, { "docid": "5e4000ed3dcd2623d72a98384035102f", "score": "0.785924", "text": "public function enqueue_scripts() {\n\n $main_script = '/skin/public/scripts/applicationAdmin.js';\n wp_register_script( $this->theme_name . '-scripts', get_template_directory_uri() . $main_script, array(), $this->general_helper->get_assets_version( $main_script ) );\n wp_enqueue_script( $this->theme_name . '-scripts' );\n\n }", "title": "" }, { "docid": "8da02442fef3704ab1a46169f4f2cf8d", "score": "0.7840732", "text": "protected function enqueue_scripts()\n {\n Control::enqueue_scripts('switch');\n wp_enqueue_style('tify_control-admin_panel');\n wp_enqueue_script('tify_control-admin_panel');\n }", "title": "" }, { "docid": "1f52ccff3cf236279df2e841be37a719", "score": "0.78395295", "text": "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "e98877ceca380ba2664aab05885502e0", "score": "0.7832718", "text": "public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-shots', plugins_url( 'assets/css/simple-shots.css', __FILE__ ) );\n\t}", "title": "" }, { "docid": "8783ba0ec4c38f2ce0e39289f402da23", "score": "0.78209096", "text": "public static function register_styles_and_scripts() {\n add_action( 'wp_enqueue_scripts', function() {\n // Remove jQuery dependency if unnecessary\n wp_register_script( 'ammonite-remove-local-pickup-for-subscriptions-script', plugins_url('assets/js/ammonite-remove-local-pickup-for-subscriptions.js', __FILE__ ), array('jquery'), '1.0.0', true );\n } );\n }", "title": "" }, { "docid": "8ae48830673c89fd33c0469e40f73e5d", "score": "0.7812586", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Innovia_vcextend_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Innovia_vcextend_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/innovia_vcextend-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "fbc0f1af57cc4950645f144c2e6a83b2", "score": "0.78103936", "text": "public function callback_enqueue_scripts() {\n\t\t\twp_enqueue_script( 'eoajax', WPEO_TASKMANAGER_ASSET_URL . '/js/eoajax.js', array( \"jquery\" ), WPEO_TASKMANAGER_VERSION );\n\t\t\twp_enqueue_script( 'wpeo-task-frontend-js', WPEO_TASKMANAGER_ASSET_URL . '/js/frontend.js', array( \"jquery\", \"jquery-form\", \"jquery-ui-datepicker\" ), WPEO_TASKMANAGER_VERSION );\n\n\t\t\twp_register_style( 'wpeo-task-frontend-css', WPEO_TASKMANAGER_ASSET_URL . '/css/frontend.css', '', WPEO_TASKMANAGER_VERSION );\n\t\t\twp_enqueue_style( 'wpeo-task-frontend-css' );\n\t\t}", "title": "" }, { "docid": "dd59af73dcc19e3f9e8e0914e52d222d", "score": "0.7801995", "text": "public function load_scripts_styles()\n\t{\n\t\twp_enqueue_style('csads-public-style', plugins_url('/assets/css/csads-public.css', plugin_dir_path(__FILE__)));\n\t}", "title": "" }, { "docid": "0ea827434527bf4326448f7ac15a83f0", "score": "0.780079", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/hector_align-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "ca52ae3c5dff189c747444645df67e3a", "score": "0.78002346", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/vamwp-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "a48296e45018375cf3384301d8af1d25", "score": "0.77998465", "text": "public function enqueueScripts()\n\t{\n\t\t//wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . 'js/vrbm-admin.js', array( 'jquery' ), $this->version, TRUE );\n\t}", "title": "" }, { "docid": "1d889fcc8daba58ba151250185d42fdc", "score": "0.7796314", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Hz_Api_Feed_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Hz_Api_Feed_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script( $this->plugin_name.'-angular', plugin_dir_url( __FILE__ ) . 'js/angular.min.js', array( ), $this->version, false );\n\t\t\n\t\t\n\t\t//wp_enqueue_script( 'hz-ajax-script' );\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/app.js', array( 'jquery' ), $this->version, false );\n\t\twp_localize_script( $this->plugin_name, 'hz_feed', array( 'ajax_url' => get_site_url(null, 'wp-json/hz-feed/v1/') ) );\n\n\t}", "title": "" }, { "docid": "8434c8eddd0d5ddd015631219c659f27", "score": "0.779228", "text": "public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style( 'dashicons' );\n\t\twp_register_style('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css');\n \t\twp_enqueue_style( 'jquery-ui' ); \n\t\twp_enqueue_style( 'bs-main', BS_ASSETS_URL.'css/main.css', array(), '1.0' );\n\t \n\t \n\t\twp_enqueue_script( 'jquery-ui-slider', array( 'jquery' ) );\n\t\twp_enqueue_script( 'bs-main', BS_ASSETS_URL.'js/main.js', array( 'jquery', 'jquery-ui-slider' ), '1.0', true );\n\t}", "title": "" }, { "docid": "9b1538f8a46ded5e263247438a5c0fda", "score": "0.7790718", "text": "public function enqueueScripts(){\n wp_enqueue_script( 'jquery' );\n \twp_enqueue_style(\n 'obay-sidebar-menu',\n plugin_dir_url( __FILE__ ) . 'css/style.css',\n array(),\n '',\n FALSE\n );\n }", "title": "" }, { "docid": "751df488cc301b8f60b90309975c1acb", "score": "0.7790293", "text": "public function scripts()\n\t{\n\t\twp_enqueue_script('msc-widget-script', $this->getScriptUrl(), ['jquery'], '', true);\n\t}", "title": "" }, { "docid": "159cc3ffd8213a83f685a1f584cfbc25", "score": "0.77883315", "text": "static public function enqueue_scripts()\n {\n wp_enqueue_style( 'fl-child-theme', FL_CHILD_THEME_URL . '/style.css' );\n wp_enqueue_style( 'bb-child-theme-dexlue-styles', FL_CHILD_THEME_URL . '/scss/dist/deluxe-styles.css', array(), time() );\n\n wp_enqueue_script( 'bb-child-theme-dexlue-scripts', FL_CHILD_THEME_URL . '/js/scripts.js', array(), time() );\n }", "title": "" }, { "docid": "ca83ff6840362aceadd4a0429f8a997f", "score": "0.77878636", "text": "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n wp_enqueue_style( 'screen' );\n\t}", "title": "" }, { "docid": "885b26ed72396989f66a931156e9ecb5", "score": "0.77774084", "text": "public function assets()\n {\n $url = File::getResourceUri();\n wp_enqueue_script('lbwp-flyout-js', $url . '/js/components/lbwp-flyout.js', array('jquery'), LbwpCore::REVISION, true);\n wp_enqueue_script('jquery-cookie');\n }", "title": "" }, { "docid": "39758519da9751d3cdc42bb521a1a0d4", "score": "0.77756125", "text": "public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n $this->execute_style();\n \n\n wp_localize_script( 'sl-script', 'sl', [\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Error: Something went wrong', 'shibbir-listing' ),\n 'homepage' => home_url( '/' ),\n ] );\n\n // wp_localize_script( 'academy-admin-script', 'weDevsAcademy', [\n // 'nonce' => wp_create_nonce( 'wd-ac-admin-nonce' ),\n // 'confirm' => __( 'Are you sure?', 'wedevs-academy' ),\n // 'error' => __( 'Something went wrong', 'wedevs-academy' ),\n // ] );\n }", "title": "" }, { "docid": "071187adf3459fb57b2a167e011e6cb2", "score": "0.7765642", "text": "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "title": "" }, { "docid": "f9ad093e406bd739facf17b0694f89ac", "score": "0.77644336", "text": "public function enqueue_scripts() {\n\n wp_register_script( 'panzi-jquery-cookies', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/jquery.cookies.js', array('jquery'), $this->version, true );\n wp_register_script( 'wp-cupcake-bridge-social-share-privacy', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/socialshareprivacy.js', array('jquery', 'panzi-jquery-cookies'), $this->version, true );\n wp_register_script( 'wp-cupcake-bridge-service', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/modules/cupcakebridge.js', array('jquery', 'panzi-jquery-cookies'), $this->version, true );\n wp_register_script( 'wp-cupcake-bridge', plugin_dir_url( __FILE__ ) .'/js/wp-cupcake-bridge-public.js' , array('jquery'), $this->version, true );\n\n }", "title": "" }, { "docid": "e0df84edbe0ca6ce39b48a2267e76c98", "score": "0.7754466", "text": "function marchos_scripts_enqueue () {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . './css/bootstrap.min.css', array(), '5.0.2', 'all');\n wp_enqueue_style('my-custom', get_template_directory_uri() . './css/my-custom-style.css', array(), '1.0.0', 'all');\n // ==== add jquery in footer\n wp_dequeue_script('jquery');\n wp_dequeue_script('jquery-core');\n wp_dequeue_script('jquery-migrate');\n wp_enqueue_script('jquery', false, array(), false, true);\n wp_enqueue_script('jquery-core', false, array(), false, true);\n wp_enqueue_script('jquery-migrate', false, array(), false, true);\n // ==== add custom-js\n wp_enqueue_script('boostrapjs', get_template_directory_uri() . './js/bootstrap.min.js', array(), '1.0.0', true);\n wp_enqueue_script('customjs', get_template_directory_uri() . './js/my-scripts.js', array(), '1.0.0', true);\n \n }", "title": "" }, { "docid": "2081e27a5b45521bce6b773b4a6d4da2", "score": "0.7752172", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Urich_Tourbook_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Urich_Tourbook_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/urich-tourbook-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "da9cf9fc3d6c1f37d945fcf5a3deb19d", "score": "0.77432144", "text": "public static function scripts(){\n\t\tCaldera_Forms_Render_Assets::register();\n\t\tCaldera_Forms_Render_Assets::enqueue_script( 'handlebars' );\n\t\tCaldera_Forms_Admin_Assets::enqueue_style( 'admin' );\n\t}", "title": "" }, { "docid": "0b10e005976cc8b26e639ebd52515b19", "score": "0.7742502", "text": "public function enqueue_scripts()\n {\n\n /**\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in TS_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The TS_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/ts-public.js', array(\n 'jquery'\n ) , $this->version, false);\n \n\t\t \n\t\twp_enqueue_script($this->plugin_name .'customer-dataTables',PRD_PLUGIN_URL_ADMIN .\"assets/js/jquery.dataTables.min.js\", array( 'jquery' ) , $this->version, true);\n\t\t \n\t \n wp_enqueue_script($this->plugin_name .'customer-footer', plugin_dir_url(__FILE__) . 'js/customer-frontend.js', array(\n 'jquery'\n ) , $this->version, true);\n\n }", "title": "" }, { "docid": "b6dedf716014f53b701b53285c1e9361", "score": "0.77385944", "text": "public function enqueue_scripts() {\n\n\t\twp_register_script(\n\t\t\t'vide',\n\t\t\tplugins_url('bower_components/vide/dist/jquery.vide.min.js', __FILE__),\n\t\t\tarray('jquery'),\n\t\t\t'0.5.1',\n\t\t\ttrue\n\t\t);\n\n\t\tif ( $this->is_theme_supported() && is_front_page() ) {\n\n\t\t\twp_enqueue_script( 'vide' );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "93c4977ae904df5065964f4aff66e4e3", "score": "0.77380687", "text": "public function admin_enqueue_scripts() {\n\t\t\n\t\tglobal $current_screen;\n\n\t\tif ( $current_screen->base == 'settings_page_toggl-alert' ) {\n\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_style( 'toggl-alert-admin' );\n\t\t\t\n\t\t\t// Dependencies\n\t\t\twp_enqueue_script( 'jquery-effects-core' );\n\t\t\twp_enqueue_script( 'jquery-effects-highlight' );\n\t\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\t\t\n\t\t\twp_enqueue_script( 'toggl-alert-admin' );\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "691098936f8baaaea42d805a262da6d3", "score": "0.7734865", "text": "public function scripts()\n {\n wp_enqueue_script('alpinejs', 'https://unpkg.com/alpinejs@3.5.0/dist/cdn.min.js', [], '', true);\n\n wp_register_script('td-main', get_stylesheet_directory_uri() . td_asset_path('js/main.js'), ['jquery', 'alpinejs'], '', true);\n if (is_single() && comments_open() && get_option('thread_comments')) {\n wp_enqueue_script('comment-reply');\n }\n\n wp_enqueue_script('td-main');\n }", "title": "" }, { "docid": "42f091cddb7fc6f0735f27ac3ad61d71", "score": "0.7723938", "text": "public static function scripts()\n {\n add_thickbox();\n wp_enqueue_script('aat-admin-js', AAT_PLUGIN_URI . 'assets/admin.js', ['jquery'], '0.0.1', true);\n wp_enqueue_style('aat-admin-styles', AAT_PLUGIN_URI . 'assets/admin.css', [], '0.0.1' );\n }", "title": "" }, { "docid": "b02a6901efd9e8a59b9932ddf5bce581", "score": "0.77176344", "text": "function enqueue_scripts() {\r\n\t\twp_enqueue_script('ttools-loader');\r\n\t\twp_enqueue_style('jquery-select2');\r\n\t\twp_enqueue_style('ttools');\r\n\t}", "title": "" }, { "docid": "94aa70fc499660168ef4d3e5625bf514", "score": "0.77091", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Cr_Featured_Images_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Cr_Featured_Images_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cr-featured-images-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider' ), $this->version, false );\n\t\t//wp_enqueue_script( 'watermark-admin-script', plugins_url( 'js/admin-settings.js', __FILE__ ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider' ), $this->defaults['version'] );\n\n\t}", "title": "" }, { "docid": "e3fb9fb4a8d32a882edb247cc71801cc", "score": "0.770645", "text": "public function enqueue_scripts()\n {\n // Font awesome (icons)\n wp_register_style('woochimp-font-awesome', WOOCHIMP_PLUGIN_URL . '/assets/css/font-awesome/css/font-awesome.min.css', array(), '4.5.0');\n\n // Our own scripts and styles\n wp_register_script('woochimp', WOOCHIMP_PLUGIN_URL . '/assets/js/woochimp-admin.js', array('jquery'), WOOCHIMP_VERSION);\n wp_register_style('woochimp', WOOCHIMP_PLUGIN_URL . '/assets/css/style.css', array(), WOOCHIMP_VERSION);\n\n // Scripts\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_script('jquery');\n wp_enqueue_script('jquery-ui');\n wp_enqueue_script('jquery-ui-accordion');\n wp_enqueue_script('jquery-ui-tooltip');\n wp_enqueue_script('woochimp');\n\n // Styles\n wp_enqueue_style('thickbox');\n wp_register_style('jquery-ui', WOOCHIMP_PLUGIN_URL . '/assets/jquery-ui/jquery-ui.min.css', array(), WOOCHIMP_VERSION);\n wp_enqueue_style('jquery-ui');\n wp_enqueue_style('woochimp-font-awesome');\n wp_enqueue_style('woochimp');\n }", "title": "" }, { "docid": "78da1e0096e70e1348b3e20f84190440", "score": "0.7702916", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Blogmail_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Blogmail_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->blogmail, plugin_dir_url( __FILE__ ) . 'js/blogmail-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "1b517ca5de43ba08d42b7956164374c1", "score": "0.77006507", "text": "public function enqueue_scripts() {\n\t\twp_register_script( 'jrg-primary-category-admin-script', $this->config['base_url'] . '/assets/jrg-primary-category.js', 'JQuery', $this->config['version'], true );\n\n\t\twp_localize_script( 'jrg-primary-category-admin-script', 'primary_category_data', array(\n\t\t\t'nonce' => wp_create_nonce( 'save-jrg-primary-category-field' ),\n\t\t\t'primary_category' => $this->get_current_post_primary_category(),\n\t\t\t'strings' => $this->get_js_localized_strings(),\n\t\t) );\n\n\t\twp_enqueue_script( 'jrg-primary-category-admin-script' );\n\n\t\twp_register_style( 'jrg-primary-category-admin-style', $this->config['base_url'] . '/assets/jrg-primary-category.css', array(), $this->config['version'] );\n\t\twp_enqueue_style( 'jrg-primary-category-admin-style' );\n\t}", "title": "" }, { "docid": "8b87f182d45fa67b20f77039c5a90163", "score": "0.7699448", "text": "protected function enqueue_scripts()\n {\n @ wp_enqueue_media();\n \\wp_enqueue_style('tify_control-media_image');\n \\wp_enqueue_script('tify_control-media_image');\n }", "title": "" }, { "docid": "b71ca6d7b637616e57c0cbcb4925b987", "score": "0.76979876", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cncf-mu-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "b2aaf045a6e02379d3b9f0446af74084", "score": "0.76951987", "text": "public function enqueue() {\n\n\t\twp_register_script( 'themeisle-site-lib', Themeisle_Onboarding::get_dir() . '/assets/js/bundle.js', array(), Themeisle_Onboarding::VERSION, true );\n\n\t\twp_localize_script( 'themeisle-site-lib', 'themeisleSitesLibApi', $this->localize_sites_library() );\n\n\t\twp_enqueue_script( 'themeisle-site-lib' );\n\t}", "title": "" }, { "docid": "0d48b62f6b628becebf8ee392c40c342", "score": "0.7690472", "text": "function theme_scripts() {\n\n\t// Load our main stylesheet.\n\twp_enqueue_style( 'Composer-style', get_stylesheet_uri() );\n\n\t// Load theme js\n\twp_enqueue_script( 'Composer-script', get_template_directory_uri() . '/js/composer.js', array( 'jquery' ), false, true );\n}", "title": "" }, { "docid": "ccf6b816674d939cf02b70b0f8fe91a6", "score": "0.7684717", "text": "final public static function enqueue_scripts()\n {\n \\wp_enqueue_style('tiFySet_CookieLaw');\n Control::enqueue_scripts('cookie_notice');\n }", "title": "" }, { "docid": "a00c67429bcc551053ad08dff6138946", "score": "0.76845634", "text": "public function enqueue_scripts()\n {\n wp_enqueue_style( 'rf-admin', RFFramework()->url() . '/assets/css/admin.css' );\n }", "title": "" }, { "docid": "fa0cf7460d1f683a0aa406f0c4b7f484", "score": "0.76811177", "text": "public function add_scripts() {\r\n \r\n wp_register_style( 'zip-folder-default', plugins_url( '/css/default.css', __FILE__ ) );\r\n\t wp_enqueue_style( 'zip-folder-default' );\r\n wp_register_style( 'zip-folder-css', plugins_url( '/css/zip-folder.css', __FILE__ ) );\r\n\t wp_enqueue_style( 'zip-folder-css' );\r\n\r\n wp_register_script( 'php_file_tree_jquery', plugins_url( '/js/php_file_tree_jquery.js', __FILE__ ), true );\r\n wp_enqueue_script( 'php_file_tree_jquery' );\r\n wp_localize_script('php_file_tree_jquery', 'Ajax', array(\r\n\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\r\n\t));\r\n }", "title": "" }, { "docid": "1812541193dc42e114f4f4ce3a3bde97", "score": "0.76707155", "text": "public function adminEnqueueScripts()\n {\n wp_register_script('wp-color-picker-settings', plugins_url('assets/js/wp-color-picker.js', plugin_basename($this->pluginFile)));\n wp_register_script('wp-media-settings', plugins_url('assets/js/wp-media.js', plugin_basename($this->pluginFile)));\n }", "title": "" }, { "docid": "291edef720c395b51dc6a8dc9b0fe40d", "score": "0.7665317", "text": "public function enqueue_admin_scripts() {\n\n\t\t$screen = get_current_screen();\n\n\t\t// Only load js for our example page\n\t\tif ( $screen->id != $this->hook )\n\t\t\treturn;\n\n\t\t// Load our custom postlistr-app.js and require backbone\n\t\twp_enqueue_script( $this->hook . '-app-script', plugins_url( 'js/postlistr-app.js', __FILE__ ), array( 'wp-backbone' ), $this->version, true );\n\n\t}", "title": "" }, { "docid": "892a2d66baa2c8d4439be9e03004d26c", "score": "0.76630956", "text": "public static function enqueue() {\n\t\t$template_mode = WPRM_Settings::get( 'recipe_template_mode' );\n\n\t\twp_register_style( 'wprm-public', WPRM_URL . 'dist/public-' . $template_mode . '.css', array(), WPRM_VERSION, 'all' );\n\n\t\t// Only include scripts when not AMP page.\n\t\tif ( ! function_exists( 'is_amp_endpoint' ) || ! is_amp_endpoint() ) {\n\t\t\twp_register_script( 'wprm-public', WPRM_URL . 'dist/public-' . $template_mode . '.js', array( 'jquery' ), WPRM_VERSION, true );\n\t\t\twp_localize_script( 'wprm-public', 'wprm_public', self::localize_public() );\n\t\t}\n\t\t\n\t\tif ( false === WPRM_Settings::get( 'only_load_assets_when_needed' ) ) {\n\t\t\tself::load();\n\t\t}\n\t}", "title": "" }, { "docid": "3fab53598ab1137ffc2c757479c29488", "score": "0.7661002", "text": "function theme_scripts() {\n\t// Theme stylesheet.\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\n\t// Add main stylesheet\n\twp_enqueue_style( 'main.min', get_template_directory_uri() . '/dist/css/main.min.css', array(), '0.1.0' );\n\n\twp_enqueue_script( 'vendors.min', get_template_directory_uri() . '/dist/js/vendors.min.js', array(), '20170816', true );\n\twp_enqueue_script( 'main.min', get_template_directory_uri() . '/dist/js/main.min.js', array('jquery'), '20170816', true );\n}", "title": "" }, { "docid": "6c09b3f2097edb743bb0f4676c6cccc0", "score": "0.76607937", "text": "function nr_load_scripts() {\n\n wp_dequeue_style('wp-block-library');\n wp_dequeue_style('wp-block-library-theme');\n\n\twp_enqueue_style('main', NR_THEME_URL.'/app.css', false, NR_VERSION);\n\twp_enqueue_style('fonts', 'https://fast.fonts.net/t/1.css?apiType=css&projectid=e0897766-a751-4fd7-89ea-7081fe24868a', false,null);\n\n\twp_deregister_script('jquery');\n\twp_deregister_script('wp-embed');\n\n\twp_register_script('jquery', NR_THEME_URL.'/js/jquery-3.3.1.min.js',null,null,true); \n\twp_enqueue_script('jquery');\n\t\t\t\t\t\t\t\t\t\n\twp_register_script('plugins', NR_THEME_URL.'/js/plugins.js','jquery',NR_VERSION,true); \n\twp_enqueue_script('plugins');\t\n\t\n\twp_register_script('site', NR_THEME_URL.'/js/site.js',array('jquery','plugins'),NR_VERSION,true); \n\twp_enqueue_script('site');\n\t\t\t\n}", "title": "" }, { "docid": "4c5bf92b58c402faac58f5243fb6e875", "score": "0.7660158", "text": "public function scripts() {\n\t\t\tif (!$this->run()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// wp_enqueue_script\n\t\t\t$handle \t= 'acf-bs4-page-builder';\n\t\t\t$src \t= plugin_dir_url(__FILE__).'js/admin.js';\n\t\t\t$deps \t= array('acf-input');\n\t\t\t$ver \t= $this->version;\n\t\t\t$in_footer \t= false;\n\t\t\twp_register_script($handle, $src, $deps, $ver, $in_footer);\n\t\t\t$object = 'acf_page_builder_vars';\n\t\t\t$data = array();\n\t\t\twp_localize_script($handle, $object, $data);\n\t\t\twp_enqueue_script($handle);\n\t\t\t\n\t\t\t$handle = 'acf-bs4-page-builder';\n\t\t\t$src \t= plugin_dir_url(__FILE__).'css/admin.css';\n\t\t\t$deps \t= array('acf-input');\n\t\t\t$ver \t= $this->version;\n\t\t\twp_enqueue_style($handle, $src, $deps, $ver);\n\t\t\t\n\t\t\twp_enqueue_script('jquery-ui-tooltip');\n\t\t\t\n\t\t}", "title": "" }, { "docid": "309493192c137a4466cda5fac548b800", "score": "0.7656778", "text": "function _add_scripts() {\n\t\t\tif (is_admin()) return;\n\t\t\twp_enqueue_script('modernizr', get_stylesheet_directory_uri() .'/bower_components/modernizer/modernizr.js', array(), '2.8.2');\n\t\t\twp_enqueue_script('theme.app', get_stylesheet_directory_uri() .'/js/min/app.min.js', array('jquery','modernizr'), '0.1.0', true);\n\t\t\twp_localize_script('theme.app', 'theme', $this->_add_js_vars()); // Call _add_js_vars() to add PHP variables to frontend\n\t\t}", "title": "" }, { "docid": "4fcd662166b2cee451102d3e7c2a11e7", "score": "0.7654341", "text": "public function enqueue_scripts()\n\t\t{\n\t\t\tif (!is_admin()) return;\n\t\t\t\n\t\t\twp_enqueue_editor(array( 'type' => 'text/html' ));\n\t\t\twp_enqueue_style( 'repeatable-fields-css', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/css/repeatable-fields.css', array(), microtime() );\n\t\t\t\n\t\t\t// tinymce\n\t\t\twp_enqueue_style( 'editor-css', includes_url('css/') . 'editor.css', array(), microtime() );\n\t\t\t// init repeatable fields js\n\t\t\twp_enqueue_script( 'repeatable-fields-js', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/js/repeatable-fields.js' , array('jquery'), microtime(), true );\n\t\t\twp_enqueue_script( 'init-js', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/js/init.js' , array('jquery'), microtime(), true );\n\t\t}", "title": "" }, { "docid": "daae675f0351d6c76359d6d8d6b2a977", "score": "0.76509994", "text": "function pb_scripts(){\n $version = '0.0.0';\n wp_enqueue_style('pb-estilo', get_stylesheet_directory_uri() . '/css/estilo.css', array(), $version );\n wp_enqueue_script('pb-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), $version );\n wp_enqueue_script('jquery');\n}", "title": "" }, { "docid": "d814d15647a92604b32b4954b16cd195", "score": "0.7641438", "text": "public function enqueue_scripts()\n {\n /*\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in Mtii_Utilities_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The Mtii_Utilities_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n wp_enqueue_script(\n $this->_plugin_name.'-admin-main-script',\n plugin_dir_url(__FILE__) . 'js/mtii-utilities-admin-script.js',\n array('jquery'),\n 2900, false\n );\n }", "title": "" }, { "docid": "5e7402e29f09b927cfbe03a1887df931", "score": "0.7628326", "text": "public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style('my-script', plugins_url('/css/admin.css', __FILE__));\n\t\twp_enqueue_script('my-script', plugins_url('/js/kayako.js', __FILE__), array('jquery'));\n\t\twp_localize_script('my-script', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));\n\t}", "title": "" }, { "docid": "9c50c6e3c0efa03b48c6039ba51de2eb", "score": "0.7624521", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Altlab_Postgrid_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Altlab_Postgrid_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/altlab-postgrid-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "fded8725cd78c2b79a2cc1d5cf9a28a8", "score": "0.7618597", "text": "public function wp_enqueue_scripts() {\n wp_enqueue_style( 'manhphucpro-main', $this->child_base_url . '/assets/dist/css/main.css', [], $this->version, 'all' );\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'manhphucpro-main', $this->child_base_url . '/assets/dist/js/main.js', [ 'jquery' ], $this->version, true );\n\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }", "title": "" }, { "docid": "562b885e10332c9968f69645ac6bc677", "score": "0.7614298", "text": "public function enqueue_scripts()\n {\n }", "title": "" }, { "docid": "fbd35993feb8acfcacc4933618d35957", "score": "0.76086724", "text": "public function wp_enqueue_scripts()\n {\n if(self::tFyAppConfig('enqueue_scripts', true)) :\n self::enqueue_scripts();\n endif;\n }", "title": "" }, { "docid": "29460a705ee4d2d597b734c8c98ef8db", "score": "0.76075226", "text": "function load_scripts() { \n\t\t\t\twp_enqueue_style(\"font-awesome\", \"//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css\");\n\t\t\t\twp_enqueue_style(\"nabla-widget-styles\", NABLA_WIDGETS_CSS_URL.\"nabla-styles.css\");\n\t\t\t}", "title": "" }, { "docid": "0ded4504fa99064d255878834b049aa1", "score": "0.76050353", "text": "function berry_scripts() {\n wp_dequeue_style( 'seed-style');\n wp_enqueue_style('b-style', get_stylesheet_uri());\n\n if($GLOBALS['s_jquery'] == 'enable') {\n $need_jquery = true;\n } else {\n $need_jquery = false;\n }\n\twp_enqueue_script( 'berry-js', get_stylesheet_directory_uri() . '/js/main.js', array(), filemtime( get_stylesheet_directory() . '/js/main.js' ), $need_jquery );\n}", "title": "" }, { "docid": "123c97b0d511eed87f1f48dbb3e4a0f1", "score": "0.7604805", "text": "public function enqueue() {\n\t\t$token = $this->token;\n\t\t$url = $this->url;\n\n\t\twp_enqueue_style( $token . '-css', $url . '/assets/front-end.css' );\n\t\twp_enqueue_style( $token . '-animate', $url . '/assets/animate.css' );\n\t\twp_enqueue_script( $token . '-js', $url . '/assets/front-end.js', array( 'jquery' ) );\n\t}", "title": "" }, { "docid": "311d487d60904478cd65f66cea6a1410", "score": "0.7601658", "text": "function initialize_enqueue_scripts() {\n\t\t$dependencies = array_merge(array('jquery'), $this->theme_opt['js_deps']);\n\t\twp_enqueue_style($this->theme_opt['theme_name_lc'], get_template_directory_uri().'/style.css');\n\t\twp_enqueue_script($this->theme_opt['theme_name_lc'], get_template_directory_uri() .'/js/'.$this->theme_opt['theme_name_lc'].'.js', $dependencies);\n\t\tif(!!$this->theme_opt['override_stylesheet']) {\n\t\t\twp_add_inline_style($this->theme_opt['theme_name_lc'], $this->theme_opt['override_stylesheet']);\n\t\t}\n\t}", "title": "" }, { "docid": "f1f8faed20980ef6e824f7c7c21992b9", "score": "0.7600171", "text": "public function enqueue_frontend_scripts() {\n wp_enqueue_script( \"{$this->plugin_name}-script\" );\n wp_enqueue_style( \"{$this->plugin_name}-style\" );\n }", "title": "" }, { "docid": "2f15c08032a5519802b63768ed5d2d37", "score": "0.76000535", "text": "function hwdsb_tv_enqueue_scripts() {\n\t// Enqueue parent style.\n\twp_enqueue_style( 'gazette-parent-style', get_template_directory_uri() . '/style.css' );\n\n\t// Enqueue our stylesheet so we can bust CSS cache.\n\twp_enqueue_style( 'tvhwdsb', get_stylesheet_uri(), array(), '20180227' );\n}", "title": "" }, { "docid": "8b106ff6a198551bc274c5652ad68f4e", "score": "0.75908315", "text": "public function enqueue_scripts() {\n\n\t\t\twp_register_script( 'timepicker-scripts', plugin_dir_url( __FILE__ ) . 'assets/js/jquery-ui-timepicker-addon.min.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-datepicker' ) );\n\n \t\t wp_register_script( 'scheduler-scripts', plugin_dir_url( __FILE__ ) . 'assets/js/scheduler.js', array( 'timepicker-scripts' ) );\n \t\twp_enqueue_script( 'scheduler-scripts' );\n\t\t}", "title": "" }, { "docid": "90e9acc5218efa4d526bfafa6f13ff4f", "score": "0.7588261", "text": "public function theme_scripts() {\n\t\t/* wp_enqueue_script(\n\t\t\t'flexdatalist',\n\t\t\t'https://cdnjs.cloudflare.com/ajax/libs/jquery-flexdatalist/2.2.4/jquery.flexdatalist.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t); */\n\t\twp_enqueue_script(\n\t\t\t'owl-carousel',\n\t\t\tTHEME_URL . '/assets/owl-carousel/owl.carousel.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'handlebars',\n\t\t\tTHEME_URL . '/assets/js/handlebars.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'jquery-ui',\n\t\t\tTHEME_URL . '/assets/js/jquery-ui.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n 'simplebar',\n 'https://cdn.jsdelivr.net/npm/simplebar@4.1.0/dist/simplebar.min.js',\n [],\n 'auto',\n true\n );\n\t\twp_enqueue_script(\n\t\t\t'mcustomscrollbar',\n\t\t\tTHEME_URL . '/assets/js/jquery.mCustomScrollbar.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'navigo',\n\t\t\tTHEME_URL . '/assets/js/navigo.min.js',\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'submit-feedback',\n\t\t\tTHEME_URL . '/assets/js/submit-feedback.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'submit-contact',\n\t\t\tTHEME_URL . '/assets/js/submit-contact.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\t// phpcs:ignore -- load in header, after jQuery.\n\t\twp_enqueue_script(\n\t\t\t'tracking',\n\t\t\tTHEME_URL . '/assets/js/tracking.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto'\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'theme',\n\t\t\tTHEME_URL . '/assets/js/theme.js',\n\t\t\t[ 'jquery', 'mediaelement', 'submit-feedback' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\t/* wp_enqueue_script(\n\t\t\t'search',\n\t\t\tTHEME_URL . '/assets/js/search.js',\n\t\t\t[ 'flexdatalist' ],\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t); */\n\t\t$error_messages = [\n\t\t\t'required' => __( 'This field is required. Please be sure to check.', 'asvz' ),\n\t\t\t'email' => __( 'Your E-mail address appears to be invalid. Please be sure to check.', 'asvz' ),\n\t\t\t'number' => __( 'You can enter only numbers in this field.', 'asvz' ),\n\t\t\t'maxLength' => __( 'Maximum {count} characters allowed!', 'asvz' ),\n\t\t\t'minLength' => __( 'Minimum {count} characters allowed!', 'asvz' ),\n\t\t\t'maxChecked' => __( 'Maximum {count} options allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'minChecked' => __( 'Please select minimum {count} options.', 'asvz' ),\n\t\t\t'maxSelected' => __( 'Maximum {count} selection allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'minSelected' => __( 'Minimum {count} selection allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'notEqual' => __( 'Fields do not match. Please be sure to check.', 'asvz' ),\n\t\t\t'different' => __( 'Fields cannot be the same as each other', 'asvz' ),\n\t\t\t'creditCard' => __( 'Invalid credit card number. Please be sure to check.', 'asvz' ),\n\t\t];\n\n\t\t/* $menu_items = [\n\t\t\t'categories' => [\n\t\t\t\t'text' => get_field( 'menu__categories__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__categories__icon', 'option' ),\n\t\t\t],\n\t\t\t'materials' => [\n\t\t\t\t'text' => get_field( 'menu__materials__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__materials__icon', 'option' ),\n\t\t\t],\n\t\t\t'tips' => [\n\t\t\t\t'text' => get_field( 'menu__tips__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__tips__icon', 'option' ),\n\t\t\t],\n\t\t\t'faq' => [\n\t\t\t\t'text' => get_field( 'menu__faq__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__faq__icon', 'option' ),\n\t\t\t],\n\t\t\t'contact' => [\n\t\t\t\t'text' => get_field( 'menu__contact__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__contact__icon', 'option' ),\n\t\t\t],\n\t\t]; */\n\n\t\t/* $type_icons = [\n\t\t\t'category' => get_field( 'type_icon__category', 'option' ),\n\t\t\t'task' => get_field( 'type_icon__task', 'option' ),\n\t\t\t'step' => get_field( 'type_icon__step', 'option' ),\n\t\t\t'material' => get_field( 'type_icon__material', 'option' ),\n\t\t\t'faq' => get_field( 'type_icon__faq', 'option' ),\n\t\t]; */\n\n\t\t/* foreach ( $type_icons as $key => $value ) {\n\t\t\tif ( $type_icons[ $key ] ) {\n\t\t\t\t$type_icons[ $key ] = $type_icons[ $key ]['sizes']['thumbnail'];\n\t\t\t}\n\t\t} */\n\n\t\t$asvz_objects = [\n\t\t\t'themeUrl' => THEME_URL,\n\t\t\t/*'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n\t\t\t'nonces' => [\n\t\t\t\t'submit_feedback' => wp_create_nonce( 'ASVZ_Submit_Feedback' ),\n\t\t\t\t'submit_contact' => wp_create_nonce( 'ASVZ_Submit_Contact' ),\n\t\t\t],\n\t\t\t'categories' => Category::all(),\n\t\t\t'materials' => Material::all(),\n\t\t\t'tasks' => Task::all(),\n\t\t\t'steps' => Step::all(),\n\t\t\t'faqs' => Faq::all(),\n\t\t\t'pages' => [\n\t\t\t\t'welcome' => [\n\t\t\t\t\t'title' => get_field( 'welcome_page__title', 'option' ),\n\t\t\t\t\t'subtitle' => get_field( 'welcome_page__subtitle', 'option' ),\n\t\t\t\t\t'thumbnail' => get_field( 'welcome_page__thumbnail', 'option' ),\n\t\t\t\t\t'description' => get_field( 'welcome_page__description', 'option' ),\n\t\t\t\t\t'cta_button' => [\n\t\t\t\t\t\t'text' => get_field( 'welcome_page__cta_button__text', 'option' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'feedback_form' => [\n\t\t\t\t'intro' => get_field( 'cleaning_feedback__intro', 'option' ),\n\t\t\t\t'title' => get_field( 'cleaning_feedback__title', 'option' ),\n\t\t\t\t'subtitle' => get_field( 'cleaning_feedback__subtitle', 'option' ),\n\t\t\t\t'placeholder' => get_field( 'cleaning_feedback__placeholder', 'option' ),\n\t\t\t\t'messages' => [\n\t\t\t\t\t'success' => get_field( 'cleaning_feedback__success_message', 'option' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'contact_form' => [\n\t\t\t\t'labels' => [\n\t\t\t\t\t'name' => get_field( 'cleaning_contact__label__name', 'option' ),\n\t\t\t\t\t'email' => get_field( 'cleaning_contact__label__email', 'option' ),\n\t\t\t\t\t'subject' => get_field( 'cleaning_contact__label__subject', 'option' ),\n\t\t\t\t\t'body' => get_field( 'cleaning_contact__label__body', 'option' ),\n\t\t\t\t\t'button' => get_field( 'cleaning_contact__label__button', 'option' ),\n\t\t\t\t],\n\t\t\t\t'placeholders' => [\n\t\t\t\t\t'name' => get_field( 'cleaning_contact__placeholder__name', 'option' ),\n\t\t\t\t\t'email' => get_field( 'cleaning_contact__placeholder__email', 'option' ),\n\t\t\t\t\t'subject' => get_field( 'cleaning_contact__placeholder__subject', 'option' ),\n\t\t\t\t\t'body' => get_field( 'cleaning_contact__placeholder__body', 'option' ),\n\t\t\t\t],\n\t\t\t\t'messages' => [\n\t\t\t\t\t'success' => [\n\t\t\t\t\t\t'title' => get_field( 'cleaning_contact__success_message__title', 'option' ),\n\t\t\t\t\t\t'description' => get_field( 'cleaning_contact__success_message__description', 'option' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'menu_items' => $menu_items,\n\t\t\t'page_titles' => [\n\t\t\t\t'categories' => __( 'Categorieën', 'asvz' ),\n\t\t\t\t'products' => __( 'Producten', 'asvz' ),\n\t\t\t\t'tasks' => __( 'Takenlijst', 'asvz' ),\n\t\t\t\t'tips' => __( 'Tips', 'asvz' ),\n\t\t\t\t'contact' => __( 'Contact', 'asvz' ),\n\t\t\t\t'faq' => __( 'Veelgestelde vragen', 'asvz' ),\n\t\t\t],\n\t\t\t'general_labels' => [\n\t\t\t\t'menu_header' => __( 'Poets!', 'asvz' ),\n\t\t\t\t'powered_by' => __( 'Powered By ASVZ', 'asvz' ),\n\t\t\t\t'search_placeholder' => __( 'Search keyword...', 'asvz' ),\n\t\t\t\t'tips_title' => __( 'Poets tips', 'asvz' ),\n\t\t\t\t'material_needed' => __( 'Bekijk hier wat je allemaal nodig hebt', 'asvz' ),\n\t\t\t\t'menu_header' => __( '', 'asvz' ),\n\t\t\t\t'completed_material' => __( 'Your material is complete!', 'asvz' ),\n\t\t\t],\n\t\t\t'popup' => [\n\t\t\t\t'trigger' => [\n\t\t\t\t\t'tips_icon' => get_field( 'tips_popup__trigger_icon', 'option' ),\n\t\t\t\t\t'wizard_icon' => get_field( 'wizard_popup__trigger_icon', 'option' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'type_icons' => $type_icons,*/\n\t\t];\n\n\t\twp_localize_script(\n\t\t\t'theme',\n\t\t\t'asvzObj',\n\t\t\t$asvz_objects\n\t\t);\n\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "f2d0c0034df17124bcd911d7d6799664", "score": "0.758781", "text": "public function enqueue_scripts () {\r\n\t\tif( ! is_admin() && is_singular( 'lookbook') ){\r\n\t\t\twp_enqueue_style( 'wc-lookbook-frontend', WC_LOOKBOOK_URL . 'css/wc-lookbook-frontend.css', array(), false, 'all' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8b48b746708c0131a9c8e2e7cd7231a2", "score": "0.75817454", "text": "public function enqueue()\n {\n // Remove wordpress oembed\n wp_deregister_script('wp-embed');\n\n // Don't use WordPress jquery on public pages.\n // Remove block library from public pages.\n if (!is_admin()) {\n wp_deregister_script('jquery');\n wp_dequeue_style('wp-block-library');\n }\n\n // Enqueue jQuery file.\n if (!is_admin()) {\n wp_enqueue_script(\n 'jquery',\n Utilities::staticUrl('/dist/js/jquery.min.js'),\n [],\n null\n );\n }\n\n // Enqueue Laravel Mix files.\n $this->enqueueMixFiles();\n\n // Enqueue main app.js file.\n wp_enqueue_script(\n 'app',\n Utilities::staticUrl('/dist/js/app.js'),\n [],\n null,\n true\n );\n\n // Ajax support\n wp_localize_script(\n 'app',\n 'scriptvars',\n [\n 'ajax_url' => home_url('ajax'),\n 'base_path' => parse_url(trailingslashit(home_url()), PHP_URL_PATH)\n ]\n );\n }", "title": "" }, { "docid": "3105000c0c19704175e27e6ac9496039", "score": "0.7574431", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Customorder_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Customorder_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/customorder-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "1f280794af55a3cd227fe26300db2019", "score": "0.7570887", "text": "public function enqueue_scripts() {\n\n\t\twp_enqueue_script( 'wp-util' );\n\t}", "title": "" }, { "docid": "0f6707dc3c79746af9c4d7d940738d95", "score": "0.7566194", "text": "function load_styles_and_scripts() {\n wp_enqueue_style('bootstrap-styles', get_template_directory_uri() . '/css/bootstrap.css');\n wp_enqueue_style('main-styles', get_stylesheet_uri());\n\n wp_enqueue_script('jQuery', 'https://code.jquery.com/jquery.min.js');\n wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.js');\n wp_enqueue_script('iconDock', get_template_directory_uri() . '/js/jqueryjqDoc.min.js');\n}", "title": "" }, { "docid": "5c717f2ab27c4f8228971a6e60a129f4", "score": "0.75625914", "text": "public function enqueue() {\n wp_enqueue_script( 'jquery-ui-core' );\n wp_enqueue_script( 'jquery-ui-sortable' );\n }", "title": "" }, { "docid": "ad01a5ba8520f91b026aa8a7bb8f92cc", "score": "0.75600785", "text": "function aihr_scripts() {\n\n\t$theme = wp_get_theme();\n\t$theme_version = $theme['Version'];\n\t \n\t\n\twp_enqueue_style('aihr-style',get_stylesheet_directory_uri() . '/assets/css/custom.css',$theme_version,true);\n\n\twp_enqueue_script('aihr-js-custom',get_stylesheet_directory_uri() . '/assets/js/custom.js',array('jquery'),$theme_version,true );\n\n\n}", "title": "" }, { "docid": "ec6802d7b4ac1e3fcfe0bd49735d3e93", "score": "0.75598204", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Wpmbt_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Wpmbt_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script(Wpmbt_Admin::$plugin_name, plugin_dir_url(__FILE__) . 'js/wpmbt-admin.js', array('jquery'), Wpmbt_Admin::$version, false);\n\n\t}", "title": "" }, { "docid": "401af9446563b5ccc465af361c79af6c", "score": "0.75539416", "text": "public function enqueue_scripts() {\n\n wp_enqueue_style('bloomberg-shortcode', BLOOMBERG_PLUGIN_URL .'css/shortcode.min.css');\n\n wp_register_script('bloomberg-shortcode', BLOOMBERG_PLUGIN_URL .'js/shortcode.min.js', 'jquery', '1.0', true);\n }", "title": "" }, { "docid": "095a1c38f1f3f2478530b9dd95d39560", "score": "0.75525063", "text": "public function enqueueMixFiles()\n {\n // Enqueue manifest.js file.\n wp_enqueue_script(\n 'manifest',\n Utilities::staticUrl('/dist/js/manifest.js'),\n [],\n null,\n true\n );\n\n // Enqueue vendor.js file if we have one.\n if (file_exists(trailingslashit(ASSETS_DIR) . 'dist/js/vendor.js')) {\n wp_enqueue_script(\n 'vendor',\n Utilities::staticUrl('/dist/js/vendor.js'),\n [],\n null,\n true\n );\n }\n }", "title": "" }, { "docid": "b0eba5f0a6c2df88bdab8914c9ab3265", "score": "0.7551191", "text": "public function _enqueue_scripts() {\r\n //style and widgetne\r\n wp_enqueue_style('hw-stats-mechanic-style', HW_COUNTER_PLUGIN_URL. '/assets/styles/css/default.css');\r\n }", "title": "" }, { "docid": "cbb264f57153990fa48bb2116d5f6bb9", "score": "0.75497574", "text": "public function admin_register_scripts_styles() {\n wp_register_script(\n 'sizzle',\n plugins_url( '/js/lib/sizzle.js', CM_COMPANY_FOOTER ),\n null,\n '1.9.4-pre',\n true\n );\n wp_register_script(\n 'cm-company-email-admin',\n plugins_url( '/js/cm-company-email-admin.js', CM_COMPANY_FOOTER ),\n array( 'sizzle' ),\n false,\n true\n );\n }", "title": "" }, { "docid": "129619abf24e4d285167519890f86189", "score": "0.753804", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Css_Stats_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Css_Stats_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script( $this->plugin_name . '-common', CSS_STATS_PLUGIN_DIR . 'client/dist/commons.js', array(), $this->version, true );\n\t\twp_enqueue_script( $this->plugin_name, CSS_STATS_PLUGIN_DIR . 'client/dist/admin.bundle.js', array(), $this->version, true );\n\n\t\twp_localize_script( $this->plugin_name, 'css_stats', $this->get_vars());\n\t\t\t\t\n\t}", "title": "" }, { "docid": "873c04fa2e318758b9edf608dcf3d350", "score": "0.7536294", "text": "private function register_scripts_and_styles() {\n if (is_admin()) {\n $this->load_file(self::slug . '-admin-style', '/css/admin.css');\n $this->load_file( self::slug . '-moment-js', '/js/moment-with-locales.min.js',true );\n \n \n } //is_admin()\n else {\n } // end if/else\n }", "title": "" } ]
4e452bbece585a6e400f0834721a716b
Fetch a result row as an object
[ { "docid": "9a144055ca1d6b4baad6163da0f7a2ac", "score": "0.0", "text": "public function fetchArray($result)\n {\n return mysql_fetch_assoc($result);\n }", "title": "" } ]
[ { "docid": "ee4ffa4cb28945dc120d0a5b4fc6e9dd", "score": "0.78233874", "text": "function fetchObject() {\n \treturn mysql_fetch_object($this->res);\n }", "title": "" }, { "docid": "4fd6c6a2509f603d27dd21669d33c3dd", "score": "0.7732603", "text": "public static function fetchObject( )\n\t{\n\t return mysqli_fetch_object( self::$result );\n\t}", "title": "" }, { "docid": "25b6333bb058879fc6426f5f4d15cdcf", "score": "0.7688383", "text": "public function fetchObject($result)\n {\n return mysql_fetch_object($result);\n }", "title": "" }, { "docid": "65098cf663868e83bbbea7ca5b1a2e90", "score": "0.75255245", "text": "public function fetch_object($result)\n\t{\n\t\treturn $result->fetch_object();\n\t}", "title": "" }, { "docid": "09295fa9683526c8c76b459d4280e80c", "score": "0.7474643", "text": "public function fetchObject($result)\n {\n return oci_fetch_object($result);\n }", "title": "" }, { "docid": "f9978e19ecf0a5b90bf52505de10e7f6", "score": "0.7467874", "text": "abstract public function fetchRow();", "title": "" }, { "docid": "49a545a3e9fc43d3823d362795910bdb", "score": "0.7426466", "text": "function fetch_object($result)\n {\n\t\treturn mysql_fetch_object($result);\n }", "title": "" }, { "docid": "f914e525a895c4d6b30998499a131462", "score": "0.738671", "text": "public function fetch($type = 'object'){\n\n switch ($type) {\n case 'array':\n $row = $this->result->fetch_array();\n break;\n case 'object':\n $row = $this->result->fetch_object();\n break;\n default:\n $row = $this->result->fetch_object();\n break;\n }\n\n return $row;\n \n }", "title": "" }, { "docid": "0f1f376e4e056a35c61d7b876fa15c84", "score": "0.7360969", "text": "function FetchAs($result){\n\t\t\tif(!is_resource($result)) return false;\n\t\t\t\treturn ibase_fetch_object($result); //cambio de fetch_assoc por fetch_row\n\t\t}", "title": "" }, { "docid": "969ba02575c789a0a87cd832546f6e19", "score": "0.7332755", "text": "public function fetchSingleRow() {\n }", "title": "" }, { "docid": "4c35e25238b371fd9306109351a42fdd", "score": "0.7294846", "text": "abstract function getObject(array $row);", "title": "" }, { "docid": "e6e80f48f13aeb463b2e4d0562020914", "score": "0.7264935", "text": "public function row(){\n if(empty($this->result)){\n $this->get();\n }\n $result = $this->result->fetch(PDO::FETCH_ASSOC);\n $this->clear_data();\n return $result;\n }", "title": "" }, { "docid": "ecb1612f65896c71bb48f2416eb3912e", "score": "0.7256413", "text": "public function fetch(array $row);", "title": "" }, { "docid": "648b07c25f167e2bb1631c3d6eb2b28e", "score": "0.71400124", "text": "protected function fetch_row()\n\t{\n\t\treturn @oci_fetch_row($this->resResult);\n\t}", "title": "" }, { "docid": "e5c0d045e3c1bacddc33342945682fef", "score": "0.7110911", "text": "public function fetch_row($result)\n {\n }", "title": "" }, { "docid": "61f8ddd94a6978cb4e89326e3965c3f6", "score": "0.71069753", "text": "function\tfetch_object( $result_type = patDBC_TYPEBOTH )\n\t{\n\t\tif ( $result_type == patDBC_TYPEASSOC ) { $result_type = MYSQL_ASSOC; }\n\t\telse if ( $result_type == patDBC_TYPENUM ) { $result_type = MYSQL_NUM; }\n\t\telse { $result_type = MYSQL_BOTH; }\n\n\t\treturn\tpg_fetch_object( $this->id, $result_type );\n\t\t/* return\tmysql_fetch_object( $this->id, $result_type ); */\n\t}", "title": "" }, { "docid": "6fea843c5f3f79c0ed44cac5054a4ae0", "score": "0.70744866", "text": "public function fetchObject($result)\n\t{\n\t\treturn ($row = self::$CURRENT_DB->fetchAssoc($result)) ? $this->createObject($row) : false;\n\t}", "title": "" }, { "docid": "fd07b10635c5dea876f8ad7216334b62", "score": "0.70525783", "text": "function cas_db_fetch_row($res_ins) {\n return $res_ins['result']->fetchRow();\n }", "title": "" }, { "docid": "80ef73e92b5ba8c3941e264ea03e8de8", "score": "0.7049218", "text": "public function fetchRow($result)\n {\n $data = $this->fetchAny($result);\n\n return $data;\n }", "title": "" }, { "docid": "91216903328f17dd18f0ee678953e6b7", "score": "0.70444846", "text": "public function fetchAssocRow()\n{\n\t$this->res->fetch_assoc();\n}", "title": "" }, { "docid": "d62dadae4f616db4aeb175a9c50e85e0", "score": "0.70337707", "text": "protected function db_fetch_row($result)\n {\n return $result->fetch_row();\n }", "title": "" }, { "docid": "89bdd5d58d7b8369a23a3db14fec3583", "score": "0.70160985", "text": "function fetch_obj($query_results){\n\t$result_line=mysql_fetch_object($query_results) or die(mysql_error());\n\treturn $result_line;\n}", "title": "" }, { "docid": "75cb7f09bd602ba212b27b981dd17892", "score": "0.70084536", "text": "public function obj_fetch_object()\n {\n $result = sqlsrv_fetch_object( $this->obj_result );\n\n return ( is_object( $result ) ) ? $this->obj_record = $result : null;\n }", "title": "" }, { "docid": "12eb820250f004ee6bfabc34ac275b0c", "score": "0.69910395", "text": "function FetchRow($result) {\n\t\t\t\t\n\t\tglobal $gError;\n\t\t\n\t\tswitch($this->db_type) {\n\t\t\tcase DB_MYSQL:\n\t\t\t\treturn @mysql_fetch_row($result);\n\t\t\tcase DB_PGSQL:\n\t\t\t\treturn @pg_fetch_row($result);\n\t\t\tcase DB_SQLITE:\n\t\t\t\treturn @sqlite_fetch_single($result);\n\t\t\tdefault:\n\t\t\t\t$gError->_error(\"Db::FetchRow(): Unknown database type id = \" . $this->db_type);\n\t\t\t\treturn NULL;\n\t\t}\n\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "df2f28332eb5e924a5761ce27bae2b04", "score": "0.6937456", "text": "function fetch_object($result = false){\n\t\tif($result === false){\n\t\t\tif(!$obj = mysql_fetch_object($this->result))\n\t\t\t\t$this->result = false;\n\t\t}\n\t\telse{\n\t\t\t$obj = mysql_fetch_object($result);\n\t\t}\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "8f6d43df337853e00d93d352d0706bbd", "score": "0.6925979", "text": "function loadObject() {\n\t\tif (!($query = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$response = null;\n\t\tif ($object = mysqli_fetch_object( $query )) {\n\t\t\t$response = $object;\n\t\t}\n\t\tmysqli_free_result( $query );\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "856762f1236ff9b09b4343efcfeeee5c", "score": "0.6921352", "text": "public function fetch_row()\n {\n return pg_fetch_assoc($this->resource);\n }", "title": "" }, { "docid": "43860f5d1a85e5c3cd403d858bc4f2ab", "score": "0.69188213", "text": "public static function fetch_object(Statement $result)\n {\n return $result->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f1eac4b1ebdbd8b34b0f61bfb4229b5e", "score": "0.69167656", "text": "public function fetchRow()\n\t{\n\t\treturn $this->fetchAll(true);\n\t}", "title": "" }, { "docid": "197dc3a56867d849355f798be85cfa39", "score": "0.6907177", "text": "public function fetch_row($result)\n {\n return oci_fetch_row($result);\n }", "title": "" }, { "docid": "902df0b56296c0859d8a99d015f56525", "score": "0.6906709", "text": "public function fetch_object()\n\t{\n\t\n\t\tif($_ENV['databasetype'] == \"MYSQL\")\n\t\t{\n \t\treturn @mysqli_fetch_object($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"SQLSERVER\")\n\t\t{\n\t\t\treturn @mssql_fetch_object($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"POSTGRESQL\")\n\t\t{\n\t\t\treturn @pg_fetch_object($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"ORACLE\")\n\t\t{\n\t\t\t$myObject = @oci_fetch_object($this->statement);\n\t\t\tif(isset($myObject) && !empty($myObject))\n\t\t\t{\n\t\t\t\tforeach($myObject as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$key2 = strtolower($key);\n\t\t\t\t\t$myLowerObject->$key2 = $myObject->$key;\n\t\t\t\t}\n\t\t\t\treturn $myLowerObject;\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\n\t\t}\n\t }", "title": "" }, { "docid": "99c2cc598e87765a8bad30d0bea77020", "score": "0.6905871", "text": "public function getrow() {\n\t\treturn ($this->res ? array_shift($this->res) : $this->sth->fetch(PDO::FETCH_ASSOC));\n\t}", "title": "" }, { "docid": "d37475273fc5383103b5f522f0ccd83d", "score": "0.69032526", "text": "public function fetchRow($result)\n {\n \treturn mysqli_fetch_row($result);\n }", "title": "" }, { "docid": "8435922e6a784b0442462a59ac9540dc", "score": "0.6900635", "text": "public function fetchResult() {\n\t\tif (count($this->rows)) {\n\t\t\t$row = array_shift($this->rows);\n\t\t\t$resultRow = array();\n\t\t\t$i = 0;\n\n\t\t\tforeach ($row as $index => $field) {\n\t\t\t\tif (isset($this->map[$index]) && $this->map[$index] !== '') {\n\t\t\t\t\tlist($table, $column) = $this->map[$index];\n\t\t\t\t\t$resultRow[$table][$column] = $row[$index];\n\t\t\t\t} else {\n\t\t\t\t\t$resultRow[0][str_replace('\"', '', $index)] = $row[$index];\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d88e27078d2fa5deb8621683a3223788", "score": "0.68840265", "text": "public function fetch_object($class_name = 'stdClass', $params = array(), $result, $class_name = 'stdClass', $params = array())\n {\n }", "title": "" }, { "docid": "25cd2ae903afc2da3c6523601f7ae977", "score": "0.68328553", "text": "public function fetchRow() {\r\n\t\tif (! $this->result) {\r\n\t\t\t$this->lf->logMessage(\"mysqlClass:fetchRow(): nothing to fetch.\\n\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t$row = mysql_fetch_row($this->result);\r\n\t\t//echo \"fetch_row: $row->rowID <br />\";\r\n\t\treturn $row;\r\n\t}", "title": "" }, { "docid": "ea7109e71fef67ca65175c0fb48b675a", "score": "0.68301165", "text": "public function hydrate($row)\n {\n }", "title": "" }, { "docid": "9d33dac4b2078382e9aad3b28e93fcaf", "score": "0.68262357", "text": "public static function fetchRow()\n {\n $ret = self::$queryResult->FetchRow();\n if ($ret === false) {\n return null;\n }\n return $ret;\n }", "title": "" }, { "docid": "297a6b36beb85e1958120d72a55607c0", "score": "0.67999214", "text": "public function fetchRow($result)\n {\n return mysqli_fetch_row($result);\n }", "title": "" }, { "docid": "a8030c0f870b7c1385a64cffd98226ee", "score": "0.6799487", "text": "public function fetchRow($result)\n {\n return $this->_extension->fetchRow($result);\n }", "title": "" }, { "docid": "41a351de37cba2e9f6746cfe4c5db21e", "score": "0.67839164", "text": "function db_fetch_object($result) {\n if ($result) {\n return mysqli_fetch_object($result);\n }\n}", "title": "" }, { "docid": "8288d2e96bd0f98660a935f6534de78c", "score": "0.67767644", "text": "public function fetch_row()\n\t{\n\n\t\tif($_ENV['databasetype'] == \"MYSQL\")\n\t\t{\n return @mysqli_fetch_row($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"SQLSERVER\")\n\t\t{\n\t\t\treturn @mssql_fetch_row($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"POSTGRESQL\")\n\t\t{\n\t\t\treturn @pg_fetch_row($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"ORACLE\")\n\t\t{\n\t\t\treturn @oci_fetch_row($this->statement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "cd805f14852cdc467d164a73f6bd5987", "score": "0.6764713", "text": "function db_fetch_obj( $rResource )\n{\n return mysql_fetch_row( $rResource );\n}", "title": "" }, { "docid": "31dcc050ce0553d9177f217df5599253", "score": "0.67488194", "text": "public function fetch_object($sql)\n {\n return (object)$this->fetch_array($sql);\n }", "title": "" }, { "docid": "d93752e6d02b25efb75d0e15ccebd5e8", "score": "0.67475647", "text": "public function fetch_row($result)\n\t{\n\t\t$this->result = $result->fetch_row();\n\t\treturn $this->result;\n\t}", "title": "" }, { "docid": "fe48962ae801a27e6411af4697939349", "score": "0.6747325", "text": "public function result(){\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f87b429480ec02f1dad8125f93aeeacd", "score": "0.6743845", "text": "public function result()\n { \n if ($result = parent::query($this->query)) {\n /* Fetch object */\n while ($row = $result->fetch_object())\n {\n $this->result_object[] = $row;\n }\n return $this->result_object;\n }\n }", "title": "" }, { "docid": "65dea3b84aa4629f4c8fdc760bd72b59", "score": "0.67044026", "text": "function query_result_rowdata(&$result, $row = 0)\n\t{\n\t\tif (!is_object($result))\n\t\t\tthrow new Exception(\"result is not an object\");\n\t\t\t\n\t\t$result->Move($row);\n\t\t$rowdata = $this->change_key_case($result->FetchRow());\n\t\t\n\t\tforeach($rowdata as $col => $coldata) \n\t\t{\n\t\t\tif($col != 'fieldlabel')\n\t\t\t\t$rowdata[$col] = to_html($coldata);\n\t\t}\n\t\t\n\t\treturn $rowdata;\n\t}", "title": "" }, { "docid": "baf870ef79ac339925b7b5b03f736c2f", "score": "0.6700423", "text": "public function fetch() {\n return $this->result->fetch_assoc();\n }", "title": "" }, { "docid": "42061e03ac802a8a9f7e26730dd748ae", "score": "0.6686745", "text": "public function loadRow()\n\t{\n\t\t// Initialise variables\n\t\t$return = null;\n\n\t\t// Execute the query\n\t\tif (!$this->execute())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get the first row from the result set as an array\n\t\tif ($row = $this->fetchArray())\n\t\t{\n\t\t\t$return = $row;\n\t\t}\n\n\t\t// Free up system resources and return\n\t\t$this->freeResult();\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "b9bc86686806825e595e01f8c5fca107", "score": "0.66863036", "text": "function row($resource)\n {\n return $resource->fetch_assoc();\n }", "title": "" }, { "docid": "84e4e0cd11952647c58d3553a348bfa5", "score": "0.6676773", "text": "protected function _fetchRow($result)\n\t{\n\t\treturn mysql_fetch_row($result);\n\t}", "title": "" }, { "docid": "523bb25e7982c9268210d475ffbdc6fc", "score": "0.66731685", "text": "function\tfetch_row()\n\t{\n/*\t\treturn\tmysql_fetch_row( $this->id ); */\n\t\treturn\tpg_fetch_row( $this->id );\n\t}", "title": "" }, { "docid": "3ae1ca0cffdd686acfafa25937e88b31", "score": "0.6669976", "text": "public function fetch($result)\n\t{\n\t\treturn $result->fetch_assoc();\n\t}", "title": "" }, { "docid": "a0e943bf2dedec74643594fd057c3a5f", "score": "0.6664953", "text": "public function fetch()\n {\n return $this->_db->fetch($this->_table, $this->_fields, $this->_params, $this->_joins);\n }", "title": "" }, { "docid": "cb3d74e2a6c0d6f51071739754f0a3e9", "score": "0.6649716", "text": "public function result(){\n if(empty($this->result)){\n $this->get();\n }\n $result = $this->result->fetch(PDO::FETCH_OBJ);\n $this->clear_data();\n return $result;\n }", "title": "" }, { "docid": "381d3dd052402bde254c3111cabb4e5a", "score": "0.6645101", "text": "public static function to_object( $row ) {\n\t\t$object = new static();\n\t\t$object->fill( $row );\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "cadd795b181d49773ffb01e5b594a446", "score": "0.66310364", "text": "function MySqlFetchRow($result, $type = 'assoc') {\n\n\t\t$row = false;\n\t\tif ($result != false) {\n\n\t\t\tswitch ($type) {\n\t\t\tcase 'array':\n\t\t\t\t$row = @$result->result_array();\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\t$row = @$result->result();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\tcase 'assoc':\n\t\t\t\t$row = @$result->row_array();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "4679d7f7fb8cc7fd1ff19e3b87d15110", "score": "0.66264635", "text": "public static function loadResult() {\n \n $row = mysqli_fetch_row(self::$result);\n\t\treturn $row[0]; \n }", "title": "" }, { "docid": "34af126678824b55e5c88c4b82ae002b", "score": "0.6624412", "text": "public function result()\n {\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "dba26098147b42c7f04225eec9b6f77c", "score": "0.6623738", "text": "function fetch_object($query) {\n if ($query instanceof mysqli_result) {\n return $query->fetch_object();\n }\n return FALSE;\n }", "title": "" }, { "docid": "adf325386c8bf8a03197e835bc836775", "score": "0.66157824", "text": "public function fetchObject($queryresult, $class = \"\")\n\t{\n\t\tif (empty($class))\n\t\t{\n\t\t\treturn @mysqli_fetch_object($queryresult);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn @mysqli_fetch_object($queryresult, $class);\n\t\t}\n\t}", "title": "" }, { "docid": "df5f3837f3062c58015a2fa0c4dca838", "score": "0.6599381", "text": "function query_row($query, $type = 'assoc')\n {\n $res = $this->query($query);\n if ($type == 'assoc')\n return $res->fetch(PDO::FETCH_ASSOC);\n elseif ($type == 'array')\n return $res->fetch(PDO::FETCH_NUM);\n elseif ($type == 'object')\n return $res->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "1cf82f83b96609f201a47d17cecba4d6", "score": "0.65979654", "text": "public function loadObject()\n {\n $result = $this->query();\n if ($result && is_object($result)) {\n $obj = $result->fetch_object();\n } else {\n pre($result, 'loadObject()->result');\n }\n if ($obj) {\n return $obj;\n }\n return null;\n }", "title": "" }, { "docid": "2240a68a649b8702c85e9f8db692d630", "score": "0.659584", "text": "function fetchRow($fetchType = DBW_FETCH_ASSOC)\n {\n $fetchedRow = array();\n if ($fetchType == DBW_FETCH_ASSOC) {\n $fetchedRow = @mysql_fetch_assoc($this->_queryResult);\n } elseif ($fetchType == DBW_FETCH_ORDERED) {\n $fetchedRow = @mysql_fetch_row($this->_queryResult);\n } else {\n $fetchedRow = @mysql_fetch_object($this->_queryResult);\n }\n return $fetchedRow;\n }", "title": "" }, { "docid": "165360199d7a183db150be7e817faec4", "score": "0.6578255", "text": "public function fetch() {\n\t\t$result = mysqli_fetch_assoc ( $this->_result );\n\t\t$this->freeResult ();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "598f9aa2fdbe9029862f7c6372983602", "score": "0.6575028", "text": "function\tfetch_row()\n\t{\n\t\treturn\tarray();\n\t}", "title": "" }, { "docid": "b6fd8d8a8f8d0139376a437add3810e7", "score": "0.65542966", "text": "public function fetch_row(){\n\t\t\n\t\techo \"fetch_row function from DB\";\n\t}", "title": "" }, { "docid": "90291fce6366e2941f81f08f3d70520e", "score": "0.6552887", "text": "function fetchRow()\n {\n return sqlite_fetch_array($this->_result);\n }", "title": "" }, { "docid": "25beb76180ed92f1e84f0e660faea45a", "score": "0.65407544", "text": "function execute_get_row($sql=\"\"){\n\t\t$result_row = null;\n\t\t$result = $this->conn->query($sql);\n\t\tif ( $result === FALSE) {\n\t\t\t$this->db_error($sql);\n\t\t}else{\n\t\t\t$result_row = $result->fetch_object();\n\t\t}\n\t\treturn $result_row;\t\t\n\t}", "title": "" }, { "docid": "faaf43d73f3e3611b81c844c7fa0f471", "score": "0.6522276", "text": "public function row($query, $params = null, $fetchmode = PDO::FETCH_ASSOC) {\n $this->Init($query, $params);\n $result = $this->sQuery->fetch($fetchmode);\n $this->sQuery->closeCursor(); // Frees up the connection to the server so that other SQL statements may be issued,\n return $result;\n }", "title": "" }, { "docid": "83817abb4ba8c21b4ecfadb1c3ebaf73", "score": "0.65194124", "text": "public function fetch_row($result) {\n\t\t\treturn mysqli_fetch_row($result);\n\t\t}", "title": "" }, { "docid": "7d6e13cea74ebb5f14ff243fb6ac34e9", "score": "0.6519034", "text": "function fetch(){\n return mysqli_fetch_assoc($this->result);\n }", "title": "" }, { "docid": "3b85fddcdf6a91f7599ffac933dfe10c", "score": "0.65186757", "text": "function fetch(){\n $row = false;\n if( $this->result !== false && $this->result != null)\n $row = mysql_fetch_assoc( $this->result );\n \n if( $row === false ) return false;\n\n foreach($row as $var => $value){\n if( property_exists($this, $var) ){\n $this->$var = $row[$var];\n }\n }\n return true;\n }", "title": "" }, { "docid": "adf2e0f1228d4330d53b7af322349ab8", "score": "0.65090656", "text": "function FetchObject($Query)\n {\n\t\t$this->mySqlResult = mysqli_query($this->conn , $Query);\n return (@mysqli_fetch_object($this->mySqlResult ));\n }", "title": "" }, { "docid": "add1eb954c2dc10f85c8d5ddf8511be8", "score": "0.65068585", "text": "public function fetch(){\n\t\t\t$data = $this->_adapter->fetchRow( $this->_selector );\n\t\t\t$this->_initSelector();\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "2743cdd2e31aad7db05753621bf4acb4", "score": "0.6492311", "text": "function fetch()\r\n\t{\r\n\t\tif($this->result)\r\n\t\t\treturn mysql_fetch_object($this->result);\r\n\t\treturn 0;\r\n\t}", "title": "" }, { "docid": "7813f12fcce95195be3c0b39028f9ecd", "score": "0.64875615", "text": "public function fetch($record);", "title": "" }, { "docid": "f63bbd1d4cc1b66bba35c8f5d01fdddd", "score": "0.6470256", "text": "function fetch(){\n\n if(isset($this->result)){\n return $this->result->fetch_assoc();\n }\n\n return false;\n }", "title": "" }, { "docid": "29f7f010104accd41a8435ba296c20c2", "score": "0.64622617", "text": "public function fetchResult() {\n\t\tif ($row = $this->_result->fetch(PDO::FETCH_NUM)) {\n\t\t\t$resultRow = array();\n\t\t\tforeach ($this->map as $col => $meta) {\n\t\t\t\tlist($table, $column, $type) = $meta;\n\t\t\t\t$resultRow[$table][$column] = $row[$col];\n\t\t\t\tif ($type === 'boolean' && $row[$col] !== null) {\n\t\t\t\t\t$resultRow[$table][$column] = $this->boolean($resultRow[$table][$column]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t}\n\t\t$this->_result->closeCursor();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b73db83c3d338cc5e4a32498e3491bfa", "score": "0.64576864", "text": "public function fetch($result, $r_type=self::ARRAY_A)\n\t{\n\t\t$db = self::$CURRENT_DB;\n\t\tswitch($r_type)\n\t\t{\n\t\t\tcase self::ARRAY_A: return $db->fetchAssoc($result);\n\t\t\tcase self::ARRAY_N: return $db->fetchRow($result);\n\t\t\tcase self::ARRAY_O: return $this->fetchObject($result);\n\t\t\tdefault: return (false === ($row = $db->fetchAssoc($result))) ? false : $this->createObject($row, $r_type);\n\t\t}\n\t}", "title": "" }, { "docid": "3d79bea502b32adbc28d42123ef5c815", "score": "0.6454141", "text": "private static function fromResultSet($res) {\r\n //We get all the values form the query\r\n $nickname = $res[UserADO::$colNameNickname];\r\n $userscore = $res[UserADO::$colNameUserscore];\r\n $firstname = $res[UserADO::$colNameFirstname];\r\n $lastname = $res[UserADO::$colNameLastname];\r\n $email = $res[UserADO::$colNameEmail];\r\n $password = $res[UserADO::$colNamePassword];\r\n $postalcode = $res[UserADO::$colNamePostalcode];\r\n\r\n //Object construction\r\n $entity = new User();\r\n $entity->setNickname($nickname);\r\n $entity->setUserscore($userscore);\r\n $entity->setFirstname($firstname);\r\n $entity->setLastname($lastname);\r\n $entity->setEmail($email);\r\n $entity->setPassword($password);\r\n $entity->setPostalcode($postalcode);\r\n return $entity;\r\n }", "title": "" }, { "docid": "223fa12160c7344a0fe6f313e38bd1ef", "score": "0.64511794", "text": "public function loadObject($class = 'stdClass')\n\t{\n\t\t// Initialise variables\n\t\t$return = null;\n\n\t\t// Execute the query\n\t\tif (!$this->execute())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get the first row from the result set as an object of type $class\n\t\tif ($row = $this->fetchObject($class))\n\t\t{\n\t\t\t$return = $row;\n\t\t}\n\n\t\t// Free up system resources and return\n\t\t$this->freeResult();\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "3d3d04ea4fed6eeb3c7125a19427c13a", "score": "0.64437896", "text": "private static function fromResultSet( $res ) {\n //recuperar valors dels camps\n $idRepository = $res[ repositoriesClass::$colId];\n $repositoryName = $res[ repositoriesClass::$colName];\n $idUser = $res[ repositoriesClass::$colUser];\n $idProject = $res[ repositoriesClass::$colProject];\n\n //construeix l'objecte\n $entitat = new repositoriesClass();\n $entitat->setIdRepository($idRepository);\n $entitat->setRepositoryName($repositoryName); \n $entitat->setIdUser($idUser);\n $entitat->setIdProject($idProject);\n //retornar objecte\n return $entitat;\n }", "title": "" }, { "docid": "47b565e252e45547abf8c93d5f0f2b2b", "score": "0.64420706", "text": "protected function fetchRow($fetch_style = null, $fetch_argument = null, array $ctor_args = array())\n {\n if ($fetch_style === null) {\n if (($fetch_style = $this->defaultFetchMode) !== null) {\n $fetch_argument = $fetch_argument !== null ? $fetch_argument : $this->defaultFetchArgument;\n $ctor_args = !empty($ctor_args) ? $ctor_args : $this->defaultFetchConstructorParams;\n } else {\n $fetch_style = \\PDO::FETCH_BOTH;\n }\n }\n\n if ($fetch_style == \\PDO::FETCH_COLUMN) {\n $result = $this->result->fetch_array(MYSQLI_NUM);\n\n if (!$result) {\n return $result;\n }\n\n $column = intval($fetch_argument !== null ? $fetch_argument : $this->defaultFetchArgument);\n\n return isset($result[$column]) ? $result[$column] : null;\n } elseif ($fetch_style == \\PDO::FETCH_FUNC) {\n $result = $this->result->fetch_array(\\PDO::FETCH_BOTH);\n\n if (!$result) {\n return $result;\n }\n\n return call_user_func($fetch_argument, $result);\n } elseif (in_array($fetch_style, array(\\PDO::FETCH_CLASS, \\PDO::FETCH_OBJ))) {\n $fetch_argument = $fetch_argument && $fetch_style == \\PDO::FETCH_CLASS ? $fetch_argument : 'stdClass';\n\n return $ctor_args && $fetch_style == \\PDO::FETCH_CLASS\n ? $this->result->fetch_object($fetch_argument, $ctor_args)\n : $this->result->fetch_object($fetch_argument);\n } elseif ($fetch_style == \\PDO::FETCH_INTO) {\n $result = $this->result->fetch_array(MYSQLI_ASSOC);\n\n if (!$result) {\n return $result;\n }\n\n $this->hydrateObject(\n $fetch_argument,\n $result\n );\n\n return true;\n } elseif ($fetch_style == \\PDO::FETCH_BOUND) {\n $result = $this->result->fetch_array(MYSQLI_BOTH);\n\n if (!$result) {\n return $result;\n }\n\n foreach ($this->resultBindings as $binding => $params) {\n $value = isset($result[$binding - 1]) ? $result[$binding - 1] : null;\n if ($params[2]) {\n $value = mb_substr($value, 0, $params[2]);\n }\n if ($params[1]) {\n $value = $this->castPDOToPHPType($value, $params[1]);\n }\n $params[0] = $value;\n }\n\n return true;\n }\n\n $styles = array(\\PDO::FETCH_BOTH, \\PDO::FETCH_ASSOC, \\PDO::FETCH_NUM);\n $fetch_style = in_array($fetch_style, $styles) ? $fetch_style : reset($styles);\n\n return $this->result->fetch_array($this->mapFetchStyle($fetch_style));\n }", "title": "" }, { "docid": "5ef0c5f402052568c895c1a28e2efa55", "score": "0.6431425", "text": "protected function fetchData() {\n\t\t$dbm = DatabaseManager::open('__mfx');\n\t\t$row = $dbm->getRow($this->getFetchDataQuery(), \\PDO::FETCH_ASSOC, $this->_key);\n\t\t$dbm = NULL;\n\t\treturn $row;\n\t}", "title": "" }, { "docid": "836d931f48657760f0340d89c748ab53", "score": "0.6402869", "text": "public function fetch(): ResultInterface\n {\n if (!($this->stmnt instanceof PDOStatement)\n || is_array(($result = $this->stmnt->fetchAll(PDO::FETCH_OBJ))) === false) {\n return new Result([]);\n }\n\n return new Result($result);\n }", "title": "" }, { "docid": "d74449328f25ea8a16173b2302d2ad5b", "score": "0.63741195", "text": "function fetchrow($res, $result_type = \"BOTH\")\n {\n if (!$res) {\n return false;\n }\n switch ($result_type) {\n case \"ASSOC\" :\n $result_type = MSSQL_ASSOC;\n break;\n case \"NUM\" :\n $result_type = MSSQL_NUM;\n break;\n default :\n $result_type = MSSQL_BOTH;\n }\n $resFetch = @mssql_fetch_array($res, $result_type);\n if (!$resFetch) {\n $this->setErrorMessage();\n echo $this->dbError;\n return false;\n } else {\n return $resFetch;\n }\n }", "title": "" }, { "docid": "d3fff8de33fabad34c6d462447645ce8", "score": "0.63698447", "text": "public function fetch()\n {\n $serviceId = $this->_productId;\n $table = $this->getTable();\n $select = $table->select();\n $select->where('product_id = ?', $serviceId);\n $result = $table->fetchRow($select);\n return $result;\n }", "title": "" }, { "docid": "4af35b9bd0cf3baaf5229692d186005a", "score": "0.6366414", "text": "public function itemToObject($row){\n $hotelInfoObject = new HotelInfo($row['HotelId'], $row['Name'], $row['TelNr'], $row['Url'], $row['Preis'], $row['Stichwort'], $row['AnzZimmer']); \n // var_dump($hotelInfoObject); \n return $hotelInfoObject; \n \n }", "title": "" }, { "docid": "0439100781901f2ff376d99335d805b1", "score": "0.63559157", "text": "public function fetch()\n\t{\n\t\treturn $this->data = $this->ds->fetchAll();\n\t}", "title": "" }, { "docid": "e87cd0fa3b43c5b14f77e29761fa5c30", "score": "0.63498294", "text": "function fetchRow() \n { \n return mysql_fetch_array($this->lastResult); \n }", "title": "" }, { "docid": "ce1f5a9a09c7bca102592364c3ffad70", "score": "0.63434696", "text": "public function getRow($resultmode=PDO::FETCH_ASSOC) \r\n { \r\n if (!$this->statement)\r\n $this->statement = $this->prepare(); \r\n $this->statement->execute();\r\n $row = array();\r\n $row = $this->statement->fetch($resultmode);\r\n // Ef_Log::log ($row,'row');\r\n return $row;\r\n }", "title": "" }, { "docid": "e3ce0c9b0a06f583664b5ec494bec1c8", "score": "0.63414466", "text": "public function fetchObject() {\n return $this->cursor->getNext();\n }", "title": "" }, { "docid": "eb0c3f3fcfddb9ba062f44b3fd2381dd", "score": "0.6337306", "text": "function rs_fetch_record(&$rs) {\n global $CFG;\n\n if (!$rs) {\n debugging('Incorrect $rs used!', DEBUG_DEVELOPER);\n return false;\n }\n\n $rec = $rs->FetchObj(); //Retrieve record as object without advance the pointer\n\n if ($rs->EOF) { //FetchObj requires manual checking of EOF to detect if it's the last record\n $rec = false;\n } else {\n /// DIRTY HACK to retrieve all the ' ' (1 space) fields converted back\n /// to '' (empty string) for Oracle. It's the only way to work with\n /// all those NOT NULL DEFAULT '' fields until we definetively delete them\n if ($CFG->dbfamily == 'oracle') {\n $recarr = (array)$rec; /// Cast to array\n array_walk($recarr, 'onespace2empty');\n $rec = (object)$recarr;/// Cast back to object\n }\n /// End DIRTY HACK\n }\n\n return $rec;\n}", "title": "" }, { "docid": "793731cd92fc605dc60469c73a2551ed", "score": "0.6335422", "text": "public function fetchObject (string $sql, $params=[]) {\r\n $stmt = $this->prepareStatement($sql, $params);\r\n $rows = array();\r\n if ($stmt) {\r\n $stmt->execute();\r\n $result = $stmt->get_result();\r\n if ($result) {\r\n while ($row = $result->fetch_object()) {\r\n $rows[] = $row;\r\n }\r\n $result->free();\r\n }\r\n }\r\n return $rows;\r\n }", "title": "" }, { "docid": "9fd7ab974e4722c77be15654ca2880f1", "score": "0.63340557", "text": "protected function _fetch()\n {\n // store the current query resource \n $oldId = $this->getDb()->getQueryId();\n \n // set our own query resource in the database driver so we can use\n // the atkDb::next_record() method and retrieve the new record\n $this->getDb()->setQueryId($this->m_resource);\n $this->getDb()->next_record();\n $row = $this->getDb()->m_record;\n \n // restore the old query resource\n $this->getDb()->setQueryId($oldId);\n \n return $row;\n }", "title": "" }, { "docid": "13be5f02cef23bae6055ef13d1503666", "score": "0.6328615", "text": "public function row( $query, $params = null, $fetchmode = PDO::FETCH_ASSOC )\n {\n $this->Init( $query, $params );\n return $this->sqlQuery->fetch( $fetchmode );\n }", "title": "" }, { "docid": "f194c22bcd45944d17cb29a89ed00ab6", "score": "0.63267565", "text": "private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }", "title": "" }, { "docid": "f194c22bcd45944d17cb29a89ed00ab6", "score": "0.63267565", "text": "private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }", "title": "" }, { "docid": "f194c22bcd45944d17cb29a89ed00ab6", "score": "0.63267565", "text": "private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }", "title": "" } ]
bf9f5fc07602775d17723a3ce77467e9
calculate the days of current week
[ { "docid": "2f2e9133cc355b40b1c90d011d169ebd", "score": "0.68500435", "text": "public static function get_week_days() {\n $result = [];\n $day_of_week = date('N');\n $now = time();\n $day_of_week = $now - (static::OneDay * $day_of_week);\n\n for ($i=0 ; $i<7 ; $i++) {\n $day_of_week += static::OneDay;\n $result[] = [\"day_of_week\" => date(\"l\", $day_of_week),\"day\" => date('d', $day_of_week), \"month\" => date('F', $day_of_week), \"date\" => date(\"Y-m-d\", $day_of_week)];\n }\n return $result;\n }", "title": "" } ]
[ { "docid": "a9e625e6660dcdb9fc9a28a9e9ba75e9", "score": "0.761117", "text": "public function getSumOfWeekDays()\n { \n $weekDays = 0;\n foreach($this->days as $day){\n $day = strtolower($day);\n if ($day != \"sat\" || $day != \"sun\"){\n $weekDays++;\n } \n }\n return $weekDays;\n }", "title": "" }, { "docid": "aa7e8d4a5c01651ad6b11db0fe5d837d", "score": "0.7576239", "text": "protected function getWeekDays()\r\n\t{\r\n\t\treturn AdFox::getConstants('DAY_', static::class);\r\n\t}", "title": "" }, { "docid": "38a6be2747835ae22ce839e89a14234f", "score": "0.72816193", "text": "public function getSumOfWeekendDays()\n { \n $weekendDays = 0;\n foreach($this->days as $day){\n $day = strtolower($day);\n if ($day == \"sat\" || $day == \"sun\"){\n $weekendDays++;\n } \n }\n return $weekendDays;\n }", "title": "" }, { "docid": "d1ab11acd5fde6b96027d0bb429ec2b1", "score": "0.71576136", "text": "public function getWeekDay() {\n\t\n\t\treturn $this->dateArray[\"wday\"];\n\t\n\t}", "title": "" }, { "docid": "96fb95a9d3df01e4d59c6c56109ad286", "score": "0.709597", "text": "function getWeekday() {\n return array_var($this->date_data, 'wday');\n }", "title": "" }, { "docid": "d2f5ac4cd54bce8cbfc1135b5e5298e9", "score": "0.7094398", "text": "public function weekDays()\n {\n $day = 60*60*24;\n $weekDays = \"[\";\n for ($i=0;$i<7;$i++){\n $dayTime = time()-($day*$i);\n $weekDays .= '\"'.date('l', $dayTime).'\",'; \n }\n $weekDays = rtrim($weekDays, \",\").\"]\";\n return $weekDays;\n }", "title": "" }, { "docid": "547cf53611db0e8d5b31d44224926da8", "score": "0.7059245", "text": "public function getWeekDays()\n {\n return $this->weekDays;\n }", "title": "" }, { "docid": "547cf53611db0e8d5b31d44224926da8", "score": "0.7059245", "text": "public function getWeekDays()\n {\n return $this->weekDays;\n }", "title": "" }, { "docid": "547cf53611db0e8d5b31d44224926da8", "score": "0.7059245", "text": "public function getWeekDays()\n {\n return $this->weekDays;\n }", "title": "" }, { "docid": "97f915dd7587b83961114c80a466a267", "score": "0.70183325", "text": "public function wednesdays()\n {\n return $this->days(3);\n }", "title": "" }, { "docid": "4820bde14026e2f59b14ac97b03846e2", "score": "0.70159024", "text": "public function getWeekDay()\n {\n return (int)$this->date->format('N');\n }", "title": "" }, { "docid": "3582b18d03b68fc2a73a07ac7c5300b5", "score": "0.69914687", "text": "public static function getDayWeek()\n {\n return self::$dayOfWeek;\n }", "title": "" }, { "docid": "3d5db4bcd387b70810ff9fe0045dacc5", "score": "0.69036996", "text": "private function calc_day()\n\t{\n\t\t\t\tif((($this->cal_week_add + 2) - $this->cal_first) > 0)\n\t\t\t\t\treturn ((($this->cal_week_add + 1) - $this->cal_first) % $this->cal_cur_month) + 1;\n\t\t\t\telse\n\t\t\t\t\treturn $this->cal_pre_month + (($this->cal_week_add + 2) - $this->cal_first);\n\t}", "title": "" }, { "docid": "81a441ba89859d711085be349d137e85", "score": "0.6894379", "text": "public function addWeekday();", "title": "" }, { "docid": "68b02fe7e9e91b1b14b3a1fcf78f046f", "score": "0.68899524", "text": "public function wednesdays()\n {\n return $this->days(Schedule::WEDNESDAY);\n }", "title": "" }, { "docid": "78bedf537763af6491ec676b80c988ba", "score": "0.6772702", "text": "public function getWeekDay()\n {\n return (int)(clone $this->dateTime)->format('N');\n }", "title": "" }, { "docid": "4b1462f6779babd359002149ba8d5125", "score": "0.6766819", "text": "public function getDaysOfWeek()\n {\n return $this->daysOfWeek;\n }", "title": "" }, { "docid": "f1e31961bcbf4aa55492d182ec20233f", "score": "0.676648", "text": "public function weekCalculator($calf_id)\n {\n $today_date=date(\"m/d/Y\");\n $calf=$this->calfRecord($calf_id)[3];\n $calf_dob=date(\"m/d/Y\",strtotime($calf));\n\n\n $today_date = (string)$today_date;\n\n $today_f=DateTime::createFromFormat('m/d/Y',$today_date);\n $dob_f=DateTime::createFromFormat('m/d/Y',$calf_dob);\n\n return floor($today_f->diff($dob_f)->days/7);\n\n\n }", "title": "" }, { "docid": "2b2238c8fb2682ba3d787ae7a29ed5bd", "score": "0.67534876", "text": "function getCurrentWeek()\n {\n $value_format = \"Y-m-d\";\n $start = date(\"U\") - (self::DAY * (date(\"w\") - 1));\n return date($value_format, $start) . \"_\" . date($value_format, ($start + (Date_Helper::DAY * 6)));\n }", "title": "" }, { "docid": "f2de66ad82bb971a2c4c3209e9136d5c", "score": "0.6732203", "text": "function sumWeekCount($today) {\n\t\t$i = 0;\n\t\t$sum = 0;\n\t\t$_today = explode(\"/\", $today);\n\t\t$day = $_today[1];\n\t\t$month = $_today[0];\n\t\t$year = $_today[2];\n\t\t$todayjd = cal_to_jd(CAL_GREGORIAN, $month, $day, $year);\n\t\t\n\t\twhile (true) {\n\t\t\t$i++;\n\t\t\t$before = cal_from_jd($todayjd, CAL_GREGORIAN);\n\t\t\t$query = \"SELECT * FROM autotwitt WHERE day = '\".$before['date'].\"'\";\n\t\t\t$db = Mage::getSingleton('core/resource')->getConnection('core_read');\n\t\t\t$rs = $db->fetchAll($query);\n\t\t\tif ($rs == null || $i == 7) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t$dayCount = $rs[0]['count'];\n\t\t\t\t$sum += $dayCount;\n\t\t\t\t$todayjd--;\n\t\t\t}\n\t\t}\n\t\treturn $sum;\n\t}", "title": "" }, { "docid": "39c12ec9860a98ab9eff61ca2bc86665", "score": "0.66816914", "text": "function getDaysOfWeek()\n {\n return $this->daysOfWeek;\n }", "title": "" }, { "docid": "ce0bc0d9ba1f125b819aab83f2c8d17f", "score": "0.6679157", "text": "public function getWeekDay()\n {\n $engWeekDay = $this->dateTime->format('l');\n\n return $this->weekDays[$engWeekDay];\n }", "title": "" }, { "docid": "59111bacd907fb9edf8566d2cf2643ca", "score": "0.6674324", "text": "public function saturdays()\n {\n return $this->days(6);\n }", "title": "" }, { "docid": "b4c71ffe4ebbc15e2a2d0e29ff219524", "score": "0.6619119", "text": "public function subWeekday();", "title": "" }, { "docid": "97aa7c25924cad3675fc8a68cf226316", "score": "0.6581607", "text": "public function weekdays()\n {\n return $this->days(Schedule::MONDAY.'-'.Schedule::FRIDAY);\n }", "title": "" }, { "docid": "79dd21df8452e20e2370e2c9bb7d6e0b", "score": "0.65512884", "text": "function dayofweek($selecteddate)//accept date in YYYY-MM-DD format\r\n\t\r\n\t{\r\n\t\r\n\t\t$dayofweek = array('mdays','mday','wday');\r\n\t\r\n\t\tlist($y,$m,$d) = explode(\"-\",$selecteddate);\r\n\t\r\n\t\t$dayofweek[mdays] = $mdays=date(\"t\",mktime(0,0,0,$m,1,$y)); //days in the current month\r\n\t\r\n\t\t$dayofweek[mday] = date('w',mktime(0,0,0,$m,1,$y)); // day of the week the month started with\r\n\t\r\n\t\t$dayofweek[wday] = ($d+$first_day-1)%7;\r\n\t\r\n\t\treturn $dayofweek;\r\n\t\r\n\t}", "title": "" }, { "docid": "68c8f3c255a7743010b4f4ead79dd5f9", "score": "0.65269715", "text": "#[Pure] public function getDaysWeek(): array\n {\n return $this->week->getDays()->all();\n }", "title": "" }, { "docid": "7fb02ca68e655995133c64082971f9aa", "score": "0.652394", "text": "function getWorkedDays(){\n $day_number = date(\"d\");\n //echo date('Y-m-d H:i:s') ;\n //echo date('d-m-Y');\n $arWasHolidays = array();\n //узнаем как много праздников и выходных уже прошло на текущий день\n foreach ($this->arHolidays as $holiday) {\n if ($holiday <= $day_number) $arWasHolidays[] = $holiday;\n }\n return ($day_number - count($arWasHolidays));\n }", "title": "" }, { "docid": "d075ab745f9e0eb198a5e0415da56963", "score": "0.65028024", "text": "public function getWeeks(){\n $start = $this->getStartingDay();\n $end = clone $start;\n $end->modify('+1 month -1day');\n $startWeek=intval($start->format('W'));\n $endWeek= intval($end->format('W'));\n if($endWeek===1){\n $endWeek = clone $end;\n $endWeek = intval($endWeek->modify('- 7 days')->format('W')) + 1;\n }\n $weeks = $endWeek - $startWeek + 1;\n if($weeks < 0){\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }", "title": "" }, { "docid": "bf4416fcc23cce98d4858740ba7fce8d", "score": "0.6459201", "text": "public function daysOfWeek()\n {\n $days = explode(',', $this->daysOfWeek);\n if ($days[0] === '*') {\n return $this->returnFrame('day of the week');\n }\n if ($this->isRecurring($days[0])) {\n return [];\n }\n if ($this->isRange($days[0])) {\n return $this->returnFrame('days of the week', $days[0]);\n }\n return array_map(function ($day) {\n return $this->dayMapping[$day];\n }, $days);\n }", "title": "" }, { "docid": "f2f3e406721325c7835e63f04ee83cad", "score": "0.6454439", "text": "public function isWeekday();", "title": "" }, { "docid": "dc4823f5b6c5e8dfcd82e2974f51600e", "score": "0.64422923", "text": "public function sundays()\n {\n return $this->days(0);\n }", "title": "" }, { "docid": "b611f0cb9637504eab70330a10c73008", "score": "0.64374477", "text": "public function getWeeks(): int {\n\n$start=$this->getStartingDay(); /*format date début du mois*/\n$end= (clone $start)->modify('+1 month -1 day');/*date de fin du mois-> modification de la copie de $start */\nif($this->month==12){ /*tjr 31 jours en decembre*/\n$weeks= 6;/* 4 weeks and 2 days*/\n}else{\n$weeks= intval($end->format('W'))- intval($start->format('W'))+1;/*nbr de semaine ds ce mois*/\n}\n/* format('W'): Numéro de semaine dans l'année Exemple : 42 (la 42ème semaine de l'année)*/\n\n\nif($weeks<0){/*dans le cas de janvier (1er mois de l'annee)*/\n $weeks=intval($end->format('W'));// exemple ($end= la 5ème semaine de l'année et du mois de janvier)\n }\n\n\nreturn $weeks;\n}", "title": "" }, { "docid": "76cae861b1bf2117de45d61a6efbe8ae", "score": "0.642669", "text": "public function mondays()\n {\n return $this->days(1);\n }", "title": "" }, { "docid": "03612a6307bf7df5b2cd1cc0bf7604dc", "score": "0.6418784", "text": "public function getDayOfTheWeek() : DayOfWeek\n {\n return new DayOfWeek((int)$this->dateTime->format('N'));\n }", "title": "" }, { "docid": "6702d3e5d7d6aefad5a98abd4c61d5de", "score": "0.64037085", "text": "function getDefaultWeekday()\n {\n return APP_DEFAULT_WEEKDAY;\n }", "title": "" }, { "docid": "1ee34e06630e1d06c53603c85ff22f11", "score": "0.6401438", "text": "public function addWeekdays($value);", "title": "" }, { "docid": "4069c0056d8a861477d5e1edfbada61c", "score": "0.6383774", "text": "function week_day($dif) {\n $jd = cal_to_jd(CAL_GREGORIAN, date(\"m\"), date(\"d\", strtotime($dif)), date(\"Y\"));\n $day = jddayofweek($jd, 1);\n return $day;\n}", "title": "" }, { "docid": "c7ef58a0d02c8150c3215dc344b22006", "score": "0.63776153", "text": "public function WeekDay($fecha){ \t\n\t$fecha=str_replace(\"/\",\"-\",$fecha);\n\tlist($dia,$mes,$anio)=explode(\"-\",$fecha);\n\treturn (((mktime ( 0, 0, 0, $mes, $dia, $anio) - mktime ( 0, 0, 0, 7, 17, 2006))/(60*60*24))+700000) % 7;\n}", "title": "" }, { "docid": "b9a19fe1b4698bb6d47cf8e3f4f6075a", "score": "0.63658124", "text": "function getDayOfWeek()\n {\n return $this->_dayNameToDayNum( strftime( '%a' , $this->timeStamp) );\n }", "title": "" }, { "docid": "72a82abf1fbf49cf39ab3801b02bad89", "score": "0.63610774", "text": "public function subWeekdays($value);", "title": "" }, { "docid": "ecf1ebab8e19c7a395a3b16a331b6c5a", "score": "0.635277", "text": "public function getServiceDayOfWeek()\n {\n //for use in converting to days of week\n $day = date('l',\n mktime($this->_serviceDate['hour'],\n $this->_serviceDate['minute'],\n $this->_serviceDate['second'],\n $this->_serviceDate['month'],\n $this->_serviceDate['day'],\n $this->_serviceDate['year']));\n return $day;\n }", "title": "" }, { "docid": "8cfeacbbacc820d5f38c55c66f12981d", "score": "0.63117033", "text": "function api_get_week_days_short($language = null) {\n $days = &_api_get_day_month_names($language);\n return $days['days_short'];\n}", "title": "" }, { "docid": "14623ea3a70f0b4d698059ba59cd739f", "score": "0.6306058", "text": "public function getWeekDays() {\n $day_array = [];\n\n array_push($day_array, $this->getWeekStartDate());\n array_push($day_array, date('Y-m-d', strtotime('next tuesday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next wednesday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next thursday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next friday', strtotime($this->getWeekStartDate()))));\n\n return $day_array;\n }", "title": "" }, { "docid": "092c2c6da27476558e1763c14efb3461", "score": "0.63043976", "text": "public function getShortWeekDays()\n {\n return $this->shortWeekDays;\n }", "title": "" }, { "docid": "053aa1297abc3e1f211a8b1aab91998f", "score": "0.62934226", "text": "function firstDayOfWeek()\n {\n $currentWeek = new DateTime();\n $curDate = date_format($currentWeek, \"Y-m-d\");\n $time = new DateTime($curDate);\n //echo $time->format(\"Y-m-d\") . \"\\n\";\n // number of day\n $day = date('w');\n $time->sub(new DateInterval('P' . $day . 'D'));\n return $time->format(\"Y-m-d\");\n }", "title": "" }, { "docid": "f2a7a0c95801bb147b8b462f4c45a2fd", "score": "0.62911147", "text": "public function weekends()\n {\n return $this->days(Schedule::SATURDAY.','.Schedule::SUNDAY);\n }", "title": "" }, { "docid": "a282749b306ebb59e44e80e054439fa3", "score": "0.6252139", "text": "function getWeek() {\n return (integer) date('W', $this->getTimestamp());\n }", "title": "" }, { "docid": "57c233256816ec7a7814bd30c97db6d0", "score": "0.6235814", "text": "public function fridays()\n {\n return $this->days(Schedule::FRIDAY);\n }", "title": "" }, { "docid": "de9d05232ef1701b6c665e8394f6d225", "score": "0.6221336", "text": "public function offsetToMonday($date);", "title": "" }, { "docid": "c12dfab3da61c6e752609f057dec7f2d", "score": "0.6219177", "text": "function dateOfWeek($Ymd, $day) {\n\tglobal $week_start_day;\n\t//global $phpiCal_config;\n\t//config\n\n\t//fin config\n\n\t//if (isset($phpical_config->week_start_day)) $week_start_day = $phpiCal_config->week_start_day;\n\n\t$timestamp = strtotime($Ymd);\n\t$num = date('w', strtotime($week_start_day));\n\t$start_day_time = strtotime((date('w',$timestamp)==$num ? \"$week_start_day\" : \"last $week_start_day\"), $timestamp);\n\t$ret_unixtime = strtotime($day,$start_day_time);\n\t// Fix for 992744\n\t// $ret_unixtime = strtotime('+12 hours', $ret_unixtime);\n\t$ret_unixtime += (12 * 60 * 60);\n\t$ret = date('Y-m-d',$ret_unixtime);\n\treturn $ret;\n}", "title": "" }, { "docid": "63eba3690c13bfc6eec80c66b91ff05a", "score": "0.62177026", "text": "public function getDayOfWeek() {\n return $this->wday;\n }", "title": "" }, { "docid": "11c42c591bb5d21a64b1895a57a1ba3d", "score": "0.62173855", "text": "public function list_days_of_the_week($respect_start_of_week = true) {\n\t\tglobal $wp_locale;\n\t\t$days_of_the_week = array();\n\t\t$i = $j = $respect_start_of_week ? get_option('start_of_week', 1) : 1;\n\t\twhile ($i < $j+7) { // 7 days\n\t\t\t$days_of_the_week[] = array(\n\t\t\t\t'index' => $i % 7,\n\t\t\t\t'value' => $wp_locale->get_weekday($i % 7),\n\t\t\t);\n\t\t\t$i++;\n\t\t}\n\t\treturn $days_of_the_week;\n\t}", "title": "" }, { "docid": "fa0b4ff211fc037f74b4783773cc6edf", "score": "0.62117934", "text": "static function date_diff_weekdays($from, $to) {\n if ($from === null || $to === null)\n return null;\n $date_from = new \\DateTime($from);\n $date_to = new \\DateTime($to);\n // calculate number of weekdays from start of week - start date\n $from_day = intval($date_from->format('w')); // 0 (for Sunday) through 6 (for Saturday)\n if ($from_day == 0)\n $from_day = 7;\n $from_wdays = $from_day > 5 ? 5 : $from_day;\n // calculate number of weekdays from start of week - end date\n $to_day = intval($date_to->format('w'));\n if ($to_day == 0)\n $to_day = 7;\n $to_wdays = $to_day > 5 ? 5 : $to_day;\n // calculate number of days between the two dates\n $interval = $date_from->diff($date_to);\n $days = intval($interval->format('%R%a')); // shows negative values too\n // calculate number of full weeks between the two dates\n $weeks_between = floor($days / 7);\n if ($to_day >= $from_day)\n $weeks_between -= 1;\n // complete calculation of number of working days between\n $diff_wd = 5 * ($weeks_between) + (5 - $from_wdays) + $to_wdays;\n return $diff_wd;\n }", "title": "" }, { "docid": "a9e00589f133b84e2133734249ab2880", "score": "0.6210752", "text": "public function getAllThisWeek();", "title": "" }, { "docid": "039fa41fa80a1a23e178b0a7d1ff6763", "score": "0.62085694", "text": "public function getDayOfWeekIndex()\r\n\t{\r\n\t\t$dayOfWeek = strtolower(date(\"D\"));\r\n\t\t$offset = self::$days[$dayOfWeek];\r\n\t\treturn $offset;\r\n\t}", "title": "" }, { "docid": "4e080b6b74655513e1fbd2a465975dc7", "score": "0.62023205", "text": "public function getFirstWeekDay()\n {\n return (int)(new DateTime($this->date->format('Y-m-01')))->format('N');\n }", "title": "" }, { "docid": "21a287c2822fad8cfa1d6b74adf1c9ba", "score": "0.6173416", "text": "public static function dayWeeks($date){\r\n\t\t$date = self::convert($date, 'eua');\r\n\t\t\r\n\t\t$year = substr($date, 0, 4);\r\n\t\t$month = substr($date, 5, -3);\r\n\t\t$day = substr($date, 8, 9);\r\n\t\t$dayWeeks = date('w', mktime(0, 0, 0,$month, $day, $year));\r\n\t\treturn $dayWeeks + 1;\r\n\t}", "title": "" }, { "docid": "0be7f4706e82f8819335118614a9f127", "score": "0.61727613", "text": "function getDaysOffered() {\n global $connection;\n $query = \"SELECT * FROM DaysOfWeek ORDER BY sort\";\n\n $days = $connection->query($query);\n return $days;\n }", "title": "" }, { "docid": "fbbf3b8debdc46f05e84142c36e3acad", "score": "0.6172187", "text": "public function fridays()\n {\n return $this->days(5);\n }", "title": "" }, { "docid": "144b24bd4ee2ece7df8a4ba72ab5605d", "score": "0.61500466", "text": "public function addWeek();", "title": "" }, { "docid": "e2c7ae0b5ae242654e99b59c02416027", "score": "0.61492944", "text": "public function Weekday ( $iso = true )\n // zwischen 0 (f&uuml;r Sonntag) und 6 (f&uuml;r Samstag)\n {\n\n\t// static $ary_iso_weekday = array( 7, 1, 2, 3, 4, 5, 6 );\n\n\tif ( $iso ) {\n\n\t if ( $this->m_dow == self::DOW_SUNDAY ) return self::ISO_SUNDAY;\n\n\t}\n\n\n return $this->m_dow;\n\n }", "title": "" }, { "docid": "5654f9c90cc6e8a70e8fd988f53ef6be", "score": "0.61433715", "text": "public function weekDates()\n {\n $day = 60*60*24;\n $weekDates = array();\n for ($i=0;$i<7;$i++){\n $dayTime = time()-($day*$i);\n array_push($weekDates,date('Y-m-d',$dayTime));\n }\n return $weekDates;\n }", "title": "" }, { "docid": "3caeff2c3885335f3f2f5efd560ee901", "score": "0.61311173", "text": "function day_of_the_week( $old_date ){\n\t\t$new_date = $old_date . ', ' . date( 'l' );\n\t\treturn $new_date;\t\n\t}", "title": "" }, { "docid": "7f9b413e8eafc39eb9fee4c8044ff755", "score": "0.61144805", "text": "public function sundays()\n {\n return $this->days(Schedule::SUNDAY);\n }", "title": "" }, { "docid": "3d9a1f60cff64faa2a2cf99e36ea57d3", "score": "0.61101574", "text": "private function dayOfWeek()\n {\n return (new Hexpress())\n ->find(function ($hex) {\n $hex->either([\n $this->FWS(),\n (new Hexpress())->maybe($this->FWS())->has($this->dayName()),\n $this->obsDayOfWeek(),\n ]);\n }, 'dayOfWeek');\n }", "title": "" }, { "docid": "04167270ddef5e9a5d30b1754a87ea07", "score": "0.61006516", "text": "public function dayOfWeek($until = 'now'): string;", "title": "" }, { "docid": "4e5d5abf000f2abf23bafb0b6650c40c", "score": "0.6091511", "text": "public function getWeeks(): int{\n /* Explication de la logique :\n 1. A partir de la date du premier jour du mois,\n 2. on détermine le dernier jour du mois\n 3. le numéro de semaine de l'année du dernier jour du mois - le numéro de semaine de l'année du premier jour du mois = le nombre de semaines dans le mois\n */\n // 1. $start sera le jour 1 du mois et année passé en paramètre de la construct de l'objet\n $start = new \\DateTime(\"{$this->year}-{$this->month}-01\"); // \n // 2. $end sera le dernier jour du mois passé en param à la construct de l'objet (clone) permet de ne pas modifier le contenu de $start (seulement le cloner ponctuellement)\n $end = (clone $start)->modify('+1 month -1 day'); // méthode modify() (de DateTime) qui ajoute un mois - 1 jours à la date de départ\n \n //dump((clone $start)->modify('+1 month -1 day'));\n //dump($end->format('W'));\n \n\n $numberEnd = $end->format('W');\n\n // Condition pour les années à 52 semaines\n if($numberEnd == \"01\"){\n $end->modify('+360 day');\n }\n //dump(\"Start vaut : \" . $start->format('W'));\n //dump(\"numberEnd vaut : \" . $numberEnd . \" et end vaut cette fois : \" . $end->format('W'));\n \n // 3. $week sera le nb de semaine du mois (numéro de semaine de dernier jour - numéro de semaine du premier jour)\n $weeks = intval($end->format('W')) - intval($start->format('W')) + 1; // méthode format() va formater notre date en numéro de semaine ('W')\n\n //dump(intval($end->format('W')), intval($start->format('W'))); //Affiche le numéro de semaine de la date de fin du mois et le numéro de semaine de la date de début \n\n // Condition pour éviter les erreurs avec les jours du mois de janvier qui sont dans entre 2 numéro de semaine (fin d'année = s52 ou s53 début = s1)\n // $week retournera alors un nombre négatif, dans ce cas\n if($weeks < 0){\n // Alors le numéro de semaine sera égal au numéro de semaine du dernier jour du mois (simplement)\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }", "title": "" }, { "docid": "66b29f2dfb595f16091e2bb023cd0607", "score": "0.6083109", "text": "public function mapDayWeek($date)\n {\n\n return ($date)==6?1:$date+2;\n }", "title": "" }, { "docid": "d625135d9f3e484e29dbd941efa695e4", "score": "0.60801166", "text": "public function isWeekday()\n {\n return ($this->numeric(\"N\") <= Days::FRIDAY);\n }", "title": "" }, { "docid": "50a6e382a7e98f3811b1c361a4adc072", "score": "0.60778743", "text": "private function getDays()\n {\n $first_day_of_week = date('w', mktime(0, 0, 0, $this->month, 1, $this->year));\n $days_count = date('d', mktime(0, 0, 0, $this->month + 1, 0, $this->year));\n\n $days_of_week = $this->days_of_week;\n // Sunday can be set as either 0 or 7 in cron. For our purposes 0 is probably better\n if (isset($days_of_week[7])) {\n unset($days_of_week[7]);\n $days_of_week[0] = true;\n }\n\n $days_of_week_skipped = false;\n if (array_keys($days_of_week) === range(0, 6)) {\n $days_of_week = array();\n $days_of_week_skipped = true;\n }\n\n $days_of_month = $this->days_of_month;\n foreach ($days_of_month as $day => $_) {\n if ($day > $days_count || $day < 1) {\n unset($days_of_month[$day]);\n }\n }\n\n $days_of_month_skipped = false;\n if (array_keys($days_of_month) === range(1, $days_count)) {\n $days_of_month = array();\n $days_of_month_skipped = true;\n }\n\n if ($days_of_month_skipped && $days_of_week_skipped) {\n $result = array();\n for ($i = 1; $i <= $days_count; $i++) $result[$i] = true;\n return $result;\n }\n\n $result = $days_of_month;\n for ($i = 1; $i <= $days_count; $i++) {\n if (isset($days_of_week[($first_day_of_week + $i - 1) % 7])) {\n $result[$i] = true;\n }\n }\n\n ksort($result, SORT_NUMERIC);\n return $result;\n }", "title": "" }, { "docid": "07f7ebe976b5e47d4497c040828c8a7b", "score": "0.6069283", "text": "public static function DayOfWeeks($m,$d,$y)\n {\n $yo=$y-(14-$m)/12;\n\t echo($yo);\n\t\n\t$x=$yo+$yo/4-$yo/100+$yo/400;\n\techo($x);\n\t\n\t $mo= $m+12*((14-$m)/12)-2;\n\t echo($mo);\n\t\n\t$do1=(($d+$x+31*$mo)/12)% 7;\n\t echo($do1);\n }", "title": "" }, { "docid": "a24b09a37f8f741dc4d1f86e24ff5d9d", "score": "0.60682654", "text": "function weekStart($date) {\n\t\treturn \"(DATE_TRUNC('week', $date::DATE) - '1 days'::INTERVAL)::DATE\";\n\t}", "title": "" }, { "docid": "40d6ac109835404ed69b55ef1d14a7d8", "score": "0.60623515", "text": "private function weekDays()\n {\n $html = \"\";\n foreach ($this->weekDays as $day) {\n $html .= \"<th>\" . $day . \"</th>\";\n }\n return $html;\n }", "title": "" }, { "docid": "7bfa19d228b819429dd47b58f1f891b5", "score": "0.6061454", "text": "public function getWorkingDays($startDate,$endDate){\n\t //We add one to inlude both dates in the interval.\n\t $days = (strtotime($endDate) - strtotime($startDate)) / 86400 + 1;\n\n\t $no_full_weeks = floor($days / 7);\n\n\t $no_remaining_days = fmod($days, 7);\n\n\t //It will return 1 if it's Monday,.. ,7 for Sunday\n\t $the_first_day_of_week = date(\"N\",strtotime($startDate));\n\n\t $the_last_day_of_week = date(\"N\",strtotime($endDate));\n\t // echo $the_last_day_of_week;\n\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\t if ($the_first_day_of_week <= $the_last_day_of_week){\n\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\t }\n\n\t else{\n\t if ($the_first_day_of_week <= 6) {\n\t //In the case when the interval falls in two weeks, there will be a Sunday for sure\n\t $no_remaining_days--;\n\t }\n\t }\n\n\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\t\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\t $workingDays = $no_full_weeks * 5;\n\t if ($no_remaining_days > 0 )\n\t {\n\t $workingDays += $no_remaining_days;\n\t }\n\n\t //We subtract the holidays\n\t\t/* foreach($holidays as $holiday){\n\t $time_stamp=strtotime($holiday);\n\t //If the holiday doesn't fall in weekend\n\t if (strtotime($startDate) <= $time_stamp && $time_stamp <= strtotime($endDate) && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\t $workingDays--;\n\t }*/\n\n\t return $workingDays;\n\t}", "title": "" }, { "docid": "b40750486de14a751327eb832e4b5ad9", "score": "0.6057812", "text": "public function triggeringDays()\n {\n $days = '';\n if (\n $this->is_triggered_on_monday &&\n $this->is_triggered_on_tuesday &&\n $this->is_triggered_on_wednesday &&\n $this->is_triggered_on_thursday &&\n $this->is_triggered_on_friday &&\n $this->is_triggered_on_saturday &&\n $this->is_triggered_on_sunday\n ) {\n $days = 'all days';\n } else if (\n $this->is_triggered_on_monday &&\n $this->is_triggered_on_tuesday &&\n $this->is_triggered_on_wednesday &&\n $this->is_triggered_on_thursday &&\n $this->is_triggered_on_friday\n ) {\n $days = 'week days';\n } else if (\n $this->is_triggered_on_saturday &&\n $this->is_triggered_on_sunday\n ) {\n $days = 'weekend';\n } else {\n if ($this->is_triggered_on_monday) {\n $days.= 'Monday';\n }\n if ($this->is_triggered_on_tuesday) {\n $days.= ($days === '' ? '' : ', ') . 'Tuesday';\n }\n if ($this->is_triggered_on_wednesday) {\n $days.= ($days === '' ? '' : ', ') . 'Wednesday';\n }\n if ($this->is_triggered_on_thursday) {\n $days.= ($days === '' ? '' : ', ') . 'Thursday';\n }\n if ($this->is_triggered_on_friday) {\n $days.= ($days === '' ? '' : ', ') . 'Friday';\n }\n if ($this->is_triggered_on_saturday) {\n $days.= ($days === '' ? '' : ', ') . 'Saturday';\n }\n if ($this->is_triggered_on_sunday) {\n $days.= ($days === '' ? '' : ', ') . 'Sunday';\n }\n $search = ',';\n $replace = ' and';\n $days = strrev(implode(strrev($replace), explode(strrev($search), strrev($days), 2)));\n }\n return $days;\n }", "title": "" }, { "docid": "af812505707b21d4ce11bcd5cb6bb651", "score": "0.6050267", "text": "public function subWeek();", "title": "" }, { "docid": "0a1fd71091209ef3bcc8c81de17185bf", "score": "0.602822", "text": "function getWorkingDays($startDate, $endDate, $lamakerja){\n\t\t $begin=strtotime($startDate);\n\t\t $end=strtotime($endDate);\n\t\t if($begin>$end){\n\t\t echo \"<text style='color:red'>Tanggal start harus lebih kecil dari tanggal akhir!</text>\";\n\t\t return '';\n\t\t }else{\n\t\t $no_days=0;\n\t\t $weekends=0;\n\t\t while($begin<=$end){\n\t\t $no_days++; // no of days in the given interval\n\t\t $what_day=date(\"N\",$begin);\n\t\t if($what_day>$lamakerja) { // 6 and 7 are weekend days\n\t\t $weekends++;\n\t\t };\n\t\t $begin+=86400; // +1 day\n\t\t };\n\t\t $working_days=$no_days-$weekends;\n\t\t return $working_days;\n\t\t }\n\t\t}", "title": "" }, { "docid": "e6af67f9b34c20597d0c309e843e320a", "score": "0.60219663", "text": "public function saturdays()\n {\n return $this->days(Schedule::SATURDAY);\n }", "title": "" }, { "docid": "cdd3d6acc594ae5d5e95accf032c92d8", "score": "0.60212904", "text": "public function mondays()\n {\n return $this->days(Schedule::MONDAY);\n }", "title": "" }, { "docid": "f9288bd65ab21ad54e43c0c6f54b0b59", "score": "0.6009974", "text": "function jddayofweek ($julianday, $mode = null) {}", "title": "" }, { "docid": "1d8921a7fe15bc00a952babcb1ab99a0", "score": "0.6004401", "text": "function get_start_day_of_week(){\n\t\treturn $this->start_day_of_week;\n\t}", "title": "" }, { "docid": "02ec1759a3385af88b4d977a4852cf85", "score": "0.5996656", "text": "static public function Weekday($w, $short = false) {\r\n\t\tswitch ($w%7) {\r\n\t\t\tcase 0: return $short ? __('Sun') : __('Sunday');\r\n\t\t\tcase 1: return $short ? __('Mon') : __('Monday');\r\n\t\t\tcase 2: return $short ? __('Tue') : __('Tuesday');\r\n\t\t\tcase 3: return $short ? __('Wed') : __('Wednesday');\r\n\t\t\tcase 4: return $short ? __('Thu') : __('Thursday');\r\n\t\t\tcase 5: return $short ? __('Fri') : __('Friday');\r\n\t\t\tcase 6:\r\n\t\t\tdefault: return $short ? __('Sat') : __('Saturday');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cc5f9a6fe52e63cdc2121fc991a64680", "score": "0.5996038", "text": "public function all_day() : int\n\t{\n\t\treturn $this->_day_all;\n\t}", "title": "" }, { "docid": "df0095b4f487e9f3d2f29640daf17135", "score": "0.59850574", "text": "function getSchoolDays($start_date_token, $today_token){\n $count_days = 1;\n $new_num_days = 0;\n $last_day = $start_date_token;\n \n //Get Num Days\n $num_days = dateDifference($start_date_token, $today_token, '%a');\n \n //echo \"NUM DAYS $num_days\";\n \n //echo \"<br> START DAY $last_day\";\n //Weekends\n $weekends = array (\"Sat\", \"Sun\");\n \n while ($count_days <= $num_days){\n $next_day = add_date($last_day,1,0,0);\n $next_day_tokens = explode(\" \", $next_day);\n \n //echo \"<br> NEXT DAY $next_day\";\n \n $year = $next_day_tokens[2];\n $month_items = explode(\":\", $next_day_tokens[1]);\n $day_items = explode(\":\", $next_day_tokens[0]);\n $clock_items = explode(\":\", $next_day_tokens[3]);\n \n //Check Weekends\n if (in_array($day_items[0], $weekends)){\n //Do Nothing\n } elseif (isHoliday($next_day)) {//Check Holidays\n //Do Nothing\n } else {\n $new_num_days++;\n }\n\n $next_day = \"$year-$month_items[1]-$day_items[1]\";\n $last_day = $next_day;\n $count_days++;\n }\n \n //echo \"<br> NUM SCHOOL DAYS $new_num_days\";\n \n return $new_num_days;\n \n \n}", "title": "" }, { "docid": "936e27f125042d786dddb087049379d2", "score": "0.59795785", "text": "function getWorkingDays($startDate,$endDate,$holidays){\n\t $endDate = strtotime($endDate);\n\t $startDate = strtotime($startDate);\n\t\n\t\n\t //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\n\t //We add one to inlude both dates in the interval.\n\t $days = ($endDate - $startDate) / 86400 + 1;\n\t\n\t $no_full_weeks = floor($days / 7);\n\t $no_remaining_days = fmod($days, 7);\n\t\n\t //It will return 1 if it's Monday,.. ,7 for Sunday\n\t $the_first_day_of_week = date(\"N\", $startDate);\n\t $the_last_day_of_week = date(\"N\", $endDate);\n\t\n\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\t if ($the_first_day_of_week <= $the_last_day_of_week) {\n\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\t }\n\t else {\n\t // (edit by Tokes to fix an edge case where the start day was a Sunday\n\t // and the end day was NOT a Saturday)\n\t\n\t // the day of the week for start is later than the day of the week for end\n\t if ($the_first_day_of_week == 7) {\n\t // if the start date is a Sunday, then we definitely subtract 1 day\n\t $no_remaining_days--;\n\t\n\t if ($the_last_day_of_week == 6) {\n\t // if the end date is a Saturday, then we subtract another day\n\t $no_remaining_days--;\n\t }\n\t }\n\t else {\n\t // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\n\t // so we skip an entire weekend and subtract 2 days\n\t $no_remaining_days -= 2;\n\t }\n\t }\n\t\n\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\t $workingDays = $no_full_weeks * 5;\n\t if ($no_remaining_days > 0 )\n\t {\n\t $workingDays += $no_remaining_days;\n\t }\n\t\n\t //We subtract the holidays\n\t foreach($holidays as $holiday){\n\t $time_stamp=strtotime($holiday);\n\t //If the holiday doesn't fall in weekend\n\t if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\t $workingDays--;\n\t }\n\t\n\t return $workingDays;\n\t}", "title": "" }, { "docid": "0f61cae11d274cef88f151e62e0afef3", "score": "0.59783185", "text": "function weekday($fyear, $fmonth, $fday){\n\t return (((mktime ( 0, 0, 0, $fmonth, $fday, $fyear) - mktime ( 0, 0, 0, 7, 17, 2006))/(60*60*24))+700000) % 7;\n\t}", "title": "" }, { "docid": "310bac1cb41af5b55cc1b29c205f1185", "score": "0.59746337", "text": "public function getAllThisWeek()\n {\n $now = Carbon::today();\n $today = $now->toDateString();\n $last_sun = new Carbon('last sunday');\n $last_sunday = $last_sun->toDateString();\n\n return $this->admin->whereBetween('date_created', array($last_sunday, $today))->count();\n }", "title": "" }, { "docid": "a341aa8768273c47e8b72481a69a42a3", "score": "0.5972178", "text": "public function weekdays()\n {\n return $this->spliceIntoPosition(5, '1-5');\n }", "title": "" }, { "docid": "6848ad40b849d36f5aef34773b051bac", "score": "0.59563684", "text": "public static function getDayOfWeek($wdt) {\n\t\treturn floor($wdt/86400)%7;\n\t}", "title": "" }, { "docid": "9f030f2586f6c93e7cabe14cdd06def8", "score": "0.594983", "text": "public function startOfWeek();", "title": "" }, { "docid": "10406dab7d4d4e7ca1fc1b0a5ff3e562", "score": "0.59454536", "text": "public function getDayIndex ()\n\t{\n\t\treturn date(\"w\", $this->stamp);\n\t}", "title": "" }, { "docid": "9401c6c20574576ecd1c181d5f3f37f0", "score": "0.5934502", "text": "public function run()\n {\n $startDate = new Carbon();\n $startDate->setDate(1901, 1, 1);\n $endDate = new Carbon();\n $endDate->setDate(2000, 12, 31);\n $sundays = 0;\n while ($startDate->lt($endDate)) {\n if ($startDate->dayName === 'Sunday') {\n $sundays++;\n }\n $startDate->addMonthNoOverflow();\n }\n return $sundays;\n }", "title": "" }, { "docid": "182426db09665eb9373260e4130b15c0", "score": "0.59289515", "text": "public function getWeeks(): int\n {\n $start = $this->getFirstDay();\n $end = (clone $start)->modify('+1 month -1 day');\n $weeks = intval($end->format('W')) - intval($start->format('W')) + 1;\n if ($weeks < 0) {\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }", "title": "" }, { "docid": "b62cd8c3348e869117396648701601a8", "score": "0.5919392", "text": "public function convert_to_days(){\r\n\t\t// \t\t March 3, 2012 would extract 31+28+3 days...\r\n\r\n\t\t$days = 0;\r\n\t\tfor ($i=1; $i<$this->get_month(); $i++){\r\n\t\t\t$days += $this->check_how_many_days($i);\r\n\t\t} $days += $this->get_day();\r\n\r\n\t\treturn $days;\r\n\t}", "title": "" }, { "docid": "1e9efa926a414877efbe79e1840ed616", "score": "0.5913604", "text": "public function getWeekDay($index)\n {\n return $this->weekDays[$index];\n }", "title": "" }, { "docid": "46129cf419ddfcafc93fcbb7150d0e37", "score": "0.5895338", "text": "public function check_curent_week($given_date = null){\n\t\tdefine('LIMIT',8);\n\t\t$current_moday = date_create($given_date);\n\t\t$current_freeday = date_create($given_date);\n\n\t\t$current_day = date_format($current_moday, 'N');\n\n\t\tif($current_day < LIMIT){\n\n\t\t\tdate_sub($current_moday,date_interval_create_from_date_string(($current_day -1).\" days\"));\n\n\t\t\t date_add($current_freeday,date_interval_create_from_date_string((7- $current_day).\" days\"));\n\n\t\t\treturn [\n\t\t\t\t'monday' =>date_format($current_moday,'Y-m-d'), \n\t\t\t\t'sunday' => date_format($current_freeday,'Y-m-d') \n\t\t\t];\n\t\t}\n\n\t\t\n\n\t}", "title": "" }, { "docid": "1f97932e3870009b2b0be8d867b9e929", "score": "0.588033", "text": "public function testWeekDay()\n {\n $this->assertEquals(\n 7,\n $this->rules->weekDay()\n );\n }", "title": "" }, { "docid": "925d7437ef023159b0a2b915128cbd3e", "score": "0.5876152", "text": "function get_post_week($timestamp) {\n\t$current_semester = current_semester_load();\n\t$day_diff = day_diff($current_semester['Semester_Start_Date'],$timestamp);\n\treturn number_format(ceil($day_diff/7),0);\n}", "title": "" }, { "docid": "6d3c2a76f424e3035f6ceceae21cc2a1", "score": "0.58683795", "text": "function mkWeekDays()\r\n {\r\n $out = '';\r\n if ($this->startOnSun) {\r\n if ($this->mostrar_semanas) {\r\n\r\n $out .=\"<tr class=\\\"\".$this->cssWeekDay.\"\\\"><td>\".\"Sem\".\"</td>\";\r\n }\r\n $out.='<td>'.$this->getDayName(0).'</td>';\r\n $out.='<td>'.$this->getDayName(1).'</td>';\r\n $out.='<td>'.$this->getDayName(2).'</td>';\r\n $out.='<td>'.$this->getDayName(3).'</td>';\r\n $out.='<td>'.$this->getDayName(4).'</td>';\r\n $out.='<td>'.$this->getDayName(5).'</td>';\r\n $out.='<td>'.$this->getDayName(6).\"</td></tr>\\n\";\r\n } else {\r\n if ($this->mostrar_semanas) {\r\n $out .=\"<tr class=\\\"\".$this->cssWeekDay.\"\\\"><td>\".'Sem'.'</td>';\r\n //$out .=\"<tr style=\\\"\".'background-color:rgba(0,51,255,0.75);color:white;'.\"\\\"><td>\".'Sem'.'</td>';\r\n }\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(1).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(2).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(3).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(4).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(5).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(6).'</td>';\r\n $out.='<td style='.'background-color:rgba(0,51,255,0.75);color:white;border-collapse:groove;'.'>'.$this->getDayName(0).\"</td></tr>\\n\";\r\n $this->firstday=$this->firstday-1;\r\n if ($this->firstday<0) {\r\n $this->firstday=6;\r\n }\r\n }\r\n return $out;\r\n }", "title": "" } ]
a847b677426f9c472d3c122042eb15b3
Returns the entity initialiser.
[ { "docid": "7d6f00d8778c9adb58219bec182f0f31", "score": "0.8886914", "text": "public function getEntityInitialiser()\n {\n return $this->entityInitialiser;\n }", "title": "" } ]
[ { "docid": "4faee4b920040a24f82841f014ab4059", "score": "0.6247925", "text": "public function setEntityInitialiser($entityInitialiser)\n {\n if ($this->entityInitialiser != $entityInitialiser) {\n $this->entityInitialiser = $entityInitialiser;\n }\n }", "title": "" }, { "docid": "f44a3b806f94ae7dace6c6bed4c768f5", "score": "0.59009886", "text": "private function _entity()\n {\n return new Entity();\n }", "title": "" }, { "docid": "1be2a99c6f5a27042e5a6e25af11bcba", "score": "0.5762415", "text": "public function init()\n {\n $registry = Zend_Registry::getInstance();\n $this->_em = $registry->entitymanager;\n }", "title": "" }, { "docid": "95bcba338b409fbed9a5ed62b60ef150", "score": "0.5755717", "text": "public function setDefaultEntity() {\n /** @var Ultimate_ModuleCreator_Model_Entity $entity */\n $entity = Mage::getModel('modulecreator/entity');\n $settings = Mage::getStoreConfig(Ultimate_ModuleCreator_Helper_Data::XML_ENTITY_CONFIG_PATH);\n $entity->addData($settings);\n $this->setEntity($entity);\n return $this;\n }", "title": "" }, { "docid": "503f1529069c0bc4421bbd92aea7b652", "score": "0.56984323", "text": "public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'bksch_id' )\n\t\t\t->setEntityMapping( 'title', 'name' )\n\t\t\t->setEntityMapping( 'slug', 'slug' )\n\t\t\t->setEntityMapping( 'content', 'description' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "fdc292c2ae26bc5ade457463fe20ee2a", "score": "0.56298363", "text": "public static function __init() {\r\n\t\t\r\n\t\tif(!isset(static::$states[get_called_class()])) static::$states[get_called_class()] = new \\StdClass;\r\n\t\telse return;\r\n\t\t\r\n\t\t// Model should never be initialized.\r\n\t\tif(get_called_class() === __CLASS__) return;\r\n\t\t\r\n\t\t// Store the model name (sans namespace) in the metadata.\r\n\t\tstatic::p()->name = @end(explode('\\\\', static::getName()));\r\n\t\tstatic::p()->tableName = static::$tableName ?: Inflector::tableize(static::p()->name);\r\n\t\tstatic::p()->table = Table::instance(static::p()->tableName, static::getName());\r\n\t\tstatic::p()->validate = static::$validate ?: array();\r\n\t\t\r\n\t\tstatic::normalizeRelations();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "d13c1a866395e060fbe4120bbcf22365", "score": "0.5620942", "text": "public function createEntity()\n {\n return new $this->class;\n }", "title": "" }, { "docid": "3caa2563faeb1bcfff1b28cbc61a5670", "score": "0.55829537", "text": "public function init()\n {\n return $this;\n }", "title": "" }, { "docid": "25ba173449d4fab5d233ab6664d25239", "score": "0.552567", "text": "public function init() {\r\n return $this;\r\n }", "title": "" }, { "docid": "a52209c70a756f670b97409a86eb836e", "score": "0.54897344", "text": "private function createInitializer()\n {\n $initializer = new Initializer();\n\n $initializer->addTemplate('common', new CommonTemplate());\n $initializer->addTemplate('composer', new ComposerTemplate());\n\n return $initializer;\n }", "title": "" }, { "docid": "80d288fb7d300ad63da6c91acb7a554e", "score": "0.5473833", "text": "public function init() {\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "068f2fa06407c06c14f1fd7cc8833302", "score": "0.54643154", "text": "public function __construct() {\n $this->entityToArrayConverter = new EntityToArrayConverter();\n }", "title": "" }, { "docid": "59236cda1f888f9725d059cce9e3b636", "score": "0.54582876", "text": "public function init() {\n\t\treturn parent::init();\n\t}", "title": "" }, { "docid": "a21c51e4302fbc30d71c732d459fae8a", "score": "0.54452586", "text": "public function __construct() {\n $config = [\n 'name' => 'entityByPath',\n 'type' => new EntityInterfaceType(),\n 'args' => [\n 'path' => new NonNullType(new StringType()),\n ],\n ];\n\n parent::__construct($config);\n }", "title": "" }, { "docid": "70a2e8e643c79dc99f34fd65d8503fe7", "score": "0.54356295", "text": "public function getEntity()\n {\n $class = $this->entityName;\n return new $class();\n }", "title": "" }, { "docid": "333ba991e84bf5195bf4ae58df459fc5", "score": "0.5412148", "text": "public function testGetEntityCreatedBeforeInitialised()\n {\n $entityType = '\\AppserverIo\\Concurrency\\ExecutorService\\Entities\\Storage';\n ExS\\Core::init();\n ExS\\Core::newFromEntity($entityType, 'storage');\n $exSentity = ExS\\Core::getEntity('storage');\n $this->assertInstanceOf('\\AppserverIo\\Concurrency\\ExecutorService', $exSentity);\n }", "title": "" }, { "docid": "d54259d7189f6696bb16d8288ad31791", "score": "0.54053664", "text": "abstract protected function getInitializerInstance(Container $container);", "title": "" }, { "docid": "245539e3e8f32350eb801eaa607a9ea9", "score": "0.53866696", "text": "protected function _getEntityAdapter()\n {\n if (!$this->_entityAdapter) {\n if ($this->getEntity() === InriverImportHelper::INRIVER_ENTITY) {\n $entities = $this->_importConfig->getEntities();\n\n if (isset($entities[$this->getEntity()])) {\n try {\n $this->_entityAdapter = $this->_entityFactory->create($entities[$this->getEntity()]['model']);\n } catch (Throwable $e) {\n $this->_logger->critical($e);\n\n throw new LocalizedException(\n __('Please enter a correct entity model.')\n );\n }\n\n if (\n !$this->_entityAdapter instanceof AbstractEntity &&\n !$this->_entityAdapter instanceof ImportAbstractEntity\n ) {\n throw new LocalizedException(\n __(\n 'The entity adapter object must be an instance of %1 or %2.',\n AbstractEntity::class,\n ImportAbstractEntity::class\n )\n );\n }\n\n // Restore original import entity and mark import as an Inriver Import\n $this->setEntity(Product::ENTITY);\n $this->setData(InriverImportHelper::IS_INRIVER_IMPORT, true);\n\n // check for entity codes integrity\n if ($this->getEntity() !== $this->_entityAdapter->getEntityTypeCode()) {\n throw new LocalizedException(\n __('The input entity code is not equal to entity adapter code.')\n );\n }\n } else {\n throw new LocalizedException(__('Please enter a correct entity.'));\n }\n $this->_entityAdapter->setParameters($this->getData());\n } else {\n return parent::_getEntityAdapter();\n }\n }\n\n return $this->_entityAdapter;\n }", "title": "" }, { "docid": "3380b447bc64018a6d6c6b2ab170dae5", "score": "0.5352838", "text": "public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'point_id' )\n\t\t\t->setEntityMapping( 'title', 'point_id' )\n\t\t\t->setEntityMapping( 'point_event_id', 'pntevt_id' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "92fd2ceae8bf4f79504495bd9496037d", "score": "0.53274363", "text": "public static function init()\n {\n return parent::init(__CLASS__);\n }", "title": "" }, { "docid": "43d9d0ac790ec61005ce9f6156c259b6", "score": "0.5321826", "text": "public function __construct() \n {\n $df = new DoctrineFactory();\n $this->em = $df->getEntityManager();\n $this->init();\n }", "title": "" }, { "docid": "06ea4949f78264bdc11ea59ede49bc69", "score": "0.53181714", "text": "protected function _construct()\n {\n $this->_init('catalog_product_entity', 'entity_id');\n }", "title": "" }, { "docid": "e5e6130a889e5fd3f1179dc0c0a1e53f", "score": "0.52998036", "text": "public static function init()\n\t{\n\t\treturn parent::init(__CLASS__);\n\t}", "title": "" }, { "docid": "ba10cbe58c66e6845b3f402472cb481f", "score": "0.5295063", "text": "public function testGetEntityNotCreatedBeforeInitialised()\n {\n ExS\\Core::init();\n $entity = ExS\\Core::getEntity('storage');\n }", "title": "" }, { "docid": "b3951f3b7cb530521d8f3b7776b3a1fa", "score": "0.5279046", "text": "function __construct() {\n $bootstrap = new Bootstrap();\n \n $this->entityManager = $bootstrap->getEntityManager();\n }", "title": "" }, { "docid": "dc961c237d4cfc243b5b1bbe17bf61e1", "score": "0.5249374", "text": "static public function factory() {\n return new ContentFields_entity();\n }", "title": "" }, { "docid": "25a5159e735025b72f2a9ba2facee6f6", "score": "0.5233252", "text": "protected function setUpStorage() {\n $storage = $this->prophesize(EntityStorageInterface::class);\n\n $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);\n $entity_type_manager->getDefinition($this->entityType->id())->willReturn($this->entityType);\n $entity_type_manager->getStorage($this->entityType->id())->willReturn($storage->reveal());\n\n $this->entityForm->setEntityTypeManager($entity_type_manager->reveal());\n\n return $storage;\n }", "title": "" }, { "docid": "e72b87f0fe5acbcaea0101efd079a51b", "score": "0.5232298", "text": "function init() {/*{{{*/\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "637bcf5a0c11aeb66aad7e947dc6e317", "score": "0.52318406", "text": "public function makeInstanceOfEntity()\n {\n /** @var string|mixed|null $type **/\n $type = $this->getEntityType();\n\n return $this->makeInstanceByEntityType($type);\n }", "title": "" }, { "docid": "953a44c80475cc26a6c16152ee15442a", "score": "0.5229097", "text": "protected function getLexikFormFilter_Type_FilterEntityService()\n {\n return $this->services['lexik_form_filter.type.filter_entity'] = new \\Lexik\\Bundle\\FormFilterBundle\\Filter\\Form\\Type\\EntityFilterType(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\n }", "title": "" }, { "docid": "65af87564ab3ff25f84443755bd16731", "score": "0.5225737", "text": "protected function getInitObj()\n {\n $c = static::getModel();\n //if run page root direct\n if(!class_exists($c))\n {\n return null;\n }\n $obj = $c::getInitObj();\n //set pre filter\n $arr = static::getPageView();\n foreach($arr as $field=>$value)\n {\n $obj->{$field} = $value;\n }\n return $obj;\n }", "title": "" }, { "docid": "f44487b1b6e9f566e52f2c11cb85361c", "score": "0.5218947", "text": "public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"cliente_unidade\");\n $this->hasMany('id', 'Circuitos\\Models\\Circuitos', 'id_cliente_unidade', ['alias' => 'Circuitos']);\n $this->belongsTo('id_cliente', 'Circuitos\\Models\\Cliente', 'id', ['alias' => 'Cliente']);\n $this->hasOne('id_pessoa', 'Circuitos\\Models\\Pessoa', 'id', ['alias' => 'Pessoa']);\n }", "title": "" }, { "docid": "81535c647c8513eb1cf4137fe45a99de", "score": "0.5199346", "text": "public function __construct() {\n $entity_type_manager = \\Drupal::entityTypeManager();\n $this->storeStorage = $entity_type_manager->getStorage('commerce_store');\n }", "title": "" }, { "docid": "45a3f1ac8b3f2f49d118a144aaf1bdb3", "score": "0.5195393", "text": "public static function init(): self\n {\n return new self(new BulkRetrieveVendorsRequest());\n }", "title": "" }, { "docid": "56bede7abb6b60fccde8107647f9a027", "score": "0.51939857", "text": "public function getEntity()\n {\n if (!is_object($this->configuration['entity'])) {\n $entity = $this->configuration['entity'];\n $this->configuration['entity'] = new $entity;\n }\n return $this->configuration['entity'];\n }", "title": "" }, { "docid": "0dd05cf6974282f49bacc5a567bb0bd7", "score": "0.5174165", "text": "protected function _initialize()\n {\n $this->_object_name = strtolower(substr(get_class($this), 6));\n\n // Check if this model has already been initialized\n if ( ! $init = Arr::get(ORM::$_init_cache, $this->_object_name, FALSE))\n {\n $init = array(\n '_belongs_to' => array(),\n '_has_one' => array(),\n '_has_many' => array(),\n '_files' => array(),\n );\n\n // Set the object plural name if none predefined\n if ( ! isset($this->_object_plural))\n {\n $init['_object_plural'] = Inflector::plural($this->_object_name);\n }\n\n if ( ! $this->_errors_filename)\n {\n $init['_errors_filename'] = $this->_object_name;\n }\n\n if ( ! is_object($this->_db))\n {\n // Get database instance\n $init['_db'] = Database::instance($this->_db_group);\n }\n\n if (empty($this->_table_name))\n {\n // Table name is the same as the object name\n $init['_table_name'] = $this->_object_name;\n\n if ($this->_table_names_plural === TRUE)\n {\n // Make the table name plural\n $init['_table_name'] = Arr::get($init, '_object_plural', $this->_object_plural);\n }\n }\n\n $defaults = array();\n\n foreach ($this->_belongs_to as $alias => $details)\n {\n if ( ! isset($details['model']))\n {\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $alias)));\n }\n\n $defaults['foreign_key'] = $alias.$this->_foreign_key_suffix;\n\n $init['_belongs_to'][$alias] = array_merge($defaults, $details);\n }\n\n foreach ($this->_files as $alias)\n {\n $defaults['model'] = 'File';\n $defaults['foreign_key'] = 'file'.$this->_foreign_key_suffix;\n\n $init['_files'][$alias] = $defaults;\n }\n\n foreach ($this->_has_one as $alias => $details)\n {\n if ( ! isset($details['model']))\n {\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $alias)));\n }\n\n $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;\n\n $init['_has_one'][$alias] = array_merge($defaults, $details);\n }\n\n foreach ($this->_has_many as $alias => $details)\n {\n if ( ! isset($details['model']))\n {\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', Inflector::singular($alias))));\n }\n\n $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;\n $defaults['through'] = NULL;\n\n if ( ! isset($details['far_key']))\n {\n $defaults['far_key'] = Inflector::singular($alias).$this->_foreign_key_suffix;\n }\n\n $init['_has_many'][$alias] = array_merge($defaults, $details);\n }\n\n ORM::$_init_cache[$this->_object_name] = $init;\n }\n\n // Assign initialized properties to the current object\n foreach ($init as $property => $value)\n {\n $this->{$property} = $value;\n }\n\n // Load column information\n $this->reload_columns();\n\n // Clear initial model state\n $this->clear();\n }", "title": "" }, { "docid": "6b8df15de88b7f6243b4ca7ac89592cf", "score": "0.5172956", "text": "public function initialise()\n {\n\n }", "title": "" }, { "docid": "4f7d86ee01a21bdd7d18b865d07bd0de", "score": "0.51706976", "text": "public function __construct()\n\t{\n\t\t$this->entity = new Entity(array(\n\t\t\t'name' => 'constituency',\n\t\t\t'columns' => array('id', 'name', 'short_name', 'description', 'parliament_code', 'since', 'until'),\n\t\t\t'pkey_columns' => array('id'),\n\t\t\t'readonly_columns' => array('id')\n\t\t));\n\t}", "title": "" }, { "docid": "2a4d2310d89ed07872451bdce1d94dc1", "score": "0.51697457", "text": "public function init_model(){\n return new EditEntityPageModel($this);\n }", "title": "" }, { "docid": "a3a7a54649964a0731fbe30f6177918e", "score": "0.5157939", "text": "protected function _construct()\n {\n $this->_init('datta_storelocator/store', 'entity_id');\n }", "title": "" }, { "docid": "3a05f962a5e283b1c295dd0d7fbe23d3", "score": "0.5150345", "text": "public function __getInitializer(): void\n {\n }", "title": "" }, { "docid": "be1a3b419dad620f3ee3ec1c0d96d4f8", "score": "0.51468563", "text": "public function init()\n {\n\t\t$config = new Configuration();\n\t\t$config->setProxyDir(__DIR__ . '/Cache');\n\t\t$config->setProxyNamespace('Proxies');\n\t\t\n\t\t$config->setHydratorDir(__DIR__ . '/Cache');\n\t\t$config->setHydratorNamespace('Hydrators');\n\t\t\n\t\t$reader = new AnnotationReader();\n\t\t$reader->setDefaultAnnotationNamespace('Doctrine\\ODM\\MongoDB\\Mapping\\\\');\n\t\t$config->setMetadataDriverImpl(new AnnotationDriver($reader, __DIR__ . '/Documents'));\n\t\t\n\t\t$dm = DocumentManager::create(new Connection(), $config);\n\t\t\\Zend_Registry::set('dm', $dm);\n\t\treturn $dm;\n }", "title": "" }, { "docid": "27c288ea5fcd2a0e841cbfcd3e77466b", "score": "0.5141643", "text": "protected function init()\n {\n $this->checkDatabaseFile();\n\n $this->reader = new Reader(\n $this->getDatabasePath(),\n $this->getLocales()\n );\n }", "title": "" }, { "docid": "fdd43cbc1a8adf9b8531d98add493077", "score": "0.5135257", "text": "protected function init()\n {\n $this->evm = new EventManager();\n $config = new Configuration();\n\n // timestampable\n if (!empty($this->options['timestampable'])) {\n $this->addTimestampable();\n }\n // sluggable\n if (!empty($this->options['sluggable'])) {\n $this->addSluggable();\n }\n // tree\n if (!empty($this->options['tree'])) {\n $this->addTree();\n }\n // profile logger\n if (!empty($this->options['profile'])) {\n $config->setSQLLogger(new EchoSQLLogger());\n }\n\n $cache = new $this->config->cacheImplementation();\n $entityFolders = $this->getEntityFolders();\n $proxyFolder = $this->getProxyFolder();\n $driverImpl = $config->newDefaultAnnotationDriver($entityFolders);\n\n AnnotationReader::addGlobalIgnoredName('package_version');\n $annotationReader = new AnnotationReader;\n $cachedAnnotationReader = new \\Doctrine\\Common\\Annotations\\CachedReader(\n $annotationReader, // use reader\n $cache // and a cache driver\n );\n\n $annotationDriver = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver(\n $cachedAnnotationReader, // our cached annotation reader\n $entityFolders // paths to look in\n );\n\n $this->registerAutoloadNamespaces();\n\n $config->setMetadataDriverImpl($annotationDriver);\n $config->setMetadataCacheImpl($cache);\n $config->setQueryCacheImpl($cache);\n $config->setProxyDir($proxyFolder);\n $config->setProxyNamespace($this->config->proxy->namespace);\n $config->setAutoGenerateProxyClasses($this->config->autoGenerateProxyClasses);\n\n if ($this->config instanceof \\Zend_Config) {\n $connectionConfig = $this->config->connection->toArray();\n } else {\n $connectionConfig = (array) $this->config->connection;\n }\n\n if (true === $this->options['bibplatform']) {\n $connectionConfig['platform'] = new MysqlBibPlatform();\n }\n\n $this->em = EntityManager::create(\n $connectionConfig,\n $config,\n $this->evm\n );\n\n PersistentObject::setObjectManager($this->em);\n return;\n }", "title": "" }, { "docid": "a1386361a67df18f5793f5a7188c9c7a", "score": "0.5125127", "text": "public function createOffer()\n {\n $entityClass = 'MU\\\\YourCityModule\\\\Entity\\\\OfferEntity';\n\n $entity = new $entityClass();\n\n $this->entityInitialiser->initOffer($entity);\n\n return $entity;\n }", "title": "" }, { "docid": "bf3b2394289026f499a143aa7f094d9e", "score": "0.510911", "text": "public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"parametros\");\n $this->belongsTo('id_empresa', 'Circuitos\\Models\\Empresa', 'id', ['alias' => 'Empresa']);\n }", "title": "" }, { "docid": "9010a455c17612499e4ce888f45c0e37", "score": "0.5108983", "text": "protected function init()\n {\n /** @var EntityManager $em */\n $this->em = $this->getContainer()->get('doctrine.orm.default_entity_manager');\n $this->srcDir = realpath($this->getApplication()->getKernel()->getRootDir() . '/../src/') . '/';\n $this->translationRepository = $this->em->getRepository('TranslationsApiBundle:Translation');\n }", "title": "" }, { "docid": "df0ad7a2514cbb8a653aebac248080da", "score": "0.5093931", "text": "public function Flow_Persistence_LazyLoadingObject_initialize();", "title": "" }, { "docid": "a593bbf7928af5e0ed15dde7411dfdbc", "score": "0.5084243", "text": "protected function _initialize()\n {\n $this->metadata()->setTablename('faixa_salarial');\n $this->metadata()->setPackage('Model');\n \n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\n \n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true));\n $this->metadata()->addField('des', 'des', 'varchar', 45, array('notnull' => true));\n $this->metadata()->addField('minima', 'minima', 'int', 11, array('notnull' => true));\n $this->metadata()->addField('maxima', 'maxima', 'int', 11, array('notnull' => true));\n\n \n $this->metadata()->addRelation('empregos', Lumine_Metadata::ONE_TO_MANY, 'Emprego', 'faixaSalarialId', null, null, null);\n }", "title": "" }, { "docid": "ae8deb18f588e99c36c660be29009498", "score": "0.5079303", "text": "public static function init() {\n $class = get_called_class(); // late-static-bound class name\n if(!isset(self::$instance[$class])):\n self::$instance[$class] = new static;\n endif;\n return self::$instance[$class];\n }", "title": "" }, { "docid": "789bbd5b801a6c4bd971d92d8af64e3e", "score": "0.50696903", "text": "protected function _initInvitation()\n {\n $invitation = $this->_invitationFactory->create()->load($this->getRequest()->getParam('id'));\n if (!$invitation->getId()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('We can\\'t find this invitation.'));\n }\n $this->_coreRegistry->register('current_invitation', $invitation);\n\n return $invitation;\n }", "title": "" }, { "docid": "0cf5b9790fd6e20b94a817fb219e1ebb", "score": "0.5063087", "text": "protected function getDoctrine_Orm_ValidatorInitializerService()\n {\n return $this->services['doctrine.orm.validator_initializer'] = new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\n }", "title": "" }, { "docid": "6c6f98ea68902ffedda9b4592f540a49", "score": "0.5061051", "text": "public function init() {\n\t\t$class = __CLASS__;\n\t\tnew $class;\n\t}", "title": "" }, { "docid": "deb2858a0de43c5224459dde7e6024f4", "score": "0.50530446", "text": "public function getInstance()\n {\n if (! isset($this->instanceOfEntity)) {\n $this->instanceOfEntity = $this->makeInstanceOfEntity();\n }\n\n return $this->instanceOfEntity;\n }", "title": "" }, { "docid": "bbf937553905a4752ea1a89aee04f7c5", "score": "0.50526804", "text": "public function init()\n {\n $this->diseaseModel = new Application_Model_Disease();\n }", "title": "" }, { "docid": "3b779f615921715ac69a2de0deb2cc16", "score": "0.5045555", "text": "public function entity();", "title": "" }, { "docid": "220507f1b1a63a5f51ff3aab35024395", "score": "0.5033828", "text": "public function init()\n {\n return new Customer();\n }", "title": "" }, { "docid": "142276eb8cf0767eacff42aef85d7658", "score": "0.50301015", "text": "public function __construct()\n\t{\n\t $this->entity = new ConceptosViaje;\n\t}", "title": "" }, { "docid": "66d2238499e15d4e7fa4d3f0cf6e4bc1", "score": "0.50274193", "text": "public static function init()\n {\n return new self;\n }", "title": "" }, { "docid": "b08419bae3ca6dbcccc03cfa7099b5d1", "score": "0.5002865", "text": "abstract protected function __init(): object;", "title": "" }, { "docid": "ad172ff974799d017c433a4a1943b554", "score": "0.49913138", "text": "public function __construct()\n {\n parent::__construct(self::TABLESCHEMA, self::TABLESCHEMAID, SettingEntity::class);\n }", "title": "" }, { "docid": "d507bbf004e9d369cc81a6e631efec45", "score": "0.49890852", "text": "public function __construct()\n {\n $this->addFieldGetter(new FieldGetter());\n }", "title": "" }, { "docid": "d84667646031e3427cbf747f22239442", "score": "0.49874806", "text": "public function _construct()\n {\n $this->_init(ResourceModel::class);\n }", "title": "" }, { "docid": "6e6ed7fa0e4702f7976792bf26310d9a", "score": "0.49868178", "text": "public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'group_id' )\n\t\t\t->setEntityMapping( 'content', 'description' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4fcdce8f60dba3e03d48582cf1f85ed0", "score": "0.4986", "text": "public function testNewFromEntityFunctionNotInitialised()\n {\n ExS\\Core::newFromEntity('\\stdClass');\n }", "title": "" }, { "docid": "8d4857dd3d2c9e00f6a92e2328a064ee", "score": "0.49814633", "text": "protected function createEntity() {\n // Check our definition allows creation.\n $definition = $this->getPluginDefinition();\n if (!$definition['_allow_create']) {\n return FALSE;\n }\n\n // Check our config allows creation.\n $config = $this->getConfiguration();\n if (!$config['create']) {\n return FALSE;\n }\n\n // Build our values.\n $values = [];\n\n // If this entity type has bundles, set the appropriate key.\n if ($definition['_bundle_key']) {\n $values[$definition['_bundle_key']] = $config['create'];\n }\n\n // Create the entity.\n $entity = $this->entityTypeManager->getStorage($definition['_entity_type_id'])->create($values);\n\n // If this has an owner, set it.\n if ($entity instanceof EntityOwnerInterface) {\n $entity->setOwner($this->getContextValue('user'));\n }\n\n return $entity;\n }", "title": "" }, { "docid": "25363992eca2d5df0ffc274f86bd5690", "score": "0.49793258", "text": "public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->setEntityMapping( 'id', 'address_id' );\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c37349ba255e42ffa23ce46bc0d7d718", "score": "0.49785435", "text": "public function initialize(): Operation\n {\n return new $this->model([\n 'detail' => ''\n ]);\n }", "title": "" }, { "docid": "9188198659a8283ad09dc2df335034fe", "score": "0.49710032", "text": "public function getInitiatedBy(): ?Initiator {\n $val = $this->getBackingStore()->get('initiatedBy');\n if (is_null($val) || $val instanceof Initiator) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'initiatedBy'\");\n }", "title": "" }, { "docid": "9e8b121db9950aaf6bb5986e63bc2db5", "score": "0.49691898", "text": "public function initialize()\n {\n $this->hasOne('id', '\\Application\\Backend\\Entity\\CompanyRevenue', 'company_id', array(\n 'alias' => 'revenue',\n 'foreignKey' => true\n ));\n\n $this->addBehavior(new Sluggable());\n $this->addBehavior(new Timestampable());\n }", "title": "" }, { "docid": "52a1ce64927524d506c5cef408cb7864", "score": "0.4967504", "text": "protected function _construct()\r\n {\r\n $this->_init('Inchoo\\Recipe\\Model\\Post', 'Inchoo\\Recipe\\Model\\ResourceModel\\Post');\r\n }", "title": "" }, { "docid": "de06885377167c625a82c7fae514d33a", "score": "0.49671125", "text": "public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"usuario\");\n $this->hasMany('id', 'Circuitos\\Models\\Circuitos', 'id_usuario_criacao', ['alias' => 'Circuitos1']);\n $this->hasMany('id', 'Circuitos\\Models\\Circuitos', 'id_usuario_atualizacao', ['alias' => 'Circuitos2']);\n $this->hasMany('id', 'Circuitos\\Models\\Movimentos', 'id_usuario', ['alias' => 'Movimentos']);\n $this->hasOne('id_pessoa', 'Circuitos\\Models\\Pessoa', 'id', ['alias' => 'Pessoa']);\n $this->belongsTo('roles_name', 'Circuitos\\Models\\PhalconRoles', 'name', ['alias' => 'PhalconRoles']);\n }", "title": "" }, { "docid": "d62fd048e86b2cc6b1fee93d9dfa2a48", "score": "0.49548084", "text": "public function initialize()\n {\n // Return instance\n return $this;\n }", "title": "" }, { "docid": "83c7526cd90c54fa68e5aa59c09b792d", "score": "0.49541992", "text": "protected function getDoctrine_Orm_ValidatorInitializerService()\n {\n return $this->services['doctrine.orm.validator_initializer'] = new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer($this->get('doctrine'));\n }", "title": "" }, { "docid": "d630ed2ac18f2e9daba3e050cec846e1", "score": "0.49531916", "text": "public function __construct($entityManager)\n {\n }", "title": "" }, { "docid": "d0689928a63c0aa8e563c339c6ce8716", "score": "0.49487272", "text": "public function init()\n {\n $this->dbRole = new Admin_Model_DbTable_Acl_Role();\n $this->dbRoleMember = new Admin_Model_DbTable_Acl_RoleMember();\n $this->dbRoleInherit = new Admin_Model_DbTable_Acl_RoleInherit();\n $this->dbUser = new Admin_Model_DbTable_Users();\n $this->dbGroup = new Admin_Model_DbTable_Groups();\n }", "title": "" }, { "docid": "18fcc1c546eccbcb551af3e42e3f860b", "score": "0.49481788", "text": "public static function getInstallable()\n {\n return Factory::getInstallable();\n }", "title": "" }, { "docid": "c7b19c9490923870e6f6edcb53de8265", "score": "0.49440867", "text": "public function init()\n {\n\n // initialize the prepared statements\n $this->eavEntityTypeStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ENTITY_TYPES));\n $this->eavEntityTypeByEntityTypeACodeStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ENTITY_TYPE_BY_ENTITY_TYPE_CODE));\n }", "title": "" }, { "docid": "c0174e3108e0f4e20f11489b19f047a8", "score": "0.49386045", "text": "protected function initialise()\n { }", "title": "" }, { "docid": "6b2f2b75b948c0e64b37e60864e86c91", "score": "0.4938542", "text": "public function __construct()\n {\n $this->contact_list_entity = new ContactListEntity();\n }", "title": "" }, { "docid": "1ea1413f0ee8e865576e6d4846805e00", "score": "0.49321622", "text": "public function test_get_entity_factory() {\n $this->assertInstanceOf(\\mod_forum\\local\\factories\\entity::class, \\mod_forum\\local\\container::get_entity_factory());\n }", "title": "" }, { "docid": "f69eb0a65b6a728e712d960bb5187f80", "score": "0.4926309", "text": "public function __construct(){\r\n\t\t\r\n\t\t$datastore = config::get($this, 'datastore');\r\n\t\t\r\n\t\tif($datastore != ''){\r\n\t\t\t$this->datastore = $datastore;\r\n\t\t}\r\n\t\t\r\n\t\t$map = config::get($this, 'mapDbToObject');\r\n\t\tif(is_array($map)){\r\n\t\t\t$this->mapDbToObject = $map;\r\n\t\t}\r\n\t\t\r\n\t\tif($this->table == ''){\r\n\t\t\t$this->table = inflector::getSpecificfromcontext($this);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "eaad5f4356455ea85bf5cacb54036466", "score": "0.4924476", "text": "public static function init(): self\n {\n return new self(new InvoiceCustomField());\n }", "title": "" }, { "docid": "ef4c718f159dae03ea6f1f8bcc97e15a", "score": "0.49244297", "text": "function initialize2() {\n\t\t$entitydata = Vtiger_Functions::getEntityModuleInfo($this->name);\n\t\tif ($entitydata) {\n\t\t\t$this->basetable = $entitydata['tablename'];\n\t\t\t$this->basetableid=$entitydata['entityidfield'];\n\t\t}\n\t}", "title": "" }, { "docid": "b8c9ce69276c845881220ae685e4c08b", "score": "0.49158475", "text": "public function __construct()\n {\n $this->_factory = FactoryModel::getInstance();\n }", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.4914822", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.4914822", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.4914822", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.4914822", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.4914822", "text": "public function init() {}", "title": "" }, { "docid": "cbdbe53344b0020abde01018bf788775", "score": "0.49147215", "text": "public function __construct(public Entity $entity)\n {\n }", "title": "" }, { "docid": "85a3c2d88d273395f2e623dd458d01eb", "score": "0.49127203", "text": "public function __construct($entityTypeManager) {\n $this->entityTypeManager = $entityTypeManager;\n }", "title": "" }, { "docid": "ad089ba45a4eaed38bf8133bb35e2df5", "score": "0.49094406", "text": "public function _init(){}", "title": "" }, { "docid": "73b31739f6a250632821f8026130d86a", "score": "0.49068326", "text": "public function __construct()\n {\n parent::__construct(self::table, self::columns, self::entity_class_name);\n }", "title": "" }, { "docid": "683bb0f36ff26bc1bcef21bdec2ec1ff", "score": "0.49007004", "text": "public function initAsSpecimen()\n\t{\n\t\t$this->id = 0;\n\t\t\n\t\t$this->fk_operator = '';\n\t\t$this->fk_product = '';\n\t\t$this->type = '';\n\t\t$this->status = '';\n\t\t$this->comment = '';\n\n\t\t\n\t}", "title": "" }, { "docid": "339324d35c27767d8ca13b20bfbc1543", "score": "0.4898736", "text": "public function getCreator();", "title": "" }, { "docid": "339324d35c27767d8ca13b20bfbc1543", "score": "0.4898736", "text": "public function getCreator();", "title": "" }, { "docid": "bcd9327a50a77e1967b2c3ba48a7a7a8", "score": "0.48906136", "text": "public function __construct() {\r\n $this->setEntity('mst_questionnaire_review');\r\n }", "title": "" }, { "docid": "52dea5c5813d31ffc3a7fcc7bc508544", "score": "0.48902225", "text": "protected function _initForm()\n {\n $formId = $this->resolveFormId();\n $form = $this->_objectManager->create(\\BlueFormBuilder\\Core\\Model\\Form::class);\n\n if ($formId) {\n $form->load($formId);\n }\n\n $this->_objectManager->get(\\Magento\\Framework\\Registry::class)->register('form', $form);\n $this->_objectManager->get(\\Magento\\Framework\\Registry::class)->register('current_form', $form);\n return $form;\n }", "title": "" }, { "docid": "bf14095236a1885b30a3e95e0632dde9", "score": "0.4887439", "text": "protected function _init() {}", "title": "" } ]
92a80d22b673d62f8fb65e0f0cc5b1ad
instantiate and use the dompdf class
[ { "docid": "545823f2406f08860c52e8f5ce2b8c70", "score": "0.58312124", "text": "public static function generateByHtml(string $html) : void\n\t{\n\t\t$dompdf = new Dompdf();\n\n\t\t$dompdf->loadHtml($html);\n\n\t\t$dompdf->setPaper('A4', 'landscape');\n\n\t\t$dompdf->render();\n\n\t\t$dompdf->stream();\n\t}", "title": "" } ]
[ { "docid": "8b0a9736f570c12eb614dc2e480cbc84", "score": "0.7998106", "text": "public function dompdf()\n {\n $dompdf = new Dompdf();\n $dompdf->loadHtml(view('pages/dompdf'));\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'landscape');\n // Render the HTML as PDF\n $dompdf->render();\n // Output the generated PDF to Browser\n $dompdf->stream();\n }", "title": "" }, { "docid": "58b7656ce94e3e586a3fadf08700a747", "score": "0.78950465", "text": "function __getDOMPDFInstance() {\n\t\tglobal $PWD;\n\t\trequire_once $PWD . '/modules/dompdf/dompdf_config.inc.php';\n\t\treturn new DOMPDF();\n\t}", "title": "" }, { "docid": "8696dc6c83d69bf4d79c4cc723c8bd3c", "score": "0.6828937", "text": "function PDF_new(){}", "title": "" }, { "docid": "885204ea7cca84d6b32ac15252ed8e14", "score": "0.67274874", "text": "public function createpdf_fpdf(){\n \n $pdf = new Pdfdocument_fpdf();\n $pdf->generarPDF();\n }", "title": "" }, { "docid": "17d1d8cc9397d76d539c98217adfda72", "score": "0.66940546", "text": "function __construct()\n\t{\n\t\t$this -> fileManager = new FileManager();\n\t\t$this -> pdf = new DocumentPDF('P', 'mm', 'A4', true, 'UTF-8', false);\n\t\treturn;\n\t}", "title": "" }, { "docid": "e445ba63566504b41839ab49606298bb", "score": "0.6626917", "text": "public function load_view($view, $data = array())\n{\n $options = new Options();\n $options->set('isRemoteEnabled',TRUE); // temp folder with write permission\n\n $dompdf = new Dompdf($options);\n // $dompdf->setOptions($options);\n $html = $this->ci()->load->view($view, $data, TRUE);\n\n $dompdf->loadHtml($html);\n\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'portrait');\n\n // Render the HTML as PDF\n $dompdf->render();\n $time = time();\n\n // Output the generated PDF to Browser\n $dompdf->set_option('isHtml5ParserEnabled', true); \n //at runtime? It uses CSS2.1 stuff like margin: 4em 1em 4em 1em;\n $dompdf->stream(\"welcome-\". $time,array('Attachment'=>false));\n\n\n // $options = new Options();\n // $options->set('isRemoteEnabled',TRUE);\n // $dompdf = new Dompdf($options);\n // $html = $this->ci->load->view($view,$data,TRUE);\n // $canvas = $dompdf->get_canvas();\n // $dompdf->loadHtml($html);\n // $dompdf->setPaper($paper,$orientation);\n // $dompdf->render();\n // $dompdf->stream($filename.\".pdf\",array(\"Attachment\"=>FALSE));\n}", "title": "" }, { "docid": "2e4db3d54d38860c6355cc2f040a3e53", "score": "0.6484848", "text": "public function __construct()\n\t{\n\t\t//Get TCPDF library files\n\t\trequire_once(MW_CONST_STR_DIR_INSTALL.'libraries/tcpdf/config/lang/eng.php');\n\t\trequire_once(MW_CONST_STR_DIR_INSTALL.'libraries/tcpdf/tcpdf.php');\n\n\n\t\t// create new PDF document\n\t\tglobal $CMD;\n\t\t$Obj_Plugin = $CMD->plugin('xtcpdf');\n\t\t$Obj_Plugin->build();\n\t\t$this->Obj_Doc = $Obj_Plugin->Arr_Vars['Obj_Doc'];\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "23fba3d6d93f7e81356cb36be2bca9e2", "score": "0.6433821", "text": "public function pdf()\n {\n\n $pdf = \\App::make('dompdf.wrapper');\n $pdf = PDF::setOptions(['images' => true, 'defaultFont' => 'Arial',]); \n $pdf->loadHTML($this->convert_personnel_data_to_html()); // get all data and load into html format\n $pdf->setPaper('A4','landscape'); // paper orientation\n \n\n return $pdf->stream();\n\n }", "title": "" }, { "docid": "5b4a0a8aa6fdb364a9e25b2ad7ceb85b", "score": "0.6386767", "text": "public function pdf()\n {\n\n }", "title": "" }, { "docid": "6768a87c640778fe872ba38f041a4e48", "score": "0.6378899", "text": "function productos()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulProducto'] = $this->Pdf_model->getPdfproductos();\n \t\t\t$html= $this->load->view('pdf/productos', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "9f2f47172c43855f4a0dfed12c6902b5", "score": "0.6351662", "text": "function pdf_create($html, $filename, $stream=TRUE){\n$dompdf = new Dompdf();\n$dompdf->loadHtml($html);\n // (Optional) Setup the paper size and orientation\n$dompdf->setPaper('A4', 'portrait');\n \n \n// Render the HTML as PDF\n$dompdf->render();\n\n// Output the generated PDF to Browser\n$dompdf->stream($filename.\".pdf\");\n // $dompdf->stream($filename.\".pdf\");\n \n $pdf = $dompdf->output();\n$file_location = \"docs/\";\nfile_put_contents($file_location,$pdf); \n \n}", "title": "" }, { "docid": "a3916867ab063c13b0b7232e91081fbd", "score": "0.6350853", "text": "public function pdftest(){\n $old_pdf_url = 'http://www.orimi.com/pdf-test.pdf';\n $dompdf = new Dompdf();\n $dompdf->getOptions()->setIsRemoteEnabled(1 );\n $dompdf->loadHtmlFile( $old_pdf_url );\n $dompdf->setPaper('A4','landscape');\n $dompdf->render();\n $dompdf->stream();\n }", "title": "" }, { "docid": "3f264cc6ef9dc009533f17a6b9129358", "score": "0.6310585", "text": "function app_event_pdf_test_1($template, $values){\n $dompdf = new Dompdf();\n $dompdf->loadHtml('<h1>hello world</h1>');\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'landscape');\n // Render the HTML as PDF\n $dompdf->render();\n // Output the generated PDF to Browser\n //$dompdf->stream();\n //$dompdf->stream(\"dompdf_out.pdf\", array(\"Attachment\" => false));\n //exit(0);\n //$dompdf->output();\n //$dompdf->outputHtml();\n //$template->write($dompdf->output(),true);\n $x = '<iframe type=\"application/pdf\"\n width=\"95%\"\n height=\"95%\"\n src=\"data:application/pdf;\">\n Oops, you have no support for iframes.\n </iframe></p>';\n\n $y = '<embed width=\"600\" height=\"450\" src=\"?r=home&a=pdf&content='.base64_encode($dompdf->output()).'\" type=\"application/pdf\"></embed>';\n\n #or\n\n\n\n $template->write($y);\n //$template->write($x);\n}", "title": "" }, { "docid": "f8f06539fb854674bf1312a066fd8b00", "score": "0.62936413", "text": "function pdf_create($html, $filename = '', $stream = TRUE, $set_paper = '', $attach = null, $folder_name = null)\n{\n\t\t$_this = get_instance();\n\t\t\n\t\t$_this->load->library('Pdf');\n \t\t$_this->load->helper('language');\n\t\t$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);\n\t\t\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\t\t\n\t\t$lg = Array();\n\t\t$lg['a_meta_charset'] = 'UTF-8';\n\t\t$lg['a_meta_dir'] = 'rtl';\n\t\t$lg['a_meta_language'] = 'fa';\n\t\t$lg['w_page'] = 'page';\n\t\t\n\t\t$pdf->setLanguageArray($lg);\n\t\t\n\t\t$pdf->SetFont('aealarabiya', '', 12);\n\t\t\n\t\t$pdf->AddPage();\n\t\t\n\t\t$lng = $_this->admin_model->get_lang();\n\t\tif (!empty($lng) && $lng == 'arabic') {\n\t\t\t$pdf->setRTL(true);\n\t\t}else{\n\t\t\t$pdf->setRTL(false);\n\t\t}\n\t\t\n\t\t$pdf->SetFontSize(10);\n\t\t\n\t\t$pdf->WriteHTML($html, true, 0, true, 0);\n\t\t\n\t\t$pdf->Output(\"\" . $filename . \".pdf\", 'I');\n\n/* require_once(\"dompdf/dompdf_config.inc.php\");\n\n $dompdf = new DOMPDF();\n $dompdf->load_html($html);\n\n if ($set_paper != '') {\n $dompdf->set_paper(array(0, 0, 900, 841), 'portrait');\n } else {\n $dompdf->set_paper(\"a4\", \"landscape\");\n }\n $dompdf->render();\n if ($stream) {\n $pdf_string = $dompdf->output();\n if (!empty($attach)) {\n if (!empty($folder_name)) {\n $folder = \"uploads/\" . $folder_name . '/' . $filename . \".pdf\";;\n } else {\n $folder = \"uploads/\" . $filename . \".pdf\";;\n }\n file_put_contents($folder, $pdf_string);\n } else {\n $dompdf->stream($filename . \".pdf\");\n }\n } else {\n return $dompdf->output();\n }\n*/}", "title": "" }, { "docid": "aec7ac2243c97af7d362816d7414979b", "score": "0.62219006", "text": "function oportunidades_1()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\n\t\t\t$data['resulOportunidades1'] = $this->Pdf_model->getPdfoportunidades1(1);\n \t\t\t$html= $this->load->view('pdf/oportunidades1', $data, true);\n\n \t\t\t$Clientdata['resulClientes1'] = $this->Pdf_model->getPdfclientes1(1);\n \t\t\t$Clienthtml= $this->load->view('pdf/oportunidades1', $Clientdata, true);\n\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->load_html($Clienthtml);\n \t\t\t$this->mydompdf->set_paper('A4','landscape');\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "e8a70dec55816927c78fa6477ae05fe6", "score": "0.6180819", "text": "public function output() {\r\n\t\t$DomPDF = new DOMPDF();\r\n\t\t$DomPDF->set_paper($this->_Pdf->pageSize(), $this->_Pdf->orientation());\r\n\t\t$DomPDF->load_html($this->_Pdf->html());\r\n\t\t$DomPDF->render();\r\n\t\treturn $DomPDF->output();\r\n\t}", "title": "" }, { "docid": "79ba3da9ee5383afadd2e4602e664668", "score": "0.61624825", "text": "function generatePdf($id) {\n\n\n $prodajaModel = new Prodaja();\n $data = $prodajaModel->getDataForPdfDocument($id);\n// $this->loadPdfDocument('faktura', $data);\n $html = \"\";\n foreach ($data as $podatak) {\n $html .= \"Cena je: <h1>{$podatak->cena}</h1>, treba odraditi kompletan template fakture // Nisam imao vremena\";\n }\n $document = new Dompdf();\n $document->loadHtml($html);\n $document->setPaper('A4', 'portrait');\n $document->render();\n $document->stream(\"Faktura.pdf\", array(\"Attachment\" => 0));\n\n\n }", "title": "" }, { "docid": "8d69cdc0737f39104d982d63dac6435b", "score": "0.61558974", "text": "function oportunidades()\n\t{\n\t\t\t$this->load->model('Pdf_model');\n \t\t\t$this->load->library('mydompdf');\n\t\t\t$data['resulOportunidades'] = $this->Pdf_model->getPdfoportunidades();\n \t\t\t$html= $this->load->view('pdf/oportunidades', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->set_paper('A4','landscape');\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "66917aeb38ddb4eca2c8a4fc6b87f3b9", "score": "0.61412114", "text": "public function carregar(){\r\n\t\tinclude LIB . DS . 'MPDF56/mpdf.php';\r\n\t}", "title": "" }, { "docid": "9b2bba3d4ab974726355dc7295640e0d", "score": "0.61348945", "text": "public function generate() {\n $data = $this->content();\n\n $mpdf = new \\Mpdf\\Mpdf();\n $mpdf->WriteHTML($data['view'], \\Mpdf\\HTMLParserMode::HTML_BODY);\n $mpdf->Output($this->dirname . $this->filename);\n }", "title": "" }, { "docid": "7852592659cbc17b83f3f29b26b61a42", "score": "0.6115737", "text": "public function toPDF() {\n }", "title": "" }, { "docid": "946cb7292905ec4c3a4effd80f6d9bcd", "score": "0.61103994", "text": "private function _process_pdf() {\n\t\n\t\t// Get the EE PDF library\n\t\t$this->EE->load->library('ee_pdf');\n\t\t\n\t\t// Push our previously-declared tag data to the library\n\t\t$this->pdf = $this->EE->ee_pdf->load($this->params);\n\n\t\t// Set automatic margins if needed\n\t\t$this->_set_auto_margins();\n\t\t\n\t\t// Set PDF header if applicable\n\t\tif(isset($this->header))\n\t\t{\n\t\t\t$this->pdf->SetHTMLHeader($this->header);\n\t\t}\n\t\t\n\t\t// Set PDF footer if applicable\n\t\tif(isset($this->footer))\n\t\t{\n\t\t\t$this->pdf->SetHTMLFooter($this->footer);\n\t\t}\n\t\t\n\t\t// Write HTML to mPDF\n\t\t$this->pdf->WriteHTML($this->body);\n\t\t\n\t\t// Output final PDF\n\t\t$this->pdf->Output();\n\t\t\n\t\texit;\n\t\t\n\t}", "title": "" }, { "docid": "d93874aa664a52365aa3ca4ece4b020e", "score": "0.60978407", "text": "function clientes()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulClientes'] = $this->Pdf_model->getPdfclientes();\n \t\t\t$html= $this->load->view('pdf/clientes', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "da3a61c72f433c70eb3d7a907df0fb5e", "score": "0.6094901", "text": "public function mpdf_creater($data)\n { \n $pdfFilePath = FCPATH.\"downloads/pdf/\";\n if (!isset($data['file_name'])) {\n $data['file_name'] = 'temp';\n }\n $file_name = $data['file_name'].rand(1000,100000).'.pdf';\n $full_path = $pdfFilePath.$file_name;\n \n $this->load->library('pdf');\n $pdf = $this->pdf->load(); \n \n $html = $this->load->view('admin/_pdf_layout', $data, true);\n $pdf->WriteHTML($html); // write the HTML into the PDF\n $pdf->Output($full_path, 'F');\n return $file_name;\n }", "title": "" }, { "docid": "c5183e74d8c43832a2c96a2f04f07053", "score": "0.6094439", "text": "function __construct() {\n\t\t\timport('classes.CBPPlatform.conv.phpDocx.classes.TransformDoc');\n\t\t\timport('classes.CBPPlatform.conv.mpdf.mpdf');\n\t\t\timport('classes.CBPPlatform.conv.cssparse.CSSParser');\n\t\t\t\n\t\t\t$this->fileDir = \".\";\n\t\t\t$this->stylesheetDir = \"styles/ebook/\";\n\t\t\t$this->contentStart = \"<html>\\n<head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\" /><body>\";\n\t\t\t$this->paperSizes = array(\n\t\t\t\t'a5' => array ('w' => '148', 'h' => '210'),\n\t\t\t\t'a4' => array ('w' => '210', 'h' => '297'),\n\t\t\t\t'trade' => array ('w' => '129', 'h' => '198')\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "b6b0b9bcd5fd3cb75adc6a94cdd3cfe2", "score": "0.6090774", "text": "public function create( $data )\n\t{\n\t\t# create new PDF document\n\t\t$this->pdf = new \\TCPDF( $this->configs['page_orientation'], $this->configs['unit'], $this->configs['page_format'], true, 'UTF-8', false );\n\n\t\t# set document information\n\t\t$this->pdf->SetCreator( $this->timber->config('app_name') . '-' . TIMBER_CURRENT_VERSION );\n\t\t$this->pdf->SetAuthor( $this->timber->config('app_author') );\n\n\t\t$this->pdf->SetTitle( $data['title'] );\n\t\t$this->pdf->SetSubject( $data['subject'] );\n\t\t$this->pdf->SetKeywords( $this->timber->config('app_name') . ', ' . $this->timber->config('app_author') );\n\n\t\t# set default header data\n\t\t# $this->pdf->SetHeaderData('logo.png', header_logo_width, \"Timber\", \"Web Development Service\");\n\n\t\t# Set Logo\n\t\t$this->pdf->SetHeaderData( $data['logo'], $this->configs['header_logo_width'], $data['name'], $data['description'] );\n\n\t\t# set header and footer fonts\n\t\t$this->pdf->setHeaderFont( array($this->configs['font_name_main'], '', $this->configs['font_size_main']) );\n\t\t$this->pdf->setFooterFont( array($this->configs['font_name_data'], '', $this->configs['font_size_data']) );\n\n\t\t# set default monospaced font\n\t\t$this->pdf->SetDefaultMonospacedFont( $this->configs['font_monospaced'] );\n\n\t\t# set margins\n\t\t$this->pdf->SetMargins( $this->configs['margin_left'], $this->configs['margin_top'], $this->configs['margin_right'] );\n\t\t$this->pdf->SetHeaderMargin( $this->configs['margin_header'] );\n\t\t$this->pdf->SetFooterMargin( $this->configs['margin_footer'] );\n\n\t\t# set auto page breaks\n\t\t$this->pdf->SetAutoPageBreak( TRUE, $this->configs['margin_bottom'] );\n\n\t\t# set image scale factor\n\t\t$this->pdf->setImageScale( $this->configs['image_scale_ratio'] );\n\n\t\t# Set some language-dependent strings (optional)\n\t\t$this->pdf->setLanguageArray(array(\n\t\t\t'a_meta_charset' => 'UTF-8',\n\t\t\t'a_meta_dir' => 'ltr',\n\t\t\t'a_meta_language' => 'en',\n\t\t\t'w_page' => $this->timber->translator->trans('Page'),\n\t\t));\n\n\t\t# Set Font\n\t\t$this->pdf->SetFont('helvetica', 'B', 11);\n\n\t\t# Add a page\n\t\t$this->pdf->AddPage();\n\n\t\t# Set Font\n\t\t$this->pdf->SetFont('helvetica', '', 8);\n\n\t\tif( strpos($data['ref_id'], \"ST\") > 0 ){\n\t\t\t$tbl = '<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n\t\t \t<tr>\n\t\t \t<td><b>' . $this->timber->translator->trans('From:') . '</b></td>\n\t\t \t<td></td>\n\t\t \t<td><b>' . $this->timber->translator->trans('Estimate No: ') . $data['ref_id'] . '</b></td>\n\t\t \t</tr>';\n\t\t}else{\n\t\t\t$tbl = '<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n\t\t \t<tr>\n\t\t \t<td><b>' . $this->timber->translator->trans('From:') . '</b></td>\n\t\t \t<td></td>\n\t\t \t<td><b>' . $this->timber->translator->trans('Invoice No: ') . $data['ref_id'] . '</b></td>\n\t\t \t</tr>';\n\t\t}\n\n\t\t$tbl .= '<tr>\n\t\t\t\t\t<td>' . $data['company']['name'] . '</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td><b>' . $this->timber->translator->trans('To:') . '</b></td>\n\t\t\t\t</tr>';\n\n\t\t$tbl .= '<tr>\n\t\t\t\t\t<td>' . $data['company']['address1'] . '</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>' . $data['client']['name'] . '</td>\n\t\t\t\t</tr>';\n\n\t\t$tbl .= '<tr>\n\t\t\t\t\t<td>' . $data['company']['address2'] . '</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>' . $data['client']['company'] . '</td>\n\t\t\t\t</tr>';\n\n\t\t$tbl .= '<tr>\n\t\t\t\t\t<td>' . $data['company']['city'] . '</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>' . $data['client']['address1'] . '</td>\n\t\t\t\t</tr>';\n\n\t\t$tbl .= '<tr>\n\t\t\t\t\t<td>' . $data['company']['country'] . '</td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>' . $data['client']['address2'] . '</td>\n\t\t\t\t</tr>';\n\n\t\t$tbl .= ($data['company']['vat'] != '') ? '<tr><td>' . $this->timber->translator->trans('VAT: ') . $data['company']['vat'] . '</td><td></td><td>' . $data['client']['city'] . '</td></tr>' : '<tr><td><br/></td><td></td><td>' . $data['client']['city'] . '</td></tr>';\n\n\t\t$tbl .= ($data['company']['phone']) ? '<tr><td>' . $this->timber->translator->trans('Phone: ') . $data['company']['phone'] . '</td><td></td><td>' . $data['client']['country'] . '</td></tr>' : '<tr><td><br/></td><td></td><td></td></tr>';\n\n\t\t$tbl .= ($data['client']['vat'] != '') ? '<tr><td></td><td></td><td>' . $this->timber->translator->trans('VAT: ') . $data['client']['vat'] . '</td></tr>' : '<tr><td></td><td></td><td><br/></td></tr>';\n\n\t\t$tbl .= ($data['client']['phone'] != '') ? '<tr><td></td><td></td><td>' . $this->timber->translator->trans('Phone: ') . $data['client']['phone'] . '</td></tr>' : '<tr><td></td><td></td><td><br/></td></tr>';\n\n\t\t# Client and Company\n\t\t$this->pdf->writeHTML($tbl, true, false, false, false, '');\n\n\t\t$tbl = '<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n\t\t <tr>\n\t\t <td></td>\n\t\t <td></td>\n\t\t <td></td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td></td>\n\t\t <td></td>\n\t\t <td><b>' . $this->timber->translator->trans('Issue Date: ') . '</b> ' . $data['client']['issue_date'] . '</td>\n\t\t </tr>\n\t\t <tr>\n\t\t <td></td>\n\t\t <td></td>\n\t\t <td><b>' . $this->timber->translator->trans('Due Date: ') . '</b> ' . $data['client']['due_date'] . '</td>\n\t\t </tr>\n\t\t</table><br/><br/><br/><br/>';\n\n\t\t# Invoice Dates\n\t\t$this->pdf->writeHTML($tbl, true, false, false, false, '');\n\n\t\t# Letter To Client\n\t\t/*\n\t\t$this->pdf->Write(0, 'Dear Ms. Jane Doe,', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, '', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, 'Please find below a cost-breakdown for the recent work completed. Please make payment at your earliest convenience, and do not hesitate to contact me with any questions..', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, '', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, 'Many thanks,', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, 'Your Name', '', 0, 'L', true, 0, false, false, 0);\n\t\t*/\n\n\t\t$this->pdf->writeHTML( $data['notes'], true, false, false, false, '' );\n\n\t\t# Cost Breakdown\n\t\t$tbl = '<br/><br/><br/><br/><table cellspacing=\"0\" cellpadding=\"1\" border=\"0\">\n\t\t \t<tr>\n\t\t \t<td style=\"background-color: #eee\" colspan=\"2\"><br><br><b>' . $this->timber->translator->trans('Item') . '</b><br></td>\n\t\t \t<td style=\"background-color: #eee;text-align:center\"><br><br><b>' . $this->timber->translator->trans('Quantity') .'</b><br></td>\n\t\t \t<td style=\"background-color: #eee;text-align:center\"><br><br><b>' . $this->timber->translator->trans('Unit Price') . ' (' . $this->timber->config('_site_currency') .')</b><br></td>\n\t\t \t<td style=\"background-color: #eee;text-align:right\"><br><br><b>'. $this->timber->translator->trans('Total') .' (' . $this->timber->config('_site_currency') . ')</b><br></td>\n\t\t \t</tr>';\n\n\n\t\tforeach ($data['items'] as $item) {\n\t\t\t$tbl .='<tr>\n\t\t\t \t\t<td style=\"background-color: #fff\" colspan=\"2\"><br><br><b>' . $item['item_title'] . '</b><br/>' . $item['item_description'] . '<br></td>\n\t\t\t \t\t<td style=\"text-align:center;background-color: #fff\"><br><br>' . $item['item_quantity'] . '<br></td>\n\t\t\t \t\t<td style=\"text-align:center;background-color: #fff\"><br><br>' . $item['item_unit_price'] . '<br></td>\n\t\t\t \t\t<td style=\"text-align:right;background-color: #fff\"><br><br>' . $item['item_sub_total'] . '<br></td>\n\t\t\t \t\t</tr>';\n\t\t}\n\n\t\t$invoice_tax_currency = ($data['overall']['tax_type'] == 'percent') ? \"%\" : $this->timber->config('_site_currency');\n\t\t$invoice_discount_currency = ($data['overall']['discount_type'] == 'percent') ? \"%\" : $this->timber->config('_site_currency');\n\n\t\t$tbl .='<tr>\n\t\t \t\t<td colspan=\"2\"></td>\n\t\t \t\t<td></td>\n\t\t \t\t<td style=\"background-color: #fff\"><br><b>'. $this->timber->translator->trans('Subtotal') .' (' . $this->timber->config('_site_currency') . ') :</b></td>\n\t\t \t\t<td style=\"background-color: #fff;text-align:right\"><br>' . $data['overall']['sub_total'] . '</td>\n\t\t \t\t</tr>\n\t\t \t\t<tr>\n\t\t \t\t<td colspan=\"2\"></td>\n\t\t \t\t<td></td>\n\t\t \t\t<td style=\"background-color: #fff\"><br><b>'. $this->timber->translator->trans('Discount') .' (' . $invoice_discount_currency . ') :</b></td>\n\t\t \t\t<td style=\"background-color: #fff;text-align:right\"><br>' . $data['overall']['discount_value'] . '</td>\n\t\t \t\t</tr>\n\t\t \t\t<tr>\n\t\t \t\t<td colspan=\"2\"></td>\n\t\t \t\t<td></td>\n\t\t \t\t<td style=\"background-color: #fff\"><br><b>'. $this->timber->translator->trans('Taxes') .' (' . $invoice_tax_currency . ') :</b></td>\n\t\t \t\t<td style=\"background-color: #fff;text-align:right\"><br>' . $data['overall']['tax_value'] . '</td>\n\t\t \t\t</tr>\n\t\t \t\t<tr>\n\t\t \t\t<td colspan=\"2\"></td>\n\t\t \t\t<td></td>\n\t\t \t\t<td style=\"background-color: #fff\"><br><b>'. $this->timber->translator->trans('Total') .' (' . $this->timber->config('_site_currency') . ') :</b></td>\n\t\t \t\t<td style=\"background-color: #fff;text-align:right\"><br>' . $data['overall']['total_value'] . '</td>\n\t\t \t\t</tr>\n\t\t \t<tr>\n\t\t \t\t<td colspan=\"2\"></td>\n\t\t \t\t<td></td>\n\t\t \t\t<td style=\"background-color: #fff\"><br><b>'. $this->timber->translator->trans('Paid') .' (' . $this->timber->config('_site_currency') . ') :</b></td>\n\t\t \t\t<td style=\"background-color: #fff;text-align:right\"><br>' . $data['overall']['paid_value'] . '</td>\n\t\t \t\t</tr>\n\t\t\t</table><br/><br/><br/><br/>';\n\n\t\t# Write HTML\n\t\t$this->pdf->writeHTML($tbl, true, false, false, false, '');\n\n\t\t# Write terms\n\t\t$this->pdf->Write(0, $this->timber->translator->trans('Many thanks for your custom! We look forward to doing business with you again in due course.'), '', 0, 'L', true, 0, false, false, 0);\n\n\t\t# Close and Output\n\t\t$this->pdf->Output( $data['file'] . '.pdf', 'I' );\n\t}", "title": "" }, { "docid": "be3b8b388ec258792e98d1a30444b403", "score": "0.6088409", "text": "public function created(Form $form)\n {\n // instantiate and use the dompdf class\n $dompdf = new Dompdf();\n $dompdf->loadHtml(\n \"\n <html>\n <body>\n \n </body>\n </html>\n \"\n );\n\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'landscape');\n\n // Render the HTML as PDF\n $dompdf->render();\n\n // Output the generated PDF to Browser\n $dompdf->stream();\n }", "title": "" }, { "docid": "f99581e48273e318192fcab1f25e537b", "score": "0.6087767", "text": "public function __construct()\n\t{\n\t\t$this->pdf = new FPDF('P','mm','A4');\n\t\t//$cartaPorte = new CartaPorte();\n\t\t$this->folio = \"31231\";\n\t}", "title": "" }, { "docid": "8e3c1a19c6d7f3feee99302df746d7d4", "score": "0.60313195", "text": "function iniciativa()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\n\t\t\t$data['resulIniciativas'] = $this->Pdf_model->getPdfiniciativa();\n \t\t\t$html= $this->load->view('pdf/iniciativas', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "607bf406682528005b9ef8eab401123b", "score": "0.60065544", "text": "function createPDF($content, $paper, $orientation, $filename){\n\t\t$dompdf = new DOMPDF();\n\t\t$dompdf->load_html($content);\n\t\t$dompdf->set_paper($paper,$orientation);\n\t\t$dompdf->render();\n\t\t$dompdf->stream($filename,array('Attachment' => 0));\t\n\t}", "title": "" }, { "docid": "ffca2dfdc8542d66d99d401a625faba2", "score": "0.5998443", "text": "public function getContent() : string\n {\n// $pdf = new \\TCPDF($orientation = 'L', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false);\n\n $pageMargin = 15;\n\n // set document information\n $this->pdf->SetCreator(PDF_CREATOR);\n $this->pdf->SetAuthor('Martin Dilling-Hansen');\n $this->pdf->SetTitle('Post-It Printer Template');\n $this->pdf->SetSubject('Default size');\n $this->pdf->SetKeywords('Post-It, Printer, Template');\n\n // remove default header/footer\n $this->pdf->setPrintHeader(false);\n $this->pdf->setPrintFooter(false);\n\n // set default monospaced font\n $this->pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // set margins\n $this->pdf->SetMargins($pageMargin, $pageMargin, $pageMargin);\n\n // set auto page breaks\n $this->pdf->SetAutoPageBreak(true, $pageMargin);\n\n // set image scale factor\n $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n $this->pdf->SetDisplayMode('real', 'SinglePage', 'UseNone');\n\n $this->pdf->setViewerPreferences([\n// 'HideToolbar' => true,\n// 'HideMenubar' => true,\n// 'HideWindowUI' => true,\n// 'FitWindow' => true,\n// 'CenterWindow' => true,\n// 'DisplayDocTitle' => true,\n// 'NonFullScreenPageMode' => 'UseNone', // UseNone, UseOutlines, UseThumbs, UseOC\n// 'ViewArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n// 'ViewClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n// 'PrintArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n// 'PrintClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n 'PrintScaling' => 'None', // None, AppDefault\n// 'Duplex' => 'DuplexFlipLongEdge', // Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge\n// 'PickTrayByPDFSize' => true,\n// 'PrintPageRange' => array(1,1,2,3),\n// 'NumCopies' => 2\n ]);\n\n foreach ($this->pages as $page) {\n $this->pdf->AddPage('L', 'A4');\n $page->render($this->pdf);\n }\n\n $this->pdf->lastPage();\n\n return $this->pdf->Output('tmp.pdf', 'S');\n }", "title": "" }, { "docid": "4077de5a253890550e25e3d1994b8e0b", "score": "0.5996432", "text": "public function gerar_pdf($view, $dados = array(), $papel = 'A4', $orientacao = 'portrait') //Orientacao: portrait / landscape\n {\n $dompdf = new Dompdf();\n $html = $this->ci->load->view($view, $dados, TRUE);\n $dompdf->loadHtml($html);\n $dompdf->setPaper($papel, $orientacao);\n /* Converter o HTML em PDF */\n $dompdf->render();\n $dompdf->stream(date('d-m-Y-H-i-s').\".pdf\", array(\"Attachment\" => FALSE));\n }", "title": "" }, { "docid": "7a1737c9d7dff0da59f0f2c7e96a00f6", "score": "0.59749806", "text": "public function exportPDF()\n\t{\n\t\t// $data=[\n\t\t// 'karyawan'=>$this->KaryawanModel()->Alldatapdf(),\n\t\t// ]; \n\t\t\n\t\t\t\t \n\t\t// // $builder = $this->db->table('karyawan');\n // // $query = $builder->get(); \n\t\t$query = $this->db->query(\"SELECT * FROM karyawan\");\n $data['karyawan'] = $query->getResultArray();\n\t\t// echo \"<pre>\";\n\t\t// print_r($data);\n\t\t$html= view('karyawan/laporanpdf', $data);\n\t\t$options = new Options();\n\t\t$options->setDefaultFont('default font','Courier');\n\t\t$options->setIsHtml5ParserEnabled(true);\n\t\t\n\t\t// // instantiate and use the dompdf class\n\t\t$dompdf = new Dompdf($options); \n\t\t$dompdf->loadHtml($html);\n\n\t\t// (Optional) Setup the paper size and orientation\n\t\t$dompdf->setPaper('A4', 'portrait');\n\n\t\t// Render the HTML as PDF\n\t\t$dompdf->render();\n\n\t\t// Output the generated PDF to Browser\n\t\t$dompdf->stream();\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "38b3ebd7b6d5d0aaf3bb176ae4739be1", "score": "0.5972795", "text": "public function PDF()\n\n { \n \n\n\n\n/*\n $prestamos = \\DB::table('loans')\n select(['id', 'loan_date', 'delivery_date', 'dependencies', 'translation', 'objetive']); \n get();\n $vista = view::make('insa::prueba', compact('prestamos'))->render();\n\n $pdf = \\App::make('dompdf.wrapper');\n $pdf->loadHTML($vista);\n\n return $pdf->stream('Solicitud_Prestamo.pdf');\n\n //$pdf =\\PDF::loadView('insa::prueba', compact('prestamos'));\n //return $pdf->stream();*/\n\n \n }", "title": "" }, { "docid": "584f31a67681e75ae121411b56c600be", "score": "0.5972265", "text": "function __construct(){\n\t\t$this->m_doc = new DOMDocument();\n\t}", "title": "" }, { "docid": "9ee30eb769ff81862123c95d89c64e4f", "score": "0.59536916", "text": "public function render($ps){\n $common_dir = '/admin/reports/common';\n $base_dir = '/admin/reports/'.strtolower($this->report_code);\n\n switch ($this->format) {\n case 'pdf':\n ini_set(\"memory_limit\", \"512M\");\n $filename=$this->report_code.'-'.date('Ymd', time()); #Ymd-His\n\n $ps['f']['edit']=false; #force any edit modes off\n $ps['IS_PRINT_MODE']=true;\n $ps['IS_EXPORT_PDF']=true;\n\n $html = parse_page($base_dir, $this->fw->config->PAGE_LAYOUT_PRINT, $ps, 'v');\n #$html = parse_page($base_dir, $common_dir.'/docx.html', $ps, 'v');\n\n if ($this->fw->config->PDF_CONVERTER){\n ### if wkhtmltopdf\n $tmp_file = Utils::getTmpFilename().'.html';\n $out_file = Utils::getTmpFilename().'.pdf';\n #logger(\"tmp files: $tmp_file, $out_file\");\n file_put_contents($tmp_file, $html);\n\n $orient = $this->render_options['landscape'] ? '--orientation Landscape' : '';\n $cmd=$this->fw->config->PDF_CONVERTER.\" \".$this->render_options['cmd'].\" $orient file:///$tmp_file $out_file\";\n #logger(\"cmd: [$cmd]\");\n system($cmd);\n\n $disposition = 'attachment';\n header(\"Content-type: application/pdf\");\n header(\"Content-Disposition: $disposition; filename=\\\"$filename\\\"\");\n\n readfile($out_file); //read file content and output to browser\n\n // unlink($tmp_file);\n // unlink($out_file);\n\n }else{\n ### if Dompdf\n require_once $this->fw->config->SITE_ROOT.'/php/dompdf/autoload.inc.php';\n #use Dompdf\\Dompdf;\n $dompdf = new Dompdf\\Dompdf();\n $dompdf->loadHtml($html);\n if ($this->render_options['landscape']) {\n $dompdf->setPaper('A4', 'landscape');\n }else{\n $dompdf->setPaper('A4', 'portrait');\n }\n $dompdf->render();\n $dompdf->stream($filename);\n }\n break;\n\n case 'docx':\n $ps['IS_PRINT_MODE']=true;\n $ps['IS_EXPORT_DOC']=true;\n\n ini_set('display_errors', '0'); #disable \"Strict Standards\" errors in VsWord\n error_reporting(0);\n require_once $this->fw->config->SITE_ROOT.'/php/vsword/VsWord.php';\n VsWord::autoLoad();\n\n $html = parse_page($base_dir, $common_dir.'/docx.html', $ps, 'v');\n\n $doc = new VsWord();\n $parser = new HtmlParser($doc);\n $parser->parse($html);\n $tmpfname = Utils::getTmpFilename();\n $doc->saveAs($tmpfname);\n\n $filename=$this->report_code.'-'.date('Ymd', time()).'.docx'; #Ymd-His\n $disposition = 'attachment';\n //output to browser\n header('Content-type: application/msword');\n header('Content-Disposition: '.$disposition.'; filename=\"'.$filename.'\"');\n\n readfile($tmpfname); //read file content and output to browser\n //echo $html;\n\n unlink($tmpfname);\n break;\n\n case 'xls':\n $ps['IS_PRINT_MODE']=true;\n $ps['IS_EXPORT_XLS']=true;\n\n $html = parse_page($base_dir, $common_dir.'/xls.html', $ps, 'v');\n\n $filename=$this->report_code.'-'.date('Ymd', time()).'.xlsx'; #Ymd-His\n $disposition = 'attachment';\n //output to browser\n header('Content-type: application/vnd.ms-excel');\n header('Content-Disposition: '.$disposition.'; filename=\"'.$filename.'\"');\n\n echo $html;\n break;\n\n case 'csv':\n $filename=$this->report_code.'-'.date('Ymd', time()).'.csv'; #Ymd-His\n Utils::responseCSV($ps['rep']['rows'], $ps['rep']['headers'], $filename);\n break;\n\n default: #html - show report using templates from related report dir\n $this->fw->parser($base_dir, $ps);\n break;\n }\n }", "title": "" }, { "docid": "3c8ea2a12fcf4a7c2246ce387103187c", "score": "0.5950492", "text": "public function instance(){\n\t\treturn $this->mpdf;\n\t}", "title": "" }, { "docid": "e5be47ff242c8d57b08e3762140aa54f", "score": "0.593509", "text": "public function __construct() {\n\t\t$this->doc = t3lib_div::makeInstance('template');\n\t}", "title": "" }, { "docid": "bddaf20090a7360ac91f1c79719f64dc", "score": "0.59222054", "text": "function campanas()\n\t{\n\t\t\t$this->load->model('Pdf_model');\n \t\t\t$this->load->library('mydompdf');\n\t\t\t$data['resulCampana'] = $this->Pdf_model->getPdfcampana();\n \t\t\t$html= $this->load->view('pdf/campana', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "4b06a01cea4346922d79fa24919e01a1", "score": "0.5901326", "text": "public function __construct($data,$pdf)\n {\n $this->data =$data;\n $this->pdf = $pdf;\n\n }", "title": "" }, { "docid": "1f1f1dd13f9f10a413cfa7f95c0b8059", "score": "0.5895418", "text": "function ventas()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulVentas'] = $this->Pdf_model->getPdfventas();\n \t\t\t$html= $this->load->view('pdf/ventas', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->set_paper('A4','landscape');\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "a39cf015a93729f2fe3b238d60d13794", "score": "0.58933645", "text": "public function index()\n {\n // $currentPage = $this->request->getVar('page_lakip') ? $this->request->getVar('page_lakip') : 1;\n\n // $keyword = $this->request->getVar('keyword');\n // if ($keyword) {\n // $pdf = $this->pdfModel->search($keyword);\n // } else {\n // $pdf = $this->pdfModel;\n // }\n\n\n $mpdf = new \\Mpdf\\Mpdf(['mode' => 'utf-8', 'format' => 'A4']);\n // $mpdf = new \\Mpdf\\Mpdf();\n\n\n $html = '\n <htmlpageheader name=\"myHeader1\">\n <div style=\"text-align: right>My document</div>\n </htmlpageheader>\n \n <htmlpageheader name=\"myHeader2\">\n <div style=\"border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;\">\n My document\n </div>\n </htmlpageheader>\n \n <htmlpagefooter name=\"myFooter1\">\n <table width=\"100%\">\n <tr>\n <td width=\"33%\">{DATE j-m-Y}</td>\n <td width=\"33%\" align=\"center\">{PAGENO}/{nbpg}</td>\n <td width=\"33%\" style=\"text-align: right; \">My document</td>\n </tr>\n </table>\n </htmlpagefooter>\n \n <htmlpagefooter name=\"myFooter2\">\n <table width=\"100%\">\n <tr>\n <td width=\"33%\">My document</td>\n <td width=\"33%\" align=\"center\">{PAGENO}/{nbpg}</td>\n <td width=\"33%\" style=\"text-align: right;\">{DATE j-m-Y}</td>\n </tr>\n </table>\n </htmlpagefooter>';\n\n\n $mpdf->SetHeader('<img src=\"assets/lakip.jpeg\" width=\"70\" />|<p>LEMBAGA ADMINISTRASI KEUANGAN DAN ILMU PEMERINTAHAN</p>\n <p>SKT DITJEN POLPUM KEMENDAGRI NOMOR : 001-00-00/034/I/2019</p> \n <p>Sekretariat : Jln. Serdang Baru Raya No. 4B, Kemayoran - Jakarta 10650</p>\n <p>Website : www.lakip.co.id E-mail : admin@lakip.co.id Telp./Fax. 021-42885718</p>\n |');\n $mpdf->WriteHTML($html);\n // FOOTER\n // $mpdf->SetFooter('footer||Page {PAGENO}', '$footer');\n\n // $mpdf = WriteHTML($html);\n // $mpdf->WriteHTML($text);\n // $footer = array(\n // 'odd' => array(\n // 'L' => array(\n // 'content' => '',\n // 'font-size' => 12,\n // 'font-style' => 'B',\n // 'font-family' => 'serif',\n // 'color' => '#000000'\n // ),\n // 'C' => array(\n // 'content' => '',\n // 'font-size' => 12,\n // 'font-style' => 'B',\n // 'font-family' => 'serif',\n // 'color' => '#000000'\n // ),\n // 'R' => array(\n // 'content' => 'My document',\n // 'font-size' => 12,\n // 'font-style' => 'B',\n // 'font-family' => 'serif',\n // 'color' => '#000000'\n // ),\n // 'line' => 1,\n // ),\n // 'even' => array()\n // );\n // CSS\n // $mpdf->defaultheaderfontsize = 12;\n // $mpdf->defaultheaderfontstyle = 'B';\n // $mpdf->defaultheaderline = 5;\n // $mpdf->defaultfooterfontsize = 10;\n // $mpdf->defaultfooterfontstyle = 'BI';\n // $mpdf->defaultfooterline = 0;\n\n // Set initial state of layer: \"hidden\" or nothing\n // $mpdf->layerDetails[z]['state'] = 'hidden';\n // Write some HTML code:\n // $mpdf->layerDetails[z]['name'] = 'Correct Answers';\n // $html = ROOTPATH . 'public/assets/lakip.jpeg';\n\n // $mpdf->useOddEven = true;\n\n // $mpdf->SetHeader('First section header');\n // $mpdf->SetFooter('First section footer');\n // $mpdf->WriteHTML('First section text...');\n\n // Use a conditional page-break to ensure you are on an EVEN page before\n // changing the Header\n // $mpdf->AddPage('', 'E');\n\n // Now you know that this page-break takes you to an ODD page\n // $mpdf->SetHeader('Second section header');\n\n // $mpdf->AddPage();\n // $mpdf->SetFooter('Second section footer');\n // $mpdf->WriteHTML('Second section text...');\n\n\n // <img src=\"assets/lakip.jpeg\"\n // $mpdf->img_dpi = 96;\n\n // $mpdf->open_layer_pane = true;\n // $this->defaultPagebreakType;\n // $mpdf->use_kwt = true;\n\n\n\n\n\n // $mpdf->WriteHTML('Masrianto');\n\n\n\n\n $html = '\n<html>\n<head>\n<style>\n @page {\n size: auto;\n odd-header-name: html_MyHeader1;\n odd-footer-name: html_MyFooter1;\n }\n\n @page chapter2 {\n odd-header-name: html_MyHeader2;\n odd-footer-name: html_MyFooter2;\n }\n\n @page noheader {\n odd-header-name: _blank;\n odd-footer-name: _blank;\n }\n\n div.chapter2 {\n page-break-before: always;\n page: chapter2;\n }\n\n div.noheader {\n page-break-before: always;\n page: noheader;\n }\n</style>\n</head>\n<body>\n <htmlpageheader name=\"MyHeader1\">\n <div style=\"text-align: right; border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;\">My document</div>\n </htmlpageheader>\n\n <htmlpageheader name=\"MyHeader2\">\n <div style=\"border-bottom: 1px solid #000000; font-weight: bold; font-size: 10pt;\">My document</div>\n </htmlpageheader>\n\n <htmlpagefooter name=\"MyFooter1\">\n <table width=\"100%\" style=\"vertical-align: bottom; font-family: serif; font-size: 8pt; color: #000000; font-weight: bold; font-style: italic;\">\n <tr>\n <td width=\"33%\"><span style=\"font-weight: bold; font-style: italic;\">{DATE j-m-Y}</span></td>\n <td width=\"33%\" align=\"center\" style=\"font-weight: bold; font-style: italic;\">{PAGENO}/{nbpg}</td>\n <td width=\"33%\" style=\"text-align: right; \">My document</td>\n </tr>\n </table>\n </htmlpagefooter>\n\n <htmlpagefooter name=\"MyFooter2\">\n <table width=\"100%\" style=\"vertical-align: bottom; font-family: serif; font-size: 8pt; color: #000000; font-weight: bold; font-style: italic;\">\n <tr>\n <td width=\"33%\"><span style=\"font-weight: bold; font-style: italic;\">My document</span></td>\n <td width=\"33%\" align=\"center\" style=\"font-weight: bold; font-style: italic;\">{PAGENO}/{nbpg}</td>\n <td width=\"33%\" style=\"text-align: right; \">{DATE j-m-Y}</td>\n </tr>\n </table>\n </htmlpagefooter>\n\n <div>Here is the text of the first chapter</div>\n <div class=\"chapter2\">Text of Chapter 2</div>\n\n <div class=\"noheader\">No-Header page</div>\n</body>\n</html>';\n\n $mpdf->WriteHTML($html);\n\n\n $html = '\n <htmlpageheader name=\"MyHeader1\">\n <div style=\"text-align: right\">My document</div>\n </htmlpageheader>\n \n <htmlpagefooter name=\"MyFooter1\">\n <table width=\"100%\">\n <tr>\n <td width=\"33%\"><span style=\"font-weight: bold; font-style: italic;\">{DATE j-m-Y}</span></td>\n <td width=\"33%\" align=\"center\" style=\"font-weight: bold; font-style: italic;\">{PAGENO}/{nbpg}</td>\n <td width=\"33%\" style=\"text-align: right; \">My document</td>\n </tr>\n </table>\n </htmlpagefooter>\n \n <sethtmlpageheader name=\"MyHeader1\" value=\"on\" show-this-page=\"1\" />\n <sethtmlpagefooter name=\"MyFooter1\" value=\"on\" />\n \n <div>Start of the document ... and all the rest</div>';\n\n $mpdf->WriteHTML($html);\n\n $text = '<p> Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eius tempore iusto, molestiae \n nesciunt animi cumque, // non-standard support for dimension iste voluptas officia harum possimus // 90 pixels, just like HTML\n accusantium quidem et sequi unde perspiciatis velit, recusandae a voluptatibus? // Can also use CSS width=\"90mm\" /></p>';\n // <pagebreak page-break-type=\"clonebycss\" />\n $mpdf->WriteHTML($text);\n\n $mpdf->AddPage();\n\n // $arr['L']['content'] = 'Chapter 2';\n // $mpdf->SetHeader($arr, 'O');\n // $mpdf->BeginLayer($z-index);\n // <img src=\"assets/lakip.jpeg\" style=\"width:90mm;\" />\n\n // $mpdf->EndLayer();\n // $mpdf->image($html, 0, 0, 210, 297, 'jpeg', '', true, false);\n\n // return redirect()->to($mpdf->Output('filename.pdf', 'I'));\n\n\n // $mpdf->WriteHTML('Masrianto');\n\n\n\n\n\n\n // $data = [\n // 'halaman' => 'PDF',\n // 'title' => 'Document',\n // $mpdf = $this->pdfModel,\n //// 'pdf' => $this->pdfModel->paginate(6),\n //// 'pager' => $this->pdfModel->pager,\n\n //// 'pdf' => $pdf->paginate(10, 'pdf'),\n // 'pdf' => $pdf->paginate(10, 'id'),\n // 'pager' => $this->pdfModel->pager,\n // 'currentPage' => $currentPage\n // ];\n\n return redirect()->to($mpdf->Output('filename.pdf', 'I'));\n // return view('pdf/index', $data);\n }", "title": "" }, { "docid": "687d4cb4853a64fd62b4f206c2fbecfe", "score": "0.58866453", "text": "public function __construct($pdf)\n {\n $this->pdf = $pdf;\n }", "title": "" }, { "docid": "6a121481db4e0630daa8f38fca123046", "score": "0.5886421", "text": "public function html_to_pdf($p1, $p2, $p3, $p4){\n\t\t$chart = $_POST['imgCode'];\n\t\tlist($type, $chart) = explode(';', $chart); \n\t\tlist(, $chart) = explode(',', $chart);\n\t\t$chart = base64_decode($chart);\n\t\tfile_put_contents('uploads/files/chartReporte.png', $chart);\n\t\t$data['startDate'] = $p3;\n\t\t$data['endDate'] = $p4;\n\t\t$data['filtro'] = $this->admin_model->getByDate($p1, $p2, $p3, $p4);\n\t\t$this->load->view('pdfDataView', $data);\n\t\t$html = $this->output->get_output();\n\t\t$this->load->library('pdf');\n\t\t$this->dompdf->loadHtml($html);\n $this->dompdf->setPaper('A4', 'portrait');\n $this->dompdf->render();\n $this->dompdf->stream(\"estadisticas_Sistema_de_Soporte_INDEBC.pdf\", array(\"Attachment\"=>0));\n }", "title": "" }, { "docid": "7f20658e94ff4e4e2c4962e61d8c30d6", "score": "0.5884071", "text": "function pdfdiplomadodocente($datos,$pdf)\n {\n $data['datos']=$datos;\n $meses = array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n $data['fechahoy']= strftime(\" %d de \".$meses[date('n')-1].\", %Y\");\n $this->createFolder();\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\n \n $archivo=$pdf.\".pdf\";\n $this->html2pdf->filename($archivo);\n \n $this->html2pdf->paper('letter', 'landscape');// poner esto para imprimir diplomadosssss\n //$this->load->view('certificado/diplomado', $data);\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/diplomado_docente', $data,true)));//certificado asistido\n \n if($this->html2pdf->create('save')) \n { \n // $this->show($archivo);\n }\n }", "title": "" }, { "docid": "da8de9be252b8dbbd6fe4d4c5cd52281", "score": "0.5877873", "text": "public function generatePdf()\n {\n Event::fire('initbiz.pdfgenerator.beforeGeneratePdf');\n\n $this->generateFromTwig($this->layout, $this->getLocalRootPath(), $this->data);\n }", "title": "" }, { "docid": "0b11e5851948543436474869b77b25e9", "score": "0.5862028", "text": "protected function initialize_pdf() {\n global $CFG;\n require_once($CFG->libdir . '/fpdf/fpdf.php');\n\n $newpdf = new FPDF('L', 'in', 'letter');\n $newpdf->setMargins(self::marginx, self::marginy);\n $newpdf->SetFont('Arial', '', 9);\n $newpdf->AddPage();\n $newpdf->SetFont('Arial', '', 16);\n $newpdf->MultiCell(0, 0.2, $this->report->title, 0, 'C');\n $newpdf->Ln(0.2);\n $newpdf->SetFont('Arial', '', 8);\n $newpdf->SetFillColor(225, 225, 225);\n\n return $newpdf;\n }", "title": "" }, { "docid": "b95462c1b5bf6edcab7ad410ee22a58f", "score": "0.5835677", "text": "public function make()\n\t{\n//\t\t$this->debug();\n\n\n\t\t$content = array();\n\t\tforeach($this->getJobs() as $job)\n\t\t{\n\t\t\t$content[] = $this->ci->load->view('cms/trabalhos/export_page_pdf', $job, true);\n\t\t}\n\n\t\t$this->setArrayContent($content);\n//\t\t$this->setOutputMode('F');\n//\t\t$this->render('pdf-name-jobs');\n\n\t\t// show on screen\n\t\t$this->setSavePath('');\n\t\t$this->setOutputMode('I');\n\t\t$this->render(url_title($this->ci->config->item('title')));\n\n\t}", "title": "" }, { "docid": "edadc9bb7f85583aad0ef8f9a14b5448", "score": "0.5830983", "text": "function tcpdf()\n{\n require_once dirname(__FILE__) . '/tcpdf/tcpdf.php';\n}", "title": "" }, { "docid": "21ab609a0b3e4dd0890713337fc0ffbb", "score": "0.5830895", "text": "function __construct($configuracion, $sql) {\n //include ($configuracion[\"raiz_documento\"].$configuracion[\"estilo\"].\"/\".$this->estilo.\"/tema.php\");\n //include ($configuracion[\"raiz_documento\"].$configuracion[\"estilo\"].\"/basico/tema.php\");\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/html.class.php\");\n require_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/pdf_sab_notas/pdf/mpdf.php\");\n $this->html=new html();\n \n $this->cripto=new encriptar();\n //$this->tema=$tema;\n $this->sql=$sql;\n\n //Conexion General\n $this->acceso_db=$this->conectarDB($configuracion,\"\");\n\n //Conexion sga\n $this->accesoGestion=$this->conectarDB($configuracion,\"mysqlsga\");\n\n //Conexion Oracle\n $this->accesoOracle=$this->conectarDB($configuracion,\"docente\");\n\n //Datos de sesion\n $this->formulario=\"registro_adicionarTablaHomologacion\";\n $this->usuario=$this->rescatarValorSesion($configuracion, $this->acceso_db, \"id_usuario\");\n $this->identificacion=$this->rescatarValorSesion($configuracion, $this->acceso_db, \"identificacion\");\n $this->nivel=$this->rescatarValorSesion($configuracion, $this->acceso_db, \"nivelUsuario\");\n $this->pagina=\"adminDocumentosVinculacion\";\n $this->opcion=\"mostrar\";\n //Conexion sga\n $this->configuracion = $configuracion;\n //definimos el directorio donde se guadan los archivos\n $this->path = $this->configuracion[\"raiz_documento\"].\"/documentos/docentes/\";\n $this->mpdf=new mPDF('','LETTER',9,'ARIAL',5,5,55,25,7,12);\n \n }", "title": "" }, { "docid": "7a59e829b82d6bd008646b69bee16a49", "score": "0.5823904", "text": "public function __invoke($page, $html)\n {\n global $ExportFileName;\n @ini_set(\"memory_limit\", Config(\"PDF_MEMORY_LIMIT\"));\n set_time_limit(Config(\"PDF_TIME_LIMIT\"));\n $html = CheckHtml($html);\n if (Config(\"DEBUG\")) {\n $html = str_replace(\"</body>\", GetDebugMessage() . \"</body>\", $html);\n }\n $dompdf = new \\Dompdf\\Dompdf([\"pdf_backend\" => \"CPDF\"]);\n $doc = new \\DOMDocument(\"1.0\", \"utf-8\");\n @$doc->loadHTML('<?xml encoding=\"uft-8\">' . ConvertToUtf8($html)); // Convert to utf-8\n $spans = $doc->getElementsByTagName(\"span\");\n foreach ($spans as $span) {\n $classNames = $span->getAttribute(\"class\");\n if ($classNames == \"ew-filter-caption\") { // Insert colon\n $span->parentNode->insertBefore($doc->createElement(\"span\", \":&nbsp;\"), $span->nextSibling);\n } elseif (preg_match('/\\bicon\\-\\w+\\b/', $classNames)) { // Remove icons\n $span->parentNode->removeChild($span);\n }\n }\n $images = $doc->getElementsByTagName(\"img\");\n $pageSize = $page->ExportPageSize;\n $pageOrientation = $page->ExportPageOrientation;\n $portrait = SameText($pageOrientation, \"portrait\");\n foreach ($images as $image) {\n $imagefn = $image->getAttribute(\"src\");\n if (file_exists($imagefn)) {\n $imagefn = realpath($imagefn);\n $size = getimagesize($imagefn); // Get image size\n if ($size[0] != 0) {\n if (SameText($pageSize, \"letter\")) { // Letter paper (8.5 in. by 11 in.)\n $w = $portrait ? 216 : 279;\n } elseif (SameText($pageSize, \"legal\")) { // Legal paper (8.5 in. by 14 in.)\n $w = $portrait ? 216 : 356;\n } else {\n $w = $portrait ? 210 : 297; // A4 paper (210 mm by 297 mm)\n }\n $w = min($size[0], ($w - 20 * 2) / 25.4 * 72 * Config(\"PDF_IMAGE_SCALE_FACTOR\")); // Resize image, adjust the scale factor if necessary\n $h = $w / $size[0] * $size[1];\n $image->setAttribute(\"width\", $w);\n $image->setAttribute(\"height\", $h);\n }\n }\n }\n $html = $doc->saveHTML();\n $html = ConvertFromUtf8($html);\n $dompdf->load_html($html);\n $dompdf->set_paper($pageSize, $pageOrientation);\n $dompdf->render();\n $exportFile = EndsText(\".pdf\", $ExportFileName) ? $ExportFileName : $ExportFileName . \".pdf\";\n $dompdf->stream($exportFile, self::$StreamOptions); // 0 to open in browser, 1 to download\n DeleteTempImages();\n }", "title": "" }, { "docid": "ff79bffdcf289e3dadfcd87b97ac736d", "score": "0.5821983", "text": "public function __construct($output, $field_manager)\n { \n $this->pdf = $output;\n $this->field_manager = $field_manager;\n }", "title": "" }, { "docid": "41ee1d81b616a072661ceaec29e9864e", "score": "0.58153224", "text": "public function output() {\n global $TCPDF;\n $config = Configure::read('CakePdf');\n $margin = &$config['margin'];\n $options = &$config['options'];\n $header = &$options['header'];\n\t\t//TCPDF often produces a whole bunch of errors, although there is a pdf created when debug = 0\n\t\t//Configure::write('debug', 0);\n //debug(K_PATH_IMAGES);\n $fontfile = APP . 'Lib' . DS . 'Fonts' . DS . 'Open_Sans' . DS;\n $customfont = TCPDF_FONTS::addTTFfont($fontfile . 'OpenSans-Regular.ttf', 'TrueTypeUnicode', '', 32);\n TCPDF_FONTS::addTTFfont($fontfile . 'OpenSans-Bold.ttf', 'TrueTypeUnicode', '', 32);\n $TCPDF->setHeaderData($header['logo'], $header['logo_width'], $header['title'], $header['text']);\n\n // set header and footer fonts\n $TCPDF->setHeaderFont(Array($customfont, '', PDF_FONT_SIZE_MAIN));\n $TCPDF->setFooterFont(Array($customfont, '', PDF_FONT_SIZE_DATA));\n $TCPDF->Setfont($customfont, '', PDF_FONT_SIZE_MAIN);\n // set default monospaced font\n $TCPDF->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // set margins\n $TCPDF->SetMargins($margin['left'], $margin['top'], $margin['right']);\n $TCPDF->SetHeaderMargin(PDF_MARGIN_HEADER*2);\n $TCPDF->SetFooterMargin(PDF_MARGIN_FOOTER*2);\n\n // set auto page breaks\n $TCPDF->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n $TCPDF->AddPage();\n $html = $this->_Pdf->html();\n $tidy = preg_replace('/\\s+\\s+/', ' ', $html);\n\t\t$TCPDF->writeHTML($tidy);\n\t\treturn $TCPDF->Output('', 'S');\n\t}", "title": "" }, { "docid": "f647605b5dd52264a8f17c29572a95e8", "score": "0.581242", "text": "function PDF($or = 'L') {\n $this->FPDF($or);\n }", "title": "" }, { "docid": "832710a796aa93df8c9c01f1a6bec3e1", "score": "0.5788798", "text": "public function __construct($post) {\n $this->name = $post['firstName'];\n $this->surname = $post['surname'];\n $this->photo = $post['photo'];\n $this->date = $post['date'];\n $this->email = $post['email'];\n $this->phone = $post['phone'];\n $this->englishSpeak = $post['englishSpeak'];\n $this->englishRead = $post['englishRead'];\n $this->englishWrite = $post['englishWrite'];\n $this->russianSpeak = $post['russianSpeak'];\n $this->russianRead = $post['russianRead'];\n $this->russianWrite = $post['russianWrite'];\n $this->latvianSpeak = $post['latvianSpeak'];\n $this->latvianRead = $post['latvianRead'];\n $this->latvianWrite = $post['latvianWrite'];\n \n\n $this->htmlcss = $post['htmlcss'];\n $this->php = $post['php'];\n\n $this->companyName = $post['companyName'];\n $this->workStart = $post['workStart'];\n $this->workEnd = $post['workEnd'];\n $this->position = $post['position'];\n $this->positionCategory = $post['positionCategory'];\n\n $this->eduName = $post['eduName'];\n $this->country = $post['country'];\n $this->startYear = $post['startYear'];\n $this->endYear = $post['endYear'];\n $this->specialty = $post['specialty'];\n\n $this->language = $post['language'];\n $this->knowledge = $post['knowledge'];\n $this->work = $post['work'];\n $this->edu = $post['edu'];\n // Connect Mpdf library\n require_once __DIR__ . '/vendor/autoload.php';\n $this->stylesheet = file_get_contents('style.css');\n $this->mpdf = new \\Mpdf\\Mpdf();\n $this->mpdf->WriteHTML($this->stylesheet,\\Mpdf\\HTMLParserMode::HEADER_CSS);\n }", "title": "" }, { "docid": "699abef0e705b5214fc1c4f0b609cce8", "score": "0.5769911", "text": "function pdfdiplomado($datos,$pdf)\n {\n $data['datos']=$datos;\n $meses = array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n $data['fechahoy']= strftime(\" %d de \".$meses[date('n')-1].\", %Y\");\n $this->createFolder();\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\n \n $archivo=$pdf.\".pdf\";\n $this->html2pdf->filename($archivo);\n \n $this->html2pdf->paper('letter', 'landscape');// poner esto para imprimir diplomadosssss\n //$this->load->view('certificado/diplomado', $data);\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/diplomado', $data,true)));//certificado asistido\n \n if($this->html2pdf->create('save')) \n { \n }\n }", "title": "" }, { "docid": "a38b28e7482a4720aa3a0cb9cedf0dd8", "score": "0.5768334", "text": "public function generate()\n\t{\n\t\t$fields = $this->pdfdf->extractFields($this->pdfSource);\n\n\t\t// Map the routine, athlete, and skills to fdf fields\n\t\t$this->mapCompcard($fields);\n\n\t\tforeach ($fields as $field) {\n\t\t\tif ($field->getValue() == null) $field->setValue(' ');\n\t\t}\n\n\t\t// Merge the fdf content with pdf\n\t\t$this->pdfdf->generate($this->pdfSource, Str::slug($this->athlete->name() . ' ' . $this->compcardType), $fields);\n\n\t\t$this->setPdfFileName($this->pdfdf->getFileName());\n\t}", "title": "" }, { "docid": "68535c17a03f1e0e9649f461d5fa6b63", "score": "0.5743894", "text": "public function export($dom)\n\t{\n\t\t$dompdf = new Dompdf();\n\t\t$dompdf->loadHtml($dom);\n\t\t\n\t\t// (Optional) Setup the paper size and orientation\n\t\t$dompdf->setPaper('A4', 'portrait');\n\t\t// $dompdf->setPaper('A4', 'landscape');\n\n\t\t// Render the HTML as PDF\n\t\t$dompdf->render();\n\n\t\t// Output the generated PDF to Browser\n\t\t$dompdf->stream();\n\t}", "title": "" }, { "docid": "7774d72748a2f2ffda0a5b7c38232398", "score": "0.5743286", "text": "function LibraryPdf($title , $body, $type = null, $confirmDate= null , $number= null){\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n // Adding font Size and And Our Font in here -----------------------------------------------------------------------\n $mpdf = new Mpdf([\n 'tempDir' => __DIR__ . '/tmp',\n 'default_font_size' => 10,\n 'default_font' => 'iransans',\n 'debug' => true,\n 'allow_output_buffering' => true\n ]);\n\n // Set Water Mark Image to our Pdf ---------------------------------------------------------------------------------\n $mpdf -> SetWatermarkImage(\"imageurl.png\", 1);\n $mpdf->showWatermarkImage = true;\n \n // set date happens Here -------------------------------------------------------------------------------------------\n $date = jdate();\n $date1 = $date -> getYear();\n $date2 = $date -> getMonth();\n $date3 = $date -> getDay();\n $date4 = $date1.\"/\".$date2.\"/\".$date3;\n\n // Important => Our Html Body That contains special Elements and some Css Codes ------------------------------------\n $data =\"\n <html lang=\\\"fa\\\">\n <head>\n <link rel=\\\"stylesheet\\\" media=\\\"print\\\" href=\\\"Css/style.css\\\" />\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html\\\"; charset=\\\"utf-8\\\" />\n <style>\n @page {\n \n margin-header: 7mm;\n margin-footer: 7mm;\n margin: 8%;\n header: html_Chapter2HeaderEven;\n footer: html_Chapter2FooterOdd;\n }\n </style>\n </head>\n <body style=\\\"background-image: url(\\\"print-watermark.png\\\");\\\">\n\n <htmlpageheader name=\\\"Chapter2HeaderEven\\\" style=\\\"display:none\\\">\n <header class=\\\"header\\\">\n <img src=\\\"images/1.jpg\\\" width=\\\"100%\\\" />\n </header>\n <p class=\\\"date-paragraph\\\">تاریخ چاپ : <br /> $date4</p>\n </htmlpageheader>\n <h3 class=\\\"h2\\\">\n <bold>$title</bold>\n </h3>\". \n\n ($type && $confirmDate && $number ? \"<table class=\\\"headerTableTD\\\" width=100% dir=\\\"rtl\\\">\n <tr>\n <td>\n <p>\n نوع: $type \n </p>\n </td>\n <td style=\\\"text-align: center;\\\">\n <p>\n تاریخ تصویب: $confirmDate \n </p>\n </td>\n <td style=\\\"text-align: left;\\\">\n <p>\n شماره: $number\n </p>\n </td>\n </tr>\n </table>\n \": ''). \n \"<div class=\\\"p\\\" style=\\\"direction: rtl;\\\">\n $body\n </div>\n <htmlpagefooter name=\\\"Chapter2FooterOdd\\\" style=\\\"display:none\\\">\n <footer class=\\\"footer\\\">\n <img src=\\\"images/2.jpg\\\" width=\\\"100%\\\" />\n </footer>\n </htmlpagefooter>\n </body>\n </html>\n \";\n\n\n // Some Codes Commented That May We need Later ----------------------------------------------------------------\n // $header = \"\n // <header class=\\\"header\\\">\n // <img src=\\\"1.jpg\\\" width=\\\"100%\\\" />\n // </header>\n // <p class=\\\"date-paragraph\\\">تاریخ چاپ :$date4</p>\";\n\n // $mpdf->SetHTMLHeader($header);\n\n\n // $mpdf->SetHTMLFooter('\n // <footer class=\"footer\">\n // <img src=\"2.jpg\" width=\"100%\" />\n // </footer>');\n\n // Load Our Html -----------------------------------------------------------------------------------------------\n $mpdf->WriteHTML($data);\n ob_end_clean();\n // Store Print -------------------------------------------------------------------------------------------------\n return $mpdf->Output();\n}", "title": "" }, { "docid": "0da8924432cdaa094f38a09eef3529ed", "score": "0.571312", "text": "private function buildPdf()\n {\n require_once('PDF_ImageAlpha.php');\n $tempdir = $this->tempdir;\n $resource_dir = $this->container->getParameter('kernel.root_dir') . '/Resources/MapbenderPrintBundle';\n $format = $this->data['format'];\n\n if ($format == 'a2') {\n $format = array(420, 594);\n }\n\n if ($format == 'a1') {\n $format = array(594, 841);\n }\n\n if ($format == 'a0') {\n $format = array(841, 1189);\n }\n\n $this->pdf = new PDF_ImageAlpha($this->orientation, 'mm', $format);\n //$this->pdf = new FPDF_FPDI($this->orientation,'mm',$format);\n $pdf = $this->pdf;\n $template = $this->data['template'];\n $pdffile = $resource_dir . '/templates/' . $template . '.pdf';\n $pagecount = $pdf->setSourceFile($pdffile);\n $tplidx = $pdf->importPage(1);\n\n $pdf->SetAutoPageBreak(false);\n $pdf->addPage();\n $pdf->useTemplate($tplidx);\n\n foreach ($this->conf['fields'] as $k => $v) {\n $pdf->SetFont('Arial', '', $this->conf['fields'][$k]['fontsize']);\n $pdf->SetXY($this->conf['fields'][$k]['x'] * 10,\n $this->conf['fields'][$k]['y'] * 10);\n switch ($k) {\n case 'date' :\n $date = new \\DateTime;\n $pdf->Cell($this->conf['fields']['date']['width'] * 10,\n $this->conf['fields']['date']['height'] * 10,\n $date->format('d.m.Y'));\n break;\n case 'scale' :\n if (isset($this->data['scale_select'])) {\n $pdf->Cell($this->conf['fields']['scale']['width'] * 10,\n $this->conf['fields']['scale']['height'] * 10,\n '1 : ' . $this->data['scale_select']);\n } else {\n $pdf->Cell($this->conf['fields']['scale']['width'] * 10,\n $this->conf['fields']['scale']['height'] * 10,\n '1 : ' . $this->data['scale_text']);\n }\n break;\n default:\n if (isset($this->data['extra'][$k])) {\n $pdf->MultiCell($this->conf['fields'][$k]['width'] * 10,\n $this->conf['fields'][$k]['height'] * 10,\n $this->data['extra'][$k]);\n }\n break;\n }\n }\n\n // draw features\n if ($this->data['rotation'] == 0 && isset($this->data['features'])) {\n $this->drawFeatures();\n }\n\n if ($this->data['rotation'] == 0) {\n\n $pdf->Image($this->finalimagename, $this->x_ul,\n $this->y_ul, $this->width, $this->height, 'png', '', false,\n 0, 5, -1 * 0);\n\n $pdf->Rect($this->x_ul, $this->y_ul, $this->width, $this->height);\n if (isset($this->conf['northarrow'])) {\n $pdf->Image($resource_dir . '/images/northarrow.png',\n $this->conf['northarrow']['x'] * 10,\n $this->conf['northarrow']['y'] * 10,\n $this->conf['northarrow']['width'] * 10,\n $this->conf['northarrow']['height'] * 10);\n }\n } else {\n $pdf->Image($this->finalimagename, $this->x_ul, $this->y_ul,\n $this->width, $this->height, 'png', '', false, 0, 5, -1 * 0);\n\n $pdf->Rect($this->x_ul, $this->y_ul, $this->width, $this->height);\n if (isset($this->conf['northarrow'])) {\n $this->rotateNorthArrow();\n }\n }\n\n // add overview map\n if (isset($this->data['overview']) && isset($this->conf['overview']) ) {\n $this->getOverviewMap();\n }\n\n // add scalebar\n if (isset($this->conf['scalebar']) ) {\n $this->drawScaleBar();\n }\n\n unlink($this->finalimagename);\n\n return $pdf->Output(null, 'S');\n }", "title": "" }, { "docid": "b2481d4d52a1a96f97e4d20871f37f8b", "score": "0.5708948", "text": "function printOrder(){\r\n\trequire \"../lib/FPDF/fpdf.php\";\r\n\r\n\tclass PDF extends FPDF\r\n\t{\r\n\r\n\t var $B;\r\n\t var $I;\r\n\t var $U;\r\n\t var $HREF;\r\n\r\n\t function PDF($orientation='P', $unit='mm', $size='A4'){\r\n\t // Call parent constructor\r\n\t $this->FPDF($orientation,$unit,$size);\r\n\t // Initialization\r\n\t $this->B = 0;\r\n\t $this->I = 0;\r\n\t $this->U = 0;\r\n\t $this->HREF = '';\r\n\t }\r\n\t function get_data(){\r\n\t include \"../include/connect_db.php\";\r\n\r\n\t $id = $_GET['id']; \r\n\r\n\t $order_id = 0;\r\n\t $article_id = \"\";\r\n\t $article = \"\";\r\n\t $quantity = \"\";\r\n\t $price = \"\";\r\n\t $tot_price = \"\";\r\n\t $email = \"\";\r\n\t $full_name = \"\";\r\n\t $residental_address = \"\";\r\n\t $zip_code = \"\";\r\n\t $country = \"\";\r\n\t $mobile_number = \"\";\r\n\t $city = \"\";\r\n\t $region = \"\";\r\n\t $time = \"\";\r\n\r\n\t $data = array();\r\n\r\n\t $sql = \"SELECT * FROM shipping WHERE order_id=$id\";\r\n\t $sth = $pdo->prepare($sql);\r\n\t $sth->execute();\r\n\r\n\t $result = $sth->fetchAll();\r\n\t foreach($result as $row){\r\n\t $data[0] = $row['full_name'];\r\n\t $data[1] = $row['email'];\r\n\t $data[2] = $row['country'];\r\n\t $data[3] = $row['region'];\r\n\t $data[4] = $row['city'];\r\n\t $data[5] = $row['residental_adress'];\r\n\t $data[6] = $row['zip_code'];\r\n\t $data[7] = $row['mobile_number'];\r\n\t $data[8] = $row['time'];\r\n\t $data[9] = $row['order_id'];\r\n\t $data[10] = $row['article_id'];\r\n\t $data[11] = $row['article_name'];\r\n\t $data[12] = $row['quantity'];\r\n\t $data[13] = $row['price'];\r\n\t $data[14] = $row['tot_price'];\r\n\t \r\n\t }\r\n\r\n\t return $data;\r\n\t }\r\n\r\n\t function OpenTag($tag, $attr){\r\n\t // Opening tag\r\n\t if($tag=='B' || $tag=='I' || $tag=='U')\r\n\t $this->SetStyle($tag,true);\r\n\t if($tag=='A')\r\n\t $this->HREF = $attr['HREF'];\r\n\t if($tag=='BR')\r\n\t $this->Ln(5);\r\n\t }\r\n\r\n\t function SetStyle($tag, $enable){\r\n\t // Modify style and select corresponding font\r\n\t $this->$tag += ($enable ? 1 : -1);\r\n\t $style = '';\r\n\t foreach(array('B', 'I', 'U') as $s)\r\n\t {\r\n\t if($this->$s>0)\r\n\t $style .= $s;\r\n\t }\r\n\t $this->SetFont('',$style);\r\n\t }\r\n\r\n\t function CloseTag($tag){\r\n\t // Closing tag\r\n\t if($tag=='B' || $tag=='I' || $tag=='U')\r\n\t $this->SetStyle($tag,false);\r\n\t if($tag=='A')\r\n\t $this->HREF = '';\r\n\t }\r\n\r\n\t function PutLink($URL, $txt){\r\n\t // Put a hyperlink\r\n\t $this->SetTextColor(0,0,255);\r\n\t $this->SetStyle('U',true);\r\n\t $this->Write(5,$txt,$URL);\r\n\t $this->SetStyle('U',false);\r\n\t $this->SetTextColor(0);\r\n\t }\r\n\r\n\t // Simple table\r\n\t function content($data)\r\n\t {\r\n\t /*-----Header-----*/\r\n\r\n\t // Logo\r\n\t //$this->Image('logo.png',10,6,30);\r\n\t // Arial bold 15\r\n\t $this->SetFont('Arial','B',15);\r\n\t // Move to the right\r\n\t $this->Cell(80);\r\n\t // Title\r\n\t $this->Cell(30,10,\"Order list for order: \".$data[9].\"\");\r\n\t // Line break\r\n\t $this->Ln(20);\r\n\r\n\t /*-----end of header-----*/\r\n\r\n\t $text = array(\r\n\t \"Name: \",\r\n\t \"Email: \",\r\n\t \"Country: \",\r\n\t \"Region: \",\r\n\t \"City: \",\r\n\t \"Residental address: \",\r\n\t \"Zip code: \",\r\n\t \"Mobile number: \",\r\n\t \"Time ordered: \"\r\n\t );\r\n\r\n\t $this->SetFont('Arial','B',12);\r\n\t $this->Cell(30,10,\"Customer information:\");\r\n\t $this->Ln(10);\r\n\r\n\t for($i = 0; $i < count($text); $i++){\r\n\t $this->SetFont('Arial','B',10);\r\n\t $this->Cell(40,10,$text[$i]);\r\n\t $this->SetFont('Arial','',10);\r\n\t $this->Cell(60,10,$data[$i]);\r\n\t $this->Ln(5);\r\n\t }\r\n\r\n\t $this->Ln(15);\r\n\r\n\t $this->SetFont('Arial','B',12);\r\n\t $this->Cell(30,10,\"Products:\");\r\n\t $this->Ln(10);\r\n\r\n\r\n\t $articles = array();\r\n\t for($i = 0; $i < 4; $i++){\r\n\t $articles[$i] = $data[$i+10];\r\n\t }\r\n\r\n\t $w = array(\"Article id: \", \"Article name: \", \"Quantity: \", \"Price: \");\r\n\t // Data\r\n\t $this->SetFont('Arial','B',10);\r\n\t for($i=0; $i < count($w); $i++){\r\n\t $this->Cell(47,10,$w[$i],1,0,'C');\r\n\t }\r\n\t $this->Ln();\r\n\r\n\t $string = \"\";\r\n\t $x=$this->GetX();\r\n\t $y=$this->GetY();\r\n\r\n\t $this->Ln(10);\r\n\t $this->SetXY($x,$y);\r\n\t $this->MultiCell(47,10,$articles[0],0,'C');\r\n\t $this->SetXY($x+47,$y);\r\n\t $this->MultiCell(47,10,$articles[1],0,'C');\r\n\t $this->SetXY($x+94,$y);\r\n\t $this->MultiCell(47,10,$articles[2],0,'C');\r\n\t $this->SetXY($x+141,$y);\r\n\t $this->MultiCell(47,10,$articles[3],0,'C');\r\n\t //$this->Ln(10);\r\n\t //$this->SetXY($x+141,$y);\r\n\t $this->MultiCell(191,10,\"Total price: \".$data[14].\" Kr\",0,'R');\r\n\t $this->Cell(0,0,'','T');\r\n\t }\r\n\r\n\t // Page footer\r\n\t function Footer(){\r\n\t // Position at 1.5 cm from bottom\r\n\t $this->SetY(-15);\r\n\t // Arial italic 8\r\n\t $this->SetFont('Arial','I',8);\r\n\t // Page number\r\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n\t }\r\n\t}\r\n\r\n\t // Instanciation of inherited class\r\n\t $pdf = new PDF();\r\n\r\n\t $data = $pdf->get_data();\r\n\r\n\t //$pdf->SetAutoPageBreak(false);\r\n\t $pdf->AliasNbPages();\r\n\t $pdf->AddPage();\r\n\t $pdf->SetFont('Times','',12);\r\n\t $pdf->content($data);\r\n\t $pdf->Output();\r\n}", "title": "" }, { "docid": "b8d6b63c6e0e5301c4bbc23c0c1bbf08", "score": "0.570081", "text": "function categorias()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulCategoria'] = $this->Pdf_model->getPdfcategoria();\n \t\t\t$html= $this->load->view('pdf/categorias', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}", "title": "" }, { "docid": "63c5ea1e44b4f4857dd220b273a58f0e", "score": "0.56956834", "text": "function to_pdf(){\n $plataforma= $_SERVER[\"HTTP_HOST\"];\n\n date_default_timezone_set(\"America/Argentina/Buenos_Aires\");\n $date = date(\"Y-m-d H:i:s\");\n $dias = array(\"Domingo\",\"Lunes\",\"Martes\",\"Miercoles\",\"Jueves\",\"Viernes\",\"Sábado\");\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n $fecha = $dias[date('w')].\" \".date('j').\" de \".$meses[date('n')-1]. \" del \".date('Y').\", \".date(\"H:i:s\") ;\n $escudo = $_SERVER[\"DOCUMENT_ROOT\"].\"/_code/vistas/img/escudo.png\";\n $municipalidad_nombre = MUNICIPALIDAD;\n\n\n $alumno = new Alumno();\n $alumno->set_run($_POST[\"run_alumno\"]);\n $alumno->validar_run();\n $run_alumno = $alumno->get_run();\n\n $matricula = new Matricula();\n $matricula->set_run_alumno($run_alumno);\n $matricula->set_periodo($_POST[\"periodo\"]);\n $matricula->set_rbd_establecimiento($_POST[\"rbd_establecimiento\"]);\n $matricula->db_get_matricula_by_run_alumno_and_rbd_esta_and_periodo();\n\n $matricula_numero = $matricula->get_id_matricula();\n $tipo_ensenanza = new TipoEnsenanza();\n $tipo_ensenanza->set_id_tipo_ensenanza($matricula->get_id_tipo_ensenanza());\n $tipo_ensenanza->db_get_tipo_ensenanza_by_id();\n\n $matricula_tipo_ensenanza = $tipo_ensenanza->get_nombre();\n $matricula_periodo = $matricula->get_periodo();\n $matricula_fi = new DateTime($matricula->get_fecha_incorporacion());\n $matricula_fecha_incorporacion = $matricula_fi->format(\"j\").\" de \".$meses[$matricula_fi->format(\"n\")-1].\" de \".$matricula_fi->format(\"Y\");\n\n $curso = new Curso();\n $curso->set_id_curso($matricula->get_id_curso());\n $curso->db_get_curso_by_id();\n\n $id_grado = $curso->get_id_grado();\n if($curso->get_id_tipo_ensenanza() == 10){\n switch ($curso->get_id_grado()){\n case 4:\n $id_grado = \"Pre-Kinder\";\n break;\n\n case 5:\n $id_grado = \"Kinder\";\n break;\n }\n }\n $matricula_curso = $id_grado.\" \".$curso->get_grupo();\n $run_apoderado = $matricula->get_run_apoderado();\n\n $establecimiento = new Establecimiento();\n $establecimiento->set_rbd_establecimiento($matricula->get_rbd_establecimiento());\n $establecimiento->db_get_establecimiento_by_rbd();\n $establecimiento_nombre = $establecimiento->get_nombre();\n\n $alumno = new Alumno();\n $alumno->set_run($matricula->get_run_alumno());\n $alumno->db_get_alumno_by_run();\n $alumno_nombre_completo = $alumno->get_nombre1().\" \".$alumno->get_nombre2().\" \".$alumno->get_apellido1().\" \".$alumno->get_apellido2();\n $alumno_fn = new DateTime($alumno->get_fecha_nacimiento());\n $alumno_fecha_nacimiento = $alumno_fn->format(\"j\").\" de \".$meses[$alumno_fn->format(\"n\")-1].\" de \".$alumno_fn->format(\"Y\");\n\n $alumno_dir = new Direccion();\n $alumno_dir->set_id_direccion($alumno->get_id_direccion());\n $alumno_dir->db_get_direccion_by_id();\n\n $alumno_comuna = new Comuna();\n $alumno_comuna->set_id_comuna($alumno_dir->get_id_comuna());\n $alumno_comuna->db_get_comuna_by_id();\n\n $alumno_direccion = $alumno_dir->get_calle().\" \"\n .$alumno_dir->get_numero().\" \"\n .$alumno_dir->get_depto().\" \"\n .$alumno_dir->get_sector().\", \"\n .$alumno_comuna->get_nombre();\n\n $apoderado = new Apoderado();\n $apoderado->set_run($matricula->get_run_apoderado());\n $apoderado->db_get_apoderado_by_run();\n $apoderado_nombre_completo = $apoderado->get_nombre1().\" \".$apoderado->get_nombre2().\" \".$apoderado->get_apellido1().\" \".$apoderado->get_apellido2();\n\n $apoderado_dir = new Direccion();\n $apoderado_dir->set_id_direccion($apoderado->get_id_direccion());\n $apoderado_dir->db_get_direccion_by_id();\n\n $apoderado_comuna = new Comuna();\n $apoderado_comuna->set_id_comuna($apoderado_dir->get_id_comuna());\n $apoderado_comuna->db_get_comuna_by_id();\n\n $apoderado_direccion = $apoderado_dir->get_calle().\" \"\n .$apoderado_dir->get_numero().\" \"\n .$apoderado_dir->get_depto().\" \"\n .$apoderado_dir->get_sector().\", \"\n .$alumno_comuna->get_nombre();\n\n $apoderado_telefono_fijo = $apoderado->get_telefono_fijo();\n $apoderado_telefono_celular = $apoderado->get_telefono_celular();\n\n //var_dump($matricula);\n //var_dump($tipo_ensenanza);\n //var_dump($curso);\n\n $html = \"\n <!DOCTYPE HTML>\n <html>\n <head>\n <title>Matricula $date</title>\n <style>\n @page {\n margin: 1cm;\n\n }\n body{\n color: #808080;\n font-family: monospace;\n font-size: x-small;\n }\n table{\n width: 100%;\n }\n table td{\n\n }\n table td.izq{\n width: 30%;\n font-weight: bold ;\n }\n table td.cen{\n width: 1%;\n }\n table td.der{\n width: 69%;\n font-weight: lighter;\n }\n table td.titulo{\n background-color: #AAD4FF;\n text-align: center;\n color: #ffffff;\n }\n\n #header{\n width: 100%;\n }\n #header td.escudo{\n width: 80px;\n text-align: center;\n }\n #header img {\n background-image: url('/_code/vistas/img/escudo.png');\n width: 79px;\n height: 119px;\n }\n #header h1,#header h2,#header h3 {\n margin-bottom: 1px;\n margin-top: 0;\n }\n\n </style>\n </head>\n <body>\n <!-- +++++++++++++++++++++++++CABECERA+++++++++++++++++++++++ -->\n <table id='header'>\n <tr>\n <td class='escudo'>\n <img src='$escudo'>\n </td>\n <td>\n <h1>$municipalidad_nombre</h1>\n <h2>$establecimiento_nombre</h2>\n <h3>Fecha De Emisión: $fecha</h3>\n </td>\n </tr>\n </table><hr>\n <!-- +++++++++++++++++++++++++TITULO+++++++++++++++++++++++ -->\n <h2>Comprobante De Matricula</h2>\n <!-- +++++++++++++++++++++++++Resumen Matricula+++++++++++++++++++++++ -->\n <table>\n <tr>\n <td colspan='3' class='titulo'><h3>Resumen De La Matricula</h3></td>\n </tr>\n <tr>\n <td class='izq'>Periodo</td>\n <td class='cen'>:</td>\n <td class='der'>$matricula_periodo</td>\n </tr>\n <tr>\n <td class='izq'>Numero</td>\n <td class='cen'>:</td>\n <td class='der'>$matricula_numero</td>\n </tr>\n <tr>\n <td class='izq'>Tipo De Enseñanza </td>\n <td class='cen'>:</td>\n <td class='der'>$matricula_tipo_ensenanza</td>\n </tr>\n <tr>\n <td class='izq'>Curso</td>\n <td class='cen'>:</td>\n <td class='der'>$matricula_curso</td>\n </tr>\n <tr>\n <td class='izq'>Fecha De Incorporación</td>\n <td class='cen'>:</td>\n <td class='der'>$matricula_fecha_incorporacion</td>\n </tr>\n\n </table><br/><br/>\n <!-- +++++++++++++++++++++++++DATOS DE ALUMNO+++++++++++++++++++++++ -->\n <table id='tabla_alumno'>\n <tr>\n <td colspan='3' class='titulo'><h3>Datos de Alumno</h3></td>\n </tr>\n <tr>\n <td class='izq'>RUN</td>\n <td class='cen'>:</td>\n <td class='der'>$run_alumno</td>\n </tr>\n <tr>\n <td class='izq'>Nombre Completo</td>\n <td class='cen'>:</td>\n <td class='der'>$alumno_nombre_completo</td>\n </tr>\n <tr>\n <td class='izq'>Fecha De Nacimineto</td>\n <td class='cen'>:</td>\n <td class='der'>$alumno_fecha_nacimiento</td>\n </tr>\n <tr>\n <td class='izq'>Dirección</td>\n <td class='cen'>:</td>\n <td class='der'>$alumno_direccion</td>\n </tr>\n </table><br/><br/>\n <!-- +++++++++++++++++++++++++DATOS DEL CURSO+++++++++++++++++++++++ -->\n\n <!-- +++++++++++++++++++++++++DATOS DE APODERADO+++++++++++++++++++++++ -->\n <table>\n <tr>\n <td colspan='3' class='titulo'><h3>Datos de Apoderado</h3></td>\n </tr>\n <tr>\n <td class='izq'>RUN</td>\n <td class='cen'>:</td>\n <td class='der'>$run_apoderado</td>\n </tr>\n <tr>\n <td class='izq'>Nombre Completo</td>\n <td class='cen'>:</td>\n <td class='der'>$apoderado_nombre_completo</td>\n </tr>\n <tr>\n <td class='izq'>Dirección</td>\n <td class='cen'>:</td>\n <td class='der'>$apoderado_direccion</td>\n </tr>\n <tr>\n <td class='izq'>Teléfono Fijo</td>\n <td class='cen'>:</td>\n <td class='der'>$apoderado_telefono_fijo</td>\n </tr>\n <tr>\n <td class='izq'>Teléfono Celular</td>\n <td class='cen'>:</td>\n <td class='der'>$apoderado_telefono_celular</td>\n </tr>\n </table><br/><br/><hr>\n <h2>Acceso a la plataforma www.$plataforma</h2>\n <table>\n <tr>\n <td colspan='3' class='titulo'><h3>Alumno</h3></td>\n\n </tr>\n <tr>\n <td class='izq'>Usuario</td>\n <td class='cen'>:</td>\n <td class='der'>$run_alumno</td>\n </tr>\n <tr>\n <td class='izq'>Contraseña</td>\n <td class='cen'>:</td>\n <td class='der'>$run_alumno</td>\n </tr>\n </table>\n <br/>\n <table>\n <tr>\n <td colspan='3' class='titulo'><h3>Apoderado</h3></td>\n\n </tr>\n <tr>\n <td class='izq'>Usuario</td>\n <td class='cen'>:</td>\n <td class='der'>$run_apoderado</td>\n </tr>\n <tr>\n <td class='izq'>Contraseña</td>\n <td class='cen'>:</td>\n <td class='der'>$run_apoderado</td>\n </tr>\n </table>\n </body>\n </html>\n\";\n\n//echo $html;\n\n $dompdf = new DOMPDF();\n $dompdf->load_html($html);\n $dompdf->render();\n $dompdf->stream($run_alumno.\".pdf\");\n}", "title": "" }, { "docid": "2eeabd1de7c46a72ede46e1427f4ecd2", "score": "0.569152", "text": "public function pdfAction() {\n //$html = '<h1>Plain HTML</h1>';\n\n // but in this case we will render a symfony view !\n // We are in a controller and we can use renderView function which retrieves the html from a view\n // then we send that html to the user.\n $html = $this->renderView('@Frontend/Default/index.html.twig', array('someDataToView' => 'Something'));\n\n $this->returnPDFResponseFromHTML($html);\n }", "title": "" }, { "docid": "ac1ce1d471613e3744f6681287979868", "score": "0.56909037", "text": "function PDF($or = 'P',$unit = 'mm',$papersize = 'A4') {\n $this->FPDF($or,$unit,$papersize); \n }", "title": "" }, { "docid": "1f8e510ed2ab395a2b4f13e512c9d7ff", "score": "0.5687619", "text": "function PDF_initgraphics($p){}", "title": "" }, { "docid": "4c4953fee389719f4262c552c2c3293b", "score": "0.5682173", "text": "function mycertificatePdf($ID){\n\t\t$data['heading']='My Certificate';\n\t\t//$this->maHeader(); \n\t\t//$this->maLeft(); \n\t\t$UserID = getUserID();\n\t\t$data['module_datac']=$this->muser->getCourseCertificate($ID);\t\t\t\n\t\t$this-> load-> view('my_certificate_pdf',$data);\n\t\t\n\t\t\t// Get output html\n\t\t$html = $this->output->get_output();\n\t\t\n\t\t// Load library\n\t\t$this->load->library('dompdf_gen');\n\t\t\n\t\t// Convert to PDF\n\t\t$this->dompdf->load_html($html);\n\t\t//$dompdf->set_paper('letter', 'landscape');\n\t\t$this->dompdf->set_paper('letter', 'landscape');\n\t\t$this->dompdf->render();\n\t\t$this->dompdf->stream(\"certificate.pdf\", array(\"Attachment\" => false));\n\t\t\n\t\t//$this->maFooter();\n\t}", "title": "" }, { "docid": "5cea1794a91556da4a1bba199cf53720", "score": "0.567266", "text": "public function make(array $config = [])\n {\n return new Pdf('', $config);\n }", "title": "" }, { "docid": "8d8e5ce50dad36261c3fb20b8fc65ae9", "score": "0.5655391", "text": "private function generate()\n {\n//\n// foreach ($this->data[\"fields\"] as $field => $value){\n// $template->setValue(\"\\${{$field}}\", $value);\n// }\n//\n// $template->cloneBlock('table_block', count($this->data['table']));\n// $template->cloneRowAndSetValues('name', $this->data['table'][0]);\n// $template->cloneRowAndSetValues('name', $this->data['table'][1]);\n//// $template->cloneRowAndSetValues('name', $this->data['table'][2]);\n//\n // $template->saveAs('temp1.docx');\n $filename = \"x_contract.pdf\";\n\n $wordPdf= IOFactory::load('x_contract.docx');\n\n//\n//// //Save it\n//// try {\n// // or dompdf\n// Settings::setPdfRendererPath('../vendor/tecnickcom/tcpdf');\n// Settings::setPdfRendererName('TCPDF');\n//// $xmlWriter = IOFactory::createWriter($wordPdf, 'PDF');\n//// } catch (Exception $e) {\n//// var_dump($e->getMessage());\n//// }\n//// $xmlWriter->save($filename);\n Pdf::convert('x_contract.docx', 'rezultatix.pdf');\n\n// $pdfWriter = IOFactory::createWriter($wordPdf , 'PDF');\n//// $pdfWriter->setFont('Time');\n// $pdfWriter->save($filename.\".pdf\");\n// unlink($wordPdf);\n// $this->JoinPDF(['file1.pdf','file2.pdf'], 'output.pdf');\n// $this->setOutputFile(basename($filename));\n }", "title": "" }, { "docid": "cdb88009061226a8780d7efb1dfb9020", "score": "0.5645298", "text": "public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false, $pdfa=false) {\n /* Set internal character encoding to ASCII */\n if (function_exists('mb_internal_encoding') AND mb_internal_encoding()) {\n $this->internal_encoding = mb_internal_encoding();\n mb_internal_encoding('ASCII');\n }\n // set file ID for trailer\n $serformat = (is_array($format) ? json_encode($format) : $format);\n $this->file_id = md5(TCPDF_STATIC::getRandomSeed('TCPDF'.$orientation.$unit.$serformat.$encoding));\n $this->font_obj_ids = array();\n $this->page_obj_id = array();\n $this->form_obj_id = array();\n // set pdf/a mode\n $this->pdfa_mode = $pdfa;\n $this->force_srgb = false;\n // set language direction\n $this->rtl = false;\n $this->tmprtl = false;\n // some checks\n $this->_dochecks();\n // initialization of properties\n $this->isunicode = $unicode;\n $this->page = 0;\n $this->transfmrk[0] = array();\n $this->pagedim = array();\n $this->n = 2;\n $this->buffer = '';\n $this->pages = array();\n $this->state = 0;\n $this->fonts = array();\n $this->FontFiles = array();\n $this->diffs = array();\n $this->images = array();\n $this->links = array();\n $this->gradients = array();\n $this->InFooter = false;\n $this->lasth = 0;\n $this->FontFamily = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica';\n $this->FontStyle = '';\n $this->FontSizePt = 12;\n $this->underline = false;\n $this->overline = false;\n $this->linethrough = false;\n $this->DrawColor = '0 G';\n $this->FillColor = '0 g';\n $this->TextColor = '0 g';\n $this->ColorFlag = false;\n $this->pdflayers = array();\n // encryption values\n $this->encrypted = false;\n $this->last_enc_key = '';\n // standard Unicode fonts\n $this->CoreFonts = array(\n 'courier'=>'Courier',\n 'courierB'=>'Courier-Bold',\n 'courierI'=>'Courier-Oblique',\n 'courierBI'=>'Courier-BoldOblique',\n 'helvetica'=>'Helvetica',\n 'helveticaB'=>'Helvetica-Bold',\n 'helveticaI'=>'Helvetica-Oblique',\n 'helveticaBI'=>'Helvetica-BoldOblique',\n 'times'=>'Times-Roman',\n 'timesB'=>'Times-Bold',\n 'timesI'=>'Times-Italic',\n 'timesBI'=>'Times-BoldItalic',\n 'symbol'=>'Symbol',\n 'zapfdingbats'=>'ZapfDingbats'\n );\n // set scale factor\n $this->setPageUnit($unit);\n // set page format and orientation\n $this->setPageFormat($format, $orientation);\n // page margins (1 cm)\n $margin = 28.35 / $this->k;\n $this->SetMargins($margin, $margin);\n $this->clMargin = $this->lMargin;\n $this->crMargin = $this->rMargin;\n // internal cell padding\n $cpadding = $margin / 10;\n $this->setCellPaddings($cpadding, 0, $cpadding, 0);\n // cell margins\n $this->setCellMargins(0, 0, 0, 0);\n // line width (0.2 mm)\n $this->LineWidth = 0.57 / $this->k;\n $this->linestyleWidth = sprintf('%F w', ($this->LineWidth * $this->k));\n $this->linestyleCap = '0 J';\n $this->linestyleJoin = '0 j';\n $this->linestyleDash = '[] 0 d';\n // automatic page break\n $this->SetAutoPageBreak(true, (2 * $margin));\n // full width display mode\n $this->SetDisplayMode('fullwidth');\n // compression\n $this->SetCompression();\n // set default PDF version number\n $this->setPDFVersion();\n $this->tcpdflink = true;\n $this->encoding = $encoding;\n $this->HREF = array();\n $this->getFontsList();\n $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0);\n $this->strokecolor = array('R' => 0, 'G' => 0, 'B' => 0);\n $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255);\n $this->extgstates = array();\n $this->setTextShadow();\n // signature\n $this->sign = false;\n $this->tsa_timestamp = false;\n $this->tsa_data = array();\n $this->signature_appearance = array('page' => 1, 'rect' => '0 0 0 0', 'name' => 'Signature');\n $this->empty_signature_appearance = array();\n // user's rights\n $this->ur['enabled'] = false;\n $this->ur['document'] = '/FullSave';\n $this->ur['annots'] = '/Create/Delete/Modify/Copy/Import/Export';\n $this->ur['form'] = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';\n $this->ur['signature'] = '/Modify';\n $this->ur['ef'] = '/Create/Delete/Modify/Import';\n $this->ur['formex'] = '';\n // set default JPEG quality\n $this->jpeg_quality = 75;\n // initialize some settings\n TCPDF_FONTS::utf8Bidi(array(''), '', false, $this->isunicode, $this->CurrentFont);\n // set default font\n $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);\n $this->setHeaderFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt));\n $this->setFooterFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt));\n // check if PCRE Unicode support is enabled\n if ($this->isunicode AND (@preg_match('/\\pL/u', 'a') == 1)) {\n // PCRE unicode support is turned ON\n // \\s : any whitespace character\n // \\p{Z} : any separator\n // \\p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words.\n // \\xa0 : Unicode Character 'NO-BREAK SPACE' (U+00A0)\n //$this->setSpacesRE('/(?!\\xa0)[\\s\\p{Z}\\p{Lo}]/u');\n $this->setSpacesRE('/(?!\\xa0)[\\s\\p{Z}]/u');\n } else {\n // PCRE unicode support is turned OFF\n $this->setSpacesRE('/[^\\S\\xa0]/');\n }\n $this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));\n // set document creation and modification timestamp\n $this->doc_creation_timestamp = time();\n $this->doc_modification_timestamp = $this->doc_creation_timestamp;\n // get default graphic vars\n $this->default_graphic_vars = $this->getGraphicVars();\n $this->header_xobj_autoreset = false;\n $this->custom_xmp = '';\n // Call cleanup method after script execution finishes or exit() is called.\n // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal.\n register_shutdown_function(array($this, '_destroy'), true);\n }", "title": "" }, { "docid": "fac6d50a260abca73c90f4e9fdd31eae", "score": "0.5641504", "text": "function PDF($orientation='P', $unit='mm', $size='letter')\n{\n $this->FPDF($orientation,$unit,$size);\n // Iniciación de variables\n $this->B = 0;\n $this->I = 0;\n $this->U = 0;\n $this->HREF = '';\n}", "title": "" }, { "docid": "74b2fa29cb6246ecd3b1f71a8e326fa5", "score": "0.56136036", "text": "public function generatePDF()\n {\n $data = ['title' => 'Welcome to VipsPM'];\n \\View::addLocation(base_path().'/Modules/Estimate/Resources/views');\n $pdf = PDF::loadView('mypdf', $data);\n return $pdf->stream('chetsapp.pdf');\n // return \\View::make('mypdf', compact('data'));\n // return $pdf->save(public_path().'/itsolutionstuff.pdf');\n // return $pdf->download('itsolutionstuff.pdf');\n }", "title": "" }, { "docid": "2637475b3d4405ee867e128da59ee587", "score": "0.56116444", "text": "function __construct() {\n parent::__construct();\n $this->load->model('finance_model');\n\t$this->load->library('pagination');\n $this->load->library('Pdf');\n }", "title": "" }, { "docid": "00083711f82a9f94c2c8e57688e48c47", "score": "0.5605376", "text": "function smarty_modifier_generatePdf($html)\n{\n //Remove menu links\n $html = preg_replace('#<div(.*)class=\\\"z-menu(.*)\\\"(.*)>(.*)</div>#Uis', '', $html);\n \n //Delete status and error messages\n LogUtil::getStatusMessages(true);\n LogUtil::getErrorMessages(true);\n\n //Generate pdf\n $tcpdf = PluginUtil::loadPlugin('SystemPlugin_Tcpdf_Plugin');\n $pdf = $tcpdf->createPdf();\n $pdf->AddPage();\n $pdf->SetFont('dejavusans', '', 12, '', true);\n $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html);\n $pdf->Output(PageUtil::getVar('title') . '.pdf', 'I');\n}", "title": "" }, { "docid": "954200164699e3d13f831920ead5959f", "score": "0.5602911", "text": "public function loadDOGenerator()\n {\n $generatorName = $this->config->getCodeGeneratorName(); \n $classSufix = GenitHelper::generatorNameToClassSufix($generatorName); \n $doClassName = Genit::getDOGeneratorClass($classSufix);\n $doGeneratorFIle = $this->getGeneratorPath() . DIRECTORY_SEPARATOR . $doClassName . '.php';\n include_once $doGeneratorFIle;\n $this->doGen = new $doClassName($this);\n }", "title": "" }, { "docid": "8c423f916424605961bdb05e39ed38e0", "score": "0.5601779", "text": "public function geraPdf()\n {\n // dd($mpdf);\n return view('site/pdf',[]);\n }", "title": "" }, { "docid": "56c94bf0f903ada04fc50feb95f180ee", "score": "0.55916965", "text": "function manidora_printable_pdf($pid, $url = NULL) {\n @include_once 'sites/all/libraries/tcpdf/config/lang/eng.php';\n @include_once 'sites/all/libraries/tcpdf/tcpdf.php';\n require_once dirname(__FILE__) . '/utilities.inc';\n\n // Extend the TCPDF class to create custom Header and Footer.\n class MYPDF extends TCPDF {\n\n /**\n * Constructor.\n */\n public function __construct($pid, $orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = TRUE, $encoding = 'UTF-8', $diskcache = FALSE, $pdfa = FALSE) {\n $this->pid = $pid;\n parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);\n }\n\n /**\n * Page header.\n */\n public function Header() {\n $string = manidora_retrieve_header_text($this->pid);\n if ($string) {\n $this->Cell(0, 15, $string, 0, FALSE, 'C', 0, '', 0, FALSE, 'M', 'M');\n }\n }\n }\n // Create new PDF document.\n $pdf = new MYPDF($pid, PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, TRUE, 'UTF-8', FALSE);\n\n $header_text = manidora_retrieve_header_text($pid);\n if ($header_text) {\n // Parse a bit for use below.\n $header_parts = explode(',', $header_text);\n $title = $header_parts[0];\n }\n else {\n $title = $pid;\n $header_text = $pid;\n }\n // Set document information.\n $pdf->SetTitle($title);\n $pdf->SetSubject($title);\n\n // Set default monospaced font.\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // Set margins.\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n\n // Set auto page breaks.\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n // Set image scale factor.\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n // Set font.\n $pdf->SetFont('times', 'BI', 12);\n\n // If no url was provided (e.g. we're not coming from the clipper),\n // check to see if there's a high quality jpeg derivative. If it does not\n // exist, default to the standard JPG datastream.\n if (!isset($url)) {\n $obj = islandora_object_load($pid);\n $dsid = isset($obj['HQ_JPG']) ? 'HQ_JPG' : 'JPG';\n $url = variable_get('islandora_base_url', 'http://localhost:8080/fedora') . '/objects/' . $pid . '/datastreams/' . $dsid . '/content';\n }\n\n // Add a page.\n $pdf->AddPage();\n // Add the image.\n // Gotta specify almost ALL the parameters to get to the 'fitonpage'\n // parameter. This should fix weird clipping issues between the actual image\n // source and what gets embedded into the PDF.\n $pdf->Image($url, '0', '15', 0, 0, '', '', '', 2, 300, '', FALSE, FALSE, 0, FALSE, FALSE, TRUE);\n\n // Close and output PDF document.\n $pdf->Output($header_text . '.pdf', 'D');\n}", "title": "" }, { "docid": "eb58218f5869e78047c4bc353604d52f", "score": "0.5582807", "text": "function __construct() {\n\t if (isset($_GET[\"judge\"])){\n\t if ($_GET[\"judge\"] == \"all\"){\n\t $judgesArray = self::getJudgesNames();\n\t }\n\t else{\n\t $judgesArray[] = htmlspecialchars($_GET[\"judge\"]);\n\t }\n\t }\n\t else{\n\t $judgesArray[] = \"Allen\";\n\t }\n\t \n\t $header = array('Case Number', 'Defendant','NAC Date', 'Setting');\n\t $pdf = new PDF();\n\n\t //\tLoop through judges add a page for each.\n\t foreach ($judgesArray as $key => $judge) {\n\t $pdf->setJudge( $judge );\n \t$overTimeCases = self::getOverTimeCases( $judge );\n \t// echo \"Printing overtime cases array right before passing to FancyTable:\\n\";\n \t// print_r($overTimeCases); \t\n\t\t$pdf->AddPage();\n \t\t$pdf->FancyTable( $header, $overTimeCases );\n\t }\n\t $pdf->Output();\n\t}", "title": "" }, { "docid": "0dbc2ca2645edd38cd992d8d22a3db7b", "score": "0.55812395", "text": "function buildPdf( $htmlContent, $filename ){\n $mpdf = new mPDF('win-1252', 'A4', '', '', 5, 5, 5, 5, 10, 10);\n $mpdf->SetDisplayMode('fullpage');\n $mpdf->WriteHTML( $htmlContent );\n $mpdf->Output( $filename.\".pdf\", 'D');\n }", "title": "" }, { "docid": "10cacb0224a31581e6a7037929be3284", "score": "0.55808973", "text": "public function cetak_pdf()\n {\n\t\t//ambil semua darta simpan di variabel$tabel_karyawan\n \t//$tabel_karyawan = DB::all();\n \t$tabel_karyawan = DB::table('tabel_karyawan')->paginate(12);\n\n \n\t\t//gunakan dompdf dengan pdf::loadview() sampai nanti buka view\n\t\t//nama view diisu karyawan_pdf\n\t\t//passing data ke profilkarjyawan\n \t$pdf = PDF::loadview('karyawan_pdf',['profilkaryawan'=>$tabel_karyawan]);\n \t//return fungsi download dari package dompdf\n\t\t//return $pdf->download('laporan-karyawan-pdf');\n\t\t//return untuk tampilkan saja\n\t\treturn $pdf->stream();\n\n }", "title": "" }, { "docid": "ba6c5ca121d46b58de0c6aa44a3246b0", "score": "0.5564276", "text": "public function createPDF()\n {\n ini_set('max_execution_time', 180);\n $datas = Employee::all();\n\n // share data to view\n view()->share('employee', $datas);\n $pdf = PDF::loadView('pdf_view', compact('datas'));\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }", "title": "" }, { "docid": "04e9570d09be96813d3784255550ce6f", "score": "0.55586624", "text": "public function index(){\r\n$pdf = new pdf('P','mm','A4');\r\n$pdf->SetMargins(10,10,10);\r\n$pdf->AliasNbPages();\r\n// membuat halaman baru\r\n$pdf->AddPage();\r\n$pdf->SetFont('Times', 'B', 16);\r\n$pdf->Cell(188,2, 'INVOICE',0,1,'C');\r\n\r\n$pdf->Cell(10,9,'',0,1);\r\n$pdf->SetFont('Arial', 'B', 8);\r\n$pdf->Cell(5,5,'Harap Dikirim :',0,0,'L');\r\n$pdf->Cell(20);\r\n$pdf->Cell(5,5,'Bradika Dasantra R',0,1,'L');\r\n\r\n$pdf->Output();\r\n}", "title": "" }, { "docid": "ca8f94eeda4e84d7b9f357f33537c805", "score": "0.5552066", "text": "public function __construct ($orientation = 'P', $unit = 'mm', $size = 'A4')\n {\n $this->_pdf = new WriteHTML();\n $this->_pdf->FPDF($orientation, $unit, $size);\n }", "title": "" }, { "docid": "9f6504cd1c354a8b0602a8df15d6cd81", "score": "0.5547281", "text": "public function returnPDFResponseFromHTML($html) {\n // If you are not in a controller, retrieve of some way the service container and then retrieve it\n //$pdf = $this->container->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n //if you are in a controlller use :\n\n $pdf = $this->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n $pdf->SetAuthor('Our Code World');\n $pdf->SetTitle(('Our Code World Title'));\n $pdf->SetSubject('Our Code World Subject');\n $pdf->setFontSubsetting(true);\n $pdf->SetFont('helvetica', '', 11, '', true);\n //$pdf->SetMargins(20,20,40, true);\n $pdf->AddPage();\n\n $filename = 'ourcodeworld_pdf_demo2';\n\n $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n\n $location = __DIR__ . '/../../../../web/downloads/';\n// VarDumper::dump($location);\n// die();\n\n //dest = I -> Send PDF to the standard output\n //dest = D -> download PDF as file\n //dest = F, FI, FD -> save PDF to a local file\n //dest = E -> return PDF as base64 mime multi-part email attachment (RFC 2045)\n //dest = S -> returns PDF as a string\n $pdf->Output(\"{$location}/{$filename}.pdf\", 'F'); // This will output the PDF as a response directly\n }", "title": "" }, { "docid": "7902cfbeab5f047dbe34a54bf55e9f0a", "score": "0.554061", "text": "public function returnPDFResponseFromHTML($html) {\n // If you are not in a controller, retrieve of some way the service container and then retrieve it\n //$pdf = $this->container->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n //if you are in a controlller use :\n $pdf = $this->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n $pdf->SetAuthor('Our Code World');\n $pdf->SetTitle(('Our Code World Title'));\n $pdf->SetSubject('Our Code World Subject');\n $pdf->setFontSubsetting(true);\n $pdf->SetAutoPageBreak(true, 10);\n // $pdf->SetFont('helvetica', '', 11, '', true);\n $pdf->SetMargins(20, 30, 20, true);\n\n\n $pdf->setPrintFooter(false);\n // $filename = 'ourcodeworld_pdf_demo';\n foreach ($html as $array) {\n $this->logControle->logWeb(print_r($array, true));\n $pdf->SetAuthor($array['nmUser']);\n $pdf->SetTitle(($array['dsTitle']));\n $pdf->SetSubject($array['dsTitle']);\n $filename = 'portfolio_' . $array['nmUser'] . '_' . $array['idPortfolioStudent'];\n $pdf->resetHeaderTemplate();\n\n $pdf->SetHeaderData('', 0, $array['dsTitle'], '');\n $this->logControle->logWeb($array['dsTitle']);\n// set header and footer fonts\n $pdf->setHeaderFont(Array('freeserif', '', 18));\n $pdf->SetHeaderMargin(10);\n $pdf->setPrintHeader(true);\n $pdf->AddPage();\n\n $texto = stripcslashes($array['textoFinal']);\n $texto = preg_replace('/(src=[\"\\'])([^\"\\']+)([\"\\'])/', 'src=\"' . $this->getParameter('web_dir') . '/web/uploads/$2\"', $texto);\n\n\n $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $texto, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $pdf->endPage(); //do end of page\n $pdf->lastPage(); //set cursor at last page, because autopagebreak not do it\n }\n\n $pdf->Output($filename . \".pdf\", 'I'); // This will output the PDF as a response directly\n }", "title": "" }, { "docid": "85539b6ab4d59c635e0c9ac83050b4ed", "score": "0.55323386", "text": "function generate()\n\t{\n\t\tglobal $g_sPDFLibKey;\n\n\t\tif ($this->m_sFileName && sizeof($this->m_aTemplates))\n\t\t{\n\t\t\t// destroy any existing file with this name\n\t\t\tif (file_exists($this->m_sSaveDirectory . $this->m_sFileName))\n\t\t\t{\n\t\t\t\tunlink($this->m_sSaveDirectory . $this->m_sFileName);\n\t\t\t}\n\n\t\t\t// create the PDF object\n\t\t\tif ($t_oPDF = PDF_new())\n\t\t\t{\n\t\t\t\tPDF_set_parameter($t_oPDF, 'license', $g_sPDFLibKey);\n\n\t\t\t\t// load any custom fonts\n\t\t\t\tif (sizeof($this->m_hFonts))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->m_hFonts as $key => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\tPDF_set_parameter($t_oPDF, \"FontOutline\", $key . \"=\" . $this->m_sFontDirectory . $val);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// start the document\n\t\t\t\tif (PDF_begin_document($t_oPDF, $this->m_sSaveDirectory . $this->m_sFileName, \n\t\t\t\t\t'compatibility=1.6 masterpassword=' . $this->m_sMasterPassword . ' permissions={nocopy nomodify}'))\n\t\t\t\t{\n\t\t\t\t\t// loop through each template\n\t\t\t\t\tforeach ($this->m_aTemplates as $key => $t_sTemplate)\n\t\t\t\t\t{\n\t\t\t\t\t\t// check for landscape portrait\n\t\t\t\t\t\tif (substr($t_sTemplate, (strlen($t_sTemplate) - 3), 3) == '~ls')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->resetPageDimensions(true);\n\t\t\t\t\t\t\t$t_sTemplate = substr($t_sTemplate, 0, strlen($t_sTemplate) - 3);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->resetPageDimensions(false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// import the current template\n\t\t\t\t\t\tif ($t_oTemplate = PDF_open_pdi($t_oPDF, $this->m_sTemplateDirectory . $t_sTemplate, 'password=' . $this->m_sMasterPassword, 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// reset the page counter\n\t\t\t\t\t\t\t$t_iPageNo = 1;\n\n\t\t\t\t\t\t\t// loop through each page of the template\n\t\t\t\t\t\t\twhile ($t_oPage = PDF_open_pdi_page($t_oPDF, $t_oTemplate, $t_iPageNo, ''))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// begin a new page\n\t\t\t\t\t\t\t\tPDF_begin_page_ext($t_oPDF, $this->m_iPageWidth, $this->m_iPageHeight, '');\n\t\t\t\t\t\t\t\tPDF_fit_pdi_page($t_oPDF, $t_oPage, 0.0, 0.0, '');\n\n\t\t\t\t\t\t\t\t// loop through each block to be replaced and insert the required value\n\t\t\t\t\t\t\t\tif (isset($this->m_hReplacements[$key + 1]) && sizeof($this->m_hReplacements[$key + 1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach($this->m_hReplacements[$key + 1] as $key2 => $val)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tPDF_fill_textblock($t_oPDF, $t_oPage, $key2, $val, 'embedding=true');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($this->m_hImages[$key + 1]) && sizeof($this->m_hImages[$key + 1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach($this->m_hImages[$key + 1] as $key2 => $val)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$t_oImage = PDF_load_image($t_oPDF, 'auto', $val, '');\n\t\t\t\t\t\t\t\t\t\tPDF_fill_imageblock($t_oPDF, $t_oPage, $key2, $t_oImage, '');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// end the page\n\t\t\t\t\t\t\t\tPDF_close_pdi_page($t_oPDF, $t_oPage);\n\t\t\t\t\t\t\t\tPDF_end_page_ext($t_oPDF, '');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// go on to the next page of the template\n\t\t\t\t\t\t\t\t$t_iPageNo++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// close the template\n\t\t\t\t\t\t\tPDF_close_pdi($t_oPDF, $t_oTemplate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 'unable to load template: ' . PDF_get_errmsg($t_oPDF);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// end the document\n\t\t\t\t\tPDF_end_document($t_oPDF, '');\n\t\n\t\t\t\t\tchmod($this->m_sSaveDirectory . $this->m_sFileName, 0644);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 'unable to create document: ' . PDF_get_errmsg($t_oPDF);\n\t\t\t\t}\n\n\t\t\t\t// delete the PDF object\n\t\t\t\tPDF_delete($t_oPDF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 'unable to create PDF object';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!$this->m_sFileName)\n\t\t\t\treturn 'no filename';\n\t\t\telse\n\t\t\t\treturn 'no template specified';\n\t\t}\n\t}", "title": "" }, { "docid": "3ce1d861317875b6659d9a0f6350026b", "score": "0.5526701", "text": "function getDocPdf()\n{\n\t\tif (session_id()==\"\") session_start();\n\n\t\t$appName = $_SESSION['appli_name'];\n\t\t$filename \t= $appName.\".pdf\";\n\t\t$workdirname\t= $_SERVER['DOCUMENT_ROOT'].\"/onlinecompiler/tmp/\".$_SESSION['id'].\"/workdir/\";\n\t\t$fullname \t= $workdirname.$appName.\"-mdoc/pdf/\".$filename;\n\t\t$size \t\t= filesize($fullname);\n\n\t\theader('Content-Description: File Transfer');\n \theader('Content-Type: application/pdf');\n\t\t//header(\"Content-Length: $size\");\n\t\theader(\"Content-Disposition: attachment; filename=\\\"$filename\\\"\");\n\t\treadfile($fullname);\n\t}", "title": "" }, { "docid": "5387acbe602634914050bc13938f5692", "score": "0.55238897", "text": "public function render($data)\n\t{\n //header(\"Content-type:application/pdf\");\n $html = $this->twig->render('default.html', $data);\n $mpdf = new mPDF();\n $mpdf->WriteHTML($html);\n $mpdf->Output();\n\t}", "title": "" }, { "docid": "d2fd12a7b81612105f05b2c1938ac90e", "score": "0.551675", "text": "public function print_pdf_tienno()\n{\n $this->load->model('m_voxy_package_orders');\n $this->load->model('m_htmltopdf');\n\n // theo tai xe nao\n $shipper_id = $this->input->post('shipper_id');\n $ship_are_id = $this->input->post('shipper_are_id');\n\n $list_id_to_tienno = $this->input->post('list_id_to_nhathang');\n\n if ($list_id_to_tienno != \"\") {\n $list_id_to_tienno = get_object_vars(json_decode($list_id_to_tienno))['list_id'];\n }\n\n $shipper_name = $this->m_voxy_package_orders->get_name_shipper($shipper_id);\n\n $date_for_orders = $this->input->post('date_for_orders');\n $ngay_dat_hang = ($date_for_orders == \"\") ? \"\" : $date_for_orders;\n\n $date_for_orders_end = $this->input->post('date_for_orders_end');\n $ngay_chuyen_hang = ($date_for_orders_end == \"\") ? \"\" : $date_for_orders_end;\n\n $html_content = $this->m_htmltopdf->pdf_day_tienno($list_id_to_tienno, $ngay_dat_hang, $ngay_chuyen_hang, $shipper_id, $ship_are_id);\n\n //var_dump($html_content);die;\n $this->pdf->loadHtml($html_content);\n $this->pdf->setPaper('A4', 'landscape');\n $this->pdf->render();\n $font = $this->pdf->getFontMetrics()->get_font(\"helvetica\", \"\");\n $this->pdf->getCanvas()->page_text(72, 18, \"Trang: {PAGE_NUM} of {PAGE_COUNT}\", $font, 8, array(0, 0, 0));\n $this->pdf->stream($ngay_chuyen_hang . \"-\" . $shipper_name . \".pdf\", array(\"Attachment\" => 0));\n}", "title": "" }, { "docid": "772e044f19f6764ce595f88c96745673", "score": "0.5513773", "text": "function pdf($nombres,$nombre_curso,$fecha_inicio,$fecha_fin,$docente_curso,$promedio,$qr,$horas,$descripcion,$pdf)\n {\n $data['title']='Certificados';\n $data['persona']= $nombres;\n $data['curso']= $nombre_curso;\n \n \n $data['fechaini']= $fecha_inicio;\n $data['fechafin']= $fecha_fin;\n \n \n $data['docente']=$docente_curso;\n $data['promedio']=$promedio;\n $data['qr']= $qr;\n $data['horas']= $horas;\n $data['descripcion']= $descripcion;\n \n \n $meses = array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n \n $data['fechahoy']= strftime(\" %d de \".$meses[date('n')-1].\", %Y\");\n \n $this->createFolder();\n \n //importante el slash del final o no funcionará correctamente\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\n \n //establecemos el nombre del archivo\n $archivo=$pdf.\".pdf\";\n $this->html2pdf->filename($archivo);\n \n //establecemos el tipo de papel\n $this->html2pdf->paper('a4', 'landscape');\n if($promedio>=14){\n // $this->load->view('certificado/pdf', $data); \n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_certificado_aprobado', $data,true)));//certificado aprobado\n \n } else if($promedio<=14&&$promedio>=10) {\n // $this->load->view('certificado/pdf3', $data); \n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_certificado_asistente', $data,true)));//certificado asistido\n }\n else if($promedio==-1){ // ceritificado para docente\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_plantilla_certificado_docente', $data,true)));\n }\n //si el pdf se guarda correctamente lo mostramos en pantalla\n if($this->html2pdf->create('save')) \n { \n // $this->show($archivo);\n }\n }", "title": "" }, { "docid": "6c4dbac741b862b2584d8ad14f310ad0", "score": "0.55106485", "text": "function creatPDF($filename)\n{\n$pdf = new TCPDF('P', 'pt', 'A4', true, 'UTF-8', false);\n// set document information\n//$pdf->SetCreator(PDF_CREATOR);\n//$pdf->SetAuthor('Nicola Asuni');\n//$pdf->SetTitle('TCPDF Example 021');\n//$pdf->SetSubject('TCPDF Tutorial');\n//$pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n\n// set default header data\n//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\n\n// set header and footer fonts\n//$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n$pdf->setPrintHeader(false);\n// set default monospaced font\n$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n//set margins\n$pdf->SetMargins(0, 0, 0);\n//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n//set auto page breaks\n$pdf->SetAutoPageBreak(TRUE, 0.1);\n\n//set image scale factor\n$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n//set some language-dependent strings\n$pdf->setLanguageArray($l);\n\n// ---------------------------------------------------------\n\n// set font\n$pdf->SetFont('helvetica', '', 8);\n\n// add a page\n$pdf->AddPage();\n\n// read html content\n$html = file_get_contents($filename, FILE_TEXT, NULL);\n// create some HTML content\n\n\n// output the HTML content\n//$pdf->writeHTML($html, true, 0, true, 0);\n$pdf->writeHTML($html, false, 0, true, 0, 'L');\n\n// reset pointer to the last page\n$pdf->lastPage();\n\n// ---------------------------------------------------------\n\n//Close and output PDF document\n$pdf->Output('pog.pdf', 'I');\n}", "title": "" }, { "docid": "ead26fc605aa1831abb8a7d20f3fbf3f", "score": "0.5504382", "text": "public function render($content)\n {\n $mpdf = new \\mPDF('c', 'A4', 10, 'Helvetica');\n\n //$mpdf->mirrorMargins = 1;\n $mpdf->SetDisplayMode('fullpage', 'single');\n\n //configuracion\n $mpdf->defaultheaderfontsize = 8;\n $mpdf->defaultheaderfontstyle = \"I\";\n $mpdf->defaultfooterfontsize = 8;\n $mpdf->defaultfooterfontstyle = \"I\";\n\n $mpdf->allow_charset_conversion = true;\n $mpdf->ignore_invalid_utf8 = true;\n\n //header\n $mpdf->setHeader($this->config['title']);\n //footer\n $date = $date = date(\"r\");\n $footer = \"Documentation is powered by nicereadme and generated on $date\";\n $mpdf->SetFooter($footer.' | | {PAGENO} / {nb}');\n\n // $mpdf->h2toc = array('H2'=>0);\n $mpdf->h2bookmarks = array(\n \"H1\" => 0,\n \"H2\" => 1,\n \"H3\" => 2,\n \"H4\" => 3,\n \"H5\" => 4,\n \"H6\" => 5\n );\n\n //contenido\n $mpdf->WriteHTML($this->extraHtml().$content);\n\n //metadata\n $mpdf->SetTitle($this->config['title']);\n $mpdf->SetAuthor($this->config['copyright']);\n\n //output\n $mpdf->Output(realpath($this->config['output']).\"/\".$this->config['filename'].\".pdf\");\n }", "title": "" }, { "docid": "9249e877f86599dd3aca3078b8390574", "score": "0.54954094", "text": "public function __construct()\n {\n self::$handler = array(\n new ezcDocumentPdfPhpImageHandler(),\n );\n }", "title": "" }, { "docid": "85512c6e23d3b02768cd9b1a321603f1", "score": "0.5493261", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->load->library(array('Mpdf'));\n $this->load->model(array('Barang/Barang_model',\n 'Reportstokcolly/Reportstokcolly_model',\n 'Cabang/Cabang_model',\n 'Aktifitas/aktifitas_model'\n ));\n\n date_default_timezone_set(\"Asia/Bangkok\");\n\n $this->template->title('Report Stock Colly');\n $this->template->page_icon('fa fa-table');\n }", "title": "" }, { "docid": "a3a18c262d3e5353f722f88102ee2d5a", "score": "0.54834175", "text": "public function export(){\n $html = '<table><tr><td>First_name</td><td>last_name</td><td>email</td><td>phone</td><td>company</td></tr> ';\n\n $res = DB::table('employees')->leftJoin('companies','employees.Company','=','companies.id')\n ->select('employees.First_name','employees.last_name','employees.email','employees.phone','companies.name as company_name')->get();\n\n foreach ( $res as $emp ){\n $html .= '<tr><td>'.$emp->First_name.'</td><td>'.$emp->last_name.'</td><td>'.$emp->email.'</td><td>'.$emp->phone.'</td><td>'.$emp->company_name.'</td></tr>';\n }\n\n $html .= '</table>';\n\n //$pdf = App::make('dompdf.wrapper');\n $pdf = new Dompdf();\n\n $pdf->loadHTML( $html );\n return $pdf->stream();\n }", "title": "" }, { "docid": "f0a85da37d13574e95533001535d9bdb", "score": "0.5481148", "text": "public function pdfinformes($cauditoriainspeccion,$fservicio,$cchecklist) {\n\t\t$this->load->library('pdfgenerator');\n\t\t$filename = \"Document_name\";\n\n \n $html = '<html>\n <head>\n <style>\n @page {\n margin-top: 30px;\n margin-right: 40px;\n margin-left: 40px;\n }\n \n body {\n margin-top: 3cm;\n margin-left: 2cm;\n margin-right: 2cm;\n margin-bottom: 2cm;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 9pt;\n }\n \n header {\n position: fixed;\n top: 0cm;\n left: 0cm;\n right: 0cm;\n }\n\n main {\n top: 0cm;\n left: 0cm;\n right: 0cm;\n }\n \n #cover { \n margin-top: 200px;\n left: 0px; \n right: 0px; \n text-align: center; \n font-size: 12pt;\n line-height:200%;\n page-break-after:always;\n }\n #cover table{ \n text-align: center;\n }\n \n #contained { \n }\n \n table {\n border-collapse: collapse;\n } \n .marco-sup{\n border-collapse: collapse;\n border: 1px solid black;\n border-bottom-style: hidden;\n background: #eee;\n }\n .marco-medio{\n border-collapse: collapse;\n border: 1px solid black;\n border-bottom-style: hidden;\n border-top-style: hidden;\n background: #eee;\n }\n .marco-inf{\n border-collapse: collapse;\n border: 1px solid black;\n border-top-style: hidden;\n background: #eee;\n } \n\n th{\n border-collapse: collapse;\n border: 1px solid black;\n background: #eee;\n }\n </style>\n <title>Informe</title>\n </head>\n <body>\n <header>\n \n <table width=\"700px\" align=\"center\" >\n <tr>\n <td width=\"80px\" rowspan=\"5\">\n <img class=\"izquierda\" src=\"./FTPfileserver/Imagenes/formatos/1/logoFS.png\" width=\"180\" height=\"80\" />\n </td>\n <td align=\"right\">Av. Del Pinar 110 of. 405 - 407</td>\n </tr>\n <tr>\n <td align=\"right\">Urb. Chacarilla del Estanque</td>\n </tr>\n <tr>\n <td align=\"right\">Santiago de Surco, Lima - Perú</td>\n </tr>\n <tr>\n <td align=\"right\">(51-1)372-1734 / 372-8182</td>\n </tr>\n <tr>\n <td align=\"right\">www.grupofs.com</td>\n </tr> \n </table>\n\n </header>';\n\n $resultado = $this->mexcelauditoria->getpdfdatosaudi($cauditoriainspeccion,$fservicio);\n if ($resultado){\n foreach($resultado as $row){\n $NROINFORME = $row->NROINFORME;\t\n $SERVICIO = $row->SERVICIO;\t\n $SUBSERVICIO = $row->SUBSERVICIO;\t\n $CLIENTE = $row->CLIENTE;\t\n $FSERVICIO = $row->FSERVICIO;\n $ESTABLECIMIENTO = $row->ESTABLECIMIENTO;\n $TEXTFECHA = $row->TEXTFECHA;\n }\n }\n $html .= '\n <main> \n\n <div id=\"cover\">\n <table width=\"500px\" align=\"center\">\n <tr>\n <td>INFORME N° '.$NROINFORME.'</td>\n </tr>\n <tr>\n <td style=\"height:100px;\"></td>\n </tr>\n <tr>\n <td class=\"marco-sup\">'.$SERVICIO.' - '.$SUBSERVICIO.'</td>\n </tr>\n <tr>\n <td class=\"marco-medio\" style=\"height:10px;\"></td>\n </tr>\n <tr>\n <td class=\"marco-inf\">'.$CLIENTE.'</td>\n </tr>\n <tr>\n <td class=\"marco-inf\">'.$ESTABLECIMIENTO.'</td>\n </tr>\n <tr>\n <td style=\"height:300px\" >&nbsp;</td>\n </tr>\n <tr>\n <td>'.$TEXTFECHA.'</td>\n </tr>\n </table>\n\n </div> \n\n <div id=\"contained\">\n <b>RESUMEN</b> \n <br>&nbsp;<br>\n\n <table width=\"600px\" align=\"center\" style=\"border: 1px solid black;\">\n <thead>\n <tr>\n <td align=\"center\" colspan=\"3\"><b>PUNTUACION POR AREA</b></td>\n </tr>\n <tr>\n <th>AREA/ZONA</th>\n <th>NOTA</th>\n <th>CALIFICACION</th>\n </tr>\n </thead>\n <tbody>'; \n $reszona = $this->mexcelauditoria->getpdfcalifzona($cauditoriainspeccion,$fservicio);\n if ($reszona){\n foreach($reszona as $rowzona){\n $destablearea = $rowzona->destablearea;\t\n $calificacion = $rowzona->calificacion;\t\n $ddetallecriterioresultado = $rowzona->ddetallecriterioresultado;\n $html .= \n '<tr>\n <td>'.$destablearea.'</td>\n <td align=\"center\">'.$calificacion.'</td>\n <td>'.$ddetallecriterioresultado.'</td>\n </tr>';\n }\n }\n $html .= '\n </tbody>\n </table>\n <br>&nbsp;<br>\n <br>&nbsp;<br>\n <b>DETALLE</b> \n <br>&nbsp;<br>';\n\n if ($reszona){\n foreach($reszona as $rowdet){\n $destableareadet = $rowdet->destablearea;\n $establearea = $rowdet->cestablearea;\n \n $html .= ' \n <table width=\"600px\" align=\"center\" style=\"border: 1px solid black;\">\n <thead>\n <tr>\n <td align=\"center\" colspan=\"4\"><b>'.$destableareadet.'</b></td>\n </tr>\n <tr>\n <th align=\"center\">ID</th>\n <th>5S</th>\n <th>TITULO</th>\n <th align=\"center\">PUNTOS</th>\n </tr>\n </thead>';\n \n $parametrosCabecera = array( \n '@idaudi'\t=> $cauditoriainspeccion,\n '@fechaaudi'\t=> $fservicio,\n '@cestablearea'\t=> $establearea\n );\n $rptCabecera = $this->mexcelauditoria->xlschecklistresult($parametrosCabecera);\n if ($rptCabecera){ \n $icabe = 0;\n foreach($rptCabecera as $rowcabecera){\n $cincoS = $rowcabecera->cincoS;\n $titulo = $rowcabecera->titulo;\n $valorsubtotal = $rowcabecera->valorsubtotal;\t\n \n $icabe++;\n $html .= '\n <tr>\n <td>S'.$icabe.'</td>\n <td>'.$cincoS.'</td>\n <td>'.$titulo.'</td>\n <td>'.$valorsubtotal.'</td>\n </tr>';\n }\n }\n $html .= '\n </table>\n <br>&nbsp;<br>\n <br>&nbsp;<br>';\n }\n }\n $html .= '\n <b>HALLAZGOS</b> \n <br>&nbsp;<br>';\n if ($reszona){\n foreach($reszona as $rowhallazgozona){\n $destableareazona = $rowhallazgozona->destablearea;\n $cestableareazona = $rowhallazgozona->cestablearea;\n $cchecklist = $rowhallazgozona->cchecklist;\n \n $html .= ' \n <table width=\"600px\" align=\"center\" style=\"border: 1px solid black;\">\n <thead>\n <tr>\n <td align=\"center\" colspan=\"3\"><b>'.$destableareazona.'</b></td>\n </tr>'; \n $reshallazgocab = $this->mexcelauditoria->getpdfhallazgocab($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona);\n if ($reshallazgocab){\n foreach($reshallazgocab as $rowhallazgocab){\n $crequisitohcab = $rowhallazgocab->crequisito;\t\n $drequisitohcab = $rowhallazgocab->drequisito;\n $html .= '\n <tr>\n <th align=\"center\">ID</th>\n <th>'.$drequisitohcab.'</th>\n <th>HALLAZGOS</th>\n </tr>\n </thead>';\n $reshallazgodet = $this->mexcelauditoria->getpdfhallazgodet($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona,$crequisitohcab);\n if ($reshallazgodet){ \n $idet = 0;\n foreach($reshallazgodet as $rowhallazgodet){\n $drequisito = $rowhallazgodet->drequisito;\t\n $dhallazgo = $rowhallazgodet->dhallazgo;\n $foto\t= $rowhallazgodet->foto;\n $idet++;\n \n $html .= '\n <tbody>\n <tr>\n <td>'.$idet.'</td>\n <td>'.$drequisito.'</td>\n <td>'.$dhallazgo.'</td>\n </tr>\n <tr>\n <td style=\"border: 1px solid black;\" colspan=\"3\"><img class=\"izquierda\" src=\"./'.$foto.'\" width=\"360\" height=\"160\" /></td>\n </tr>\n ';\n }}\n $html .= '\n <tr>\n <td style=\"height:30px\" colspan=\"3\">&nbsp;</td>\n </tr>';\n }}\n $html .= ' \n </tbody>\n </table>';\n }\n }\n $html .= '\n </div>\n </main>\n </body>\n </html>';\n\t\t//echo $html;\n\t\t$this->pdfgenerator->generate($html, $filename);\n\t}", "title": "" }, { "docid": "e3be589d8d22ac99ea19f1b74f2fd540", "score": "0.54800206", "text": "function generatePDF($jsonData) {\n\n $today = date(\"l F j, Y g:i a\");\n\n require_once 'tcpdf/config/lang/eng.php';\n require_once 'tcpdf/tcpdf.php';\n\n // create new PDF document\n $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n // set document information\n $pdf->SetCreator(PDF_CREATOR);\n $pdf->SetAuthor('scripthat.com');\n $pdf->SetTitle('Mortgage Schedule');\n $pdf->SetSubject(\"Loan Details\");\n $pdf->SetKeywords('Loan, Mortgage, Amortization');\n\n // set default header data\n // set default header data\n $pdf->SetHeaderData(\"\", 60, \"Mortgage Information\", \"$today\", array(0,64,255), array(0,64,128));\n\n // set header and footer fonts\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n // set default monospaced font\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n //set margins\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n //set auto page breaks\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n //set image scale factor\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n //set some language-dependent strings\n // ---------------------------------------------------------\n\n // set default font subsetting mode\n $pdf->setFontSubsetting(true);\n\n // Set font\n // dejavusans is a UTF-8 Unicode font, if you only need to\n // print standard ASCII chars, you can use core fonts like\n // helvetica or times to reduce file size.\n $pdf->SetFont('helvetica', '', 8, '', true);\n\n // Add a page\n // This method has several options, check the source code documentation for more information.\n $pdf->AddPage();\n\n\n $html = '<h3>brought to you by ' . WEBSITE . '</h3>';\n $html .= $jsonData['blurb'];\n\n $html .= '<p>Amortization Schedule (P & I)</p>'\n . '<table class=\"schedule scroll\">'\n . '<tr><th><b>Payment</b></th><th><b>Interest</b></th><th><b>Principal</b></th>'\n . '<th><b>New Mortgage</b></th></tr>';\n\n foreach ($jsonData['payment'] as $key => $val) {\n $html .= '<tr><td>' . $val['value'] . '</td><td>' . $val['interest'] . '</td><td>'\n . $val['principal'] . '</td><td>' . $val['newMortgage'] . '</td></tr>';\n }\n $html .= '<p>' . DISCLAIMER . '</p>';\n\n // Print text using writeHTMLCell()\n $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);\n\n // ---------------------------------------------------------\n\n // Close and output PDF document\n // This method has several options, check the source code documentation for more information.\n $pdfString = $pdf->Output('dummy.pdf', 'S');\n\n return $pdfString;\n}", "title": "" }, { "docid": "8713832b845c29585ef3bf57311d7289", "score": "0.5461343", "text": "public function show() {\n\t\tglobal $wgMpdfSimpleOutput;\n\n\t\t$title = $this->getTitle();\n\t\t$output = $this->getOutput();\n\t\t$request = $this->getRequest();\n\n\t\t$titletext = $title->getPrefixedText();\n\t\t$filename = str_replace( [ '\\\\', '/', ':', '*', '?', '\"', '<', '>', \"\\n\", \"\\r\", \"\\0\" ], '_', $titletext );\n\t\t$article = new Article( $title );\n\t\tMediaWikiServices::getInstance()->getHookContainer()->run( 'MpdfGetArticle', [ $title, &$article ] );\n\n\t\tif ( $wgMpdfSimpleOutput ) {\n\t\t\t$article->render();\n\t\t\tob_start();\n\t\t\t$output->output();\n\t\t\t$url = $title->getFullURL();\n\t\t\t$footer = \"<p><em>$url</em></p><h1>$titletext</h1>\\n\";\n\t\t\t$html = $footer . ob_get_clean();\n\t\t} else {\n\t\t\t$output->setPrintable();\n\t\t\t$article->view();\n\t\t\tob_start();\n\t\t\t$output->output();\n\t\t\t$html = ob_get_clean();\n\t\t}\n\n\t\t// Initialise PDF variables\n\t\t$format = $request->getText( 'format' );\n\n\t\t// If format=html in query-string, return html content directly\n\t\tif ( $format == 'html' ) {\n\t\t\t$output->disable();\n\t\t\theader( \"Content-Type: text/html\" );\n\t\t\theader( \"Content-Disposition: attachment; filename=\\\"$filename.html\\\"\" );\n\t\t\tprint $html;\n\t\t} else {\n\t\t\t// return pdf file\n\t\t\t$mode = 'utf-8';\n\t\t\t$format = 'A4';\n\t\t\t$marginLeft = 15;\n\t\t\t$marginRight = 15;\n\t\t\t$marginTop = 16;\n\t\t\t$marginBottom = 16;\n\t\t\t$marginHeader = 9;\n\t\t\t$marginFooter = 9;\n\t\t\t$orientation = 'P';\n\t\t\t$constr1 = explode( '<!--mpdf<constructor', $html, 2 );\n\t\t\tif ( isset( $constr1[1] ) ) {\n\t\t\t\tlist( $constr2 ) = explode( '/>', $constr1[1], 1 );\n\t\t\t\t$matches = [];\n\t\t\t\tif ( preg_match( '/format\\s*=\\s*\"(.*?)\"/', $constr2, $matches ) ) {\n\t\t\t\t\t$format = $matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/margin-left\\s*=\\s*\"?([0-9.]+)/', $constr2, $matches ) ) {\n\t\t\t\t\t$marginLeft = (float)$matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/margin-right\\s*=\\s*\"?([0-9.]+)/', $constr2, $matches ) ) {\n\t\t\t\t\t$marginRight = (float)$matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/margin-top\\s*=\\s*\"?([0-9.]+)/', $constr2, $matches ) ) {\n\t\t\t\t\t\t$marginTop = (float)$matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/margin-bottom\\s*=\\s*\"?([0-9.]+)/', $constr2, $matches ) ) {\n\t\t\t\t\t$marginBottom = (float)$matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/margin-header\\s*=\\s*\"?([0-9.]+)/', $constr2, $matches ) ) {\n\t\t\t\t\t$marginHeader = (float)$matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/margin-footer\\s*=\\s*\"?([0-9.]+)/', $constr2, $matches ) ) {\n\t\t\t\t\t$marginFooter = (float)$matches[1];\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '/orientation\\s*=\\s*\"(.*?)\"/', $constr2, $matches ) ) {\n\t\t\t\t\t$orientation = $matches[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tempDir = wfTempDir();\n\t\t\tif ( !defined( '_MPDF_TEMP_PATH' ) ) {\n\t\t\t\tdefine( \"_MPDF_TEMP_PATH\", \"$tempDir/mpdf/temp/\" );\n\t\t\t\twfMkdirParents( _MPDF_TEMP_PATH );\n\t\t\t}\n\t\t\tif ( !defined( '_MPDF_TTFONTDATAPATH' ) ) {\n\t\t\t\tdefine( '_MPDF_TTFONTDATAPATH', \"$tempDir/mpdf/ttfontdata/\" );\n\t\t\t\twfMkdirParents( _MPDF_TTFONTDATAPATH );\n\t\t\t}\n\n\t\t\t$mpdf = new mPDF( $mode, $format, 0, '', $marginLeft, $marginRight, $marginTop, $marginBottom, $marginHeader, $marginFooter, $orientation );\n\n\t\t\t// Suppress warning messages, because the mPDF library\n\t\t\t// itself generates warnings (due to trying to add\n\t\t\t// variables with a value of 'auto'), and if these get\n\t\t\t// printed out, they can get into the PDF file and make\n\t\t\t// it unreadable.\n\t\t\tif ( function_exists( '\\Wikimedia\\suppressWarnings' ) ) {\n\t\t\t\t// MW 1.31+\n\t\t\t\t\\Wikimedia\\suppressWarnings();\n\t\t\t} else {\n\t\t\t\twfSuppressWarnings();\n\t\t\t}\n\t\t\t$mpdf->WriteHTML( $html );\n\t\t\tif ( function_exists( '\\Wikimedia\\restoreWarnings' ) ) {\n\t\t\t\t// MW 1.31+\n\t\t\t\t\\Wikimedia\\restoreWarnings();\n\t\t\t} else {\n\t\t\t\twfRestoreWarnings();\n\t\t\t}\n\n\t\t\t$mpdf->Output( $filename . '.pdf', 'D' );\n\t\t}\n\t\t$output->disable();\n\t}", "title": "" }, { "docid": "313a1d1605e2d960d87851456f7311c6", "score": "0.54465395", "text": "function pdf_create($title = array(), $content = '', $filename = 'ahms_report', $pstyle = NULL, $download_type = 'I', $print_header = true) {\n $CI = & get_instance();\n $config = $CI->db->get('config')->row_array();\n $orientation = (empty($pstyle)) ? $config[\"printing_style\"] : $pstyle;\n $top_heading = \"\";\n if (!empty($title)) {\n $department = (isset($title['department'])) ? '<b>DEPARTMENT</b>:' . $title['department'] . '' : '';\n $report_title = (isset($title['report_title'])) ? $title['report_title'] : '';\n $from_date = (isset($title['start_date'])) ? '<b>FROM:</b>' . $title['start_date'] : '';\n $to_date = (isset($title['end_date'])) ? '<b>TO: </b>' . $title['end_date'] : '';\n\n $top_heading .= '<table width=\"100%\" style=\"border: none;\">';\n $top_heading .= '<tr>';\n $top_heading .= '<td width=\"33%\">' . $department . '</td>\n <td width=\"33%\" text-align:\"center\"; align=\"center\"><h2>' . $report_title . '</h2></td>\n <td width=\"33%\" style=\"text-align:center;\">'\n . $from_date .\n '&nbsp;\n ' . $to_date . '</td>';\n $top_heading .= '</tr>';\n $top_heading .= '</table><br/><br/>';\n $top_heading .= @$title['extradata'];\n }\n\n //Main content\n $html = '<style type=\"text/css\">' . file_get_contents(FCPATH . '/assets/css/print_table.css') . '</style>';\n $html .= \"<body><div id='content'>\" . $top_heading . $content . \"</div></body>\";\n\n\n $CI->load->library('pdf');\n //ob_start();\n $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);\n // set document information\n $pdf->SetMargins(5, 32, 10, false);\n $pdf->setPrintHeader($print_header);\n $pdf->SetFont(PDF_FONT, '', 10);\n $pdf->AddPage($orientation);\n $pdf->SetMargins(5, 32, 10, true);\n $pdf->writeHTML($html, true, false, true, false, '');\n $pdf->SetFooterMargin(1.5);\n\n ob_end_clean();\n $pdf->Output($filename . '.pdf', $download_type);\n return;\n}", "title": "" }, { "docid": "87eae2a5d83a2247cd363923e7912cc8", "score": "0.544004", "text": "public function pdffoto($cauditoriainspeccion,$fservicio,$cchecklist,$cestablearea) {\n\t\t$this->load->library('pdfgenerator');\n\t\t$filename = \"Document_name\";\n \n $html = '<html>\n <head>\n <style>\n @page {\n margin-top: 30px;\n margin-right: 40px;\n margin-left: 40px;\n }\n \n body {\n margin-top: 3cm;\n margin-left: 2cm;\n margin-right: 2cm;\n margin-bottom: 2cm;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 9pt;\n }\n \n header {\n position: fixed;\n top: 0cm;\n left: 0cm;\n right: 0cm;\n }\n\n main {\n top: 0cm;\n left: 0cm;\n right: 0cm;\n }\n \n #cover { \n margin-top: 200px;\n left: 0px; \n right: 0px; \n text-align: center; \n font-size: 12pt;\n line-height:200%;\n page-break-after:always;\n }\n #cover table{ \n text-align: center;\n }\n \n #contained { \n }\n \n table {\n border-collapse: collapse;\n } \n .marco-sup{\n border-collapse: collapse;\n border: 1px solid black;\n border-bottom-style: hidden;\n background: #eee;\n }\n .marco-medio{\n border-collapse: collapse;\n border: 1px solid black;\n border-bottom-style: hidden;\n border-top-style: hidden;\n background: #eee;\n }\n .marco-inf{\n border-collapse: collapse;\n border: 1px solid black;\n border-top-style: hidden;\n background: #eee;\n } \n\n th{\n border-collapse: collapse;\n border: 1px solid black;\n background: #eee;\n }\n </style>\n <title>Informe</title>\n </head>\n <body>\n <header>\n \n <table width=\"700px\" align=\"center\" >\n <tr>\n <td width=\"80px\" rowspan=\"5\">\n <img class=\"izquierda\" src=\"./FTPfileserver/Imagenes/formatos/1/logoFS.png\" width=\"180\" height=\"80\" />\n </td>\n <td align=\"right\">Av. Del Pinar 110 of. 405 - 407</td>\n </tr>\n <tr>\n <td align=\"right\">Urb. Chacarilla del Estanque</td>\n </tr>\n <tr>\n <td align=\"right\">Santiago de Surco, Lima - Perú</td>\n </tr>\n <tr>\n <td align=\"right\">(51-1)372-1734 / 372-8182</td>\n </tr>\n <tr>\n <td align=\"right\">www.grupofs.com</td>\n </tr> \n </table>\n\n </header>';\n\n $resultado = $this->mexcelauditoria->getpdfdatosaudi($cauditoriainspeccion,$fservicio);\n if ($resultado){\n foreach($resultado as $row){\n $NROINFORME = $row->NROINFORME;\t\n $SERVICIO = $row->SERVICIO;\t\n $SUBSERVICIO = $row->SUBSERVICIO;\t\n $CLIENTE = $row->CLIENTE;\t\n $FSERVICIO = $row->FSERVICIO;\n $ESTABLECIMIENTO = $row->ESTABLECIMIENTO;\n $TEXTFECHA = $row->TEXTFECHA;\n }\n }\n $html .= '\n <main> \n\n <div id=\"contained\">\n <br>&nbsp;<br>\n <br>&nbsp;<br>\n <b>DETALLE</b> \n <br>&nbsp;<br>';\n $html .= '\n <b>HALLAZGOS</b> \n <br>&nbsp;<br>';\n $reszona = $this->mexcelauditoria->getpdfcalifarea($cauditoriainspeccion,$fservicio,$cestablearea);\n if ($reszona){\n foreach($reszona as $rowhallazgozona){\n $destableareazona = $rowhallazgozona->destablearea;\n $cestableareazona = $rowhallazgozona->cestablearea;\n $cchecklist = $rowhallazgozona->cchecklist;\n \n $html .= ' \n <table width=\"600px\" align=\"center\" style=\"border: 1px solid black;\">\n <thead>\n <tr>\n <td align=\"center\" colspan=\"3\"><b>'.$destableareazona.'</b></td>\n </tr>'; \n $reshallazgocab = $this->mexcelauditoria->getpdfhallazgocab($cauditoriainspeccion,$fservicio,$cchecklist,$cestablearea);\n if ($reshallazgocab){\n foreach($reshallazgocab as $rowhallazgocab){\n $crequisitohcab = $rowhallazgocab->crequisito;\t\n $drequisitohcab = $rowhallazgocab->drequisito;\n $html .= '\n <tr>\n <th align=\"center\">ID</th>\n <th>'.$drequisitohcab.'</th>\n <th>HALLAZGOS</th>\n </tr>\n </thead>';\n $reshallazgodet = $this->mexcelauditoria->getpdfhallazgodet($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona,$crequisitohcab);\n if ($reshallazgodet){ \n $idet = 0;\n foreach($reshallazgodet as $rowhallazgodet){\n $drequisito = $rowhallazgodet->drequisito;\t\n $dhallazgo = $rowhallazgodet->dhallazgo;\n $foto\t= $rowhallazgodet->foto;\n $idet++;\n \n $html .= '\n <tbody>\n <tr>\n <td>'.$idet.'</td>\n <td>'.$drequisito.'</td>\n <td>'.$dhallazgo.'</td>\n </tr>\n <tr>\n <td style=\"border: 1px solid black;\" colspan=\"3\"><img class=\"izquierda\" src=\"./'.$foto.'\" width=\"360\" height=\"160\" /></td>\n </tr>\n ';\n }}\n $html .= '\n <tr>\n <td style=\"height:30px\" colspan=\"3\">&nbsp;</td>\n </tr>';\n }}\n $html .= ' \n </tbody>\n </table>';\n }\n }\n $html .= '\n </div>\n </main>\n </body>\n </html>';\n\t\t//echo $html;\n\t\t$this->pdfgenerator->generate($html, $filename);\n\t}", "title": "" } ]
41792e9a40205217f0ebc3f7a4b25c21
set the location of a member
[ { "docid": "30d62418e547f52591db30ce697bb600", "score": "0.57501495", "text": "public function setLocation($IdMember,$geonameid = false)\n {\n \n // Address IdCity address must only consider Populated palces (definition of cities), it also must consider the address checking process\n \n $Rank=0 ; // Rank=0 means the main address, todo when we will deal with several addresses we will need to consider the other rank Values ;\n $IdMember = (int)$IdMember;\n $geonameid = (int)($geonameid);\n \n $errors = array();\n \n if (empty($IdMember)) {\n // name is not set:\n $errors['Name'] = 'Name not set';\n }\n if (empty($geonameid)) {\n // name is not set:\n $errors['Geonameid'] = 'Geoname not set';\n }\n \n // get Member's current Location\n $result = $this->singleLookup(\n \"\nSELECT a.IdCity\nFROM addresses AS a\nWHERE a.IdMember = '{$IdMember}'\n AND a.rank = 0\n \"\n );\n if (!isset($result) || $result->IdCity != $geonameid) {\n // Check Geo and maybe add location \n $geomodel = new GeoModel(); \n if(!$geomodel->getDataById($geonameid)) {\n // if the geonameid is not in our DB, let's add it\n if (!$geomodel->addGeonameId($geonameid,'member_primary')) {\n $vars['errors'] = array('geoinserterror');\n return false;\n }\n } else {\n // the geonameid is in our DB, so just update the counters\n //get id for usagetype:\n $usagetypeId = $geomodel->getUsagetypeId('member_primary')->id;\n $update = $geomodel->updateUsageCounter($geonameid,$usagetypeId,'add');\n }\n \n $result = $this->singleLookup(\n \"\nUPDATE addresses\nSET IdCity = $geonameid\nWHERE IdMember = $IdMember and Rank=\".$Rank\n );\n \n // name is not set:\n if (!empty($result)) $errors['Geonameid'] = 'Geoname not set';\n \n $result = $this->singleLookup(\n \"\nUPDATE members\nSET IdCity = $geonameid\nWHERE id = $IdMember\n \"\n );\n if (!empty($result)) $errors['Geonameid'] = 'Member IdCity not set';\n else $this->logWrite (\"The Member with the Id: \".$IdMember.\" changed his location to Geo-Id: \".$geonameid, \"Members\");\n\n if (empty($errors) && ($m = $this->createEntity('Member')->findById($IdMember)))\n {\n // if a member with status NeedMore updates her/his profile, moving them back to pending\n if ($m->Status == 'NeedMore')\n {\n $m->Status = 'Pending';\n $m->update();\n }\n }\n\n return array(\n 'errors' => $errors,\n 'IdMember' => $result\n );\n } else {\n // geonameid hasn't changed\n return false;\n }\n }", "title": "" } ]
[ { "docid": "8fe36cbe92611af872c68b290e5a4ce6", "score": "0.7234167", "text": "function setMemberPositon($memberPositon){\n $this->memberPositon = $memberPositon; \n }", "title": "" }, { "docid": "18f217980ef803848399508ad7224a14", "score": "0.6944342", "text": "function setMemberAddress($memberAddress){\n $this->memberAddress = $memberAddress; \n }", "title": "" }, { "docid": "e85e734db7b89290b0ab0ea3eef900b0", "score": "0.63971907", "text": "function setMemberName($memberName){\n $this->memberName = $memberName; \n }", "title": "" }, { "docid": "93c03087ed65ae8ba0304091b4ef9373", "score": "0.6317806", "text": "function setMemberUsername($memberUsername){\n $this->memberUsername = $memberUsername; \n }", "title": "" }, { "docid": "eea923c0bf80947adf121e0ad9cbd01d", "score": "0.63035125", "text": "function SetMemberid($value) { $this->memberId=$value; }", "title": "" }, { "docid": "9324bcf7bc2e916b3076386be0b51bfa", "score": "0.61495644", "text": "public function onSetAsSpammer( $member )\n {\n //TODO\n }", "title": "" }, { "docid": "b65c716cd45f6369e322a5a7eb02a824", "score": "0.61425924", "text": "public function setMember(?DirectoryObject $value): void {\n $this->getBackingStore()->set('member', $value);\n }", "title": "" }, { "docid": "a9b96d81e9ef38b0bab933088ded96fd", "score": "0.61352944", "text": "public function setMemberContext(?Member $member): void\n {\n $this->member = $member;\n }", "title": "" }, { "docid": "cdf8d6d04be1b7c5adbeb42d8dfe0271", "score": "0.60897243", "text": "function setMemberLastName($memberLastName){\n $this->memberLastName = $memberLastName; \n }", "title": "" }, { "docid": "5f4c2b032d5ba1a3d9cecc6a60bf0d77", "score": "0.5961534", "text": "function setMemberStatus($memberStatus){\n $this->memberStatus = $memberStatus; \n }", "title": "" }, { "docid": "c68b5cd4ed4a9ac70f6e42096a6bdfc9", "score": "0.5875668", "text": "public function setMemberId($id) {\n\t\t$this->memberId = $id;\n\t}", "title": "" }, { "docid": "6483a0673a6f6baa488e64983773f1c3", "score": "0.58721286", "text": "public function setMemberId(?string $value): void {\n $this->getBackingStore()->set('memberId', $value);\n }", "title": "" }, { "docid": "a8c40f3dd5d79b29e6a6c7264d1c2443", "score": "0.5868249", "text": "function setMemberPassword($memberPassword){\n $this->memberPassword = $memberPassword; \n }", "title": "" }, { "docid": "caa17b8c8b5af3cd72ece50d6f3d8994", "score": "0.58372384", "text": "public function setMemberOf($value)\n {\n $this->memberOf = $value;\n }", "title": "" }, { "docid": "597d0c478bbc49eac13457c0c1feb009", "score": "0.5784616", "text": "function setMemberTel($memberTel){\n $this->memberTel = $memberTel; \n }", "title": "" }, { "docid": "c3a880e4aea91f4f2f49b89629ba681b", "score": "0.57653767", "text": "function set_position($playerposition) {\n\t\t$this->position = $playerposition;\n\t}", "title": "" }, { "docid": "1d3ab638f2bf406a065248e1728df525", "score": "0.57291186", "text": "public function setPosition(string $position){$this->position = $position;return $this;}", "title": "" }, { "docid": "fc0a4c1fa91a6dac8be48396bdc59a5b", "score": "0.57219887", "text": "public function setMember($key, $value) {\n if (! (isset($this->members[$key]) || array_key_exists($key, $this->members)) ) {\n throw new \\BadMethodCallException(\"Trying to set a propety that does not exists ($key)\");\n } //if\n $this->members[$key] = $value;\n $this->setDirtyFlag($key);\n }", "title": "" }, { "docid": "12fa59f6b4ccc40c0b5f156983a48e91", "score": "0.5708022", "text": "private function setLocationByPoint(Point $p)\n {\n $this->move($p->getX(), $p->getY());\n }", "title": "" }, { "docid": "107b652e386c9620dea4fceeb2932156", "score": "0.5657618", "text": "private function setLocationByPoint(Point $p)\n {\n $this->setLocation($p->x, $p->y);\n }", "title": "" }, { "docid": "3a20e52186364647e83f9dbe824fdfe6", "score": "0.563753", "text": "public function testPosition()\n {\n $dimension = DimensionTest::generateObject();\n\n $ref1 = strtolower(Core_Tools::generateRef());\n $ref2 = strtolower(Core_Tools::generateRef());\n\n $o1 = new Member($dimension, $ref1, new TranslatedString('A', 'fr'));\n $o1->save();\n $o2 = new Member($dimension, $ref2, new TranslatedString('B', 'fr'));\n $o2->save();\n\n $this->assertEquals(1, $o1->getPosition());\n $this->assertEquals(2, $o2->getPosition());\n // setPosition\n $o2->setPosition(1);\n $o2->save();\n $this->entityManager->flush();\n $this->assertEquals(2, $o1->getPosition());\n $this->assertEquals(1, $o2->getPosition());\n // up\n $o1->goUp();\n $o1->save();\n $this->entityManager->flush();\n $this->assertEquals(1, $o1->getPosition());\n $this->assertEquals(2, $o2->getPosition());\n // down\n $o1->goDown();\n $o1->save();\n $this->entityManager->flush();\n $this->assertEquals(2, $o1->getPosition());\n $this->assertEquals(1, $o2->getPosition());\n // Delete\n $o2->delete();\n $this->assertEquals(1, $o1->getPosition());\n\n DimensionTest::deleteObject($dimension);\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "42d12c19fd9304c4e0456fc76aa30cf1", "score": "0.5628136", "text": "function set_location($location)\r\n {\r\n $this->location = $location;\r\n }", "title": "" }, { "docid": "11f5c00704131b5c1f1bb1876a2aa37e", "score": "0.5625119", "text": "function setPlace($place)\r\n\t{\r\n\t\t$this->place = $place;\r\n\t}", "title": "" }, { "docid": "6023444458fa5ae64f3ffb8ff4134e38", "score": "0.5618458", "text": "public function setPosition($parent, $name)\n {\n $this->parent = $parent;\n $this->name = $name;\n }", "title": "" }, { "docid": "18222ccefa4c58dcbafe8c3dc0937edf", "score": "0.55588114", "text": "public function setMemberId(int $memberId)\n {\n $this->_id_member = $memberId;\n }", "title": "" }, { "docid": "166790da0e535595b6e997104ce7202a", "score": "0.5546483", "text": "public function setPosition($position);", "title": "" }, { "docid": "e88b91d05499ec654608ccf842166196", "score": "0.55381846", "text": "public function setMember()\n\t{\n\t\t$query = sprintf('INSERT INTO contacts (email, phone, mobile) VALUES (\"%s\", \"%s\", \"%s\")', \n\t\t\t$data['email'], $data['phone'], $data['mobile']);\n\t\t$this->db->query($query);\n\n\t\t$contactid = $this->db->insert_id();\n\n\t\t// Sets the member field\n\t\t$query = sprintf('INSERT INTO members (contactid, name, role, created_at) VALUES (\"%s\", \"%s\", \"%s\", \"%s\")', \n\t\t\t$contactid, $data['name'], $data['role'], date('Y-m-d H:i:s'));\n\t\t$this->db->query($query);\n\n\t\t// Get latest id\n\t\t$id = $this->db->insert_id();\n\n\t\tif(is_int($id) && $id > 0) { \n\t\t\treturn $id;\n\t\t} \n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6562c51c2feaf2d5293391e50c64563a", "score": "0.55104667", "text": "public function setPosition($position){\n\n $ares = $this->getValue($position);\n $this->position = $ares[0];\n $this->value = $ares[1];\n \n }", "title": "" }, { "docid": "8280d4b9d8796b4ab83ff4349035f380", "score": "0.5500142", "text": "function setLocation( $id ) {\n\t\t$this->mCurId = $id;\n\t}", "title": "" }, { "docid": "0947b4d77b047c2b0e5c4f128f8754bd", "score": "0.5479754", "text": "function setLocation( $id ) {\n\t\t$this->mOldId = $id;\n\t}", "title": "" }, { "docid": "eed748d6b6d6414f30b95d1deab8cdd4", "score": "0.5476429", "text": "function setLocation($location)\n\t\t{\n\n\t\t\t$this->location=$location;\n\t\t}", "title": "" }, { "docid": "95b2f59e0d196c815aceca7293f97d70", "score": "0.546373", "text": "function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "17fe25c261f27d8d5a260096d20a91c8", "score": "0.545914", "text": "public function setMember(array $member)\n {\n $this->member = $member;\n return $this;\n }", "title": "" }, { "docid": "5524f20626e04f5cddaf642aaab81e54", "score": "0.54560137", "text": "public function setLocation($location) {\r\n\t$this->location = $location;\r\n }", "title": "" }, { "docid": "50462f04932a5db590201f77eb60772a", "score": "0.54430264", "text": "public function __setLocation($new_location = NULL)\n {\n }", "title": "" }, { "docid": "82b5967479762f1678517a8dea0e5302", "score": "0.54417396", "text": "function __set($offset, $value)\n\t{\n\t\t$this->data[$offset] = $value ;\n\t}", "title": "" }, { "docid": "6a91d6583a5f6345fc9b281dbe4a9160", "score": "0.5437343", "text": "public function addAtMember($key, $value) {\n\t\tif (strpos($key, '@') === 0) {\n\t\t\t$key = substr($key, 1);\n\t\t}\n\t\t\n\t\tValidator::checkMemberName($key);\n\t\t\n\t\tif (is_object($value)) {\n\t\t\t$value = Converter::objectToArray($value);\n\t\t}\n\t\t\n\t\t$this->atMembers['@'.$key] = $value;\n\t}", "title": "" }, { "docid": "e346fe34a912b609684f281e236c84bc", "score": "0.5396534", "text": "public function overwritesFor($member);", "title": "" }, { "docid": "6707b912853220fa1ad76a4af4fd5d3f", "score": "0.53756505", "text": "function setmemberFirstName($newmemberFirstName): void {\n\n\t\t\t$newmemberFirstName = trim($newmemberFirstName);\n\n\t\t\t$newmemberFirstName = filter_var($newmemberFirstName, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\n\t\t\tif(empty($newmemberFirstName) === true) {\n\n\t\t\t\tthrow(new \\InvalidArgumentException(\"member value is empty or insecure\"));\n\n\t\t\t}\n\t\t\tif(is_string($newmemberFirstName) === false) {\n\n\t\t\t\tthrow(new \\TypeError(\"member input must be a string\"));\n\n\t\t\t}\n\t\t\tif(strlen($newmemberFirstName) > 128) {\n\n\t\t\t\tthrow(new \\RangeException(\"Email input too large\"));\n\n\t\t\t}\n\n\t\t\t// store new profileEmail\n\n\t\t\t$this->memberFirstName = $newmemberFirstName;\n\n\t\t}", "title": "" }, { "docid": "bbbea342862c6645679a5d7e42eba584", "score": "0.53692365", "text": "public function onSetAsSpammer( $member )\n\t{\n\t\t$member->logHistory( 'core', 'spammer', array( 'set' => TRUE ) );\n\t}", "title": "" }, { "docid": "cf5622c0853339a8061f91900bc57887", "score": "0.53615654", "text": "public function setMemberInformation($member, $ship) {\n $this->metadata_transaction[\"member\"] = array();\n $this->metadata_transaction[\"member\"][\"memberLoggedIn\"] = \"Si\";\n $this->metadata_transaction[\"member\"][\"memberId\"] = $member[\"id\"];\n $this->metadata_transaction[\"member\"][\"membershipDate\"] = $ship[\"date\"];\n $this->metadata_transaction[\"member\"][\"memberFullName\"] = $member[\"first_name\"] . \" \" . $member[\"middle_name\"] . \" \" . $member[\"last_name\"];\n $this->metadata_transaction[\"member\"][\"memberFirstName\"] = $member[\"first_name\"];\n $this->metadata_transaction[\"member\"][\"memberMiddleName\"] = $member[\"middle_name\"];\n $this->metadata_transaction[\"member\"][\"memberLastName\"] = $member[\"last_name\"];\n $this->metadata_transaction[\"member\"][\"memberEmailAddress\"] = $member[\"email\"];\n $this->metadata_transaction[\"member\"][\"memberAddressLine1\"] = $ship[\"street\"];\n $this->metadata_transaction[\"member\"][\"memberAddressLine2\"] = $ship[\"district\"];\n $this->metadata_transaction[\"member\"][\"memberCity\"] = $ship[\"city\"];\n $this->metadata_transaction[\"member\"][\"memberState\"] = $ship[\"state\"];\n $this->metadata_transaction[\"member\"][\"memberCountry\"] = $ship[\"country\"];\n $this->metadata_transaction[\"member\"][\"memberPostalCode\"] = $ship[\"postal_code\"];\n $this->metadata_transaction[\"member\"][\"membershipLevel\"] = $ship[\"level\"];\n $this->metadata_transaction[\"member\"][\"membershipStatus\"] = $ship[\"status\"];\n $this->metadata_transaction[\"member\"][\"latitude\"] = $this->latitude;\n $this->metadata_transaction[\"member\"][\"longitude\"] = $this->longitude;\n $this->metadata_transaction[\"member\"][\"memberPhone\"] = $member[\"phone\"];\n $this->setLog(\"Member Information: \\n\". json_encode($this->metadata_transaction[\"member\"]));\n }", "title": "" }, { "docid": "8c87abd188512eef4c61aa3d88c5e40f", "score": "0.53604317", "text": "public function update($ministryMember);", "title": "" }, { "docid": "0a6b8707b9f8250166bb26213dd4accb", "score": "0.53522307", "text": "public function __construct(Member $member);", "title": "" }, { "docid": "0423139e1dd945d2b788bfa39e4c7aa9", "score": "0.5347657", "text": "public function updateMember( $memberData, $memberId );", "title": "" }, { "docid": "84b80b01d118aeebfad081d7bd10ed6a", "score": "0.53147405", "text": "function set_offset($offset) {\n $this->offset = $offset;\n }", "title": "" }, { "docid": "5da6744d44bbf998e9b4be5a6722b288", "score": "0.5301743", "text": "public function setPosition()\n {\n $args = func_get_args();\n\n if(isset($args[0]) && is_numeric($args[0]) && isset($args[1]) && is_numeric($args[1]))\n {\n $this->position->setLatitude($args[0]);\n $this->position->setLongitude($args[1]);\n\n if(isset($args[2]) && is_bool($args[2]))\n $this->position->setNoWrap($args[2]);\n }\n else if(isset($args[0]) && ($args[0] instanceof Coordinate))\n $this->position = $args[0];\n else if(!isset($args[0]))\n $this->position = null;\n else\n throw new \\InvalidArgumentException(sprintf('%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The position setter arguments is invalid.',\n 'The available prototypes are :',\n ' - public function setPosition(Ivory\\GoogleMapBundle\\Model\\Base\\Coordinate $position)',\n ' - public function setPosition(double $latitude, double $longitude, boolean $noWrap = true)'));\n }", "title": "" }, { "docid": "9b062c0b69523c174f66351322cce000", "score": "0.52998084", "text": "public function offsetSet($offset, $value)\n {\n $this->user[$offset] = $value;\n }", "title": "" }, { "docid": "cec437892c4a6e19086431e9b9557191", "score": "0.52980846", "text": "public function setLocation($val)\n {\n $this->_propDict[\"location\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "cec437892c4a6e19086431e9b9557191", "score": "0.52980846", "text": "public function setLocation($val)\n {\n $this->_propDict[\"location\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0e3fa6542c7393c1f34d4443a711df68", "score": "0.52948684", "text": "function getMemberPositon(){\n return $this->memberPositon; \n }", "title": "" }, { "docid": "81b1c03d47a7904c4ebb9d59e7751a73", "score": "0.52753764", "text": "function setmemberZip($newmemberZip): void {\n\n\t\t\t$newmemberZip = trim($newmemberZip);\n\n\t\t\t$newmemberZip = filter_var($newmemberZip, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\n\t\t\tif(empty($newmemberZip) === true) {\n\n\t\t\t\tthrow(new \\InvalidArgumentException(\"memberZip value is empty or insecure\"));\n\n\t\t\t}\n\t\t\tif(gettype($newmemberZip) != string) {\n\n\t\t\t\tthrow(new \\TypeError(\"ProfileUsername must be a string\"));\n\n\t\t\t}\n\t\t\tif(strlen($newmemberZip) > 32) {\n\n\t\t\t\tthrow(new \\RangeException(\"memberZip input too large\"));\n\n\t\t\t}\n\t\t\t$this->memberZip = $newmemberZip;\n\n\t\t}", "title": "" }, { "docid": "b7c3ec143ae95062b063cac897e49c1c", "score": "0.5267729", "text": "public function setByPosition($pos, $value)\n\t{\n\t\tswitch($pos) {\n\t\t\tcase 0:\n\t\t\t\t$this->setId($value);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$this->setFirstname($value);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$this->setLastname($value);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this->setEmail($value);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$this->setBirthdate($value);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t$this->setLogin($value);\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\t$this->setPassword($value);\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\t$this->setType($value);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t$this->setWorkload($value);\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\t$this->setOffdays($value);\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\t$this->setEntrydate($value);\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\t$this->setExitdate($value);\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\t$this->setRole($value);\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\t$this->setEnabled($value);\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\t$this->setArchived($value);\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\t$this->setLastlogin($value);\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\t$this->setPasswordresettoken($value);\n\t\t\t\tbreak;\n\t\t} // switch()\n\t}", "title": "" }, { "docid": "37758ec11345c5c20227efda3d2f72f9", "score": "0.52650505", "text": "function setPosition($latitude = \"\", $longitude = \"\")\n\t{\n\t\t$this->types[\"GEO\"] = array(\n\t\t\t\"LAT\" => $latitude,\n\t\t\t\"LON\" => $longitude\n\t\t);\n\t}", "title": "" }, { "docid": "0bc95b186cefe4f851eba26ce1b59911", "score": "0.5260854", "text": "public function setOffset(int $offset);", "title": "" }, { "docid": "96654de38665b75132383188326b4d18", "score": "0.5257188", "text": "abstract protected function set();", "title": "" }, { "docid": "04753cd9ba1521eaf8c20f923a86b88a", "score": "0.5248486", "text": "private function setPosition()\n\t{\n\t\t$yCoord = rand(1, 3);\n\t\t$xCoord = rand(1, 3);\n\t\t\t\t\n\t\t$this->arrPosition = array($yCoord, $xCoord);\n\t}", "title": "" }, { "docid": "9898b57882733514af1debf51ba290f2", "score": "0.5243356", "text": "function pointLocation() {\n }", "title": "" }, { "docid": "9898b57882733514af1debf51ba290f2", "score": "0.5243356", "text": "function pointLocation() {\n }", "title": "" }, { "docid": "22cafa92c2031a9cce1315a1e988f6ad", "score": "0.5242831", "text": "public function setByPosition($pos, $value)\n {\n switch ($pos) {\n case 0:\n $this->setOrganisationId($value);\n break;\n case 1:\n $this->setOrganisationName($value);\n break;\n } // switch()\n }", "title": "" }, { "docid": "620d58c2a603e5d38896da65289a6574", "score": "0.5240406", "text": "public function __construct(Member $member)\n {\n $this->member = $member;\n }", "title": "" }, { "docid": "620d58c2a603e5d38896da65289a6574", "score": "0.5240406", "text": "public function __construct(Member $member)\n {\n $this->member = $member;\n }", "title": "" }, { "docid": "4299be412b0cf01d9d847b16bef35945", "score": "0.52389824", "text": "public function set_position($position) {\n $this->position = $position;\n }", "title": "" }, { "docid": "e86a267c68cc5b0ff9ae0bd7fe528056", "score": "0.5229822", "text": "abstract protected function _set();", "title": "" }, { "docid": "89dcf35c6eb76f2fa79a033447eb202e", "score": "0.52293974", "text": "public function setPosition(Position $position): void;", "title": "" }, { "docid": "2835f9d4a5fee828ad7e7335ea84577b", "score": "0.52230835", "text": "public function setOffset( $offset )\r\n {\r\n $this->setAttribute('offset', floatval( $offset ) );\r\n }", "title": "" }, { "docid": "aff7dab84e80af6fdaea7a78bcab55bc", "score": "0.5216086", "text": "public function set(string $members, int $version = -1, array &$stat = NULL): void {}", "title": "" }, { "docid": "2af0dd8583544a127bafbae101a99938", "score": "0.5189172", "text": "public function setXY($x, $y)\n{\n$this->Xp = $x; $this->Yp = $y;\n}", "title": "" }, { "docid": "42c45a0f4aa9b89311a5a1d9c9566915", "score": "0.51890117", "text": "public function canSetAnOffset()\n {\n $this->object['name'] = 'value';\n $this->assertTrue(isset($this->object['name']));\n }", "title": "" }, { "docid": "baab3cb38a43ca7997bec734eb41fa8c", "score": "0.51866496", "text": "public function edit(Member $member)\n {\n //\n }", "title": "" }, { "docid": "baab3cb38a43ca7997bec734eb41fa8c", "score": "0.51866496", "text": "public function edit(Member $member)\n {\n //\n }", "title": "" }, { "docid": "baab3cb38a43ca7997bec734eb41fa8c", "score": "0.51866496", "text": "public function edit(Member $member)\n {\n //\n }", "title": "" }, { "docid": "1ebae933bf6ae0fd46254b5fe1a99e4c", "score": "0.5182929", "text": "public function position()\n {\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "36c228fe67be4b53ce25ece4999a4c58", "score": "0.51813674", "text": "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "title": "" }, { "docid": "ad4dbbf282efec2bd8db11602e802105", "score": "0.5173012", "text": "public function setPosition($positionString) {\n $position = Position::where('name', $positionString)->first();\n if ( $position ) {\n $this->positions()->attach($position);\n }\n else {\n return \"Error in function setPosition() in Person.php\";\n } \n }", "title": "" } ]
5f9e3ac26341efd86cdaf6602b9b5711
Interakt Change the SQL connection locale to a specified locale. This is used to get the date formats written depending on the client locale.
[ { "docid": "c9ecca2d47e2010e320debaf6647347a", "score": "0.7537893", "text": "function _setLocale($locale = 'US')\n\t{\t\n\t\tswitch (strtoupper($locale))\n\t\t{\n\t\t\tcase 'US':\n\t\t\t\t$this->Execute(\"set datestyle='ISO'\");\n\t\t\t\tbreak;\n\t\t\tcase 'EN':\n\t\t\t\t$this->Execute(\"set datestyle='SQL,European'\");\n\t\t\t\tbreak;\n\t\t\tcase 'EUS':\n\t\t\t\t$this->Execute(\"set datestyle='SQL,US'\");\n\t\t\t\tbreak;\n\t\t\tcase 'RO':\n\t\t\t\t$this->Execute(\"set datestyle='SQL,European'\");\n\t\t\t\tbreak;\n\t\t\tcase 'FR':\n\t\t\t\t$this->Execute(\"set datestyle='SQL,European'\");\n\t\t\t\tbreak;\n\t\t\tcase 'IT':\n\t\t\t\t$this->Execute(\"set datestyle='SQL,European'\");\n\t\t\t\tbreak;\n\t\t\tcase 'GE':\n\t\t\t\t$this->Execute(\"set datestyle='SQL,European'\");\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "01405a73030369bc576e00891f8c9191", "score": "0.6971565", "text": "function _setLocale($locale = 'Us') {\n\t\tswitch ($locale) {\n\t\t\tcase 'En':\n\t\t\t\tibase_timefmt('%d-%m-%Y');\n\t\t\t\tbreak;\n\t\t\tcase 'EUS':\n\t\t\t\tibase_timefmt('%m-%d-%Y');\n\t\t\t\tbreak;\n\t\t\tcase 'Ro':\n\t\t\t\tibase_timefmt('%d-%m-%Y');\n\t\t\t\tbreak;\n\t\t\tcase 'Fr':\n\t\t\t\tibase_timefmt('%d-%m-%Y');\n\t\t\t\tbreak;\n\t\t\tcase 'It':\n\t\t\t\tibase_timefmt('%d-%m-%Y');\n\t\t\t\tbreak;\n\t\t\tcase 'Ge':\n\t\t\t\tibase_timefmt('%d.%m.%Y');\n\t\t\t\tbreak;\n\t\t\tcase 'Us':\n\t\t\t\tibase_timefmt('%Y-%m-%d');\n\t\t\t\tbreak;\n\t\t\tdefault :\n ibase_timefmt('%Y-%m-%d');\n break;\n\t\t}\n\t}", "title": "" }, { "docid": "767f962ec4110303866ad1547739952e", "score": "0.6530036", "text": "function setLocale($locale);", "title": "" }, { "docid": "66c199e6e10a69fe4129674ca0c0bdb4", "score": "0.649849", "text": "public function setLocale($locale);", "title": "" }, { "docid": "bd301e327b924a0ee14931f8a9a39ef6", "score": "0.6435932", "text": "abstract public function setLocale($locale);", "title": "" }, { "docid": "a545c5650f8a3a742541ab81f5a9c4cc", "score": "0.6387142", "text": "public function setDateLocale($locale = 'En') {\r\n\t\t$this->locale = $locale;\r\n\t\tswitch (strtoupper($locale))\r\n\t\t{\r\n\t\t\tcase 'EN':\r\n\t\t\t\t$this->fmtDate=\"'Y-m-d'\";\r\n\t\t\t\t$this->fmtTimeStamp = \"'Y-m-d H:i:s'\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'US':\r\n\t\t\t\t$this->fmtDate = \"'m-d-Y'\";\r\n\t\t\t\t$this->fmtTimeStamp = \"'m-d-Y H:i:s'\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'PT_BR':\r\n\t\t\tcase 'NL':\r\n\t\t\tcase 'FR':\r\n\t\t\tcase 'RO':\r\n\t\t\tcase 'IT':\r\n\t\t\t\t$this->fmtDate=\"'d-m-Y'\";\r\n\t\t\t\t$this->fmtTimeStamp = \"'d-m-Y H:i:s'\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'GE':\r\n\t\t\t\t$this->fmtDate=\"'d.m.Y'\";\r\n\t\t\t\t$this->fmtTimeStamp = \"'d.m.Y H:i:s'\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t$this->fmtDate=\"'Y-m-d'\";\r\n\t\t\t\t$this->fmtTimeStamp = \"'Y-m-d H:i:s'\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d2a6f62888cd0e464a14fc0055e8af57", "score": "0.6313287", "text": "public function setLocale($locale = null);", "title": "" }, { "docid": "a68d846b11e37b2d788013f9962732e2", "score": "0.6293689", "text": "public function SetLocale ($locale = NULL);", "title": "" }, { "docid": "9d5f17cb860f6e320723c25cb2cb8b91", "score": "0.6250073", "text": "public function getLocale() {}", "title": "" }, { "docid": "2c0d18a66bd2c31d241dd74b9a0d7270", "score": "0.6193712", "text": "public function setLocale($locale) {\n }", "title": "" }, { "docid": "132f16f726a4b4c4b648162386a8c70a", "score": "0.6183062", "text": "public function setDefaultLocale($locale);", "title": "" }, { "docid": "8321d1d1c2dd88e39756bebed542aee9", "score": "0.61651045", "text": "public function getLocale();", "title": "" }, { "docid": "1dbc5f2afd27ae2e846ac60e624441a5", "score": "0.60969466", "text": "function getLocale();", "title": "" }, { "docid": "24ed95ead3fae607ca4785b0a55dc014", "score": "0.60275745", "text": "public static function resetLocale()\n {\n static::setLocale(static::DEFAULT_LOCALE);\n }", "title": "" }, { "docid": "27cb8501930fe2c9aa8fe2511a881ee2", "score": "0.5985989", "text": "public function getLocale() {\n }", "title": "" }, { "docid": "0c5877dda2687c8a3a95ca0abb1071e5", "score": "0.5942893", "text": "function setLocale($locale) {\n\t\t$this->soap_params['locale']=$locale;\n\t}", "title": "" }, { "docid": "2502eeb19a0aac4bdbb691e662cc8da5", "score": "0.5916279", "text": "public function setLocale($locale)\n {\n return;\n }", "title": "" }, { "docid": "d5ea1b2d21c3a932cc8583147667b2ce", "score": "0.5905304", "text": "public function GetLocale ();", "title": "" }, { "docid": "d8a76e4c480cb95090e7d23bafe9771f", "score": "0.5871392", "text": "public function setDefaultLocale(string $locale);", "title": "" }, { "docid": "0f1b6678fd60548d3686a094c92058bb", "score": "0.58543414", "text": "public function setLocalePreference($localePreference);", "title": "" }, { "docid": "08d95987cab3b0d1a80a883fce64c278", "score": "0.5850075", "text": "function localeconv () {}", "title": "" }, { "docid": "41607392aa749b1bc35f86a0371d4865", "score": "0.5826371", "text": "function sq_setlocale($category,$locale) {\n if (is_string($locale)) {\n // string with only one locale\n $ret = setlocale($category,$locale);\n } elseif (! check_php_version(4,3)) {\n // older php version (second setlocale argument must be string)\n $ret=false;\n $index=0;\n while ( ! $ret && $index<count($locale)) {\n $ret=setlocale($category,$locale[$index]);\n $index++;\n }\n } else {\n // php 4.3.0 or better, use entire array\n $ret=setlocale($category,$locale);\n }\n\n /* safety checks */\n if (preg_match(\"/^.*\\/.*\\/.*\\/.*\\/.*\\/.*$/\",$ret)) {\n /**\n * Welcome to We-Don't-Follow-Own-Fine-Manual department\n * OpenBSD 3.8, 3.9-current and maybe later versions\n * return invalid response to setlocale command.\n * SM bug report #1427512.\n */\n $ret = false;\n }\n return $ret;\n}", "title": "" }, { "docid": "d7645641049b641ee45f9c9d67b86923", "score": "0.5809204", "text": "function acf_get_locale() { }", "title": "" }, { "docid": "559f4e352bfb30fdfec6063ec7cea2ea", "score": "0.5803503", "text": "public static function setLocale($locale){\n\t\t\\Illuminate\\Foundation\\Application::setLocale($locale);\n\t}", "title": "" }, { "docid": "20cee1b7c2ab660e7509f662e7817ed8", "score": "0.5772977", "text": "function locale_conv ()\n{\n return localeconv();\n}", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.57726884", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.57726884", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.57726884", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "7760fdba3d0c077e3c6ac5de9d9ed2fc", "score": "0.57726884", "text": "public function getDefaultLocale();", "title": "" }, { "docid": "3552a6693d34e58e903403792614b938", "score": "0.57217526", "text": "public static function setAppLocale($locale)\n\t{\n\t\t// Note from \\Carbon\\Carbon:\n\t\t// isoFormat() use ISO format rather than PHP-specific format\n\t\t// and use inner translations rather than language packages you need to install\n\t\t// on every machine where you deploy your application.\n\t\tif (!config('settings.app.php_specific_date_format')) {\n\t\t\tCarbon::setLocale($locale);\n\t\t\t\n\t\t\treturn $locale;\n\t\t}\n\t\t\n\t\t$localeFound = false;\n\t\t\n\t\t// Get available locales from the server\n\t\ttry {\n\t\t\texec('locale -a', $locales);\n\t\t} catch (\\Exception $e) {\n\t\t}\n\t\t\n\t\tif (!isset($locales) || empty($locales)) {\n\t\t\t$locales = array_keys((array)config('locales'));\n\t\t}\n\t\t\n\t\tif (is_array($locales) && in_array($locale, $locales)) {\n\t\t\tif (setlocale(LC_ALL, $locale)) {\n\t\t\t\tCarbon::setLocale($locale);\n\t\t\t\tsetlocale(LC_ALL, $locale);\n\t\t\t\t$localeFound = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If not found, try to use locale with codeset (If it exists)\n\t\tif (!$localeFound) {\n\t\t\tif (is_array($locales)) {\n\t\t\t\tforeach ($locales as $sysLocale) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Check if $locale exists on the server with a codeset (locale.codeset)\n\t\t\t\t\t * e.g. tr_TR.UTF-8, ru_RU.UTF-8, ru_RU.ISO8859-5, fr_CH.ISO8859-15, ...\n\t\t\t\t\t * More Info: https://stackoverflow.com/a/24355529\n\t\t\t\t\t */\n\t\t\t\t\t$pattern = '#' . $locale . '\\.#i';\n\t\t\t\t\tif (preg_match($pattern, $sysLocale)) {\n\t\t\t\t\t\tif (setlocale(LC_ALL, $locale)) {\n\t\t\t\t\t\t\tCarbon::setLocale($locale);\n\t\t\t\t\t\t\tsetlocale(LC_ALL, $locale);\n\t\t\t\t\t\t\t$localeFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If not found, force to use a fixed locale\n\t\t\tif (!$localeFound) {\n\t\t\t\t$locale = 'en_US';\n\t\t\t\tCarbon::setLocale($locale);\n\t\t\t\tsetlocale(LC_ALL, $locale);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $locale;\n\t}", "title": "" }, { "docid": "ed4dc9b59c0c1b1a83572ad5cd389ada", "score": "0.57081664", "text": "public function setLocale($locale)\n {\n $this->_adapter->setLocale($locale);\n }", "title": "" }, { "docid": "ce880d019ca95f6420e5d16064f1cedd", "score": "0.5706283", "text": "public function set_datatables_language()\n\t{\n\t\treturn wp_json_encode( Helpful_Helper_Values::datatables_language_string() );\n\t}", "title": "" }, { "docid": "e10d72ac4b0bccd0f521a1d5f559e82c", "score": "0.5702116", "text": "public function setLocale($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->locale !== $v) {\n $this->locale = $v;\n $this->modifiedColumns[BetterSeoI18nTableMap::LOCALE] = true;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "a833fc8199cb6c773ded87d8e9e166f9", "score": "0.5657591", "text": "public function set($locale);", "title": "" }, { "docid": "1b5e71a40f67c4498ccc2e76e69ccde7", "score": "0.5592627", "text": "function msgfmt_get_locale($formatter) {}", "title": "" }, { "docid": "63e2888bc0a8c3c3c8e8f1a95836e2df", "score": "0.5571711", "text": "function date_by_locale($date, $toLocale = null)\n {\n if(is_null($toLocale)) $toLocale = app()->getLocale();\n\n $ar = [\n \"الأحد\",\n \"أح\",\n \"الإثنين\",\n \"إث\",\n \"الثلاثاء\",\n \"ث\",\n \"الأربعاء\",\n \"أر\",\n \"الخميس\",\n \"خ\",\n \"الجمعة\",\n \"ج\",\n \"السبت\",\n \"س\",\n \"ص\",\n \"ص\",\n \"م\",\n \"م\",\n \"يناير\",\n \"يناير\",\n \"فبراير\",\n \"فبراير\",\n \"مارس\",\n \"مارس\",\n \"أبريل\",\n \"أبريل\",\n \"مايو\",\n \"مايو\",\n \"يونيو\",\n \"يونيو\",\n \"يوليو\",\n \"يوليو\",\n \"أغسطس\",\n \"أغسطس\",\n \"سبتمبر\",\n \"سبتمبر\",\n \"اكتوبر\",\n \"اكتوبر\",\n \"نوفمبر\",\n \"نوفمبر\",\n \"ديسمبر\",\n \"ديسمبر\",\n ];\n $notAr = [\n \"Sunday\",\n \"Sun\",\n \"Monday\",\n \"Mon\",\n \"Tuesday\",\n \"Tue\",\n \"Wednesday\",\n \"Wed\",\n \"Thursday\",\n \"Thu\",\n \"Friday\",\n \"Fri\",\n \"Saturday\",\n \"Sat\",\n \"am\",\n \"AM\",\n \"pm\",\n \"PM\",\n \"January\",\n \"Jan\",\n \"February\",\n \"Feb\",\n \"March\",\n \"Mar\",\n \"April\",\n \"Apr\",\n \"May\",\n \"May\",\n \"June\",\n \"Jun\",\n \"July\",\n \"Jul\",\n \"August\",\n \"Aug\",\n \"September\",\n \"Sep\",\n \"October\",\n \"Oct\",\n \"November\",\n \"Nov\",\n \"December\",\n \"Dec\",\n ];\n\n try{\n if(!$date) return $date;\n $date = str_ireplace($toLocale === 'ar' ? $notAr : $ar, $toLocale === 'ar' ? $ar : $notAr, $date);\n\n return $date;\n }\n catch(Exception $exception){\n if(config('app.debug')){\n d($exception);\n }\n }\n\n return $date ? $date : \"\";\n }", "title": "" }, { "docid": "e5a8529223f38ad8a8dfcd9dde4a185b", "score": "0.5556583", "text": "public static function locale(){\r\n return \\Illuminate\\Translation\\Translator::locale();\r\n }", "title": "" }, { "docid": "962d3e54fd65b4e8c39e99e1779cd623", "score": "0.55500376", "text": "public function getLocale()\r\n {\r\n return parent::getLocale();\r\n }", "title": "" }, { "docid": "27860c61e64f15e17fbe565acf3809cd", "score": "0.55411166", "text": "public function getLocale(): LocaleInterface;", "title": "" }, { "docid": "247dcb53b41311985634e11cde0e097c", "score": "0.55318326", "text": "private function set_locale() {\n\n\t\t$plugin_i18n = new Conference_Payments_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "title": "" }, { "docid": "48f884eaf3c9b4391625c6767ecbdc8f", "score": "0.5530765", "text": "public function getLocale()\n\t{\n\t\t// TODO: Implement getLocale() method.\n\t}", "title": "" }, { "docid": "984ec719ed4df9d972d1c0ad169a4b96", "score": "0.55253994", "text": "function locale($iso_code, $locale) {\n\t$_LOCALE = option('_LOCALE');\n\t$_LOCALE[$iso_code] = $locale;\n\n\toption('_LOCALE', $_LOCALE);\n}", "title": "" }, { "docid": "8a5c3350d03606b3b853d8b7496a7dc4", "score": "0.5511065", "text": "public function getCultureDate();", "title": "" }, { "docid": "d3e36369c84a7b579faefc86456d0fbe", "score": "0.546699", "text": "public function getLocale()\n {\n return $this->sLocale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "a2cc96de3a245143a4c531220ec1328d", "score": "0.5452585", "text": "public function getLocale()\n {\n return $this->locale;\n }", "title": "" }, { "docid": "f979f2f0a6425e2a1e2d5c38c1069e1e", "score": "0.544189", "text": "public static function setLocale($locale) {\n if (isset($locale) && $locale) {\n if (strlen($locale) == 2) {\n $locale = $locale.\"_\".strtoupper($locale);\n } else {\n $locale = $locale;\n }\n $_SESSION['locale'] = $locale;\n } elseif (isset($_SESSION['locale'])) {\n $locale = $_SESSION['locale'];\n } else {\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n if (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2) == 'fr') {\n $language = 'fr_FR';\n } else {\n $language = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n }\n } else {\n $language = 'en_UK';\n }\n\n if (strlen($language) > 2) {\n $locale = strtolower(substr($language, 0, 2)).\"_\".strtoupper(substr($language, 3, 2));\n } else {\n $locale = strtolower($language).\"_\".strtoupper($language);\n }\n }\n\n putenv(\"LC_ALL=\".$locale);\n putenv(\"LANG=\".$locale);\n setlocale(LC_ALL, $locale);\n\n bindtextdomain($locale, getenv('app_root').\"/locale\");\n bind_textdomain_codeset($locale, 'UTF-8');\n textdomain($locale);\n\n return $locale;\n }", "title": "" }, { "docid": "f5e470a1f2c64e04874b4af9d55680e0", "score": "0.5437442", "text": "function getLocale() {\r\n\t\treturn $this->getData('locale');\r\n\t}", "title": "" }, { "docid": "e2384330b0ab3966afde968e09f880f5", "score": "0.5434908", "text": "protected function setLocales() {\n\t\t$this->locales = array();\n\t\t$sql = 'SHOW COLUMNS FROM ' . $this->table;\n\t\t$result = $this->getConn()->query($sql);\n\t\t//echo mysqli_error($this->getConn());\n\t\twhile($row = $result->fetch_row()) {\n\t\t\tif (parent::isValidLocaleCode($row[0]) === TRUE) {\n\t\t\t\t$this->locales[$row[0]] =& parent::getI18NfactoryLocale($row[0]);\n\t\t\t\t$_SESSION['i18n']['translator_locales'][$row[0]] = $row[0];\n\t\t\t} // end if\n\t\t} // end while\n\t\t$result->close();\n\t\treturn (count($this->locales) > 0) ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "cdf4e0886bf920d35e1a0b7d17d478a2", "score": "0.541832", "text": "public function set_locale ($locale) {\n // define some variables from config which are used in localization file\n $imagesdir = $this->app->conf->imagesdir;\n $langimages = $this->app->conf->get('langimages', ''); // FIXME\n $MenuType = $this->app->conf->MenuType;\n $db_prefix = $this->app->conf->db_prefix;\n $YaBBversion = $this->app->conf->YaBBversion;\n $boardurl = $this->app->conf->boardurl;\n $mbname = $this->app->conf->mbname;\n $menusep = $this->app->conf->menusep;\n $webmaster_email = $this->app->conf->webmaster_email;\n $color = $this->app->conf->color;\n $ClickLogTime = '$ClickLogTime'; // FIXME\n $MaxSigLen = $this->app->conf->MaxSigLen;\n $faketruncation = '$faketruncation'; // FIXME\n $GodPostNum = $this->app->conf->GodPostNum;\n $TopAmmount = $this->app->conf->TopAmmount;\n $SrPostNum = $this->app->conf->SrPostNum;\n $FullPostNum = $this->app->conf->FullPostNum;\n $JrPostNum = $this->app->conf->JrPostNum;\n \n require_once('Localization/' . $locale);\n \n $vars = get_defined_vars();\n \n foreach ($vars as $k => $v) {\n $this->$k = $v;\n }\n parent::__construct($vars);\n $this->lngfile = $locale;\n }", "title": "" }, { "docid": "647e94bed0222f9ec8b0716db23d1d7c", "score": "0.5418117", "text": "public function setLocale($localization = null);", "title": "" }, { "docid": "d53e1bb66c57918bd46561a18f176d81", "score": "0.5396975", "text": "public function getDefaultLocale(): string;", "title": "" }, { "docid": "d53e1bb66c57918bd46561a18f176d81", "score": "0.5396975", "text": "public function getDefaultLocale(): string;", "title": "" }, { "docid": "7f3ff19547e1c1ac2dad31df30650c21", "score": "0.53890496", "text": "static public function setLocale($locale)\n\t{\n\t\tself::$locale = $locale;\n\n\t\t// todo: Load locale mappings from some wild wild wild place... dunno, wikipedia... \n\t\tself::$map = array(); \n\t}", "title": "" }, { "docid": "b6314061380446257393c806f18301f9", "score": "0.5386574", "text": "function setLocale($locale) {\r\n\t\treturn $this->setData('locale', $locale);\r\n\t}", "title": "" }, { "docid": "a1a4d7d5e892e33732a493e166a85b54", "score": "0.53863627", "text": "private function set_locale() {\n\n\t\t$plugin_i18n = new Predic_Simple_Backup_i18n();\n\t\t$plugin_i18n->set_domain( $this->plugin_name );\n\n\t\tadd_action( 'plugins_loaded', array( $plugin_i18n, 'load_plugin_textdomain' ) );\n\n\t}", "title": "" }, { "docid": "efd4188f6b9e6ddb4a955546619e4b61", "score": "0.5385674", "text": "public function getLocale() {\n return $this->locale;\n }", "title": "" }, { "docid": "2ee289a0503e3afeaad0c487a5365787", "score": "0.5385207", "text": "private function set_locale() {\n\n\t\t$plugin_i18n = new Wp_Rest_Filter_i18n();\n\n\t\t$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');\n\n\t}", "title": "" }, { "docid": "633ece5a470b5e6f897256939934d1c4", "score": "0.5384811", "text": "public function setLocale($locale)\n\t{\n\t\t// TODO: Implement setLocale() method.\n\t}", "title": "" }, { "docid": "3842779cb2c4e9686a16ceac5617db00", "score": "0.5380428", "text": "public function __construct()\n {\n setlocale(LC_TIME, 'french.UTF-8', 'fr_FR.UTF-8');\n }", "title": "" }, { "docid": "10012d8f929071428504522322848474", "score": "0.5379973", "text": "private function set_locale()\n {\n global $WsWp_i18n;\n $WsWp_i18n = new Ws_Wp_Sync_i18n();\n $WsWp_i18n->set_domain($this->get_plugin_name());\n $this->loader->add_action('plugins_loaded', $WsWp_i18n, 'load_plugin_textdomain');\n\n }", "title": "" }, { "docid": "cddb02bda6c2e58c9394941725fe2625", "score": "0.5373749", "text": "public function getDateFormat()\n {\n // We should be getting the proper date format based on the connection type they are using\n return $this->dateFormat ?: 'Y-m-d H:i:s.u';\n }", "title": "" }, { "docid": "b1aebe77184a9da6eab6a13bfa33829a", "score": "0.53619874", "text": "public function register()\n {\n setlocale(LC_TIME, 'de_DE'); \n\t}", "title": "" }, { "docid": "b82d7bb3ac2e13b312f8463ce4b01aa0", "score": "0.53559196", "text": "public static function setLocale( $locale )\n\t{\n\t\tif(self::$locale == $locale)\n\t\t\treturn $locale;\n\t\t\n\t\t$old_locale = self::$locale;\n\t\tself::$locale = strtolower(substr($locale,0,2));\n\t\t\n\t\tif($old_locale)\n\t\t\tforeach(self::$domains as $domain)\n\t\t\t\t$domain->freeResources($old_locale);\n\t\t\n\t\tsetlocale(LC_ALL, $locale);\n\t\treturn $old_locale;\n\t}", "title": "" }, { "docid": "5ceb3c2b59bad3a23ec943179cb01b45", "score": "0.5352129", "text": "public function getLocale()\n\t{\n\t\treturn $this->_locale;\n\t}", "title": "" }, { "docid": "d9582451b065e4532faf19e36fa41761", "score": "0.53508186", "text": "function mbDateToLocale($date) {\n\treturn preg_replace(\"/(\\d{4})-(\\d{2})-(\\d{2})/\", '$3/$2/$1', $date);\n}", "title": "" }, { "docid": "bcd29f2573ebdff0cb8fdfdeb402a690", "score": "0.5347552", "text": "private function set_locale() {\n\t\t$plugin_i18n = new I18n;\n\t\tadd_action( 'plugins_loaded', $plugin_i18n, 'init' );\n\t}", "title": "" }, { "docid": "d6e35149768ccdd9b09b55c92a9eb62b", "score": "0.5347107", "text": "public function getLocale()\n {\n return i18n::get_locale();\n }", "title": "" }, { "docid": "004e58e6791a030c35461f1f3c39ceab", "score": "0.5345401", "text": "protected function _switchLocale($locale){\n //Switch to required language\n Zend_Registry::get('Zend_Translate')->setLocale($locale);\n Zend_Locale::setDefault($locale);\n Zend_Registry::set('Zend_Locale', $locale);\n Centurion_Config_Manager::set(Translation_Traits_Common::DEFAULT_LOCALE_KEY, $locale);\n }", "title": "" }, { "docid": "2ce27e28215b7b8620fb8e591582c109", "score": "0.533677", "text": "public function getLocale(): string\n {\n return $this->locale;\n }", "title": "" }, { "docid": "2ce27e28215b7b8620fb8e591582c109", "score": "0.533677", "text": "public function getLocale(): string\n {\n return $this->locale;\n }", "title": "" }, { "docid": "dde66812c44020d39b91e64201017178", "score": "0.5335413", "text": "public function setLocale($var)\n {\n GPBUtil::checkString($var, True);\n $this->locale = $var;\n\n return $this;\n }", "title": "" }, { "docid": "dde66812c44020d39b91e64201017178", "score": "0.5335413", "text": "public function setLocale($var)\n {\n GPBUtil::checkString($var, True);\n $this->locale = $var;\n\n return $this;\n }", "title": "" }, { "docid": "dde66812c44020d39b91e64201017178", "score": "0.5335413", "text": "public function setLocale($var)\n {\n GPBUtil::checkString($var, True);\n $this->locale = $var;\n\n return $this;\n }", "title": "" }, { "docid": "85636839c7ec57ddc5a4c54585bac381", "score": "0.53297347", "text": "function getLocaleFieldNames() {\n\t\treturn array('platform');\n\t}", "title": "" }, { "docid": "e030e964e5a465e079e998cf1fe54c04", "score": "0.5326367", "text": "public function getDatePickerFormat(?string $locale = null): string\n {\n return $this->getConfigByLocaleAndKey('date_picker', $locale);\n }", "title": "" }, { "docid": "753527c18ab145acfb3517056095c270", "score": "0.5324542", "text": "function locale_pulldown($dbh, $locale) {\n global $OF_USE_LOCALES;\n echo \"<select id='locale' onChange='JavaScript:changeLocale()'>\\n\";\n if($OF_USE_LOCALES) {\n $sql = \"SELECT * FROM locales ORDER BY name ASC\";\n foreach ($dbh->query($sql) as $row) {\n $selected = ($row[\"locale\"] . \".utf8\" == $locale ? \"SELECTED\" : \"\");\n printf(\"<option value='%s' %s>%s (%s)</option>\\n\", $row[\"locale\"], $selected, $row[\"name\"], substr($row[\"locale\"], 0, 2));\n }\n } else {\n echo \"<option value='en_US' SELECTED>English</option>\\n\";\n }\n echo \"</select>\";\n}", "title": "" }, { "docid": "2464814614ac00fffad9b2356a0b7840", "score": "0.5323587", "text": "function locale()\n{\n $locale = \\Illuminate\\Support\\Facades\\Config::get('app.fallback_locale');\n\n if (\\Illuminate\\Support\\Facades\\Session::has('app_locale') AND array_key_exists(\\Illuminate\\Support\\Facades\\Session::get('app_locale'), \\Illuminate\\Support\\Facades\\Config::get('locales'))) {\n $locale = \\Illuminate\\Support\\Facades\\Session::get('app_locale');\n }\n\n return $locale;\n}", "title": "" }, { "docid": "c0edeb8d14acceaaead4228358f1ef1d", "score": "0.5323353", "text": "public function getLocale(): string {\n return $this->locale;\n }", "title": "" }, { "docid": "ca740614ff9f9b366f34077c07f56d95", "score": "0.5322948", "text": "public static function dateEmPortugues($dateSql) {\r\n $ano = substr($dateSql, 0, -6);\r\n $mes = substr($dateSql, 5, -3);\r\n $dia = substr($dateSql, 8);\r\n return $dia . \"/\" . $mes . \"/\" . $ano;\r\n }", "title": "" }, { "docid": "a8c1bec763062b53514bd737f44e6ee5", "score": "0.5318874", "text": "public static function setLocale($locale){\r\n \\Illuminate\\Translation\\Translator::setLocale($locale);\r\n }", "title": "" }, { "docid": "77da8270c711b914a8e1edaee9040028", "score": "0.5310292", "text": "public function getLocale() {\n return $this->_locale;\n }", "title": "" }, { "docid": "244767bb4b9a89fa70f65b8f8eccb731", "score": "0.53051615", "text": "abstract protected function initializeCulture();", "title": "" }, { "docid": "0419c961a24ab4d9f194c879b3891f3f", "score": "0.529387", "text": "public function locale(): string {\n return $this->locale;\n }", "title": "" }, { "docid": "7928e35c3919d944bbe631af8543c1ac", "score": "0.52890754", "text": "public function setLocale($value)\n {\n return $this->setParameter('locale', $value);\n }", "title": "" }, { "docid": "8c1937a0bb305cc78e22e1e31e6b3e38", "score": "0.52826846", "text": "function __construct(){\n setlocale(LC_ALL, 'es_ES');\n parent::__construct();\n }", "title": "" }, { "docid": "40e4fad7d6aaf8f44219bbd9e39e1b4f", "score": "0.52823085", "text": "public function getLocaleAwares();", "title": "" }, { "docid": "50e901b238f74719b4b6fb626446e004", "score": "0.5277632", "text": "function getLocaleFieldNames() {\r\n\t}", "title": "" }, { "docid": "f4e92bd864c29b78b411648af466cfd5", "score": "0.5266967", "text": "public static function restoreLocale()\n {\n static::$_locale = array_pop(static::$_locale_stack);\n list(static::$_language) = explode('_', static::$_locale);\n }", "title": "" }, { "docid": "c17775f7f92cd9bb3e3c60f68eb2d9ec", "score": "0.5265018", "text": "public static function setLocale($locale)\n {\n list($remaining, $variant) = explode('@', $locale.'@');\n list($remaining, $encoding) = explode('.', $remaining.'.');\n list(static::$_language, $country) = explode('_', $remaining.'_');\n if (!$country) {\n $country = mb_strtoupper(static::$_language);\n }\n // Front-office can use any language\n if (NOS_ENTRY_POINT === Nos::ENTRY_POINT_ADMIN) {\n $available = \\Config::get('novius-os.locales', array());\n // Check the language is supported (because it can be injected via GET on the login screens)\n if (!isset($available[static::$_language.'_'.$country])) {\n list(static::$_language, $country) = explode('_', \\Config::get('novius-os.default_locale', 'en_GB'));\n $encoding = null;\n $variant = null;\n }\n }\n if (static::$_locale) {\n static::$_locale_stack[] = static::$_locale;\n }\n static::$_locale = static::$_language.'_'.$country;\n if (!empty($encoding)) {\n static::$_encoding = $encoding;\n }\n setlocale(LC_ALL, array(\n static::$_locale.'.'.static::$_encoding.'@'.$variant,\n static::$_locale.'.'.static::$_encoding,\n static::$_locale.'@'.$variant,\n static::$_locale,\n ));\n }", "title": "" }, { "docid": "68ee507e980b4b197c49d39634929f85", "score": "0.52596587", "text": "public function setLocale($locale) {\n $this->locale = $locale;\n }", "title": "" }, { "docid": "68ee507e980b4b197c49d39634929f85", "score": "0.52596587", "text": "public function setLocale($locale) {\n $this->locale = $locale;\n }", "title": "" }, { "docid": "1a61a823926848469f000955b3129a7f", "score": "0.52549225", "text": "function setLocale($inLocale) {\r\n\t\tif ( $this->_CurrentLocale !== $inLocale ) {\r\n\t\t\t$this->setCurrentLocale($inLocale);\r\n\t\t\t$this->setLocaleFromAutoDetect(false);\r\n\t\t\t$this->setModified();\r\n\t\t}\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "c32f6c2b34e979ddbbd3759e9b9cb84b", "score": "0.525196", "text": "public static function locale($locale){\n\t\tHHead::metaProperty('og:locale',$locale);\n\t\t/*#if DEV */ return '<div style=\"color:red;font-size:12pt\">Please do not echo HOpenGraphMeta::locale()</div>'; /*#/if*/\n\t}", "title": "" }, { "docid": "6c66028286ce8286e3e720a8ec96ca84", "score": "0.5248511", "text": "public function getLocale () {\r\n return isset($this->locale) ? $this->locale: self::DEFAULT_LOCALE;\r\n }", "title": "" } ]
c36db3bcb79334598bba893df708e559
Returns the MessageKey this MessageItemChildCompoundKey represents. No references between this and the returned key exist.
[ { "docid": "102d69f4a2aa0918ef1487f9326a3bc1", "score": "0.68176454", "text": "public function getMessageKey(): MessageKey\n {\n return new MessageKey(\n $this->getMailAccountId(),\n $this->getMailFolderId(),\n $this->getParentMessageItemId()\n );\n }", "title": "" } ]
[ { "docid": "fc4c6097f095300d192226e557c22163", "score": "0.5935129", "text": "protected function getKey()\n {\n return $this->row[$this->parent->getKeyName()];\n }", "title": "" }, { "docid": "5759e6ec0e992bcba29fe527b09f28cf", "score": "0.5892184", "text": "function getPrimaryKey() {\n\t\treturn $this->_MessageID;\n\t}", "title": "" }, { "docid": "589258e0df0b32c41a8c46896a0c2c36", "score": "0.5789867", "text": "public function key() {\n\n if ($this->noActive()) return null;\n\n list($key, $value) = current($this->items);\n\n return $key;\n }", "title": "" }, { "docid": "77899f6dde0378fdd7b76d96102abd7e", "score": "0.5724924", "text": "public function get_key()\n\t{\n\t\treturn array_get ( $this->attributes, static::$key );\n\t}", "title": "" }, { "docid": "7077f43910c56987ce6bdf68ced847b7", "score": "0.5673517", "text": "public function key()\n {\n return $this->currentItemId;\n }", "title": "" }, { "docid": "30c33192f2ddc2e18caf1f9d646254bf", "score": "0.56358945", "text": "public function getKey() {\n\t\treturn $this->_key;\n\t}", "title": "" }, { "docid": "fba7e4adacc4beb4dc5f7b47840c037d", "score": "0.5635824", "text": "public function key()\n {\n return (string)$this->subKeyNames[$this->pointer];\n }", "title": "" }, { "docid": "d8423068b8b04589d4044d20925c6467", "score": "0.561312", "text": "public function getParentKey()\n\t{\n\t\treturn $this->parent_id;\n\t}", "title": "" }, { "docid": "f6ada45bf5af84cc82539c26b8d631ee", "score": "0.56101334", "text": "public function getKey()\n {\n return isset($this->_key) ? $this->_key : null;\n }", "title": "" }, { "docid": "0db007361c4d954cc35eabced62e4490", "score": "0.5604704", "text": "public function getKey() {\r\n return $this->getId();\r\n }", "title": "" }, { "docid": "54eebbfbbd46576855dc239125817cda", "score": "0.56046224", "text": "public function getKey()\n {\n return $this->getAttribute ( $this->getKeyName () );\n }", "title": "" }, { "docid": "42fb1035c6c0f90a9e18c4ddbcc3a9b9", "score": "0.5604009", "text": "public function get_key() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "c52aeeb47554418d16275792fbe1f0e9", "score": "0.5582421", "text": "public function getKey()\n {\n return $this->Key;\n }", "title": "" }, { "docid": "0cc15f6cea85ced723818fdd0b12a8bf", "score": "0.55782884", "text": "public function getKey()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "cf1872b37679e8c6bda9b4b5c950059d", "score": "0.5574917", "text": "public function getKey() {\n return $this->getAttribute($this->getKeyName());\n }", "title": "" }, { "docid": "2d8be7514b981107795c469f2db7f6b3", "score": "0.5559147", "text": "public function getKey()\n {\n return $this->get(self::KEY);\n }", "title": "" }, { "docid": "797c7e4c503f877b9e60baf15a4043d9", "score": "0.5557015", "text": "public function getKey()\n {\n return $this->getAttribute($this->getKeyName());\n }", "title": "" }, { "docid": "797c7e4c503f877b9e60baf15a4043d9", "score": "0.5557015", "text": "public function getKey()\n {\n return $this->getAttribute($this->getKeyName());\n }", "title": "" }, { "docid": "2e5a1287e90ebaba56a9a8a0a14e9bad", "score": "0.5532977", "text": "public function key()\n\t{\n\t\t$extractor = $this->key;\n\n\t\treturn $extractor($this->_fetchCurrent(), parent::key(), $this);\n\t}", "title": "" }, { "docid": "9b54e73e8edad18c6a84d38a95a8b155", "score": "0.5531342", "text": "public function key()\n {\n return key($this->_children);\n }", "title": "" }, { "docid": "2faca0e9e38b71fdfd6355edbb8e9c45", "score": "0.5514858", "text": "public function getiKey() {\n return $this->iKey;\n }", "title": "" }, { "docid": "91346464532c2f7640c9bdcb8d4f92ed", "score": "0.55123293", "text": "public function getKey()\n\t{\n\t\treturn $this->validateKey($this->key);\n\t}", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "f55adf789fc7603fc61e4f9320a01113", "score": "0.55103177", "text": "public function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "6e51c95a897acdc5d81674249e913316", "score": "0.55001885", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "6e51c95a897acdc5d81674249e913316", "score": "0.55001885", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "12300affbb4105500acbfb19dd982c59", "score": "0.549886", "text": "public function getKey()\n {\n return self::$_key;\n }", "title": "" }, { "docid": "27fc4c1cecd5159070d2851b15ff9462", "score": "0.54974526", "text": "public function equals(MessageItemChildCompoundKey $key): bool\n {\n return\n $this->getMailAccountId() === $key->getMailAccountId() &&\n $this->getMailFolderId() === $key->getMailFolderId() &&\n $this->getParentMessageItemId() === $key->getParentMessageItemId() &&\n $this->getId() === $key->getId();\n }", "title": "" }, { "docid": "515a1cf6a7f4fc3886a0581b06c4855a", "score": "0.5493499", "text": "public function getKey()\n\t{\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "a8fe94f4481aa8f8288afbcbdc9649f0", "score": "0.54918724", "text": "public function getMessageKey() {}", "title": "" }, { "docid": "67b4b5fe17a33f4b7c91444fd30b01e0", "score": "0.5475273", "text": "public function getKey(){\n\n return $this->_key;\n }", "title": "" }, { "docid": "8881be3c8bfc46da0d5123e8d4f6bd59", "score": "0.54695165", "text": "public function getKey()\n {\n return self::KEY;\n }", "title": "" }, { "docid": "8881be3c8bfc46da0d5123e8d4f6bd59", "score": "0.54695165", "text": "public function getKey()\n {\n return self::KEY;\n }", "title": "" }, { "docid": "9ca9c6859f9c536d23901a2a77e47fea", "score": "0.5462847", "text": "public function getKey()\n {\n return $this->getProperty($this->getKeyName());\n }", "title": "" }, { "docid": "bf388e010926ac81a4a00045f0498788", "score": "0.54596597", "text": "public function getKey()\n {\n if ($this->key === null) {\n $this->key = $this->loadKey();\n }\n\n return $this->key;\n }", "title": "" }, { "docid": "30e02bc90b1e15d3878b684f930e44d8", "score": "0.54583687", "text": "public function getKey()\n {\n\n return $this->key;\n\n }", "title": "" }, { "docid": "c38f9855e2c47f582c1f37eebc2786d2", "score": "0.5451284", "text": "public function getKey()\r\n {\r\n return $this->key;\r\n }", "title": "" }, { "docid": "7572e9e8370af795cda8c2ede49b7268", "score": "0.5414491", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "7572e9e8370af795cda8c2ede49b7268", "score": "0.5414491", "text": "public function getKey() {\n return $this->key;\n }", "title": "" }, { "docid": "49e86d5dec6c70d0c7eb0a2303097c1c", "score": "0.540152", "text": "function getKey() {\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "1963c8aa37b14b87f64e57fac9261e3b", "score": "0.5378701", "text": "public function key ( ) {\n\n return $this->_key;\n }", "title": "" }, { "docid": "8e7c8143b99594f0758a87e955924319", "score": "0.53760326", "text": "function getMailchimpParentKey()\n {\n return self::MAILCHIMP_PARENT_KEY;\n }", "title": "" }, { "docid": "364f5071cef7a5dbbdda4829e510d689", "score": "0.5369916", "text": "public function key()\n {\n return $this->_key;\n }", "title": "" }, { "docid": "7dd793c842fb389c0deb46cbf5dfa1c0", "score": "0.5356029", "text": "public function getKey()\n {\n $key = $this->getKeyName();\n\n return $this->getAttribute($key);\n }", "title": "" }, { "docid": "a0db5d8777d331745bc05b37bbc88615", "score": "0.53559643", "text": "public static function get_key() {\n\t\treturn self::$key;\n\t}", "title": "" }, { "docid": "0a4f7f799f52d10fbb211c7e5a2e17cb", "score": "0.5343537", "text": "function getKey()\n {\n return $this->key;\n }", "title": "" }, { "docid": "60a4372fdfb4725bf092e560ec752cf4", "score": "0.5339888", "text": "public function getKey() {\n return $this->_key;\n }", "title": "" }, { "docid": "ca74c51bc8436f700f5076d07ede4980", "score": "0.53394604", "text": "public function getObjectKey()\n {\n return $this->objectKey;\n }", "title": "" }, { "docid": "ca74c51bc8436f700f5076d07ede4980", "score": "0.53394604", "text": "public function getObjectKey()\n {\n return $this->objectKey;\n }", "title": "" }, { "docid": "fde4d6fddf8a961b90a8dcdfda869d56", "score": "0.5334872", "text": "public function getKey()\n {\n if (is_null($this->key)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_KEY);\n if (is_null($data)) {\n return null;\n }\n $this->key = (string) $data;\n }\n\n return $this->key;\n }", "title": "" }, { "docid": "fde4d6fddf8a961b90a8dcdfda869d56", "score": "0.5334872", "text": "public function getKey()\n {\n if (is_null($this->key)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_KEY);\n if (is_null($data)) {\n return null;\n }\n $this->key = (string) $data;\n }\n\n return $this->key;\n }", "title": "" }, { "docid": "fde4d6fddf8a961b90a8dcdfda869d56", "score": "0.5334872", "text": "public function getKey()\n {\n if (is_null($this->key)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_KEY);\n if (is_null($data)) {\n return null;\n }\n $this->key = (string) $data;\n }\n\n return $this->key;\n }", "title": "" }, { "docid": "157bc0eb1800d0ed18646722fbcfd4a0", "score": "0.53304857", "text": "public function getIdKey()\n {\n return $this->idKey;\n }", "title": "" }, { "docid": "7fe2a45a2016299b5745ba82b79a9342", "score": "0.5328147", "text": "public function getObjectKey() {\n\t\treturn $this->objectKey;\n\t}", "title": "" }, { "docid": "9a3e62fcd39f1af2a419fffe9e347a80", "score": "0.53165174", "text": "public function key()\n {\n return $this->keys->current();\n }", "title": "" }, { "docid": "99927d9511eba944244cb72fbc51a7d4", "score": "0.5316141", "text": "public function key()\n {\n return $this->getInnerIterator()->key();\n }", "title": "" }, { "docid": "14f7bad7ffbba45efdc646163bf05b93", "score": "0.5304694", "text": "public function key() {\n return $this->currentItem;\n }", "title": "" }, { "docid": "561fe1a55a74f744d12d7defc3fb305e", "score": "0.5293707", "text": "public function key() {\r\n if (is_null($this->content)) {\r\n $this->getContent();\r\n }\r\n $var = key($this->content);\r\n return $var;\r\n }", "title": "" }, { "docid": "c05cacec1acb7d1011578a5405c748b1", "score": "0.52872694", "text": "public function key()\n {\n return $this->valid() ? $this->current->getIntValue() : null;\n }", "title": "" }, { "docid": "d86f69246d2f56771ed76edcc23e92cc", "score": "0.52836025", "text": "public function key()\n {\n return $this->currentKey;\n }", "title": "" }, { "docid": "9d1fa6934d30991d46bf131963b12c3b", "score": "0.5269811", "text": "public function getKey() {\n\n return $this->key;\n\n }", "title": "" }, { "docid": "0bfc9f85a8f8799eaee7aecf72bf6ba0", "score": "0.52595776", "text": "public function getKey()\n\t{\n\t\t$this->loadPrivateData();\n\t\treturn $this->key;\n\t}", "title": "" }, { "docid": "2e6b03e91c8e1a30f2353593bce9cd1f", "score": "0.5248072", "text": "public static function getKey()\n {\n return static::KEY_FIELD;\n }", "title": "" }, { "docid": "ab6b50f76d3a3a33f11aaf6fc9ad564d", "score": "0.5247993", "text": "public function key() {\n return key($this->_data);\n }", "title": "" }, { "docid": "1b59f1bc31e2032a93099a6109f0e219", "score": "0.52391994", "text": "public function firstKey()\n {\n if ($this->isEmpty()) throw new EmptyContainerException('Empty Container');\n\n return first_key($this->items);\n }", "title": "" }, { "docid": "4cafd3a5dfa437c110bfd480b09e2dd3", "score": "0.5228515", "text": "public function key()\n {\n return $this->keys[$this->position];\n }", "title": "" }, { "docid": "6b0157252b6d39ba3d97e99b27384b16", "score": "0.52219", "text": "public function key() {\n return serialize($this->currentKey);\n }", "title": "" } ]
26f3aee49155c1bc64932e1f662eacfc
Creates an exception with appropriate message.
[ { "docid": "cea9cc6c908393b79d11219f9e055847", "score": "0.53920317", "text": "private static function createException(string $key, string $type, mixed $value): TypedConfigException\n {\n return new TypedConfigException($key, $type, $value);\n }", "title": "" } ]
[ { "docid": "1f5cb36d0d16a98bac78dddf1b48e089", "score": "0.6742168", "text": "public function __construct()\n {\n \n //Get arguments.\n $args = func_get_args();\n \n //Set the previous exception to given or null.\n $previous = ($args[0] instanceof self) ? array_shift($args) : null;\n \n //If there are no further arguments, we have no message.\n if(empty($args)){\n $message = 'No error message.';\n }\n \n //If we have a message, run it through sprintf.\n else{\n $message = call_user_func_array('sprintf', $args);\n }\n \n //Construct the Exception using the native constructor.\n parent::__construct($message, 0, $previous);\n \n }", "title": "" }, { "docid": "9e5cd2b91a20d06892000195a29cbd5c", "score": "0.65025437", "text": "protected function newException($Message) {\n return new Exception($Message);\n }", "title": "" }, { "docid": "67a4604a37b9dc46959f3acfa8675881", "score": "0.643714", "text": "public static function create($message = '', Exception $previous = null)\n {\n return new static($message, 1500, $previous);\n }", "title": "" }, { "docid": "e91f2521e58b2168d151b8cfe1a71d6c", "score": "0.6416801", "text": "function getException($message, $code);", "title": "" }, { "docid": "ef18fbcb79ab6f1f2bb41161752336cd", "score": "0.63630795", "text": "public function testConstructorWithInvalidUuidThrowsAnException()\n {\n $this->expectException(MessageException::class);\n\n $this->createMessage('type', 'name', 'xx');\n }", "title": "" }, { "docid": "48eb69c79e56eb349b7b9fa45b467781", "score": "0.6280859", "text": "private function constructException()\n {\n $this->details['argument_type_error'][$this->argument] = $this->details['argument_type_error']['ARG'];\n $this->details['argument_type_error'][$this->argument] = str_replace(['VAR_TYPE', 'ARG_TYPE'], [$this->argumentValueType, $this->argumentType], $this->details['argument_type_error'][$this->argument]);\n unset($this->details['argument_type_error']['ARG']);\n\n $this->resolution = str_replace('ARG_TYPE', $this->argumentType, $this->resolution);\n }", "title": "" }, { "docid": "0b78a50f7e2ac87d45ae52935c8a105d", "score": "0.6276293", "text": "public function createException($message = null, $code = null, RootException $previous = null)\n {\n return new \\Exception($message, $code, $previous);\n }", "title": "" }, { "docid": "831b6a06070936cacdbc04ad38ba9eac", "score": "0.62313837", "text": "public function testConstructorWithoutTypeThrowsAnException()\n {\n $this->expectException(MessageException::class);\n\n $this->createMessage('', 'name');\n }", "title": "" }, { "docid": "c0c063068469493ca07a8dd8fe442cb1", "score": "0.6147036", "text": "private function makeException()\n {\n $this->thrownException = BLMSResponseException::create($this);\n }", "title": "" }, { "docid": "bba057617c259d05062f50d23ecc9d9b", "score": "0.61104774", "text": "public function __construct ($message = null, $code = 0)\n\t{\n\n\t\tparent::__construct($message, $code);\n\n\t\t$this->setName('FactoryException');\n\n\t}", "title": "" }, { "docid": "395b5e086e3562f40cb707bec759c28b", "score": "0.602398", "text": "public function testConstructorWithoutNameThrowsAnException()\n {\n $this->expectException(MessageException::class);\n\n $this->createMessage('type', '');\n }", "title": "" }, { "docid": "695b826ab5230743985d1def7360d297", "score": "0.6006016", "text": "public function __construct( $message = '', $code = 0, Exception $previous = NULL ) {\n parent::__construct( $message, ( TypeTest::is_valid_int( $code ) ? $code : -1 ), $previous );\n self::$_exceptions[] = $this;\n }", "title": "" }, { "docid": "7736c15db25fcafc6f1bd3f1cc2b4a30", "score": "0.59941953", "text": "protected function createHttpException($code = 500, $message = null) {\n return new \\Symfony\\Component\\HttpKernel\\Exception\\HttpException($code, $message);\n }", "title": "" }, { "docid": "39d8d28f007f2d4881fd62bece85f64b", "score": "0.59892756", "text": "public function createException($message = '')\n {\n $mock = $this->getMockBuilder('Exception')\n ->setConstructorArgs([$message])\n ->getMock();\n\n return $mock;\n }", "title": "" }, { "docid": "39d8d28f007f2d4881fd62bece85f64b", "score": "0.59892756", "text": "public function createException($message = '')\n {\n $mock = $this->getMockBuilder('Exception')\n ->setConstructorArgs([$message])\n ->getMock();\n\n return $mock;\n }", "title": "" }, { "docid": "39d8d28f007f2d4881fd62bece85f64b", "score": "0.59892756", "text": "public function createException($message = '')\n {\n $mock = $this->getMockBuilder('Exception')\n ->setConstructorArgs([$message])\n ->getMock();\n\n return $mock;\n }", "title": "" }, { "docid": "9e4418597a8e0bd45d471e30411a5a4e", "score": "0.5988596", "text": "public function makeException()\n {\n $this->thrownException = ZaloResponseException::create($this);\n }", "title": "" }, { "docid": "e39af04cac1fded08d2a52935d59191d", "score": "0.5917152", "text": "public function compoundMessage() {\n return sprintf(\n 'Exception %s (LDAP errorcode #%d [%s]: %s)',\n $this->getClassName(),\n $this->errorcode,\n ldap_err2str($this->errorcode),\n $this->message\n );\n }", "title": "" }, { "docid": "dfabc6b293ece59cff2b82fa4a570762", "score": "0.59155446", "text": "public function messagesMessagesConstructException(UnitTester $I)\n {\n $I->wantToTest('Messages\\Messages - appendMessages() - exception');\n\n /**\n * Sometimes Travis reports 'boolean' vs 'bool' and the test fails. This\n * is why `expectThrowable` is not used here\n */\n $actual = '';\n\n try {\n (new Messages())->appendMessage(true);\n } catch (TypeError $ex) {\n $actual = $ex->getMessage();\n }\n\n $I->assertEquals(\n 'Argument 1 passed to Phalcon\\Messages\\Messages::appendMessage()' .\n ' must implement interface Phalcon\\Messages\\MessageInterface, bool',\n substr($actual, 0, 128)\n );\n }", "title": "" }, { "docid": "ebe9329e40ef6110e5638005fc35b51a", "score": "0.58634144", "text": "public function testAccountNotFoundException() : void\n {\n // INIT\n //-----\n\n $exception = new AccountNotFoundException($this::MESSAGE);\n\n // TEST\n //-----\n\n $this->assertEquals($this::MESSAGE, $exception->getMessageKey());\n }", "title": "" }, { "docid": "b2a952ccb98c06c2cf38bac67385ffa8", "score": "0.5850954", "text": "public function makeException()\n {\n $this->thrownException = CentrifugoResponseException::create($this);\n }", "title": "" }, { "docid": "8480816219ef8fdcdd8c302d8713a7e7", "score": "0.5766109", "text": "public function testExceptionMessageIsFormattedCorrectly()\n {\n $version = 'x.y.z';\n $exception = InvalidStringRepresentationException::with($version);\n\n self::assertEquals(\n \"The string \\\"$version\\\" is not a valid representation of a semantic version number.\",\n $exception->getMessage(),\n 'The exception message was not formatted correctly.'\n );\n }", "title": "" }, { "docid": "3cd4661b2af281e8ae7f3863a29e8696", "score": "0.57110643", "text": "public function testConstructExceptionInvalidKeys()\n {\n $this->setExpectedException(\n 'Zend\\Cloud\\Infrastructure\\Exception\\InvalidArgumentException',\n 'The param \"'.Instance::INSTANCE_ID.'\" is a required param for Zend\\Cloud\\Infrastructure\\Instance'\n );\n $instance = new Instance(self::$adapter,array('foo'=>'bar'));\n }", "title": "" }, { "docid": "95014eaed7488df74ffbecacc7582b89", "score": "0.5692208", "text": "public function testSynopsis()\n {\n $message = 'hello world';\n $exception = new InternalErrorException($message);\n\n $this->assertEquals($message, $exception->getMessage());\n $this->assertEquals(500, $exception->getAssociatedStatusCode());\n }", "title": "" }, { "docid": "eaa4e9d5a96b2fee61826b7f2e77537a", "score": "0.5675381", "text": "function _ex($m){\n\t\treturn new Exception($m);\t\t\n\t}", "title": "" }, { "docid": "719f1b65eb781e7284b026451e0c9e20", "score": "0.5645355", "text": "public function testConstructWithoutErrors() {\n $exception = new \\Maleficarum\\Exception\\ServiceUnavailableException('foo');\n\n $this->assertSame('foo', $exception->getMessage());\n $this->assertSame(503, $exception->getStatusCode());\n $this->assertSame('Service Unavailable', $exception->getReasonPhrase());\n }", "title": "" }, { "docid": "fdd008bf96c059f33df87abea5a68576", "score": "0.5639248", "text": "public static function factory($code, $message = NULL, array $variables = NULL, Exception $previous = NULL)\n {\n $class = 'HTTP_Exception_'.$code;\n\n if ($code == 404)\n {\n HTTP::redirect(URL::http_base());\n die;\n }\n \n return new $class($message, $variables, $previous);\n }", "title": "" }, { "docid": "c17cf9f75b7f653ac6739a6efb6a79a2", "score": "0.5638632", "text": "public function testCreateThrowsExceptionIfNoStringIsProvided()\n {\n $this->setExpectedException('InvalidArgumentException');\n $this->builder()->create(new stdClass());\n }", "title": "" }, { "docid": "27449aacd58f61c4377328c9273796e6", "score": "0.5632262", "text": "private function raiseError($message)\n {\n throw new Exception($message);\n }", "title": "" }, { "docid": "7c8b7b3b6d274bdec9ddbf45aea14cf5", "score": "0.56201285", "text": "private function _generateExceptionMessage(int $tag): string\n {\n return sprintf('%s expected, got %s.', Element::tagToName($tag),\n $this->_typeDescriptorString());\n }", "title": "" }, { "docid": "40ce8895a8787db0d048d9e9b71ecd25", "score": "0.5618695", "text": "public function testCreateMethodWithPrevious()\n {\n $previous = new PhpException('The previous exception.');\n $exception = Exception::create(\n 'This is %my% %index%st message.',\n [\n 'my' => 'my',\n 'index' => 1\n ],\n null,\n $previous\n );\n\n static::assertSame($previous, $exception->getPrevious());\n static::assertInstanceOf(PhpException::class, $exception->getPrevious());\n static::assertInstanceOf(Exception::class, $exception);\n static::assertEquals('This is my 1st message.', $exception->getMessage());\n }", "title": "" }, { "docid": "06a01bb98a103b16b1fac1cf2c23982a", "score": "0.5585792", "text": "private function ExceptionToMessage($exception)\n\t{\n\t\tif (!$exception)\n\t\t\treturn;\n\n\t\tif ($exception instanceof GitPHP_InvalidProjectParameterException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Invalid project %1$s'), $exception->Project);\n\t\t\treturn sprintf('Invalid project %1$s', $exception->Project);\n\t\t}\n\t\t\n\t\tif ($exception instanceof GitPHP_MissingProjectParameterException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn $this->resource->translate('Project is required');\n\t\t\treturn 'Project is required';\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_SearchDisabledException) {\n\t\t\tif ($exception->FileSearch) {\n\t\t\t\tif ($this->resource)\n\t\t\t\t\treturn $this->resource->translate('File search has been disabled');\n\t\t\t\treturn 'File search has been disabled';\n\t\t\t} else {\n\t\t\t\tif ($this->resource)\n\t\t\t\t\treturn $this->resource->translate('Search has been disabled');\n\t\t\t\treturn 'Search has been disabled';\n\t\t\t}\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_InvalidSearchTypeException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn $this->resource->translate('Invalid search type');\n\t\t\treturn 'Invalid search type';\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_SearchLengthException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->ngettext('You must enter search text of at least %1$d character', 'You must enter search text of at least %1$d characters', $exception->MinimumLength), $exception->MinimumLength);\n\t\t\treturn sprintf($exception->MinimumLength == 1 ? 'You must enter search text of at least %1$d character' : 'You must enter search text of at least %1$d characters', $exception->MinimumLength);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_InvalidHashException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Invalid hash %1$s'), $exception->Hash);\n\t\t\treturn sprintf('Invalid hash %1$s', $exception->Hash);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_InvalidGitExecutableException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Could not run the git executable \"%1$s\". You may need to set the \"%2$s\" config value.'), $exception->Executable, 'gitbin');\n\t\t\treturn sprintf('Could not run the git executable \"%1$s\". You may need to set the \"%2$s\" config value.', $exception->Executable, 'gitbin');\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_MissingProjectrootException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn $this->resource->translate('A projectroot must be set in the config');\n\t\t\treturn 'A projectroot must be set in the config';\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_MissingMemcacheException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn $this->resource->translate('The Memcached or Memcache PHP extension is required for Memcache support');\n\t\t\treturn 'The Memcached or Memcache PHP extension is required for Memcache support';\n\t\t}\n\n\t\tif (($exception instanceof GitPHP_InvalidDirectoryException) || ($exception instanceof GitPHP_InvalidDirectoryConfigurationException)) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('%1$s is not a directory'), $exception->Directory);\n\t\t\treturn sprintf('%1$s is not a directory', $exception->Directory);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_InvalidFileException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('%1$s is not a file'), $exception->File);\n\t\t\treturn sprintf('%1$s is not a file', $exception->File);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_InvalidGitRepositoryException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('%1$s is not a git repository'), $exception->Repository);\n\t\t\treturn sprintf('%1$s is not a git repository', $exception->Repository);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_ProjectListFileReadException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Failed to open project list file %1$s'), $exception->File);\n\t\t\treturn sprintf('Failed to open project list file %1$s', $exception->File);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_DirectoryTraversalException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('%1$s is attempting directory traversal'), $exception->Path);\n\t\t\treturn sprintf('%1$s is attempting directory traversal', $exception->Path);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_ProjectrootBoundException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('%1$s is outside of the projectroot'), $exception->Path);\n\t\t\treturn sprintf('%1$s is outside of the projectroot', $exception->Path);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_InvalidConfigFileException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Could not load config file %1$s'), $exception->File);\n\t\t\treturn sprintf('Could not load config file %1$s', $exception->File);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_AmbiguousHashException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Ambiguous abbreviated hash %1$s'), $exception->Hash);\n\t\t\t\n\t\t\treturn sprintf('Ambiguous abbreviated hash %1$s', $exception->Hash);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_DirectoryNotFoundException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Directory %1$s not found'), $exception->Directory);\n\n\t\t\treturn sprintf('Directory %1$s not found', $exception->Directory);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_FileNotFoundException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('File %1$s not found'), $exception->File);\n\n\t\t\treturn sprintf('File %1$s not found', $exception->File);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_UnauthorizedProjectException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('You are not authorized to access project %1$s'), $exception->Project);\n\n\t\t\treturn sprintf('You are not authorized to access project %1$s', $exception->Project);\n\t\t}\n\n\t\tif ($exception instanceof GitPHP_DisabledFunctionException) {\n\t\t\tif ($this->resource)\n\t\t\t\treturn sprintf($this->resource->translate('Required function %1$s has been disabled'), $exception->Function);\n\n\t\t\treturn sprintf('Required function %1$s has been disabled', $exception->Function);\n\t\t}\n\n\t\treturn $exception->getMessage();\n\t}", "title": "" }, { "docid": "be9494de45246b0eafd6a05b5387dec7", "score": "0.5578257", "text": "public function testConstruct() {\n\n // Set an Exception mock.\n $throwable = new Exception(\"throwable\");\n\n $obj = new TestException(\"exception\", $throwable);\n\n $this->assertEquals(\"exception\", $obj->getMessage());\n $this->assertSame($throwable, $obj->getPrevious());\n }", "title": "" }, { "docid": "61153a15f11ffc04f8da897a6d2ea114", "score": "0.5574575", "text": "protected function createException(string $error, int $errorNo, ?string $sqlState, ?string $query = null): Exception\n\t{\n\t\t// see codes at http://www.postgresql.org/docs/9.4/static/errcodes-appendix.html\n\t\tif ($sqlState === '0A000' && str_contains($error, 'truncate')) {\n\t\t\t// Foreign key constraint violations during a TRUNCATE operation\n\t\t\t// are considered \"feature not supported\" in PostgreSQL.\n\t\t\treturn new ForeignKeyConstraintViolationException($error, $errorNo, $sqlState, null, $query);\n\n\t\t} elseif ($sqlState === '23502') {\n\t\t\treturn new NotNullConstraintViolationException($error, $errorNo, $sqlState, null, $query);\n\n\t\t} elseif ($sqlState === '23503') {\n\t\t\treturn new ForeignKeyConstraintViolationException($error, $errorNo, $sqlState, null, $query);\n\n\t\t} elseif ($sqlState === '23505') {\n\t\t\treturn new UniqueConstraintViolationException($error, $errorNo, $sqlState, null, $query);\n\n\t\t} elseif ($sqlState === null && stripos($error, 'pg_connect()') !== false) {\n\t\t\treturn new ConnectionException($error, $errorNo, '');\n\n\t\t} elseif ($query !== null) {\n\t\t\treturn new QueryException($error, $errorNo, $sqlState ?? '', null, $query);\n\n\t\t} else {\n\t\t\treturn new DriverException($error, $errorNo, $sqlState ?? '');\n\t\t}\n\t}", "title": "" }, { "docid": "1bf48de2faf5f0c273fcf3bd8caffcf0", "score": "0.55686086", "text": "public function testException2()\n {\n $data = [\n\n 'title' => 'The Test'\n ];\n\n $message = $this->expectExceptionMessage('Unable to create a listing, invalid id');\n\n $listing = new ListingBasic($data);\n\n }", "title": "" }, { "docid": "4b2d76fb1af9ac0b7e3a5dbe27560925", "score": "0.556203", "text": "public function exceptionMessage(): string;", "title": "" }, { "docid": "c989067161afdb7f5ecea12eb96eb30a", "score": "0.55591595", "text": "public function __construct($message, $code = 500, Exception $previous = null) {\n self::$count++;\n if (self::$count > Config::$exception_limit) {\n trigger_error('Exception limit exceeded. Futher exceptions will not be reported.');\n return;\n }\n \n $trace = $this->getTrace();\n $traceStr = $this->getTraceAsString();\n if ($previous) {\n $trace = array_merge($trace, $previous->getTrace());\n $traceStr .= \"\\n\\n\".$this->getTraceAsString();\n }\n \n parent::__construct((string) $message, (int) $code, $previous);\n\n if (defined('SILENT_EXCEPTIONS') && SILENT_EXCEPTIONS) {\n return;\n }\n\n //Set up the Exception\n $error = \"<p>MyRadio has encountered a problem processing this request.</p>\n <table class='errortable' style='color:#633'>\n <tr><td>Message</td><td>{$this->getMessage()}</td></tr>\n <tr><td>Location</td><td>{$this->getFile()}:{$this->getLine()}</td></tr>\n <tr><td>Trace</td><td>\" . nl2br($traceStr) . \"</td></tr>\n </table>\";\n \n if (class_exists('Config')) {\n if (Config::$email_exceptions && class_exists('MyRadioEmail') && $code !== 400) {\n MyRadioEmail::sendEmailToComputing('[MyRadio] Exception Thrown',\n $error . \"\\r\\n\" . $message . \"\\r\\n\" .\n (isset($_SESSION) ? print_r($_SESSION, true) : '') . \"\\r\\n\" . CoreUtils::getRequestInfo());\n }\n //Configuration is available, use this to decide what to do\n if (Config::$display_errors or (class_exists('CoreUtils') &&\n CoreUtils::hasPermission(AUTH_SHOWERRORS))) {\n if ((isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') or empty($_SERVER['REMOTE_ADDR'])) {\n //This is an Ajax/CLI request. Return JSON\n header('HTTP/1.1 ' . $code . ' Internal Server Error');\n header('Content-Type: text/json');\n echo json_encode(array(\n 'status' => 'MyRadioException',\n 'error' => $message,\n 'code' => $code,\n 'trace' => $trace\n ));\n } else {\n //Output to the browser\n header('HTTP/1.1 ' . $code . ' Internal Server Error');\n\n if (class_exists('CoreUtils') && !headers_sent()) {\n //We can use a pretty full-page output\n $twig = CoreUtils::getTemplateObject();\n $twig->setTemplate('error.twig')\n ->addVariable('serviceName', 'Error')\n ->addVariable('title', 'Internal Server Error')\n ->addVariable('body', $error)\n ->addVariable('uri', $_SERVER['REQUEST_URI'])\n ->render();\n } else {\n echo $error;\n }\n }\n } else {\n $error = '<div class=\"errortable\"><strong>' . $this->getMessage() . '</strong>'\n . '<p>A fatal error has occured that has prevented MyRadio from performing the action you requested. '\n . 'The computing team have been notified.</p></div>';\n //Output limited info to the browser\n header('HTTP/1.1 ' . $code . ' Internal Server Error');\n\n if (class_exists('CoreUtils') && !headers_sent()) {\n //We can use a pretty full-page output\n $twig = CoreUtils::getTemplateObject();\n $twig->setTemplate('error.twig')\n ->addVariable('serviceName', 'Error')\n ->addVariable('title', 'Internal Server Error')\n ->addVariable('body', $error)\n ->addVariable('uri', $_SERVER['REQUEST_URI'])\n ->render();\n } else {\n echo $error;\n }\n }\n } else {\n echo 'A fatal error has occured that has prevented MyRadio from performing the action you requested. Please contact computing@ury.org.uk.';\n }\n }", "title": "" }, { "docid": "5ee25e7dfe33bf90ffdfdd0276e8ff29", "score": "0.5553948", "text": "abstract protected function _createOutOfRangeException(\n $message = null,\n $code = null,\n RootException $previous = null,\n $argument = null\n );", "title": "" }, { "docid": "427cbfcf59777a262aabae3a3fd75f14", "score": "0.5552328", "text": "function ju_error_create($m = null):DFE {return ju_is_th($m) ? DFE::wrap($m) :\n\tnew DFE($m instanceof Phrase ? $m : (\n\t\t/**\n\t\t * 2019-12-16\n\t\t * I have changed `!$m` to `is_null($m)`.\n\t\t * It passes an empty string ('') directly to @uses \\Justuno\\Core\\Exception::__construct()\n\t\t * and it prevents @uses \\Justuno\\Core\\Exception::__construct() from calling @see ju_bt_log()\n\t\t * @see \\Justuno\\Core\\Exception::__construct():\n\t\t *\t\tif (is_null($m)) {\n\t\t *\t\t\t$m = __($prev ? ju_xts($prev) : 'No message');\n\t\t *\t\t\t# 2017-02-20 To facilite the «No message» diagnostics.\n\t\t *\t\t\tif (!$prev) {\n\t\t *\t\t\t\tju_bt_log();\n\t\t *\t\t\t}\n\t\t *\t\t}\n\t\t */\n\t\tis_null($m) ? null : (is_array($m) ? implode(\"\\n\\n\", $m) : (\n\t\t\tju_contains($m, '%1') ? __($m, ...ju_tail(func_get_args())) :\n\t\t\t\tju_format(func_get_args())\n\t\t))\n\t))\n;}", "title": "" }, { "docid": "dd9562cbd768ff921286562a16e2a1b6", "score": "0.5551602", "text": "private function makeMessage()\n {\n $format = 'Failed %s on table: [%s] with fields: [%s]';\n $pars = array(\n $this->type,\n $this->table,\n print_r($this->fields, true),\n );\n\n if ($this->type == 'update') {\n $format .= ' on id: [%s]';\n $pars[] = $this->id;\n }\n\n return vsprintf($format, $pars);\n }", "title": "" }, { "docid": "fa1ea7642bf5f850859c92ed47b23746", "score": "0.55400544", "text": "function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered') {\n throw new PHPUnit_Framework_Exception($message, $status_code);\n }", "title": "" }, { "docid": "0000e6cc8a5f058e913430e39f7d88a9", "score": "0.5531243", "text": "public function testItShouldThrowInvalidArgumentExceptionWhenInvalidType()\n {\n static::expectException(\\InvalidArgumentException::class);\n\n $statusCode = 400;\n $type = 'foo';\n\n new ApiProblem($statusCode, $type);\n }", "title": "" }, { "docid": "8a2354eaf6acf3cf080583a73c8ce374", "score": "0.5526303", "text": "public function createResponseError(\\Exception $exception): string;", "title": "" }, { "docid": "8af2eead2111483fe56ea3cd706d916a", "score": "0.552321", "text": "public function createMessage();", "title": "" }, { "docid": "a3b27209c6dcc77066dd77b7ac65007b", "score": "0.55092394", "text": "public function getException();", "title": "" }, { "docid": "d7163c2efe152d8c96311709c6a2941d", "score": "0.5492207", "text": "public function __construct($message, $code = 0, Exception $previous = null) {\n\t\t// make sure everything is assigned properly\n\t\tparent::__construct($message, $code, $previous);\n\t}", "title": "" }, { "docid": "79f2410b9ccbca0fd66fe98dff566dde", "score": "0.5490299", "text": "protected function throwNewInvalidArgumentException ($errorMsg) {\n\t\t$str = '['.get_class().'] ' . $errorMsg . ' (';\n\t\tif ($this->form) {\n\t\t\t$str .= 'form id: `'.$this->form->GetId() . '`, '\n\t\t\t\t. 'form type: `'.get_class($this->form).'`, ';\n\t\t}\n\t\tif (property_exists($this, 'name') && isset($this->name))\n\t\t\t$str .= 'field name: `' . $this->name . '`, ';\n\t\t$str .= 'field type: `' . get_class($this) . '`)';\n\t\tthrow new \\InvalidArgumentException($str);\n\t}", "title": "" }, { "docid": "a5cc77ed9313c939991c34dad2a52d8e", "score": "0.54787016", "text": "public function testException3()\n {\n $data = [\n 'id' => '99',\n\n ];\n\n $message = $this->expectExceptionMessage('Unable to create a listing, invalid title');\n\n $listing = new ListingBasic($data);\n\n\n\n }", "title": "" }, { "docid": "3ad1f6a341ad8136338ed24523ca9b3a", "score": "0.5476252", "text": "public static function create(\n string $msg,\n string $path,\n string $delimiter,\n array $index,\n ?\\Throwable $previous = null\n ): ResolveException {\n $len = ($index !== [] ? \\strlen($delimiter) + \\strlen(\\join($delimiter, $index)) : 0);\n $invalidPath = $len > 0 ? \\substr(\\rtrim($path, $delimiter), 0, -1 * $len) : $path;\n\n return new ResolveException(sprintf($msg, $invalidPath), 0, $previous);\n }", "title": "" }, { "docid": "feaad6e849f1d0ccd5fb41a38f347637", "score": "0.54704684", "text": "public function getExceptionMessage(): string;", "title": "" }, { "docid": "949651a51b02f7a1ebb2f662b9a18832", "score": "0.54683846", "text": "public static function throwException($msg)\n {\n throw new Exception($msg);\n }", "title": "" }, { "docid": "dd844cd86d954f15385624cf2d9ad10c", "score": "0.54362905", "text": "public function __construct($message, $code = 0, Exception $previous = null) {\n // some code\n \n // make sure everything is assigned properly\n parent::__construct($message, $code, $previous);\n }", "title": "" }, { "docid": "dd844cd86d954f15385624cf2d9ad10c", "score": "0.54362905", "text": "public function __construct($message, $code = 0, Exception $previous = null) {\n // some code\n \n // make sure everything is assigned properly\n parent::__construct($message, $code, $previous);\n }", "title": "" }, { "docid": "6f4833a81b7c8474d7ce63adc42af519", "score": "0.54347897", "text": "public static function fromException($e)\n {\n if (is_subclass_of($e, self::class)) {\n return $e;\n }\n return new self($e->message, $e->code);\n }", "title": "" }, { "docid": "87ceb070316cecd11df80b737ad3b71b", "score": "0.5431189", "text": "public function __construct( $message )\n {\n parent::__construct( \"Internal error: \" . $message );\n }", "title": "" }, { "docid": "90aa0fb2ceaa7077996f9f3c3c3d5425", "score": "0.5426427", "text": "public function testConstructorWithParameter($message, $expected)\n {\n $exception = new NotFoundHttpException($message);\n $this->assertSame($expected, $exception->getMessage());\n $this->assertSame(404, $exception->getResponseCode());\n $this->assertSame(404, $exception->getCode());\n }", "title": "" }, { "docid": "57583fa3d04cd9ad2ad799cec2ad8cd0", "score": "0.5424868", "text": "public function __construct( $message, $code = 0, \\Exception $previous = null ) {\n\t\tparent::__construct( $message, $code, $previous );\n\t}", "title": "" }, { "docid": "d951785c0c9b4409c99a2285908477b7", "score": "0.54161745", "text": "public function __construct($message, $code, $previous) {\n \n }", "title": "" }, { "docid": "bb5839fce4a4fa453e362630e673081b", "score": "0.54112256", "text": "public function testCannotBeCreatedFromInvalidInfo()\n {\n $this->expectException(\\InvalidArgumentException::class);\n $guild = Guild::byId(12);\n $user = Player::fromId(15);\n new GuildApplication($guild, $user, \"\", \"\", \"\", \"\", \"\");\n }", "title": "" }, { "docid": "c81350c2eb3f6df200dfa47de3971453", "score": "0.54095143", "text": "protected function respondToInvalidArgument(string $msg) {\n throw new \\InvalidArgumentException(sprintf($msg, static::class));\n }", "title": "" }, { "docid": "64843dfa5bec553c3e518499d76b4eaf", "score": "0.54078037", "text": "public function testConstructorWhenInvalidStringProvided()\n {\n $this->expectException(EntityException::class);\n\n $rawUuid = 'this_is_not_an_uuid_';\n\n $this->createEntity($rawUuid);\n }", "title": "" }, { "docid": "48fb2ba4c67a1109281fc1674130afdb", "score": "0.54068816", "text": "public function __construct($message = \"\", $code = 0, Exception $previous = null) {\n\t\tparent::__construct($message, $code, $previous);\n\t}", "title": "" }, { "docid": "693ea8df60e3826357bf7613a522606a", "score": "0.5404642", "text": "public function getMessage()\n {\n return $this->exception->getMessage();\n }", "title": "" }, { "docid": "4f8fef116f13af6aa1fef7d4ff8f37c5", "score": "0.5402335", "text": "public function testAccountTypeException() : void\n {\n // INIT\n //-----\n\n $exception = new AccountTypeException($this::MESSAGE);\n\n // TEST\n //-----\n\n $this->assertEquals($this::MESSAGE, $exception->getMessageKey());\n }", "title": "" }, { "docid": "0dc5b8444784ec78726bf9ad96f51368", "score": "0.5399313", "text": "public function testItShouldCreateSuccessfully()\n {\n /** @var ApiProblem|MockObject $apiProblem */\n $apiProblem = $this->createMock(ApiProblem::class);\n\n $apiProblemException = new ApiProblemException($apiProblem);\n\n static::assertSame($apiProblem, $apiProblemException->getApiProblem());\n }", "title": "" }, { "docid": "6a2ac67f93ced024a20805bb1e443c24", "score": "0.5388601", "text": "public function createMessage()\n {\n $class = $this->getClass();\n $message = new $class;\n\n return $message;\n }", "title": "" }, { "docid": "8a62951d9c270081b5ea081e319b60f2", "score": "0.53869486", "text": "public function testCreateMemberMailChimpException(): void\n {\n $this->app->make(Kernel::class)->call('migrate:refresh', ['--seed' => TRUE]);\n /** @noinspection PhpParamsInspection Mock given on purpose */\n $controller = new MembersController($this->entityManager, $this->mockMailChimpForException('post'));\n\n $this->assertMailChimpExceptionResponse($controller->create($this->getRequest(static::$memberData)));\n }", "title": "" }, { "docid": "887f5e3b1875e76b91f7b3fe280d022c", "score": "0.5382996", "text": "protected static function create(\n $message,\n array $params = [],\n $code = 0,\n $previous = null\n ) {\n array_unshift($params, $message);\n\n $message = call_user_func_array('sprintf', $params);\n\n return new self($message, $code, $previous);\n }", "title": "" }, { "docid": "ccf89e23c785d6872f64ea1669e2f6e7", "score": "0.53778404", "text": "public function __construct($message, $code = 0, \\Exception $previous = null) {\n // some code\n \n // make sure everything is assigned properly\n parent::__construct($message, $code, $previous);\n }", "title": "" }, { "docid": "68b2541341e1f9c18eec13cfcbe54303", "score": "0.53765434", "text": "protected function validationException($input, $message)\n {\n return ValidationException::withMessages([$input => trans($message)])->redirectTo(back()->getTargetUrl());\n }", "title": "" }, { "docid": "ee9a9655dd94b8f7aaa93e47d7123160", "score": "0.5368027", "text": "public function testContructorThrowsExceptionIfInvalidArgumentIsPassed()\n {\n $this->setExpectedException('InvalidArgumentException');\n $this->builder(new stdClass());\n }", "title": "" }, { "docid": "27a31d7aedba710ff0412c237d30f885", "score": "0.5367335", "text": "public function testCreateThrowsExceptionIfProvidedArgumentIsNoValidClassName()\n {\n $this->setExpectedException('InvalidArgumentException');\r\n $this->builder()->create('Missing');\n }", "title": "" }, { "docid": "3c120b75016a23846b8029e1407f18c4", "score": "0.5365664", "text": "public function s_error($message,$title){\n \treturn $this->create($message, $title, 'error');\n }", "title": "" }, { "docid": "f1827d76601c65f4b33c71a5013a4ec6", "score": "0.5361938", "text": "function throw_exception() {\n throw new Exception(\"Exception!\");\n }", "title": "" }, { "docid": "a1384f50105969f0264ccbc2bb181cb9", "score": "0.5359948", "text": "public function __construct($message = '', $code = 0, Exception $previous = null)\n {\n parent::__construct($message, $code, $previous);\n }", "title": "" }, { "docid": "7594a49e974a36a975bbe654ccd4014d", "score": "0.535898", "text": "public static function throwException($msg)\n {\n // For perfs reasons, we use this dynamic inclusion\n require_once LS_DKCACHE_PATH.'Zend/Cache/Exception.php';\n throw new Zend_Cache_Exception($msg);\n }", "title": "" }, { "docid": "72425745ff6c7d47c0453b5e971300cb", "score": "0.535526", "text": "public static function createInternalServerError($message)\n {\n return new ODataException($message, 500);\n }", "title": "" }, { "docid": "98dce7484a0da30e9fe49a8c139cd75e", "score": "0.5351311", "text": "public function testCreateInvalidArgumentsException()\n {\n $class = \"\\Dependency\";\n $method = \"noException\";\n $args = 'testarg';\n $queueId = static::$queue->getId();\n $priority = Job::PRIORITY_HIGH;\n $executeAfter = 10;\n $startTime = time();\n\n $job = new Job;\n $jobid = $job->create(\n $class,\n $method,\n $args,\n $queueId,\n $priority,\n $executeAfter\n );\n }", "title": "" }, { "docid": "d618dd0e1615aeb8875cae2b00b43539", "score": "0.534624", "text": "public function testConstructExceptionMissingParams() \n {\n $this->setExpectedException(\n 'Zend\\Cloud\\Infrastructure\\Exception\\InvalidArgumentException',\n 'You must pass an array of params'\n );\n $instance = new Instance(self::$adapter,array());\n }", "title": "" }, { "docid": "efeb19f6e9368f0d24a97cd3732a66e6", "score": "0.53343296", "text": "protected function getDefaultMessage(): string\n {\n return config('exceptions.' . static::ERROR_CODE . '.details');\n }", "title": "" }, { "docid": "70539e2f17b9125b3a3adbb7f957df9e", "score": "0.5327931", "text": "public function create(array $message): self\n {\n\n\n if ($this->_isMessageInvalid($message)) {\n\n throw new MessageException('Unable to create message: missing required keys');\n\n }\n\n $this->message = $message;\n\n return $this;\n\n }", "title": "" }, { "docid": "b90817a3c28ba3126190092f6a33e1c7", "score": "0.53251696", "text": "public function __construct($message, $code = 0, Exception $previous = null) {\n parent::__construct($message, $code, $previous);\n $this->_log = Logger::getLogger(__CLASS__);\n $this->_log->error($this->__toString());\n }", "title": "" }, { "docid": "c3621746b8c5c3da7dffd0759564c7df", "score": "0.5319199", "text": "public function testSystemLauncherShouldHaveItsOwnException()\n {\n try {\n throw new System_Launcher_Exception('foo');\n $this->fail();\n } catch (System_Launcher_Exception $e) {\n $this->assertEquals('foo', $e->getMessage());\n }\n }", "title": "" }, { "docid": "a35167641656cb2b09fc168aace49c32", "score": "0.53151464", "text": "public function createAccessDeniedException($message = 'Access Denied', \\Exception $previous = null) {\n// return new AccessDeniedException($message, $previous);\n $this->app->abort(403, $message);\n }", "title": "" }, { "docid": "c5c75acc9fac7f98c2c108dcace30f87", "score": "0.5313527", "text": "public function createException(\\Exception $e, $soapFunction, $input)\n {\n switch (true) {\n case $e instanceof \\SoapFault:\n return new GlsApiCommunicationException(sprintf(\"SOAP Error: %s (%s)\", $e->getMessage(), $e->faultcode));\n }\n\n return new Exception($e->getMessage(), $e->getCode(), $e);\n }", "title": "" }, { "docid": "8a1a15a149e9d795bdeb987c00d07dc0", "score": "0.5304215", "text": "public function testFromNonRequestException()\n {\n $exception = new Exception('Test me now.');\n self::assertEquals(\n $exception,\n ExceptionFactory::fromException($exception)\n );\n }", "title": "" }, { "docid": "5e17f229484a2084410149c57534c008", "score": "0.52985555", "text": "public static function instance(string $message, array $payload = []): WrapperException\n {\n $e = new WrapperException($message);\n $e->payload = $payload;\n\n return $e;\n }", "title": "" }, { "docid": "dc6cb42200462993c9ea792eaa0295ad", "score": "0.5285408", "text": "abstract public function getException(array $args);", "title": "" }, { "docid": "2cef28122b6779b6e381390678c78eb7", "score": "0.52783597", "text": "public static function error($code, $msg) \n {\n $error = new \\stdClass();\n $error->code = $code;\n $error->msg = $msg;\n\n //throw back msg and error\n \tthrow new \\Exception($error->msg, $error->code);\n }", "title": "" }, { "docid": "408b8d2fdf4ee18be302e69cb08c2b85", "score": "0.52749527", "text": "public static function throwException($msg, $code = 0){\n switch (Connector_relationaldb::$ErrorLevel) {\n case Connector_relationaldb::E_ALL:\n $msg = $code.': '.$msg;\n\n break;\n default:\n $msg = 'database error';\n }\n\n Restos::throwException(new Exception($msg, $code));\n }", "title": "" }, { "docid": "ed75ba5fe07bc828cc350681cf5ca8e7", "score": "0.527364", "text": "public static function forException(Exception $exception)\n {\n return new static(sprintf(\n 'Could not read key-value store: %s',\n $exception->getMessage()\n ), $exception->getCode(), $exception);\n }", "title": "" }, { "docid": "583f6b3fe5273f94f9ecc26d8080bba3", "score": "0.52699524", "text": "function __construct($message = 'Unknown UserException occurred', $code = 0)\n\t{\n\t\tparent::__construct($message, $code);\n\n\t\t$this->exceptionData['Class'] = get_class($this);\n\t\t$this->exceptionData['Message'] = $this->getMessage();\n\t\t$this->exceptionData['StackTrace'] = $this->getTraceAsString();\n\t}", "title": "" }, { "docid": "ce223ba42216e731fdbce54476493681", "score": "0.5267087", "text": "public static function getMessage()\n {\n }", "title": "" }, { "docid": "4f6848b782ca0d70926af822a6fb5e6c", "score": "0.5261435", "text": "public function __construct($message, $code = 0, \\Exception $previous = null)\n {\n parent::__construct($message, $code, $previous);\n }", "title": "" }, { "docid": "6c1a8abfe82310c5da6e2574444e8140", "score": "0.5261344", "text": "public function testInvalidStatus()\n\t{\n\t\t$this->setExpectedException('InvalidArgumentException');\n\t\t$result = new Jyxo_Beholder_Result('dummy');\n\t}", "title": "" }, { "docid": "f24967b1b798dada8c7f42ebc400f6ff", "score": "0.52511066", "text": "public function testException1()\n {\n $data = [];\n $message = $this->expectExceptionMessage('Unable to create a listing, data unavailable');\n\n $listing = new ListingBasic($data);\n\n // $this->expectOutputString('foo');\n }", "title": "" }, { "docid": "404e1620996cca41d0021a61ff00ad15", "score": "0.5241796", "text": "public function createNotFoundException($message = 'Not Found', \\Exception $previous = null)\n {\n return new NotFoundHttpException($this->translate($message), $previous);\n }", "title": "" }, { "docid": "d800fa3e3e0a32e94828867c64eceb53", "score": "0.5235606", "text": "public function testAccountAlreadyActivatedException() : void\n {\n // INIT\n //-----\n\n $exception = new AccountAlreadyActivatedException($this::MESSAGE);\n\n // TEST\n //-----\n\n $this->assertEquals($this::MESSAGE, $exception->getMessageKey());\n }", "title": "" }, { "docid": "bfbb863ca2ddc632aa6f4e8e41f1a23e", "score": "0.5227352", "text": "public function getMessage()\n {\n return $this->data['exception']->getMessage();\n }", "title": "" }, { "docid": "18357a4bcf9f4352e1479c1e913d2446", "score": "0.5211292", "text": "protected function _throwException($realMessage, $fakeMessage = '')\n {\n $e = Mage::exception('Mage_Core', $realMessage);\n Mage::logException($e);\n if (!$fakeMessage) {\n $fakeMessage = Mage::helper('snap_card')->__('The gift card information you entered is not valid.');\n }\n $e->setMessage($fakeMessage);\n throw $e;\n }", "title": "" } ]
5219931b85e18cfc0cd348036bda0947
Sets the node's pageId and pathPath properties, and returns the calling object. $sd>setBlock( "group;blockchooser", $cascade>getAsset( a\DataBlock::TYPE, "1f21e3268b7ffe834c5fe91e2e0a7b2d" ) )> setFile( "group;filechooser" )> setPage( "group;pagechooser" )> setLinkable( "group;linkablechooser" )> setSymlink( "group;symlinkchooser" )> getHostAsset()>edit(); Property
[ { "docid": "4c817fbcbf8080b88515920e9bdcb4cf", "score": "0.45810094", "text": "public function setPage( string $node_name, a\\Page $page=NULL ) : Property\n {\n if( isset( $this->node_map[ $node_name ] ) )\n $this->node_map[ $node_name ]->setPage( $page );\n return $this;\n }", "title": "" } ]
[ { "docid": "9fad883a593867d35281a5024f4e6c90", "score": "0.48869655", "text": "public function setBlock( string $node_name, a\\Block $block=NULL ) : Property\n {\n if( self::DEBUG ) { u\\DebugUtility::dump( $block ); }\n if( self::DEBUG ) { u\\DebugUtility::out( $node_name ); }\n \n if( isset( $this->node_map[ $node_name ] ) )\n $this->node_map[ $node_name ]->setBlock( $block );\n return $this;\n }", "title": "" }, { "docid": "118b5690f4b453ffd2f64ec393ba29a1", "score": "0.4844434", "text": "public abstract function updatePageBlock(PageBlock $block);", "title": "" }, { "docid": "40f4dcf23e3fe5e7ff63847fb942f366", "score": "0.48205292", "text": "public function getBlockToEdit(Page $page, Area $area, string $areaHandle, $blockID): ?Block\n {\n $ax = $area;\n $cx = $page;\n if ($area->isGlobalArea()) {\n $ax = STACKS_AREA_NAME;\n $cx = Stack::getByName($areaHandle);\n }\n\n $nvc = $cx->getVersionToModify();\n if ($area->isGlobalArea()) {\n $xvc = $page->getVersionToModify(); // we need to create a new version of THIS page as well.\n $xvc->relateVersionEdits($nvc);\n }\n\n $b = Block::getByID($blockID, $nvc, $ax);\n\n if ($b->getBlockTypeHandle() == BLOCK_HANDLE_SCRAPBOOK_PROXY) {\n $originalDisplayOrder = $b->getBlockDisplayOrder();\n $cnt = $b->getController();\n $ob = Block::getByID($cnt->getOriginalBlockID());\n $ob->loadNewCollection($nvc);\n if (!is_object($ax)) {\n $ax = Area::getOrCreate($cx, $ax);\n }\n $ob->setBlockAreaObject($ax);\n $nb = $ob->duplicate($nvc);\n $nb->setAbsoluteBlockDisplayOrder($originalDisplayOrder);\n $b->deleteBlock();\n $b = &$nb;\n } else {\n if ($b->isAlias()) {\n\n // then this means that the block we're updating is an alias. If you update an alias, you're actually going\n // to duplicate the original block, and update the newly created block. If you update an original, your changes\n // propagate to the aliases\n $nb = $b->duplicate($nvc);\n $b->deleteBlock();\n $b = $nb;\n }\n }\n\n return $b;\n }", "title": "" }, { "docid": "18a7a196b6a0da3bac7e291472863eeb", "score": "0.48016983", "text": "public function setPagePath($path) {\n\t\treturn $this->page_path = $this->normalizePath($path);\n\t}", "title": "" }, { "docid": "18a7a196b6a0da3bac7e291472863eeb", "score": "0.48016983", "text": "public function setPagePath($path) {\n\t\treturn $this->page_path = $this->normalizePath($path);\n\t}", "title": "" }, { "docid": "021914d393817f757a51a970e52592fe", "score": "0.47495618", "text": "public function setPath( $path ) {\n $this->_path = $path;\n }", "title": "" }, { "docid": "86fb81293242246c6c5630a5848cfea2", "score": "0.4735896", "text": "public function setNode(Node $node): self\n {\n return $this->setModel($node);\n }", "title": "" }, { "docid": "45293a1164dde47f7d5686ccded0409f", "score": "0.47172704", "text": "public function setPath($path)\n {\n $this->path = $path;\n return $this;\n }", "title": "" }, { "docid": "4d2fe581e27c49739ea03fbfe01f52cb", "score": "0.46915323", "text": "function setBlock($block) {\n $this->block = $block;\n }", "title": "" }, { "docid": "f9443bc9874867824128be0ff79da35d", "score": "0.46630198", "text": "function set_Block($new_Block){\n \n // Set a Style\n $new_Block\n ->set_style('custom_admin_css')\n // Set description\n ->set_description(__('A simple block consisting of a heading, an image and a text content.'))\n // Set category in Gutemberg block\n ->set_category('layout')\n // Set icon\n ->set_icon('heart');\n // Function renderize Block, musst return a String HTML\n return $new_Block;\n }", "title": "" }, { "docid": "909ce4bd77a8ea745ad281e46b6f2350", "score": "0.46395642", "text": "public function setPath($path)\n\t{\n\t\t$this->handler->setPath($path);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a86373f287c6d92fde77e23a5eb0c1d4", "score": "0.46243408", "text": "public function setVirtualPath($path)\n {\n $this->_moduleVirtualPath = $path;\n }", "title": "" }, { "docid": "20171c123a5feb992e6da9bdb2d3f6ac", "score": "0.45992795", "text": "public function setPath(string $path);", "title": "" }, { "docid": "20171c123a5feb992e6da9bdb2d3f6ac", "score": "0.45992795", "text": "public function setPath(string $path);", "title": "" }, { "docid": "3f341a6594d105615d336a4a64eb5440", "score": "0.45990583", "text": "function setAsset( $asset ) { $this->asset = $asset; }", "title": "" }, { "docid": "99add85af9ecadcb08fa5dc102b69f44", "score": "0.45857474", "text": "public function setPath($path);", "title": "" }, { "docid": "99add85af9ecadcb08fa5dc102b69f44", "score": "0.45857474", "text": "public function setPath($path);", "title": "" }, { "docid": "99add85af9ecadcb08fa5dc102b69f44", "score": "0.45857474", "text": "public function setPath($path);", "title": "" }, { "docid": "99add85af9ecadcb08fa5dc102b69f44", "score": "0.45857474", "text": "public function setPath($path);", "title": "" }, { "docid": "99add85af9ecadcb08fa5dc102b69f44", "score": "0.45857474", "text": "public function setPath($path);", "title": "" }, { "docid": "6ab122dfbab295abb66f194ccaee83b0", "score": "0.45735446", "text": "public function setPath($path) : self\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "f10f017d047332febc3be2389cf17ad9", "score": "0.45659804", "text": "function set_block(&$block,$produce=False)\n\t{\n\t\tif ($produce)\n\t\t{\n\t\t\tif (is_array($this->session) && count($this->session))\n\t\t\t{\n\t\t\t\t$sessionvars = $GLOBALS['egw']->session->appsession('block[' . $block->id . ']', 'sitemgr-site');\n\t\t\t}\n\t\t\tforeach(array(\n\t\t\t\t'session' => $sessionvars,\n\t\t\t\t'get' => $_GET['block'][$block->id],\n\t\t\t\t'post' => $_POST['block'][$block->id],\n\t\t\t\t'cookie' => $_COOKIE['block'][$block->id]\n\t\t\t\t) as $where => $values)\n\t\t\t{\n\t\t\t\tif (is_array($this->$where))\n\t\t\t\t{\n\t\t\t\t\tforeach($this->$where as $key => $argument)\n\t\t\t\t\t{\n\t\t\t\t\t\t//contrary to $this->get, cookie and session, the argument name is the key in $this->post,\n\t\t\t\t\t\t//because this array also defines the form element\n\t\t\t\t\t\tif ($where == 'post') $argument = $key;\n\n\t\t\t\t\t\tif (isset($values[$argument]) && !$block->addcontents)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$block->arguments[$argument] = $values[$argument];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->block =& $block;\n\t}", "title": "" }, { "docid": "3d5e6f4a9e223ddc571fbeacb651a60f", "score": "0.4562668", "text": "public function testSetParent()\n {\n $parent = $this->createPage();\n $page = new Page();\n $this->agent->setParent($page, $parent);\n }", "title": "" }, { "docid": "9be2da5cd28a087cfe3c7db396d475c2", "score": "0.45538753", "text": "public function _setPath($path)\n {\n $this->path = $path;\n }", "title": "" }, { "docid": "d558614f9599ebddbcca2a5f85967c95", "score": "0.45335516", "text": "public function setPath($path) {\n\t\t$this->path = $path;\n\t}", "title": "" }, { "docid": "f2a35d39a64c503ea6e40d84591765d1", "score": "0.45301378", "text": "public function setNode($node)\n {\n $this->node = $node;\n\n return $this;\n }", "title": "" }, { "docid": "8a75d796f52f85fc9f6d66de495e6e87", "score": "0.45139813", "text": "public function SetParent(&$node)\n\t{\n\t\t$this->_Parent =& $node;\n\t}", "title": "" }, { "docid": "28758aa907b134c814ca4ecb3c3bc155", "score": "0.44922683", "text": "public function setPath($path) {\n\t\t$this->setPathInfo($path);\n\t}", "title": "" }, { "docid": "26c01598100326128758d9c75ed56e1c", "score": "0.4491241", "text": "function set_instance(&$block) {\n global $CFG;\n\n require_once($CFG->dirroot.'/mod/content/locallib.php');\n\n $module = mod_content_plugin::factory('module', $block->cm->id);\n\n if (!$text = $module->pageitem($block)) {\n // Run the default\n return parent::set_instance($block);\n }\n\n return true;\n }", "title": "" }, { "docid": "10ef0e8c41b671c17fae047297db9655", "score": "0.44894764", "text": "function set($node, $value){\n if(isset($this->data->$node)){\n $this->data->$node = $value;\n }\n }", "title": "" }, { "docid": "c41ec453f8a5ec148eaac307e2874087", "score": "0.44850227", "text": "static public function setItemByPath(&$node, $path, $value)\n {\n $isObject = is_object($node);\n $parts = is_string($path) ? explode('.', $path) : array();\n $depth = count($parts);\n \n if($depth)\n {\n foreach($parts as $index=>$part)\n {\n $isLeaf = $index == $depth-1;\n if($isLeaf)\n {\n if($isObject)\n {\n $node->$part = $value;\n }\n else\n {\n $node[$part] = $value;\n }\n }\n else\n {\n if($isObject)\n {\n if(!isset($node->$part))\n {\n $node->$part = new stdClass;\n }\n $node = &$node->$part;\n }\n else\n {\n if(!isset($node[$part]))\n {\n $node[$part] = array();\n }\n $node = &$node[$part];\n }\n }\n }\n }\n else\n {\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "563156301df067fd8fc03a592f1443a4", "score": "0.4482821", "text": "public function setPath($path)\n {\n $this->path = $path;\n }", "title": "" }, { "docid": "0595a6f0058576546723e3bdd6239b5b", "score": "0.44812882", "text": "public function setPath($path)\n\t{\n\t $this->path = $path;\n\t return $this;\n\t}", "title": "" }, { "docid": "0488eaf59a4af2015a337940275b42a7", "score": "0.44757372", "text": "public function executeBrowse()\r\n {\r\n if ($this->hasRequestParameter('store_id'))\r\n {\r\n $this->node = DmsStorePeer::retrieveByPK($this->getRequestParameter('store_id'));\r\n $this->store = $this->node;\r\n }\r\n else if ($this->hasRequestParameter('node_id'))\r\n {\r\n $this->node = DmsNodePeer::retrieveByPK($this->getRequestParameter('node_id'));\r\n $this->store = $this->node->getDmsStore();\r\n }\r\n }", "title": "" }, { "docid": "4dd4afac1179d7f96578b1fd70b8720a", "score": "0.44682017", "text": "public function setPath($path) {\n\t\t$this->_path = (string) $path;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b28e2e951547a63f878f8de42795f0b5", "score": "0.4464959", "text": "public function setPath($path) \n\t{\n\t\t$this->path = $path;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9b5ccc42a902098f4365deda474df11e", "score": "0.4448964", "text": "public function setPath($path) {\n $this->_path = $path;\n }", "title": "" }, { "docid": "7945e02822b5cb913ac61c9df57a3e14", "score": "0.44386855", "text": "function setPath($path);", "title": "" }, { "docid": "c3e13ef9a71b24c0808e81eefec3432f", "score": "0.44298816", "text": "public function setPath($path)\n {\n $this->_path = $path;\n }", "title": "" }, { "docid": "5e8204c6fe0434d55442efa2f97ba052", "score": "0.4417944", "text": "abstract public static function setPath($path);", "title": "" }, { "docid": "cc30dcc51c8bfd8ad30383182655ec94", "score": "0.4401037", "text": "public function setCanonicalPagePath($cPath, $isAutoGenerated = false)\n {\n $em = \\ORM::entityManager();\n $path = $this->getCollectionPathObject();\n if (is_object($path)) {\n $path->setPagePath($cPath);\n } else {\n $path = new \\Concrete\\Core\\Entity\\Page\\PagePath();\n $path->setPagePath($cPath);\n $path->setPageObject($this);\n }\n $path->setPagePathIsAutoGenerated($isAutoGenerated);\n $path->setPagePathIsCanonical(true);\n $em->persist($path);\n $em->flush();\n }", "title": "" }, { "docid": "42cdb086b66d6210db3f4c5a7e25c37d", "score": "0.4381518", "text": "public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "494601bf73c09532a8f66dfa7177a395", "score": "0.4374349", "text": "public function getResponse() {\t\t\t\n\t\t$page = new Page($this);\n\t\t\n\t\t$template = new Template('Premanager', 'structureNodeView');\n\t\t$template->set('node', $this);\n\t\t$template->set('structureNode', $this->_structureNode);\n\t\t\n\t\t$page->createMainBlock($template->get());\n\t\t\n\t\t$template = new Template('Premanager', 'structureNodeChildList');\n\t\t$template->set('node', $this);\n\t\t$template->set('children', $this->getChildList()->getAll());\n\t\t$page->appendBlock(PageBlock::createSimple(\n\t\t\tTranslation::defaultGet('Premanager', 'browseStructureNodesTitle'),\n\t\t\t$template->get()));\n\t\t\t\n\t\t$page->toolbar[] = new ToolBarItem($this->getURL().'/+edit',\n\t\t\tTranslation::defaultGet('Premanager', 'editNode'), \n\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t'editNodeDescription'),\n\t\t\t'Premanager/images/tools/edit.png');\n\t\t\t\n\t\tif ($this->_structureNode->getParent())\n\t\t\t$page->toolbar[] = new ToolBarItem($this->getURL().'/+move',\n\t\t\t\tTranslation::defaultGet('Premanager', 'moveNode'), \n\t\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t\t'moveNodeDescription'),\n\t\t\t\t'Premanager/images/tools/move.png');\n\t\t\n\t\t$canAdd = $this->_structureNode->getType() != StructureNodeType::TREE;\n\t\t\t$page->toolbar[] = new ToolBarItem($this->getURL().'/+add',\n\t\t\t\tTranslation::defaultGet('Premanager', 'addNode'), \n\t\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t\t$canAdd ? 'addNodeDescription' : 'addTreeNodeChildError'),\n\t\t\t\t'Premanager/images/tools/add.png',\n\t\t\t\t$canAdd);\n\t\t\n\t\tif ($this->_structureNode->getParent()) {\n\t\t\t$canDelete = $this->getStructureNode()->canDelete();\n\t\t\t$page->toolbar[] = new ToolBarItem($this->getURL().'/+delete',\n\t\t\t\tTranslation::defaultGet('Premanager', 'deleteNode'), \n\t\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t\t$canDelete ? 'deleteNodeDescription' : 'deleteTreeNodeError'),\n\t\t\t\t'Premanager/images/tools/delete.png',\n\t\t\t\t$canDelete);\n\t\t\t\t\n\t\t\t$page->toolbar[] = new ToolBarItem($this->getURL().'/+permissions',\n\t\t\t\tTranslation::defaultGet('Premanager', 'nodePermissions'), \n\t\t\t\tTranslation::defaultGet('Premanager', 'nodePermissionsDescription'),\n\t\t\t\t'Premanager/images/tools/rights.png');\n\t\t}\n\t\t\t\n\t\t$page->toolbar[] = new ToolBarItem($this->getRealURL(),\n\t\t\tTranslation::defaultGet('Premanager', 'gotoNode'),\n\t\t\tTranslation::defaultGet('Premanager',\n\t\t\t\t'gotoNodeDescription'),\n\t\t\t'Premanager/images/tools/goto-page.png');\n\t\t\t\n\t\treturn $page;\n\t}", "title": "" }, { "docid": "8eee3cbb5e3fad43af758e875995f282", "score": "0.43724763", "text": "public function onBeforeWrite(){\n\t\t\n\t\t$ProductListingPageDO = ProductListPage::get()->first();\n\t\t\n\t\t$this->owner->ParentID = $ProductListingPageDO->ID;\n\t\t\n\t}", "title": "" }, { "docid": "433c71a06e19db76f891e0e419af8a2d", "score": "0.43715563", "text": "public function setPath($path)\n {\n $this->path = $path;\n }", "title": "" }, { "docid": "433c71a06e19db76f891e0e419af8a2d", "score": "0.43715563", "text": "public function setPath($path)\n {\n $this->path = $path;\n }", "title": "" }, { "docid": "d1da08c8a5781c631f3703ab278c87f5", "score": "0.43657663", "text": "function entity_dashboard_page_blocks($path) {\n global $theme_key;\n // $use_theme = variable_get('theme_default','none');\n $entityDashboard = entity_dashboard_load_by_path($path);\n drupal_theme_initialize();\n module_load_include('inc', 'block', 'block.admin');\n\n $blocks = array();\n $available_blocks = entity_dashboard_available_blocks();\n $entityDashboard_blocks = db_select('entity_dashboard_block', 'edb')\n ->fields('edb')->condition('edb.did', $entityDashboard->did)\n ->execute()\n ->fetchAllAssoc('bid', PDO::FETCH_ASSOC);\n $entityDashboard_blocks = empty($entityDashboard_blocks) ? block_admin_display_prepare_blocks($theme_key) : $entityDashboard_blocks;\n $dashboard_regions = _entity_dashboard_region_descriptions();\n $blocks = array();\n $_blocks = block_admin_display_prepare_blocks($theme_key);\n foreach ($_blocks as $block) {\n if (in_array($block['module'] . '_' . $block['delta'], $available_blocks)) {\n $blocks[] = $block;\n }\n }\n return drupal_get_form('entity_dashboard_admin_display_form', $blocks, $theme_key, $dashboard_regions);\n}", "title": "" }, { "docid": "78168321e8f15fe1633ded61a1480d41", "score": "0.4353311", "text": "public function edit(Block $block)\n {\n //\n }", "title": "" }, { "docid": "78168321e8f15fe1633ded61a1480d41", "score": "0.4353311", "text": "public function edit(Block $block)\n {\n //\n }", "title": "" }, { "docid": "1e8047e2abace90a6670ffa120ab4fb4", "score": "0.43481302", "text": "public function saveContentBlock(){\n\t\n\t\t$data\t\t= JRequest::get( 'post', '' );\n\t\t$blockid \t= JRequest::getVar( 'block' );\n\t\t\n\t\t$model\t\t= $this->getModel( 'brochure' );\n\t\t$newid\t\t= $model->saveBlock( $data, $blockid );\n\t\t\n\t\t$bro_page \t= $model->getPageNumber( $blockid );\n\t\t\n\t\t$this->setRedirect( 'index.php?option=com_zbrochure&view=brochure&id='.$data['bro_id'].'#page-'.$bro_page, 'Content Block '.$newid.' Saved' );\n\t\n\t}", "title": "" }, { "docid": "f15802c23e3e8d962a3b74ece00ffad7", "score": "0.43442938", "text": "function setBrowseBase($path)\n {\n\n $this->browseBase = $path;\n $this->view->basePath = $path;\n }", "title": "" }, { "docid": "189b024b50ffd0a2a3c66143f33cdd13", "score": "0.43409002", "text": "function setBlockProperty($a_block_type, $a_property, $a_value)\n\t{\n\t\t$this->block_property[$a_block_type][$a_property] = $a_value;\n\t}", "title": "" }, { "docid": "b632dcbc487285d98281cde2050cb623", "score": "0.43401554", "text": "public function create()\n {\n $this->crud->setSubheading('Add block for page ' . $this->crud->getModel()->getPageTitle($this->crud->request->page_id));\n $this->crud->addField(['name' => 'page_id', 'type' => 'hidden', 'value' => $this->crud->request->page_id]);\n $this->crud->addField([\n 'name' => 'block',\n 'label' => trans('backpack::pagemanager.content'),\n 'type' => 'select2_from_array',\n 'options' => ['content' => 'content', 'gallery' => 'gallery'],\n ]);\n $this->crud->setCreateView('blockmanager::create');\n\n return parent::create();\n }", "title": "" }, { "docid": "09f603106e211ac9af89abf74916d0c2", "score": "0.4323895", "text": "public function setProperty($propertyName, $value)\n {\n if ($propertyName === 'assets') {\n if (!$this->isNodeDataMatchingContext()) {\n $this->materializeNodeData();\n }\n $this->createAssetChildNodes($value);\n\n // don't set the \"assets\" property in the AssetList NodeData to avoid duplication & confusion\n $value = null;\n }\n return parent::setProperty($propertyName, $value);\n }", "title": "" }, { "docid": "ce60f547aa8baf7042538b73f4cb4d8d", "score": "0.43200797", "text": "public function enterNode(Node $node)\n {\n if ($node instanceof File) {\n $this->file = $this->getName($node);\n return null;\n }\n\n return null;\n }", "title": "" }, { "docid": "54460c1a3799556bd7b24e0f20d406d0", "score": "0.43199953", "text": "public function editAction ()\n {\n $config = $this->getServiceLocator()->get('Config');\n \n $data = '';\n \n // Edit params\n $id = (int) $this->getEvent()\n ->getRouteMatch()\n ->getParam('id');\n $this->namespace = $this->getEvent()\n ->getRouteMatch()\n ->getParam('namespace');\n \n if (! $id) {\n return $this->redirect()->toRoute('page-list');\n }\n \n $page = $this->getPagesTable()->getPage($id);\n // Get Content Nodes\n \n // New namespace\n $itemClass = \"ElmContent\\\\Model\\\\\".ucfirst($this->namespace);\n $item = new $itemClass();\n \n $formName = 'ElmContent\\\\Form\\\\' . ucfirst($this->namespace) . 'Form';\n\n $this->form = $this->getServiceLocator()->get($formName);\n\n $this->bespokeFields($this->form);\n \n // Set the standard fields\n $this->form->bind($page);\n \n // Set the content items\n foreach($this->getContentNodesTable()->fetchAll($id, 'en') as $node) {\n if($this->form->get($node['node'])) {\n\n $this->form->get($node['node'])->setValue($node['content']);\n \n if($this->form->get($node['node'])->getAttribute('type') == 'file') {\n // Check and remove preview fields\n\t if($node['content'] == '' || $node['content'] == null) {\n\t\t\t\t\t\t// Remove preview/delete if no content to preview \t\n\t \t$this->form->remove($node['node'].'_preview');\n\t \t$this->form->remove($node['node'].'_delete');\n\t } else {\n\t \t// Display content\n\t \t$this->form->get($node['node'].'_preview')->setAttribute('src',\"/images/upload/\".$id.\"/small/\".$node['content']);\n\t }\n }\n }\n }\n \n $this->form->get('submit')->setValue('Save Changes');\n \n $request = $this->getRequest();\n if ($request->isPost()) {\n \n $pageModel = new Pages();\n \n // Set InputFilters\n $this->form->setInputFilter($page->getInputFilter());\n $this->form->setInputFilter($item->getInputFilter());\n \n // Send form data to filter\n $this->form->setData($request->getPost());\n \n // Check valid\n if ($this->form->isValid()) {\n \n \n // Upload file\n $File = $this->params()->fromFiles('main_image');\n \n if($File['name'] != '') {\n $ImageUtilities = $this->getServiceLocator()->get('image_utility');\n if($ImageUtilities->uploadImageFile('main_image', $item->imageDir .'/' .$id, $File)) {\n $item->main_image = $File['name'];\n }\n } else {\n if($this->form->get('preview')) {\n $storedImage = $this->form->get('preview')->getAttribute('src');\n $item->main_image = basename($storedImage);\n }\n }\n \n $this->getPagesTable()->savePage($this->form->getData());\n \n // Category Associations\n // Delete existing for this pageId\n $this->getCategoryAssociationsTable()->deleteByPageId($id);\n // Add associations based on form post\n foreach($this->params()->fromPost() as $k => $v) {\n if(substr($k,0,9) == 'cat_assoc') {\n $categoryId = substr($k,10);\n $this->getCategoryAssociationsTable()->saveCategoryAssociation($categoryId, $id);\n }\n }\n \n // Save content nodes\n foreach($item->getFields() as $node) {\n $this->getContentNodesTable()->saveContentNode($id, $node, $item->{$node}, $language = 'en');\n /*\n \tswitch($node) {\n \t\n \t\tcase 'main_image':\n \t\t\t// Check we're not deleting; main_image_delete would be 1 if posted.\n \t\t\tif($this->params()->fromPost('main_image_delete')) {\n \t\t\t\t// Remove the images (Original, small, medium, large)\n \t\t\t\t$imageNode = $this->getContentNodesTable()->getContentNode($id,'main_image');\n \t\t\t\tif(is_object($imageNode)) {\n\n \t\t\t\t\t$imageName = $imageNode->content;\n \t\t\t\t\t\n \t\t\t\t\tunlink(dirname(__DIR__).'/../../../../public/images/upload/' . $id . '/original/' . $imageName);\n \t\t\t\t\tunlink(dirname(__DIR__).'/../../../../public/images/upload/' . $id . '/small/' . $imageName);\n \t\t\t\t\tunlink(dirname(__DIR__).'/../../../../public/images/upload/' . $id . '/medium/' . $imageName);\n \t\t\t\t\tunlink(dirname(__DIR__).'/../../../../public/images/upload/' . $id . '/large/' . $imageName);\n\n \t\t\t\t\t// Remove the content node reference to image\n \t\t\t\t\t$this->getContentNodesTable()->saveContentNode($id, 'main_image', '', $language = 'en');\n \t\t\t\t\t// Remove the content node alt tag.\n \t\t\t\t\t$this->getContentNodesTable()->saveContentNode($id, 'main_image_alt', '', $language = 'en');\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\t// Check we're actually uploading\n \t\t\t\t$this->uploadImageFile($id, $node);\n \t\t\t\t// Store alt tag\n \t\t\t\t$alt_node = $node . '_alt';\n \t\t\t\t\n \t\t\t\t$alt_value = ($this->params()->fromPost($alt_node) != '') ? $this->params()->fromPost($alt_node) : $this->params()->fromPost('name');\n \t\t\t\t$this->getContentNodesTable()->saveContentNode($id, $alt_node, $alt_value, $language = 'en');\n \t\t\t}\n \t\t\tbreak;\n \t\t\t\n \t\tdefault:\n \t\t\t$this->getContentNodesTable()->saveContentNode($id, $node, $this->params()->fromPost($node), $language = 'en');\n \t\t\tbreak;\n \t*/\n \n }\n \n // Reroute back to list\n return $this->redirect()->toRoute('page-list');\n } else {\n $message = '1.21 Gigawatts - what was I thinking?!?';\n }\n $data = $this->form->getData();\n //$data = '';\n }\n \n return new ViewModel(array(\n 'id' => $id,\n 'form' => $this->form,\n 'data' => $data,\n ));\n }", "title": "" }, { "docid": "834074c528e168d4d560be4a8eaba9d6", "score": "0.43153682", "text": "public function addBlockToPage()\n {\n try {\n $this->setHeader();\n $data = json_decode(file_get_contents(\"php://input\"));\n $block = new BlockModel();\n $block->name = $data->name;\n if (isset($data->content)) {\n $block->content = $data->content;\n } else {\n $block->content = \"\";\n }\n $block->pageId = $data->pageId;\n\n $maxOrderBlock = BlockModel::getMaxOrderBlock($data->pageId);\n if($data->orderBlock <= $maxOrderBlock) {\n $block->orderBlock = $maxOrderBlock[0][\"MAX(orderBlock)\"] + 1;\n } else {\n $block->orderBlock = $data->orderBlock;\n }\n\n $block->idBlockType = $data->idBlockType;\n if (isset($data->idParent)) {\n $block->idParent = $data->idParent;\n } else {\n $block->idParent = null;\n }\n if (isset($data->idColumn)) {\n $block->idColumn = $data->idColumn;\n } else {\n $block->idColumn = null;\n }\n if (isset($data->styleBlock)) {\n $block->styleBlock = $data->styleBlock;\n } else {\n $block->styleBlock = null;\n }\n $targetPage = PageModel::findById($data->pageId);\n if (empty($targetPage)) {\n http_response_code(404);\n echo json_encode(array(\"message\" => \"The page you are trying to add a block on does not exists. Block not added to base.\"));\n } else {\n BlockModel::save($block);\n $id = BlockModel::findByName($block->name)[0]->id;\n http_response_code(200);\n echo json_encode(array(\n \"message\" => \"Block succesfully added to base\",\n \"id\" => $id\n ));\n }\n } catch (Exception $e) {\n http_response_code(412);\n echo json_encode(array(\"message\" => $e));\n }\n }", "title": "" }, { "docid": "8400989e9e24a3f0c0463e4fd1bf5783", "score": "0.4313806", "text": "public function setPath(string $path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "865161db95c1399079b1e809a0cd564f", "score": "0.43083966", "text": "public function __set($path, $value) {\n\t\t$this->set($path, $value);\n\t}", "title": "" }, { "docid": "e4f71c34b2588ed73d724366dff97548", "score": "0.43056834", "text": "function setNode(&$node)\n {\n $this->m_node = &$node;\n }", "title": "" }, { "docid": "c0e48aa6af98df66e669c1bb91260c17", "score": "0.43040094", "text": "public function init($node)\n {\n if (!$node->isActive(app()->getLocale()) && !request()->has('show') && !$node->hasTableDefinition()) {\n abort(404);\n }\n $this->node = $node;\n \n return $this;\n }", "title": "" }, { "docid": "554aba2bf2386e885abe8d3ed1a457ae", "score": "0.4290798", "text": "public function setPath(/*string*/ $value) /*: this*/ {\n $this->path = $value;\n return $this;\n }", "title": "" }, { "docid": "7471d91982f5c95955c97da75cd64e48", "score": "0.4289914", "text": "public function setPath($path) {\n $this->options[\"path\"] = $path;\n return $this;\n }", "title": "" }, { "docid": "791d94ae65f56049230a8a1beed15a09", "score": "0.42897612", "text": "public function set($path, $value) {\n if ($path == NULL) {\n $this->items = $value;\n } else {\n $this->_set( $this->items, $path, $value);\n }\n }", "title": "" }, { "docid": "75012a3eaa61b074a35d28089566c191", "score": "0.4287775", "text": "public function SetPath($path)\n\t{\n\t\t$this->path = $path;\n\t}", "title": "" }, { "docid": "50441c64448b1c41a9f4c00248369c65", "score": "0.42856604", "text": "public function setPath(string $path) : self\n {\n $this->initialized['path'] = true;\n $this->path = $path;\n return $this;\n }", "title": "" }, { "docid": "1a236c1bb6b77d72b989b1f15f43fe3c", "score": "0.4285576", "text": "public function edit(Page $page)\n {\n $page->load('pageAreas.blocks');\n return $this->genericEdit($page);\n }", "title": "" }, { "docid": "8e81fa1f65695938487532dd17576ab6", "score": "0.427668", "text": "public function setPath($path){\n $pathString = trim((string)$path);\n if(!strlen($pathString)){\n throw new \\Navinator\\Exception(sprintf('Attempting to set an invalid node path \"%s\". A node path must be a non-empty string.', $path));\n }\n $this->path = trim($pathString, '/');\n $this->autoSetDepth();\n }", "title": "" }, { "docid": "4cc8444ff8beb80c2a1ea1dc6992e024", "score": "0.4261844", "text": "public function setAttachment($model)\r\n {\r\n // Remove existing attachment\r\n if ($model->getObjectId()) {\r\n $model->getAttachment()->delete();\r\n }\r\n\r\n if ($model->getTargetFile()) {\r\n $attachment = Mage::getModel('link/node_attachment');\r\n\r\n $attachment->setLinkId($model->getId())\r\n // Currently only supports files\r\n ->setTypeId(Rootd_Link_Model_Node_Attachment::TYPE_FILE)\r\n ->setTargetPath($model->getTargetFile());\r\n\r\n $attachment->save();\r\n\r\n $model->setObjectId($attachment->getId())\r\n ->setAttachment($attachment)\r\n ->setTargetPath('');\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "ce3b45d121d50417337750c13d200714", "score": "0.4252475", "text": "protected function setResourceContents( $path, $content )\n {\n \t$this->CFG->t3io->metaftpd_devlog(10,\"( $path )\",__METHOD__, get_defined_vars() );\n \t\n \t// File Mount:\n \t$t3io=$this->CFG->t3io;\n\n \t$virtualFilePath = $t3io->T3CleanFilePath($path);\n \t$virtualFilePath=$t3io->T3MakeFilePath($virtualFilePath);\n\n \t$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['nwan_webdavserver']['natural_file_names'] = true;\n \t$info=$t3io->T3IsFileUpload($path);\n\n \tif ($info['isWebmount'])\n \t{\n \t\t// Web mount\n \t\t$info['ufile']=$virtualFilePath;\n \t\t$t3io->metaftpd_devlog(6,\"PUT info : \".serialize($info),\"meta_webdav\",\"PUT\");\n \t\t\t\n \t\t// in update mode we update directly tx_metaftpd_ftpfile ... (No copy)\n \t\t// we can integrate versionning here later ...\n \t\t$physicalFilePath=$t3io->T3CleanFilePath($this->CFG->T3PHYSICALROOTDIR.$info['filepath']);\n \t\t$t3io->metaftpd_devlog(6,\"PUT physicalFilePath : \".$physicalFilePath,\"meta_webdav\",\"PUT\");\n \t\t\t\n \t\tfile_put_contents($physicalFilePath,$content);\n \t\t\t\n \t\t$t3io->T3LinkFileUpload($info);\n \t\t\t\n \t\tunlink($physicalFilePath);\n\n \t\t// Set initial metadata for collection\n \t\t$this->properties[$path] = $this->initializeProperties( $path, false );\n\n \t}\n \telse\n \t{\n \t\t$physicalFilePath=$virtualFilePath;\n \t\t \n \t\tfile_put_contents( $physicalFilePath, $content );\n \t\t \n \t\tchmod( $physicalFilePath, 0755 );\n \t}\n }", "title": "" }, { "docid": "83b39bbb964c7f7555faf34aaa017266", "score": "0.4252181", "text": "public function setPath(string $path) : self\n {\n $this->path = $path;\n return $this;\n }", "title": "" }, { "docid": "ac9daeaaa11357c546276e9e904549b1", "score": "0.4250932", "text": "public function setParent(Page $parent) {\n\t\tif($this->_parent && $this->_parent->id == $parent->id) return $this; \n\t\tif($parent->id && $this->id == $parent->id || $parent->parents->has($this)) {\n\t\t\tthrow new WireException(\"Page cannot be its own parent\");\n\t\t}\n\t\tif($this->isLoaded) {\n\t\t\tif(!$this->_parent) $this->parent(); // force it to load\n\t\t\t$this->trackChange('parent', $this->_parent, $parent);\n\t\t\tif(($this->_parent && $this->_parent->id) && $this->_parent->id != $parent->id) {\n\t\t\t\tif($this->settings['status'] & Page::statusSystem) {\n\t\t\t\t\tthrow new WireException(\"Parent changes are disallowed on this page\");\n\t\t\t\t}\n\t\t\t\tif(is_null($this->parentPrevious)) $this->parentPrevious = $this->_parent;\n\t\t\t}\n\t\t}\n\t\t$this->_parent = $parent; \n\t\t$this->_parent_id = $parent->id;\n\t\treturn $this; \n\t}", "title": "" }, { "docid": "f2484039bff24fbf909efea197329cd2", "score": "0.4247793", "text": "public function update() {\n\t\ttry {\n\t\t\t$this->validateUpdate();\n\n\t\t\t$isParentWritable = false;\n\t\t\tif ($this->parentId) {\n\t\t\t\ttry {\n\t\t\t\t\t$this->context->checkPermission(\n\t\t\t\t\t\t\\Scrivo\\AccessController::WRITE_ACCESS,\n\t\t\t\t\t\t$this->parentId);\n\t\t\t\t\t$isParentWritable = true;\n\t\t\t\t} catch (\\Scrivo\\ApplicationException $e) {}\n\t\t\t}\n\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"UPDATE page SET\n\t\t\t\t\tversion = :version, has_staging = :hasStaging,\n\t\t\t\t\tparent_id = :parentId,\n\t\t\t\t\ttype = :type, page_definition_id = :definitionId,\n\t\t\t\t\tlanguage = :language, title = :title,\n\t\t\t\t\tdescription = :description, keywords = :keywords,\n\t\t\t\t\tjavascript = :javascript, stylesheet = :stylesheet,\n\t\t\t\t\tdate_online = :dateOnline, date_offline = :dateOffline\n\t\t\t\tWHERE instance_id = :instId AND page_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->bindValue(\":version\", $this->version, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":hasStaging\", $this->hasStaging, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":parentId\", $this->parentId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":type\", $this->type, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":definitionId\", $this->definitionId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":language\", $this->language, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":title\", $this->title, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":description\", $this->description, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":keywords\", $this->keywords, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":javascript\", $this->javascript, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":stylesheet\", $this->stylesheet, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":dateOnline\",\n\t\t\t\t$this->dateOnline->format(\"Y-m-d H:i:s\"), \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":dateOffline\", $this->dateOffline\n\t\t\t\t? $this->dateOffline->format(\"Y-m-d H:i:s\")\n\t\t\t\t: null, \\PDO::PARAM_STR);\n\n\t\t\t$sth->execute();\n\n\t\t\tself::touch($this->context, $this->id);\n\n\t\t\tif ($this->type == \\Scrivo\\Page::TYPE_SUB_FOLDER) {\n\t\t\t\t\\Scrivo\\SequenceNo::position($this->context, \"page\",\n\t\t\t\t\t\"parent_id\", $this->id, 0);\n\t\t\t}\n\n\t\t\t// TODO **************\n\t\t\t// $this->_commit_subfolder();\n\t\t\t// $this->set_pretty_path();\n\n\t\t\tunset($this->context->cache[$this->id]);\n\t\t\tunset($this->context->cache[$this->parentId]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "c782d8fc004464bf50c84c90f08a4fc0", "score": "0.4244413", "text": "public function setParent(self $flow): self;", "title": "" }, { "docid": "6d267bedf15f4cd2962ee5ba898af091", "score": "0.4236691", "text": "public function setBlock($block)\n {\n $this->block = $block;\n return $this;\n }", "title": "" }, { "docid": "582367e3fcb98dbd99528406d0a405b9", "score": "0.4234673", "text": "final protected function setPath($path): void\n {\n $this->path = (new Path($path))->getValue();\n }", "title": "" }, { "docid": "6c1d8edf54d45a0de3e31b0256ad88c7", "score": "0.42339045", "text": "public function setPath($value) {\n\t\t$this->info['path'] = $value;\n\t}", "title": "" }, { "docid": "87c5be55f75e700a2f5dce9e1b58d4f0", "score": "0.42276937", "text": "public function getSharesByPath(Node $path);", "title": "" }, { "docid": "e5fbebc2602c97dfffc4c4e0cf62d335", "score": "0.42191228", "text": "public function setFile( string $node_name, a\\File $file=NULL ) : Property\n {\n if( isset( $this->node_map[ $node_name ] ) )\n $this->node_map[ $node_name ]->setFile( $file );\n return $this;\n }", "title": "" }, { "docid": "517263efb91ab9baaa7ebe9648f679f5", "score": "0.4218731", "text": "public function setPathInfo($path) {\n\t\t$this->pathInfo = $path;\n\t}", "title": "" }, { "docid": "7f8a1475aad294c7cfab2d500c595d76", "score": "0.42111543", "text": "protected function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "98b6a9e3ac82c495b1c5a337a656b6a3", "score": "0.42065626", "text": "public function set($key, $value) {\n\t\t\n\t\tif(isset(self::$basePropertiesAlternates[$key])) $key = self::$basePropertiesAlternates[$key];\n\n\t\tif(($key == 'id' || $key == 'name') && $this->settings[$key] && $value != $this->settings[$key]) \n\t\t\tif(\t($key == 'id' && (($this->settings['status'] & Page::statusSystem) || ($this->settings['status'] & Page::statusSystemID))) ||\n\t\t\t\t($key == 'name' && (($this->settings['status'] & Page::statusSystem)))) {\n\t\t\t\t\tthrow new WireException(\"You may not modify '$key' on page '{$this->path}' because it is a system page\"); \n\t\t}\n\n\t\tswitch($key) {\n\t\t\t/** @noinspection PhpMissingBreakStatementInspection */\n\t\t\tcase 'id':\n\t\t\t\tif(!$this->isLoaded) Page::$loadingStack[(int) $value] = $this;\n\t\t\t\t// no break is intentional\n\t\t\tcase 'sort': \n\t\t\tcase 'numChildren': \n\t\t\t\t$value = (int) $value; \n\t\t\t\tif($this->settings[$key] !== $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\t$this->setStatus($value); \n\t\t\t\tbreak;\n\t\t\tcase 'statusPrevious':\n\t\t\t\t$this->statusPrevious = is_null($value) ? null : (int) $value; \n\t\t\t\tbreak;\n\t\t\tcase 'name':\n\t\t\t\t$this->setName($value);\n\t\t\t\tbreak;\n\t\t\tcase 'parent': \n\t\t\tcase 'parent_id':\n\t\t\t\tif(is_object($value) && $value instanceof Page) {\n\t\t\t\t\t// ok\n\t\t\t\t\t$this->setParent($value);\n\t\t\t\t} else if($value && !$this->_parent && \n\t\t\t\t\t($key == 'parent_id' || is_int($value) || (is_string($value) && ctype_digit(\"$value\")))) {\n\t\t\t\t\t// store only parent ID so that parent is lazy loaded,\n\t\t\t\t\t// but only if parent hasn't already been previously loaded\n\t\t\t\t\t$this->_parent_id = (int) $value;\t\n\t\t\t\t} else if($value && (is_string($value) || is_int($value))) {\n\t\t\t\t\t$value = $this->_pages('get', $value);\n\t\t\t\t\t$this->setParent($value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'parentPrevious':\n\t\t\t\tif(is_null($value) || $value instanceof Page) $this->parentPrevious = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'template': \n\t\t\tcase 'templates_id':\n\t\t\t\tif($key == 'templates_id' && $this->template && $this->template->id == $value) break;\n\t\t\t\tif($key == 'templates_id') $value = $this->wire('templates')->get((int)$value); \n\t\t\t\t$this->setTemplate($value); \n\t\t\t\tbreak;\n\t\t\tcase 'created': \n\t\t\tcase 'modified':\n\t\t\tcase 'published':\n\t\t\t\tif(is_null($value)) $value = 0;\n\t\t\t\tif(!ctype_digit(\"$value\")) $value = strtotime($value); \n\t\t\t\t$value = (int) $value; \n\t\t\t\tif($this->settings[$key] !== $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value;\n\t\t\t\tbreak;\n\t\t\tcase 'created_users_id':\n\t\t\tcase 'modified_users_id':\n\t\t\t\t$value = (int) $value;\n\t\t\t\tif($this->settings[$key] !== $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'createdUser':\n\t\t\tcase 'modifiedUser':\n\t\t\t\t$this->setUser($value, str_replace('User', '', $key));\n\t\t\t\tbreak;\n\t\t\tcase 'sortfield':\n\t\t\t\tif($this->template && $this->template->sortfield) break;\n\t\t\t\t$value = $this->wire('pages')->sortfields()->decode($value); \n\t\t\t\tif($this->settings[$key] != $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'isLoaded': \n\t\t\t\t$this->setIsLoaded($value); \n\t\t\t\tbreak;\n\t\t\tcase 'pageNum':\n\t\t\t\t// note: pageNum is deprecated, use $input->pageNum instead\n\t\t\t\t/** @noinspection PhpDeprecationInspection */\n\t\t\t\t$this->pageNum = ((int) $value) > 1 ? (int) $value : 1; \n\t\t\t\tbreak;\n\t\t\tcase 'instanceID': \n\t\t\t\t$this->instanceID = $value; \n\t\t\t\tself::$instanceIDs[$value] = $this->settings['id']; \n\t\t\t\tbreak;\n\t\t\tcase 'loaderCache':\n\t\t\t\t$this->loaderCache = (bool) $value;\t\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif(strpos($key, 'name') === 0 && ctype_digit(substr($key, 5)) && $this->wire('languages')) {\n\t\t\t\t\t// i.e. name1234\n\t\t\t\t\t$this->setName($value, $key);\n\t\t\t\t} else {\n\t\t\t\t\tif($this->quietMode && !$this->template) return parent::set($key, $value);\n\t\t\t\t\t$this->setFieldValue($key, $value, $this->isLoaded);\n\t\t\t\t}\n\t\t}\n\t\treturn $this; \n\t}", "title": "" }, { "docid": "4e35c0def0bc7a91b0b1e63d54de5d45", "score": "0.42022932", "text": "public function setPage($page);", "title": "" }, { "docid": "4e35c0def0bc7a91b0b1e63d54de5d45", "score": "0.42022932", "text": "public function setPage($page);", "title": "" }, { "docid": "b3149f2629c9bd2a4f3aa4565b7b259e", "score": "0.4198233", "text": "protected function setPath($path) {\n $this->path = $path;\n }", "title": "" }, { "docid": "13e34dd660c3b54ae3dbe154ab38e15a", "score": "0.41872746", "text": "function set ($id, $options=[]){\n $block = $id instanceof Block ? $id : $this->getOrCreate($id) ;\n $this->configureBlock($block, $options);\n return $block;\n }", "title": "" }, { "docid": "a51eee99658c6dc8b03fc103a0cbb66f", "score": "0.41867802", "text": "private static function selectPath(\\Scrivo\\Page $page) {\n\t\ttry {\n\n\t\t\t$res = new \\Scrivo\\PageSet($page);\n\t\t\t$res->prepend($page);\n\t\t\t$target = $page->parentId;\n\n\t\t\t$i = 0;\n\t\t\twhile ($target) {\n\n\t\t\t\tif ($target == $page->id) {\n\t\t\t\t\tthrow new \\Scrivo\\SystemException(\"Path loop\");\n\t\t\t\t}\n\n\t\t\t\tif (isset($page->context->cache[$target])) {\n\n\t\t\t\t\t$p = $page->context->cache[$target];\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$sth = $page->context->connection->prepare(\n\t\t\t\t\t\t\"SELECT D.page_id, D.version, D.has_staging,\n\t\t\t\t\t\t\tD.parent_id,\tD.sequence_no, D.type,\n\t\t\t\t\t\t\tD.page_definition_id, D.language,\n\t\t\t\t\t\t\tD.title, D.description, D.keywords, D.javascript,\n\t\t\t\t\t\t\tD.stylesheet, D.date_created, D.date_modified, \n\t\t\t\t\t\t\tD.date_online, D.date_offline, R.role_id\n\t\t\t\t\t\tFROM page D LEFT JOIN object_role R ON\n\t\t\t\t\t\t\t(D.instance_id = R.instance_id AND\n\t\t\t\t\t\t\t\tD.page_id = R.page_id)\n\t\t\t\t\t\tWHERE D.instance_id = :instId AND\n\t\t\t\t\t\t\tD.page_id = :parentId AND\n\t\t\t\t\t\t\t(D.has_staging+D.version) = 0\");\n\n\t\t\t\t\t$page->context->connection->bindInstance($sth);\n\t\t\t\t\t$sth->bindValue(\":parentId\", $target, \\PDO::PARAM_INT);\n\n\t\t\t\t\t$sth->execute();\n\t\t\t\t\t$p = null;\n\n\t\t\t\t\twhile ($rd = $sth->fetch(\\PDO::FETCH_ASSOC)) {\n\n\t\t\t\t\t\tif (!$p) {\n\t\t\t\t\t\t\t$p = new \\Scrivo\\Page();\n\t\t\t\t\t\t\t$p->setFields($page->context, $rd);\n\t\t\t\t\t\t\t$p->roles = new \\Scrivo\\RoleSet();\n\t\t\t\t\t\t\t$target = intval($rd[\"parent_id\"]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Add the roles to the role set\n\t\t\t\t\t\t$p->roles[] = intval($rd[\"role_id\"]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($p) {\n\t\t\t\t\t\t$page->context->cache[$p->id] = $p;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new \\Scrivo\\SystemException(\n\t\t\t\t\t\t\t\"Failed to load page\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$res->prepend($p);\n\n\t\t\t\t$target = $p->parentId;\n\n\t\t\t}\n\n\t\t\treturn $res;\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "5301863f5162631b7ed81b0a8eeb685e", "score": "0.4184799", "text": "public function setPath($path): self\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "b680885dc7228c66ac9b19a7d7e386f9", "score": "0.4182289", "text": "public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "b680885dc7228c66ac9b19a7d7e386f9", "score": "0.4182289", "text": "public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "b680885dc7228c66ac9b19a7d7e386f9", "score": "0.4182289", "text": "public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "b680885dc7228c66ac9b19a7d7e386f9", "score": "0.4182289", "text": "public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "b680885dc7228c66ac9b19a7d7e386f9", "score": "0.4182289", "text": "public function setPath($path)\n {\n $this->path = $path;\n\n return $this;\n }", "title": "" }, { "docid": "805afad0dc58b5f9b0018c6d2033a024", "score": "0.41820198", "text": "public function set($path, $value){\n\t\tif(strpos($path, $this->path_separator) === false){\n\t\t\t$this->data[$path] = $value;\n\t\t\treturn;\n\t\t}\n\n\t\t$fragments = explode($this->path_separator, $path);\n\t\t$last_fragment = array_pop($fragments);\n\n\t\t$reference = &$this->data;\n\t\tforeach($fragments as $part){\n\n\t\t\tif(!isset($reference[$part]) || !is_array($reference[$part])){\n\t\t\t\t$reference[$part] = array();\n\t\t\t}\n\n\t\t\t$reference = &$reference[$part];\n\t\t}\n\n\t\t$reference[$last_fragment] = $value;\n\t}", "title": "" }, { "docid": "98ad7052d8ff1aca7f1379f89a0be792", "score": "0.41810888", "text": "public function path($path)\n {\n $this->path = $path;\n return $this;\n }", "title": "" }, { "docid": "4ae31c107c819d5fe814dcd0c68850b2", "score": "0.4180794", "text": "public function set($path, $value)\n {\n $configValue = $this->getRepository()->findOneByPath($path);\n if ($configValue) {\n $configValue->setValue($value);\n $this->update($configValue);\n }\n }", "title": "" }, { "docid": "78b92d9e93f15098a5914c49f8ff1654", "score": "0.4178134", "text": "public function set($value = null, $ignore = null)\n {\n if ($this->entityField) {\n $this->entityField->set($value);\n } else {\n $this->content = $value;\n }\n\n return $this;\n }", "title": "" }, { "docid": "71d5074f873f1ca8cc8ceefba7de9b25", "score": "0.41749611", "text": "function init()\r\n {\r\n parent::init();\r\n // Updates the parent properties after loading to ensure all properties\r\n // were read from the stream and set.\r\n // At the moment of writeParent(), the control does not have\r\n // the properties initialized because it is the first property set.\r\n\r\n // Updates all controls that accept controls inside themselves, but does not update the\r\n // root (usually Page) control.\r\n if ((isset($this->_controlstyle[\"csAcceptsControls\"])) && ($this->_controlstyle[\"csAcceptsControls\"] == \"1\" && $this->_parent != null))\r\n {\r\n // Checks if the parent control will not update this container;\r\n // if $this->_parentcolor == 1, then it will be updated by the parent\r\n // (and also all children) of this control.\r\n if ($this->_parentcolor == 0)\r\n {\r\n if ($this->methodExists(\"updateChildrenColors\"))\r\n {\r\n // Checks if there are any children that have $this->_parentcolor == 1.\r\n // If there are, updates them.\r\n $this->updateChildrenColors();\r\n }\r\n }\r\n // // Checks if the ParentColor property can be reset.\r\n if ($this->_parentfont == 0)\r\n {\r\n if ($this->methodExists(\"updateChildrenFonts\"))\r\n {\r\n $this->updateChildrenFonts();\r\n }\r\n }\r\n // // Checks if the ParentColor property can be reset.\r\n if ($this->_parentshowhint == 0)\r\n {\r\n if ($this->methodExists(\"updateChildrenShowHints\"))\r\n {\r\n $this->updateChildrenShowHints();\r\n }\r\n }\r\n }\r\n // Puts the Page (parent == null) at the end of the if-statement because it is called only once.\r\n else if ($this->_parent == null && $this->methodExists(\"updateChildrenParentProperties\"))\r\n {\r\n $this->updateChildrenParentProperties();\r\n }\r\n }", "title": "" }, { "docid": "7e6fd98e31999a90ca09315a2e81b13e", "score": "0.4173159", "text": "static public function on_page_editblock_alter_children(AlterChildrenEvent $event, \\Icybee\\Modules\\Pages\\EditBlock $block)\n\t{\n\t\t$event->attributes[Element::GROUPS]['seo'] = array\n\t\t(\n\t\t\t'title' => 'SEO',\n\t\t\t'weight' => 40\n\t\t);\n\n\t\t#\n\t\t# http://www.google.com/support/webmasters/bin/answer.py?answer=35264&hl=fr\n\t\t# http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html\n\t\t# http://www.google.com/support/webmasters/bin/answer.py?answer=79812\n\t\t#\n\n\t\t$event->children['metas[document_title]'] = new Text\n\t\t(\n\t\t\tarray\n\t\t\t(\n\t\t\t\tGroup::LABEL => 'document_title',\n\t\t\t\tElement::GROUP => 'seo',\n\t\t\t\tElement::DESCRIPTION => 'document_title'\n\t\t\t)\n\t\t);\n\n\t\t$event->children['metas[description]'] = new Element\n\t\t(\n\t\t\t'textarea', array\n\t\t\t(\n\t\t\t\tGroup::LABEL => 'description',\n\t\t\t\tElement::GROUP => 'seo',\n\t\t\t\tElement::DESCRIPTION => 'description',\n\n\t\t\t\t'rows' => 3\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "e6cdfa35e364409fa1b6302dcd332945", "score": "0.41694555", "text": "public function set(string $path, $value = null)\n {\n $this->getStorage()\n ->set($path, $value);\n }", "title": "" } ]
98644bb5479cfe7591fd959d32d46825
Gets new status changes which will be email to the user since the last emailing NOTE: you have to return the same result set as getnewevents
[ { "docid": "d0401819dbe37e2a9195598edd8eb7bb", "score": "0.7448207", "text": "public function getnewstatuschanges($userid, $lastemail) {\n\t\t// get changes since last emailing \n\t\t$this->isirdb->where('spis_status_history.date > ', $lastemail);\n\t\t$this->_prepareStatusChangeSelect($userid);\n\t\t\n\t\t$events = $this->isirdb->get('users_watches')->result_array();\n\t\t\n\t\t// then get changes for recently added subjects\n\t\t$this->isirdb->where('users_watches.date_add > ', $lastemail);\n\t\t$this->_prepareStatusChangeSelect($userid);\n\n\t\t$eventsNewlyAdded = $this->isirdb->get('users_watches')->result_array();\n\n\t\treturn $this->_mergeEvents($events, $eventsNewlyAdded);\n\t}", "title": "" } ]
[ { "docid": "1fd937ba47e275ade85da44a0cb8abfd", "score": "0.65930843", "text": "function api_email_updates() {\n\t$rv = array(\"status\" => true);\n\t\n\t$query = \"SELECT `created_date` FROM `events` WHERE `type`='email' ORDER BY `created_date` DESC LIMIT 1\";\n\t$result = db_query($query);\n\t\n\tif (db_num_rows($result) > 0) {\n\t\t$row = db_fetch_assoc($result);\n\t\t\n\t\t$query = \"SELECT * FROM `events` WHERE `created_date` > '\".db_escape($row[\"created_date\"]).\"'\";\n\t}\n\telse {\n\t\t$query = \"SELECT * FROM `events`\";\n\t}\n\t\n\t$query .= \" GROUP BY `type`, `key` ORDER BY `created_date` ASC\";\n\t$result = db_query($query);\n\t\n\tif (db_num_rows($result) > 0) {\n\t\t$e = new Event();\n\t\t$e->type = \"email\";\n\t\t$e->user_id = sess_id();\n\t\t$e->save();\n\t\n\t\t$emails = array();\n\t\n\t\twhile ($row = db_fetch_assoc($result)) {\n\t\t\t$meta = json_decode($row[\"meta\"]);\n\t\t\t\n\t\t\tswitch ($row[\"type\"]) {\n\t\t\t\tcase \"extension:insert\":\n\t\t\t\t\t// Alert anyone who asked for notifications on all new extensions\n\t\t\t\t\t// except for the user who uploaded it.\n\t\t\t\t\t$user_query = \"SELECT * FROM `users` WHERE `email_preferences` & \".db_escape(User::$EMAIL_FLAG_EXTENSION_INSERT).\" AND `id` <> '\".db_escape($row[\"user_id\"]).\"'\";\n\t\t\t\t\t$user_result = db_query($user_query);\n\t\t\t\t\t\n\t\t\t\t\twhile ($user_row = db_fetch_assoc($user_result)) {\n\t\t\t\t\t\t$emails[$user_row[\"id\"]][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"extension:update\":\n\t\t\t\t\t// Alert anyone who asked for notifications on extension updates\n\t\t\t\t\t// when they've contributed to a locale.\n\t\t\t\t\t$user_query = \"SELECT \n\t\t\t\t\t\t\t`u`.*\n\t\t\t\t\t\tFROM `users` `u`\n\t\t\t\t\t\t\tLEFT JOIN `message_history` `mh` ON `u`.`id`=`mh`.`user_id`\n\t\t\t\t\t\t\tLEFT JOIN `message_index` `mi` ON `mh`.`message_index_id`=`mi`.`id`\n\t\t\t\t\t\tWHERE `mi`.`extension_id`='\".db_escape($meta->extension_id).\"'\n\t\t\t\t\t\t\tAND `u`.`id` <> '\".db_escape($row[\"user_id\"]).\"'\n\t\t\t\t\t\t\tAND `email_preferences` & \".db_escape(User::$EMAIL_FLAG_EXTENSION_UPDATE).\"\n\t\t\t\t\t\tGROUP BY `u`.`id`\";\n\t\t\t\t\t$user_result = db_query($user_query);\n\t\t\t\t\n\t\t\t\t\twhile ($user_row = db_fetch_assoc($user_result)) {\n\t\t\t\t\t\t$emails[$user_row[\"id\"]][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"locale:complete\":\n\t\t\t\t\t// Alert anyone who asked for notifications when a locale is completed on their extension.\n\t\t\t\t\t$extension = new Extension($meta->extension_id);\n\t\t\t\t\t$user = new User($extension->user_id);\n\t\t\t\t\t\n\t\t\t\t\tif ($user->email_preferences & User::$EMAIL_FLAG_LOCALE_COMPLETE) {\n\t\t\t\t\t\t$emails[$user->id][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"message:update\":\n\t\t\t\t\t// Alert anyone who asked for notifications when their translations are changed.\n\t\t\t\t\t$user = new User($meta->previous_user_id);\n\t\t\t\t\t\n\t\t\t\t\tif ($user->email_preferences & User::$EMAIL_FLAG_MESSAGE_CHANGE) {\n\t\t\t\t\t\t$mindex = new MessageIndex($meta->message_index_id);\n\t\t\t\t\t\t$meta->extension_id = $mindex->extension_id;\n\t\t\t\t\t\t$meta->name = $mindex->name;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$emails[$user->id][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$email_objects = array();\n\t\t\n\t\t$default_locale_code = get_locale();\n\t\t\n\t\tforeach ($emails as $user_id => $events) {\n\t\t\t// Emails default to English, even if the API call is made to a localized subdomain.\n\t\t\tset_locale(\"en_US\");\n\t\t\t\n\t\t\t$user = new User($user_id);\n\t\t\t\n\t\t\tif ($user->preferred_locale) {\n\t\t\t\tset_locale($user->preferred_locale);\n\t\t\t}\n\t\t\t\n\t\t\t$email_object = array();\n\t\t\t$email_object[\"to\"] = $user->email;\n\t\t\t$email_object[\"subject\"] = __(\"email_notification_subject\");\n\t\t\t\n\t\t\tob_start();\n\t\t\tinclude INCLUDE_PATH . \"/templates/email/notification.php\";\n\t\t\t$html = ob_get_clean();\n\t\t\tob_end_clean();\n\t\t\t\n\t\t\t$email_object[\"body\"] = $html;\n\t\t\n\t\t\t$email_objects[] = $email_object;\n\t\t}\n\t\t\n\t\tset_locale($default_locale_code);\n\t\t\n\t\tforeach ($email_objects as $email) {\n\t\t\temail($email[\"to\"], $email[\"subject\"], $email[\"body\"]);\n\t\t}\n\t}\n\t\n\treturn $rv;\n}", "title": "" }, { "docid": "b491893ee1fb4b89ca4736b1c67bf73e", "score": "0.61207205", "text": "function showUserPendingNotifications($status){\n global $DB,$user_id;\n\n $sql = \"Select * from notifications where other_user_id=$user_id and status='$status' order by id desc limit 5\";\n $res_data_notification = $DB->RunSelectQuery($sql);\n\n foreach ($res_data_notification as $result)\n {\n $notification_data = (array)$result;\n $date = date(\"Y-m-d\", strtotime($notification_data[\"notification_date\"]));\n ?>\n\n <?php\n//echo $notification_data[\"notification_type\"] ;\n// Added here by Nitin Soni for status\n\n /*\nSHow Notification for updated event\n */\n //IF NOTIFICATION TYPE IS update event/ping\n if ($notification_data[\"notification_type\"] == \"ping_updated\"|| $notification_data[\"notification_type\"] == \"event_updated\")\n {\n\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data_event = $DB->RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n ?>\n <div class=\"is-notification\" id=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n if ($resulteventcomment['event_photo'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resulteventcomment[\"event_photo\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <?php if ($event_type == 'ping')\n {\n $var = 'The';\n }else{\n $var = 'An';\n } ?>\n <?php echo $var ?> <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> has been modified by organiser. Please review the changes.\n </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n /*UPdate event/ping work completed here */\n\n /* Cancel Event/Ping started */\n //IF NOTIFICATION TYPE IS cancel event/ping\n if ($notification_data[\"notification_type\"] == \"Cancel Ping\"|| $notification_data[\"notification_type\"] == \"Cancel Event\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data_event = $DB->RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\" id=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n if ($resulteventcomment['event_photo'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resulteventcomment[\"event_photo\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <?php if ($event_type == 'ping')\n {\n $var = 'The';\n }else{\n $var = 'An';\n } ?>\n <?php echo $var ?> <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> has been cancelled.</p>\n\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n /* Completed cancel event/ping */\n\n\n\n /*Reorganize event started*/\n /* Cancel Event/Ping started */\n //IF NOTIFICATION TYPE IS cancel event/ping\n if ($notification_data[\"notification_type\"] == \"Event Reorganize\" || $notification_data[\"notification_type\"] == \"Ping Reorganize\")\n {\n\n /*echo \"Hello\";\n exit;*/\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data_event = $DB->RunSelectQuery($sql);\n // 'event_status' => 'L'\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\" id=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n if ($resulteventcomment['event_photo'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resulteventcomment[\"event_photo\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <?php if ($event_type == 'ping')\n {\n $var = 'The';\n }else{\n $var = 'An';\n } ?>\n\n <?php echo $var ?> <?php echo $event_type ?> <strong><a href=<?php echo $event_link ?> style=\"color:#000000\"><?php echo $event_name ?></a></strong>\n has been reorganized.\n </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n /*Completed here*/\n /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/\n /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/\n /*Completed event update work*/\n\n //IF NOTIFICATION TYPE IS A COMMENT\n if ($notification_data[\"notification_type\"] == \"C\")\n {\n\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\" id=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $before_result = $DB->RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $publicUserResult = (array)$result;\n if ($publicUserResult['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $publicUserResult[\"profile_pic\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n } ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $notification_data[\"$user_id\"]);\n ?>\" style=\"color:#000000\"><?php echo $user_name ?></a></strong> has commented on your <?php echo $event_type ?> <strong><a href=<?php echo $event_link ?> style=\"color:#000000\"><?php echo $event_name ?></a>&nbsp;</strong></p>\n <p id=\"notification-date\"><span class=\"has-noti-icon\"><img alt=\"notifocation-image\" src=\"images/comment_box.gif\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n\n//Completed work for show cancel Event notification\n\n //IF NOTIFICATION TYPE IS A COMMENT\n if ($notification_data[\"notification_type\"] == \"Comment\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div id=\"is-notification\" class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n //Query is changed by Nitin Soni\n /* $sql = \"SELECT * from public_users where id=$user_id\";*/\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $before_result = $DB->RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $PublicUserData = (array)$result;\n if ($PublicUserData['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $PublicUserData[\"profile_pic\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n } ?>\n </div>\n <!-- <div class=\"who-sent-notification\">\n <img alt=\"event-image\" src=\"images/profile_img.jpg\" class=\"image-has-radius\">\n </div> -->\n <div class=\"notification-itself\">\n <p class=\"notification-content\" id=\"is-notification\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $notification_data[\"id\"]);\n ?>\" style=\"color:#000000\"><?php echo $user_name ?></a></strong> has commented on your <?php echo $event_type ?> <strong><a href=<?php echo $event_link ?> style=\"color:#000000\"><?php echo $event_name ?></a>&nbsp;</strong></p>\n <p id=\"notification-date\"><span class=\"has-noti-icon\"><img alt=\"notifocation-image\" src=\"images/comment_box.gif\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n //IF NOTIFICATION TYPE IS AN ADD BUDDY\n if ($notification_data[\"notification_type\"] == \"Add_Buddy\")\n {\n\n $sql = \"Select * from public_users where id=\" . $result->user_id;\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $data)\n {\n $publicUserInfo = (array)$data;\n\n $user_name = $publicUserInfo[\"firstname\"] . \" \" . $publicUserInfo[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\" id=\"is-notification\">\n\n <div class=\"who-sent-notification\">\n <?php\n if ($publicUserInfo['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $publicUserInfo[\"profile_pic\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n } ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $publicUserInfo[\"id\"]);\n ?>\" style=\"color:#000000\"><?php echo $user_name ?></a></strong>&nbsp; wants to add you as a buddy.\n\n <?php //Check if current user and event_organiser are buddies\n $sql = \"SELECT * from buddies where user_id=$user_id and buddy_id=\" . $publicUserInfo[\"id\"];\n $res_data = $DB->RunSelectQuery($sql);\n if ($res_data[0]->status =='Confirmed buddy')\n {\n\n ?>\n <img src=\"images/green_tick.gif\" style=\"vertical-align:middle\" width=\"15\" />&nbsp;<span class=\"ArialVeryDarkGreyBold15\">Accepted</span>\n </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-user\"></span><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n <?php\n }\n else\n {\n ?>\n <div class=\"accept-req-dropdown\" id=\"confirm_add_buddy_status<?php\n echo $publicUserInfo[\"id\"];\n ?>\" style=\"display:inline-block\"><div onClick=\"confirm_add_buddy(<?php\n\n ?>)\" class=\"slimbuttonblue\" style=\"width:130px;\">Accept request</div></div>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-user\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n <?php\n } ?>\n </div>\n </div>\n <?php\n\n }\n //IF NOTIFICATION TYPE IS A CONFIRMED BUDDY\n if ($notification_data[\"notification_type\"] == \"Confirmed Buddy\")\n {\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resultuser)\n {\n $resultuserInfo = (array)$resultuser;\n $user_name = $resultuserInfo[\"firstname\"] . \" \" . $resultuserInfo[\"lastname\"];\n }\n ?>\n\n <div class=\"is-notification\" id=\"is-notification\">\n <div class=\"who-sent-notification\">\n <img width=\"37\" height=\"37\" src=\"<? echo ROOTURL . '/' . $resultuserInfo[\"profile_pic\"]; ?>\" class=\"image-has-radius\" alt=\"event-image\">\n </div>\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $resultuserInfo[\"id\"]);\n ?>\" style=\"color:#000000\"><?php\n echo $user_name;\n ?></a></strong>&nbsp; has accepted your buddy request.</p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-user\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n\n </div>\n <?php\n }\n if ($notification_data[\"notification_type\"] == \"Booking Request\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n <!-- Add new commented here -->\n <div class=\"is-notification\" id=\"is-notification\">\n <!-- Added by Nitin Soni for show user image 18Aug/2017 -->\n <div class=\"who-sent-notification\">\n <?php\n if ($resultusercomment['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resultusercomment['profile_pic']; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n <!-- Finsihed by Nitin Soni for user image -->\n <div class=\"notification-itself\" >\n <p class=\"notification-content\"><?php echo $user_name; ?> sent you a booking request for <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"> <?php\n echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"]));\n ?></span></p>\n </div>\n </div>\n <!-- Add new task completed -->\n\n <?php\n }\n if ($notification_data[\"notification_type\"] == \"Cancel Booking\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n <!-- Add new commented here -->\n <div class=\"is-notification\" id=\"is-notification\">\n <!-- Added by Nitin Soni for show user image 18Aug/2017 -->\n <div class=\"who-sent-notification\">\n <?php\n if ($resultusercomment['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resultusercomment['profile_pic']; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n <!-- Finsihed by Nitin Soni for user image -->\n <div class=\"notification-itself\" >\n <p class=\"notification-content\"><?php echo $user_name; ?> Left <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"> <?php\n echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"]));\n ?></span></p>\n </div>\n </div>\n <!-- Add new task completed -->\n\n <?php\n }\n\n\n ?>\n <?php\n }\n\n}", "title": "" }, { "docid": "0e21cb836581892f72a58e42f927120c", "score": "0.608181", "text": "public function getnewevents($userid, $lastemail, $ignoreminordocuments) {\n\t\t// first get changes since the last emailing\n\t\t$this->isirdb->where('spis_data.publishdate > \"'. $lastemail .'\"', '', false);\n\n\t\tif ($ignoreminordocuments == true) {\n\t\t\t$this->isirdb->where('spis_data.is_document_minor', false);\n\t\t}\n\n\t\t$this->isirdb->order_by('spis_data.publishdate');\n\t\t$this->_prepareNewEventsSelect($userid, false, true);\n\n\t\t$temp = $this->isirdb->get('users_watches')->result_array();\n\n\t\t// then get changes for recently added subjects\n\t\t$this->isirdb->where('users_watches.date_add > \"'. $lastemail .'\"', '', false);\n\t\t$this->_prepareNewEventsSelect($userid, true, false);\n\n\t\t$tempNewlyAdded = $this->isirdb->get('users_watches')->result_array();\n\n\t\treturn $this->_mergeEvents($temp, $tempNewlyAdded);\n\t}", "title": "" }, { "docid": "8c9a3e489fb2d6c040359f1447dd0f81", "score": "0.6036853", "text": "function showUserNotifications($status,$limit){\n global $DB,$user_id;\n $limit;\n $sql = \"Select * from notifications where other_user_id=$user_id and status='$status' order by id desc limit $limit\";\n $res_data_notification = $DB->RunSelectQuery($sql);\n\n foreach ($res_data_notification as $result)\n {\n $notification_data = (array)$result;\n $date = date(\"Y-m-d\", strtotime($notification_data[\"notification_date\"]));\n ?>\n <?php\n// Added here by Nitin Soni for status\n\n /*\nSHow Notification for updated event\n */\n //IF NOTIFICATION TYPE IS update event/ping\n if ($notification_data[\"notification_type\"] == \"ping_updated\"|| $notification_data[\"notification_type\"] == \"event_updated\")\n {\n\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data_event = $DB->RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n ?>\n <div class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n if ($resulteventcomment['event_photo'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resulteventcomment[\"event_photo\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <?php if ($event_type == 'ping')\n {\n $var = 'The';\n }else{\n $var = 'An';\n } ?>\n <?php echo $var ?> <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> has been modified by organiser. Please review the changes.\n </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n /*UPdate event/ping work completed here */\n\n /* Cancel Event/Ping started */\n //IF NOTIFICATION TYPE IS cancel event/ping\n if ($notification_data[\"notification_type\"] == \"Cancel Ping\"|| $notification_data[\"notification_type\"] == \"Cancel Event\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data_event = $DB->RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n if ($resulteventcomment['event_photo'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resulteventcomment[\"event_photo\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <?php if ($event_type == 'ping')\n {\n $var = 'The';\n }else{\n $var = 'An';\n } ?>\n <?php echo $var ?> <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> has been cancelled.</p>\n\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n /* Completed cancel event/ping */\n\n\n\n /*Reorganize event started*/\n /* Cancel Event/Ping started */\n //IF NOTIFICATION TYPE IS cancel event/ping\n if ($notification_data[\"notification_type\"] == \"Event Reorganize\" || $notification_data[\"notification_type\"] == \"Ping Reorganize\")\n {\n\n /*echo \"Hello\";\n exit;*/\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data_event = $DB->RunSelectQuery($sql);\n // 'event_status' => 'L'\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n if ($resulteventcomment['event_photo'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resulteventcomment[\"event_photo\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\">\n <?php if ($event_type == 'ping')\n {\n $var = 'The';\n }else{\n $var = 'An';\n } ?>\n <?php echo $var ?> <?php echo $event_type ?> <strong><a href=<?php echo $event_link ?> style=\"color:#000000\"><?php echo $event_name ?></a></strong>\n has been reorganized.\n </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n /*Completed here*/\n /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/\n /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/\n /*Completed event update work*/\n\n //IF NOTIFICATION TYPE IS A COMMENT\n if ($notification_data[\"notification_type\"] == \"C\")\n {\n\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $before_result = $DB->RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $publicUserResult = (array)$result;\n if ($publicUserResult['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $publicUserResult[\"profile_pic\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n } ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $notification_data[\"$user_id\"]);\n ?>\" style=\"color:#000000\"><?php echo $user_name ?></a></strong> has commented on your <?php echo $event_type ?><strong><a href=<?php echo $event_link ?> style=\"color:#000000\"><?php echo $event_name ?></a>&nbsp;</strong></p>\n <p id=\"notification-date\"><span class=\"has-noti-icon\"><img alt=\"notifocation-image\" src=\"images/comment_box.gif\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n\n//Completed work for show cancel Event notification\n\n //IF NOTIFICATION TYPE IS A COMMENT\n if ($notification_data[\"notification_type\"] == \"Comment\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <?php\n //Query is changed by Nitin Soni\n /* $sql = \"SELECT * from public_users where id=$user_id\";*/\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $before_result = $DB->RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $PublicUserData = (array)$result;\n if ($PublicUserData['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $PublicUserData[\"profile_pic\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n } ?>\n </div>\n <!-- <div class=\"who-sent-notification\">\n <img alt=\"event-image\" src=\"images/profile_img.jpg\" class=\"image-has-radius\">\n </div> -->\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $notification_data[\"id\"]);\n ?>\" style=\"color:#000000\"><?php echo $user_name ?></a></strong> has commented on your <?php echo $event_type ?> <strong><a href=<?php echo $event_link ?> style=\"color:#000000\"><?php echo $event_name ?></a>&nbsp;</strong></p>\n <p id=\"notification-date\"><span class=\"has-noti-icon\"><img alt=\"notifocation-image\" src=\"images/comment_box.gif\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n\n <!-- --><? //\n\n }\n //IF NOTIFICATION TYPE IS AN ADD BUDDY\n if ($notification_data[\"notification_type\"]=='Add_Buddy')\n {\n// echo'hi mthree';exit;\n $sql = \"Select * from public_users where id=\" . $result->user_id;\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $data)\n {\n $publicUserInfo = (array)$data;\n\n $user_name = $publicUserInfo[\"firstname\"] . \" \" . $publicUserInfo[\"lastname\"];\n }\n ?>\n <div class=\"is-notification\">\n\n <div class=\"who-sent-notification\">\n <?php\n if ($publicUserInfo['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $publicUserInfo[\"profile_pic\"]; ?>\" width=\"37\" height=\"37\" />\n <?php\n } ?>\n </div>\n\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $publicUserInfo[\"id\"]);\n ?>\" style=\"color:#000000\"><?php echo $user_name ?></a></strong>&nbsp; wants to add you as a buddy.\n <?php //Check if current user and event_organiser are buddies\n $sql = \"SELECT * from buddies where user_id=$user_id and buddy_id=\" . $publicUserInfo[\"id\"];\n $res_data = $DB->RunSelectQuery($sql);\n if ($res_data[0]->status =='Confirmed buddy')\n {\n\n ?>\n <img src=\"images/green_tick.gif\" style=\"vertical-align:middle\" width=\"15\" />&nbsp;<span class=\"ArialVeryDarkGreyBold15\">Accepted</span>\n </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-user\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n </div>\n <?php\n }\n else\n {\n ?>\n <div class=\"accept-req-dropdown\" id=\"confirm_add_buddy_status<?php\n echo $publicUserInfo[\"id\"];\n ?>\" style=\"display:inline-block\"><div onClick=\"confirm_add_buddy(<?php\n echo $publicUserInfo[\"id\"];\n ?>)\" class=\"slimbuttonblue\" style=\"width:130px;\">Accept request</div></div>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-user\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n <?php\n }?>\n\n <?php\n }\n //IF NOTIFICATION TYPE IS A CONFIRMED BUDDY\n if ($notification_data[\"notification_type\"] == \"Confirmed Buddy\")\n {\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resultuser)\n {\n $resultuserInfo = (array)$resultuser;\n $user_name = $resultuserInfo[\"firstname\"] . \" \" . $resultuserInfo[\"lastname\"];\n }\n ?>\n\n <div class=\"is-notification\">\n <div class=\"who-sent-notification\">\n <img width=\"37\" height=\"37\" src=\"<? echo ROOTURL . '/' . $resultuserInfo[\"profile_pic\"]; ?>\" class=\"image-has-radius\" alt=\"event-image\">\n </div>\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><strong><a href=\"<?php\n echo createURL('index.php', \"mod=user&do=profile&userid=\" . $resultuserInfo[\"id\"]);\n ?>\" style=\"color:#000000\"><?php\n echo $user_name;\n ?></a></strong>&nbsp; has accepted your buddy request.</p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-user\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"><?php echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"])) ?></span></p>\n </div>\n\n </div>\n <?php\n }\n if ($notification_data[\"notification_type\"] == \"Booking Request\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n <!-- Add new commented here -->\n <div class=\"is-notification\">\n <!-- Added by Nitin Soni for show user image 18Aug/2017 -->\n <div class=\"who-sent-notification\">\n <?php\n if ($resultusercomment['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resultusercomment['profile_pic']; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n <!-- Finsihed by Nitin Soni for user image -->\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><?php echo $user_name; ?> sent you a booking request for <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"> <?php\n echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"]));\n ?></span></p>\n </div>\n </div>\n <!-- Add new task completed -->\n\n <?php\n }\n if ($notification_data[\"notification_type\"] == \"Cancel Booking\")\n {\n $sql = \"Select * from events where event_id=\" . $notification_data[\"event_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n <!-- Add new commented here -->\n <div class=\"is-notification\">\n <!-- Added by Nitin Soni for show user image 18Aug/2017 -->\n <div class=\"who-sent-notification\">\n <?php\n if ($resultusercomment['profile_pic'] == null)\n {\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<?php echo ROOTURL; ?>/images/no_profile_pic.gif\" />\n <?php\n }\n else\n {\n\n ?>\n <img alt=\"event-image\" class=\"image-has-radius\" src=\"<? echo ROOTURL . '/' . $resultusercomment['profile_pic']; ?>\" width=\"37\" height=\"37\" />\n <?php\n }\n ?>\n </div>\n <!-- Finsihed by Nitin Soni for user image -->\n <div class=\"notification-itself\">\n <p class=\"notification-content\"><?php echo $user_name; ?> Left <?php echo $event_type; ?> <strong><a style=\"color:#000000\" href=\"<?php echo $event_link;?>\"><?php\n echo $event_name;\n ?></a></strong> </p>\n <p id=\"notification-date\"><span class=\"glyphicon glyphicon-calendar\"></span><span class=\"make-space\"></span><span class=\"has-noti-date-time\"> <?php\n echo date(\"j F, H:i a\", strtotime($notification_data[\"notification_date\"]));\n ?></span></p>\n </div>\n </div>\n <!-- Add new task completed -->\n\n <?php\n }\n\n ?>\n <?php\n }\n}", "title": "" }, { "docid": "f4fc24f7f9ad332f4afd3f3ff0de300b", "score": "0.60056543", "text": "public function getPendingEvents(): array;", "title": "" }, { "docid": "d592512e222005d9fa8c7ce362ed64bf", "score": "0.60015315", "text": "public function getStatusChanges($date)\n\t{\n\t\t$args = array();\n\t\t$query = $this->application_query_builder->getStatusHistoryQuery(\n\t\t\t$date, \n\t\t\t$this->getUpdatableStatusIds(), \n\t\t\t$this->config->getCompany(), \n\t\t\t$args\n\t\t);\n\t\t\n\t\t//$st = $this->config->getConnection()->prepare($query);\n\t\t$rs = $this->queryPrepared($query,$args);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setApplicationBalance'))\n\t\t);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setStatusChain'))\n\t\t);\n\t\t\n\t\treturn $this->data_builder->getApplicationData($rs);\n\t}", "title": "" }, { "docid": "cb3c9035aafd8c0733892c983ad466be", "score": "0.5998655", "text": "public function getChanges();", "title": "" }, { "docid": "cb3c9035aafd8c0733892c983ad466be", "score": "0.5998655", "text": "public function getChanges();", "title": "" }, { "docid": "6c1d2717f5f897158049e95c17c8b3ae", "score": "0.5992619", "text": "public function getApplicationStatusChanges($application_id)\n\t{\n\t\t$args = array();\n\t\t$query = $this->application_query_builder->getApplicationStatusHistoryQuery(\n\t\t\t$application_id, \n\t\t\t$this->getUpdatableStatusIds(), \n\t\t\t$this->config->getCompany(), \n\t\t\t$args\n\t\t);\n\t\t\n\t\t//$st = $this->config->getConnection()->prepare($query);\n\t\t$rs = $this->queryPrepared($query,$args);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setApplicationBalance'))\n\t\t);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setStatusChain'))\n\t\t);\n\t\t\n\t\treturn $this->data_builder->getApplicationData($rs);\n\t}", "title": "" }, { "docid": "8752a50d3d50c571f8563505c0ece0e9", "score": "0.59067863", "text": "function relist_notifications($old, $new) {\r\n $functions=1;\r\n include(\"config.php\"); // php functions\r\n\r\n\r\n $task = mysql_fetch_array(mysql_query(\"SELECT * FROM tasks WHERE id = '$old' LIMIT 1\")); //original task details\r\n $joins = mysql_query(\"SELECT * FROM joins WHERE task = '$old'\"); // people who had joined that task (if any)\r\n $subject = \"Task re-listed - \" . $task[\"title\"];\r\n \r\n while ($info = mysql_fetch_array($joins)){\r\n \r\n $member = mysql_fetch_array(mysql_query(\"SELECT * FROM `users` WHERE id = '\".$info[\"user\"].\"' LIMIT 1\"));\r\n $message = \"\r\n <p>\".$member[\"firstname\"].\",</p>\r\n \r\n <p>Recently a task closed which you had joined, however not enough others had joined to activate it. The lister has now re-listed the task on another date, so we thought we'd let you know incase you were interested in re-joining.</p>\r\n \r\n <p>You can view the new listing and join the task here:</p>\r\n \r\n <p style='padding-left: 40px;'><a href='$domain\" . task_link($new) . \"'>$domain\" . task_link($new) . \"</a></p>\r\n \r\n <p>Thanks for being a part of Volunteezy!</p> \r\n \";\r\n \r\n send_email($member[\"email\"], $subject, $message);\r\n \r\n addlog(\"Sent email to user \".$info[\"user\"].\" to let them know that task $old has been relisted as task $new\");\r\n }\r\n \r\n \r\n}", "title": "" }, { "docid": "8c6b80e25241caae0c45c4354b5460a4", "score": "0.58870816", "text": "function phb_is_get_user_status($event_id,$user_id)\r\n\t{\r\n global $SITE_URL;\r\n\t\t hb_set_then_go(\"change_invitation_status_then_go\",$SITE_URL.\"future_event.php\");\r\n\t\t if($event_id!=\"\" && $user_id!=\"\")\r\n\t\t {\r\n\t\t $select_status=\"select * from tbl_invitation_responce where user_id='$user_id' and event_id='$event_id'\";\r\n\t\t $status_result=hb_mysql_query($select_status);\r\n\t\t $row_status=hb_mysql_num_rows($status_result);\r\n\t\t\t if($row_status > 0)\r\n\t\t\t {\r\n\t\t\t\t $status_data=hb_mysql_fetch_array($status_result);\r\n\t\t\t\t$rid=$status_data['id'];\r\n\t\t\t\t$uid=$status_data['user_id'];\r\n\t\t\t\t if($status_data['status']==\"1\")\r\n\t\t\t\t {\r\n\t\t\t\t\t return \"<span class='green'>Joining</span> <br> <span class='white'>Change :</span> <a href='join_event.php?event_id=$event_id&status=maybe&type=direct&rid=$rid&u=$uid'>May Be</a> | <a href='join_event.php?event_id=$event_id&status=declined&type=direct&rid=$rid&u=$uid'>Not Joining</a>\" ;\r\n\t\t\t\t }else if($status_data['status']==\"2\")\r\n\t\t\t\t {\r\n\t\t\t\t\t return \"<span class='green'>Maybe</span><br> <span class='white'>Change :</span><a href='join_event.php?event_id=$event_id&status=active&type=direct&rid=$rid&u=$uid'>Join</a>\" ;\r\n\t\t\t\t }else{\r\n\t\t\t\t\t return \"<span class='green'>Not Joining</span> <Br><span class='white'> Change :</span> <a href='join_event.php?event_id=$event_id&status=maybe&type=direct&rid=$rid&u=$uid'>Join</a> | <a href='join_event.php?event_id=$event_id&status=maybe&type=direct&rid=$rid&u=$uid'>May Be</a> \";\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t \r\n\t\t }\r\n\t\r\n\t}", "title": "" }, { "docid": "2cfe0a8721b783c767ad87bc0a86ab74", "score": "0.5886645", "text": "function getAllEventNotifications($user_id){\n\t\t\t\t\t\n\t\t\t$sql =\" select ef.id,ef.friend_id,e.user_id,e.event_id,u.user_name as UserName,\n\t\t\t\t\t\tu.image as UserImage,e.event_name,e.event_type,e.description,\n\t\t\t\t\t\tef.status from `events` as e ,event_friends as ef\n\t\t\t\t\t\tleft join users as u on u.user_id = ef.user_id\n\t\t\t\t\t\twhere e.event_id = ef.event_id\n\t\t\t\t\t\tand ef.friend_id = '\".$user_id.\"'\n\t\t\t\t\t\tand e.create_type = 'events'\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tand (ef.status = 'start')\n\t\t\t\t\t\tgroup by e.event_id\n\t\t\t\t\t\torder by e.event_id desc\n\t\t\t\t\t\tlimit 0,2 \";\n\t\t$query = $this->db->query($sql);\t\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t\t\n\t}", "title": "" }, { "docid": "5b25bfdeb0eb6115d0a0ae53f2e8dda3", "score": "0.5876238", "text": "private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}", "title": "" }, { "docid": "8d4b8811cdaf9f36468349d883a65787", "score": "0.5870417", "text": "public function getNew()\n\t{\n\t\t$msgs = $this->getAllByQuery(\"date_sent >= ?\", [$this->last_query_time]);\n\t\t$this->updateQueryTime();\n\t\treturn $msgs;\n\t}", "title": "" }, { "docid": "fd3a13e66ed74e64d135c11a781cfce7", "score": "0.5867827", "text": "public function getUpdates()\n {\n $query = \"SELECT * FROM events WHERE id > ? AND game_id = ? AND player = ?\";\n $result = $this->oDB->getAll($query, array(\n $this->oData->getLastIdEvents(),\n $this->oData->getIdGames(),\n $this->oData->getOtherNumber()\n ));\n\n $updates = array();\n foreach ($result as $value) {\n switch ($value['event_type']) {\n case \"name_update\":\n $this->oData->setOtherName($value['event_value']);\n break;\n\n case \"start_game\":\n $this->oData->setOtherShips($value['event_value']);\n break;\n\n case \"shot\":\n $this->oData->appendOtherShots($value['event_value']);\n break;\n }\n\n $lastIdEvents = max($this->oData->getLastIdEvents(), $value['id']);\n $this->oData->setLastIdEvents($lastIdEvents);\n\n if ($value['event_type'] == \"chat\") {\n $eventValue = new \\stdClass();\n $eventValue->text = $value['event_value'];\n $eventValue->timestamp = $value['timestamp'];\n } elseif ($value['event_type'] == 'start_game') {\n $eventValue = true;\n } else {\n $eventValue = $value['event_value'];\n }\n\n $updates[ $value['event_type'] ][] = $eventValue;\n $updates['lastIdEvents'] = array($lastIdEvents);\n }\n\n return $updates;\n }", "title": "" }, { "docid": "078fe78bb017c07cdba63e94856f53dd", "score": "0.586162", "text": "public function changes()\r\n\t{\r\n\t\t$Change = App::make('Change');\r\n\r\n\t\treturn $Change::where('fmodel', 'GalleryItem')\r\n\t\t\t\t \t ->where('fid', $this->id)\r\n\t\t\t\t \t ->with('user')\r\n\t\t\t\t \t ->orderBy('created_at', 'DESC')\r\n\t\t\t\t \t ->get();\r\n\t}", "title": "" }, { "docid": "0887649d2c910fb4ae03aa2eb9bdcc80", "score": "0.58582646", "text": "public function getStatusHistory()\n\t\t{\n\t\t\t$list = ECash::getFactory()->getModel(\"StatusHistoryList\");\n\t\t\t$list->loadBy(array(\"application_id\" => $this->application_id));\n\n\t\t\treturn $list->toList();\n\t\t}", "title": "" }, { "docid": "4ddb103dc55d8c45bde0a13c3f023008", "score": "0.57783204", "text": "function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}", "title": "" }, { "docid": "1d9e678eb67aebd7fab4b8fb0518cc2f", "score": "0.577272", "text": "public function getChangedEntries();", "title": "" }, { "docid": "cc97f99720212a670519ea1a872a9222", "score": "0.5757922", "text": "function fn_get_order_status_history($params = array(), $lang_code = CART_LANGUAGE, $items_per_page = 0)\n{\n\n // Set default values to input params\n $default_params = array(\n 'page' => 1,\n 'items_per_page' => $items_per_page\n );\n\n $params = array_merge($default_params, $params);\n\n $sortings = array(\n 'user_id' => '?:order_status_history.user_id',\n 'order_id' => '?:order_status_history.order_id',\n 'timestamp' => '?:order_status_history.timestamp',\n 'new_status' => '?:order_status_history.new_status',\n 'old_status' => '?:order_status_history.old_status',\n );\n\n $fields = array (\n '?:order_status_history.user_id',\n '?:order_status_history.order_id',\n '?:order_status_history.timestamp',\n '?:order_status_history.new_status',\n '?:order_status_history.old_status',\n '?:users.firstname'\n );\n\n $sorting = db_sort($params, $sortings, 'timestamp', 'asc');\n\n\n if (!empty($params['items_per_page'])) {\n $params['total_items'] = db_get_field(\"SELECT COUNT(*) FROM ?:order_status_history\");\n $limit = db_paginate($params['page'], $params['items_per_page'], $params['total_items']);\n }\n\n $join = 'left join ?:users on ?:order_status_history.user_id = ?:users.user_id';\n\n $status_history_list = db_get_array(\n \"SELECT ?p FROM ?:order_status_history \" .\n $join .\n \" WHERE 1 ?p ?p\",\n implode(', ', $fields), $sorting, $limit\n );\n\n $order_statuses = fn_get_statuses(STATUSES_ORDER, [], true, true);\n\n foreach ($status_history_list as &$history){\n $history['new_status_text'] = $order_statuses[$history['new_status']]['description'];\n $history['old_status_text'] = $order_statuses[$history['old_status']]['description'];\n }\n\n return array($status_history_list, $params, $order_statuses);\n}", "title": "" }, { "docid": "34336aefb91d5d7347925cf7d4265e1d", "score": "0.5696395", "text": "public function getUncommittedEvents();", "title": "" }, { "docid": "ca47fe0086805e1e2e9b3d5dce67a688", "score": "0.56951195", "text": "public function getnewevents_allforadded($userid, $lastemail, $ignoreminordocuments) {\n\t\t// first get all events for subjects added after last emailing\n\t\t$this->isirdb->where('users_watches.date_add > \"'. $lastemail .'\"', '', false);\n\n\t\tif ($ignoreminordocuments == true) {\n\t\t\t$this->isirdb->where('spis_data.is_document_minor', false);\n\t\t}\n\t\t\n\t\t$this->_prepareNewEventsSelect($userid, false, false);\n\n\t\t$tempNewlyAdded = $this->isirdb->get('users_watches')->result_array();\n\n\t\t// then get changes since the last emailing for subjects added before last emailing\n\t\t$this->isirdb->where('spis_data.publishdate > \"'. $lastemail .'\"', '', false);\n\n\t\tif ($ignoreminordocuments == true) {\n\t\t\t$this->isirdb->where('spis_data.is_document_minor', false);\n\t\t}\n\n\t\t$this->isirdb->order_by('spis_data.publishdate');\n\t\t$this->_prepareNewEventsSelect($userid, false, true);\n\n\t\t$temp = $this->isirdb->get('users_watches')->result_array();\n\t\t\n\t\treturn $this->_mergeEvents($tempNewlyAdded, $temp);\n\t}", "title": "" }, { "docid": "2bca3b0a6cd8c616fe90d5e82b352737", "score": "0.5682046", "text": "public function groupNotChangedMails()\n {\n $conditions = array('GroupChangeRequest.request_type'=>'cr','GroupChangeRequest.is_moved'=>0);\n $pendingRequests = $this->GroupChangeRequest->find('all',array('conditions'=>$conditions));\n $cuttentTimeStamp = strtotime(date('Y-m-d'));\n if(!empty($pendingRequests)) {\n $count = 0;\n foreach($pendingRequests as $row){\n $timeDiff = round(abs($cuttentTimeStamp - strtotime($row['GroupChangeRequest']['created'])) / (60*60),0);\n if($timeDiff < 48) {\n //Send Mails\n $count++;\n $emailLib = new Email();\n $to = $userInfo['BusinessOwner']['email'];\n //$to = 'rohan.julka@a3logics.in';\n $subject = 'FoxHopr: Group change request status';\n $template ='group_change_pending';\n $variable = array('name'=>$row['BusinessOwner']['fname'] . \" \" . $row['BusinessOwner']['lname']);\n $success = $emailLib->sendEmail($to,$subject,$variable,$template,'both');\n }\n }\n }\n }", "title": "" }, { "docid": "bf2678bcc3c780d07d0980a61ef8d20d", "score": "0.56779945", "text": "function get_notifications($profile_id=0){\n\tglobal $mysqli;\n\n\t\t$query=\"SELECT * FROM event_invitees WHERE profile_id=\".$profile_id;\n\t\t$notifications=array();\n\t\t$result=$mysqli->query($query);\n\t\twhile($row=$result->fetch_assoc())\n\t\t{\n\t\t\t\n\t\t\t$response['notification_type']='event';\n\t\t\t$response['notification_status']=$row['accepted'];\n\t\t\t$response['notification_id']=$row['invitation_id'];\n\t\t\t$response['notification_datetime']=$row['created'];\n\n\t\t\t$sql_notifier=\"SELECT * FROM events WHERE event_id=\".$row['event_id'];\n\t\t\t$res_notifier=$mysqli->query($sql_notifier);\n\t\t\t$row_notifier=$res_notifier->fetch_assoc();\n\t\t\t$response['notification_by']=$row_notifier['event_createdby'];\n\t\t\t$sql_getprofile=\"SELECT * FROM profiles WHERE profile_id=\".$response['notification_by'];\n\t\t\t$res_getprofile=$mysqli->query($sql_getprofile);\n\t\t\t$row_getprofile=$res_getprofile->fetch_assoc();\n\t\t\t$response['notifier_profile_name']=$row_getprofile['profile_name'];\n\t\t\t$response['notifier_thumbnail']=$row_getprofile['profile_thumbnail'];\n\t\t\t$response['notification_title']=$row_notifier['event_title'];\n\t\t\t$response['event_details']=$row_notifier;\n\t\t\tarray_push($notifications, $response);\n\t\t\t//echo $row['event_id'];\n\t\t}\n\t\t$query2=\"SELECT * FROM friends2 WHERE profile2_id=\".$profile_id;\n\t\t$result2=$mysqli->query($query2);\n\t\twhile($row2=$result2->fetch_assoc())\n\t\t{\n\t\t\t$response2['notification_type']='friend';\n\t\t\t$response2['notification_status']=$row2['status'];\n\t\t\t$response2['notification_by']=$row2['profile1_id'];\n\t\t\t$sql_getprofile2=\"SELECT * FROM profiles WHERE profile_id=\".$response2['notification_by'];\n\t\t\t$res_getprofile2=$mysqli->query($sql_getprofile2);\n\t\t\t$row_getprofile2=$res_getprofile2->fetch_assoc();\n\t\t\t$response2['notifier_profile_name']=$row_getprofile2['profile_name'];\n\t\t\t$response2['notifier_thumbnail']=$row_getprofile2['profile_thumbnail'];\n\t\t\t$response2['notification_title']='New Friend Request';\n\t\t\tarray_push($notifications, $response2);\n\t\t\t//echo $row['event_id'];\n\t\t}\n\n\t\theader('Content-Type: application/json');\n\t\techo json_encode($notifications, JSON_UNESCAPED_SLASHES);\n}", "title": "" }, { "docid": "c68b95d929704e93d49ff23ba22f0725", "score": "0.5667366", "text": "public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }", "title": "" }, { "docid": "24d3f33105c97839dca890e5570f05d8", "score": "0.56469476", "text": "public function on_all_status_transitions( $new_status, $old_status, $post ){\n\t\tif ( $new_status != $old_status ) {\n\t\t\tif( $new_status == 'pending' ) {\n\t\t\t\t$result = $this->post_to_discord( 'Pending: ' . $post->post_title . ' -- ' . get_edit_post_link( $post->ID, '&' ) );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d9aa387b250629e1a710c0cb84f97006", "score": "0.5639933", "text": "public function getUpdated();", "title": "" }, { "docid": "d9aa387b250629e1a710c0cb84f97006", "score": "0.5639933", "text": "public function getUpdated();", "title": "" }, { "docid": "5ef1aa26dc862481597d277f53c99bcd", "score": "0.5633387", "text": "public function listEvents()\n\t{\n\n\t\t$table=CaseItemModel::getInstance()->getTable();\n $pTable=ProcessModel::getInstance()->getTable();\n $piTable=ProcessItemModel::getInstance()->getTable();\n \n\t\t$status =\"status not in ('Complete','Terminated') \";\n \n\t\t$sql=\"select 'Case Item' as source,id,null as processName, processNodeId,caseId,type,subType,label,timer,timerDue,message,signalName \"\n . \" from $table \"\n . \" where $status\"\n .\" and subType in('timer','message','signal')\";\n\t\t$arr1= $this->db->select($sql);\n\n\t\t$sql=\"select 'Process Item' as source ,p.processName as processName, pi.id as id,pi.processNodeId,null as caseId,pi.type,subType,label,timer,timerDue,message,signalName \"\n . \" from $piTable pi\n join $pTable p on p.processId=pi.processId\n where subType in('timer','message','signal')\";\n \n \n\t\t$arr2= $this->db->select($sql);\n\t\t$results= array_merge($arr1,$arr2);\n\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "2fbfdd0eeeb2a8410e4c261eaa0eedf9", "score": "0.5630141", "text": "function getCurrentEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime < CURRENT_DATE && event_complete != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "ab15c2ec47515a1cd6858117dc0f510f", "score": "0.56260914", "text": "function printNewRequests() {\r\n $criteria = array('status' => Appeal::$STATUS_NEW);\r\n return printAppealList($criteria);\r\n}", "title": "" }, { "docid": "41aa412f7c452c818a39d7eeae992b96", "score": "0.5620924", "text": "function getLastCheckinList($minutes, $eventId)\r\n{\r\n $response = array('ok' => false, 'msg' => \"Undefined error\");\r\n \r\n $sqlCon = openDatabase();\r\n \r\n $query = \"SELECT eventcheckin.checkin_time, eventcheckin.checked_in, \" .\r\n \"attendees.user_id, attendees.firstname, attendees.lastname, attendees.email \" .\r\n \"FROM \".DB_SCHEMA.\".eventcheckin \" .\r\n \"JOIN \".DB_SCHEMA.\".attendees ON \" .\r\n \"eventcheckin.attendee_id = attendees.user_id \" .\r\n \"WHERE eventcheckin.event_id=\" . SQLE($eventId) . \r\n \" AND eventcheckin.checkin_time > date_sub( now( ) , INTERVAL \" . SQLE($minutes) . \" MINUTE ) \" .\r\n \" ORDER BY eventcheckin.checkin_time DESC;\";\r\n\r\n $list = array();\r\n $result = mysql_query($query);\r\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\r\n $list[] = $row;\r\n }\r\n $response = array('ok' => true, 'msg' => \"OK\", 'list' => $list);\r\n \r\n closeDatabase();\r\n \r\n return $response;\r\n}", "title": "" }, { "docid": "612a4a7b3aea426495ae5ef1522b99d7", "score": "0.5596961", "text": "public function getNotificationsCollection()\n {\n return Mage::getModel('kdcatalogupdates/log')->getCollection();\n }", "title": "" }, { "docid": "e52181cf399874494a35ee000128ac1e", "score": "0.5595261", "text": "function get_events_notification($start, $event_limit, $cond=array(), $count=false)\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\tif(!$count) {\r\n\t\t\t$query = 'select TL.*, TLE.event_title, TLE.event_icon \r\n\t\t\t\t\tfrom timeline TL \r\n\t\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\t\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\r\n\t\t\t\t\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\t\twhere TL.event_origin=TLE.origin '.$c_filter.' order by TL.origin desc limit '.$start.','.$event_limit;\r\n\t\t\treturn $this->CI->db->query($query)->result_array();\r\n\t\t} else {\r\n\t\t\t$query = 'select count(*) as total \r\n\t\t\t\tfrom timeline TL\r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\twhere TL.event_origin=TLE.origin '. $c_filter.' group by TL.origin';\r\n\t\t\t\treturn $this->CI->db->query($query)->row();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fc71acba9269fa38610d60ba0bf46df2", "score": "0.5593158", "text": "function getEvents() {\n\n $events = ['new' => __('New change'),\n 'update' => __('Update of a change'),\n 'solved' => __('Change solved'),\n 'validation' => __('Validation request'),\n 'validation_answer' => __('Validation request answer'),\n 'closed' => __('Closure of a change'),\n 'delete' => __('Deleting a change')];\n\n $events = array_merge($events, parent::getEvents());\n asort($events);\n return $events;\n }", "title": "" }, { "docid": "313015d0c4b8869a8d54ba75e14b0666", "score": "0.5561922", "text": "public function get_account_changes($userid, $lastemail) {\n// // - modified after last emailing\n// // - not older than addition of a subject\n// $this->db->where('users_watches_accounts.modified_on > ', $lastemail);\n// \n// $date_add_where = '(users_watches_accounts.date_end > users_watches.date_add '\n// . 'OR users_watches_accounts.date_start > users_watches.date_add)';\n// $this->db->where($date_add_where, '', false);\n\t\t\n\t\t// replace until line $this->db->where('users_watches.user_id', $userid); - ten uz nie\n\t\t$date_where = '(users_watches_accounts.date_end > \"'. $lastemail . '\" '\n\t\t\t. 'OR users_watches_accounts.date_start > \"'. $lastemail . '\")';\n\t\t\n\t\t$this->isirdb->where($date_where, '', false);\n\t\t\n\t\t$this->isirdb->where('users_watches.user_id', $userid);\n\t\t$this->isirdb->join('users_watches', 'users_watches.id = users_watches_accounts.user_watch_id');\n\t\t$this->isirdb->select('\n\t\t\tusers_watches_accounts.account AS account,\n\t\t\tusers_watches_accounts.date_start AS date_start,\n\t\t\tusers_watches_accounts.date_end AS date_end,\n\t\t\tusers_watches.official_name AS official_name,\n\t\t\tusers_watches.name AS name,\n\t\t\tusers_watches.ic AS ic,\n\t\t\tusers_watches.rc AS rc,\n\t\t\tusers_watches.id AS id');\n\t\t\n\t\t$result = $this->isirdb->get('users_watches_accounts')->result_array();\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b903b307c0bca72c84caf971812e7b02", "score": "0.5518713", "text": "public function getActiveStatusChanges($date)\n\t{\n\t\t$args = array();\n\t\t$disb_query = $this->application_query_builder->getFailedRedisbursementsQuery(\n\t\t\t$date,\n\t\t\t$this->config->getCompany(),\n\t\t\t$args\n\t\t);\n\n\t\t$disb_rs = DB_Util_1::queryPrepared($this->config->getConnection(), $disb_query, $args);\n\t\t$disb_apps = $this->data_builder->getApplicationData($disb_rs);\n\t\t\n\t\t$args = array();\n\t\t$inactive_query = $this->application_query_builder->getStatusChangesFromInactiveQuery(\n\t\t\t$date,\n\t\t\t$this->config->getCompany(),\n\t\t\t$args\n\t\t);\n\t\t$inactive_rs = DB_Util_1::queryPrepared($this->config->getConnection(), $inactive_query, $args);\n\t\t$inactive_apps = $this->data_builder->getApplicationData($inactive_rs);\n\n\t\treturn array_merge(\n\t\t\t$disb_apps,\n\t\t\t$inactive_apps\n\t\t);\n\t}", "title": "" }, { "docid": "ee8c04cab113472f2050ef87030c2af7", "score": "0.55175453", "text": "function getUpcomingEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime > CURRENT_DATE && archive != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.5515022", "text": "public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.5515022", "text": "public function getEvents();", "title": "" }, { "docid": "5a202967cc7cb2122c88f5f8509f9a6e", "score": "0.55111283", "text": "public function getChanges(array $context, $new)\n {\n $select = clone $this->_select;\n\n foreach ($this->_filter as $fieldName => $contextName) {\n if ($contextName instanceof \\Zend_Db_Expr) {\n $select->where($fieldName . ' = ?', $contextName);\n } elseif (null === $context[$contextName]) {\n $select->where($fieldName . ' IS NULL');\n } else {\n $select->where($fieldName . ' = ?', $context[$contextName]);\n }\n }\n\n $options = $this->db->fetchPairs($select);\n\n // \\MUtil_Echo::track($this->getEffecteds());\n $results = array();\n foreach ($this->getEffecteds() as $name => $settings) {\n foreach ($settings as $setting) {\n $results[$name][$setting] = $options;\n }\n }\n\n return $results;\n }", "title": "" }, { "docid": "21bccd649c1152a832b568b6797531b4", "score": "0.5508003", "text": "public function getUserEvents() {\n $user = Auth::user();\n $userEvents = $user->events()->get();\n $userEvents = $userEvents->concat(Event::where('leader_id', $user->id)->get());\n return Response(EventResource::collection($userEvents), 200);\n }", "title": "" }, { "docid": "9e3c0700bd36c46f903491334a29d63d", "score": "0.5486314", "text": "public function getRecurrentEvents(array $filters = array());", "title": "" }, { "docid": "796ac54f68af127da383ae567a7dbbb6", "score": "0.5482742", "text": "public function onRefreshEvents()\n {\n $startTime = post('startTime');\n $endTime = post('endTime');\n $timeZone = post('timeZone');\n\n $data = [\n 'startTime' => $startTime,\n 'endTime' => $endTime,\n 'timeZone' => $timeZone\n ];\n\n if ($this->isFilteredByDateRange()){\n $startTime = 0;\n $endTime = 0;\n }\n\n return Response::json($this->getRecords($startTime, $endTime));\n }", "title": "" }, { "docid": "438649867cf1511e495ef48ea945b03c", "score": "0.54772687", "text": "public function getFbChanges($oid){\n return $this->slc(\"changed\", \"feedback\", array(\"order_id\" => $oid));\n }", "title": "" }, { "docid": "3008f2509ec8d292f51b02d28df500f8", "score": "0.5463365", "text": "public function getEvents()\n {\n\n $cached = $this->getFromCache('events_cache');\n if ($cached !== null) {\n return $cached;\n }\n\n // Fetch past and future events (only upcoming contains the current event)\n $events = $this->client->getEvents(\n array(\n 'group_urlname' => $this->group,\n 'status' => 'past,upcoming',\n 'desc' => 'desc'\n )\n );\n\n // Filter out events further in the future than a day\n $dayFromNow = (time() + (24 * 60 * 60)) * 1000;\n $events = $events->filter(function($value) use ($dayFromNow) {\n return ($value['time'] < $dayFromNow)? true : false;\n });\n\n $this->saveInCache('events_cache', $events);\n\n return $events;\n }", "title": "" }, { "docid": "de7138a75123dbfe668dac52fbfe1dd2", "score": "0.54506916", "text": "public function get_event_status()\n {\n return array(0 => 'undefined'//, 1 => 'due for approval'\n ,2 => 'confirmed', 3 => 'cancelled'//, 4 => 'delegated'\n ,10 => 'tentative', 11 => 'needs-action'\n );\n }", "title": "" }, { "docid": "892ca89d0fc9e7f5452442e1b38e9891", "score": "0.5447151", "text": "public function getUpcomingEvents()\n {\n $now = date('Y-m-d');\n $joinTable = Versioned::get_stage() === Versioned::LIVE ? 'EventPage_Live' : 'EventPage';\n $events = EventDateTime::get()\n ->filter(['Event.ParentID' => $this->ID,])\n ->where(\"(\\\"StartDate\\\" >= '$now') OR (\\\"StartDate\\\" <= '$now' AND \\\"EndDate\\\" >= '$now')\")\n ->innerJoin($joinTable, \"\\\"$joinTable\\\".\\\"ID\\\" = \\\"EventDateTime\\\".\\\"EventID\\\"\");\n\n $this->extend('updateEvents', $events);\n\n return $events;\n }", "title": "" }, { "docid": "e8b2fe13bf41d90cbde5f9c815649050", "score": "0.54412955", "text": "function get_new_events( $options=array() ){\n\t\t\n\t\tglobal $gamo, $dbh;\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'start' => 0,\n\t\t\t\t'number' => 1\n\t\t\t),\n\t\t$options);\n\t\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC LIMIT \".$options['start'].\",\".$options['number'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tarray_push($vevents, $row);\n\n\t\t}\n\n\t\treturn $vevents;\n\t\t\n\t}", "title": "" }, { "docid": "61bf4b4c2fe5ed28e1987a093913952d", "score": "0.5439631", "text": "public function getAllByTask($task_id){\n $changes = $this->find('all', array(\n 'conditions'=>array(\n 'Change.task_id'=>$task_id),\n 'order'=>array(\n 'Change.created DESC')));\n return $changes; \n }", "title": "" }, { "docid": "7bc8ff9d762f37ae882c4aae9607c821", "score": "0.5432469", "text": "public function listEvent($userId){\n\t\t$this->db->select('name, id, CAST(status AS UNSIGNED) AS status');\n\t\t$this->db->from('event');\n\t\t$this->db->where('userId',$userId);\n\t\t$this->db->order_by('creationDate', 'DESC'); \n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "439ccfcae477f8a5b0c4cece2ab96bd0", "score": "0.54290295", "text": "function getAllRouteEventNotifications($user_id){\n\t\t\t\t\n\t\t$sql =\t\"select e.user_id,e.event_id,u.user_name as UserName,\n\t\t\t\t\tu.image as UserImage,e.event_name,e.event_type,e.description,\n\t\t\t\t\tef.status from `events` as e ,event_friends as ef\n\t\t\t\t\t\n\t\t\t\t\tleft join users as u on u.user_id = ef.user_id\n\t\t\t\t\twhere e.event_id = ef.event_id\n\t\t\t\t\t\n\t\t\t\t\tand ef.friend_id = '\".$user_id.\"' \n\t\t\t\t\t\n\t\t\t\t\tand (ef.status = 'start')\n\t\t\t\t\tgroup by e.event_id\n\t\t\t\t\torder by e.event_id desc limit 0,2\";\n\t\t\t\t\n\t\t\t\t\n\t\t$query = $this->db->query($sql);\t\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t\t\t\t\n\t}", "title": "" }, { "docid": "7aa376fac52d98be913c816fbfb37113", "score": "0.5425724", "text": "public function getEvents(){\n\t\t// prepares the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/event\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the reponse of the API\n\t\t$events = json_decode($output, true);\n\n\t\t// format the date\n\t\tforeach ($events as $key => $event) {\n\t\t\t$events[$key]['date'] = explode('T', $event['date'])[0];\n\t\t}\n\n\t\t// if the user is not connected or if he is a student, remove events which are not public\n\t\tif (!isset($_SESSION['status']) || $_SESSION['status'] == 'student'){\n\t\t\t$publicEvents = [];\n\t\t\t$eventNumber = sizeof($events);\n\t\t\tfor($i=0 ; $i < $eventNumber; $i++){\n\t\t\t\t$event = array_shift($events);\n\t\t\t\tif($event['is_public'] == 1){\n\t\t\t\t\tarray_push($publicEvents, $event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $publicEvents;\n\t\t}\n\n\t\t// return all events\n\t\treturn $events;\n\t}", "title": "" }, { "docid": "9c54f4b68a0f3a3885c71b8c2337ee23", "score": "0.54237294", "text": "public function displayHistory()\n\t\t\t{\n\t\t\t\t$data_arr = array();\n\t\t\t\t$inc = 0;\n\n\t\t\t\twhile($row = $this->fetchResultRecord())\n\t\t\t\t\t{\n\t\t\t\t\t\t$uDetails = $this->isMemberJoined($row['email']);\n\t\t\t\t\t\t$statusClass = '';\n\t\t\t\t\t\t$status = $this->LANG['invitation_history_email_status_not_joined'];\n\t\t\t\t\t\tif ($uDetails)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t$status = $this->LANG['invitation_history_email_status_joined'];\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t$data_arr[$inc]['date_added'] = $row['date_added'];\n\t\t\t\t\t\t$data_arr[$inc]['attempts'] = $row['attempts'];\n\t\t\t\t\t\t$data_arr[$inc]['email'] = $row['email'];\n\t\t\t\t\t\t$data_arr[$inc]['class'] = ($uDetails)?'clsJoined':'clsNotJoined';;\n\t\t\t\t\t\t$data_arr[$inc]['status'] = $status;\n\t\t\t\t\t\t$data_arr[$inc]['remind_url'] = getUrl('invitationhistory', '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start'], '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start']);\n\t\t\t\t\t\t$data_arr[$inc]['delete_url'] = getUrl('invitationhistory', '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start'], '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start']);\n\t\t\t\t\t\t$data_arr[$inc]['check_box_value'] = $row['invitation_id'];\n\t\t\t\t\t\t$inc++;\n\t\t\t\t\t}\n\t\t\t\treturn $data_arr;\n\t\t\t}", "title": "" }, { "docid": "e5f03062cc7ffa7cb82017fd70521cc0", "score": "0.5423034", "text": "function disable_active_event_notification($cond=array())\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\t$temp_query = '\tupdate user u1\r\n\t\t\t\t\tinner join user u2\r\n\t\t\t\t\ton u2.user_id = u1.user_id\r\n\t\t\t\t\tset u1.user_name = u2.email';\r\n\t\t\r\n\t\t$query = 'update timeline_event_user_map TEU1\r\n\t\t\t\tinner join timeline_event_user_map TEU2 on TEU2.origin = TEU1.origin\r\n\t\t\t\tJOIN timeline TL\r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU3 ON TEU3.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU3.user_id and TEU3.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\tset TEU1.viewed_datetime=\"'.db_current_datetime().'\"\r\n\t\t\t\twhere TEU3.viewed_datetime IS NULL AND TEU2.origin=TEU3.origin AND TL.event_origin=TLE.origin '.$c_filter.' ';\r\n\t\treturn $this->CI->db->query($query);\r\n\t}", "title": "" }, { "docid": "2f45b98d7101f4bf88dea2695ba84fc5", "score": "0.5419468", "text": "public function getAll(){\n //old : \n // $events = $this->events;\n // return $events;\n $repo = $this->om->getRepository(Event::class); \n return $repo->findAll();\n }", "title": "" }, { "docid": "ff30e564d96a76e7d663524424e010ce", "score": "0.5400968", "text": "public function fetchEvents()\n {\n // TODO: Implement fetchEvents() method.\n }", "title": "" }, { "docid": "5d78d2ee42f5fa9edbb4bdccc3b75203", "score": "0.54002", "text": "private function getOldTicketsList() {\r\n\t\t$sql = \"SELECT TOP 5 summary, TicketNbr, status_description AS status, \";\r\n\t\t$sql .= \"company_name, age, resource_list as resources \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"ORDER BY age desc\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['age'] = $row['age'];\r\n\t\t\t$r[$i]['resources'] = $row['resources'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "title": "" }, { "docid": "8d28c8676a77217b6b591e27e5dcc0d2", "score": "0.53971356", "text": "function getAdminEvents(){\r\n $response = array('ok' => false, 'msg' => \"Undefined error\");\r\n \r\n openDatabase();\r\n $adminId = getLoggedInAdminId();\r\n \r\n // Make sure we can retrieve user session's admin id\r\n if (!$adminId) {\r\n $response['ok'] = false;\r\n $response['msg'] = \"Failed to retrieve logged in user id\";\r\n }\r\n else {\r\n $query = sprintf(\"SELECT * from events WHERE admin_id=%s ORDER BY event_id ASC;\", $adminId);\r\n $result = mysql_query($query);\r\n\r\n $eventsArray = array();\r\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\r\n $eventsArray[] = $row;\r\n }\r\n \r\n $response['eventsArray'] = $eventsArray; \r\n $response['ok'] = true;\r\n $response['msg'] = \"OK\";\r\n }\r\n closeDatabase();\r\n \r\n return $response;\r\n}", "title": "" }, { "docid": "2acd68079bb9219066cf67315c0ce2be", "score": "0.5378306", "text": "public function event_history(/* ... */)\n {\n return $this->_event_history;\n }", "title": "" }, { "docid": "2e032258ce17587fb4a3b87d622fdd9d", "score": "0.53782415", "text": "public function getEventList() {\n $response = $this->client->get(\n $this->apiUrl . \"events\");\n return $response->json();\n }", "title": "" }, { "docid": "f1f0344503041e639c2a336ed3e6828c", "score": "0.537361", "text": "public function getChanges(array $context, $new)\n {\n $empty = $this->util->getTranslated()->getEmptyDropdownArray();\n $inputFieldName = reset($this->_dependentOn);\n $organizationId = $context[$inputFieldName];\n\n \\MUtil_Echo::track($organizationId);\n\n if ($organizationId) {\n $tracks = $this->loader->getUtil()->getTrackData()->getTracksForOrgs([$organizationId => $organizationId]);\n foreach($this->_effecteds as $effectedField=>$effectedData) {\n foreach($effectedData as $type) {\n $output[$effectedField][$type] = $empty + $tracks;\n }\n }\n return $output;\n }\n }", "title": "" }, { "docid": "7562cb62866d8f4d61a9c2f679b46979", "score": "0.53729236", "text": "public function get_all_events()\n {\n // get today date for check past events or not\n $todayData = date(\"m/d/Y\");\n // get option from database\n $past_events_option = get_option('past_events');\n // preparing sql query\n $sql = \"SELECT * FROM $this->tableName \";\n if ($past_events_option != 'yes') {\n $sql .= \"WHERE `date` >= \" . $todayData;\n }\n global $wpdb;\n $allevents = $wpdb->get_results($sql);\n return $allevents;\n }", "title": "" }, { "docid": "f6d19e091b07b4e3e94f4029b07fbe6b", "score": "0.536159", "text": "public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }", "title": "" }, { "docid": "b4d1a0e5c518cd25aa3e7e611a0a0661", "score": "0.53550774", "text": "function getAllPendingEmailData($id){\n\t\t\t$this->db->select('ticked_id,subject,isCreated,fromEmailId',false);\n\t\t\t$this->db->from('helpdesk_ticked_records as htr');\t\t\n\t\t\t$this->db->where('htr.teamId',$id);\t\n\t\t\t$where = '(status=\"1\" or status=\"2\" or status=\"3\")';\n\t\t\t$this->db->where($where);\t\t \t\t\t \n\t\t\t$result = $this->db->get()->result_array();\t\t\t\n\t\t\treturn $result; \n\t }", "title": "" }, { "docid": "3cec38af29dd4e75091971ec86196d5e", "score": "0.53546435", "text": "public function getOtherEvents();", "title": "" }, { "docid": "2fc87d8d9a3618f440542d4884489945", "score": "0.53449064", "text": "function updateStatus($order, $newStatus) {\n $data = [];\n switch ($newStatus) {\n case 2: #processed\n $event = new OrderWasProcessed($order);\n $data['processed_on'] = Carbon::now();\n break;\n\n case 4: #traveling\n $event = new OrderShippedOn($order);\n $data['shipped_on'] = Carbon::now();\n $data['expected_delivery_on'] = Carbon::now()->addDay();\n break;\n\n case 5: #delivered\n $event = new OrderWasDelivered($order);\n $data['delivered_on'] = Carbon::now();\n break;\n }\n\n if (isset($event) && $event) {\n event($event);\n }\n\n return $data;\n}", "title": "" }, { "docid": "968fa31ab19d1f2cb99299af9b30d2d0", "score": "0.5343663", "text": "public function getEvents()\n {\n $startDate = new \\DateTime(\"-1 months\");\n $endDate = new \\DateTime(\"+3 months\");\n\n $repo = EntityUtils::getRepository(\"EventLegacy\");\n\n //Use a different function for getting events for a student\n if ($this->user_context->isStudent()) {\n return $this->getStudentEvents($startDate, $endDate);\n }\n\n $eventResults = $repo->getStudentEventsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n $quickAddResults = $repo->getStudentQuickAddShiftsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n\n return ['events' => $eventResults, 'quick_add_shifts' => $quickAddResults];\n }", "title": "" }, { "docid": "9ddd301b1fdbafe2123ea8962eb93e22", "score": "0.53342885", "text": "public function getTimeEventsList(){\n return $this->_get(8);\n }", "title": "" }, { "docid": "d0b163b9556042647756978620deea74", "score": "0.5333301", "text": "public function getChange();", "title": "" }, { "docid": "6d04dad6bb065f74039c4721b47b1a33", "score": "0.533169", "text": "protected function getHistoryWith($args) {\n\n if ($args['ent_pas_email'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n $pageNum = (int) $args['ent_page'];\n\n if ($args['ent_page'] == '')\n $pageNum = 1;\n\n $lowerLimit = ($this->historyPageSize * $pageNum) - $this->historyPageSize;\n $upperLimit = $this->historyPageSize * $pageNum;\n\n $selectAppntsQry = \"select a.remarks,a.appointment_dt from appointment a,slave p \";\n $selectAppntsQry .= \"where a.slave_id = p.slave_id and a.mas_id = '\" . $this->User['entityId'] . \"' and p.email = '\" . $args['ent_pas_email'] . \"' \";\n $selectAppntsQry .= \"limit $lowerLimit,$upperLimit\";\n\n $selectAppntsRes = mysql_query($selectAppntsQry, $this->db->conn);\n\n if (mysql_num_rows($selectAppntsRes) <= 0)\n return $this->_getStatusMessage(32, 12);\n\n $data = array();\n\n while ($details = mysql_fetch_assoc($selectAppntsRes)) {\n $data[] = array('apptDt' => $details['appointment_dt'], 'remarks' => $details['remarks']);\n }\n\n $errMsgArr = $this->_getStatusMessage(33, 2);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'history' => $data);\n }", "title": "" }, { "docid": "0dbb8e6b6393c3bd750a3bc6e72e9a0e", "score": "0.5328096", "text": "public function getEvents(){\n\t\t$events = Event::where('owner', Auth::user()->id)->where('deleted', 0)->get();\n\t\treturn response()->json(['data' => $events]);\n\t}", "title": "" }, { "docid": "87806c6cfc3a5817663caff27eca043b", "score": "0.53221697", "text": "public function getFollowUpEvents($notification)\n {\n $couponsTable = CouponsTable::getTableName();\n $eventsTable = EventsTable::getTableName();\n $eventsPeriodsTable = EventsPeriodsTable::getTableName();\n $customerBookingsEventsPeriods = CustomerBookingsToEventsPeriodsTable::getTableName();\n $eventsProvidersTable = EventsProvidersTable::getTableName();\n $paymentsTable = PaymentsTable::getTableName();\n\n try {\n $notificationType = $notification->getType()->getValue();\n\n $statement = $this->connection->query(\n \"SELECT\n e.id AS event_id,\n e.name AS event_name,\n e.status AS event_status,\n e.bookingOpens AS event_bookingOpens,\n e.bookingCloses AS event_bookingCloses,\n e.recurringCycle AS event_recurringCycle,\n e.recurringOrder AS event_recurringOrder,\n e.recurringUntil AS event_recurringUntil,\n e.maxCapacity AS event_maxCapacity,\n e.price AS event_price,\n e.description AS event_description,\n e.color AS event_color,\n e.show AS event_show,\n e.locationId AS event_locationId,\n e.customLocation AS event_customLocation,\n e.parentId AS event_parentId,\n e.created AS event_created,\n e.notifyParticipants AS event_notifyParticipants,\n e.deposit AS event_deposit,\n e.depositPayment AS event_depositPayment,\n e.depositPerPerson AS event_depositPerPerson,\n \n \n ep.id AS event_periodId,\n ep.periodStart AS event_periodStart,\n ep.periodEnd AS event_periodEnd,\n \n cb.id AS booking_id,\n cb.customerId AS booking_customerId,\n cb.status AS booking_status,\n cb.price AS booking_price,\n cb.info AS booking_info,\n cb.utcOffset AS booking_utcOffset,\n cb.aggregatedPrice AS booking_aggregatedPrice,\n cb.persons AS booking_persons,\n \n p.id AS payment_id,\n p.amount AS payment_amount,\n p.dateTime AS payment_dateTime,\n p.status AS payment_status,\n p.gateway AS payment_gateway,\n p.gatewayTitle AS payment_gatewayTitle,\n p.data AS payment_data,\n \n c.id AS coupon_id,\n c.code AS coupon_code,\n c.discount AS coupon_discount,\n c.deduction AS coupon_deduction,\n c.limit AS coupon_limit,\n c.customerLimit AS coupon_customerLimit,\n c.status AS coupon_status\n FROM {$eventsTable} e\n INNER JOIN {$eventsPeriodsTable} ep ON ep.eventId = e.id\n INNER JOIN {$customerBookingsEventsPeriods} cbe ON cbe.eventPeriodId = ep.id\n INNER JOIN {$this->bookingsTable} cb ON cb.id = cbe.customerBookingId\n LEFT JOIN {$paymentsTable} p ON p.customerBookingId = cb.id\n LEFT JOIN {$couponsTable} c ON c.id = cb.couponId\n LEFT JOIN {$eventsProvidersTable} epr ON epr.eventId = e.id\n LEFT JOIN {$this->usersTable} pu ON pu.id = epr.userId\n WHERE e.notifyParticipants = 1 \n AND cb.status = 'approved' \n AND e.id NOT IN (\n SELECT nl.eventId \n FROM {$this->table} nl \n INNER JOIN {$this->notificationsTable} n ON nl.notificationId = n.id \n WHERE n.name = 'customer_event_follow_up' \n AND n.type = '{$notificationType}'\n )\"\n );\n\n $rows = $statement->fetchAll();\n } catch (\\Exception $e) {\n throw new QueryExecutionException('Unable to find events in ' . __CLASS__, $e->getCode(), $e);\n }\n\n return EventFactory::createCollection($rows);\n }", "title": "" }, { "docid": "5496d1bfcfeb0b05f677debdf90ee92c", "score": "0.53145677", "text": "public function readNewMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from Members, MemberStatus where members.MemberID = memberstatus.MemberID and StatusCode = \"A\" and DateNew = CURDATE()');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }", "title": "" }, { "docid": "b9e1d4125921728018d4a497e28c4f96", "score": "0.53049886", "text": "function hookAjaxGetEvents() {\n\n\t \t$start = intval($_POST['start']);\n\t \t$end = intval($_POST['end']);\n\n\t \t$args['datefrom'] = $start;\n\t \t$args['dateto'] = $end;\n\t \t$args['datemode'] = FSE_DATE_MODE_ALL;\n\t \t$args['number'] = 0; // Do not limit!\n\n\t \tif (isset($_POST['state']))\n\t \t$args['state'] = $_POST['state'];\n\t \tif (isset($_POST['author']))\n\t \t$args['author'] = $_POST['author'];\n\t \tif (isset($_POST['categories']))\n\t \t$args['categories'] = $_POST['categories'];\n\t \tif (isset($_POST['include']))\n\t \t$args['include'] = $_POST['include'];\n\t \tif (isset($_POST['exclude']))\n\t \t$args['exclude'] = $_POST['exclude'];\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t// Process array of events\n\t \t$events_out = array();\n\t \tforeach($events as $evt) {\n\t \t\tunset($e);\n\t \t\t$e['id'] = $evt->eventid;\n\t \t\t$e['post_id'] = $evt->postid;\n\t \t\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\n\t \t\t$e['title'] = $evt->subject;\n\t \t\t$e['allDay'] = ($evt->allday == true ? true : false);\n\t \t\t$e['start'] = mysql2date('c', $evt->from);\n\t \t\t$e['end'] = mysql2date('c', $evt->to);\n\t \t\t$e['editable'] = false;\n\n\t \t\t$classes = array();\n\t \t\tforeach($evt->categories as $c) {\n\t \t\t\t$classes[] = 'category-'.$c;\n\t \t\t}\n\t \t\tif (count($classes) > 0) {\n\t \t\t\t$e['className'] = $classes;\n\t \t\t}\n\t \t\t\n\t \t\t$events_out[] = $e;\n\t \t}\n\n\t \t$response = json_encode($events_out);\n\n\t \theader(\"Content-Type: application/json\");\n\t \techo $response;\n\n\t \texit;\n\t }", "title": "" }, { "docid": "57a9e2ddb7158771c2bc2f1cdf610b5b", "score": "0.5302713", "text": "private function emailChanges(){\n $emails = $this->getAdminEmails(get_option('notification_users'));\n $custom_email = get_option('notification_email');\n\n if(isset($custom_email['email_add']) && !empty($custom_email['email_add']))\n $emails[] = $custom_email['email_add'];\n\n if(!$emails){\n $emails = get_bloginfo('admin_email');\n }\n\n $message = \" Changed Files(\".count($this->md5_changed_output).\"):\\n\";\n $changes = $this->order_changed_log();\n $files = 0;\n foreach($changes as $ext => $log_type){\n $message .= \"\\nFile Type (\".$ext.\"): \\n\";\n foreach($log_type as $k => $v){\n $files++;\n $message .= $v['real_path'].' => '.$v['modified']. \"\\n\";\n }\n }\n\n wp_mail( $emails, 'WP-Checksum File Modifications: '.$files, $message, '', array(MD5_HASHER_DIR.$this->file_change));\n }", "title": "" }, { "docid": "70f99c272aec4f7c3e9aea559ed9cf13", "score": "0.5301871", "text": "public function AddEditStatusCode(){\n\t\ttry{\n\t\t\tif(isset($this->getData['emailstatus'])){\n\t\t\t\t\tif($this->getData['emailstatus'] == '0' && isset($this->getData['new_notification_name']) && $this->getData['new_notification_name'] != ''){\n\t\t\t\t\t\t$inserted = $this->_db->insert(MAIL_NOTIFY_TYPES,array('notification_name' => $this->getData['new_notification_name'],'notification_staus' => $this->getData['notification_sta'],'admin_display'=>'1','templatecategory_id'=>3));\n\t\t\t\t\t\t$this->getData['notification_id'] = ($inserted)?$this->_db->lastInsertId():'0';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tunset($this->getData['notification_id']);\n\t\t\t\t}\n\t\t\tif(isset($this->getData['mode']) && $this->getData['mode'] == 'add'){\n\t\t\t\treturn ($this->insertInToTable(STATUS_MASTER,array($this->getData))) ? TRUE : FALSE;\n\t\t\t}else{\n\t\t\t\t$where = 'master_id ='.Zend_Encript_Encription:: decode($this->getData['token']);\n\t\t\t\t$this->getData['modify_by'] = $this->Useconfig['user_id'];\n\t\t\t\t$this->getData['modify_ip'] = commonfunction::loggedinIP();\n\t\t\t\t$this->getData['modify_date'] = '';\n\t\t\t\treturn ($this->UpdateInToTable(STATUS_MASTER,array($this->getData),$where)) ? TRUE : FALSE;\n\t\t\t}\n\t\t}catch (Exception $e) {\n\t\t\t\t $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\t\t}\n }", "title": "" }, { "docid": "7c5fbb9219c27190ef3c6e08cac453dc", "score": "0.52981585", "text": "public function taskhistory(){\n\n // SQL statement\n $sql = \"SELECT user_id FROM user WHERE user_name = '\".$_SESSION['user'].\"'\";\n $result = $this->con->query($sql);\n $result = $result->fetch_assoc();\n $id = $result['user_id'];\n\n\n // Get Task History Based on user ID\n\n // SQL statement\n $sql = \"SELECT * FROM approval WHERE user_id = '\".$id.\"' ORDER BY date DESC LIMIT 10\";\n $result = $this->con->query($sql);\n if ($result->num_rows > 0){\n while ($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }\n }", "title": "" }, { "docid": "30bb550c3c18511ded63a7b771afa708", "score": "0.5285222", "text": "public function getEvents()\n {\n return json_decode((string) $this->response->getBody())->events;\n }", "title": "" }, { "docid": "e6e44e4e531f04f10ece0a4f31e662dc", "score": "0.5283579", "text": "public function sendStatusUpdateNotifications(OrderEvent $event)\n {\n $order = $event->getOrder();\n switch ($order->getStatus()) {\n\n case Order::STATUS_AWAITING_SEPA:\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_AWAITING_SEPA,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_NEW:\n // get payment\n $payment = $order->getPayments()->first();\n\n // is transport\n $isTransport = true;\n if (Shipping::TYPE_NOT_SHIPPED === $order->getShippingType()) {\n $isTransport = false;\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'invoiceUrl' => $this->router->generate('order_invoice_download', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $payment->getChargeId(),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'BoolTransport' => $isTransport,\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'expectedDeliveryDate' => null !== $order->getExpectedDeliveryDate() ? $order->getExpectedDeliveryDate()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y') : '',\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'BoolTransport' => $isTransport,\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'shippingLimitDate' => null !== $order->getShouldBeReadyAt() ? $order->getShouldBeReadyAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y') . ' avant 17h' : '',\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n\n case Order::STATUS_CANCELED:\n // order has been canceled by the customer\n if (OrderEvent::ORIGIN_CUSTOMER === $event->getOrigin()) {\n\n // get order payment id\n $paymentId = 'n/a';\n $payments = $order->getPayments();\n if (0 < count($payments)) {\n /** @var Payment $payment */\n $payment = $payments[0];\n $paymentId = $payment->getChargeId();\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $paymentId,\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n }\n break;\n\n case Order::STATUS_TRANSIT:\n\n // get shipment\n $shipments = $order->getShipments();\n /** @var Shipment $shipment */\n $shipment = $shipments[0];\n\n // send customer e-mail\n $emailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'trackingUrl' => $shipment->getTrackingUrl(),\n 'trackingNumber' => $shipment->getParcelNumber(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_SHIPPED,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $emailVars\n );\n\n break;\n\n case Order::STATUS_READY_FOR_PICKUP:\n\n // send customer e-mail\n $emailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_READY_FOR_PICKUP,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $emailVars\n );\n\n break;\n\n case Order::STATUS_REFUNDED:\n\n // get order payment id\n $paymentId = 'n/a';\n $payments = $order->getPayments();\n if (0 < count($payments)) {\n /** @var Payment $payment */\n $payment = $payments[0];\n $paymentId = $payment->getChargeId();\n }\n\n // get order refund id\n $refundId = 'n/a';\n $refunds = $order->getRefunds();\n if (0 < count($refunds)) {\n /** @var Refund $refund */\n $refund = $refunds[0];\n $refundId = $refund->getRefundId();\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $paymentId,\n 'refundId' => $refundId,\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_REFUNDED,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_DELIVERED:\n\n // send customer e-mail\n /* There is no longer any immediate notification sending when the order is delivered. The notification is made on D + 1 via the reminder system\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n //'ratingUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL) . '#rating'\n 'ratingUrl' => $this->router->generate('order_rating', array('token' => $order->getToken()), $this->router::ABSOLUTE_URL) . '#rating'\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_RATING,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n */\n break;\n\n case Order::STATUS_CLOSED:\n\n if ($order->getRating()->getEnabled() == True ) {\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'orderRateValue' => $order->getRating()->getRate(),\n 'orderRateValue' => $order->getRating()->getComment(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_RATE,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n }\n break;\n\n\n\n\n case Order::STATUS_FILE_AVAILABLE:\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_AVAILABLE_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_FILE_REJECTED:\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_REJECTED_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n\n case Order::STATUS_FILE_VALIDATED:\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'BoolTransport' => $order->getQuotation()->getProject()->getType()->isShipping(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_VALIDATED_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n }\n }", "title": "" }, { "docid": "8f8f72633f1eace62dff3089066a2a4c", "score": "0.52754956", "text": "public function viewNewEvents()\n {\n $this->load->model('M_Event_table');\n $this->load->model('M_Customer_table');\n $events = $this->M_Event_table->getNewEvents();\n $customers = $this->M_Customer_table->getAllCustomers();\n\n $returnData['newEventsMore']= $events;\n $returnData['customers'] = $customers;\n\n $this->load->view('admin/viewNewEvents',$returnData);\n }", "title": "" }, { "docid": "b17a067b3c982e8e9fd93d655dbcd1bb", "score": "0.52652997", "text": "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "title": "" }, { "docid": "5fa237c2f07eb91b11f7d54fea307fec", "score": "0.5264332", "text": "function get_all_events(){\n global $database_ged;\n $events = array();\n $sql = \"SELECT id FROM nagios_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":nagios\");\n }\n $result = null;\n $sql = \"SELECT id FROM snmptrap_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":snmptrap\");\n }\n\n return $events;\n}", "title": "" }, { "docid": "598871ab9f2dd16e89e1bf530471cea7", "score": "0.5257694", "text": "protected function getChangedRemoteObjects()\n {\n $query = $this->getRemoteObjectsQuery();\n $table = $this->getRemoteBaseTable();\n $query->addWhere(\"\\\"{$table}\\\".\\\"_ImportedID\\\" > 0\");\n $query->addWhereAny(array(\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" IS NULL\",\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" < \\\"{$table}\\\".\\\"LastEdited\\\"\"\n ));\n $items = iterator_to_array($this->task->query($query));\n return new ArrayList($items);\n }", "title": "" }, { "docid": "141d51cff33be87ca2832d7424f8d4fa", "score": "0.52539617", "text": "function ef_notifications_get($transition = NULL, $rid = NULL) {\n $emails = array();\n $query = db_select('ef_notifications_emails', 'wve')\n ->fields('wve', array('rid', 'from_name', 'to_name', 'subject', 'message'));\n if ($transition) {\n $query->condition('wve.from_name', $transition->from_name);\n $query->condition('wve.to_name', $transition->to_name);\n }\n if ($rid) {\n $query->condition('wve.rid', $rid);\n }\n $result = $query->execute();\n foreach ($result as $row) {\n $emails[$row->from_name . '_to_' . $row->to_name][$row->rid] = $row;\n }\n return $emails;\n}", "title": "" }, { "docid": "baee53a61ad0e70ad7a214b096156c0b", "score": "0.5248705", "text": "abstract public static function getStatuses();", "title": "" }, { "docid": "a7cc08b83b3330eaf861a29face3e1f1", "score": "0.52453005", "text": "public function getWhoToNotifyByEmail()\n\t{\n\t\t//return array\n\t\t$group = Group::model()->findByPk($this->groupId);\n\t\t$emails = $group->getMembersByStatus(User::STATUS_ACTIVE);\n\t\treturn $emails->data;\n\t}", "title": "" }, { "docid": "3fe85f6d0765e83640fbb0ee2bcc5762", "score": "0.5243674", "text": "public function past_events()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n\n $allRsvps = $this->Event->EventsUser->find('all');\n $this->set('rsvps', $allRsvps);\n\n $this->EventHelper();\n\n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "title": "" }, { "docid": "8825e264da7b9b367f960c35d6adcca7", "score": "0.52436244", "text": "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "title": "" }, { "docid": "6d5c1297dca14849af4d11a9779624bd", "score": "0.52364635", "text": "public function Upcoming() {\n return $this->get_all_events( 'start_date', 'ASC', true );\n }", "title": "" }, { "docid": "391d857bc5797044dc6e02cbb799bdde", "score": "0.5233952", "text": "public function getEvents() { return $this->_events; }", "title": "" }, { "docid": "f4620b4080a9b067f3f0d43441d09398", "score": "0.52312607", "text": "public function getBorrowReminderLost() {\n $dataReminder = DB::table('settings')->where('name', 'daylost')->select('content')->get()[0];\n $fromDate = new Carbon('now');\n\n\n $data = Borrow::where('status', '=', '20')->where( 'ngaydaohan', '<=', $fromDate->toDateTimeString())->orderBy('ngaydaohan', 'asc')->get();\n if (count($data)) {\n foreach ($data as $record) {\n $toDate = Carbon::parse($record['ngaydaohan'])->addDays($dataReminder->content);\n $dataAdd['dateLost'] = $toDate->toDateTimeString();\n $userObj = User::where('id', $record->uid)->first();\n\n emailSend($record, $userObj['email'], 'Email Reminder ' .$userObj['username'] .' - '.$toDate->toDateTimeString(), 'REMINDER_LOST', $dataAdd);\n\n // update - neu da send email reminder => cap nhat trang thai cua khoan vay la da reminder lan 1 => status = 20\n Borrow::where('id', $record->id)->update(array('status'=> '30'));\n }\n } else {\n echo 'No data';\n }\n }", "title": "" }, { "docid": "31403dfaf79cadf166e45ad82f950328", "score": "0.52293193", "text": "function getPastEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE endtime < CURRENT_DATE AND archive != 1 ORDER BY starttime DESC\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "ad495e3ac20afb26cbf2d75f8e8e8774", "score": "0.5229228", "text": "public function actionUpdateAllNews(){\n\t\t// UPDATE `customer` SET `status` = 1 WHERE `email` LIKE `%@example.com%`\n\t\t$update = NotificationsReaders::updateAll(\n\t\t\t[\n\t\t\t\t'alreadyread' => NotificationsReaders::STATUS_READ\n\t\t\t],\n\t\t\t[\n\t\t\t\t'like', 'id_user', Yii::$app->user->id\n\t\t\t]\n\t\t);\n\n\t\tYii::$app->response->format = Response::FORMAT_JSON;\n\t\treturn ['success'=>true,'response'=>$update];\n\t}", "title": "" }, { "docid": "ed0bac56f2385b8ec81683cf7e277a16", "score": "0.5225388", "text": "public function getOldMessages(Request $request)\n {\n if(!$request->old_message_id || !$request->to_user)\n return;\n \n $message = Message::find($request->old_message_id);\n\n //return $message->created_at;\n \n $lastMessages = Message::where(function($query) use ($request, $message) {\n $query->where('MessageSenderId', Auth::user()->id)\n ->where('MessageReceiverId', $request->to_user)\n ->where('created_at', '<=', $message->created_at)\n ->where('id', '<', $message->id);\n })\n ->orWhere(function ($query) use ($request, $message) {\n $query->where('MessageSenderId', $request->to_user)\n ->where('MessageReceiverId', Auth::user()->id)\n ->where('created_at', '<=', $message->created_at)\n ->where('id', '<', $message->id);\n })->orderBy('id', 'DESC')->get();\n\n //return $lastMessages;\n \n $return = [];\n \n if($lastMessages->count() > 0) {\n \n foreach ($lastMessages as $message) {\n $message->time = Carbon::parse($message->created_at)->diffForHumans();\n $return[] = view('users/message-line')->with('message', $message)->render();\n }\n \n PusherFactory::make()->trigger('chat', 'oldMsgs', ['to_user' => $request->to_user, 'data' => $return]);\n }\n \n return response()->json(['state' => 1, 'data' => $return]);\n }", "title": "" }, { "docid": "f6d6674d1efbb9584437f65c94945692", "score": "0.5223696", "text": "public function getModified(Request $request)\n {\n $evento = Event::find($request->idevento);\n $evento->descripcion = $request->descripcion;\n $evento->save();\n if($request->tutor_on)\n {\n $usuarios = User::where('type', '=', 'Tutor')->get();\n foreach($usuarios as $usuario)\n {\n $nuevo_evento = new Event;\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\n $nuevo_evento->start = $evento->start;\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\n $nuevo_evento->borderColor = $evento->borderColor;\n $nuevo_evento->allDay = $evento->allDay;\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\n $nuevo_evento->descripcion = $evento->descripcion;\n $nuevo_evento->user_id = $usuario->id;\n $nuevo_evento->save();\n }\n }\n if($request->cursante_on)\n {\n $usuarios = User::where('type', '=', 'Cursante')->get();\n foreach($usuarios as $usuario)\n {\n $nuevo_evento = new Event;\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\n $nuevo_evento->start = $evento->start;\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\n $nuevo_evento->borderColor = $evento->borderColor;\n $nuevo_evento->allDay = $evento->allDay;\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\n $nuevo_evento->descripcion = $evento->descripcion;\n $nuevo_evento->user_id = $usuario->id;\n $nuevo_evento->save();\n }\n }\n if($request->tutor != \"\")\n {\n $usuario = User::find($request->idtutor);\n $nombre = $usuario->first_name.' '.$usuario->father_last_name;\n if($nombre == $request->tutor)\n {\n $nuevo_evento = new Event;\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\n $nuevo_evento->start = $evento->start;\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\n $nuevo_evento->borderColor = $evento->borderColor;\n $nuevo_evento->allDay = $evento->allDay;\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\n $nuevo_evento->descripcion = $evento->descripcion;\n $nuevo_evento->user_id = $usuario->id;\n $nuevo_evento->save();\n }\n }\n return redirect('calendar/calendar');\n }", "title": "" }, { "docid": "df09177357811a78bce835ab5e687f9d", "score": "0.52228683", "text": "public function sendUserStatusChangeNotificationEmailDataProvider()\n {\n return [\n [1, 'getActivateCustomerTemplateId', 'customer/customer_change_status/email_activate_customer_template'],\n [0, 'getInactivateCustomerTemplateId', 'customer/customer_change_status/email_lock_customer_template']\n ];\n }", "title": "" }, { "docid": "219f3d22dda81b7dc748145b07f9882e", "score": "0.52125174", "text": "public function updateStatusRequest()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $items->getSelect()->group('store_id');\n if($items->getSize() >0 ){\n $data = $items->getData();\n\n foreach($data as $unit) { \n $storeId = $unit['store_id'];\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \n \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $collection->getSelect()\n ->where('created_at<INTERVAL -' . $day . ' DAY + \\'' . $now . '\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\n $item->save(); \n }\n }\n }\n }", "title": "" }, { "docid": "4af78b556444bc433433e4a49035a8f2", "score": "0.5208411", "text": "public function getStatusesList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "7bc0a98ddf3c5456c5eaf189eb35fda2", "score": "0.52069104", "text": "public function update_INVOICE_Change_Status_Completed(){\n $this->update_INVOICE_Change_Status_Ongoing();\n $dateToday=date_default_timezone_set(\"Y-m-d\");\n $strInsertQry=\"update sidhus_invoice set Status='Completed Events' where sidhus_invoice.eventDate < '\".$dateToday.\"'\";\n // $stmt = $this->con->prepare($strInsertQry);\n // $stmt->bind_param(\"sssssssssssiisssssiiiii\",$cust_fullname,$cust_address,$theme_name,$color_combo,$cust_mobileno,$cust_alternate_mobileno,$cust_emailId,$event_address,$event_pincode,$event_location,$event_landmark,$event_id,$subcat_id,$venue_type,$eventDate,$eventTime,$concept_type,$notes_or_Remarks,$transportation_Rate,$Tax_percentage,$Advance,$Total,$invoice_no);\n//return $strInsertQry;\n $stmt = $this->con->prepare($strInsertQry);\n // $stmt->bind_param(\"ss\", $newpassword, $username);\n $result = $stmt->execute();\n $stmt->close();\n return $result;// $num_affected_rows>=0;\n\n }", "title": "" } ]
389d103373214e3d89dbc0ff975de3bf
Magic method, searches for the key and returns its value. $value = $this>foo;
[ { "docid": "c94093d1b4b978db2665511774b66485", "score": "0.0", "text": "public function __get($key)\n {\n if (isset($this->$key)) {\n return $this->_data[$key];\n } else {\n throw new Exception('The variable \"'.$key.'\" is not set.');\n }\n }", "title": "" } ]
[ { "docid": "9a83e46ceaed1011ad999b524060b8e2", "score": "0.6433605", "text": "public function get($key) {}", "title": "" }, { "docid": "9a83e46ceaed1011ad999b524060b8e2", "score": "0.6433605", "text": "public function get($key) {}", "title": "" }, { "docid": "c2adf493aac0d84385a82e0403ecece7", "score": "0.642471", "text": "function get($key);", "title": "" }, { "docid": "c2adf493aac0d84385a82e0403ecece7", "score": "0.642471", "text": "function get($key);", "title": "" }, { "docid": "26a235ad5041955bdca5cad00d0238bf", "score": "0.6423377", "text": "function get( $key );", "title": "" }, { "docid": "8440f0f0625b56b9f41f3fdd5df27ac6", "score": "0.6380379", "text": "public abstract function get($key);", "title": "" }, { "docid": "c922ab9f030e805635bc8b891779c3d3", "score": "0.6375671", "text": "public function __get(string $key);", "title": "" }, { "docid": "c922ab9f030e805635bc8b891779c3d3", "score": "0.6375671", "text": "public function __get(string $key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.63680494", "text": "public function get($key);", "title": "" }, { "docid": "286839213d1897a2708ddd8457641efc", "score": "0.63639724", "text": "public function __get($key)\n\t{\n\t\treturn call_user_func([$this, $key]);\n\t}", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.6342044", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.6342044", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.6342044", "text": "abstract public function get($key);", "title": "" }, { "docid": "6584860e95ae474457ada515a1d98808", "score": "0.63129354", "text": "public function __get ($key) { return $this->offsetGet($key); }", "title": "" }, { "docid": "38b0dd49f7152e2db959e0b4a118e05d", "score": "0.6303341", "text": "public function __get($key)\n\t{\n\t\treturn $this[$key];\n\t}", "title": "" }, { "docid": "eb7ae1b26b520947e641069ab4367e0d", "score": "0.6302003", "text": "function __get($key) {\r\n\t\treturn $this->$key;\r\n\t}", "title": "" }, { "docid": "5cb1ebf98c327e291c1400a2cbc66445", "score": "0.629104", "text": "public function get($key){\n\t\treturn $this->$key;\n\t}", "title": "" }, { "docid": "110d4fb236fd952993ba8ffa9a6b9f9d", "score": "0.6280689", "text": "abstract protected function getValue($key);", "title": "" }, { "docid": "79e04538591f713dcfb41c38af60c5de", "score": "0.62586045", "text": "public function __get($key)\n\t{\n\t\t$item = array_get($this->hit, $this->getPath($key));\n\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "563bb97077872bb101778beb5454aed9", "score": "0.6229586", "text": "public function __get($key){\n return $this->$key;\n }", "title": "" }, { "docid": "19802d79ba1ebb7a32f964271168644d", "score": "0.62024194", "text": "public function get($key){ }", "title": "" }, { "docid": "7d67afdd919ed796d24c8c50e00fce68", "score": "0.61924744", "text": "public function __get($key)\n {\n return $this[$key];\n }", "title": "" }, { "docid": "7d67afdd919ed796d24c8c50e00fce68", "score": "0.61924744", "text": "public function __get($key)\n {\n return $this[$key];\n }", "title": "" }, { "docid": "4205c8d4049a797da5f0aac472d73b88", "score": "0.61658686", "text": "public function __get($key)\n {\n return $this->getResult()->$key;\n }", "title": "" }, { "docid": "477d1c4bbade14531458e13275470902", "score": "0.6143359", "text": "function __get($key)\n {\n return $this->$key;\n }", "title": "" }, { "docid": "93c91da8dd663ec4ec72e47ada73c4ed", "score": "0.6123491", "text": "public function __get( /* string */ $key )\n\t{\n\t\t// If a get* method exists for this key, use that method to get this value.\n\t\tif ( method_exists( $this, $key ) )\n\t\t{\n\t\t\treturn $this->$key();\n\t\t}\n\t\t\n\t\tif ( isset( $this->$key ) )\n\t\t{\n\t\t\treturn $this->$key;\n\t\t}\n\t}", "title": "" }, { "docid": "243886fa8606be9f0b754af67ab66b3f", "score": "0.61105484", "text": "public function getValue($key);", "title": "" }, { "docid": "243886fa8606be9f0b754af67ab66b3f", "score": "0.61105484", "text": "public function getValue($key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6106451", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6106451", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6106451", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.6106451", "text": "public function get(string $key);", "title": "" }, { "docid": "8d0802a7da452e5029d4fbbaa06f4217", "score": "0.6099965", "text": "public function __get($key)\n\t{\n\t\treturn $this->$key;\n\t}", "title": "" }, { "docid": "8d0802a7da452e5029d4fbbaa06f4217", "score": "0.6099965", "text": "public function __get($key)\n\t{\n\t\treturn $this->$key;\n\t}", "title": "" }, { "docid": "d1289aa662b9f385f716a1ae5e84a9eb", "score": "0.6097443", "text": "abstract public function get(string $key);", "title": "" }, { "docid": "a181e9c1004137f2b529bba93a3dd9b5", "score": "0.60898894", "text": "public function __get($key) {\n $value = false;\n // Allow for easy customization of getting certain keys or faux attributes\n $override_function_name = '_get_' . $key;\n if(method_exists($this, $override_function_name)) {\n $value = $this->$override_function_name();\n }\n elseif(is_array($this->_data) && array_key_exists($key, $this->_data)) {\n $value = $this->_data[$key];\n }\n \n /*\n elseif(method_exists($this, $key)) {\n $value = call_user_func_array(array($this, $key), func_get_args());\n }\n */\n \n return $value;\n }", "title": "" }, { "docid": "75d1ad396f405a185a4332d3bcba6b9b", "score": "0.6077347", "text": "public function get($key)\n {\n return $this->$key;\n }", "title": "" }, { "docid": "2bb8515fbdf17c8779245be55d7ae24d", "score": "0.60692066", "text": "public function get(/*# string */ $key);", "title": "" }, { "docid": "8d4534276e3f538b45abace415d89acf", "score": "0.60484254", "text": "public function __get($key)\n {\n return $this->{$key};\n }", "title": "" }, { "docid": "8d4534276e3f538b45abace415d89acf", "score": "0.60484254", "text": "public function __get($key)\n {\n return $this->{$key};\n }", "title": "" }, { "docid": "b6f47d688e86ebf4ac9e506451442944", "score": "0.6046547", "text": "public function __get( string $key )\n\t{\n\t\treturn $this->get( $key );\n\t}", "title": "" }, { "docid": "73d34694c32d38ff57486d6cea8efc18", "score": "0.603986", "text": "function get( $key ) {\n\t\t\n\t\tif ( isset( $key ) AND ! empty( $key ) AND isset( $this->$key ) AND ! empty( $this->$key ) ) {\n\t\t\treturn $this->$key;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "c7998047e3bfcac5efee543f627a3b8e", "score": "0.6038764", "text": "public function __get($key) {\n\t\t\tif(isset($this->$key)) return $this->$key;\n\t\t}", "title": "" }, { "docid": "9135caa6c08a1b85330e7270103ab318", "score": "0.5993537", "text": "public function __get(string $key): mixed\n {\n return $this->items->{$key};\n }", "title": "" }, { "docid": "b674388c2bf6407decf2cbb425d48b97", "score": "0.59858596", "text": "public function get(string $key): mixed;", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.5972233", "text": "public function getValue(string $key);", "title": "" }, { "docid": "18276c89c5c8b68c8f5107f4daf954c9", "score": "0.5970728", "text": "public function __get($key)\n\t{\n\t\treturn $this->get($key);\n\t}", "title": "" }, { "docid": "665ae87bd2e0871894ac5bda30836884", "score": "0.5959383", "text": "function __get($key) {\n\t\treturn $this->data[$key];\n\t}", "title": "" }, { "docid": "a6df9e27f404e861a0989309962f8451", "score": "0.59591055", "text": "public static function get(string $key);", "title": "" }, { "docid": "0a2988ffaf33a267e43b6f9add9560c8", "score": "0.5953584", "text": "public function __get($key)\n {\n if (isset($this->$key))\n return $this->$key;\n }", "title": "" }, { "docid": "3742027468e81ae3f6e624f6a38e81d6", "score": "0.5952946", "text": "public function __get( $key ) {\n\t\treturn $this->offsetGet( $key );\n\t}", "title": "" }, { "docid": "1a8af4d5d3d55941e5a4597d7a8ec1a5", "score": "0.5932331", "text": "public function __getKey($key) {\n \t if (property_exists($this, $key)) {\n \t\treturn $this->$key;\n \t}\n \t}", "title": "" }, { "docid": "b91da51e2145d8afdeab696a9bfcc0dd", "score": "0.5924954", "text": "public function get( $key) {\n\t\treturn parent::offsetGet($key);\n\t}", "title": "" }, { "docid": "0d83d2caea09eaa39c84dda78ff3c63e", "score": "0.5923098", "text": "public function __get($key) {\n return $this->parsed[$key];\n }", "title": "" }, { "docid": "b066bf512ffff0c81c25d8f8b54bc9ab", "score": "0.59107107", "text": "public function __get( $key )\n\t\t{\n\t\t\tif( !isset( $this->$key ) && $this->first() !== false )\n\t\t\t{\n\t\t\t\treturn $this->first()->$key;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "af52f472d819aca9f7f560de10f3444d", "score": "0.59082866", "text": "public function __get (string $key)\n {\n return $this->data[$key];\n }", "title": "" }, { "docid": "4be0f9be95280c2ef5245ab3bc05e5f5", "score": "0.58899844", "text": "public function get($key = NULL);", "title": "" }, { "docid": "9e1be4af8cfd13696437eae0c389dbe5", "score": "0.58850783", "text": "public function __get($key) {\n return $this->get($key);\n }", "title": "" }, { "docid": "9e1be4af8cfd13696437eae0c389dbe5", "score": "0.58850783", "text": "public function __get($key) {\n return $this->get($key);\n }", "title": "" }, { "docid": "665c4be47c23a0222bd4590ef6d5e879", "score": "0.5883407", "text": "public function get(string $key)\n {\n return $this->$key;\n }", "title": "" }, { "docid": "63d97958523cb3fd5421c3c89c4a0de3", "score": "0.5872726", "text": "function __get($key) {\n return Wee()->$key;\n }", "title": "" }, { "docid": "25d1d2253da0612ba2a432d0ac9fc2a4", "score": "0.58610415", "text": "public function __get($key)\n {\n if( ($method = 'get' . ucfirst($key)) &&\n method_exists($this, $method) ) {\n return $this->$method();\n } else if( isset($this->$key) ) {\n return $this->$key;\n } else if( isset($this->{'_' . $key}) ) {\n return $this->{'_' . $key};\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "29b35483ca515565cef98334cf880f9e", "score": "0.58208156", "text": "abstract public function get(string $key): string;", "title": "" }, { "docid": "14d1a530f6f352bbe3af95a9c3154818", "score": "0.5820225", "text": "public function &__get ($key)\n {\n return $this->_Data[ $this->_CI_Keys ? $this->_CI_Map[ $this->setCase( $key ) ] : $key ];\n\t}", "title": "" }, { "docid": "c25e823ec597d9248af48f6690f20874", "score": "0.58189815", "text": "function __get($key)\n\t{\n\t\treturn $this->MD->$key;\n\t}", "title": "" }, { "docid": "7074b2996c9b569f0c1bbed0cdfd48a3", "score": "0.5809957", "text": "public function __get($key) {\n if (is_callable($this->values[$key])) {\n return $this->values[$key]($this);\n } else {\n return $this->values[$key];\n }\n }", "title": "" }, { "docid": "8ace23940f088daea8912f24c21558ec", "score": "0.58078593", "text": "public abstract function retrieve($key);", "title": "" }, { "docid": "4ca997bb42ac5c2151f4ca16cd9a2344", "score": "0.58004457", "text": "public function get(string $key): string;", "title": "" } ]
26db7c11537064e22bfe260aeaf4607c
Adiciona o filtro Minhas Paginas
[ { "docid": "27da8a926f6631411cdff838d0b1cd37", "score": "0.0", "text": "function wp38_add_movies_filter($views){\n\t\n\t// pega as informacoes do usuario logado\n\t$user = wp_get_current_user();\n\n\tif($user->roles[0] == 'contributor'){\n\n\t\tif( $_GET['filter'] == 'grupo' ){\n\n\t\t\t$views['grupos'] = \"<a href='\" . admin_url('edit.php?post_type=page&filter=grupo') . \"' class='current'>Minhas Páginas</a>\";\n\t\treturn $views;\n\n\t\t} else {\n\t\t\t$views['grupos'] = \"<a href='\" . admin_url('edit.php?post_type=page&filter=grupo') . \"'>Minhas Páginas</a>\";\n\t\treturn $views;\n\t\t}\n\t}\n\n\treturn $views;\n}", "title": "" } ]
[ { "docid": "e0985e36155127a8d4266cfad70c654c", "score": "0.69461966", "text": "public function filter(){\r\n\t\t\t$this->pagina = 1;\r\n\t\t\t$this->filtroSQL = \"SELECT p.long_name pais, pro.provincia, pf.long_name fpais, prof.provincia fprovincia, cli.* \r\n\t\t\t\tFROM clientes cli LEFT JOIN pais p ON (cli.id_pais=p.id) LEFT JOIN provincias pro ON (cli.id_provincia=pro.id) \r\n\t\t\t\tLEFT JOIN pais pf ON (cli.f_id_pais=pf.id) LEFT JOIN provincias prof ON (cli.f_id_provincia=prof.id) WHERE\";\r\n\t\t\t$this->computeFilter();\r\n\t\t\t$this->listAll();\r\n\t\t}", "title": "" }, { "docid": "9369b7ce9f7eed53236ab1d11adebc35", "score": "0.65426093", "text": "function getFilterPagination($getRequest) {\n $arrFiltro = array();\n\n if ($getRequest != null) {\n foreach ($getRequest as $key => $value) {\n if ($key != null \n && trim(strtolower($key)) != \"metodo\" \n && trim(strtolower($key)) != \"_\" \n && trim(strtolower($key)) != \"maximum\"\n && trim(strtolower($key)) != \"page\") {\n if (trim(strtolower($key)) != \"query\") {\n $arrFiltro[$key] = $value;\n } else {\n $arrFiltro['search'] = $value;\n }\n }\n }\n }\n\n return $arrFiltro;\n}", "title": "" }, { "docid": "0efe9f43c688e62499d554613d18b23f", "score": "0.6475194", "text": "function filtre_pagination($total, $nom, $position, $pas, $liste = true, $modele='', $connect='', $env=array()) {\r\n\r\n\tif (!$modele){\r\n\t\tif (!function_exists('lire_config'))\r\n\t\t\tinclude_spip('inc/config');\r\n\t\t$modele = lire_config('sarkaspip/modeles/modele_pagination','page');\r\n\t}\r\n\treturn filtre_pagination_dist($total, $nom, $position, $pas, $liste, $modele, $connect, $env);\r\n}", "title": "" }, { "docid": "fcbc71774c723756ed1438615f43ae58", "score": "0.62827444", "text": "function getMateriales($filter,$page,$model)\r\n { \r\n $where = \" INNER JOIN categoria on articulo.categoria=categoria.id_categoria WHERE articulo.bar_code LIKE :barcode OR articulo.modelo LIKE :modelo OR categoria.name LIKE :nameM\";\r\n $array=array('barcode'=>'%'.$filter.'%','modelo'=>'%'.$filter.'%','nameM'=>'%'.$filter.'%');\r\n $columns=\"articulo.idarticulo,articulo.num_serie,articulo.num_itap,articulo.num_rm,articulo.bar_code,articulo.modelo, categoria.name,articulo.ubicacion,articulo.prestado\";\r\n return $model->paginador($columns,\"articulo\",\"Articulo\",$page,$where,$array);\r\n }", "title": "" }, { "docid": "43ce9e0c413fe6ba1a97356ced57a95c", "score": "0.6196702", "text": "function filter( )\n\t{\n\t\tif ( array_key_exists( \"next\", $_GET))\n\t\t{\n\t\t\t$_next = filter::next( $_GET[ \"next\"]);\n\t\t\tif ( !$_next)\n\t\t\t\tunset( $_GET[ \"next\"]);\n\t\t}\n\n\t\tif ( array_key_exists( \"limit\", $_GET))\n\t\t{\n\t\t\t$_limit = filter::limit( $_GET[ \"limit\"]);\n\t\t\tif ( !$_limit)\n\t\t\t\tunset( $_GET[ \"limit\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "6be8d5f195938f1821208787370ba124", "score": "0.6134341", "text": "public function getTotalFilteredPages ();", "title": "" }, { "docid": "ea08311e1b44d5fdd690179bfd5e10fd", "score": "0.6132163", "text": "public function index(){\n if (!$_GET) {\n $posteos = posteo::paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET) {\n if ($_GET['filtro']=='encon') {\n $posteos = posteo::where('estado','=','Encontrado')->paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET['filtro']=='perd') {\n $posteos = posteo::where('estado','=','Perdido')->paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET['filtro']=='adopt') {\n $posteos = posteo::where('estado','=','En adopción')->paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET['filtro']=='todos') {\n $posteos = posteo::paginate(15);\n return view('home',compact('posteos'));\n }\n\n}}", "title": "" }, { "docid": "04a5d71ed47ea260f7bc39a60c72a5e4", "score": "0.6121736", "text": "public function filtro() {\r\n\t\tif (Input::hasPost('articulos')) {\r\n\r\n\t\t\t$articulos = new Articulos(Input::post('articulos'));\n\t\t\t$this->lista = $articulos->filtro($id);\n\t\t}\n\t}", "title": "" }, { "docid": "188ab21784fb0bc45d944e8378eccba3", "score": "0.6112553", "text": "private function getList() {\n\t\n\t\tif (isset($this->request->get['page'])) {\n\t\t\t$page = $this->request->get['page'];\n\t\t} else {\n\t\t\t$page = 1;\n\t\t}\t\t\n\t\t\n\t\tif (isset($this->request->get['sort'])) {\n\t\t\t$sort = $this->request->get['sort'];\n\t\t} else {\n\t\t\t$sort = 'invoice_num';\n\t\t}\n\t\tif (isset($this->request->get['order'])) {\n\t\t\t$order = $this->request->get['order'];\n\t\t} else {\n\t\t\t$order = 'DESC';\n\t\t}\n\t\t\n\t\t/*Softronikx Technologies*/\n\t\tif (isset($this->request->get['user_id'])) {\n\t\t\t$filter_user_id = $this->request->get['user_id'];\n\t\t} \t\n\t\t/*End of code by Softronikx Technologies */\n\t\t\n\t\tif (isset($this->request->get['filter_invoice_status'])) {\n\t\t\t$filter_invoice_status = $this->request->get['filter_invoice_status'];\n\t\t} else {\n\t\t\t$filter_invoice_status = NULL;\n\t\t}\n\t\tif (isset($this->request->get['filter_invoice_date'])) {\n\t\t\t$filter_invoice_date = $this->request->get['filter_invoice_date'];\n\t\t} else {\n\t\t\t$filter_invoice_date = NULL;\n\t\t}\n\t\tif (isset($this->request->get['filter_student_name'])) {\n\t\t\t$filter_student_name = $this->request->get['filter_student_name'];\n\t\t} else {\n\t\t\t$filter_student_name = NULL;\n\t\t}\t\n\t\tif (isset($this->request->get['filter_total_amount'])) {\n\t\t\t$filter_total_amount = $this->request->get['filter_total_amount'];\n\t\t} else {\n\t\t\t$filter_total_amount = NULL;\n\t\t}\t\n\t\t\n\t\tif (isset($this->request->get['filter_total_hours'])) {\n\t\t\t$filter_total_hours = $this->request->get['filter_total_hours'];\n\t\t} else {\n\t\t\t$filter_total_hours = NULL;\n\t\t}\n\t\t\n\t\tif (isset($this->request->get['filter_invoice_num'])) {\n\t\t\t$filter_invoice_num = $this->request->get['filter_invoice_num'];\n\t\t} else {\n\t\t\t$filter_invoice_num = NULL;\n\t\t}\t\n\n \t\t$this->document->breadcrumbs = array();\n \t\t$this->document->breadcrumbs[] = array(\n \t\t'href' => HTTPS_SERVER . 'index.php?route=common/home&token=' . $this->session->data['token'],\n \t\t'text' => $this->language->get('text_home'),\n \t\t'separator' => FALSE\n \t\t);\n \t\t\n \t\t$this->document->breadcrumbs[] = array(\n \t\t'href' => 'javascript:void(0)',\n \t\t'text' => 'Payments',\n \t\t'separator' => ' :: '\n \t\t);\n\n \t\t$this->document->breadcrumbs[] = array(\n \t\t'href' => HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'],\n \t\t'text' => $this->language->get('heading_title'),\n \t\t'separator' => ' :: '\n \t\t);\n\t\n\t\t$this->data['heading_title'] = $this->language->get('heading_title');\n\t\t$this->data['text_no_results'] = $this->language->get('text_no_results');\n\n\t\t$this->data['column_invoice_status'] = $this->language->get('column_invoice_status');\n\t\t$this->data['column_invoice_date'] = $this->language->get('column_invoice_date');\n\t\t$this->data['column_student_name'] = $this->language->get('column_student_name');\n\t\t$this->data['column_invoice_num'] = $this->language->get('column_invoice_num');\n\t\t$this->data['column_total_amount'] = $this->language->get('column_total_amount');\n\t\t$this->data['column_total_hours'] = $this->language->get('column_total_hours');\n\t\t$this->data['column_action'] = $this->language->get('column_action');\t\t\n\t\t\n\t\t$this->data['button_delete'] = $this->language->get('button_delete');\n\t\t$this->data['button_lock'] = $this->language->get('button_lock');\n\t\t$this->data['button_unlock'] = $this->language->get('button_unlock');\n\t\t$this->data['button_filter'] = $this->language->get('button_filter');\n\t\t$this->data['button_late_fee'] = $this->language->get('button_late_fee');\n\t\t\n\t\t$this->data['button_print_all_invoices'] = $this->language->get('button_print_all_invoices');\n\t\t\n\t\t\n\t\t$this->data['token'] = $this->session->data['token'];\n \n \t\tif (isset($this->error['warning'])) {\n\t\t\t$this->data['error_warning'] = $this->error['warning'];\n\t\t} else {\n\t\t\t$this->data['error_warning'] = '';\n\t\t}\n\t\t\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$this->data['success'] = $this->session->data['success'];\n\t\t\n\t\t\tunset($this->session->data['success']);\n\t\t} else {\n\t\t\t$this->data['success'] = '';\n\t\t}\n\t\t\n\t\t$url = '';\n\t\t\n\t\tif (isset($this->request->get['filter_invoice_status'])) {\n\t\t\t$url .= '&filter_invoice_status=' . $this->request->get['filter_invoice_status'];\n\t\t}\n\t\tif (isset($this->request->get['filter_invoice_date'])) {\n\t\t\t$url .= '&filter_invoice_date=' . $this->request->get['filter_invoice_date'];\n\t\t}\n\t\tif (isset($this->request->get['filter_student_name'])) {\n\t\t\t$url .= '&filter_student_name=' . $this->request->get['filter_student_name'];\n\t\t}\n\t\tif (isset($this->request->get['filter_total_amount'])) {\n\t\t\t$url .= '&filter_total_amount=' . $this->request->get['filter_total_amount'];\n\t\t}\t\t\n\t\tif (isset($this->request->get['filter_invoice_num'])) {\n\t\t\t$url .= '&filter_invoice_num=' . $this->request->get['filter_invoice_num'];\n\t\t}\t\t\n\t\tif (isset($this->request->get['filter_total_hours'])) {\n\t\t\t$url .= '&filter_total_hours=' . $this->request->get['filter_total_hours'];\n\t\t}\n\t\t\n\t\t/*Softronikx Technologies*/\n\t\tif (isset($this->request->get['user_id'])) {\n\t\t\t$url .= '&user_id=' . $this->request->get['user_id'];\n\t\t\t$this->data['user_id']=$this->request->get['user_id'];\n\t\t}\t\n\t\t\n\t\tif (isset($this->request->get['src'])) {\n\t\t\t$url .= '&src=' . $this->request->get['src'];\n\t\t\t$this->data['src']=$this->request->get['src'];\n\t\t}\n\t\t\n\t\t/*End of Code by Softronikx Technologies */\n\t\t\n\t\tif (isset($this->request->get['page'])) {\n\t\t\t$url .= '&page=' . $this->request->get['page'];\n\t\t}\n\t\tif ($order == 'ASC') {\n\t\t\t$url .= '&order=DESC';\n\t\t} else {\n\t\t\t$url .= '&order=ASC';\n\t\t}\n\t\t\n\t\t$this->data['sort_invoice_status'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_status' . $url;\n\t\t$this->data['sort_invoice_date'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_date' . $url;\n\t\t$this->data['sort_student_name'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=student_name' . $url;\n\t\t$this->data['sort_invoice_num'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_num' . $url;\n\t\t$this->data['sort_total_amount'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=total_amount' . $url;\n\t\t$this->data['sort_total_hours'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=total_hours' . $url;\n\t\t\n\t\t$url = '';\n\n\t\t$filters = array(\t\t\t\n\t\t\t'filter_invoice_status',\n\t\t\t'filter_invoice_date',\n\t\t\t'filter_student_name',\n\t\t\t'filter_invoice_num',\n\t\t\t'filter_total_amount',\n\t\t\t'filter_total_hours',\n\t\t\t'page',\n\t\t\t'sort',\n\t\t\t'order'\n\t\t);\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\tif (isset($this->request->get[$filter])) {\n\t\t\t\t$url .= '&' . $filter . '=' . $this->request->get[$filter];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Softronikx Technologies */\n\t\tif (isset($this->request->get['user_id'])) {\n\t\t\t$url .= '&user_id=' . $this->request->get['user_id'];\n\t\t}\n\t\t\n\t\tif (isset($this->request->get['src'])) {\n\t\t\t$url .= '&src=' . $this->request->get['src'];\n\t\t}\n\t\t\n\t\t/* End of Code by Softronikx Technologies */\n\t\t\n\t\t$this->data['delete'] = HTTPS_SERVER . 'index.php?route=cms/invoices/delete&token=' . $this->session->data['token'] . $url;\n\t\t$this->data['lock_sessions'] = HTTPS_SERVER . 'index.php?route=cms/invoices/lock&token=' . $this->session->data['token'] . $url;\t\t\n\t\t$this->data['unlock_sessions'] = HTTPS_SERVER . 'index.php?route=cms/invoices/unlock&token=' . $this->session->data['token'] . $url;\t\t\n\t\t$this->data['apply_late_fee'] = HTTPS_SERVER . 'index.php?route=cms/invoices/late_fee&token=' . $this->session->data['token'] . $url;\t\t\n\t\t\n\t\t$this->data['print_all_invoices'] = HTTPS_SERVER . 'index.php?route=cms/invoices/print_all_invoices&print=1&token=' . $this->session->data['token'] . $url;\n\t\t\n\t\t\n\t\tif($this->user->getUserGroupId() > 3)\n\t\t\t$this->data['sessions_controll'] = 1;\n\t\telse\n\t\t\t$this->data['sessions_controll'] = 0;\n\n\t\t$this->data['sessions'] = array();\n\t\t\n\t\t\n\t\t$data = array(\n\t\t\t'filter_user_id'\t\t\t\t=> $filter_user_id, //softronikx\n\t\t\t'filter_invoice_status' => $filter_invoice_status, \n\t\t\t'filter_invoice_date' => $filter_invoice_date, \n\t\t\t'filter_student_name' => $filter_student_name,\n\t\t\t'filter_invoice_num' => $filter_invoice_num, \n\t\t\t'filter_total_amount' => $filter_total_amount, \n\t\t\t'filter_total_hours' => $filter_total_hours, \n\t\t\t'sort' => $sort,\n\t\t\t'order' => $order,\n\t\t\t'start' => ($page - 1) * $this->config->get('config_admin_limit'),\n\t\t\t'limit' => $this->config->get('config_admin_limit')\n\t\t);\n\t\t\n\t\t$this->data['filter_user_id']=$filter_user_id; //softronikx \n\t\t$this->data['user_id']=$filter_user_id; //softronikx \n\t\t$this->data['filter_invoice_status']=$filter_invoice_status; \n\t\t$this->data['filter_invoice_date']=$filter_invoice_date; \n\t\t$this->data['filter_student_name']=$filter_student_name;\n\t\t$this->data['filter_invoice_num']=$filter_invoice_num; \n\t\t$this->data['filter_total_amount']=$filter_total_amount; \n\t\t$this->data['filter_total_hours']=$filter_total_hours; \n\t\t$this->data['sort']=$sort; \n\t\t$this->data['order']=$order; \n\t\t\n\t\t$this->data['invoices'] = array();\n\t\t$invoice_total = $this->model_cms_invoices->getTotalInvoices($data);\n\t\t$results = $this->model_cms_invoices->getInvoices($data);\n \n \tforeach ($results as $result) {\n\t\t\t$action = array();\n\t\t\t\n\t\t\t$action[] = array(\n\t\t\t\t'text' => \"View / Edit\",\n\t\t\t\t'href' => HTTPS_SERVER . 'index.php?route=cms/invoices/update&token=' . $this->session->data['token'] . '&invoice_id=' . $result['invoice_id'] . $url\n\t\t\t);\n\t\t\t\n\t\t\tif($result['is_locked'])\n\t\t\t$action[] = array(\n\t\t\t\t'text' => \"Locked\",\n\t\t\t\t'href' => 'javascript:void(0)' \n\t\t\t);\n\t\t\t\t\t\t\n\t\t\t$this->data['invoices'][] = array(\n\t\t\t\t'invoice_id' => $result['invoice_id'],\n\t\t\t\t'invoice_status' => $result['invoice_status'],\n\t\t\t\t'student_name' => $result['student_name'],\n\t\t\t\t'invoice_num' => $result['invoice_prefix'].\"-\".$result['invoice_num'],\n\t\t\t\t'total_amount' => $result['total_amount'],\n\t\t\t\t'total_hours' => $result['total_hours'],\n\t\t\t\t'invoice_date' => date($this->language->get('date_format_short'), strtotime($result['invoice_date'])),\n\t\t\t\t'selected' => isset($this->request->post['selected']) && in_array($result['invoice_id'], $this->request->post['selected']),\n\t\t\t\t'action' => $action\n\t\t\t);\n\t\t}\t\n\n\t\t$pagination = new Pagination();\n\t\t$pagination->total = $invoice_total;\n\t\t$pagination->page = $page;\n\t\t$pagination->limit = $this->config->get('config_admin_limit');\n\t\t$pagination->text = $this->language->get('text_pagination');\n\t\t$pagination->url = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . $url . '&page={page}';\n\t\t\t\n\t\t$this->data['pagination'] = $pagination->render();\n\t\t$this->template = 'cms/invoices_list.tpl';\n\t\t$this->children = array(\n\t\t\t'common/header',\t\n\t\t\t'common/footer'\t\n\t\t);\n\t\t\n\t\t$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));\n\t}", "title": "" }, { "docid": "16c0cce1f2b2921756e9c8acdf4fd336", "score": "0.6026169", "text": "public function getPaginate();", "title": "" }, { "docid": "81ab68e7cef238839c7589a71e4bf5b2", "score": "0.5946625", "text": "public function listar($pagina){\n\t\t $this->load('model/MarcaModel.php');\n\t\t \n\t\t //si me piden APLICAR un filtro\n\t\t if(!empty($_POST['filtrar'])){\n\t\t //recupera el filtro a aplicar\n\t\t $f = new stdClass(); //filtro\n\t\t $f->texto = htmlspecialchars($_POST['texto']);\n\t\t $f->campo = htmlspecialchars($_POST['campo']);\n\t\t $f->campoOrden = htmlspecialchars($_POST['campoOrden']);\n\t\t $f->sentidoOrden = htmlspecialchars($_POST['sentidoOrden']);\n\t\t \n\t\t //guarda el filtro en un var de sesión\n\t\t $_SESSION['filtroMarcas'] = serialize($f);\n\t\t }\n\t\t \n\t\t //si me piden QUITAR un filtro\n\t\t if(!empty($_POST['quitarFiltro']))\n\t\t unset($_SESSION['filtroMarcas']);\n\t\t \n\t\t \n\t //comprobar si hay filtro\n\t $filtro = empty($_SESSION['filtroMarcas'])? false : unserialize($_SESSION['filtroMarcas']);\n\t\t \n\t\t //para la paginación\n\t\t $num = 5; //numero de resultados por página\n\t\t $pagina = abs(intval($pagina)); //para evitar cosas raras por url\n\t\t $pagina = empty($pagina)? 1 : $pagina; //página a mostrar\n\t\t $offset = $num*($pagina-1); //offset\n\t\t \n\t\t //si no hay que filtrar los resultados...\n\t\t if(!$filtro){\n\t\t //recupera todas las marcas\n\t\t $marcas = MarcaModel::getMarcas(1000);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = MarcaModel::getTotal();\n\t\t }else{\n\t\t //recupera las marcas con el filtro aplicado\n\t\t $marcas = MarcaModel::getMarcas($num, $offset, $filtro->texto, $filtro->campo, $filtro->campoOrden, $filtro->sentidoOrden);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = MarcaModel::getTotal($filtro->texto, $filtro->campo);\n\t\t }\n\t\t \n\t\t //cargar la vista del listado\n\t\t $datos = array();\n\t\t $datos['usuario'] = Login::getUsuario();\n\t\t $datos['marcas'] = $marcas;\n\t\t $datos['filtro'] = $filtro;\n\t\t $datos['paginaActual'] = $pagina;\n\t\t $datos['paginas'] = ceil($totalRegistros/$num); //total de páginas (para paginación)\n\t\t $datos['totalRegistros'] = $totalRegistros;\n\t\t $datos['regPorPagina'] = $num;\n\t\t \n $this->load_view('view/marcas/lista.php', $datos);\n\t\t}", "title": "" }, { "docid": "d77b8c1cd3b1d08459d4e776e8c83a3d", "score": "0.59332955", "text": "public function filter(Request $request){\n if ($request->has('filter')){\n list($criteria, $value) = explode(':', $request->filter);\n\n $sortInstitution = Institution::query()->where($criteria,'>', $value);\n return response()->json([\n \"result\" => $sortInstitution->paginate(3),\n ], 201);\n }\n }", "title": "" }, { "docid": "8985c88eef7a3f94062e96b53629f35a", "score": "0.5897872", "text": "public function detalhesFiltrosPaginationAction()\n {\n #$this->params()->fromQuery('paramname'); // From GET\n #$this->params()->fromRoute('paramname'); // From RouteMatch\n #$this->params()->fromHeader('paramname'); // From header\n #$this->params()->fromFiles('paramname'); // From file being uploaded\n $filter = $this->getFilterPage();\n $request = $this->getRequest();\n $post = \\Estrutura\\Helpers\\Utilities::arrayMapArray('trim', $request->getPost()->toArray());\n\n $camposFilter = [\n ];\n\n $paginator = $this->service->getDetalhesFiltrosPaginator($post, $filter, $camposFilter);\n $paginator->setItemCountPerPage($paginator->getTotalItemCount());\n\n $countPerPage = $this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n );\n\n $paginator->setItemCountPerPage($this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n ))->setCurrentPageNumber($this->getCurrentPage());\n\n $viewModel = new ViewModel([\n 'service' => $this->service,\n 'form' => new \\Pesquisar\\Form\\PesquisarForm(),\n 'paginator' => $paginator,\n 'filter' => $filter,\n 'countPerPage' => $countPerPage,\n 'camposFilter' => $camposFilter,\n 'controller' => $this->params('controller'),\n 'atributos' => array()\n ]);\n\n return $viewModel->setTerminal(TRUE);\n }", "title": "" }, { "docid": "8985c88eef7a3f94062e96b53629f35a", "score": "0.5897872", "text": "public function detalhesFiltrosPaginationAction()\n {\n #$this->params()->fromQuery('paramname'); // From GET\n #$this->params()->fromRoute('paramname'); // From RouteMatch\n #$this->params()->fromHeader('paramname'); // From header\n #$this->params()->fromFiles('paramname'); // From file being uploaded\n $filter = $this->getFilterPage();\n $request = $this->getRequest();\n $post = \\Estrutura\\Helpers\\Utilities::arrayMapArray('trim', $request->getPost()->toArray());\n\n $camposFilter = [\n ];\n\n $paginator = $this->service->getDetalhesFiltrosPaginator($post, $filter, $camposFilter);\n $paginator->setItemCountPerPage($paginator->getTotalItemCount());\n\n $countPerPage = $this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n );\n\n $paginator->setItemCountPerPage($this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n ))->setCurrentPageNumber($this->getCurrentPage());\n\n $viewModel = new ViewModel([\n 'service' => $this->service,\n 'form' => new \\Pesquisar\\Form\\PesquisarForm(),\n 'paginator' => $paginator,\n 'filter' => $filter,\n 'countPerPage' => $countPerPage,\n 'camposFilter' => $camposFilter,\n 'controller' => $this->params('controller'),\n 'atributos' => array()\n ]);\n\n return $viewModel->setTerminal(TRUE);\n }", "title": "" }, { "docid": "8fd598d23b4dda2201bce41fb52102b0", "score": "0.584715", "text": "public function getAllWithPaginate($filter = [], $pageSize = 20,$orderby = ['created_at' => 'DESC'],$with=\"\")\n\t{\n $data_return = $this->model;\n\n $no_filter_more = false;\n\t\tif ( ! empty($filter))\n\t\t{\n\t\t\tforeach ($filter as $key => $value)\n\t\t\t{\n\t\t\t\tif ($value == ''){\n\t\t\t\t\tunset($filter[$key]);\n\t\t\t\t}\n\n \t// Nếu là aray quy định\n \tif (is_array($value)) {\n \t$op = array_get($value, 'operator');\n \t$val = array_get($value, 'value');\n \t$column = $key;\n \t$data_return = $data_return->where($column, $op, $val); \n \t$no_filter_more = true;\n \t} else {\n \t\t$data_return = $data_return->where($key,$value);\n \t}\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($orderby)){\n\t\t\tforeach ($orderby as $key => $value) {\n\t\t\t\t$data_return = $data_return->orderby($key,$value);\n\t\t\t}\n\t\t}\n\n\t\tif($with != \"\"){\n\t\t\t$data_return->with($with);\n\t\t}\n\n\t\treturn $data_return->paginate($pageSize);\n\t}", "title": "" }, { "docid": "08b6a46993bc9b679115740906f90daf", "score": "0.58149856", "text": "public function addFilters() {\n\t\t$this->addFilter(new Generator\\Filters\\Upper);\n\t\t$this->addFilter(new Generator\\Filters\\Lower);\n\t\t$this->addFilter(new Generator\\Filters\\Date);\n\t\t$this->addFilter(new Generator\\Filters\\Number);\n\t}", "title": "" }, { "docid": "df0e7981f46ed95b99a11954c96f05fa", "score": "0.5808622", "text": "function getAlumnos($filter,$page,$model)\r\n { \r\n $where = \" INNER JOIN carrera ON alumno.career = carrera.idcarrera WHERE alumno.numcontrol LIKE :numcontrol OR alumno.nameA LIKE :nameA\";\r\n $array=array('numcontrol'=>'%'.$filter.'%','nameA'=>'%'.$filter.'%');\r\n $columns=\"alumno.numcontrol, alumno.nameA, carrera.short_name, alumno.phone\";\r\n return $model->paginador($columns,\"alumno\",\"Alumno\",$page,$where,$array);\r\n }", "title": "" }, { "docid": "e5eaac1ef017c328de5aee20d3ea95db", "score": "0.5791585", "text": "public function showPostFilterAsPaginationPublic($filter='latest',$sort='desc',$genre1='',$genre2='',$country='',$year='') {\n\t\t\t$newgenre1 = \"and a.Tags like '%\".str_replace(\"'\",\"\",$genre1).\"%' \";\n\t\t\t$newgenre2 = (!empty($genre2)?\"and a.Tags like '%\".str_replace(\"'\",\"\",$genre2).\"%' \":\"\");\n\t\t\t$newcountry = \"and a.Country like '%\".str_replace(\"'\",\"\",$country).\"%' \";\n\t\t\t$newyear = \"and a.Released like '%\".str_replace(\"'\",\"\",$year).\"%' \";\n\t\t\tif ($filter == 'rating'){\n\t\t\t\t$newfilter = 'a.Rating '.str_replace(\"'\",\"\",$sort).',a.Released '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'popular'){\n\t\t\t\t$newfilter = 'a.Released '.str_replace(\"'\",\"\",$sort).',a.Viewer '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'released'){\n\t\t\t\t$newfilter = 'a.Released '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'latest'){\n\t\t\t\t$newfilter = 'a.Created_at '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'alphabet'){\n\t\t\t\t$newfilter = 'a.Title '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'favorite'){\n\t\t\t\tif (str_replace(\"'\",\"\",$sort) == 'desc'){\n\t\t\t\t\t$newsort = 'asc';\n\t\t\t\t} else {\n\t\t\t\t\t$newsort = 'desc';\n\t\t\t\t}\n\t\t\t\t$newfilter = 'a.Released '.str_replace(\"'\",\"\",$sort).',a.Liked '.str_replace(\"'\",\"\",$sort).', a.Disliked '.$newsort;\n\t\t\t} else {\n\t\t\t\t$newfilter = 'a.Created_at '.str_replace(\"'\",\"\",$sort);\n\t\t\t}\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51'\n\t\t\t\t\".$newgenre1.\"\n\t\t\t\t\".$newgenre2.\"\n\t\t\t\t\".$newcountry.\"\n\t\t\t\t\".$newyear.\"\n\t\t\t\torder by \".$newfilter.\";\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' \n\t\t\t\t\t\t\t\".$newgenre1.\"\n\t\t\t\t\t\t\t\".$newgenre2.\"\n\t\t\t\t\t\t\t\".$newcountry.\"\n\t\t\t\t\t\t\t\".$newyear.\"\n\t\t\t\t\t\t\torder by \".$newfilter.\" LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t];\n\t\t \t } \t \t\n\t\t\t\t} else {\n\t\t\t\t\t$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "644a30949b8aa3ccaef52557d5205151", "score": "0.5790531", "text": "public function listado($paginaActual = 0,$porpagina = 10)\n\t{\n\t}", "title": "" }, { "docid": "e5a87c4d75c60e2b947741ee6ae06b75", "score": "0.57839924", "text": "public function addInCmsPageFilter()\n {\n return $this->getSelect()->where('main_table.in_cms_page = 1');\n }", "title": "" }, { "docid": "acc77a85a4b7741bca920294681fda78", "score": "0.5775686", "text": "public function getFilters() {\n\t\t// Number of Google page for SERPS\n\t\t$incrementOptions = array ();\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 10, JText::_ ( 'COM_JMAP_10PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 100, JText::_ ( 'COM_JMAP_100PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 200, JText::_ ( 'COM_JMAP_200PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 500, JText::_ ( 'COM_JMAP_500PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 1000, JText::_ ( 'COM_JMAP_1000PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 5000, JText::_ ( 'COM_JMAP_5000PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 10000, JText::_ ( 'COM_JMAP_10000PAGES' ) );\n\t\t$lists ['numpages'] = JHtml::_ ( 'select.genericlist', $incrementOptions, 'numpages', 'onchange=\"Joomla.submitform();\" class=\"inputbox input-medium\"', 'value', 'text', $this->getState ( 'numpages' ) );\n\t\t\n\t\t// Languages\n\t\t$languagesHttpAcceptHeaders = array (\n\t\t\t\t\"af-NA\"=>\"Afrikaans (Namibia)\",\n\t\t\t\t\"af-ZA\"=>\"Afrikaans (South Africa)\",\n\t\t\t\t\"ak-GH\"=>\"Akan (Ghana)\",\n\t\t\t\t\"sq-AL\"=>\"Albanian (Albania)\",\n\t\t\t\t\"am-ET\"=>\"Amharic (Ethiopia)\",\n\t\t\t\t\"ar-DZ\"=>\"Arabic (Algeria)\",\n\t\t\t\t\"ar-BH\"=>\"Arabic (Bahrain)\",\n\t\t\t\t\"ar-EG\"=>\"Arabic (Egypt)\",\n\t\t\t\t\"ar-IQ\"=>\"Arabic (Iraq)\",\n\t\t\t\t\"ar-JO\"=>\"Arabic (Jordan)\",\n\t\t\t\t\"ar-KW\"=>\"Arabic (Kuwait)\",\n\t\t\t\t\"ar-LB\"=>\"Arabic (Lebanon)\",\n\t\t\t\t\"ar-LY\"=>\"Arabic (Libya)\",\n\t\t\t\t\"ar-MA\"=>\"Arabic (Morocco)\",\n\t\t\t\t\"ar-OM\"=>\"Arabic (Oman)\",\n\t\t\t\t\"ar-QA\"=>\"Arabic (Qatar)\",\n\t\t\t\t\"ar-SA\"=>\"Arabic (Saudi Arabia)\",\n\t\t\t\t\"ar-SD\"=>\"Arabic (Sudan)\",\n\t\t\t\t\"ar-SY\"=>\"Arabic (Syria)\",\n\t\t\t\t\"ar-TN\"=>\"Arabic (Tunisia)\",\n\t\t\t\t\"ar-AE\"=>\"Arabic (United Arab Emirates)\",\n\t\t\t\t\"ar-YE\"=>\"Arabic (Yemen)\",\n\t\t\t\t\"hy-AM\"=>\"Armenian (Armenia)\",\n\t\t\t\t\"as-IN\"=>\"Assamese (India)\",\n\t\t\t\t\"asa-TZ\"=>\"Asu (Tanzania)\",\n\t\t\t\t\"az-Cyrl\"=>\"Azerbaijani (Cyrillic)\",\n\t\t\t\t\"az-Cyrl-AZ\"=>\"Azerbaijani (Cyrillic, Azerbaijan)\",\n\t\t\t\t\"az-Latn\"=>\"Azerbaijani (Latin)\",\n\t\t\t\t\"az-Latn-AZ\"=>\"Azerbaijani (Latin, Azerbaijan)\",\n\t\t\t\t\"bm-ML\"=>\"Bambara (Mali)\",\n\t\t\t\t\"eu-ES\"=>\"Basque (Spain)\",\n\t\t\t\t\"be-BY\"=>\"Belarusian (Belarus)\",\n\t\t\t\t\"bem-ZM\"=>\"Bemba (Zambia)\",\n\t\t\t\t\"bez-TZ\"=>\"Bena (Tanzania)\",\n\t\t\t\t\"bn-BD\"=>\"Bengali (Bangladesh)\",\n\t\t\t\t\"bn-IN\"=>\"Bengali (India)\",\n\t\t\t\t\"bs-BA\"=>\"Bosnian (Bosnia and Herzegovina)\",\n\t\t\t\t\"bg-BG\"=>\"Bulgarian (Bulgaria)\",\n\t\t\t\t\"my-MM\"=>\"Burmese (Myanmar [Burma])\",\n\t\t\t\t\"ca-ES\"=>\"Catalan (Spain)\",\n\t\t\t\t\"tzm-Latn\"=>\"Central Morocco Tamazight (Latin)\",\n\t\t\t\t\"tzm-Latn-MA\"=>\"Central Morocco Tamazight (Latin, Morocco)\",\n\t\t\t\t\"tzm\"=>\"Central Morocco Tamazight\",\n\t\t\t\t\"chr-US\"=>\"Cherokee (United States)\",\n\t\t\t\t\"cgg-UG\"=>\"Chiga (Uganda)\",\n\t\t\t\t\"zh-Hans\"=>\"Chinese (Simplified Han)\",\n\t\t\t\t\"zh-Hans-CN\"=>\"Chinese (Simplified Han, China)\",\n\t\t\t\t\"zh-Hans-HK\"=>\"Chinese (Simplified Han, Hong Kong SAR China)\",\n\t\t\t\t\"zh-Hans-MO\"=>\"Chinese (Simplified Han, Macau SAR China)\",\n\t\t\t\t\"zh-Hans-SG\"=>\"Chinese (Simplified Han, Singapore)\",\n\t\t\t\t\"zh-Hant\"=>\"Chinese (Traditional Han)\",\n\t\t\t\t\"zh-Hant-HK\"=>\"Chinese (Traditional Han, Hong Kong SAR China)\",\n\t\t\t\t\"zh-Hant-MO\"=>\"Chinese (Traditional Han, Macau SAR China)\",\n\t\t\t\t\"zh-Hant-TW\"=>\"Chinese (Traditional Han, Taiwan)\",\n\t\t\t\t\"kw-GB\"=>\"Cornish (United Kingdom)\",\n\t\t\t\t\"hr-HR\"=>\"Croatian (Croatia)\",\n\t\t\t\t\"cs-CZ\"=>\"Czech (Czech Republic)\",\n\t\t\t\t\"da-DK\"=>\"Danish (Denmark)\",\n\t\t\t\t\"nl-BE\"=>\"Dutch (Belgium)\",\n\t\t\t\t\"nl-NL\"=>\"Dutch (Netherlands)\",\n\t\t\t\t\"ebu-KE\"=>\"Embu (Kenya)\",\n\t\t\t\t\"en-AS\"=>\"English (American Samoa)\",\n\t\t\t\t\"en-AU\"=>\"English (Australia)\",\n\t\t\t\t\"en-BE\"=>\"English (Belgium)\",\n\t\t\t\t\"en-BZ\"=>\"English (Belize)\",\n\t\t\t\t\"en-BW\"=>\"English (Botswana)\",\n\t\t\t\t\"en-CA\"=>\"English (Canada)\",\n\t\t\t\t\"en-GU\"=>\"English (Guam)\",\n\t\t\t\t\"en-HK\"=>\"English (Hong Kong SAR China)\",\n\t\t\t\t\"en-IN\"=>\"English (India)\",\n\t\t\t\t\"en-IE\"=>\"English (Ireland)\",\n\t\t\t\t\"en-JM\"=>\"English (Jamaica)\",\n\t\t\t\t\"en-MT\"=>\"English (Malta)\",\n\t\t\t\t\"en-MH\"=>\"English (Marshall Islands)\",\n\t\t\t\t\"en-MU\"=>\"English (Mauritius)\",\n\t\t\t\t\"en-NA\"=>\"English (Namibia)\",\n\t\t\t\t\"en-NZ\"=>\"English (New Zealand)\",\n\t\t\t\t\"en-MP\"=>\"English (Northern Mariana Islands)\",\n\t\t\t\t\"en-PK\"=>\"English (Pakistan)\",\n\t\t\t\t\"en-PH\"=>\"English (Philippines)\",\n\t\t\t\t\"en-SG\"=>\"English (Singapore)\",\n\t\t\t\t\"en-ZA\"=>\"English (South Africa)\",\n\t\t\t\t\"en-TT\"=>\"English (Trinidad and Tobago)\",\n\t\t\t\t\"en-UM\"=>\"English (U.S. Minor Outlying Islands)\",\n\t\t\t\t\"en-VI\"=>\"English (U.S. Virgin Islands)\",\n\t\t\t\t\"en-GB\"=>\"English (United Kingdom)\",\n\t\t\t\t\"en-US\"=>\"English (United States)\",\n\t\t\t\t\"en-ZW\"=>\"English (Zimbabwe)\",\n\t\t\t\t\"et-EE\"=>\"Estonian (Estonia)\",\n\t\t\t\t\"ee-GH\"=>\"Ewe (Ghana)\",\n\t\t\t\t\"ee-TG\"=>\"Ewe (Togo)\",\n\t\t\t\t\"fo-FO\"=>\"Faroese (Faroe Islands)\",\n\t\t\t\t\"fil-PH\"=>\"Filipino (Philippines)\",\n\t\t\t\t\"fi-FI\"=>\"Finnish (Finland)\",\n\t\t\t\t\"fr-BE\"=>\"French (Belgium)\",\n\t\t\t\t\"fr-BJ\"=>\"French (Benin)\",\n\t\t\t\t\"fr-BF\"=>\"French (Burkina Faso)\",\n\t\t\t\t\"fr-BI\"=>\"French (Burundi)\",\n\t\t\t\t\"fr-CM\"=>\"French (Cameroon)\",\n\t\t\t\t\"fr-CA\"=>\"French (Canada)\",\n\t\t\t\t\"fr-CF\"=>\"French (Central African Republic)\",\n\t\t\t\t\"fr-TD\"=>\"French (Chad)\",\n\t\t\t\t\"fr-KM\"=>\"French (Comoros)\",\n\t\t\t\t\"fr-CG\"=>\"French (Congo - Brazzaville)\",\n\t\t\t\t\"fr-CD\"=>\"French (Congo - Kinshasa)\",\n\t\t\t\t\"fr-CI\"=>\"French (Cote Ivoire)\",\n\t\t\t\t\"fr-DJ\"=>\"French (Djibouti)\",\n\t\t\t\t\"fr-GQ\"=>\"French (Equatorial Guinea)\",\n\t\t\t\t\"fr-FR\"=>\"French (France)\",\n\t\t\t\t\"fr-GA\"=>\"French (Gabon)\",\n\t\t\t\t\"fr-GP\"=>\"French (Guadeloupe)\",\n\t\t\t\t\"fr-GN\"=>\"French (Guinea)\",\n\t\t\t\t\"fr-LU\"=>\"French (Luxembourg)\",\n\t\t\t\t\"fr-MG\"=>\"French (Madagascar)\",\n\t\t\t\t\"fr-ML\"=>\"French (Mali)\",\n\t\t\t\t\"fr-MQ\"=>\"French (Martinique)\",\n\t\t\t\t\"fr-MC\"=>\"French (Monaco)\",\n\t\t\t\t\"fr-NE\"=>\"French (Niger)\",\n\t\t\t\t\"fr-RW\"=>\"French (Rwanda)\",\n\t\t\t\t\"fr-RE\"=>\"French (Reunion)\",\n\t\t\t\t\"fr-BL\"=>\"French (Saint Barthelemy)\",\n\t\t\t\t\"fr-MF\"=>\"French (Saint Martin)\",\n\t\t\t\t\"fr-SN\"=>\"French (Senegal)\",\n\t\t\t\t\"fr-CH\"=>\"French (Switzerland)\",\n\t\t\t\t\"fr-TG\"=>\"French (Togo)\",\n\t\t\t\t\"ff-SN\"=>\"Fulah (Senegal)\",\n\t\t\t\t\"gl-ES\"=>\"Galician (Spain)\",\n\t\t\t\t\"lg-UG\"=>\"Ganda (Uganda)\",\n\t\t\t\t\"ka-GE\"=>\"Georgian (Georgia)\",\n\t\t\t\t\"de-AT\"=>\"German (Austria)\",\n\t\t\t\t\"de-BE\"=>\"German (Belgium)\",\n\t\t\t\t\"de-DE\"=>\"German (Germany)\",\n\t\t\t\t\"de-LI\"=>\"German (Liechtenstein)\",\n\t\t\t\t\"de-LU\"=>\"German (Luxembourg)\",\n\t\t\t\t\"de-CH\"=>\"German (Switzerland)\",\n\t\t\t\t\"el-CY\"=>\"Greek (Cyprus)\",\n\t\t\t\t\"el-GR\"=>\"Greek (Greece)\",\n\t\t\t\t\"gu-IN\"=>\"Gujarati (India)\",\n\t\t\t\t\"guz-KE\"=>\"Gusii (Kenya)\",\n\t\t\t\t\"ha-Latn\"=>\"Hausa (Latin)\",\n\t\t\t\t\"ha-Latn-GH\"=>\"Hausa (Latin, Ghana)\",\n\t\t\t\t\"ha-Latn-NE\"=>\"Hausa (Latin, Niger)\",\n\t\t\t\t\"ha-Latn-NG\"=>\"Hausa (Latin, Nigeria)\",\n\t\t\t\t\"haw-US\"=>\"Hawaiian (United States)\",\n\t\t\t\t\"he-IL\"=>\"Hebrew (Israel)\",\n\t\t\t\t\"hi-IN\"=>\"Hindi (India)\",\n\t\t\t\t\"hu-HU\"=>\"Hungarian (Hungary)\",\n\t\t\t\t\"is-IS\"=>\"Icelandic (Iceland)\",\n\t\t\t\t\"ig-NG\"=>\"Igbo (Nigeria)\",\n\t\t\t\t\"id-ID\"=>\"Indonesian (Indonesia)\",\n\t\t\t\t\"ga-IE\"=>\"Irish (Ireland)\",\n\t\t\t\t\"it-IT\"=>\"Italian (Italy)\",\n\t\t\t\t\"it-CH\"=>\"Italian (Switzerland)\",\n\t\t\t\t\"ja-JP\"=>\"Japanese (Japan)\",\n\t\t\t\t\"kea-CV\"=>\"Kabuverdianu (Cape Verde)\",\n\t\t\t\t\"kab-DZ\"=>\"Kabyle (Algeria)\",\n\t\t\t\t\"kl-GL\"=>\"Kalaallisut (Greenland)\",\n\t\t\t\t\"kln-KE\"=>\"Kalenjin (Kenya)\",\n\t\t\t\t\"kam-KE\"=>\"Kamba (Kenya)\",\n\t\t\t\t\"kn-IN\"=>\"Kannada (India)\",\n\t\t\t\t\"kk-Cyrl\"=>\"Kazakh (Cyrillic)\",\n\t\t\t\t\"kk-Cyrl-KZ\"=>\"Kazakh (Cyrillic, Kazakhstan)\",\n\t\t\t\t\"km-KH\"=>\"Khmer (Cambodia)\",\n\t\t\t\t\"ki-KE\"=>\"Kikuyu (Kenya)\",\n\t\t\t\t\"rw-RW\"=>\"Kinyarwanda (Rwanda)\",\n\t\t\t\t\"kok-IN\"=>\"Konkani (India)\",\n\t\t\t\t\"ko-KR\"=>\"Korean (South Korea)\",\n\t\t\t\t\"khq-ML\"=>\"Koyra Chiini (Mali)\",\n\t\t\t\t\"ses-ML\"=>\"Koyraboro Senni (Mali)\",\n\t\t\t\t\"lag-TZ\"=>\"Langi (Tanzania)\",\n\t\t\t\t\"lv-LV\"=>\"Latvian (Latvia)\",\n\t\t\t\t\"lt-LT\"=>\"Lithuanian (Lithuania)\",\n\t\t\t\t\"luo-KE\"=>\"Luo (Kenya)\",\n\t\t\t\t\"luy-KE\"=>\"Luyia (Kenya)\",\n\t\t\t\t\"mk-MK\"=>\"Macedonian (Macedonia)\",\n\t\t\t\t\"jmc-TZ\"=>\"Machame (Tanzania)\",\n\t\t\t\t\"kde-TZ\"=>\"Makonde (Tanzania)\",\n\t\t\t\t\"mg-MG\"=>\"Malagasy (Madagascar)\",\n\t\t\t\t\"ms-BN\"=>\"Malay (Brunei)\",\n\t\t\t\t\"ms-MY\"=>\"Malay (Malaysia)\",\n\t\t\t\t\"ml-IN\"=>\"Malayalam (India)\",\n\t\t\t\t\"mt-MT\"=>\"Maltese (Malta)\",\n\t\t\t\t\"gv-GB\"=>\"Manx (United Kingdom)\",\n\t\t\t\t\"mr-IN\"=>\"Marathi (India)\",\n\t\t\t\t\"mas-KE\"=>\"Masai (Kenya)\",\n\t\t\t\t\"mas-TZ\"=>\"Masai (Tanzania)\",\n\t\t\t\t\"mer-KE\"=>\"Meru (Kenya)\",\n\t\t\t\t\"mfe-MU\"=>\"Morisyen (Mauritius)\",\n\t\t\t\t\"naq-NA\"=>\"Nama (Namibia)\",\n\t\t\t\t\"ne-IN\"=>\"Nepali (India)\",\n\t\t\t\t\"ne-NP\"=>\"Nepali (Nepal)\",\n\t\t\t\t\"nd-ZW\"=>\"North Ndebele (Zimbabwe)\",\n\t\t\t\t\"nb-NO\"=>\"Norwegian Bokmal (Norway)\",\n\t\t\t\t\"nn-NO\"=>\"Norwegian Nynorsk (Norway)\",\n\t\t\t\t\"nyn-UG\"=>\"Nyankole (Uganda)\",\n\t\t\t\t\"or-IN\"=>\"Oriya (India)\",\n\t\t\t\t\"om-ET\"=>\"Oromo (Ethiopia)\",\n\t\t\t\t\"m-KE\"=>\"Oromo (Kenya)\",\n\t\t\t\t\"ps-AF\"=>\"Pashto (Afghanistan)\",\n\t\t\t\t\"fa-AF\"=>\"Persian (Afghanistan)\",\n\t\t\t\t\"fa-IR\"=>\"Persian (Iran)\",\n\t\t\t\t\"pl-PL\"=>\"Polish (Poland)\",\n\t\t\t\t\"pt-BR\"=>\"Portuguese (Brazil)\",\n\t\t\t\t\"pt-GW\"=>\"Portuguese (Guinea-Bissau)\",\n\t\t\t\t\"pt-MZ\"=>\"Portuguese (Mozambique)\",\n\t\t\t\t\"pt-PT\"=>\"Portuguese (Portugal)\",\n\t\t\t\t\"pa-Arab\"=>\"Punjabi (Arabic)\",\n\t\t\t\t\"pa-Arab-PK\"=>\"Punjabi (Arabic, Pakistan)\",\n\t\t\t\t\"pa-Guru\"=>\"Punjabi (Gurmukhi)\",\n\t\t\t\t\"pa-Guru-IN\"=>\"Punjabi (Gurmukhi, India)\",\n\t\t\t\t\"ro-MD\"=>\"Romanian (Moldova)\",\n\t\t\t\t\"ro-RO\"=>\"Romanian (Romania)\",\n\t\t\t\t\"rm-CH\"=>\"Romansh (Switzerland)\",\n\t\t\t\t\"rof-TZ\"=>\"Rombo (Tanzania)\",\n\t\t\t\t\"ru-MD\"=>\"Russian (Moldova)\",\n\t\t\t\t\"ru-RU\"=>\"Russian (Russia)\",\n\t\t\t\t\"ru-UA\"=>\"Russian (Ukraine)\",\n\t\t\t\t\"rwk-TZ\"=>\"Rwa (Tanzania)\",\n\t\t\t\t\"saq-KE\"=>\"Samburu (Kenya)\",\n\t\t\t\t\"sg-CF\"=>\"Sango (Central African Republic)\",\n\t\t\t\t\"seh-MZ\"=>\"Sena (Mozambique)\",\n\t\t\t\t\"sr-Cyrl\"=>\"Serbian (Cyrillic)\",\n\t\t\t\t\"sr-Cyrl-BA\"=>\"Serbian (Cyrillic, Bosnia and Herzegovina)\",\n\t\t\t\t\"sr-Cyrl-ME\"=>\"Serbian (Cyrillic, Montenegro)\",\n\t\t\t\t\"sr-Cyrl-RS\"=>\"Serbian (Cyrillic, Serbia)\",\n\t\t\t\t\"sr-Latn\"=>\"Serbian (Latin)\",\n\t\t\t\t\"sr-Latn-BA\"=>\"Serbian (Latin, Bosnia and Herzegovina)\",\n\t\t\t\t\"sr-Latn-ME\"=>\"Serbian (Latin, Montenegro)\",\n\t\t\t\t\"sr-Latn-RS\"=>\"Serbian (Latin, Serbia)\",\n\t\t\t\t\"sn-ZW\"=>\"Shona (Zimbabwe)\",\n\t\t\t\t\"ii-CN\"=>\"Sichuan Yi (China)\",\n\t\t\t\t\"si-LK\"=>\"Sinhala (Sri Lanka)\",\n\t\t\t\t\"sk-SK\"=>\"Slovak (Slovakia)\",\n\t\t\t\t\"sl-SI\"=>\"Slovenian (Slovenia)\",\n\t\t\t\t\"xog-UG\"=>\"Soga (Uganda)\",\n\t\t\t\t\"so-DJ\"=>\"Somali (Djibouti)\",\n\t\t\t\t\"so-ET\"=>\"Somali (Ethiopia)\",\n\t\t\t\t\"so-KE\"=>\"Somali (Kenya)\",\n\t\t\t\t\"so-SO\"=>\"Somali (Somalia)\",\n\t\t\t\t\"es-AR\"=>\"Spanish (Argentina)\",\n\t\t\t\t\"es-BO\"=>\"Spanish (Bolivia)\",\n\t\t\t\t\"es-CL\"=>\"Spanish (Chile)\",\n\t\t\t\t\"es-CO\"=>\"Spanish (Colombia)\",\n\t\t\t\t\"es-CR\"=>\"Spanish (Costa Rica)\",\n\t\t\t\t\"es-DO\"=>\"Spanish (Dominican Republic)\",\n\t\t\t\t\"es-EC\"=>\"Spanish (Ecuador)\",\n\t\t\t\t\"es-SV\"=>\"Spanish (El Salvador)\",\n\t\t\t\t\"es-GQ\"=>\"Spanish (Equatorial Guinea)\",\n\t\t\t\t\"es-GT\"=>\"Spanish (Guatemala)\",\n\t\t\t\t\"es-HN\"=>\"Spanish (Honduras)\",\n\t\t\t\t\"es-419\"=>\"Spanish (Latin America)\",\n\t\t\t\t\"es-MX\"=>\"Spanish (Mexico)\",\n\t\t\t\t\"es-NI\"=>\"Spanish (Nicaragua)\",\n\t\t\t\t\"es-PA\"=>\"Spanish (Panama)\",\n\t\t\t\t\"es-PY\"=>\"Spanish (Paraguay)\",\n\t\t\t\t\"es-PE\"=>\"Spanish (Peru)\",\n\t\t\t\t\"es-PR\"=>\"Spanish (Puerto Rico)\",\n\t\t\t\t\"es-ES\"=>\"Spanish (Spain)\",\n\t\t\t\t\"es-US\"=>\"Spanish (United States)\",\n\t\t\t\t\"es-UY\"=>\"Spanish (Uruguay)\",\n\t\t\t\t\"es-VE\"=>\"Spanish (Venezuela)\",\n\t\t\t\t\"sw-KE\"=>\"Swahili (Kenya)\",\n\t\t\t\t\"sw-TZ\"=>\"Swahili (Tanzania)\",\n\t\t\t\t\"sv-FI\"=>\"Swedish (Finland)\",\n\t\t\t\t\"sv-SE\"=>\"Swedish (Sweden)\",\n\t\t\t\t\"gsw-CH\"=>\"Swiss German (Switzerland)\",\n\t\t\t\t\"shi-Latn\"=>\"Tachelhit (Latin)\",\n\t\t\t\t\"shi-Latn-MA\"=>\"Tachelhit (Latin, Morocco)\",\n\t\t\t\t\"shi-Tfng\"=>\"Tachelhit (Tifinagh)\",\n\t\t\t\t\"shi-Tfng-MA\"=>\"Tachelhit (Tifinagh, Morocco)\",\n\t\t\t\t\"dav-KE\"=>\"Taita (Kenya)\",\n\t\t\t\t\"ta-IN\"=>\"Tamil (India)\",\n\t\t\t\t\"ta-LK\"=>\"Tamil (Sri Lanka)\",\n\t\t\t\t\"te-IN\"=>\"Telugu (India)\",\n\t\t\t\t\"teo-KE\"=>\"Teso (Kenya)\",\n\t\t\t\t\"teo-UG\"=>\"Teso (Uganda)\",\n\t\t\t\t\"th-TH\"=>\"Thai (Thailand)\",\n\t\t\t\t\"bo-CN\"=>\"Tibetan (China)\",\n\t\t\t\t\"bo-IN\"=>\"Tibetan (India)\",\n\t\t\t\t\"ti-ER\"=>\"Tigrinya (Eritrea)\",\n\t\t\t\t\"ti-ET\"=>\"Tigrinya (Ethiopia)\",\n\t\t\t\t\"to-TO\"=>\"Tonga (Tonga)\",\n\t\t\t\t\"tr-TR\"=>\"Turkish (Turkey)\",\n\t\t\t\t\"uk-UA\"=>\"Ukrainian (Ukraine)\",\n\t\t\t\t\"ur-IN\"=>\"Urdu (India)\",\n\t\t\t\t\"ur-PK\"=>\"Urdu (Pakistan)\",\n\t\t\t\t\"uz-Arab\"=>\"Uzbek (Arabic)\",\n\t\t\t\t\"uz-Arab-AF\"=>\"Uzbek (Arabic, Afghanistan)\",\n\t\t\t\t\"uz-Cyrl\"=>\"Uzbek (Cyrillic)\",\n\t\t\t\t\"uz-Cyrl-UZ\"=>\"Uzbek (Cyrillic, Uzbekistan)\",\n\t\t\t\t\"uz-Latn\"=>\"Uzbek (Latin)\",\n\t\t\t\t\"uz-Latn-UZ\"=>\"Uzbek (Latin, Uzbekistan)\",\n\t\t\t\t\"vi-VN\"=>\"Vietnamese (Vietnam)\",\n\t\t\t\t\"vun-TZ\"=>\"Vunjo (Tanzania)\",\n\t\t\t\t\"cy-GB\"=>\"Welsh (United Kingdom)\",\n\t\t\t\t\"yo-NG\"=>\"Yoruba (Nigeria)\",\n\t\t\t\t\"zu-ZA\"=>\"Zulu (South Africa)\" \n\t\t);\n\t\t\n\t\t$languagesHttpAcceptHeadersOptions = array ();\n\t\t$languagesHttpAcceptHeadersOptions [] = JHtml::_ ( 'select.option', null, JText::_('COM_JMAP_INDEXING_SELECT_DEFAULT') );\n\t\tforeach ($languagesHttpAcceptHeaders as $value=>$text) {\n\t\t\t$languagesHttpAcceptHeadersOptions [] = JHtml::_ ( 'select.option', $value, $text );\n\t\t}\n\t\t$lists ['acceptlanguages'] = JHtml::_ ( 'select.genericlist', $languagesHttpAcceptHeadersOptions, 'acceptlanguage', 'class=\"inputbox input-medium serpcontrol\"', 'value', 'text', $this->getState ( 'acceptlanguage' ) );\n\t\t\n\t\t$countriedTopLevelDomains = array (\n\t\t\t\t'Algeria'=>'dz',\n\t\t\t\t'Ascension Island'=>'ac',\n\t\t\t\t'Andorra'=>'ad',\n\t\t\t\t'Afghanistan'=>'com.af',\n\t\t\t\t'Antigua and Barbuda'=>'com.ag',\n\t\t\t\t'Anguilla'=>'com.ai',\n\t\t\t\t'Albania'=>'al',\n\t\t\t\t'Armenia'=>'am',\n\t\t\t\t'Angola'=>'co.ao',\n\t\t\t\t'Argentina'=>'com.ar',\n\t\t\t\t'American Samoa'=>'as',\n\t\t\t\t'Austria'=>'at',\n\t\t\t\t'Australia'=>'com.au',\n\t\t\t\t'Azerbaijan'=>'az',\n\t\t\t\t'Bosnia and Herzegovina'=>'ba',\n\t\t\t\t'Bangladesh'=>'com.bd',\n\t\t\t\t'Belgium'=>'be',\n\t\t\t\t'Burkina Faso'=>'bf',\n\t\t\t\t'Bulgaria'=>'bg',\n\t\t\t\t'Bahrain'=>'com.bh',\n\t\t\t\t'Burma'=>'com.mm',\n\t\t\t\t'Burundi'=>'bi',\n\t\t\t\t'Benin'=>'bj',\n\t\t\t\t'Brunei'=>'com.bn',\n\t\t\t\t'Bolivia'=>'com.bo',\n\t\t\t\t'Brazil'=>'com.br',\n\t\t\t\t'Bahamas'=>'bs',\n\t\t\t\t'Bhutan'=>'bt',\n\t\t\t\t'Botswana'=>'co.bw',\n\t\t\t\t'Belarus'=>'by',\n\t\t\t\t'Belize'=>'com.bz',\n\t\t\t\t'British Indian Ocean Territory'=>'io',\n\t\t\t\t'British Virgin Islands'=>'vg',\n\t\t\t\t'Canada'=>'ca',\n\t\t\t\t'Cambodia'=>'com.kh',\n\t\t\t\t'Cocos (Keeling) Islands'=>'cc',\n\t\t\t\t'Central African Republic'=>'cf',\n\t\t\t\t'Catalonia Catalan Countries'=>'cat',\n\t\t\t\t'Cook Islands'=>'co.ck',\n\t\t\t\t'Chile'=>'cl',\n\t\t\t\t'Cameroon'=>'cm',\n\t\t\t\t'Chad'=>'td',\n\t\t\t\t'China'=>'cn',\n\t\t\t\t'Colombia'=>'com.co',\n\t\t\t\t'Costa Rica'=>'co.cr',\n\t\t\t\t'Croatia'=>'hr',\n\t\t\t\t'Cuba'=>'com.cu',\n\t\t\t\t'Cape Verde'=>'cv',\n\t\t\t\t'Cyprus'=>'com.cy',\n\t\t\t\t'Czech Republic'=>'cz',\n\t\t\t\t'Democratic Republic of the Congo'=>'cd',\n\t\t\t\t'Denmark'=>'dk',\n\t\t\t\t'Djibouti'=>'dj',\n\t\t\t\t'Dominica'=>'dm',\n\t\t\t\t'Dominican Republic'=>'com.do',\n\t\t\t\t'Ecuador'=>'com.ec',\n\t\t\t\t'Estonia'=>'ee',\n\t\t\t\t'Egypt'=>'com.eg',\n\t\t\t\t'El Salvador'=>'com.sv',\n\t\t\t\t'Ethiopia'=>'com.et',\n\t\t\t\t'Finland'=>'fi',\n\t\t\t\t'Fiji'=>'com.fj',\n\t\t\t\t'Federated States of Micronesia'=>'fm',\n\t\t\t\t'France'=>'fr',\n\t\t\t\t'French Guiana'=>'gf',\n\t\t\t\t'Gabon'=>'ga',\n\t\t\t\t'Georgia'=>'ge',\n\t\t\t\t'Germany'=>'de',\n\t\t\t\t'Guernsey'=>'gg',\n\t\t\t\t'Ghana'=>'com.gh',\n\t\t\t\t'Gibraltar'=>'com.gi',\n\t\t\t\t'Greenland'=>'gl',\n\t\t\t\t'Gambia'=>'gm',\n\t\t\t\t'Guadeloupe'=>'gp',\n\t\t\t\t'Greece'=>'gr',\n\t\t\t\t'Guatemala'=>'com.gt',\n\t\t\t\t'Guyana'=>'gy',\n\t\t\t\t'Hong Kong'=>'com.hk',\n\t\t\t\t'Honduras'=>'hn',\n\t\t\t\t'Haiti'=>'ht',\n\t\t\t\t'Hungary'=>'hu',\n\t\t\t\t'Indonesia'=>'co.id',\n\t\t\t\t'Iran'=>'ir',\n\t\t\t\t'Iraq'=>'iq',\n\t\t\t\t'Ireland'=>'ie',\n\t\t\t\t'Israel'=>'co.il',\n\t\t\t\t'India'=>'co.in',\n\t\t\t\t'Iceland'=>'is',\n\t\t\t\t'Italy'=>'it',\n\t\t\t\t'Ivory Coast'=>'ci',\n\t\t\t\t'Jersey'=>'je',\n\t\t\t\t'Jamaica'=>'com.jm',\n\t\t\t\t'Jordan'=>'jo',\n\t\t\t\t'Japan'=>'co.jp',\n\t\t\t\t'Kenya'=>'co.ke',\n\t\t\t\t'Kiribati'=>'ki',\n\t\t\t\t'Kyrgyzstan'=>'kg',\n\t\t\t\t'Kuwait'=>'com.kw',\n\t\t\t\t'Kazakhstan'=>'kz',\n\t\t\t\t'Laos'=>'la',\n\t\t\t\t'Lebanon'=>'com.lb',\n\t\t\t\t'Liechtenstein'=>'li',\n\t\t\t\t'Lesotho'=>'co.ls',\n\t\t\t\t'Lithuania'=>'lt',\n\t\t\t\t'Luxembourg'=>'u',\n\t\t\t\t'Latvia'=>'lv',\n\t\t\t\t'Libya'=>'ly',\n\t\t\t\t'Morocco'=>'co.ma',\n\t\t\t\t'Moldova'=>'md',\n\t\t\t\t'Montenegro'=>'me',\n\t\t\t\t'Madagascar'=>'mg',\n\t\t\t\t'Macedonia'=>'mk',\n\t\t\t\t'Mali'=>'ml',\n\t\t\t\t'Mongolia'=>'mn',\n\t\t\t\t'Montserrat'=>'ms',\n\t\t\t\t'Malta'=>'com.mt',\n\t\t\t\t'Mauritius'=>'mu',\n\t\t\t\t'Maldives'=>'mv',\n\t\t\t\t'Malawi'=>'mw',\n\t\t\t\t'Mexico'=>'com.mx',\n\t\t\t\t'Malaysia'=>'com.my',\n\t\t\t\t'Mozambique'=>'co.mz',\n\t\t\t\t'Namibia'=>'com.na',\n\t\t\t\t'Niger'=>'ne',\n\t\t\t\t'Norfolk Island'=>'com.nf',\n\t\t\t\t'Nigeria'=>'com.ng',\n\t\t\t\t'Nicaragua'=>'com.ni',\n\t\t\t\t'Netherlands'=>'nl',\n\t\t\t\t'Norway'=>'no',\n\t\t\t\t'Nepal'=>'com.np',\n\t\t\t\t'Nauru'=>'nr',\n\t\t\t\t'Niue'=>'nu',\n\t\t\t\t'New Zealand'=>'co.nz',\n\t\t\t\t'Oman'=>'com.om',\n\t\t\t\t'Panama'=>'com.pa',\n\t\t\t\t'Peru'=>'com.pe',\n\t\t\t\t'Philippines'=>'com.ph',\n\t\t\t\t'Pakistan'=>'com.pk',\n\t\t\t\t'Poland'=>'pl',\n\t\t\t\t'Papua New Guinea'=>'com.pg',\n\t\t\t\t'Pitcairn Islands'=>'pn',\n\t\t\t\t'Puerto Rico'=>'com.pr',\n\t\t\t\t'Palestine'=>'ps',\n\t\t\t\t'Portugal'=>'pt',\n\t\t\t\t'Paraguay'=>'com.py',\n\t\t\t\t'Qatar'=>'com.qa',\n\t\t\t\t'Romania'=>'ro',\n\t\t\t\t'Republic of the Congo'=>'cg',\n\t\t\t\t'Russia'=>'ru',\n\t\t\t\t'Rwanda'=>'rw',\n\t\t\t\t'Saint Vincent and the Grenadines'=>'com.vc',\n\t\t\t\t'Sao Tome and Principe'=>'st',\n\t\t\t\t'Saudi Arabia'=>'com.sa',\n\t\t\t\t'Serbia'=>'rs',\n\t\t\t\t'Solomon Islands'=>'com.sb',\n\t\t\t\t'Seychelles'=>'sc',\n\t\t\t\t'Singapore'=>'com.sg',\n\t\t\t\t'Saint Helena'=>'sh',\n\t\t\t\t'Saint Lucia'=>'com.lc',\n\t\t\t\t'Samoa'=>'ws',\n\t\t\t\t'Slovenia'=>'si',\n\t\t\t\t'Slovakia'=>'sk',\n\t\t\t\t'Sierra Leone'=>'com.sl',\n\t\t\t\t'Senegal'=>'sn',\n\t\t\t\t'San Marino'=>'sm',\n\t\t\t\t'Somalia'=>'so',\n\t\t\t\t'South Africa'=>'co.za',\n\t\t\t\t'South Korea'=>'co.kr',\n\t\t\t\t'Spain'=>'es',\n\t\t\t\t'Sri Lanka'=>'lk',\n\t\t\t\t'Sweden'=>'se',\n\t\t\t\t'Switzerland'=>'ch',\n\t\t\t\t'Togo'=>'tg',\n\t\t\t\t'Thailand'=>'co.th',\n\t\t\t\t'Tajikistan'=>'com.tj',\n\t\t\t\t'Tokelau'=>'tk',\n\t\t\t\t'Timor-Leste'=>'tl',\n\t\t\t\t'Turkmenistan'=>'tm',\n\t\t\t\t'Tonga'=>'to',\n\t\t\t\t'Tunisia'=>'tn',\n\t\t\t\t'Tunisia com.tn',\n\t\t\t\t'Turkey'=>'com.tr',\n\t\t\t\t'Trinidad and Tobago'=>'tt',\n\t\t\t\t'Taiwan'=>'com.tw',\n\t\t\t\t'Tanzania'=>'co.tz',\n\t\t\t\t'Ukraine'=>'com.ua',\n\t\t\t\t'Uganda'=>'co.ug',\n\t\t\t\t'United Kingdom'=>'co.uk',\n\t\t\t\t'United Arab Emirates'=>'ae',\n\t\t\t\t'United States'=>'com',\n\t\t\t\t'Uruguay'=>'com.uy',\n\t\t\t\t'Uzbekistan'=>'co.uz',\n\t\t\t\t'Venezuela'=>'co.ve',\n\t\t\t\t'United States Virgin Islands'=>'co.vi',\n\t\t\t\t'Vietnam'=>'com.vn',\n\t\t\t\t'Vanuatu'=>'vu',\n\t\t\t\t'Zambia'=>'co.zm',\n\t\t\t\t'Zimbabwe'=>'co.zw' \n\t\t);\n\t\t$countriesOptions = array ();\n\t\t$countriesOptions [] = JHtml::_ ( 'select.option', null, JText::_('COM_JMAP_INDEXING_SELECT_DEFAULT') );\n\t\tforeach ($countriedTopLevelDomains as $text=>$value) {\n\t\t\t$countriesOptions [] = JHtml::_ ( 'select.option', $value, $text );\n\t\t}\n\t\t$lists ['countriestld'] = JHtml::_ ( 'select.genericlist', $countriesOptions, 'countriestld', 'class=\"inputbox input-medium serpcontrol\"', 'value', 'text', $this->getState ( 'countriestld' ) );\n\t\t\n\t\treturn $lists;\n\t}", "title": "" }, { "docid": "ff28e3c81a842a19ae0126c27228e36b", "score": "0.57610923", "text": "private function filtro4()\n {\n\n $sucursal = request()->has(\"SUCURSAL\") ? request()->input(\"SUCURSAL\") : session(\"SUCURSAL\");\n\n $mes = request()->has(\"MES\") ? request()->input(\"MES\") : date(\"m\");\n $anio = request()->has(\"ANIO\") ? request()->input(\"ANIO\") : date(\"Y\");\n\n $medio_pago = Ventas::where(\"SUCURSAL\", $sucursal)->select(DB::raw(\"sum(TOTAL) AS TOTAL_RECAUDADO\"), DB::raw(\"concat(MONTH(FECHA) , concat('/',year(FECHA)) ) AS MES\"))\n ->groupByRaw(\"MONTH(FECHA)\")\n ->groupByRaw(\"YEAR(FECHA)\")\n ->orderByRaw(\" MONTH(FECHA) DESC \")\n ->orderByRaw(\"YEAR(FECHA) DESC\")\n ->limit(6);\n\n $sucursalModel = Sucursal::find($sucursal);\n $descripcionSucursal = \"\";\n if (!is_null($sucursalModel))\n $descripcionSucursal = $sucursalModel->MATRIZ == \"S\" ? \"CASA CENTRAL\" : \"SUC. $sucursalModel->DESCRIPCION\";\n\n $titulo = \"RECAUDACIÓN Gs. - $descripcionSucursal\";\n return ['titulo' => $titulo, \"data\" => $medio_pago];\n }", "title": "" }, { "docid": "2f67889702f0d42abd48e05e63eb3ece", "score": "0.5747793", "text": "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $operator = $request->get('operator');\n $total = $request->get('total');\n $price = $request->get('price');\n $sort = $request->get('sort','number');\n $numbers = $request->get('numbers');\n $birthday = $request->get('birthday');\n $whitelist = $request->get('whitelist');\n $blacklist = $request->get('blacklist');\n $tags = [];\n $perPage = 99;\n \n \n $filter_number_string = \"__________\";\n if( is_array($numbers) ){\n for($i=0; $i<count($numbers); $i++){\n if( !empty($numbers[$i]) ){\n $filter_number_string[$i] = $numbers[$i];\n }\n }\n }\n \n\n\n $needFilter = !empty($keyword) || !empty($operator) || !empty($birthday) || !empty($sum) || !empty($price) || !empty($numbers) || !empty($whitelist) || !empty($blacklist) ;\n if ($needFilter) {\n //http://localhost/simsaifah/public/number?search=chavalit.kow%40gmail.com&operator=&total=&price=1000000&sort=number&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&numbers%5B%5D=&whitelist=1+%2C+2+%2C+3+%2C+4&blacklist=4+%2C+5+%2C+6+%2C+7\n $whitelist = explode(\",\", $whitelist);\n $blacklist = explode(\",\", $blacklist);\n\n \n $whitelist_sum = array_sum($whitelist); \n if($whitelist[0]!=\"\"){\n $tags[] = $this->getTag($whitelist_sum);\n }\n \n \n $tags[] = strtoupper($operator);\n\n $price = empty($price) ? 1000000 : $price;\n // print_r($whitelist);\n // echo \"<br>\";\n // print_r($blacklist) ;\n // exit();\n //FILTER\n $query = Number::where('operator', 'LIKE', \"%$operator%\")\n ->where('price', '<', $price)\n ->where('total', 'LIKE', \"%$total%\")\n ->where('number', 'LIKE', $filter_number_string)\n ->where('number', 'LIKE', \"%$keyword%\");\n //WHITELIST\n $query = $query->where(function ($query) use ($whitelist) {\n for($i=0; $i<count($whitelist); $i++){\n if($i==0){\n $query = $query->where('number', 'LIKE', \"%{$whitelist[$i]}%\");\n }else{\n $query = $query->orWhere('number', 'LIKE', \"%{$whitelist[$i]}%\");\n }\n }\n });\n //BLACKLIST\n $query = $query->where(function ($query) use ($blacklist) {\n for($i=0; $i<count($blacklist); $i++){\n if($blacklist[$i]==\"\"){\n continue;\n }\n if($i==0){\n $query = $query->where('number', 'NOT LIKE', \"%{$blacklist[$i]}%\");\n }else{\n $query = $query->where('number', 'NOT LIKE', \"%{$blacklist[$i]}%\");\n }\n }\n });\n //BIRTHDAY\n if(!empty($birthday)){\n $birthday_indexes = [\n \"sun\" => [3,6],\n \"mon\" => [1,5],\n \"tue\" => [1,2],\n \"wed\" => [3,8],\n \"thu\" => [2,7],\n \"fri\" => [7,8],\n \"saa\" => [4,6],\n ];\n $blacklist_birthday = $birthday_indexes[$birthday];\n \n $blacklist_square = array_map(function ($n) { return($n*$n);},$blacklist_birthday) ; \n $blacklist_sum = array_sum($blacklist_square);\n $tags[] = $this->getTag($blacklist_sum);\n \n $query = $query->where(function ($query) use ($blacklist_birthday) {\n for($i=0; $i<count($blacklist_birthday); $i++){\n if($blacklist_birthday[$i]==\"\"){\n continue;\n }\n if($i==0){\n $query = $query->where('number', 'NOT LIKE', \"%{$blacklist_birthday[$i]}%\");\n }else{\n $query = $query->where('number', 'NOT LIKE', \"%{$blacklist_birthday[$i]}%\");\n }\n }\n });\n }\n \n //SORT\n switch($sort){\n case \"asc\" :\n case \"desc\" : \n $number = $query->orderBy('price', $sort)->latest()->paginate($perPage);\n break; \n default : \n $number = $query->orderBy('number', 'asc')->latest()->paginate($perPage);\n }\n \n } else {\n $number = Number::orderBy('number', 'asc')->latest()->paginate($perPage);\n }\n\n \n $total_array = Number::selectRaw('total,count(total) as count')\n ->orderBy('total', 'asc')\n ->groupBy('total')\n ->get();\n\n $operator_array = Number::selectRaw('operator,count(operator) as count')\n ->orderBy('operator', 'asc')\n ->groupBy('operator')\n ->get();\n\n\n return view('number.index', compact('number','total_array','operator_array','tags'));\n }", "title": "" }, { "docid": "4b891a1a8f086f5c40f00bfe6efc0dea", "score": "0.5721374", "text": "function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('*');\n $this->paginate = array('limit'=>Configure::read('Site.ItemsPerPage'));\n }", "title": "" }, { "docid": "b5a6389ad4596e445fa3366a91579055", "score": "0.5712146", "text": "private function obtenerConsultaPaginada(){\n \t$offset=($this->paginaActual<=1)?0:(($this->paginaActual-1)*$this->filasPorPagina);\n $this->query=$this->bd->addLimit($this->filasPorPagina, $offset,$this->queryReal);\n\n\n }", "title": "" }, { "docid": "75099842f62a879dcfbea75cb5efaaa3", "score": "0.5710433", "text": "public function computeFilter(){\r\n\t\t\t$this->oSystem->getLogger()->debug( \"Aplicando filtro \" . get_class($this) );\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_estado'] )\r\n\t\t\t\t$this->filtroSQL .= \" cli.estado='$_REQUEST[_estado]'\";\r\n\t\t\telse\r\n\t\t\t\t$this->filtroSQL .= \" cli.estado NOT IN ('XXX')\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_cliente'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND cli.id=\\\"$_REQUEST[_id_cliente]\\\"\";\r\n\t\t\t\r\n\t\t\tif ( !$_REQUEST['_id_cliente'] && $_REQUEST['_cliente'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND (cli.nombre LIKE '%$_REQUEST[_cliente]%' OR cli.razon LIKE '%$_REQUEST[_cliente]%')\";\t\t\t\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_email'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND cli.email LIKE '%$_REQUEST[_email]%'\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_telefono'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND telefono LIKE '%$_REQUEST[_telefono]%'\";\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_desde'] ){\r\n\t\t\t\t$desde = substr($_REQUEST['_desde'], 6).'-'.substr($_REQUEST['_desde'], 3,2).'-'.substr($_REQUEST['_desde'], 0,2);\r\n\t\t\t\t$this->filtroSQL .= \" AND falta >= '$desde'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_hasta'] ){\r\n\t\t\t\t$desde = substr($_REQUEST['_hasta'], 6).'-'.substr($_REQUEST['_hasta'], 3,2).'-'.substr($_REQUEST['_hasta'], 0,2);\r\n\t\t\t\t$this->filtroSQL .= \" AND falta <= '$desde'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$this->filtroSQL .= ' ORDER BY cli.nombre';\r\n\t\t\t\t\r\n\t\t}", "title": "" }, { "docid": "9f797547488130473e5d398fd01a49ce", "score": "0.56824774", "text": "function getAll($approved = true){\n\t\t\n\t\t$conds = \"WHERE 1\";\n\t\t\n\t\tforeach($this->filters as $filter){\n\t\t\tif($this->f3->exists(\"GET.$filter\")){\n\t\t\t\t$conds .= \" AND LOWER($filter) like '%\".strtolower($this->f3->get(\"GET.$filter\")).\"%'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn parent::paginate($page, 10 , \"created\", \"DESC\",$conds);\n\t}", "title": "" }, { "docid": "c7a4b32834c114261d61f01eef15d075", "score": "0.5679019", "text": "public function test122DisplayPromotionsListByFilteringTotalRecordsPerPage()\n {\n $this->markTestIncomplete('Mark skip test to find solution');\n }", "title": "" }, { "docid": "0b71e6a8306ead7f57c2092d4652e146", "score": "0.5678996", "text": "protected function preparePaginateData()\n {\n return [\n 'criteria' => is_null(request()->input('filter')) || request()->isMethod('GET') ? [] : request()->input('filter'),\n 'order_by' => is_null(request()->input('sort')) || request()->isMethod('GET') ? null : request()->input('sort'),\n 'per_page' => is_null(request()->input('limit')) ? 15 : request()->input('limit'),\n ];\n }", "title": "" }, { "docid": "aab8260802099a292ce62663d85b394b", "score": "0.5666408", "text": "public function hotSearchList(Request $request){\n $validator = Validator::make($request->all(),[\n 'token'=>'required'\n ]);\n\n if($validator->fails()){\n showMsg(2,$validator->errors());\n }\n\n $resourceModel = new Resource();\n\n $map = [\n ['search_num','>',0]\n ];\n\n $limit = isset($request->limit)?$request->limit:6;\n\n $list = $resourceModel->where($map)->orderBy('search_num','desc')->paginate($limit,['label as name'])->toArray();\n\n showMsg(1,$list);\n\n }", "title": "" }, { "docid": "1153896b7186babc13fb47130626925d", "score": "0.56652296", "text": "public function my_filters(){\n $max=$this->input->post('max');\n $min=$this->input->post('min');\n $cat=$this->input->post('cat');\n $per_page=$this->input->post('per_page');\n $sub_cat=$this->input->post('sub_cat');\n $brand= $this->input->post('brand');\n $order_by=$this->input->post('order_by');\n $srt=$this->input->post('srt');\n $search=$this->input->post('search');\n $num_rows=$this->Comman_model->get_num_rows($max,$min,$cat,$sub_cat,$brand,$search);\n $total_rows= $num_rows;\n $this->load->library('pagination');\n $config['base_url'] = '#';\n $config['total_rows'] =$total_rows;\n $config['per_page'] =$per_page;\n $config['uri_segment']=3;\n $config['use_page_numbers']=TRUE;\n \n $config['full_tag_open']='<nav aria-label=\"Page navigation example\"><ul class=\"pagination\">';\n $config['last_tag_close']=\"</ul></nav>\";\n $config['last_tag_open']='<li class=\"page-item\">';\n $config['last_tag_close']=\"</li>\";\n $config['first_tag_open']='<li class=\"page-item\">';\n $config['first_tag_close']=\"</li>\";\n $config['prev_tag_open']='<li class=\"page-item\">';\n $config['prev_tag_close']=\"</li>\";\n $config['last_tag_open']='<li class=\"page-item\">';\n $config['last_tag_close']=\"</li>\";\n $config['cur_tag_open']=\"<li class='page-item active'><a href='#'>\";\n $config['cur_tag_close']=\"</a></li>\";\n $config['num_tag_open']='<li class=\"page-item\">';\n $config['num_tag_close']=\"</li>\";\n $config['next_tag_open']='<li class=\"page-item\">';\n $config['next_tag_close']=\"</li>\";\n \n $this->pagination->initialize($config); \n // getting products \n $limit=$config['per_page'];\n $offset=($this->uri->segment('3')-1)*$limit;\n $products=$this->Comman_model->filter_data($max,$min,$cat,$sub_cat,$brand,$order_by,$srt,$limit,$offset,$search);\n \n // getting brands\n $brands=$this->Comman_model->get_brand($cat,$sub_cat);\n \n // // pagination links\n // 'pagination_links'=>$this->pagination->create_links(),\n // json response\n $output=array('pagination_links'=>$this->pagination->create_links(),'brands'=>$brands,'products'=>$products);\n echo json_encode($output);\n }", "title": "" }, { "docid": "44652e36591220c6759b6ffa6b8ab39e", "score": "0.5663082", "text": "public static function get_paginacao($paginacao,$controller)\n\t\t{\n\t\t\t\n\t\t\t$qtd_paginas = $paginacao['size'] / $paginacao['itens_por_pagina'];\n\n\t\t\t$method = \"index\";\n\n\t\t\tif(isset($paginacao['method']))\n\t\t\t\t$method = $paginacao['method'];\n\n\t\t\t$parameter = \"\";//caso haja algum parametro na tela de listagem\n\t\t\tif(isset($paginacao['parameter']))\n\t\t\t\t$parameter = $paginacao['parameter'].\"/\";\n\n\t\t\tif(ceil($qtd_paginas) > 1)\n\t\t\t{\n\t\t\t\t$filtros = \"\";\n\t\t\t\t//VERIFICAR SE HÁ FILTROS\n\t\t\t\tif(!empty($paginacao['filter']))\n\t\t\t\t\t$filtros = $paginacao['filter'];\n\t\t\t\t/////\n\n\t\t\t\t$inicio = $paginacao['pg_atual'] - 2;\n\t\t\t\t\n\t\t\t\t$offset = 0;\n\t\t\t\tif($inicio < 1)\n\t\t\t\t{\n\t\t\t\t\t$offset = $inicio * (-1);\n\t\t\t\t\t$inicio = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$inicio = $inicio + 1;\n\t\t\t\t\n\t\t\t\tif((ceil($qtd_paginas) - $paginacao['pg_atual']) + 1 < 5)\n\t\t\t\t\t$inicio = $paginacao['pg_atual'] - (5 - (ceil($qtd_paginas) - $paginacao['pg_atual'] + 1));\n\t\t\t\t\n\t\t\t\tif($inicio <= 1)\n\t\t\t\t\t$inicio = 1;\n\t\t\t\t\n\t\t\t\t$fim = $paginacao['pg_atual'] + $offset + 3;\n\t\t\t\t\n\t\t\t\tif($fim > ceil($qtd_paginas))\n\t\t\t\t\t$fim = ceil($qtd_paginas);\n\t\t\t\techo\"<div class='col-lg-8 offset-lg-4 col-sm-6 offset-sm-3 col-10 offset-1'>\";\n\t\t\t\t\techo\"<nav aria-label='Page navigation'>\";\n\t\t\t\t\t\techo\"<ul class='pagination'>\";\n\t\t\t\t\t\t\techo\"<li class='page-item'>\";\n\t\t\t\t\t\t\t\tif(!empty($paginacao['pg_atual']) && $paginacao['pg_atual'] > 1)\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo\"<a class='page-link disabled' href='\".$paginacao['url'] . $controller.\"/\".$method.\"/\".$parameter. ($paginacao['pg_atual'] - 1).$filtros.\"?id=4' aria-label='Previous'><span class='glyphicon fa fa-arrow-left'></span>&nbsp;</a>\";\n\t\t\t\t\t\t\techo\"</li>\";\n\t\t\t\t\t\t\tfor($i = $inicio; $i <= $fim; $i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t\t\t\tif($i == $paginacao['pg_atual'])\n\t\t\t\t\t\t\t\t\t$active = \"active\";\n\t\t\t\t\t\t\t\techo\"<li class='page-item \".$active.\"'>\";\n\t\t\t\t\t\t\t\t\techo\"<a class='page-link' href='\".$paginacao['url'] . $controller.\"/\".$method.\"/\".$parameter.$i.$filtros.\"?id=4'>\".$i.\"</a>\";\n\t\t\t\t\t\t\t\techo\"</li>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo\"<li class='page-item'>\";\n\t\t\t\t\t\t\t\tif($paginacao['pg_atual'] < ceil($qtd_paginas))\n\t\t\t\t\t\t\t\t\techo\"<a class='page-link' href='\".$paginacao['url'] . $controller.\"/\".$method.\"/\".$parameter. ($paginacao['pg_atual'] + 1).$filtros.\"?id=4' aria-label='Next'><span class='fa fa-arrow-right'></span>&nbsp;</a>\";\n\t\t\t\t\t\t\techo\"</li>\";\n\t\t\t\t\t\techo\"</ul>\";\n\t\t\t\t\techo\"</nav>\";\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "516db908271614c0def00fea5818e1b1", "score": "0.56598973", "text": "function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\n global $configuracion;\n\n $item = '';\n $respuesta = array();\n $objeto = new Proveedor();\n\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\n\n if (!empty($cantidadRegistros)) {\n $registros = (int) $cantidadRegistros;\n }\n\n if (isset($pagina)) {\n $pagina = $pagina;\n } else {\n $pagina = 1;\n }\n\n if (isset($consultaGlobal) && $consultaGlobal != '') {\n\n $data = explode('[', $consultaGlobal);\n $datos = $data[0];\n $palabras = explode(' ', $datos);\n\n if ($data[1] != '') {\n $condicionales = explode('|', $data[1]);\n\n $condicion = '(';\n $tam = sizeof($condicionales) - 1;\n for ($i = 0; $i < $tam; $i++) {\n $condicion .= $condicionales[$i] . ' REGEXP \"(' . implode(\"|\", $palabras) . ')\" ';\n if ($i != $tam - 1) {\n $condicion .= ' OR ';\n }\n }\n $condicion .= ')';\n\n $consultaGlobal = $condicion;\n } else {\n $consultaGlobal = '(p.nombre REGEXP \"(' . implode(\"|\", $palabras) . ')\")';\n }\n } else {\n $consultaGlobal = '';\n }\n\n if (empty($nombreOrden)) {\n $nombreOrden = $objeto->ordenInicial;\n }\n\n\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\n $objeto->listaAscendente = true;\n } else {\n $objeto->listaAscendente = false;\n }\n\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\n $nombreOrden = 'activo';\n }\n\n $registroInicial = ($pagina - 1) * $registros;\n\n\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\n\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\n }\n\n $respuesta['error'] = false;\n $respuesta['accion'] = 'insertar';\n $respuesta['contenido'] = $item;\n $respuesta['idContenedor'] = '#tablaRegistros';\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\n $respuesta['paginarTabla'] = true;\n\n Servidor::enviarJSON($respuesta);\n}", "title": "" }, { "docid": "57a7eb43480e15edae6c7c13facf9459", "score": "0.56531996", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $paginator = $this->get('knp_paginator');\n\n $kryteria = null;\n\n if($this->get('request')->query->get('filterField') && $this->get('request')->query->get('filterValue'))\n {\n $pole = $this->get('request')->query->get('filterField');\n $wartosc = $this->get('request')->query->get('filterValue');\n $kryteria = array('filterField'=>$pole,'filterValue'=>$wartosc);\n }\n\n $query = $em->getRepository('DFPEtapIBundle:Klient')->getListaKlientowQuery($kryteria);\n\n $pagination = $paginator->paginate($query,$this->get('request')->query->get('strona',1),21,array('wrap-queries'=>true));\n $pagination->setFiltrationTemplate('::filtration.html.twig');\n\n return array(\n 'lista_klientow' => $pagination,\n );\n }", "title": "" }, { "docid": "21c190357b0dc427ab26b6b77083e8f0", "score": "0.5650529", "text": "public function allPaged();", "title": "" }, { "docid": "b37435c5c83628aca4945b0ab65e2f2d", "score": "0.5647757", "text": "private function filters() {\n\n\t}", "title": "" }, { "docid": "8faa442f4fc0a86eeb174ce296d398a5", "score": "0.5631252", "text": "function wp37_limit_posts_to_author($query) {\n\n\t// pega as informacoes do usuario logado\n\t$user = wp_get_current_user();\n\n\t// \tfiltra as paginas pelo grupo pertencente\n\tif( $_GET['filter'] == 'grupo' && $user->roles[0] == 'contributor') {\n\t\t\n\t\t$variable = get_user_meta($user->ID, 'grupo', true);\n\t\t$variable = array_flatten($variable);\n $variable = array_unique($variable);\n\t\t\n\t\t$pages = array();\n\n\t\tif($variable && $variable != ''){\n foreach($variable as $grupo){\n\t\t\t\t$pages[] = get_post_meta($grupo, 'selecionar_paginas', true);\n\t\t\t\t$pages[] = get_post_meta($grupo, 'contatos_sme', true);\n\t\t\t}\n }\n\n\t\t$pages = array_flatten($pages);\n $pages = array_unique($pages);\n\t\t\n\t\t//print_r($variable);\n\t\t$query->set('post__in', $pages);\n\t} \n\n\t// \tfiltra as paginas por grupos\n\tif( $_GET['grupo_id'] != '') {\n\t\t\n\t\t$grupo = $_GET['grupo_id'];\n\n\t\tif($grupo && $grupo != ''){ \n\t\t\tif($_GET['post_type'] == 'contato'){\n\t\t\t\t$pages = get_post_meta($grupo, 'contatos_sme', true);\n\t\t\t} else {\n\t\t\t\t$pages = get_post_meta($grupo, 'selecionar_paginas', true);\n\t\t\t}\n\t\t\t\n }\t\n\n\t\t$pages = array_flatten($pages);\n $pages = array_unique($pages);\n\t\t\n\t\t//print_r($variable);\n\t\t$query->set('post__in', $pages);\n\t}\t\n\t\n\treturn $query;\n\t\n}", "title": "" }, { "docid": "18d55259506eed189dd49d14e05a8d4f", "score": "0.56279755", "text": "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Configurazione interfaccia\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b344335941ed3069472e0ebc8ee27534", "score": "0.56269014", "text": "public function listarvehiculos($pagina){\n\t\t $this->load('model/VehiculoModel.php');\n\t\t \n\t\t //si me piden APLICAR un filtro\n\t\t if(!empty($_POST['filtrar'])){\n\t\t //recupera el filtro a aplicar\n\t\t $f = new stdClass(); //filtro\n\t\t $f->texto = htmlspecialchars($_POST['texto']);\n\t\t $f->campo = htmlspecialchars($_POST['campo']);\n\t\t $f->campoOrden = htmlspecialchars($_POST['campoOrden']);\n\t\t $f->sentidoOrden = htmlspecialchars($_POST['sentidoOrden']);\n\t\t \n\t\t //guarda el filtro en un var de sesión\n\t\t $_SESSION['filtrovehiculos'] = serialize($f);\n\t\t }\n\t\t \n\t\t //si me piden QUITAR un filtro\n\t\t if(!empty($_POST['quitarFiltro']))\n\t\t unset($_SESSION['filtrovehiculos']);\n\t\t \n\t\t \n\t //comprobar si hay filtro\n\t $filtro = empty($_SESSION['filtrovehiculos'])? false : unserialize($_SESSION['filtrovehiculos']);\n\t\t \n\t\t //para la paginación\n\t\t $num = 5; //numero de resultados por página\n\t\t $pagina = abs(intval($pagina)); //para evitar cosas raras por url\n\t\t $pagina = empty($pagina)? 1 : $pagina; //página a mostrar\n\t\t $offset = $num*($pagina-1); //offset\n\t\t \n\t\t //si no hay que filtrar los resultados...\n\t\t if(!$filtro){\n\t\t //recupera todas las vehiculos\n\t\t $vehiculos = VehiculoModel::getVehiculos($num, $offset);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = VehiculoModel::getTotal();\n\t\t }else{\n\t\t //recupera las vehiculos con el filtro aplicado\n\t\t $vehiculos = VehiculoModel::getVehiculos($num, $offset, $filtro->texto, $filtro->campo, $filtro->campoOrden, $filtro->sentidoOrden);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = VehiculoModel::getTotal($filtro->texto, $filtro->campo);\n\t\t }\n\t\t \n\t\t //cargar la vista del listado\n\t\t $datos = array();\n\t\t $datos['usuario'] = Login::getUsuario();\n\t\t $datos['vehiculos'] = $vehiculos;\n\t\t $datos['filtro'] = $filtro;\n\t\t $datos['paginaActual'] = $pagina;\n\t\t $datos['paginas'] = ceil($totalRegistros/$num); //total de páginas (para paginación)\n\t\t $datos['totalRegistros'] = $totalRegistros;\n\t\t $datos['regPorPagina'] = $num;\n\n\n\t\t if(Login::getUsuario()->admin) //Admin\n \t\t $this->load_view('view/vehiculos/listarvehiculosA.php', $datos);\n \t\tif(Login::getUsuario()->privilegio==1) // Comprador\n \t\t $this->load_view('view/vehiculos/listarvehiculosC.php', $datos);\n \t\tif(Login::getUsuario()->privilegio==2) // Vendedor\n \t\t $this->load_view('view/vehiculos/listarvehiculosV.php', $datos);\n \n\t\t}", "title": "" }, { "docid": "9d981e47f0655bf615c74407ee2aabb6", "score": "0.56261885", "text": "function beforeFilter() {\n\n $this->checkSession();\n\n // Segundo filtro: CheckPermiso. Si pasa continua. Sino se va al home.\n\n $this->checkPermiso();\n }", "title": "" }, { "docid": "30cbff5ae741ab4238c3dc36e6a5e1fa", "score": "0.560532", "text": "public function filter($request){\n $data = RetailUser::with('spatieRole');\n if($request->search != \"\"){\n $data->where('name','like','%'.$request->search.'%');\n }\n\n if($request->role_id != \"\"){\n $data->where(['spatie_role_id'=>$request->role_id]);\n }\n return $data->paginate(100);\n }", "title": "" }, { "docid": "c3d88eaa4f41bd3e65c51e5abbeca134", "score": "0.56044585", "text": "public static function filtrar($app, $produto=\"\", $finalidade=\"\", $pag=\"1\") {\n $param = (!empty($_GET) ? $_GET : null);\n #print_r($param);\n //validação obrigtória de pagina e data\n\n $jObject = self::filtro($app, $produto, $finalidade, $param, $pag);\n\n $jObject->produto = (!empty($produto) ? $produto : \"imovel\"); \n $jObject->produtotag = (!empty($finalidade) ? $finalidade : \"prontos\"); \n \n //itens por pagina //\n $itensPorPag = (!empty($param['take']) ? $param['take'] : 12);\n //itens por pagina //\n\n Util::paginationParams($jObject, $itensPorPag);\n\n //Util::dbg($imoveis);\n \n $assets = array(); \n\n //carrega os blocos para essa página \n $page = array(); \n $page = array(\n 'template' => null, \n 'content' => $jObject\n );\n\n\n $scripts = array(); \n //$scripts = array( 'assets/jvs/imoveis-init.js'); \n\n\n $data = array(\n 'page' => $page, \n 'scripts' => $scripts\n ); \n\n return $app['twig']->render('base-filtro.twig.php', $data);\n }", "title": "" }, { "docid": "92146dff1226b1b6e3a79b3f0c0d56ea", "score": "0.56013256", "text": "public function paginetion() {\r\n }", "title": "" }, { "docid": "a13ab1b53a2bc50d479c7f38d2fac199", "score": "0.5591906", "text": "protected function filters()\n {\n if ($this->getRequest()->isPost()== true or 1==1) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['log_usuario'] = $this->_getSanitizedParam(\"log_usuario\");\n\t\t\t\t\t$parramsfilter['log_tipo'] = $this->_getSanitizedParam(\"log_tipo\");\n\t\t\t\t\t$parramsfilter['log_fecha'] = $this->_getSanitizedParam(\"log_fecha\");\n\t\t\t\t\t$parramsfilter['log_log'] = $this->_getSanitizedParam(\"log_log\");Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "title": "" }, { "docid": "a3750f5b2c4562a44013cf7db05864c4", "score": "0.5587235", "text": "public function addFilter()\n\t{\n\t}", "title": "" }, { "docid": "8e51e3699c2110a9ba5947031a17c0af", "score": "0.5581067", "text": "public function filter()\n {\n $limit = request()->input('limit', 15);\n $model = $this->paginate($limit);\n\n return $model;\n }", "title": "" }, { "docid": "ff5edaf0791617740ad3548c3172ae17", "score": "0.55647975", "text": "public function index(Request $request)\n {\n $mises_bas = mises_bas::where([\n ['date', '!=', NULL],\n [function ($query) use ($request){\n if (($term = $request->term)){\n $query->orWhere('date','LIKE', '%' . $term . '%')\n -> orWhere('nombreAgneauVivant','LIKE', '%' . $term . '%')\n ->orWhere('nombreAgneauMort','LIKE', '%' . $term . '%')\n ->orWhere('ProblemeMisesBas','LIKE', '%' . $term . '%')\n ->orWhere('periodeMisesBas','LIKE', '%' . $term . '%')\n ->orWhere('methode','LIKE', '%' . $term . '%')\n ->orWhere('commentaire','LIKE', '%' . $term . '%')\n ->orWhere('ovins_RFID','LIKE', '%' . $term . '%')\n ->orWhere('echographies_id','LIKE', '%' . $term . '%')\n ->orWhere('id','LIKE', '%' . $term . '%')->get();\n }\n }]\n ])\n ->orderBy('id', \"desc\")\n ->paginate(15);\n return view('mises_bas.index' , compact('mises_bas'))\n ->with('i', (request()->input('page', 1) -1) *5);\n\n /* $mises_bas = mises_bas::paginate(2);\n return view('mises_bas.index', compact('mises_bas'));*/\n }", "title": "" }, { "docid": "2eba38f3e9fb00c455a368aa42c5e357", "score": "0.55603737", "text": "function VisualizzaMercatinoFiltro($cid, $ID){\n\n\n\n\n\n $pagina = 1;\n \tif (isset($_POST[\"pagina\"]))\n \t\t$pagina = $_POST[\"pagina\"];\n\n \t$nrows = 5;\n \t$offset = 5*($pagina-1);\n\n\n $sql=\"SELECT Titolo,Bicicletta.Marca,Bicicletta.Colore,Bicicletta.Anno_Produzione,Anno_Acquisto,Tipo_Bicicletta,Annuncio.Prezzo,Descrizione,Stato,Venditore,ID_Annuncio\n FROM Annuncio INNER JOIN Bicicletta ON (Bicicletta=ID_Bike) JOIN FiltroAnnuncio ON Utente='$ID' WHERE Stato='In vendita' AND Bicicletta.Marca=FiltroAnnuncio.Marca AND Bicicletta.Colore=FiltroAnnuncio.Colore AND Annuncio.Prezzo<=FiltroAnnuncio.Prezzo\n LIMIT $nrows OFFSET $offset\";\n\n \t $res=$cid->query($sql) Or die (\"<p>Inpossibile eseguire query.</p>\" . \"<p>Codice errore \" . $cid->errno\n \t. \": \" . $cid->error) . \"</p>\";\n\n \tif ($res->num_rows==0)\n \t\techo \"<table align='center'> <td>Non ci sono annunci corrispondenti al tuo filtro.</td></table> </br>\";\n \telse{\n \t\techo \"<table align='center'>\";\n \t\techo \"<tr><th>Titolo annuncio</th><th>Marca</th><th>Colore</th><th>Anno di Produzione</th><th>Anno di acquisto</th><th>Tipo bicicletta</th><th>Prezzo</th><th>Descrizione</th><th>Stato</th></tr>\";\n \t}\n \twhile ($row = $res->fetch_row()){\n \techo \"<tr>\";\n \techo \"<td>$row[0]</td>\";\n \techo \"<td>$row[1]</td>\";\n \techo \"<td>$row[2]</td>\";\n \techo \"<td>$row[3]</td>\";\n echo \"<td>$row[4]</td>\";\n echo \"<td>$row[5]</td>\";\n echo \"<td>$row[6]</td>\";\n echo \"<td>$row[7]</td>\";\n echo \"<td>$row[8]</td>\";\n echo \"<td><a href='./index.php?op=Mercatino&bk=VisualizzaMercatino&bkk=$row[9]&opann=$row[10]' class=\\\"shiny-button\\\" >Visualizza</a></td>\";\n\n\n \techo \"</tr>\";\n \t}\n \techo \"<tr><td colspan='12'>\";\n\n \t$sql2=\"SELECT Titolo,Bicicletta.Marca,Bicicletta.Colore,Bicicletta.Anno_Produzione,Anno_Acquisto,Tipo_Bicicletta,Annuncio.Prezzo,Descrizione,Stato,Venditore,ID_Annuncio\n FROM Annuncio INNER JOIN Bicicletta ON (Bicicletta=ID_Bike) JOIN FiltroAnnuncio ON Utente='$ID' WHERE Stato='In vendita' AND Bicicletta.Marca=FiltroAnnuncio.Marca AND Bicicletta.Colore=FiltroAnnuncio.Colore AND Annuncio.Prezzo<=FiltroAnnuncio.Prezzo\";\n \t $res2 = $cid->query($sql2)\n \t\t or die(\"Impossibile eseguire query. <br> Codice errore \". $cid->errno .\": \". $cid->error .\"<br>\");\n \t $numrows = $res2->num_rows;\n \t $paginaMax = ceil($numrows/$nrows); //con ceil arrotondo per eccesso\n\n \t echo \"<div style='float: left; width: 50%; text-align: right;'> <form style'float: left;' method='POST' action='./index.php?op=Mercatino&bk=VisualizzaMercatino'>\";\n \t if($pagina!=1) {\n \t\t ?>\n \t\t <input type='hidden' name='pagina' value=\"<?php echo $pagina-1; ?>\">\n <input type='hidden' name='FiltroAnnuncio' value=\"SI\">\n \t<?php\n\n \t\t echo '<input type=\"submit\" class=\"shiny-button\" value=\"Precedente\">';\n \t }\n \techo \"</form></div>\";\n \techo '<div style=\"float: right; width: 50%; text-align: left;\"> <form style=\"float: left;\" method=\"POST\" action=\"./index.php?op=Mercatino&bk=VisualizzaMercatino\">';\n \t if($pagina!=$paginaMax && $paginaMax!=0) {\n \t\t ?>\n \t\t <input type='hidden' name='pagina' value=\"<?php echo $pagina+1; ?>\">\n <input type='hidden' name='FiltroAnnuncio' value=\"SI\">\n \t<?php\n \t\techo ' <input type=\"submit\" class=\"shiny-button\" value=\"Successivo\">';\n \t }\n \techo \"</form></div>\";\n\n \t echo \"</td></tr>\";\n \t echo \"</table>\";\n \t echo '<br/><br/>';\n }", "title": "" }, { "docid": "7a00606d89ec49cd1de8d40d2d678175", "score": "0.5548884", "text": "public function index(Request $request)\n { \n $this->data['filter'] = $request->query('filter');\n if($this->data['filter']!=null){\n $this->data['filter'] = $request->query('filter');\n $this->data['pegawai']=Pegawai::where('pegawai.full_name', 'like', '%'.$this->data['filter'].'%')\n ->orWhere('pegawai.nik', 'like', '%'.$this->data['filter'].'%')->orderBy('id', 'DESC')->paginate(2);\n }\n else{\n $this->data['pegawai'] = Pegawai::orderBy('id', 'DESC')->paginate(1); \n } \n return view('admin.pegawai.index', $this->data);\n }", "title": "" }, { "docid": "66cd2f3344fe97fd8375397ada746c23", "score": "0.553504", "text": "public function findMedecinParregionAction($ville,$page) {\n $professionmedecin= $this->getDoctrine()->getRepository('PortailFrontBundle:Profession')->findOneBy(array('designation'=>'Médecin')); \n $repository = $this->getDoctrine()->getRepository('PortailFrontBundle:User'); \n $adapter = new ArrayAdapter($repository->findBy(array('enabled'=>1,'profession'=>$professionmedecin->getId(),'ville'=>$ville)));\n $pager = new Pagerfanta($adapter);\n\n $pager->setMaxPerPage(3); \n if( !$page ) {\n\n $page = 1; }\n\n try {\n\n $pager->setCurrentPage($page);\n\n } catch (NotValidCurrentPageException $e) {\n\n throw new NotFoundHttpException();\n }\n $specialite = $this->getDoctrine()->getRepository('PortailFrontBundle:Specialite')->findAll();\n return $this->render('PortailAnnuaireBundle:AnnuaireMedecin:RechercheParcarte.html.twig',array('pager'=> $pager,'specialite'=> $specialite));\n \n }", "title": "" }, { "docid": "1fface8a93601011d620a71300607a2a", "score": "0.553265", "text": "function nattours_remove_filters() {\n remove_filter('piklist_admin_pages', array('piklist_setting', 'admin_pages'));\n }", "title": "" }, { "docid": "6603a4dc9cd33aa7b520602df10cf955", "score": "0.55239", "text": "public function servicios( $filtro = '' ){\n\t // verificar permisos\n \tif( $this->checkPermissions( 'reporte', 'servicios' ) === FALSE ):\n \t\t$this->iraBuscar('alert-danger','<strong>Acceso denegado: </strong> usted no ha sido autorizado a acceder a esta secci&oacute;n.');\n \tendif;\n \n $this->Paginator->settings = $this->servicios_paginate;\n $this->set('servicios',$this->Paginator->paginate($this->ServicioTecnologico,array(\n 'OR' => \n array('ServicioTecnologico.nombre_servicio LIKE'=>\"%{$filtro}%\",'ServicioTecnologico.descripcion_servicio LIKE'=>\"%{$filtro}%\",'Empresa.nombre_empresa LIKE'=>\"{$filtro}%\")\n )\n ));\n $this->set('filtro',$filtro);\n }", "title": "" }, { "docid": "00eee76b8477ac1b30c54e07fa6b7490", "score": "0.5514365", "text": "public function addInLandingPageFilter()\n {\n return $this->getSelect()->where('main_table.in_landingpage = 1');\n }", "title": "" }, { "docid": "8f30de585cefe29b85a00b2b32084f6e", "score": "0.5504066", "text": "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda documento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e5720b373bc3d0021ffa0a9e6f493e83", "score": "0.55031544", "text": "public function serverPaginationFilteringFor(Request $request): LengthAwarePaginator\n {\n $roles = $this->allWithBuilder();\n\n if ($request->get('search') !== null) {\n $term = $request->get('search');\n $roles->where('first_name', 'LIKE', \"%{$term}%\")\n ->orWhere('last_name', 'LIKE', \"%{$term}%\")\n ->orWhere('email', 'LIKE', \"%{$term}%\")\n ->orWhere('id', $term);\n }\n\n if ($request->get('order_by') !== null && $request->get('order') !== 'null') {\n $order = $request->get('order') === 'ascending' ? 'asc' : 'desc';\n\n $roles->orderBy($request->get('order_by'), $order);\n } else {\n $roles->orderBy('created_at', 'desc');\n }\n\n return $roles->paginate($request->get('per_page', 10));\n }", "title": "" }, { "docid": "10bcee80d7f409bd89a871e21845b644", "score": "0.5502223", "text": "public function getPaginator();", "title": "" }, { "docid": "fffd22f18f0e225b9c7b14c84c0ba24a", "score": "0.54999185", "text": "public function getListFilter(ServerRequestInterface $request)\n {\n $params = $request->getQueryParams();\n\n $keywords = [\n 'per_page',\n 'page',\n 'order',\n ];\n\n $keywords = array_flip($keywords);\n\n $allowedFilterFields = $this->getAllowedFilterFields();\n\n $translations = $this->getApiNames(true);\n\n $filters = [];\n\n foreach($params as $key=>$value) {\n if (isset($keywords[$key])) {\n continue;\n }\n\n if (isset($this->routeOptions['multiOranizationField'], $this->routeOptions['multiOranizationField']['field'])\n && $key == $this->routeOptions['multiOranizationField']['field']) {\n $field = $this->routeOptions['multiOranizationField']['field'];\n $separator = $this->routeOptions['multiOranizationField']['separator'];\n $organizationIds = $value;\n if (!is_array($organizationIds)) {\n $organizationIds = explode(',', $organizationIds);\n }\n\n $organizationFilter = [];\n foreach($organizationIds as $organizationId) {\n $organizationFilter[] = $field . ' LIKE '. $this->db1->quote('%'.$separator . $organizationId . $separator . '%');\n }\n if (!empty($organizationFilter)) {\n $filters[] = '(' . join(' OR ', $organizationFilter) . ')';\n }\n\n continue;\n }\n\n $colName = $key;\n if (isset($translations[$key])) {\n $colName = $translations[$key];\n }\n\n if ($allowedFilterFields === null || in_array($colName, $allowedFilterFields)) {\n if (is_string($value) || is_numeric($value)) {\n if (strpos($value, '[') === 0 && strpos($value, ']') === strlen($value) - 1) {\n $values = explode(',', str_replace(['[', ']'], '', $value));\n $firstValue = reset($values);\n switch ($firstValue) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n case '!=':\n case 'LIKE':\n case 'NOT LIKE':\n $secondValue = end($values);\n if (is_numeric($secondValue)) {\n $secondValue = ($secondValue == (int)$secondValue) ? (int)$secondValue : (float)$secondValue;\n }\n if ($firstValue == 'LIKE' || $firstValue == 'NOT LIKE') {\n $secondValue = $this->db1->quote($secondValue);\n }\n $filters[] = $colName . ' ' . $firstValue . ' ' . $secondValue;\n break;\n default:\n $filters[$colName] = $values;\n break;\n }\n } else {\n switch (strtoupper($value)) {\n case 'IS NULL':\n case 'IS NOT NULL':\n $filters[] = $colName . ' ' . $value;\n break;\n default:\n $filters[$colName] = $value;\n }\n }\n } elseif (is_array($value)) {\n $filters[$colName] = $value;\n }\n }\n }\n\n return $filters;\n }", "title": "" }, { "docid": "88c88dc4818c43388886f9d6d8e2d91c", "score": "0.54998785", "text": "public function beforeFilter(){\n\t\t$this->verificarModulo('proyecto.comentarios');\n\t\tparent::beforeFilter();\n\t}", "title": "" }, { "docid": "522d70df593874631743e29ef667fb5c", "score": "0.5487846", "text": "public function paginar($page_size, $offset, $busqueda, $campo)\n {\n\n $this->db->select();\n $this->db->from('informacion');\n $this->db->limit($page_size, $offset);\n if ($busqueda != \"\" && $campo != \"\") {\n $this->db->group_start();\n if ($campo == \"id_corregimiento\") {\n $this->db->where(\"id_corregimiento\", $busqueda);\n }\n if ($campo == \"nombrecorregimiento\") {\n $this->db->like('nombrecorregimiento', $busqueda);\n }\n if ($campo == \"municipio\") {\n $this->db->like(\"municipio\", $busqueda);\n }\n if ($campo == \"veredas\") {\n $this->db->like(\"veredas\", $busqueda);\n }\n if ($campo == \"pobladores\") {\n $this->db->like(\"pobladores\", $busqueda);\n }\n if ($campo == \"ubicacionlatitud\") {\n $this->db->like(\"ubicacionlatitud\", $busqueda);\n }\n if($campo ==\"area\"){\n $this->db->like(\"area\", $busqueda);\n }\n if($campo ==\"nautoridadprincipal\"){\n $this->db->like(\"nautoridadprincipal\", $busqueda);\n }\n if($campo ==\"nautoridadpolicial\"){\n $this->db->like(\"nautoridadpolicial\", $busqueda);\n }\n if($campo ==\"miembrosjal\"){\n $this->db->like(\"miembrosjal\", $busqueda);\n }\n if ($campo == \"jal\") {\n $this->db->like(\"jal\", $busqueda);\n }\n if ($campo == \"codigodane\") {\n $this->db->like(\"codigodane\", $busqueda);\n }\n if ($campo == \"numeroadministrativo\") {\n $this->db->like(\"numeroadministrativo\", $busqueda);\n }\n $this->db->group_end();\n }\n\n $sql = $this->db->get();\n return $sql->result();\n }", "title": "" }, { "docid": "ded659c7c7c8ba8c1acdb9cdf857e38e", "score": "0.5478417", "text": "function getAllPaginatedFiltered($page=1,$perPage=-1) {\n\t\tif ($perPage == -1)\n\t\t\t$perPage = \tActionLogPeer::getRowsPerPage();\n\t\tif (empty($page))\n\t\t\t$page = 1;\n\t\t$cond = $this->getSearchCriteria();\n\t\t$pager = new PropelPager($cond,\"ActionLogPeer\", \"doSelect\",$page,$perPage);\n\t\treturn $pager;\n\t }", "title": "" }, { "docid": "2846e3c3938befd6e0201d18e84ee13c", "score": "0.54718506", "text": "public function getAllAndPaginate($limit = 10, $params = []);", "title": "" }, { "docid": "5bb1050069dcde0761935759b9f5dcb4", "score": "0.54686", "text": "function mostraPagina()\n\t\t{\n\t\t// prepara la pagina, ossia il contenitore della tabella\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Azioni tabelle\", \"titolo\");\n\t\t$this->aggiungiElemento($this->creaTabella());\n\t\t\n\t\t// manda in output l'intera pagina\n\t\t$this->mostra();\n\t\t}", "title": "" }, { "docid": "245c7be2882d29e49437c87ae19fd33d", "score": "0.54635274", "text": "function selectProductoFiltro($desde,$hasta)\n\t\t{\n\t\t//include(\"cms/core/mapping/functions.mapping.php\");\n\t\t$db = new Database();\n\t\t$db->connect();\n\t\t$constructor = new CMS_mapping(\"cms_productos\", $db);\n\t\t$db->doQuery(\"SELECT * FROM cms_productos WHERE precio_producto BETWEEN '\".$desde.\"' AND '\".$hasta.\"' ORDER BY precio_producto,nombre_producto_es asc\", SELECT_QUERY);\n\t\t$results = $db->results;\n\t\t$obj = $constructor->mapping($results);\n\t\t//print_r($obj);\n\t\t echo \"<ul class='clearfix'>\";\n\t\tif(count($obj->id_producto) > 0){ \n\t\t\t$datos=6;\n\t\t\t$pagina=1;\n\t\t\tif (!empty($_GET['pagina'])){\n\t\t\t$pagina=$_GET['pagina'];\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$pg=paginacion1($datos,count($obj->id_producto),$pagina);\n\t\t\t\t\t\n\t\t\tfor($c=$pg[1]; $c < $pg[2]; $c++){\n\t\t\t\t echo \"<li>\n\t\t\t\t\t\t<a href='detalle.php?id=\".$obj->id_producto[$c].\"'>\n\t\t\t\t\t\t <span class='entrar'>entrar</span>\n\t\t\t\t\t\t <img src='admin/modules/producto/files/\".$obj->imagen[$c].\"' width='306' height='150'> \n\t\t\t\t\t\t</a>\";\n\t\t\t\t\t\t\n\t\t\t\t if($_SESSION['idioma'] == \"en\"){\t\n\t\t\t\t\t echo \"<h3>\".$obj->nombre_producto_en[$c].\"</h3>\n\t\t\t\t\t\t\t<h4>Ref: \".$obj->referencia_producto_en[$c].\"</h4>\n\t\t\t\t\t\t\t<h4>$\".$obj->precio_producto[$c].\"</h4>\";\n\t\t\t\t }else{ \n\t\t\t\t\t echo \"<h3>\".$obj->nombre_producto_es[$c].\"</h3>\n\t\t\t\t\t\t\t<h4>Ref: \".$obj->referencia_producto_es[$c].\"</h4>\n\t\t\t\t\t\t\t<h4>$\".$obj->precio_producto[$c].\"</h4>\";\n\t\t\t\t }\n\t\t\t\t\t echo \"</li>\";\n\t\t\t}\n\t\t\techo \"</ul>\";\n \t\t\techo \"<div class='clearfix pag' align='center'>\";\n\t\t\t\t\t\n\t\t\t\t\t$html = paginacion2($pagina,\"resultados.php?buscar=$buscar&\",$pg[0]);\n\t\t\t\t\techo $html;\n\t\t\t\t\t\n\t\t\techo \"</div>\";\t\t\t\n\t\t}else{\n\t\t\techo \"No hay registros en esta busqueda <b>\".$buscar.\"</b>\";\t\n\t\t}\n\t\t$db->disconnect();\n\t\t}", "title": "" }, { "docid": "418fde381f58676e98d1f47beaa74c42", "score": "0.5462224", "text": "private function filtro3()\n {\n //Cuanto se vendio, por tarjeta, giro, efectivo\n $sucursal = request()->has(\"SUCURSAL\") ? request()->input(\"SUCURSAL\") : session(\"SUCURSAL\");\n\n $medio_pago = Ventas::where(\"SUCURSAL\", $sucursal)->select(DB::raw(\"count(REGNRO) AS NUMERO_VENTAS\"), \"FORMA\")->groupBy(\"FORMA\")\n ->orderByRaw(\" count(REGNRO) DESC \");\n\n $sucursalModel = Sucursal::find($sucursal);\n $descripcionSucursal = \"\";\n if (!is_null($sucursalModel))\n $descripcionSucursal = $sucursalModel->MATRIZ == \"S\" ? \"CASA CENTRAL\" : \"SUC. $sucursalModel->DESCRIPCION\";\n\n $titulo = \"MEDIOS DE PAGO PREFERIDOS - $descripcionSucursal\";\n return ['titulo' => $titulo, \"data\" => $medio_pago];\n }", "title": "" }, { "docid": "a5ccc7c75e6c67599cdfc9e6aebe0da6", "score": "0.5458542", "text": "private function setFilter()\n {\n $this->filter['categories'] = $this->getParameter('categories', 'array');\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }", "title": "" }, { "docid": "ffe356cf7d5601d270cc34e934591623", "score": "0.5458007", "text": "function bizz_wp_pagenavi($before = '', $after = '') {\n global $wpdb, $wp_query;\n\t\n\t// custom filter\n\t$args = apply_filters('bizz_filter_pagination', null);\n\t\n if (!is_single()) {\n\t\t// custom variables\n $request = $wp_query->request;\n $posts_per_page = intval(get_query_var('posts_per_page'));\n $paged = intval(get_query_var('paged'));\n $pagenavi_options = get_option('pagenavi_options');\n $pagenavi_options = wp_parse_args( (array) $args, $pagenavi_options );\n $numposts = $wp_query->found_posts;\n $max_page = $wp_query->max_num_pages;\n\t\t$container_before = ( isset($args['container_before']) ) ? $args['container_before'] : \"<div class='fix'><!----></div>\\n<div class='pagination_area clearfix'>\\n\";\n\t\t$container_after = ( isset($args['container_after']) ) ? $args['container_after'] : \"<div class='pagination_loading'><!----></div>\\n</div>\\n\";\n\t\t$ul_class = ( isset($args['ul_class']) ) ? $args['ul_class'] : \"lpag\";\n\t\t$active_class = ( isset($args['active_class']) ) ? $args['active_class'] : \"current\";\n\t\t$prev_link = ( isset($args['prev_link']) ) ? $args['prev_link'] : \"<li>\\n\".get_previous_posts_link($pagenavi_options['prev_text']).\"</li>\\n\";\n\t\t$next_link = ( isset($args['next_link']) ) ? $args['next_link'] : \"<li>\\n\".get_next_posts_link($pagenavi_options['next_text'], $max_page).\"</li>\\n\";\n\t\t\t\t\t\t\n if(empty($paged) || $paged == 0) {\n $paged = 1;\n }\n $pages_to_show = intval($pagenavi_options['num_pages']);\n $pages_to_show_minus_1 = $pages_to_show-1;\n $half_page_start = floor($pages_to_show_minus_1/2);\n $half_page_end = ceil($pages_to_show_minus_1/2);\n $start_page = $paged - $half_page_start;\n if($start_page <= 0) {\n $start_page = 1;\n }\n $end_page = $paged + $half_page_end;\n if(($end_page - $start_page) != $pages_to_show_minus_1) {\n $end_page = $start_page + $pages_to_show_minus_1;\n }\n if($end_page > $max_page) {\n $start_page = $max_page - $pages_to_show_minus_1;\n $end_page = $max_page;\n }\n if($start_page <= 0) {\n $start_page = 1;\n }\n if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {\n echo $container_before;\n\t\t\techo $before.'<ul class=\"'.$ul_class.'\">'.\"\\n\";\n switch(intval($pagenavi_options['style'])) {\n case 1: \n if ($start_page >= 2 && $pages_to_show < $max_page) {\n $first_page_text = str_replace(\"%TOTAL_PAGES%\", number_format_i18n($max_page), '&laquo; '.stripslashes(__('First', 'bizzthemes')));\n echo '<li><a href=\"'.esc_url(get_pagenum_link()).'\" title=\"'.$first_page_text.'\">'.$first_page_text.'</a></li>';\n if(!empty($pagenavi_options['dotleft_text'])) {\n echo '<li>'.$pagenavi_options['dotleft_text'].'</li>';\n }\n }\n\t\t\t\t\t// Previous\n\t\t\t\t\techo $prev_link;\n\t\t\t\t\t\n for($i = $start_page; $i <= $end_page; $i++) { \n if($i == $paged) {\n $current_page_text = str_replace(\"%PAGE_NUMBER%\", number_format_i18n($i), $pagenavi_options['current_text']);\n echo '<li class=\"'.$active_class.'\"><span>'.$current_page_text.'</span></li>';\n } else {\n $page_text = str_replace(\"%PAGE_NUMBER%\", number_format_i18n($i), $pagenavi_options['page_text']);\n echo '<li><a href=\"'.esc_url(get_pagenum_link($i)).'\" title=\"'.$page_text.'\">'.$page_text.'</a></li>';\n }\n }\n\t\t\t\t\t// Next\n\t\t\t\t\techo $next_link;\n\t\t\t\t\t\n if ($end_page < $max_page) {\n if(!empty($pagenavi_options['dotright_text'])) {\n echo '<li>'.$pagenavi_options['dotright_text'].'</li>';\n }\n $last_page_text = str_replace(\"%TOTAL_PAGES%\", number_format_i18n($max_page), ''.stripslashes(__('Last', 'bizzthemes')).' &raquo;');\n echo '<li><a href=\"'.esc_url(get_pagenum_link($max_page)).'\" title=\"'.$last_page_text.'\">'.$last_page_text.'</a></li>';\n }\n break;\n case 2;\n echo '<form action=\"'.htmlspecialchars($_SERVER['PHP_SELF']).'\" method=\"get\">'.\"\\n\";\n echo '<select size=\"1\" onchange=\"document.location.href = this.options[this.selectedIndex].value;\">'.\"\\n\";\n for($i = 1; $i <= $max_page; $i++) {\n $page_num = $i;\n if($page_num == 1) {\n $page_num = 0;\n }\n if($i == $paged) {\n $current_page_text = str_replace(\"%PAGE_NUMBER%\", number_format_i18n($i), $pagenavi_options['current_text']);\n echo '<option value=\"'.esc_url(get_pagenum_link($page_num)).'\" selected=\"selected\" class=\"'.$active_class.'\">'.$current_page_text.\"</option>\\n\";\n } else {\n $page_text = str_replace(\"%PAGE_NUMBER%\", number_format_i18n($i), $pagenavi_options['page_text']);\n echo '<option value=\"'.esc_url(get_pagenum_link($page_num)).'\">'.$page_text.\"</option>\\n\";\n }\n }\n echo \"</select>\\n\";\n echo \"</form>\\n\";\n break;\n }\n echo '</ul>'.$after.\"\\n\";\n\t\t\techo $container_after;\n }\n }\n}", "title": "" }, { "docid": "7dcb3eb1d03c37528bf826750f9ca260", "score": "0.5456983", "text": "public function filter(Request $request) \n {\n $auth = \\Auth::user(); \n $theme = $auth->theme;\n\n $filters=$this->getControllerStateSession('mappingprogramtoopd','filters');\n $json_data = [];\n\n //index\n if ($request->exists('OrgIDRPJMD'))\n {\n $OrgIDRPJMD = $request->input('OrgIDRPJMD')==''?'none':$request->input('OrgIDRPJMD');\n $filters['OrgIDRPJMD']=$OrgIDRPJMD; \n $this->putControllerStateSession('mappingprogramtoopd','filters',$filters);\n\n $data = $this->populateData();\n\n $datatable = view(\"pages.$theme.dmaster.mappingprogramtoopd.datatable\")->with(['page_active'=>'mappingprogramtoopd', \n 'search'=>$this->getControllerStateSession('mappingprogramtoopd','search'),\n 'numberRecordPerPage'=>$this->getControllerStateSession('global_controller','numberRecordPerPage'), \n 'column_order'=>$this->getControllerStateSession('mappingprogramtoopd.orderby','column_name'),\n 'direction'=>$this->getControllerStateSession('mappingprogramtoopd.orderby','order'),\n 'data'=>$data])->render();\n\n $json_data = ['success'=>true,'datatable'=>$datatable];\n } \n return $json_data;\n }", "title": "" }, { "docid": "824cac10709521f245413291367ff1a5", "score": "0.54531723", "text": "public function sorties_paginate() {\n $this->autoRender = false;\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n// header('Content-type: application/json');\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\");\n header(\"Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n if ($this->request->is('post')) {\n $data = $this->request->data;\n// debug($data);\n $limit = 15;\n if (!empty($data['Sortie']['limit'])) {\n $limit = $data['Sortie']['limit'];\n }\n $search = \"\";\n if (!empty($data['Sortie']['searchKey'])) {\n $search = $data['Sortie']['searchKey'];\n $filters = array(\n 'Sortie.type' => 'Sortie',\n \"lower(Sortie.ref) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.entrepot_depart) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.entrepot_arrivee) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.created) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.date_livraison) like '%\" . $search . \"%'\");\n $this->Paginator->settings['paramType'] = 'querystring';\n $this->Paginator->settings['conditions'] = $filters;\n $this->Paginator->settings['order'] = 'Sortie.created DESC';\n $this->Paginator->settings['limit'] = $limit;\n $sorties = $this->paginate('Sortie');\n } else {\n $this->Paginator->settings['paramType'] = 'querystring';\n $this->Paginator->settings['order'] = 'Sortie.created DESC';\n $filters = array('Sortie.type' => 'Sortie');\n $this->Paginator->settings['conditions'] = $filters;\n $this->Paginator->settings['limit'] = $limit;\n $sorties = $this->paginate('Sortie');\n }\n http_response_code(200);\n echo json_encode(array(\n 'data' => array(\n 'sorties' => $sorties,\n 'pageCount' => $this->params['paging']\n ),\n 'status' => 200,\n 'type' => 'success'\n ));\n die();\n }\n }", "title": "" }, { "docid": "b44c9bc8189c08e3314c71caa3d0bc4c", "score": "0.54460406", "text": "protected function getFilters()\n { \n $filters = parent::getFilters(); \n $filters['internado_id'] = sfContext::getInstance()->getRequest()->getParameter('internado_id');\n return $filters;\n }", "title": "" }, { "docid": "e893513e3094322841e72f21e494e774", "score": "0.5443467", "text": "public function paginate(FilterInterface $filter): ?Paginate;", "title": "" }, { "docid": "b8d10318a0e095d634b59ba0dabea71a", "score": "0.54408216", "text": "public function getNoticiaAction($pagina)\n {\n $em = $this->getDoctrine()->getManager();\n $qb = $em->createQueryBuilder('i');\n $parameters = array( //parametros para el query\n 'fechadehoy' => new \\DateTime(),\n\n );\n\n //query para filtrar las visibles y con fecha anterior al dia de hoy (no futura)\n $results = $em->createQuery('SELECT i FROM SitioBundle:Noticia i'\n . ' WHERE i.visible=TRUE and i.fechaHora <= :fechadehoy'\n . ' ORDER BY i.id DESC')\n ->setParameters($parameters)\n ->setFirstResult($pagina)\n ->setMaxResults(1)\n ->getResult();\n return $results;\n }", "title": "" }, { "docid": "7e49d4f61ffb8f972ec42cba3d2a4172", "score": "0.5431636", "text": "public function index(Request $request)\n {\n \n $buscar = $request->buscar;\n $criterio = $request->criterio;\n \n if ($buscar==''){\n $recepcion = Recepcion::join('personas','id_prs_entrega','=','personas.id')\n ->select('recepcion.id','recepcion.id_prs_entrega as identrega','recepcion.codigo','recepcion.cantidad','personas.paterno as paterno','recepcion.fecha as fecha','recepcion.hora','recepcion.liquido','recepcion.solido','recepcion.cliente','recepcion.observaciones','recepcion.usr_id','recepcion.estado')\n ->orderBy('recepcion.id', 'desc')->paginate(10);\n }\n else{\n $recepcion = Recepcion::join('personas','id_prs_entrega','=','personas.id')\n ->select('recepcion.id','recepcion.id_prs_entrega as identrega','recepcion.codigo','recepcion.cantidad','personas.paterno as paterno','recepcion.fecha as fecha','recepcion.hora','recepcion.liquido','recepcion.solido','recepcion.cliente','recepcion.observaciones','recepcion.usr_id','recepcion.estado')\n ->where('recepcion.'.$criterio, 'like', '%'. $buscar . '%')\n ->orderBy('recepcion.id', 'desc')->paginate(10);\n }\n \n \n return [\n 'pagination' => [\n 'total' => $recepcion->total(),\n 'current_page' => $recepcion->currentPage(),\n 'per_page' => $recepcion->perPage(),\n 'last_page' => $recepcion->lastPage(),\n 'from' => $recepcion->firstItem(),\n 'to' => $recepcion->lastItem(),\n ],\n 'recepcion' => $recepcion\n ];\n }", "title": "" }, { "docid": "4e1f3cce8993adb2d60db41d594bccf0", "score": "0.5430642", "text": "function PaginatedPages() {\n\t\t$list = new PaginatedList(NewsArticle::get()->filter(\"ParentID\",$this->ID), $this->request);\n\t\t$list->setPageLength(10);\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "55330b33b1bf561e03501cff9cc3aa7b", "score": "0.54260737", "text": "protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();Session::getInstance()->set($this->namefilter, $parramsfilter);\n }\n if ($this->_getSanitizedParam(\"cleanfilter\") == 1) {\n Session::getInstance()->set($this->namefilter, '');\n Session::getInstance()->set($this->namepageactual,1);\n }\n }", "title": "" }, { "docid": "a9fe688833b8fe1dc76e8e75e50051b9", "score": "0.54237014", "text": "public function list() {\n $content = [];\n $gets =\\Drupal::request()->query->all();\n $nomu = $gets['nomu'];\n $co_orie = $gets['co_orie'];\n\n\n $content['filtres'] = \\Drupal::formBuilder()->getForm('Drupal\\plan\\Form\\FiltresForm', $r->comment, $r->co_omodu);\n\n $headers = array(\n 'nomu_o' => t('Resp. O'),\n 'co_tpla' => t('Plan'),\n 'co_orie' => t('Orie'),\n 'id_disp' => t('Id disp'),\n 'co_modu' => t('Module'),\n 'libl' => t('Titre'),\n 'nomu_p' => t('Resp. P.'),\n 'prio_nat' => array('data' => t('Priorité nationale'), 'class' => 'orangebg'),\n 'thematique' => array('data' => t('Thématique'), 'class' => 'orangebg'),\n );\n\n // switch database (cf settings.php)\n \\Drupal\\Core\\Database\\Database::setActiveConnection('external');\n // Build query\n $count = 12;\n\n $query = db_select('gbb_gdisp', 'd');\n $query ->leftjoin('gbb_gmodu', 'm', 'd.co_disp = m.co_disp and d.co_degre=m.co_degre');\n $query ->leftjoin('gbb_gmodu_plus', 'mm', 'mm.co_modu = m.co_modu AND mm.co_degre = m.co_degre');\n $query ->leftjoin('gbb_gdire', 'do', 'do.co_modu = m.co_modu AND do.co_degre = m.co_degre AND do.co_tres = 2');\n $query ->leftjoin('gbb_gdire', 'dp', 'dp.co_modu = m.co_modu AND dp.co_degre = m.co_degre AND dp.co_tres = 3');\n $query ->leftjoin('gbb_gresp', 'ro', 'do.co_resp = ro.co_resp AND do.co_degre = ro.co_degre');\n $query ->leftjoin('gbb_gresp', 'rp', 'dp.co_resp = rp.co_resp AND dp.co_degre = rp.co_degre');\n $query ->condition('d.id_disp', '19%', 'LIKE');\n $query ->condition('d.id_disp', '19N%', 'NOT LIKE');\n // $query ->condition('d.co_andi', '19%', 'LIKE');\n if (strlen($nomu)>0) $query ->condition('ro.nomu', $nomu, 'like');\n if (strlen($co_orie)>0) $query ->condition('d.co_orie', $co_orie, 'like');\n $query ->fields('m', array(\n 'libl', 'co_modu', 'co_degre', 'lpeda', 'co_anmo',\n ));\n $query ->fields('d', array(\n 'id_disp', 'co_tpla', 'co_orie',\n ));\n $query ->fields('mm', array(\n 'prio_nat', 'thematique',\n ));\n // $query ->fields('ro', array('nomu'));\n $query ->addfield('d', 'libl', 'libdispo');\n $query ->addField('ro', 'nomu', 'nomu_o');\n $query ->addField('rp', 'nomu', 'nomu_p');\n $query ->distinct();\n $pager = $query->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender')->limit($count);\n\n $rows = array();\n foreach ($result = $pager->execute()->fetchAll() as $r) {\n $prio_nat = \\Drupal::formBuilder()->getForm('Drupal\\plan\\Form\\PrioNatForm', $r->prio_nat, $r->co_modu, $r->co_degre, $r->co_tpla,$r->id_disp);\n $thematique = \\Drupal::formBuilder()->getForm('Drupal\\plan\\Form\\ThematiqueForm', $r->thematique, $r->co_modu, $r->co_degre, $r->co_tpla,$r->id_disp);\n\n $titre = $r->libl;\n $class = \"normal\";\n if ($titre==\"\") {\n $titre = $r->libdispo;\n $class = \"red\";\n };\n if (strlen($r->co_anmo)>=1) {\n $class = \"strike\";\n }\n\n $rows[] = array(\n 'nomu_o' => array('data' => $r->nomu_o),\n 'co_tpla' => array('data' => $r->co_tpla),\n 'co_orie' => array('data' => $r->co_orie),\n 'id_disp' => array('data' => $r->id_disp),\n 'co_modu' => array('data' => new FormattableMarkup('<a href=\":link\">@name</a>', [':link' => \"../moduleng/\".$r->co_degre.\"/\".$r->co_modu, '@name' => $r->co_modu]), \"title\"=> $r->lpeda),\n 'libl' => array('data' => $titre, \"class\"=>$class),\n 'nomu_p' => array('data' => $r->nomu_p),\n 'prio_nat' => array('data' => $prio_nat),\n 'thematique' => array('data' => $thematique),\n );\n }\n\n $content['table'][] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n );\n $content['table'][] = array(\n '#type' => 'pager',\n );\n\n // Don't cache this page.\n $content['#cache']['max-age'] = 0;\n\n// drupal_flush_all_caches(); // For Drupal-8\n CacheCommands::clearRender();\n CacheCommands::clearPlugin();\n\n return $content;\n }", "title": "" }, { "docid": "6bde9785fb0684dacb73c6e49543c39c", "score": "0.54212683", "text": "function penerimaan_invoice_list($filter,$start,$end){\r\n\t\t\t$query = \"SELECT * FROM penerimaan_invoice\";\r\n\t\t\t\r\n\t\t\t// For simple search\r\n\t\t\tif ($filter<>\"\"){\r\n\t\t\t\t$query .=eregi(\"WHERE\",$query)? \" AND \":\" WHERE \";\r\n\t\t\t\t$query .= \" (invoice_id LIKE '%\".addslashes($filter).\"%' OR invoice_no LIKE '%\".addslashes($filter).\"%' OR invoice_supplier LIKE '%\".addslashes($filter).\"%' OR invoice_noorder LIKE '%\".addslashes($filter).\"%' OR invoice_tanggal LIKE '%\".addslashes($filter).\"%' OR invoice_nilai LIKE '%\".addslashes($filter).\"%' )\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$result = $this->db->query($query);\r\n\t\t\t$nbrows = $result->num_rows();\r\n\t\t\t$limit = $query.\" LIMIT \".$start.\",\".$end;\t\t\r\n\t\t\t$result = $this->db->query($limit); \r\n\t\t\t\r\n\t\t\tif($nbrows>0){\r\n\t\t\t\tforeach($result->result() as $row){\r\n\t\t\t\t\t$arr[] = $row;\r\n\t\t\t\t}\r\n\t\t\t\t$jsonresult = json_encode($arr);\r\n\t\t\t\treturn '({\"total\":\"'.$nbrows.'\",\"results\":'.$jsonresult.'})';\r\n\t\t\t} else {\r\n\t\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "8a620773de37888229d6d77af636ffe1", "score": "0.54204375", "text": "public function set_items_filtered() {\n\n\t\t$filter_by = $this->get_filter_by();\n\t\t$this->items = appthemes_wp_list_filter( $this->items, $filter_by );\n\n\t\t// Look for a keyword search.\n\t\tif ( ! empty( $_GET['s'] ) ) { // Input var okay.\n\n\t\t\t$keyword = sanitize_text_field( wp_unslash( $_GET['s'] ) ); // Input var okay.\n\n\t\t\t$keyword = wp_strip_all_tags( $keyword );\n\t\t\t$filter_by = array( 'title' => $keyword, 'description' => $keyword );\n\n\t\t\t$this->items = appthemes_wp_list_filter( $this->items, $filter_by, $operator = 'OR', $match = true );\n\t\t}\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => count( $this->items ),\n\t\t\t'per_page' => $this->args['addons_per_page'],\n\t\t) );\n\n\t\t// Limit the add-ons list based on the current page.\n\t\t$this->items = array_slice( $this->items, ( $this->args['page'] - 1 ) * $this->args['addons_per_page'], $this->args['addons_per_page'] );\n\t}", "title": "" }, { "docid": "02489538861f164e7784ba72cd1920d9", "score": "0.5418394", "text": "function pagination($search, $filters=true)\n {\n if(method_exists($search, 'appends'))\n {\n $html = '<div class=\"text-center\">';\n $html .= $search->appends( $filters ? $_GET : null);\n $html .= \"</div>\";\n\n return $html;\n }\n\n return '';\n }", "title": "" }, { "docid": "1e58c5cfd1ba1392b650cfac0e6a5597", "score": "0.5416447", "text": "public function list_permohonan($search_string, $search_in, $order, $order_type, $uri3, $per_page, $for)\r\n\t{\r\n\t\t$limit_end = ($uri3 * $per_page - $per_page);\r\n\t\tif ($limit_end < 0){\r\n\t\t\t$limit_end = 0;\r\n\t\t}\r\n\r\n\t\t//we must avoid a page reload with the previous session data\r\n\t\t//if any filter post was sent, then it's the first time we load the content\r\n\t\t//in this case we clean the session filter data\r\n\t\t//if any filter post was sent but we are in some page, we must load the session data\r\n\r\n\t\t//filtered && || paginated\r\n\r\n\t\t/*kemungkinan kondisi\r\n\t\tfirst load ; $search_string=null, $this->uri->segment(3) !== true\r\n\t\tclick empty search; $search_string='', $this->uri->segment(3) !== true\r\n\t\tclick search; $search_string='xxx', $this->uri->segment(3) !== true\r\n\t\tclick pagination; $search_string=null, $this->uri->segment(3) == true*/\r\n\t\tif($uri3 == null){\r\n\t\t\tif( $search_string == null && $search_string !== '' ){\r\n\t\t\t\t$search_string = '';\r\n\t\t\t\t$search_in = 'NamaGedung';\r\n\t\t\t\t$order ='id';\r\n\t\t\t\t$order_type ='Desc';\r\n\t\t\t\t//console_log( '1' );\r\n\t\t\t}else{\r\n\t\t\t\t//console_log( '2' );\r\n\t\t\t}\r\n\t\t\t$filter_session_data['search_string_selected'] = $search_string;\r\n\t\t\t$filter_session_data['search_in_field'] = $search_in;\r\n\t\t\t$filter_session_data['order'] = $order;\r\n\t\t\t$filter_session_data['order_type'] = $order_type;\r\n\t\t\t$this->CI->session->set_userdata($filter_session_data);\r\n\t\t}else {\r\n\t\t\t$search_string = $this->CI->session->userdata('search_string_selected');\r\n\t\t\t$search_in = $this->CI->session->userdata('search_in_field');\r\n\t\t\t$order = $this->CI->session->userdata('order');\r\n\t\t\t$order_type = $this->CI->session->userdata('order_type');\r\n\t\t\t//console_log( '3' );\r\n\t\t}\r\n\r\n\t\t$data['search_string_selected'] = $search_string;\r\n\t\t$data['search_in_field'] = $search_in;\r\n\t\t$data['order'] = $order;\r\n\t\t$data['order_type_selected'] = $order_type;\r\n\t\t$data['permohonans'] = $this->CI->permohonan_model->get_permohonan_disposisi($search_string, $search_in, $order, $order_type, $per_page, $limit_end, $for);\r\n\t\t$data['count_permohonans']= $this->CI->permohonan_model->count_permohonan_disposisi($search_string, $search_in, $order, $for);\r\n\t\treturn $data;\r\n\r\n\t}", "title": "" }, { "docid": "cbbd480d9ce1a36dc78ff12c1936fb72", "score": "0.540318", "text": "public function filterAction(Request $request)\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $conf = $this->getUser()->getCurrentMainEvent();\n //Filters\n $filters = $this->createForm(new LocationFilterType($this->getUser()));\n $filters->submit($request);\n\n if ($filters->isValid())\n {\n // bind values from the request\n\n $entities = $em->getRepository('fibeContentBundle:Location')->filtering($filters->getData(), $conf);\n $nbResult = count($entities);\n\n //Pager\n $adapter = new ArrayAdapter($entities);\n $pager = new PagerFanta($adapter);\n $pager->setMaxPerPage($this->container->getParameter('max_per_page'));\n try\n {\n $pager->setCurrentPage($request->query->get('page', 1));\n } catch (NotValidCurrentPageException $e)\n {\n throw new NotFoundHttpException();\n }\n\n return $this->render(\n 'fibeContentBundle:Location:list.html.twig',\n array(\n 'pager' => $pager,\n 'nbResult' => $nbResult,\n )\n );\n }\n }", "title": "" }, { "docid": "ebf7216a6d083642d9852965412b149a", "score": "0.5403093", "text": "function get_my_questions_filter($id_siswa,$perpage,$page,$bab,$tingpel,$key){\n\n\t\t$this->db->select('`pertanyaan`.`id` AS `pertanyaanID`, `photo`, \n\t\t\t`namaDepan`, `namaBelakang`, `judulPertanyaan`, `tp.id` AS tingpel,\n\t\t\t`isiPertanyaan`, `pertanyaan`.`date_created`, mp.namaMataPelajaran, tp.keterangan,`bab`.`id` AS babID,\n\t\t\t`bab`.`judulBab`,(SELECT COUNT(id) FROM `tb_k_jawab` WHERE pertanyaanID = pertanyaan.id) AS jumlah,\n\t\t\t(SELECT CONCAT(`namaDepan`,\" \",`namaBelakang`) from tb_guru where id = pertanyaan.mentorID) as namaGuru');\n\t\t$this->db->join('`tb_bab` `bab`','`pertanyaan`.`babID` = `bab`.`id`');\n\t\t$this->db->join('`tb_tingkat-pelajaran` `tp`','`bab`.`tingkatPelajaranID` = `tp`.`id`');\n\t\t$this->db->join('`tb_siswa` `siswa`','`pertanyaan`.`siswaID` = `siswa`.`id`');\n\t\t$this->db->join('tb_mata-pelajaran mp', 'mp.id = tp.mataPelajaranID');\n\n\t\t$this->db->where('`siswa`.`id`', $id_siswa )->order_by('`pertanyaan`.`id`','desc');\n\t\t\n\t\tif ($bab=='all') {\n\t\t\t$this->db->where(\"tp.id\",$tingpel);\n\t\t}else{\n\t\t\t$this->db->where(\"tp.id\",$tingpel);\n\t\t\t$this->db->where(\"bab.id\",$bab);\n\t\t}\n\n\t\tif($key==!\"\"){\n\t\t\t$this->db->where(\"judulPertanyaan LIKE '%$key%'\n\t\t\t\")->order_by('`pertanyaan.date_created`','asc');\n\t\t}\n\t\t\n\n\t\t$query = $this->db->get('`tb_k_pertanyaan` `pertanyaan`',$perpage,$page);\n\t\tif ($query->result_array()==array()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn $query->result_array();\n\t\t}\n\n\t}", "title": "" }, { "docid": "6551a36c37f1b2449f0c027036c905cb", "score": "0.54009384", "text": "function peopledirectorykomentar_searchdata_all_bypage( $tbl_peopledirectorykomentar, $cari, $offset, $dataperPage ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_peopledirectorykomentar WHERE \n\t\t\tjudul LIKE '$cari' OR\n\t\t\tpesan LIKE '$cari' \n\t\t\t\tORDER BY id ASC LIMIT $offset, $dataperPage\n\t\t\"); \n \t\treturn $sql;\n}", "title": "" }, { "docid": "1069ef7b22006352b116ea33ed63550e", "score": "0.539918", "text": "public function index()\n {\n //\n $query = Ingredient::query();\n\n foreach (request('filter',[]) as $filter => $value) {\n\n if(!$query->hasNamedScope($filter)){\n return response()->json([\n 'Message' => \"El Filtro '{$filter}' no es permitido\"], 400);\n }\n\n $query->{$filter}($value);\n }\n\n\n return response()->json($query->simplePaginate(), 200);\n }", "title": "" }, { "docid": "0d7e1e95b1637059a247fe720eebdbfa", "score": "0.53987676", "text": "private function addPager() {\n\t\t$this->addHiddenValue('page', 1);\n\t}", "title": "" }, { "docid": "7f8d654f25c5e7f4224888023eaa5de1", "score": "0.53948706", "text": "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda intervento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "371790ca1bbd9e99f27dc032eb2cab1f", "score": "0.53912205", "text": "public function empresas( $filtro = '' ){\n\t // verificar permisos\n \tif( $this->checkPermissions( 'reporte', 'empresas' ) === FALSE ):\n \t\t$this->iraBuscar('alert-danger','<strong>Acceso denegado: </strong> usted no ha sido autorizado a acceder a esta secci&oacute;n.');\n \tendif;\n \n $this->Paginator->settings = $this->empresas_paginate;\n $this->set('empresas',$this->Paginator->paginate($this->Empresa,array(\n 'OR' => \n array('Empresa.nombre_empresa LIKE'=>\"%{$filtro}%\",'Empresa.nit LIKE'=>\"%{$filtro}%\",'Empresa.numero_registro LIKE'=>\"%{$filtro}%\")\n )\n ));\n $this->set('filtro',$filtro);\n }", "title": "" }, { "docid": "fdd889441936b7fa9707faf4689ffa02", "score": "0.53911865", "text": "public function index(Request $request){\n try{\n DB::enableQueryLog();\n $usuario = JWTAuth::parseToken()->getPayload();\n\n $elementos_por_pagina = 50;\n $pagina = Input::get('pagina');\n if(!$pagina){\n $pagina = 1;\n }\n\n $query = Input::get('query');\n $filtro = Input::get('filtro');\n\n $recurso = Entrada::with('proveedor')->where('entradas.clues',$usuario->get('clues'))->whereNull('entradas.acta_id');\n\n /*\n if($query){\n if(is_numeric($query)){\n $actas = Requisicion::where ('numero',intval($query))->lists('acta_id');\n $recurso = $recurso->whereIn('id',$actas);\n }else{\n $recurso = $recurso->where(function($condition)use($query){\n $condition->where('folio','LIKE','%'.$query.'%')\n ->orWhere('lugar_reunion','LIKE','%'.$query.'%')\n ->orWhere('ciudad','LIKE','%'.$query.'%');\n });\n }\n }\n\n if($filtro){\n if(isset($filtro['estatus'])){\n if($filtro['estatus'] == 'nuevos'){\n $recurso = $recurso->whereNull('total_claves_recibidas');\n }else if($filtro['estatus'] == 'incompletos'){\n $recurso = $recurso->whereRaw('total_claves_recibidas < total_claves_validadas');\n }else if($filtro['estatus'] == 'completos'){\n $recurso = $recurso->whereRaw('total_claves_validadas = total_claves_recibidas');\n }\n }\n }*/\n\n $totales = $recurso->count();\n \n $recurso = $recurso->select('entradas.*', DB::raw('sum(stock_insumos.cantidad_recibida) as cantidad_recibida'), \n DB::raw('sum(stock_insumos.cantidad_recibida*insumos.precio) as total'))\n ->leftjoin('stock_insumos','stock_insumos.entrada_id','=','entradas.id')\n ->leftjoin('insumos','insumos.id','=','stock_insumos.insumo_id')\n ->groupBy('entradas.id')\n ->skip(($pagina-1)*$elementos_por_pagina)->take($elementos_por_pagina)\n //->orderBy('estatus','asc')\n ->orderBy('entradas.created_at','desc')\n ->get();\n\n //$queries = DB::getQueryLog();\n //$last_query = end($queries);\n return Response::json(['data'=>$recurso,'totales'=>$totales],200);\n }catch(Exception $ex){\n return Response::json(['error'=>$ex->getMessage()],500);\n }\n }", "title": "" }, { "docid": "0a5d31fc668073ab11b01fb5d3ccea8a", "score": "0.53893805", "text": "public function index(PaymentFilterRequest $request)\n { \n $query = Payment::filterBy($request->all())->ordered();\n $result = $query->paginate(15);\n return new PaymentCollection($result, $query);\n }", "title": "" }, { "docid": "dce3f47bac524b75daf78dc80f6a8f37", "score": "0.5388592", "text": "function home_filter()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$this->load->view('providers/list_filter', $data);\n\t}", "title": "" }, { "docid": "c91ba4d18bf126110897f4292954f3e7", "score": "0.53813165", "text": "public function __construct()\n {\n $this->beforeFilter('salteVendedor');\n }", "title": "" }, { "docid": "1a980a8802f647d7ef6f0525fe6ef00f", "score": "0.53797656", "text": "public function filtrePrix()\n {\n $hebergement = new Hebergement();\n $hebergements = Session::get('hebergements');\n $hebergements = $hebergementDispo = $hebergements->whereIn('HEBERGEMENT.NOHEB',$hebergement->getHebergementByPrixMax($prixmax)\n ->lists('TARIF.NOHEB'));\n }", "title": "" }, { "docid": "c9efc8a299da2a0587a082b4a2261eac", "score": "0.5370328", "text": "public function init_filters() {\n add_filter( 'erp_settings_pages', array( $this, 'add_settings_page' ) );\n }", "title": "" }, { "docid": "a67997fe95a198a9d7454c7f0eb98a0e", "score": "0.53639895", "text": "public function spo_list_by_filter()\n {\n $data['perpage'] = $perpage = ($this->input->post('perpage')) ? $this->input->post('perpage') : '25';\n $data['search_val'] = $search_val = ($this->input->post('search_val')) ? $this->input->post('search_val') : '';\n $data['current_pagination_index'] = $current_pagination_index = ($this->input->post('current_pagination_index')) ? $this->input->post('current_pagination_index') : '1';\n $data['page'] = $page = ($this->input->post('pagecount')) ? $this->input->post('pagecount') : '0';\n\n if ($search_val != '') {\n $sc = ' AND (spo.supplier_purchase_order_no LIKE \"%'.$search_val.'%\" OR v.vendor_name LIKE \"%'.$search_val.'%\" OR p.product_name LIKE \"%'.$search_val.'%\" OR cb.lead_name LIKE \"%'.$search_val.'%\")';\n // $data['page'] = $page = '0';\n }\n else {\n $sc = '';\n }\n $data['dtrange_from'] = '';\n $data['dtrange_to'] = '';\n $data['vendor_list'] = $this->Supplierpo_model->get_vendor_list();\n $financial_year_to2 = (date('m') > 3) ? date('Y') +1 : date('Y');\n $financial_year_from2 = $financial_year_to2 - 1;\n $data['ypick'] = $financial_year_from2.'-'.$financial_year_to2;\n if($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n $user_id = $this->input->post('user_id');\n\n if($user_id !='')\n {\n $uid = \" AND spo.vendor_id = '$user_id'\";\n }\n else\n {\n $uid = '';\n }\n $data['f_l_user'] = $user_id;\n\n $fbase = $this->input->post('fbase');\n $data['fbasesearch'] = $fbase;\n\n if($fbase == '')\n {\n $data['purchasesearch'] = '';\n $data['drnge'] = '';\n $data['fquartersearch'] = '';\n //$data['ypick'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n }\n else if($fbase == 'BonQuarter')\n {\n $btn = $this->input->post('goButtonboq');\n $fqtr = $this->input->post('fquarter');\n $yrange = $this->input->post('ypick');\n\n $data['fquartersearch'] = $fqtr;\n $data['ypick'] = $yrange;\n\n if($fqtr == '') \n {\n $yr = explode('-', $yrange);\n\n $fdate = $yr[0].'-04-01';\n $tdate = $yr[1].'-03-31';\n\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n }\n else\n {\n $yr = explode('-', $yrange);\n if($fqtr=='Q1')\n {\n $fdate = $yr[0].'-04-01';\n $tdate = $yr[0].'-06-30';\n }\n else if($fqtr=='Q2')\n {\n $fdate = $yr[0].'-07-01';\n $tdate = $yr[0].'-09-30';\n }\n else if($fqtr=='Q3')\n {\n $fdate = $yr[0].'-10-01';\n $tdate = $yr[0].'-12-31';\n }\n else\n {\n $fdate = $yr[1].'-01-01';\n $tdate = $yr[1].'-03-31';\n }\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n\n $data['purchasesearch'] = '';\n $data['drnge'] = '';\n //else if()\n }\n else\n {\n $btn = $this->input->post('goButton');\n $schange = $this->input->post('searchChange');\n //echo $schange;\n $dtrange_from = $this->input->post('dtrange_from');\n $dtrange_to = $this->input->post('dtrange_to');\n\n if ($dtrange_from != '' && $dtrange_to != '') {\n $dtrange = $dtrange_from.' - '.$dtrange_to;\n }\n else {\n $dtrange = ''; \n }\n // $dtrange = $this->input->post('dtrange');\n if($btn=='')\n {\n $dtrange='';\n }\n if($schange == '')\n $schange='';\n\n if($schange == '')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n elseif($schange == 'today')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') = CURDATE() $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') = CURDATE() $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n else if($schange == 'thisweek')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND YEARWEEK(STR_TO_DATE(spo.created_on, '%Y-%m-%d'), 1) = YEARWEEK(CURDATE(), 1) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND YEARWEEK(STR_TO_DATE(spo.created_on, '%Y-%m-%d'), 1) = YEARWEEK(CURDATE(), 1) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n } \n else if($schange == 'thismonth')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND MONTH(STR_TO_DATE(spo.created_on, '%Y-%m-%d')) = MONTH(CURDATE()) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND MONTH(STR_TO_DATE(spo.created_on, '%Y-%m-%d')) = MONTH(CURDATE()) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n } \n else if($schange == 'thisyear')\n {\n $data['drnge'] = '';\n $finstart = $_SESSION['finstart'];\n $finend = $_SESSION['finend'];\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$finstart.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$finend.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$finstart.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$finend.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n else\n {\n $data['drnge'] = $dtrange;\n $data['dtrange_from'] = $dtrange_from;\n $data['dtrange_to'] = $dtrange_to;\n $dr = explode(' - ', $dtrange);\n\n $fd = explode('/', $dr[0]);\n $td = explode('/', $dr[1]);\n\n $fdate = $fd[2].'-'.$fd[0].'-'.$fd[1];\n $tdate = $td[2].'-'.$td[0].'-'.$td[1];\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n //echo $schange;exit;\n $data['purchasesearch'] = $schange;\n $data['drnge'] = $dtrange;\n $data['fquartersearch'] = '';\n //$data['ypick'] = '';\n }\n }\n else\n { \n $data['f_l_user'] = '';\n $data['fbasesearch'] = '';\n $data['purchasesearch'] = '';\n $data['drnge'] = '';\n $data['fquartersearch'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n // $data['supplierpo_list'] = $this->Supplierpo_model->get_supplierpo_list();\n }\n $this->load->view('supplierpo/supplierpo_list_table',$data);\n }", "title": "" }, { "docid": "a6330f27b0b130cd57373868c0f98ddd", "score": "0.5363245", "text": "public function testFilters() {\n // Test the name filter page, which filters for name contains 'Comida'.\n // Should show just the Spanish translation, once.\n $this->assertPageCounts('test-name-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida name filter');\n\n // Test the description filter page, which filters for description contains\n // 'Comida'. Should show just the Spanish translation, once.\n $this->assertPageCounts('test-desc-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida description filter');\n\n // Test the field filter page, which filters for field_foo contains\n // 'Comida'. Should show just the Spanish translation, once.\n $this->assertPageCounts('test-field-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida field filter');\n\n // Test the name Paris filter page, which filters for name contains\n // 'Paris'. Should show each translation once.\n $this->assertPageCounts('test-name-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris name filter');\n\n // Test the description Paris page, which filters for description contains\n // 'Paris'. Should show each translation, once.\n $this->assertPageCounts('test-desc-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris description filter');\n\n // Test the field Paris filter page, which filters for field_foo contains\n // 'Paris'. Should show each translation once.\n $this->assertPageCounts('test-field-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris field filter');\n\n }", "title": "" }, { "docid": "67ba6629c790b9142d7c23fd589219d0", "score": "0.53589445", "text": "public function actionIndex($idCategoria = null, $vendido = \"false\", $novo = \"false\" )\n { \n \n// $query = Produto::find()->orderBy(['vendido'=>SORT_DESC]);\n// $dataProvider = new ActiveDataProvider([\n// 'query' =>$query ,\n// ]);\n $query = Produto::find()->orderBy(['nome'=>SORT_DESC]);\n \n \n \n \n if($idCategoria != 0){\n $query->andFilterWhere([\"=\", \"id_categoria\", $idCategoria]);\n }\n if($vendido == \"true\"){\n $query->andFilterWhere([\"=\", \"vendido\", 0]);\n }\n if($novo == \"true\"){\n \n $query->andFilterWhere([\"=\", \"novo\", 0]);\n \n \n }\n $countQuery = clone $query;\n $pages = new Pagination(['totalCount' => $countQuery->count()]);\n $models = $query->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n return $this->render('index', [\n 'models' => $models,\n 'idCategoria' => $idCategoria,\n 'vendido' => $vendido,\n 'novo' => $novo,\n 'pages' => $pages\n ]);\n }", "title": "" }, { "docid": "c5823c826c01172bd42527ad90591699", "score": "0.53576046", "text": "public function indextodos(Request $request)\n {\n\n $buscar = $request->buscar;\n $criterio = $request->criterio;\n if ($buscar==''){\n $reserva = reserva::join('cliente','reserva.idCliente','=', 'cliente.id')\n ->join('salon','reserva.idSalon','=','salon.id')\n ->select('reserva.id','reserva.fecha','reserva.fechaInicio','reserva.fechaFin','reserva.pago','cliente.nombre as nombrecli','salon.nombre as nombresalon','reserva.estado as estadoreser')\n ->where('reserva.estado','<>','anulado' )\n ->orderBy('reserva.id','desc')->paginate(20);\n }\n else{$reserva = reserva::join('cliente','reserva.idCliente','=', 'cliente.id')\n ->join('salon','reserva.idSalon','=','salon.id')\n ->select('reserva.id','reserva.fecha','reserva.fechaInicio','reserva.fechaFin','reserva.pago','cliente.nombre as nombrecli','salon.nombre as nombresalon','reserva.estado as estadoreser')\n ->where('cliente.'.$criterio, 'like', '%'. $buscar . '%' ) \n ->orderBy('reserva.id','desc')->paginate(20);\n }\n return [\n 'pagination' => [\n 'total' => $reserva->total(),\n 'current_page' => $reserva->currentPage(),\n 'per_page' => $reserva->perPage(),\n 'last_page' => $reserva->lastPage(),\n 'from' => $reserva->firstItem(),\n 'to' => $reserva->lastItem(),\n ],\n 'reserv' =>$reserva\n ];\n }", "title": "" }, { "docid": "24653f7a60ecb7a2ae8f41a55324e64c", "score": "0.535633", "text": "public function index(Request $request)\n {\n $filtro = \"\";\n $order = \" id \";\n $order_type = \"asc\";\n $id_emissora = \"\";\n $id_programa = \"\";\n\n if ($request->input(\"filtro\") != \"\") {\n $str_filt = str_replace(\"'\", \"''\", $request->input(\"filtro\"));\n $filtro .= \" and ( texto like '%\" . $str_filt . \"%' ) \";\n }\n if ($request->input(\"id_programa\") != \"\") {\n $id_programa = \\App\\Http\\Dao\\ConfigDao::getIDByOrigem($request->input(\"id_programa\"), \"programa\");\n if ($id_programa != \"\") {\n $filtro .= \" and ev.id_programa = \" . $id_programa;\n }\n }\n if ($request->input(\"id_emissora\") != \"\") {\n $id_emissora = \\App\\Http\\Dao\\ConfigDao::getIDByOrigem($request->input(\"id_emissora\"), \"emissora\");\n if ($id_emissora != \"\") {\n $filtro .= \" and ev.id_emissora = \" . $id_emissora;\n }\n }\n if ($request->input(\"com_busca_salva\") != \"\") {\n $filtro .= \" and p.com_temp_search = \" . $request->input(\"com_busca_salva\");\n }\n $filtro .= \" and ev.tipo = 'pai' \";\n\n if ($request->input(\"data_inicio\") != \"\") {\n $filtro .= \" and ev.data >= '\" . $request->input(\"data_inicio\") . \" 00:00:00' \";\n }\n if ($request->input(\"data_fim\") != \"\") {\n $filtro .= \" and ev.data <= '\" . $request->input(\"data_fim\") . \" 23:59:59' \";\n }\n if ($request->input(\"min_id\") != \"\") {\n $filtro .= \" and p.id > \" . $request->input(\"min_id\");\n }\n\n if ($request->input(\"order\") != \"\") {\n $order = $request->input(\"order\");\n }\n\n if ($request->input(\"order_type\") != \"\") {\n $order_type = $request->input(\"order_type\");\n }\n\n $itens = \\App\\Http\\Dao\\EventosArquivosDao::getListGridCad($filtro, $order, $order_type);\n\n return $this->sendResponse(array(\"qtde\" => count($itens), \"data\" => $itens));\n }", "title": "" }, { "docid": "93c6783d913fef58d6eaf5c7126b1721", "score": "0.5355447", "text": "public function paginate($limit);", "title": "" }, { "docid": "93c6783d913fef58d6eaf5c7126b1721", "score": "0.5355447", "text": "public function paginate($limit);", "title": "" }, { "docid": "54518e421a1f283f8f61f111c40eab1d", "score": "0.5349417", "text": "function fn_twigmo_get_pages(\n &$params,\n &$join,\n &$condition,\n &$fields,\n &$group_by,\n &$sortings,\n &$lang_code\n) {\n if (!empty($params['page_types'])) {\n $condition['twg_pages_page_type'] = db_quote(\n \" AND ?:pages.page_type IN (?a)\",\n $params['page_types']\n );\n }\n}", "title": "" }, { "docid": "9879fb94b18b7f47ea7da964c469d94b", "score": "0.5342611", "text": "function seo_pagination() {\n\t\t$this->start = intval($this->get_vars['start']);\n\t\t$this->start = ( $this->start > 0 ) ? $this->seo_static['start'] . $this->get_vars['start'] : '';\n\t\tunset($this->get_vars['start']);\n\t}", "title": "" } ]
7bc6e59c0904ba086b7601929bcb07d3
check if user registered,his data(username,password) is correct ,if yes set session and cookie
[ { "docid": "237f7f028699624e6c00e085e728e775", "score": "0.0", "text": "function user_login($username, $password)\n{\n if (user_exists($username) == FALSE) { // check if user exists\n return \"You are not a registered member\";\n }\n else if (confirm_user($username, md5($password)) === FALSE) { // check if login data is correct\n return \"Authentication error\";\n }\n else {\n $_SESSION['username'] = $username;\n $_SESSION['user_pass'] = $password;\n $row = dbFetchAssoc(confirm_user($username, md5($password)));\n $_SESSION['user_id'] = $row['id'];\n $_SESSION['last_login'] = $row['last_login'];\n // if choose remember_me save his login in the cookie\n if (isset($_POST['remember_me'])) {\n $_SESSION['user_rem'] = $_POST['remember_me'];\n setcookie(\"cookname\", $_SESSION['username'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookpass\", $_SESSION['user_pass'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookrem\", $_SESSION['user_rem'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\n } else {\n //destroy any previously set cookie\n setcookie(\"cookname\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookpass\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookrem\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\n }\n\n //Login history\n $sql = \"UPDATE users SET last_login= NOW() WHERE username='\" . $username . \"'\";\n\n dbQuery($sql);\n\n header('Location:' . WEB_ROOT . 'index.php');\n exit;\n }\n}", "title": "" } ]
[ { "docid": "6ccf19fc4ef459b35538d6545b06be62", "score": "0.7156944", "text": "public function login($thepost)\n{\n extract($thepost);\n $password = md5(mysql_real_escape_string($password));\n //check if present in sul_signup_profile\n $r = mysql_query(\"SELECT * from sul_signup_profile where Username = '$uname' AND Password = '$password'\");\n if (mysql_num_rows($r))// user exist\n {\n //create session\n session_start();\n $r = mysql_fetch_assoc($r);\n foreach($r as $k=>$v)\n {\n $_SESSION[$k] = $v;\n }\n header(\"location:\".SITE_DIR.\"/home.php\");\n //signin\n }\n else\n {\n \n header(\"location:$sender_url?errmsg=1\");\n //wrong credentials\n }\n}", "title": "" }, { "docid": "984ef10632d99e0c7370aa8f75958382", "score": "0.7081511", "text": "public function checkLogin(){\n if( !empty( $_SESSION['userid']) && !empty( $_SESSION['sessionhash'] ) ){\n $this->_userinfo['userid'] = $_SESSION['userid'];\n $this->_userinfo['sessionhash'] = $_SESSION['sessionhash'];\n return true;\n }\n return false;\n \n }", "title": "" }, { "docid": "155896ab8318909206d2fd6554e2f414", "score": "0.7071743", "text": "function checkLogin(){\n if(session(\"?userName\") && session(\"userName\") != null){\n return true;\n }else{\n //header(\"location: http://219.224.30.99:8081/jwcdd/Login/login\");\n }\n return true;\n }", "title": "" }, { "docid": "613d0473c863f6427d05a35612493846", "score": "0.70150846", "text": "function IsLoggedIn() {\n if($_COOKIE['name']!=null) {\n $resid=GetSelectField(\"SELECT * FROM user WHERE name='\".$_COOKIE['name'].\"' && password='\".$_COOKIE['password'].\"'\",\"id\");\n if($resid!=\"\") {\n\t\t$_SESSION[\"userid\"] = $resid;\n return true;\n }\n } \n return false;\n }", "title": "" }, { "docid": "ed430bfb7f112808c519e7edd9666af6", "score": "0.699291", "text": "public function cookieLogin() {\n if(!empty($this->_data)) {\n Session::insert($this->_session_name, $this->_data->id);\n }\n }", "title": "" }, { "docid": "e37de6331186c785853d2f25e2eb1751", "score": "0.69751006", "text": "public function check_session(){ \n\t\t$this->disable_cache(); \n\t\t//$this->Session->destroy();\n\t\tif(count($this->Session->read('USER'))){\n\t\t\treturn true;\n\t\t}else if($this->Cookie->read('KEYUSER') != ''){ \n\t\t\t$this->loadModel('Register');\n\t\t\t$data = $this->Register->find('first', array('fields' => array('first_name','last_name','email_id','id','mobile','test1_complete','test2_complete','otp','language_id'),\n\t\t\t'conditions' =>array('Register.id' => $this->Functions->decrypt($this->Cookie->read('KEYUSER')), 'is_deleted' => 'N', 'status' => '1')));\t\t\t\t\t\n\t\t\tif(empty($data)){\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Invalid Attempt', 'default', array('class' => 'alert alert-danger'));\t\t\t\t\n\t\t\t\t$this->redirect('/register/');\n\t\t\t}\t\t\n\t\t\t$this->Session->write('USER', $data);\n\t\t\treturn true;\n\t\t}else if($this->Cookie->read('KEYUSER') == ''){\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Session got expired', 'default', array('class' => 'alert alert-danger'));\t\n\t\t\t$this->redirect('/register/');\n\t\t\t// echo \"<script>location.href=$this->webroot</script>\";\n\t\t\t// $this->redirect('/');\n\t\t}else{ \n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Session got expired', 'default', array('class' => 'alert alert-danger'));\n\t\t\t$this->delete_cookie('KEYUSER');\t\n\t\t\t$this->redirect('/register/');\n\t\t}\n\t}", "title": "" }, { "docid": "b63c69a0a782112ba4431f3d95da3ddf", "score": "0.69650996", "text": "public static function cookieLogin() : bool {\n\t\t$user\t= new Models\\User();\n\t\tif ( static::viaCookie( $user ) ) {\n\t\t\tstatic::applySession( $user );\n\t\t\tstatic::refreshCookie();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2201536ae3ddc8856fee929a0afd8809", "score": "0.69323534", "text": "static function login(){\n // Load Database Record\n $user = new Axon(F3::get('dbprefix').'users');\n $user->load(array('username=:un',array(':un'=>F3::get('POST.username'))));\n\n // Check Password\n if(sha1(F3::get('POST.password').$user->salt) != $user->password)\n F3::error(404);\n\n // Create Session\n $session = new Axon(F3::get('dbprefix').'sessions');\n $session->id = sha1(mcrypt_create_iv(12,MCRYPT_DEV_URANDOM));\n $session->start = time();\n $session->expires = time() + F3::get('logintime');\n $session->username = $user->username;\n $session->access = $user->access;\n $session->save();\n\n setcookie('pg_session', $session->id, $session->expires);\n }", "title": "" }, { "docid": "ce482375434270c192bc6b0116b8f1d7", "score": "0.69084615", "text": "function setUserCookie() {\n if(isset($_COOKIE['username'])) {\n setcookie('username',$_COOKIE['username']);\n }\n else if(isset($_POST['username']) && (validLogin() || validLogin())) {\n setcookie('username',$_POST['username']);\n }\n }", "title": "" }, { "docid": "d92b7a78771eee42f1cf6734a742f69f", "score": "0.6898792", "text": "public function checkuser(){\n\t\t$email = req('email');\n\t\t$password = req('password');\n\t\tdbSelect('SELECT * FROM '.ADMIN.' WHERE email = ' . Nullify($email) . ' AND password = ' . Nullify(sha1($password)) . '',$bUserFound,$aUserFound);\n\t\tif($bUserFound){\n\t\t\t $newdata = array(\n\t\t\t 'id' => $aUserFound[0]['id'],\n\t\t\t 'email' => $aUserFound[0]['email'],\n\t\t\t 'logged_in' => TRUE\n\t\t\t );\n\t\t\t$this->session->set_userdata($newdata);\n\t\t\treturn array('success'=>'yes');\n\t\t}else{\n\t\t\treturn array('success'=>'falied');\n\t\t}\n\t}", "title": "" }, { "docid": "b1733d5836f65b7bcff69b053707300c", "score": "0.68909186", "text": "function validarUsuario(){\n if(isset($_SESSION['email'])){\n return true;\n }elseif (isset($_COOKIE['email'])) {\n $_SESSION['email'] = $_COOKIE['email'];\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "1420851e9a7dbbc14d8ca5fad7f7f445", "score": "0.6803762", "text": "function login()\n{\n\t$email = $_POST['usr_email'];\n\t$passwd = $_POST['usr_passwd'];\n\t\n\tif(isset($email) && isset($passwd))\n\t{\n\t\t// find user\n\t\t$usr = User::selectByEmail($email);\n\t\tif(isset($usr))\n\t\t{\n\t\t\t// check password\n\t\t\tif($passwd == $usr->usr_password)\n\t\t\t{\n\t\t\t\t// set user session ID\n\t\t\t\t$usr->usr_sessionid = session_id();\n\t\t\t\t\n\t\t\t\t// set last visit time\n\t\t\t\t$usr->usr_lastvisit = date(\"Y-m-d H:i:s\");\n\t\t\t\t\n\t\t\t\t// update in DB\n\t\t\t\t$usr->update();\n\t\t\t\tConfigManager::getInstance()->logDebug('User '.$usr->toJSON().' logged in with session '.session_id());\n\t\t\t\t\n\t\t\t\treturn json_encode('OK');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn json_encode('WRONG_USR_PASSWD');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn json_encode('WRONG_USR_PASSWD');\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn json_encode('REQUEST_ERROR');\n\t}\n}", "title": "" }, { "docid": "19f19ac86f3925b1eceb894f07210f62", "score": "0.67992604", "text": "public function login(){\n\t\t$login = mysqli_real_escape_string($this->db, $_POST['login']); \n\t\t$password = $_POST['password']; \n\t\t$user = Helper::select($this->db, \"SELECT id, login, password FROM user WHERE '$login' = login LIMIT 1\", 1);\n\t\t\t\n\t\tif(crypt($password, $user['password']) == $user['password']){\n\t\t\t$this->setUser($login);\n\t \t\tSession::set(['login-status' => \"default\"]);\n\t\t}\n\t\telse{ \n\t\t\tSession::set(['login-status' => \"fail\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "d5f9d80debb11c3592d78622912958e0", "score": "0.67969966", "text": "public function verificarLogin() {\n // verifica se nao existir session ou se existir e esta vazio a session\n if (!isset($_SESSION['dmrlogin']) || (isset($_SESSION['dmrlogin']) && empty($_SESSION['dmrlogin']))) {\n header(\"Location:\" . BASE_URL . \"login\");\n exit;\n }\n }", "title": "" }, { "docid": "f098ecd4e80d41b2da52ac4d1197eedc", "score": "0.67732656", "text": "function checkSession($afterlogin='/') {\n\t\tif (@$this->edrnAuth->isLoggedIn()) {\n\t\t\t// Store the details for the templates to use\n\t\t\t$this->Session->write('username',@$this->edrnAuth->getCurrentUsername());\n\t\t\t$this->set('LdapUser',@$this->edrnAuth->getCurrentUsername());\n\t\t\t// We have a valid user, so just return\n\t\t\treturn;\n\t\t} else {\n\t\t\t// No magic cookie, no party. send them to the login page\n\t\t\t$this->Session->write('afterlogin',$afterlogin);\n\t\t\t$this->redirect('/users/login/');\n\t\t}\n }", "title": "" }, { "docid": "0de37ca6b879e54f75ce9e798c1e2d67", "score": "0.6766077", "text": "function logged_in(){\n\n\tif ( isset($_SESSION['email']) || isset($_COOKIE['email']) ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "e5713dfd586f2769f8f1d963ff278d80", "score": "0.6763505", "text": "public function login()\n {\n $user = $this->checkCredentials();\n if ($user) {\n $this->_user = $user;\n $_SESSION['user'] = $user;\n $_SESSION['loggedIn'] = true;\n $_SESSION['del_ids'] = null;\n $_SESSION['del_multi_ids'] = null;\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['user_email'] = $this->_email;\n $_SESSION['password'] = $user['password'];\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "042e67957e333ff1308fc28143838c9f", "score": "0.67558336", "text": "private function log_in() {\n\t\tglobal $db, $table_prefix, $cj_pathfinder, $cj_modules, $cj_error,$cj_theme;\n\n\t\t$cj_error->put_error(\"DEBUG\", \"checking login details\");\n\t\t$username = $db->escape($_POST['username']);\n\t\t$password = $_POST['password'];\n\t\t$check_username = $db->get_row(\"SELECT user_id, user_key, user_salt, count(*) as is_real FROM \".$table_prefix.\"users WHERE user_name='\".$username.\"' LIMIT 0,1\", ARRAY_A);\n\t\tif ($check_username['is_real'] > 0) {\n\t\t\t$attempted_key = md5($check_username['user_salt'].$password);\n\t\t\tif ($attempted_key == $check_username['user_key']) {\n\t\t\t\t$_SESSION['user_id'] = $check_username['user_id'];\n\t\t\t\t$_SESSION['user_key'] = $check_username['user_key'];\n\t\t\t} else {\n\t\t\t\t//need to work this bit out!\n\t\t\t\t$this->login_attempt = FALSE;\n\t\t\t}\n\t\t} else {\n\t\t\t//need to work this bit out!\n\t\t\t$this->login_attempt = FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "c6933f73cf6e9d893d32a06ce2a5af4e", "score": "0.6747253", "text": "public function login()\n\t{\n\t\tif ($this->input->post())\n\t\t{\n\t\t\t$login_data = _post('login');\n\t\t\t$password = _post('password');\n\t\t\t$cookie_password = _post('password');\n\t\t\t$remember = _post('remember');\n\n\t\t\t$result = $this->admin->check_login($login_data, $cookie_password);\n\t\t\t\n\t\t\tif ($remember == 1)\n\t\t\t{\n\t\t\t\t//echo 'set';\n\t\t\t\t$this->input->set_cookie('login', $login_data, 86500);\n\t\t\t\t$this->input->set_cookie('password', $cookie_password, 86500);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//echo \"unset\";\n\t\t\t\tdelete_cookie('login');\n\t\t\t\tdelete_cookie('password');\n\t\t\t}\n\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\techo \"true\";\n\t\t\t\tset_session('login_data', $login_data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"false\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['display'] = $this->load->view('admin/signup/login', '', true);\n\t\t\t$this->load->view('admin/common_signup', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "9b2469abb61dec17af7f9cce7f10e44f", "score": "0.6738578", "text": "function logged_in(){\n\tif (isset($_SESSION['email']) || isset($_COOKIE['email'])) {\n\t\treturn true;\n\t} else\n\t{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "be9f295ee572b5a46dd764f0e05f77f9", "score": "0.6733309", "text": "public function login(){\n $this->logname = $_POST['logname'];\n $this->password = $_POST['password'];\n if($this->find_account()){ $this->make_session();\n return true;\n }\n else{ return false; }\n }", "title": "" }, { "docid": "d6c8100e08a64bcf4a57bcd7af405ff5", "score": "0.672198", "text": "public function signIn(){ \r\n $user = new User();\r\n $user->username = $_POST['username'];\r\n $user->password = md5($_POST['password']);\r\n $verif = User::compareUser($user);\r\n if($verif->username == \"\"){\r\n echo \"error_username\";\r\n }\r\n else{\r\n if($user->password == $verif->password){\r\n echo $user->username;\r\n $_SESSION['username'] = $user->username;\r\n }\r\n else{\r\n echo \"error_password\";\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3fb70e7d159797daef9c0521b020a448", "score": "0.67215246", "text": "function f_login($email,$password){\r\n\t $res3=mysql_query(\"SELECT * FROM f_regform WHERE email='$email' and password='$password'\");\r\n\t\t$Row=mysql_num_rows($res3);\r\n\t\tif($Row==0){ return false; \r\n\t\t//echo \"0 row\";\r\n\t\t}else{ \r\n\t\tsession_start();\r\n\t\t$userData = mysql_fetch_assoc($res3);\r\n\t\t$_SESSION['fname']=$userData['fname'];\r\n\t\t$_SESSION['lname']=$userData['lname'];\r\n\t\t$_SESSION['email']=$userData['email'];\r\n\t\treturn true;\r\n\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dac8317dd827a3793a83b6b3d2561197", "score": "0.6697053", "text": "public function login()\n {\n $db = new Apps_Models_Users();\n $query = $db->buildQueryParams([\n \"where\" => \"username = :username AND password = :password\",\n \"param\" => [\n \":username\" => trim($this->username),\n \":password\" => $this->encryptPassword()\n ]\n ])->selectOne();\n\n if($query) {\n $_SESSION[\"userId\"] = $query[\"id\"];\n $_SESSION[\"username\"] = $query[\"username\"];\n return true; \n }\n return false;\n }", "title": "" }, { "docid": "43abd9f59f96931f4d7a7d6459fd1e60", "score": "0.669062", "text": "public function logged_in()\n\t{\n\t\tif ($this->_ci->session->userdata('user_id') > 0 && $this->_ci->session->userdata('hash'))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif (get_cookie($this->_cookie_name)) \n\t\t{\n\t\t\tif ($this->_check_cookie() === TRUE) \n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "a6eb939d854befc585601c352c4decee", "score": "0.6677383", "text": "function login() {\n\t\tglobal $_SESSION;\n\n\t\t$query = \"SELECT `name` FROM `{$this->table}` WHERE `name`='{$this->name}' AND `pass`=sha1('{$this->pass}') AND (`site` = '{$this->site}' OR `site` = 'ri')\";\n\t\t$reply = InkXMS_Database::query($query);\n\n\t\tif(mysql_num_rows($reply) > 0) {\n\t\t\t// if the user verification was successful\n\t\t\t// register the user with the session\n\t\t\t$valid_user = $this->name;\n\t\t\t$_SESSION[$this->site.'_valid'] = 'boolean';\n\n\t\t\t$info = mysql_fetch_assoc($reply);\n\t\t\tmysql_free_result($reply);\n\t\t\t$_SESSION['user'] = $info['name'];\n\n\t\t\t// make it official\n\t\t\t$this->check = true;\n\t\t}\n\t\telse {\n\t\t\t$this->console = \"username or password is incorrect\";\n\t\t}\n\t}", "title": "" }, { "docid": "b9cd8e4762926b6d200186df1d5c83d6", "score": "0.66664165", "text": "function AuthenticateCookie($uid, $session)\n{\n\t$result = mysql_query(\"SELECT session FROM users WHERE id = '$uid'\") or die();\n\t// check if correct result found\n\tif(mysql_num_rows($result) < 1) {\n\t\treturn false;\n\t} else {\n\t\t$res = mysql_fetch_assoc($result);\n\t\t$sql_session = $res['session'];\n\n\t\t// check validity \n\t\tif($sql_session == $session) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ddee4d2776c0d63107202ec574186830", "score": "0.6662699", "text": "public function login()\n {\n if($this->user->isLogon())\n {\n //$this->locate($this->createLink('user', 'index'));// m=index&f=index\n session_unset();\n }\n\n /* Passed account and password by post or get. */\n if(!empty($_POST))\n {\n $name = $this->post->name;\n $password = $this->post->password;\n\t\t\t\t\t\t$code = $this->post->code;\n\n\t\t\t\t\t\t$try = $this->session->try;\n\t\t\t\t\t\tif(!$try) $try = 0;\n\t\t\t\t\t\t$try ++;\n\n\t\t\t\t\t\t//$failed = $this->session->failed;\n\t\t\t\t\t\t//if(!$failed) $failed = 0;\n\n\t\t\t\t\t\t//两次登录之间的时间间隔需要限制\n\t\t\t\t\t\t$time = $this->session->time;\n\t\t\t\t\t\tif(!$time)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time = time();\n\t\t\t\t\t\t\t$diff = $this->config->minTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$diff = time() - $time;\n\t\t\t\t\t\t\t$time = time();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->session->set('time',$time);\n\n\t\t\t\t\t\t//echo \"$time,$diff\";\n\n\n\t\t\t\t\t\t//rand(1000,9999)\n\t\t\t\t\t\tif(!$this->session->code //check code未生成,漏洞\n\t\t\t\t\t\t\t|| $try > $this->config->maxTry //重试次数超过限制\n//\t\t\t\t\t\t\t|| $failed > $this->config->maxFailed\n\t\t\t\t\t\t\t|| strtolower($code) <> strtolower($this->session->code)\n\t\t\t\t\t\t\t|| $diff < $this->config->minTime//抵御蛮力攻击\n\t\t\t\t\t\t\t) die(js::error($this->lang->user->error->codeMismatch));\n\n $user = $this->user->identify($name, $password);\n\n\t\t\t\t\t\t$this->session->set('try',$try);\n\n if($user)\n {\n /* Authorize him and save to session. */\n session_regenerate_id(true);//重新生成session,抵抗固定会话攻击\n\n $this->session->remove('try');\n $this->session->remove('code');\n $this->session->remove('time');\n $this->session->remove('ctime');\n\n //session溢出攻击\n $token = rand() . ':' . $this->server->remote_addr . ':' . $this->server->remote_port . ':' .time() . ':' . $user->rand;\n// echo $token;\n $token = crc32($token);\n $this->session->set('token', $token);\n setcookie('token', $token);\n\n $this->session->set('user', $user);\n die(js::locate(helper::createLink('user', 'index'), 'parent'));\n }\n else\n {\n \t //$failed ++;\n\t\t\t\t\t\t\t\t//$this->session->set('failed', $failed);\n die(js::error($this->lang->user->error->loginFailed));\n }\n }\n else\n {\n $this->display();\n }\n }", "title": "" }, { "docid": "e98259f02224bfce426db65957d32971", "score": "0.66569906", "text": "public function session(){\n $exist = !empty($this->data['id_user']) && !empty($this->data['token']);\n if (!$exist) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized']);\n $Security = new Security();\n $Security->set_token($this->data['token']);\n $Security->set_id($this->data['id_user']);\n $uotorized = $Security->authorize();\n if(!$uotorized) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized!']);\n $this->session = (int) $this->data['id_user'];\n return true;\n }", "title": "" }, { "docid": "ff86e4530dced1f94a8691541867b62f", "score": "0.66412985", "text": "public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\n // Hash user-submitted password\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\n // Check is email/password combination is correct.\n $q = \"SELECT token FROM users WHERE email='\".$_POST['email'].\"' AND password='\".$_POST['password'].\"'\";\n $token = DB::instance(DB_NAME)->select_field($q);\n\n\n // Check if the user token exists\n if ($token) {\n // Login success\n setcookie('token', $token, strtotime('+1 week'), '/');\n\n\n Router::redirect('/posts/index');\n }\n else {\n // Login failure\n Router::redirect('/users/login/'.ERROR_INVALIDUSRPWD);\n }\n }", "title": "" }, { "docid": "2818d4d3a8e1b720e80983abe9fa66ac", "score": "0.66352963", "text": "function auth_check(){\n session_start();\n if (!isset($_SESSION['user'])) {\n $this->redirect(\"/login\");\n exit();\n }\n }", "title": "" }, { "docid": "c2531cce13cf0a3cb60bf8248a399a81", "score": "0.6633372", "text": "function login_verification_user()\r\n {\r\n global $connection;\r\n $username=strip_tags($_POST['username']);\r\n $password=strip_tags($_POST['password']);\r\n $password=encrypt($password);\r\n $user_data=bool_login_verification($username,$password,'user');\r\n if ( $user_data[0] >0 )//user_id\r\n {\r\n set_user_session_id($user_data[0]);\r\n set_user_session_name($user_data[1]);\r\n //print_r($_SESSION);\r\n redirect(\"user_notification.php\"); \r\n }\r\n else\r\n {\r\n show_error_message(\"Incorrect Username or Password\");\r\n } \r\n }", "title": "" }, { "docid": "025bd508d8fbd4c7d80c2459b86b970d", "score": "0.6625727", "text": "public function log_in($data){\r\n $email=$data['email'];\r\n $password=md5($data['password']);\r\n// $time= time();\r\n\r\n $sql=\"SELECT user_id,name,username FROM user_info WHERE email='$email' AND password='$password' AND Status='activated'\";\r\n $query=mysqli_query($this->connection,$sql);\r\n $user= mysqli_fetch_assoc($query);\r\n\r\n if($user){\r\n// session_start();\r\n $_SESSION['user_id']=$user['user_id'];\r\n $_SESSION['name']=$user['name'];\r\n $_SESSION['username']=$user['username'];\r\n \r\n \r\n// echo '<pre>';\r\n// print_r($count_user);\r\n// exit();\r\n header('Location:user/index.php');\r\n }else{\r\n $msg='<div class=\"alert alert-danger\">Sorry..Email or Password are not valid</div>';\r\n return $msg;\r\n }\r\n }", "title": "" }, { "docid": "f1cc0c80142924b3febaf321c0278f6a", "score": "0.66255677", "text": "function Login($name, $password) {\n $resid=GetSelectField(\"SELECT * FROM user WHERE name='$name' && password='\".MD5($password+$dbsalt).\"'\",\"id\");\n if($resid==\"\") {\n return false;\n } else {\n \n $_SESSION[\"loggedin\"] = \"TRUE\";\n $_SESSION[\"name\"] = $name;\n $_SESSION[\"userid\"] = $resid;\n \n setcookie('name', $name, strtotime(\"+1 month\"), \"/\", \".uni-muenster.de\" );\n setcookie('password', MD5($password+$dbsalt), strtotime(\"+1 month\"), \"/\", \".uni-muenster.de\");\n $_COOKIE['name'] = $name; \n $_COOKIE['password'] = $password; \n\n return true;\n }\n }", "title": "" }, { "docid": "b2ea8cf59496c03725efdf985dc3e760", "score": "0.6618249", "text": "public function SetLoginStatus()\t{\n\n\t\t\t$query = \"SELECT * \n FROM users \n WHERE userName = '{$_POST['name']}' \n AND userPass = '{$_POST['pass']}'\";\n\n\t\t\tif ( ReturnRows($query) == 1) {\n\t setcookie('this->userName' , $_POST['name'] , time() + 1000);\n\t setcookie('this->password' , $pass , time() + 0);\n\t $_SESSION['this->loggedIn'] = 1;\n\t }\n\n\t\t}", "title": "" }, { "docid": "66cc5e52ddf74217749bb564330679a6", "score": "0.6617521", "text": "public function login() {\n \n // création des nouveaux objets\n $user = new User();\n $dao = new DAOUser();\n $secu = new MySecu();\n \n // Récupération des variables nécessaires à la connexion\n $user->setPseudo($_POST[\"pseudo\"]);\n $user->setPassword($_POST[\"password\"]);\n \n // si le l'utilisateur est bien confirmé en BDD alors on appelle la methode getRang en argument de Privilege_id()\n // et on génère le Cookie\n if($dao->verifUser()){\n $user->setPrivilege_id($dao->getRang($_POST['pseudo'])['rang']);\n $user->setId($dao->getRang($_POST['pseudo'])['id']);\n\n $secu->generateCookie($user);\n \n \n }else{\n header(\"Location: http://dreamfrom/\");\n }\n \n }", "title": "" }, { "docid": "901d0e4c0e1674c139cd3b025199f137", "score": "0.6614523", "text": "function login($data){\n\n global $conn;\n $email = mysqli_real_escape_string($conn, $data[\"email\"] );\n $password = mysqli_real_escape_string($conn, $data[\"password\"] );\n \n\n $query = mysqli_query($conn, \"SELECT * FROM user WHERE email ='$email'\");\n\n if( $row = mysqli_fetch_assoc($query) ){\n\n $passwordAsli = $row[\"password\"];\n if( password_verify($password, $passwordAsli) ){\n\n $_SESSION[\"user\"] = $row[\"username\"];\n $_SESSION[\"login\"] = true;\n if( isset($data[\"remember\"]) ){\n setcookie('id',$row[\"id\"],time()+ 60*60*24*7);\n setcookie('key',hash('sha256',$row[\"username\"]),time()+ 60*60*24*7);\n }\n return true;\n }\n \n}else{\n return false; \n}\n\n}", "title": "" }, { "docid": "39d20864d82d6b92796e653f732d934f", "score": "0.6608201", "text": "public function authenticUser()\n\t\t{\n\t\t\t$DB = new Database(HOST,USER,PASS);\n\t\t\tif(isset($_SESSION['emailUser']) && isset($_SESSION['passwordUser'])) {\n\t\t\t\t$L_user = $_SESSION['emailUser'];\n\t\t\t\t$L_pass = $_SESSION['passwordUser'];\n\t\t\t\t$condition = \"WHERE email = '{$L_user}' AND password = '{$L_pass}'\";\n\t\t\t\t$selection = $DB->QRSelect('_user',$condition);\n\t\t\t\tif ($selection) {\n\t\t\t\t\tsession_destroy(); \n\t\t\t\t\tunset($_SESSION['passwordUser']); \n\t\t\t\t\tunset($_SESSION['emailUser']); \n\t\t\t\t\techo '<meta http-equiv=\"refresh\" content=\"0;URL='.URL.'\">';\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsession_destroy();\n\t\t\t\tunset($_SESSION['emailUser']);\n\t\t\t\tunset($_SESSION['passwordUser']); \n\t\t\t\techo '<meta http-equiv=\"refresh\" content=\"0;URL='.URL.'\">';\n\t\t\t\tdie; \n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0d2175ffe2d6ef0f4d7cf8e053153e3c", "score": "0.6606196", "text": "private function log_user_in($data) {\n $uname = (isset($data['uname'])) ? clean(trim($data['uname'])) : Session::get_var('uname');\n\t\t\t$pass = clean(trim($data['pass']));\n $referer = $this->referer;\n\t\t\t\t$this->_auth->el_login($uname, $pass);\n\t\t\t\tif($this->_auth->is_login()) {\n if(!strpos('/login', $this->referer)) {\n $this->referer = $referer;\n return true;\n } else {\n $this->referer = get_option('home');\n return true;\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->_error = $this->_auth->get_auth_last_error();\n\t\t\t\t}\n return false;\n }", "title": "" }, { "docid": "2c143fa6eabd3b3148112cb8b97a0db3", "score": "0.6593335", "text": "function require_auth()\n {\n global $errors;\n $cookie_login = false;\n $username = '';\n $password = '';\n\n // If person has already logged in...\n if ($this->logged_in) {\n return TRUE;\n }\n\n // Authenticate by POST data\n if (isset($_POST['username'])) {\n $username = $_POST['username'];\n $password = $_POST['password'];\n $person = get_first(\"SELECT * FROM persons\n WHERE username = '$username'\n AND password = '$password'\n AND deleted = 0\");\n if (! empty($person['person_id'])) {\n $_SESSION['person_id'] = $person['person_id'];\n $this->load_user_data($person);\n return true;\n\n } else {\n $errors[] = \"Vale kasutajanimi või parool\";\n }\n }\n\n // Authenticate by cookie\n //var_dump($_COOKIE);\n //die();\n if (isset($_COOKIE['teodor_SID'])) {\n $username = get_one(\"SELECT username FROM persons WHERE person_SID='{$_COOKIE['teodor_SID']}'\");\n if (!empty($username)) $cookie_login = true;\n }\n\n $username = $cookie_login ? $username : (isset($_POST['username']) ? $_POST['username'] : NULL);\n $password = isset($_POST['password']) ? $_POST['password'] : NULL;\n $remember_me = isset($_POST['remember_me']) && $_POST['remember_me'] == 'on' ? 1 : 0;\n\n // Authenticate by POST data\n if ($cookie_login or isset($_POST['username'])) {\n\n // Authenticate user against Google\n if ($cookie_login or $this->login($username, $password)) {\n\n // Check if person already exsists in db\n $person = get_first(\"SELECT person_id, is_admin, person_first_visit, person_last_visit FROM persons\n WHERE username = '$username'\n AND deleted = 0\");\n\n if (empty($person['person_id'])) {\n\n // Person did not exsist, insert this person and log the person in\n $now = date('Y-m-d H:i:s');\n $person = array('username' => $username, 'is_admin' => 0, 'person_first_visit' => $now, 'person_last_visit' => $now);\n $person['person_id'] = insert('persons', $person);\n\n } else {\n\n // Person existed, update person's last visit time\n q(\"UPDATE persons SET person_last_visit=NOW() WHERE username = '$username'\");\n }\n\n // Log the person in\n $_SESSION['person_id'] = $person['person_id'];\n\n // Set remember me cookie\n if ($remember_me) {\n\n // Generate 7 char random string\n $SID = substr(md5(rand()), 0, 7);\n\n // Set cookie to expire in January 2038\n $time = 2147483647;\n\n // Associate that random string with this user\n update('persons', array('person_SID' => $SID), \"username = '$username'\");\n\n // Write that random string to cookie\n setcookie(\"teodor_SID\", $SID, $time, '/');\n }\n\n if(!get_one(\"SELECT setup FROM persons WHERE person_id={$person['person_id']}\")){\n header('Location: ' . BASE_URL . 'user_setup');\n exit();\n }\n\n //Load user data and return\n $this->load_user_data($person);\n return true;\n\n } else {\n\n // Login failed - set error\n $errors[] = __('Wrong username or password', true);\n }\n }\n\n // Display the login form\n require 'templates/auth_template.php';\n\n // Prevent loading the requested controller (not authenticated)\n exit();\n }", "title": "" }, { "docid": "aa2dfe9464c4a3bdfb6e1fd32da10cfc", "score": "0.65926206", "text": "function login_user($email,$password ,$remember, $username){\r\n $sql = \"SELECT passwd, id FROM users WHERE email='\".escape($email).\"' AND active=1 \";#use only this if not encrypted\r\n $result = execute($sql);\r\n confirm($result);\r\n \r\n if(row_count($result) ==1){\r\n #once password is found the fetch the password then decrypt it.\r\n $row = fetch_array($result);\r\n\r\n $db_password = $row['passwd'];\r\n if(password_verify($password, $db_password)){\r\n if($remember =\"on\"){\r\n setcookie('email',$email, time()+86400);\r\n // setcookie('username',$username,time()+86400);\r\n }\r\n $_SESSION['email'] = $email;\r\n \r\n \r\n return true; \r\n\r\n\r\n }else{\r\n return false;\r\n }\r\n\r\n\r\n\r\n return true;\r\n }else{\r\n return false;#if no result found return false.\r\n }\r\n\r\n}", "title": "" }, { "docid": "46494deb51e49b9dcdaf3212432d88fa", "score": "0.65866363", "text": "function check_auth_user(){\n global $_SESSION;\n if (isset($_SESSION['usu']))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "98f6ec375c1d82709cb38710636376af", "score": "0.65828073", "text": "function validate_user() // Funkcija koja se poziva nakon uspješnog logiranja korisnika\n{\n $_SESSION['valid'] = true;\n $_SESSION['username'] = $username; // Pamti korisničko ime trenutno ulogiranog korisnika.\n}", "title": "" }, { "docid": "e3281dba745c02d219b346c58e8943b7", "score": "0.6578678", "text": "function login($usuario) {\n $_SESSION[\"email\"] = $usuario[\"email\"];\n setcookie(\"email\", $usuario[\"email\"], time()+3600);\n }", "title": "" }, { "docid": "6f96c546d70d73380fe8d965b0266139", "score": "0.65777856", "text": "public function autenticate(){\n\t\t//obtiene la cookie del navegador\n\t\t$contenido = $_COOKIE[\"id_user_sesion_kawaii\"]; \n\t\tif($contenido == null) {\n\t\t\t//uncomment para usar login\n\t\t\theader(\"Location: http://localhost:8000/usuarios/login\");\n\t\t\texit;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "cac0d65defeb7727125f67f73ec280d0", "score": "0.6568076", "text": "public static function login()\r\n {\r\n \r\n //$record = accounts::findUser($_POST['uname']); // testing \r\n $record = new account();\r\n $record = accounts::findUserbyUsername($_POST['uname']);\r\n if ($record == FALSE) {\r\n // for wrong pasword and usrname @vm368\r\n\t\t\theader('Location: index.php?wrongpasswordusername=1');\r\n \r\n } else {\r\n if($record->checkPassword($_POST['psw']) == TRUE) {\r\n echo 'login';\r\n session_start();\r\n $_SESSION[\"userID\"] = $record->id;\r\n $_SESSION[\"userEmail\"] = $record->email;\r\n print_r($_SESSION);\r\n header('Location: index.php?page=tasks&action=allOneUser&id='.$record->id);\r\n } else {\r\n \r\n echo 'enter correct password';\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5f4c9b924a7412c8c5bb1134fcc58d25", "score": "0.6567918", "text": "function logged_in()\n{\n\n if (isset($_SESSION['email']) || isset($_COOKIE['email'])) {\n\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "638bf31b74fca7954f0f871b27a4405e", "score": "0.6564178", "text": "function validaSessao() {\r\n\tif ($_SESSION [\"usuario\"] != $_COOKIE [\"i3geousuariologin\"]) {\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "title": "" }, { "docid": "6cd3303b00c5c69293a9af0fe886d898", "score": "0.6562747", "text": "public function checkCookies() {\n\t// $this->cookieStorage->getCookieValue(self::$username) === $this->getUsernameInput() &&\n // $this->cookieStorage->getCookieValue(self::$password) === $this->sessionHelper->encryptString($this->getPasswordInput()))\n \n if ($this->cookieStorage->isCookieSet(self::$uniqueID)) {\n \t\n // Check if uniqid is valid from right browser //TODO set uniqueID is based on browser-detail\n if ($this->cookieStorage->getCookieValue(self::$uniqueID) === $this->sessionHelper->setUniqueID() )\n {\n\t\t \n\t // Check if the uniqid cookie is valid and not time-manipulated\n\t if (!$this->cookieStorage->isCookieValid($this->cookieStorage->getCookieValue(self::$uniqueID))) {\n\t \t\n\t // Destroy all cookies\n \t\t $this->destroyCookies();\n\t\n\t // Set an alert\n\t $this->sessionHelper->setAlert(\"Wrong information in cookie.\");\n\t return false;\n\t }\n\n\t return true;\n\t\t\t }\n \t else {\n // Destroy all cookies\n $this->cookieStorage->destroy(self::$uniqueID);\n $this->cookieStorage->destroy(self::$username);\n $this->cookieStorage->destroy(self::$password);\n\t\t \n // Set an alert\n $this->sessionHelper->setAlert(\"Wrong information in cookie.\");\n return false;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "285eff13fb0bdedd1f1e8ae814ae5a2d", "score": "0.6557762", "text": "public function login() {\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST'){\n\t\t\t// Sanitize data \n\t\t\t$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\t\t\t// Init data \n\t\t\t$data = [\n\t\t\t\t'username' => trim($_POST['username']),\n\t\t\t\t'password' => trim($_POST['password']),\n\t\t\t\t'username_err' => '',\n\t\t\t\t'password_err' => ''\n\t\t\t];\n\t\t\t// Validate username \n\t\t\t\tif(empty(trim($_POST['username']))){\n\t\t\t\t\t$data['username_err'] = \"Please enter your username\";\n\t\t\t\t}else{\n\t\t\t\t\t$data['username'] = trim($_POST['username']);\n\t\t\t\t} // end of username validation \n\t\t\t// Validate password \n\t\t\t\tif(empty(trim($_POST['password']))){\n\t\t\t\t\t$data['password_err'] = \"Please enter your password\";\n\t\t\t\t} else {\n\t\t\t\t\t$data['password'] = trim($_POST['password']);\n\t\t\t\t} // end of password validation\n\n\t\t\t// Validate credentials \n\t\t\tif(empty($data['username']) && empty($data['password'])){\n\t\t\t\t// prepare a select statement \n\t\t\t\t$sql = \"SELECT id, username, password FROM tbl_user WHERE username = :username\";\n\t\t\t\tif($sth = $this->db->dbh->prepare($sql)){\n\t\t\t\t\t// Bind values with params \n\t\t\t\t\t$sth->bindParam(\":username\", $param_username, PDO::PARAM_STR);$sth->bindParam(\":password\", $param_password, PDO::PARAM_STR);\n\n\t\t\t\t\t// Set parameters \n\t\t\t\t\t$param_username = trim($data['username']);\n\t\t\t\t\t$param_password = trim($data['password']);\n\t\t\t\t\t// Attempt to execute prepared statement\n\t\t\t\t\tif($sth->execute()){\n\t\t\t\t\t\t// check if the username exists, if yes then verify password \n\t\t\t\t\t\tif($sth->rowCount() < 0 ){\n\t\t\t\t\t\t\tif($row = $sth->fetch()){\n\t\t\t\t\t\t\t\t$id = $row['id'];\n\t\t\t\t\t\t\t\t$username = $row['username'];\n\t\t\t\t\t\t\t\t$hashpassword = $row['password'];\n\t\t\t\t\t\t\t\tif(password_verify($password, $hashed_password)){\n\t\t\t\t\t\t\t\t\t// password is correct , so start a new session \n\t\t\t\t\t\t\t\t\tSession::init();\n\t\t\t\t\t\t\t\t\t// Set data in Session \n\t\t\t\t\t\t\t\t\tSession::set('login', true);\n\t\t\t\t\t\t\t\t\tSession::set('id', $id);\n\t\t\t\t\t\t\t\t\tSession::set('username', $username);\n\t\t\t\t\t\t\t\t\tSession::set('loginmsg', \"<div class='alert alert-success'> Login successfull </div>\");\n\n\t\t\t\t\t\t\t\t\t// Redirect user to welcome page\n\t\t\t\t\t\t\t\t\theader('location:../index.php');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$data['password_err'] = \"Password did not match\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\techo \"Data not found\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\t// Init data \n\t\t\t$data = [\n\t\t\t\t'username' => '',\n\t\t\t\t'password' => '',\n\t\t\t\t'username_err' => '',\n\t\t\t\t'password_err' => ''\n\t\t\t];\n\t\t\t\n\t\t\t// Load login page\n\t\t\theader('location:login.php');\n\n\t\t} // end of server request checking \n\n\t}", "title": "" }, { "docid": "ef925fa1c9287f3fb29d3290d30cdabf", "score": "0.6552759", "text": "function verify()\n{\n\tsession_start();\n\tif (isset($_SESSION['user']))\n\treturn true;\n\t\n\t\n\t// check to see if visitor has just tried to log on\n\n if(isset($_POST['u_name'])&&(isset($_POST['u_password'])))\n {\n $u_name=$_POST['u_name'];\n $u_password=md5($_POST['u_password']);\n\n // validate username and password\n\n include('ccconfig.php');\n include('dbal.php');\n\n\t$conn=openconn();\n\n\tselectdb();\n\n $sql=\"Select * from users where email=\\\"$u_name\\\" and password=\\\"$u_password\\\" \";\n $qry=mysql_query($sql,$conn);\n $fetchqry=mysql_fetch_array($qry);\n \n \n if($u_password==$fetchqry['password'])\n {\n $_SESSION['user']=$fetchqry['email'];\n return true;\n }\n else\n {\n header(\"location:index.php\");\n }\n }\n \n}", "title": "" }, { "docid": "c68bc1db336a988980fbb70155906135", "score": "0.6552527", "text": "function auto_login(){\r\n\t\t\tif(!empty($_COOKIE['auth'])){\r\n\t\t\t\t$split = explode(':', $_COOKIE['auth']);\r\n\r\n\t\t\t\tif(count($plit) != 2){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t//Recupere via ce cookie selector, token\r\n\t\t\t\tlist($selector,$token) = $split;\r\n\r\n\t\t\t\t$req = $db->prepare('SELECT auth_tokens.id, auth_tokens.token, auth_tokens.user_id \r\n\t\t\t\t\t\t\t\t\t users.id, users.pseudo, users.avatart, users.email\r\n\t\t\t\t\t\t\t\t\t FROM auth_tokens \r\n\t\t\t\t\t\t\t\t\t LEFT JOIN users\r\n\t\t\t\t\t\t\t\t\t ON auth_tokens.user_id = users.id\r\n\t\t\t\t\t\t\t\t\t WHERE selector = ?' AND execute >= CURDATE());\r\n\t\t\t\t$req->execute([base64_decode($selector)]);\r\n\r\n\t\t\t\t$data = $req->fetch(PDO::FETCH_OBJ);\r\n\t\t\t\tif ($data) {\r\n\t\t\t\t\tif (hash_equal($data->token,hash('sha256',base64_decode($token)))) {\r\n\t\t\t\t\t\tsession_regenerate_id(true);\r\n\t\t\t\t\t\t$_SESSION['user_id'] = $data->id;\r\n\t\t\t\t\t\t$_SESSION['pseudo'] = $data->pseudo;\r\n\t\t\t\t\t\t$_SESSION['avatar'] = $data->avatar;\r\n\t\t\t\t\t\t$_SESSION['email'] = $data->email;\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "18d7d0008ae35529b433acb53e40f98e", "score": "0.6548544", "text": "public function userLogin(){\n\t\t// Si el email y la password no estan vacias se procede\n\t\tif (!empty($_POST['email']) && !empty($_POST['password'])) {\n\t\t\t// La variable response se convierte en un objeto que contendra el resultado de la consulta\n\t\t\t$response = $this->model->userLogin('*',\"email = '\".$_POST['email'].\"'\");\n\t\t\t// Se obtiene la consulta en la posicion 0 y se almacena en la variable response, ahora es un array\n\t\t\t$response = $response[0];\n\t\t\t// Si la password de la db es igual a la password recibida del formulario se imprime 1\n\t\t\tif ($response['password'] == $_POST['password']) {\n\t\t\t\t$this->createSession($response['username']);\n\t\t\t\techo 1;\n\t\t\t}\n\t\t}else{\n\t\t\techo \"No hay coincidencia\";\n\t\t}\n\t}", "title": "" }, { "docid": "52553bd677c17ce7c61fb7630b4bf34c", "score": "0.65447545", "text": "function users_pre_authenticate() {\n\t\n\t$user = new User();\n\t$user = $user->find('WHERE login_token = \"'.$_COOKIE['remember_me'].'\"');\n\tif(isset($user[0])) {\n\t\t$_SESSION['user_id'] = $user[0]->id;\n\t\t$_SESSION['current_user'] = $user[0];\n\t}\n}", "title": "" }, { "docid": "68bfabbebab450a719f112f1a02c8be5", "score": "0.6537953", "text": "private function check_login(){\n\t\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->user_id);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7f2099cb4dbfe6205bc180e2da6adefd", "score": "0.65273035", "text": "function loginauth()\n {\n $this->set(\"title\",\"IEEE NIEC | User Login\");\n $username=sqlSafe($_POST['username']);\n $password=sqlSafe($_POST['password']);\n\n $salt=$this->User->getUserSalt($username);\n if($salt==false)\n {\n $this->set(\"message\",\"Username/Password Invalid\");\n }\n else\n {\n $inPass=$this->User->getUserPassword($username);\n if($inPass==generateHash($password.$salt) && $this->User->getUserStatus($username)==1)\n {\n $userID=$this->User->getUserID($username);\n initiateSession();\n setSessionData(\"user_id\",md5($userID));\n setSessionData(\"user_username\",$username);\n setSessionData(\"user_identifier\",md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR']));\n $this->set(\"message\",\"Login successful\");\n header(\"LOCATION: /indexs/home\");\n }\n else\n {\n $this->set(\"message\",\"Username/Password Invalid or Account not activate.\");\n }\n }\n }", "title": "" }, { "docid": "1c8fe315bc3b438ad5cdb4a37c29fa47", "score": "0.65226793", "text": "public function p_login() {\n\n // Get the encrypted value of the password\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n // Get the token\n $sql = 'SELECT token, email\n FROM users\n WHERE email = \"'.$_POST['email'].'\"\n AND password = \"'.$_POST['password'].'\"';\n\n $data = DB::instance(DB_NAME)->select_row($sql);\n\n $token = $data['token'];\n $email = $data['email'];\n\n if ($token) {\n setcookie('token', $token, strtotime('+1 year'), '/');\n Router::redirect('/index/index');\n }\n else {\n Router::redirect(\"/users/login/err\");\n }\n }", "title": "" }, { "docid": "7957e26b9aa398e65a36d3801c4b8343", "score": "0.65184474", "text": "public static function check_login() {\n $db = Db::getInstance();\n if(isset($_REQUEST['submit'])) {\n // print_r($_REQUEST);\n $sql= \"Select * from users where email='\".$_REQUEST['username'].\"' and password='\".$_REQUEST['password'].\"'\";\n $result= $db->query($sql);\n $num= $result->fetchColumn();\n if($num>0) {\n foreach($db->query($sql) as $row) {\n // echo $row['email'];\n $_SESSION['session_email']= $row['email'];\n $_SESSION['session_user_id']= $row['user_id'];\n $_SESSION['session_first_name']= $row['first_name'];\n $_SESSION['session_last_name']= $row['last_name'];\n\n }\n } \n \n }\n }", "title": "" }, { "docid": "3bf5845ccb8bec8164ab22da13f3b451", "score": "0.6513424", "text": "public function check_session_auth() {\n // Check if session exist\n if (isset($this->session->userdata['username'])) {\n // Check if user checked remember me checkbox\n if (isset($this->session->userdata['autodelete'])) {\n if ($this->session->userdata['autodelete'] < time()) {\n // Delete session and redirect to home page\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('member');\n $this->session->unset_userdata('autodelete');\n } else {\n redirect('/user/home');\n }\n } else {\n redirect('/user/home');\n }\n }\n }", "title": "" }, { "docid": "fa2e20fc46c0192119781cb9c79765ae", "score": "0.65126884", "text": "function login($data, $remember = false){\n\t\tif($this->exists()){\n \t\t$session_data = array(\n 'username' => $this->data()->staff_username,\n 'staff_db_id' => $this->data()->id,\n 'staff_id' => $this->data()->staff_id,\n 'isLoggedIn' => TRUE\n );\n\n $this->session->set_userdata($session_data);\n }else{\n\t// grab user input\n\n\t\t//print_r($data);exit;\n\t\tunset($data['log_show']);\t// this is the name attribute for the button clicked for login section\n\n \t$username = $data['staff_username'];\n $password = $data['password'];\n\t\t$remember = '';\n\n\t\tif(isset($data['rememberme'])){\n\n \t$remember = $data['rememberme'];\n\n\t\t}\n\n\t\t$user = $this->find($username); // this find the username in the database\n\n\t\tif($user){\n\t\t\tif($this->hash_created->decode_password($password, $this->data()->password)){\n\t\t\t\t// setting user session\n\t\t\t\t$session_data = array(\n 'username' => $this->data()->staff_username,\n 'staff_db_id' => $this->data()->id,\n 'staff_id' => $this->data()->staff_id,\n 'isLoggedIn' => TRUE\n );\n\n\t\t\t\t$this->session->set_userdata($session_data);\n\n\t\t\t\t// if remember me function is activated\n \tif($remember == 'on' && $remember != ''){\n $hash = $this->hash_created->unique();\n $hashCheck = $this->db->get_where('users_session', array('staff_id' => $this->data()->staff_id));\n\n if(!$hashCheck->num_rows){\n $this->db->insert('users_session', array(\n 'staff_id' => $this->data()->staff_id,\n 'ip_address'\t => $this->input->ip_address(),\n 'hash' => $hash\n ));\n }else{\n $hash = $hashCheck->row()->hash;\n }\n // setting the cookie\n $cookie = array(\n\t\t 'name' => $this->config->item('cookie_name'), // username cookie_hash\n\t\t 'value' => $hash,\n\t\t 'expire' => $this->config->item('cookie_expiry') // the expiry date is a day privilege\n\t\t );\n\n\t\t\t $this->input->set_cookie($cookie);\n\t\t\t\t\t// $this->input->cookie('username', false);\n\n \t} // end remember me function\n \t\techo 1;\n \t \t\t \t\treturn true;\n \t \t\t}else{\n \t \t\t\treturn 3; // incorrect password\n\t\t\t\treturn false;\n \t \t\t}\n\t\t}else{\n\t\t\t// not found, can't find the username\n\t\t\treturn 2;\n\t\t\treturn false;\n\t\t}\n\t}\n\t\treturn 4; // if nothing, can't login\n\t\treturn false;\n\t}", "title": "" }, { "docid": "91219bb898db13f1815460f97196367f", "score": "0.6501701", "text": "function logged_in() {\n if(isset($_SESSION['mail']) || isset($_COOKIE['name'])) {\n return false;\n }\n else {\n return true;\n }\n}", "title": "" }, { "docid": "769fe33806d8ce5e8feee08320365469", "score": "0.64931244", "text": "public static function userAuthenticated() : bool\n {\n if (!isset($_SESSION['acc_number'] , $_SESSION['token'])) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "0db0fd47e40140871c666662954521bd", "score": "0.64883333", "text": "public function login()\n {\n $admin_login = $this->get_admin_login();\n // ambil username dan password user yang login dari database\n $admin_from_db = $this->get_admin(\"SELECT * FROM admin WHERE username='$admin_login->username'\");\n // validasi\n if ($admin_login->password === $admin_from_db->password) {\n // set session\n $_SESSION[\"user_logged\"] = (object) [\n \"username\" => $admin_from_db->username,\n \"role\" => \"admin\"\n ];\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4fd3c5dd944d6d6a31d60cac404d4032", "score": "0.64882314", "text": "function _manage_login(){\n if((!isset($_COOKIE['username']))||(!isset($_SESSION['admin']))){\n _alert_back('非法登录');\n }\n}", "title": "" }, { "docid": "bb8442f92c5966c32d787bf187436a17", "score": "0.64879405", "text": "function user_authorized() {\n\t\tif (isset($_COOKIE['login']) && $_COOKIE['login'] &&\n\t\t\tisset($_COOKIE['passwd']) && $_COOKIE['passwd']) {\n\t\t\tif (user_pass_valid($_COOKIE['login'], $_COOKIE['passwd'])){\n\t\t\t\t$_SESSION[\"logged_user\"] = $_COOKIE['login'];\n\t\t\t\treturn (1);\n\t\t\t}\n\t\t}\n\t\treturn (0);\n\t}", "title": "" }, { "docid": "8628fcb0b14d5440396f768796ae6ed9", "score": "0.6479218", "text": "function authd() {\n $app = registry('app');\n $sess = $app->request->session->get('user');\n\n if ($sess === false) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "366f81c461d9c0cf9aa472f1b3d93c88", "score": "0.64728963", "text": "public function verificar_session(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "43c367bc5a98e9f3b8b49c4c5b0ef161", "score": "0.64646673", "text": "private function register(){\n\t\t$user = D(\"User\");\n\t\tif(!$data = $user->create()){\n // 防止输出中文乱码\n header(\"Content-type: text/html; charset=utf-8\");\n exit($user->getError());\n\t\t}\n\t\t$userId = $user->add($data);\n\t\tsession('starballkids_userId', $userId);\n\t\tsession('starballkids_userName', I('userName'));\n\t\tsession('starballkids_email', I('email'));\n\t\t//注册成功后把当前session的购物车加到用户下面\n\t\t$this->appendSessionToUser();\n\t\t//从哪里跳到登录页面,跳回去\n\t\tif(session('fromAction') != ''){\n\t\t\t$actionArray = C('FROM_ACTION');\n\t\t\t$actionDetail = $actionArray[session('fromAction')];\n\t\t\t$this->redirect($actionDetail['url'], $actionDetail['params']);\n\t\t}\n\t}", "title": "" }, { "docid": "d2ca710699d21af13d563ac1dcdcf628", "score": "0.6462741", "text": "public function checkSigninUser()\n {\n if ( !empty($_COOKIE['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n // Check session('nsmle') if isset redirect to admin home page\n } else if ( !empty($_SESSION['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n }\n }", "title": "" }, { "docid": "037ef8289b13377e7a14e66f63245522", "score": "0.6462697", "text": "public function checkLogin()\n {\n $user_ok = false;\n $user_id = \"\";\n $log_usename = \"\";\n if (isset($_SESSION['user_id']) && isset($_SESSION['username'])) {\n $user_id = preg_replace('#[^0-9]#', '', $_SESSION['user_id']);\n $log_usename = preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']);\n // Verify the user\n $user_ok = $this->evalLoggedUser($user_id, $log_usename);\n } else if (isset($_COOKIE[\"user_id\"]) && isset($_COOKIE[\"username\"])) {\n $_SESSION['user_id'] = preg_replace('#[^0-9]#', '', $_COOKIE['user_id']);\n $_SESSION['username'] = preg_replace('#[^a-z0-9]#i', '', $_COOKIE['username']);\n $user_id = preg_replace('#[^0-9]#', '', $_SESSION['user_id']);\n $log_usename = preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']);\n // Verify the user\n $user_ok = $this->evalLoggedUser($user_id, $log_usename);\n }\n return $user_ok;\n }", "title": "" }, { "docid": "963d7114396cd43aaee83ffadccf9f3a", "score": "0.64592606", "text": "public static function logged_in(){\r\n\r\n if(isset($_SESSION['username']) && isset($_SESSION['id'])){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "c4854cb08642ec5e0469b1be430f5b71", "score": "0.6452056", "text": "private function check_login() {\n\t\tif ( isset($_SESSION['id']) ) {\n\t\t\t$this->user_id = $_SESSION['id'];\n\t\t\t$this->username = $_SESSION['username'];\n\t\t\t$this->logged_in = true;\n\t\t\t$this->admin_rights = $_SESSION['admin_rights'];\n\t\t\t$this->hashed_email = $_SESSION['hashed_email'];\n\t\t} else {\n\t\t\tunset( $this->user_id );\n\t\t\tunset( $this->username);\n\t\t\t$this->logged_in = false;\n\t\t} // end of isset\n\t}", "title": "" }, { "docid": "26bb2a834e6d6422460fe27154ffccc1", "score": "0.6451311", "text": "public function doLogin(){\n\t\t$data = array();\n\t\t$data['username'] = $_POST[\"username\"];\n\t\t$data['password'] = $_POST[\"password\"];\n\t\t$user = D('User','Home')->getLocalUser($data['username'],$data['password']);\n\t\tif($user['username']&&$user['userid']){//login success\n\t\t\t$validates = D('Home.Validation');\n\t\t\t$status = $validates->getStatus($user['userid']);\n\t\t\tif($status==0){\n\t\t\t\t$this->assign('jumpUrl',U('Home/Public/login'));\n\t\t\t $this->error('该账户已经注册,但是没有通过邮箱验证。通过邮箱验证后即可激活帐号');\n\t\t\t}else if($status==1){\n\t\t\t\t$userservice = new UserService();\n\t\t\t\t$user['usertype'] = 'user';\n\t\t\t\tif($userservice->registerLogin($user,false))\n\t\t\t\t{\n\t\t\t\t\tU('Home/User/index','',true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->assign('jumpUrl',U('Home/Public/login'));\n\t\t\t $this->error('用户名或密码错误');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->assign('jumpUrl',U('Home/Index/index'));\n\t\t\t $this->error('非法账户!');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{//login fail\n\t\t\t$this->assign('jumpUrl',U('Home/Public/login'));\n\t\t\t$this->error('用户名或密码错误');\n\t\t}\n\t}", "title": "" }, { "docid": "4ad6ef238a9579bc5b8e83669c87a13d", "score": "0.6450615", "text": "public function checklogin() {\n\t\t\t\n\t\tif (!$this->input->post()) {\n\t\t\taudit_log(\"Error: parametri post non impostati. (login/checklogin)\");\n\t\t\texit(\"accesso non autorizzato\");\n\t\t}\n\t\t\n\t\t$post=$this->input->post();\n\t\t\n\t\tif ( (!isset($post['username'])) || (!isset($post['password'])) ) {\n\t\t\taudit_log(\"Error: dati post login errati o incompleti: \".json_encode($post).\". (login/checklogin)\");\n\t\t\techo \"Login errato\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$post['password']=sha1($post['password']);\n\t\n\t\tif ($user=$this->users->checkLogin($post)) {\n\t\t\t$this->session->user=$user;\t\t\t\n\t\t\t$this->users->setLastLogin($user->username);\n\t\t\taudit_log(\"Message: login effettuato. Dati utente: \".json_encode($user).\". (login/index)\");\n\t\t\thttp_response_code(200);\n\t\t}else{\n\t\t\taudit_log(\"Error: login errato. Dati login: \".json_encode($post).\" (login/checklogin)\");\n\t\t\thttp_response_code(401);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "2b46f985c46048b22b49ccf91568954c", "score": "0.6440932", "text": "function validateLogin(){\n $logged = $this->userManager->checkLogin($_POST['username'], hash('sha256', $_POST['password']))->fetch();\n if($logged){\n $_SESSION['login'] = $logged;\n header('Location: /admin');\n } else {\n header('Location: /');\n }\n }", "title": "" }, { "docid": "faf22a3ef358179aa1729744516ce2b5", "score": "0.6437138", "text": "private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }", "title": "" }, { "docid": "2ce0400fa235650d1abf4479e0e927ae", "score": "0.6434879", "text": "private function session_login() {\n $this->_auth->el_login(Session::get_var('user_login'), Session::get_var('user_pass'));\n $referer = $this->referer;\n \t\tif($this->_auth->is_login()) {\n if(!strpos('/login', $this->referer)) {\n $this->referer = $referer;\n return true;\n } else {\n $this->referer = get_option('home');\n return true;\n }\n \t\t} else {\n \t\t\t$this->_error = $this->_auth->get_auth_last_error();\n \t\t}\n return false;\n }", "title": "" }, { "docid": "7831dc290669ec92866bed71fefadf70", "score": "0.6427877", "text": "static function loginWithForm($db) {\n $user = $_POST[\"username\"];\n $pass = $_POST[\"password\"];\n $passHash = sha1($pass);\n\n $q = 'SELECT `userID`,`username`,`passHash`,`cookieHash` FROM `user` WHERE username = :user AND passHash = :passHash';\n $ps = $db->prepare($q);\n\n $ps->execute([\"user\"=>$user,\"passHash\"=>$passHash]);\n\n\n if($ps->rowCount() == 1) {\n $user_data = $ps->fetch();\n\n // logged in successfully\n $cookieHash = sha1(time().$passHash);\n $q = \"UPDATE `user` SET `cookieHash` = ? WHERE username = ?\";\n $ps = $db->prepare($q);\n\n $ps->execute([$cookieHash,$user]);\n\n\n setcookie(\"user\",$user,time()+60*60*24*7);\n setcookie(\"h\",$cookieHash,time()+60*60*24*7); \n \n return $user_data;\n } \n }", "title": "" }, { "docid": "272f4b4f25907a3874737ddae30977c9", "score": "0.6424914", "text": "function registerUser() {\n\t$uname = strip_tags($_POST['name']);\n\t$umobile = strip_tags($_POST['mobile']);\n\t$uemail = strip_tags($_POST['email']);\n\t$upassword = strip_tags($_POST['password']);\n\t$ucpassword = strip_tags($_POST['cpassword']);\n\n\t$validInputs = $uname != '' && $umobile != '' && $uemail != '' && $upassword != '' && ($upassword == $ucpassword);\n\tif ($validInputs) {\n\n\t\t$userExists = qSelectObject(\"users\", \"email\", array(\"email\" => $uemail));\n\t\tif ($userExists) {\n\t\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"This email is already in use!\"));\n\t\t\treturn;\n\t\t}\n\n\t\t// Hash password before inserting into database\n\t\t$hashed_password = getEncodedHash($upassword);\n\t\t$newUser = array(\"name\" => $uname, \"mobile\" => $umobile, \"email\" => $uemail, \"password\" => $hashed_password);\n\t\t$insertId = qInsert(\"users\", $newUser);\n\t\t// Creation error\n\t\tif (!$insertId) {\n\t\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"Failed to create user. Please try again!\"));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use encoded hash so that when we enable payments, we can identify sessions\n\t\t// by the hash of the email\n\t\t$_SESSION['id'] = getEncodedHash($uemail);\n\t\t$_SESSION['name'] = $uname;\n\t\t$_SESSION['email'] = $uemail;\n\t\t$_SESSION['uid'] = $insertId;\n\t\t//Setting the cookie at time of register\n\t\t//login_email: c1\n\t\t//login_pass: q\n\t\tsetcookie(\"c1\", $uemail, time() + (86400 * 30), \"/\");\n\t\tsetcookie(\"q\", $hashed_password, time() + (86400 * 30), \"/\");\n\t\techo jsonResponse(array(\"success\" => true, \"message\" => \"\", \"redirect\" => true, \"redirect_target\" => \"index.php\"));\n\t} elseif ($upassword != $ucpassword) {\n\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"The passwords do not match!\"));\n\t} else {\n\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"Invalid inputs!\"));\n\t}\n\treturn;\n}", "title": "" }, { "docid": "e9e2a8c7da4a0477424649426bfc998e", "score": "0.6424182", "text": "public function loginUser()\n\t{\n\t\t//$tokenstr = json_encode($token);\n\t\t$coll = new FormCollection($this->request->data['usermodel']);\n\t\t$username = $coll->getItem('username');\n\t\t$pwd = $coll->getItem('password');\n\t\t\n\t\t$sen = new Sentinel();\n\t\t$usr = $sen->validateUser($username, $pwd);\n\t\t\n\t\tif($usr){\n\t\t\t$cookie = array(\n\t\t\t\t'name' => 'SiteToken',\n\t\t\t\t'value' => $usr->getId(),\n\t\t\t\t'expire' => 0,\n\t\t\t\t'secure' => FALSE\n\t\t\t);\n\t\t\t\n\t\t\t$succ = setcookie('SiteToken', $usr->getId(), 0, '/', '', FALSE);\n\t\t\t//echo \"Return value of setting cookie: \" . $succ;\n\t\t\t$this->redirect('/dashboard/');\n\t\t}else{\n\t\t\t$this->set(array('status'=>'fail'));\n\t\t\treturn $this->render(array('template'=>'login'));\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "a50a4a05ddc5799bdcf5d58567262dcd", "score": "0.6420513", "text": "public static function checkCookie() {\n if(isset($_COOKIE['login'])) {\n \n\t \n\t list($user, $token, $sig) = explode(':', $_COOKIE['login'], 3);\n\t \n\t $serverSig = hash('sha256', sha1(Account::$serverSignKey) . $token);\n\t \n\t \n\t if ($serverSig != $sig) {\n\t return false;\n\t } else {\n\t \n\t \n connect();\n \n $account = new Account($user);\n Account::reLogin($account, $account->getHash());\n\t return true;\n\t\t }\n\t }\n \n return false;\n }", "title": "" }, { "docid": "1c31c5bf25a9205393c3d5b9bf4fb7ba", "score": "0.6420151", "text": "function login($username, $password){\n\tinclude_once(\"db.inc.php\");\n\tif($username == USERNAME && $password == USERPASS){\n\t\tsession_set_cookie_params(3600*6, '/', 'mtl.parkr.me');\n\t\tsession_id(SESSION_ID);\n\t\tsession_start();\n\t\tsession_register(SESSION_ID);\n\t\t$_SESSION['started'] = true;\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "a17663f69bc508fbc1d61fd9e4efd91f", "score": "0.64171785", "text": "public function validateCookieAndLogIn(User $user) {\n\t\tassert (!is_null($user));\n\t\t$storedUser = $this->userDAL->getUserWithToken($user);\n\t\t\n\t\t// If it's null there is no data and the cookie is probably tampered with\n\t\tif (is_null($storedUser)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = ($user->getUsername() == $storedUser->getUsername() && $this->verifyHashedToken($user->getPassword(), $storedUser->getPassword()));\n\t\tif ($result) {\n\t\t\t$_SESSION[self::$loggedIn] = true;\n\t\t\t$_SESSION[self::$sessionUserLocation] = new loggedInUser($user->getUsername());\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "3bba09d210cba30b6b880eaa4aa51592", "score": "0.6416556", "text": "public function CookieSet(){\n if (isset($_COOKIE[$this->_cookieUsername]) && isset($_COOKIE[$this->_cookiePassword])){\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "65cc18c509d7403f05728194451106d7", "score": "0.64163846", "text": "public function login()\n {\n\n if(server('REQUEST_METHOD') == 'POST'){\n\n $email = $_POST['email'];//принимаем данные из формы (email,пароль)\n $password = $_POST['password'];\n\n if ($user = User::login($email, $password))\n {\n Session::set('email', $user['email']);//создаем сессию авторизованному пользователю\n header('Location: ' . server('HTTP_REFERER'));\n }\n else if (!empty($_POST)){//нужно чтобы если поля еще не заполнены ничем - не выводилась ошибка, что неправильный логин/пароль\n $errors = \"Вы ввели неправильный логин или пароль!\";\n Session::set('errors', $errors);\n redirect(301, server('HTTP_REFERER'));\n }\n\n }else{\n redirect(301, '/');\n }\n\n }", "title": "" }, { "docid": "677f199e339783b7f461947957a84c92", "score": "0.64124537", "text": "public function login() {\n\t\t$name = filter_var(Helper::post('name'), FILTER_SANITIZE_STRING);\n\t\t$password = filter_var(Helper::post('password'), FILTER_SANITIZE_STRING);\n\n\t\t/*** now we can encrypt the password ***/\n\t\t$password = sha1($password);\n\n\t\ttry {\n\t\t\t//$dbh = $db->base;\n\t\t\t//$stmt= $dbh->base->query(\"SELECT id, name, password FROM users WHERE name = '$name' AND password = '$password'\");\n\t\t\t$stmt = $this -> db -> prepare(\"SELECT id, name, email, password FROM \".DBPREFIX.\"users WHERE (name = ? OR email = ?) AND password = ?\");\n\t\t\t$stmt -> execute(array($name, $name, $password));\n\n\t\t\t/*** check for a result ***/\n\t\t\t$user_id = $stmt -> fetchColumn();\n\n\t\t\t/*** if we have no result then fail boat ***/\n\t\t\tif ($user_id == FALSE) {\n\t\t\t\treturn 101;\n\t\t\t} else {\n\t\t\t\tHelper::session_set('id', $user_id);\n\t\t\t\t//Helper::session_set('user_name', $row['name']);\n\t\t\t\t//Helper::session_set('user_email', $row['email']);\n\t\t\t\t//$search = \"%$search%\";\n\t\t\t\t$user_data = $this -> db -> prepare(\"SELECT * FROM \".DBPREFIX.\"users WHERE name = ? OR email = ?\");\n\t\t\t\t$user_data -> execute(array($name, $name));\n\t\t\t\t$data = $user_data -> fetchAll();\n\t\t\t\tHelper::session_set('user_name', $data[0]['name']);\n\t\t\t\tHelper::session_set('user_email', $data[0]['email']);\n\t\t\t\tHelper::session_set('user_role', $data[0]['role']);\n\t\t\t\tHelper::session_set('user_access', $data[0]['role_id']);\n\t\t\t\t//var_dump($data[0]);\n\t\t\t\t//while ($row = $stmt -> fetch()) {\n\n\t\t\t\t//}\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t} catch(Exception $e) {\n\t\t\t/*** if we are here, something has gone wrong with the database ***/\n\t\t\treturn 102;\n\t\t}\n\t}", "title": "" }, { "docid": "e3d80da2dcf9f4f8d59ebe45b1ccec99", "score": "0.6406421", "text": "public function IsAuthenticatedUser()\n { \n if(isset($_SESSION['user'])){\n return true;\n }\n else{\n return false;\n } \n }", "title": "" }, { "docid": "6e7bc1820f5a30ec5e783c9565885f3e", "score": "0.640456", "text": "public function checkCredentials($username, $password) {\n if($this->getUsername()==$username && $this->getPassword()==$password) {\n if (!isset($_COOKIE[\"username\"])) {\n setcookie(\"username\", \"$username\", time() + (86400 * 7));\n setcookie(\"password\",\"$password\",time() + (86400 * 7));\n }\n return \"Yes\";\n } else {\n return \"No\";\n }\n }", "title": "" }, { "docid": "5ccd218f66e07ba32ad58dba85010022", "score": "0.6401537", "text": "function login_user($email, $password, $remember){\n\n\t$result = query(\"SELECT password, id FROM users WHERE email='\".escape($email).\"' AND active=1\");\n\tconfirm($result);\n\n\tif (row_count($result) ==1 ) {\n\t\t\n\t\t$row = fetch_array($result);\n\n\t\t$db_password = $row['password'];\n\n\t\tif (md5($password)==$db_password ) {\n\n\t\t\t//set remember\n\t\t\tif ($remember == \"on\") {\n\t\t\t\tsetcookie('email', $email, time() + 86400 );\n\t\t\t}\n\t\t\t//\n\n\t\t\t$_SESSION['email'] = $email;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\n\n\t}\n\n}", "title": "" }, { "docid": "2543018583e38de711baea8570080921", "score": "0.64015037", "text": "function jakChecklogged() {\n\t if (isset($_COOKIE['jak_lcp_cookname']) && isset($_COOKIE['jak_lcp_cookid'])) {\n\t $_SESSION['jak_lcp_username'] = $_COOKIE['jak_lcp_cookname'];\n\t $_SESSION['jak_lcp_idhash'] = $_COOKIE['jak_lcp_cookid'];\n\t }\n\t\n\t /* Username and idhash have been set */\n\t if (isset($_SESSION['jak_lcp_username']) && isset($_SESSION['jak_lcp_idhash']) && $_SESSION['jak_lcp_username'] != $this->username) {\n\t /* Confirm that username and userid are valid */\n\t if (!JAK_userlogin::jakConfirmidhash($_SESSION['jak_lcp_username'], $_SESSION['jak_lcp_idhash'])) {\n\t \t/* Variables are incorrect, user not logged in */\n\t unset($_SESSION['jak_lcp_username']);\n\t unset($_SESSION['jak_lcp_idhash']);\n\t \n\t return false;\n\t }\n\t \n\t // Return the user data\n\t return JAK_userlogin::jakUserinfo($_SESSION['jak_lcp_username']);\n\n\t /* User not logged in */\n\t } else {\n\t \treturn false;\n\t }\n\t}", "title": "" }, { "docid": "6a2d39df0676c07437dd8754900cc6b3", "score": "0.63981324", "text": "function aksi_login(){\n\t\t$username = $this->input->post('username');\n\t\t$password = $this->input->post('password');\n\t\t$where = array(\n\t\t\t'username' => $username,\n\t\t\t'password' => md5($password)\n\t\t\t);\n\t\t$cek = $this->UserLoginModel->cek_login($where)->num_rows();\n\t\tif($cek > 0){\n\t\t\t$data_session = array(\n\t\t\t\t'nama' => $username,\n\t\t\t\t'status_login'=>1\n\t\t\t\t);\n \n\t\t\t$this->session->set_userdata($data_session);\n \n\t\t\tredirect(site_url(\"dashboard\"));\n \n\t\t}else{\n\t\t\techo \"Username dan password salah !\";\n\t\t}\n\t}", "title": "" }, { "docid": "85de01999543458dfbdce4c410cc7342", "score": "0.6396937", "text": "public function login(){\n if (isset($_POST)) {\n # Identificar el usuario\n $user = new User();\n $identity =$user->login($_POST['email']);\n //mantener usuario identificado\n if($identity && is_object($identity)){\n\t\t\t\t$_SESSION['identity'] = $identity;\n\t\t\t\t//identificacion de administrador\n\t\t\t\tif($identity->rol == 'admin'){\n\t\t\t\t\t$_SESSION['admin'] = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$_SESSION['error_login'] = 'Identificación fallida !!';\n }\n }\n header(\"Location:\".URL);\n }", "title": "" }, { "docid": "cff2ba20bb5d16977e239b86889f6043", "score": "0.63910264", "text": "public function User_Login()\n\t {\n\t\t $active_user = $this->input->post('username');\n \t\t $is_user = get_cookie('active_user', TRUE);\n\n\t\t if (!$is_user) {\n\t\t\t set_cookie('active_user', $active_user, 10000);\n\n\t\t } else {\n\t\t\t delete_cookie('active_user');\n\t\t }\n\n\t\t $this->index();\n\t }", "title": "" }, { "docid": "a0635c5d8fd4a85c24b85c71f6a6081b", "score": "0.6390137", "text": "public function checkLogin()\r\n {\r\n $this->form_validation->set_rules('username', 'Username', 'required|valid_email');\r\n $this->form_validation->set_rules('password', 'Password', 'required|callback_verifyUser');//callback is sort of \r\n if($this->form_validation->run()==false) //calling verifyUser fxn\r\n {\r\n $this->load->view('login');\r\n }\r\n else\r\n {\r\n $username = $this->input->post('username');\r\n $password = $this->input->post('password');\r\n // $data['username']= $username;\r\n //$data['password']= $password;\r\n $session_data = array(\"username\"=>$username);\r\n $this->session->set_userdata($session_data);\r\n \r\n redirect('splController/toLoadProductsPage');\r\n }\r\n }", "title": "" }, { "docid": "306cad28d2b2c9249ac703dce6315a13", "score": "0.6386265", "text": "public function login()\n\t{\n\t\t//appelle le usermanager pour les requetes sql\n\t\t//affichage du formulaire\n\n\t\t$error = '';\n\t\t//si le form est soumis...\n\n\t\tif (!empty($_POST)){\n\n\t\t\t$usernameOrEmail = $_POST['usernameOrEmail'];\n\n\t\t\t$userManager = new \\Model\\Manager\\UserManager();\n\t\t\t//on va chercher le user en fonction du pseudo ou de l'email\n\t\t\t$user = $userManager->searchUser($usernameOrEmail);\n\n\t\t\t//hache le mot de passe et le compare à celui de la bdd\n\t\t\tif (password_verify($_POST['password'], $user['password'])){\n\t\t\t\t//connectez l'user en stockant une ou des infos dans la session.\n\t\t\t\t//On vérifiera ces infos sur les pages à sécuriser.\n\t\t\t\t$_SESSION['user'] = $user;\n\n\t\t\t\t//$_COOKIE pour la lecture\n\t\t\t\t//on stocke le token dans un cookie\n\t\t\t\t//on ne devrait placer ce cookie que si une case est cochée\n\t\t\t\t//pour l'instant, ce cookie ne sert à rien !!!\n\t\t\t\tsetcookie(\"remember_me\", $user['token'], strtotime(\"+ 6 months\"), \"/\");\n\t\t\t\theader(\"Location: user\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//on garde ça vague pour ne pas donner d'infos aux méchants\n\t\t\t\t$error = \"Wrong username or email !\";\n\t\t\t}\n\n\t\t}\n\n\t\t$data = [\n\t\t\t\"error\" => $error\n\t\t];\n\t\tView::show(\"login.php\", \"Website | User Home\", $data);\n\t}", "title": "" }, { "docid": "226160a6c2a2a7d4c7b09ac3a5714a99", "score": "0.6384861", "text": "function login_user($email, $password, $remember)\n{\n\t$database \t= \"SELECT password, email FROM users WHERE email = '\".escape($email).\"' AND ACTIVE = 1\";\n\t$result \t= query($database);\n\tif (row_count($result) == 1)\n\t{\n\t\t$row \t\t\t= fetch_array($result);\n\t\t$db_password \t= $row['password'];\n\n\t\tif (md5($password) === $db_password) {\n\n\t\t\tif ($remember == \"on\") {\n\t\t\n\t\t\t\tsetcookie('email', $email, time() + 86400);\n\t\t\t}\n\n\t\t\t$_SESSION['email'] = $email;\n\t\t\n\t\t\treturn true;\n\t\t}\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "7417f64bbdafb75e30d4f9ddba8284f5", "score": "0.63844806", "text": "function userAuthorised($dbConnected,$username,$password){\n \n $md5password=md5($password);\n \n $sql_query= \"SELECT ID,password,accesslevel FROM tuser where username='$username'\";\n \n \n $sql_selectQuery= mysqli_query($dbConnected, $sql_query);\n echo mysqli_error($dbConnected);\n while($row= mysqli_fetch_array($sql_selectQuery,MYSQLI_ASSOC)){\n $ID = $row['ID'];\n $passwordretrieved = $row['password'];\n $accesslevel = $row['accesslevel']; \n }\n mysqli_free_result($sql_selectQuery);\n $returncode=false;\n if(!empty($passwordretrieved) AND ($passwordretrieved==$md5password)) {\n \n $_SESSION['user'] = $accesslevel;\n setcookie('userID', $ID, time()+7200);\n $returncode=true;\n }\n return $returncode;\n \n }", "title": "" }, { "docid": "68fc762a905553ca3e0f353f0f4133b9", "score": "0.63808966", "text": "private function cookie_login()\n\t{\n\t\tglobal $mwf_cookie;\n\t\t// We need to have a cookie to work with.\n\t\tif ($mwf_cookie === NULL || !isset($_COOKIE[$mwf_cookie]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$split = explode(':', $_COOKIE[$mwf_cookie]);\n\t\ttry\n\t\t{\n\t\t\t$mwf_user = new MwfUser($split[0], MwfUser::IdentId);\n\t\t\tif ($mwf_user->cookie_authenticate($split[1]))\n\t\t\t{\n\t\t\t\t// Defer to login to set up the session.\n\t\t\t\t$this->login($mwf_user->get_user_name(), NULL, true);\n\t\t\t\t$_SESSION['logged_in_via_cookie'] = true;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Just give up.\n\t\t}\n\t}", "title": "" }, { "docid": "f58821a3c63e4ac9da3cc2f2fcd46a9a", "score": "0.6380493", "text": "function login()\n{\n\n\t$username = $_POST['username'];\n\t$password = $_POST['password'];\n\n\t$result = admin()->get(\"username='$username' and password = '\".sha1($password).\"' and level='hr'\");\n\n\tif ($result){\n\t\t$_SESSION['hr_session'] = $username;\n\t\tif (sha1($password) == sha1('temppassword')){\n\t\t\t$_SESSION['temp_session'] = $username;\n\t\t\theader('Location: index.php?view=changepassword');\n\t\t}else{\n\t\theader('Location: index.php');\n\t\t}\n\t}\n\telse {\n\t\t\theader('Location: index.php?error=User not found in the Database');\n\t}\n}", "title": "" }, { "docid": "f440767206a875ee28d084e7d8787322", "score": "0.6379213", "text": "private function isLoggedInBefore() {\n\n\t\t# If user data was saved\n\t\tif(!$sessionId = ud::$cookie->key('sessionId')->typeFilter(FilterRule::TYPE_EMPTY_STRING)->valueOr(null))\n\t\t\treturn false;\n\n\t\ttry {\n\n\t\t\t# We try to authorise user\n\t\t\tif($user = self::authenticationBySession($sessionId))\n\t\t\t\tself::authorisation($user);\n\t\t\telse\n\t\t\t\t$this->logout(false);\n\n\t\t} catch(\\Exception $e) {\n\t\t\tif($e instanceof DatabaseException)\n\t\t\t\tthrow new DatabaseException(\"Can't auth user, \".$e->getMessage());\n\t\t\tInfo::error(\"Во время восстановления сессии произошла ошибка\");\n\t\t}\n\n\t\t# False if auth failed\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "3008091a779f85613a4afe61b531d9fb", "score": "0.6378229", "text": "public function _checkLogin()\n {\n $excludePage = array('reset-password', 'create-password', 'login');\n \n if (!Session::has('ses_userid') && !in_array($this->currentPath, $excludePage))\n \t{\n \t if ( Request::cookie('u_hash') && Request::cookie('e_hash'))\n {\n $user = User::where('hash', Request::cookie('u_hash'))->with('pegawai')->first();\n \n if ( count($user)>0 && sha1($user->user_email) == Request::cookie('e_hash') )\n {\n return $this->_setSessionLogin($user);\n }\n }\n \n $this->setNotif( Lang::get('login.must_login') );\n\n header(\"location:\".BeUrl('login'));exit;\n }\n }", "title": "" } ]
921313a2b04ed2afcf91b6e31fb3010d
Sets the policy length
[ { "docid": "4ba75df55724c5c75d6438749eea6465", "score": "0.7534722", "text": "public function setPolicyLength($policyLength)\n {\n $this->policyLength = $policyLength;\n return $this;\n }", "title": "" } ]
[ { "docid": "3f5246e87c2db78e1a85bc8d567852a6", "score": "0.72333366", "text": "public function setLength($length);", "title": "" }, { "docid": "5eb262aa7755be6452fd36bd5b237ad0", "score": "0.7053596", "text": "function SetRequestedLength($length){}", "title": "" }, { "docid": "18b3b057e0aaec07b62e11584666cb28", "score": "0.6901299", "text": "public function getPolicyLength()\n {\n return $this->policyLength;\n }", "title": "" }, { "docid": "c5b251fcd9a60def3ca565b35dd2cb84", "score": "0.68694514", "text": "function SetMaxLength($len){}", "title": "" }, { "docid": "903aec70e28c55265067786520faf6f0", "score": "0.6733522", "text": "public function setLength($length)\n\t{\n\t\t$this->length = $length;\n\t}", "title": "" }, { "docid": "f9d12d13ef7e2fc8ff41dbe92ba31819", "score": "0.67033416", "text": "public function setLength($length)\n {\n $this->length = $length;\n }", "title": "" }, { "docid": "ac7b74f5ac5b15c1f0c7c8cfa18689b2", "score": "0.6687289", "text": "public function setLength($length) {\n $this->length = $length;\n }", "title": "" }, { "docid": "12b3b78f72e855d34687d21f79398fbe", "score": "0.66056967", "text": "public function setLength(int $length)\n {\n $this->expiration[self::EXPIRATION][self::LENGTH] = $length;\n }", "title": "" }, { "docid": "fb8575c2c7e0098827c5bfd8b1324b90", "score": "0.6276504", "text": "function setBlockLength($length)\n {\n return;\n }", "title": "" }, { "docid": "c62f7178d40b48da3b91d74b6696988e", "score": "0.61493695", "text": "function set_cache_length( $length ) {\n\n\t\tself::$cache_length = $length;\n\n\t}", "title": "" }, { "docid": "714615793460dfd831d8acc7de38beec", "score": "0.6139987", "text": "public function setPageLength() {\n $length = Input::get('length');\n if (!isset($length)) {\n $length = 50;\n }\n\n $this->length = $length;\n }", "title": "" }, { "docid": "75e279915b8320097bdb3591e5fe5af0", "score": "0.60727847", "text": "private function updateLength()\n {\n $this->_length = count($this->_result);\n }", "title": "" }, { "docid": "cb7061aec2a1a0d10778cd39cb3ecb8b", "score": "0.60417795", "text": "private function prepareLength() {\n $result = $this->getValuesForSelectorSetting(WooCommerceSettings::WC_LENGTH_SELECTORS, 'text', false, true, true);\n if (!$result) return;\n\n $this->wcData->setLength($result);\n }", "title": "" }, { "docid": "ebc142aee413541082142fcebc82a282", "score": "0.59237224", "text": "public function setRemainLen($len)\n {\n $this->remainLen = (int) $len;\n }", "title": "" }, { "docid": "34ef456f30236c25af0fa24f3c08711f", "score": "0.5904502", "text": "public function setLength($length)\n {\n $this->values['Length'] = $length;\n return $this;\n }", "title": "" }, { "docid": "5895665b65049facb82348ab7062264a", "score": "0.5894496", "text": "public function setMaxLength($maxLength);", "title": "" }, { "docid": "3fc0fa818717132d09fc2d7ad1e32bbe", "score": "0.5858925", "text": "public function length ( $length ) {\n $this->length = (int) $length;\n return $this;\n }", "title": "" }, { "docid": "667bc1dce2bfc631947d74ea9be6fffb", "score": "0.5813086", "text": "function setKeyLength($length)\n {\n $length >>= 5;\n if ($length > 8) {\n $length = 8;\n } else if ($length < 4) {\n $length = 4;\n }\n $this->Nk = $length;\n $this->key_size = $length << 2;\n\n $this->explicit_key_length = true;\n $this->changed = true;\n }", "title": "" }, { "docid": "b831e6b5ae3d44a326e444e07adbb73c", "score": "0.58068115", "text": "public function setLength(?string $length): self\n {\n $this->length = $length === '' ? null : $length;\n return $this;\n }", "title": "" }, { "docid": "e8fccc84488153b0aebf9b1d15e2bbe6", "score": "0.5761249", "text": "public function setPageLength($length = 10)\n {\n \t$this->pageLength = $length;\n }", "title": "" }, { "docid": "464d37fbbd98ffa3bb6ccb3f282c80ed", "score": "0.5756916", "text": "function setBlockLength($length)\n {\n $length >>= 5;\n if ($length > 8) {\n $length = 8;\n } else if ($length < 4) {\n $length = 4;\n }\n $this->Nb = $length;\n $this->block_size = $length << 2;\n $this->changed = true;\n }", "title": "" }, { "docid": "bf3c069c98396707b54f320c88c96410", "score": "0.5750564", "text": "public function __construct($length)\n\t{\n\t\t$this->length = $length;\n\t}", "title": "" }, { "docid": "be6f4df7b3ab1b7b02d3a2e2e5588192", "score": "0.5729382", "text": "public static function length($new_length = 55) {\n Excerpt::$length = $new_length;\n \n add_filter('excerpt_length', 'Excerpt::new_length');\n \n Excerpt::output();\n }", "title": "" }, { "docid": "d2567250d9d9e524968c27c8012fa384", "score": "0.57176214", "text": "public function length(?int $length)\n {\n $this->fields[$this->current]['length'] = $length;\n\n return $this;\n }", "title": "" }, { "docid": "5847bb23b77a387e8958923fe49c90d4", "score": "0.5690842", "text": "public function setLength($length)\n {\n $this->length = $length;\n\n return $this;\n }", "title": "" }, { "docid": "f0848ab1d9bbf3e16b9f24d7f27d7bdc", "score": "0.56657726", "text": "public function setLength($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "f0848ab1d9bbf3e16b9f24d7f27d7bdc", "score": "0.56657726", "text": "public function setLength($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "90595160558f4f2759e9ad612611e278", "score": "0.565583", "text": "protected function length($length) {\n\t\tif (strlen($this->value) !== $length) $this->setIssue('is length');\n\t}", "title": "" }, { "docid": "edbb4be7a59ec77150eb127427543d6a", "score": "0.5649616", "text": "public static function length($new_length = 55) {\n Excerpt::$length = $new_length;\n\n add_filter('excerpt_length', 'Excerpt::new_length');\n\n Excerpt::output();\n }", "title": "" }, { "docid": "edbb4be7a59ec77150eb127427543d6a", "score": "0.5649616", "text": "public static function length($new_length = 55) {\n Excerpt::$length = $new_length;\n\n add_filter('excerpt_length', 'Excerpt::new_length');\n\n Excerpt::output();\n }", "title": "" }, { "docid": "e98aaba44ae1838b070b6e3c0712b2b0", "score": "0.56425273", "text": "public function SetRoadLength($road_length)\n {\n $this->road_length=$road_length;\n }", "title": "" }, { "docid": "a0466e5f01c55aeb5a746aec40ce2120", "score": "0.56123817", "text": "public function setMaxLength($length)\r\n {\r\n $this->_maxLength = $length;\r\n return $this;\r\n }", "title": "" }, { "docid": "78726e31ee2c7caab813f97c5b1f6553", "score": "0.5563726", "text": "public function setLength($length = null): object\n\t{\n\t\tif (null !== $length && !($length instanceof FHIRInteger)) {\n\t\t\t$length = new FHIRInteger($length);\n\t\t}\n\t\t$this->_trackValueSet($this->length, $length);\n\t\t$this->length = $length;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9a5ef73d71fd9df5fd1bf522ce925155", "score": "0.5551003", "text": "public function setPolicy($val)\n {\n $this->_propDict[\"policy\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "6818b1cd2cc4ad362de3547b4d8e28e4", "score": "0.5547685", "text": "public static function length($new_length = 55) {\n BarristarExcerpt::$length = $new_length;\n add_filter('excerpt_length', 'BarristarExcerpt::new_length');\n BarristarExcerpt::output();\n }", "title": "" }, { "docid": "40b09d260d3eccf5119885547e8a6d5f", "score": "0.55374414", "text": "public function setMinimumRequiredConstraints(int $number): PasswordPolicyInterface;", "title": "" }, { "docid": "c340d34e6e27d371ada431189d1dcd20", "score": "0.55198336", "text": "public function length($value) {\n return $this->setProperty('length', $value);\n }", "title": "" }, { "docid": "1100541649f7cb921d45192624ca181d", "score": "0.5487957", "text": "protected function defineTotalLengthOfSides(): void\n {\n $this->fullLengthOfSides = $this->getLengthOfSides() * $this->numberOfProducts;\n }", "title": "" }, { "docid": "b48654335f6b6c8953c1e3bc71bd89a0", "score": "0.547445", "text": "public function setPasswordMinimumLength($val)\n {\n $this->_propDict[\"passwordMinimumLength\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "8af2930931c4f07d4207f1864d0534c5", "score": "0.54452443", "text": "public function setMaxPasswordLength($length);", "title": "" }, { "docid": "9f9a58ffb92c23062fd8451661883050", "score": "0.54417074", "text": "public function setMinPasswordLength($length);", "title": "" }, { "docid": "cafde09ff4804fe724102b50cd35d4e2", "score": "0.54394513", "text": "protected function getLength()\n {\n return 10;\n }", "title": "" }, { "docid": "888647a8d224eef33ecddee96311b1e4", "score": "0.53954494", "text": "public function length($value) {\n $this->annotations['length'] = $value;\n return $this;\n }", "title": "" }, { "docid": "f7a835734fa78f784429f14ca0e2358e", "score": "0.5387838", "text": "function setSize($size)\r\n\t{\r\n\t\t$this->size = 0+$size;\r\n\t}", "title": "" }, { "docid": "8e5f2a5008694b2f3d86c773c5e3d245", "score": "0.53679097", "text": "function setwidth($width){\r\n\t\t$this->width = $width;\r\n\t}", "title": "" }, { "docid": "c96860b43dbb4d3c567b95ecc8f73ab3", "score": "0.53393435", "text": "function SetWidth($width){}", "title": "" }, { "docid": "c96860b43dbb4d3c567b95ecc8f73ab3", "score": "0.53393435", "text": "function SetWidth($width){}", "title": "" }, { "docid": "c96860b43dbb4d3c567b95ecc8f73ab3", "score": "0.53393435", "text": "function SetWidth($width){}", "title": "" }, { "docid": "c96860b43dbb4d3c567b95ecc8f73ab3", "score": "0.53393435", "text": "function SetWidth($width){}", "title": "" }, { "docid": "c96860b43dbb4d3c567b95ecc8f73ab3", "score": "0.53393435", "text": "function SetWidth($width){}", "title": "" }, { "docid": "c96860b43dbb4d3c567b95ecc8f73ab3", "score": "0.53393435", "text": "function SetWidth($width){}", "title": "" }, { "docid": "f8d69dc53095f354efcee46c56d81107", "score": "0.5333394", "text": "public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }", "title": "" }, { "docid": "f8d69dc53095f354efcee46c56d81107", "score": "0.5333394", "text": "public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }", "title": "" }, { "docid": "d4833e6f7b2d8033706544ce64373338", "score": "0.5327041", "text": "function setWidth( $width ) \n {\n $this->parameterValues ['width'] = $width;\n $this->areParametersSet = true;\n }", "title": "" }, { "docid": "40f223cea29c13fb4780d74dd833a2b4", "score": "0.5326015", "text": "private function _initializeBasePasswordPolicy() {\r\n $this->_basePasswordPolicy['illegal_attempts_limit'] = 3; //count\r\n $this->_basePasswordPolicy['password_reset_frequency'] = 45; //days\r\n $this->_basePasswordPolicy['password_repeat_minimum'] = 5; //count\r\n $this->_basePasswordPolicy['illegal_attempts_penalty_seconds'] = 600; //seconds\r\n $this->_setUdfPasswordPolicy($this->_basePasswordPolicy);\r\n }", "title": "" }, { "docid": "560f7ab6335008c81f7add481a58eaf4", "score": "0.5318311", "text": "public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }", "title": "" }, { "docid": "5bc9dc20eb14e667ba64efbab20d6aea", "score": "0.52950174", "text": "public function setMaxLength(?int $value): void {\n $this->getBackingStore()->set('maxLength', $value);\n }", "title": "" }, { "docid": "6228f8a1641fadfac0fb78b08b1c2346", "score": "0.52937037", "text": "function qed_custom_excerpt_length($length) {\r\n\t\treturn qed_get_option( 'excerpt_length', 'option' );\r\n\t}", "title": "" }, { "docid": "df8faf1dceb37dbfc4a32a089b21174e", "score": "0.5291431", "text": "function setMaxSize($size) {}", "title": "" }, { "docid": "1061cc86de8357f6db1bdbd3716f5dee", "score": "0.5264089", "text": "function change_excerpt_length($length){\n\t\treturn 15;\n\t}", "title": "" }, { "docid": "3caad2d5989850b845d04eb61c2081d6", "score": "0.5262052", "text": "public function setEntropyLength( $length )\n\t{\n\t\tini_set( 'session.entropy_length', $length );\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c717142f26158a8acc22345b9894cc6d", "score": "0.52558833", "text": "function AutoCompSetMaxWidth($characterCount){}", "title": "" }, { "docid": "13acdc6fd9154acd96a2982cc591712a", "score": "0.52303326", "text": "public function setFixedWidth($width)\n {\n $this->fixedWidth = $width;\n }", "title": "" }, { "docid": "b39acac941bd4fb27e28a0effd3657a8", "score": "0.521658", "text": "static public function max_len($value = null) {\n if ($value === null) return self::$max_len;\n self::$max_len = (int) $value;\n }", "title": "" }, { "docid": "b1a617091620fb1737cf4118a50dcc20", "score": "0.521258", "text": "function setMaxWidth($width)\n\t{\n\t\t$this->_max_width = $width;\n\t}", "title": "" }, { "docid": "2a9b40a916e8c832254aa49a9bb2ec5d", "score": "0.5203501", "text": "public static function new_length() {\n if( isset(BarristarExcerpt::$types[BarristarExcerpt::$length]) )\n return BarristarExcerpt::$types[BarristarExcerpt::$length];\n else\n return BarristarExcerpt::$length;\n }", "title": "" }, { "docid": "8ee141015112e3b96e54f1ca83364078", "score": "0.5201321", "text": "public function set_width ($width) {\n $this->width = $width;\n }", "title": "" }, { "docid": "0410e610fc34c5e4b50838b6bf8c2c50", "score": "0.5197396", "text": "public function set_width($width)\n {\n $this->width = $width;\n }", "title": "" }, { "docid": "ef15f6b2c69c39e8ba256cede12c85ff", "score": "0.5194563", "text": "protected static function validates_length_of($attribute, $options=array()) {\n static::set_validation('validate_length_of', $attribute, $options);\n }", "title": "" }, { "docid": "893e0b190c0bf0c050012b036659656f", "score": "0.519445", "text": "public function setWidth($value) {\n $this->getOptions()->add('width', $value);\n }", "title": "" }, { "docid": "e8a223d1c06ec286a3071f19f62c269f", "score": "0.5190115", "text": "function set_prefix_length($prefix_length)\n {\n $this->prefix_length = $prefix_length;\n return $this;\n }", "title": "" }, { "docid": "f20416b28500efd91317e85c2b1c013b", "score": "0.51857466", "text": "public function length($length)\n {\n if (!is_int($length)) {\n throw new InvalidArgumentException('length should be an int');\n }\n\n $new = clone $this;\n $new->length = $length;\n\n return $new;\n }", "title": "" }, { "docid": "1f6f05abfe858e32b470b35a70942ea7", "score": "0.518408", "text": "function setwidth($width) {\n\t\t\t$this->width = (string) $width; \n\t\t}", "title": "" }, { "docid": "1ec5db9e0250fbc00d7f9d36ee2de5d9", "score": "0.51731163", "text": "public function setPageLength($l){\n\t\t$l = (int) $l;\n\t\tif($l < 2 or $l > 100) return false;\n\t\t$this->pageLenght = $l;\n\t}", "title": "" }, { "docid": "79b5b26f44e56b67af6d5efe4c0f4b59", "score": "0.5170274", "text": "public function setCodeLength($length = 6)\n {\n $this->caplength = $length;\n }", "title": "" }, { "docid": "91f2cf3108ef4b752e338a4f3c7f4f18", "score": "0.5169255", "text": "function obf_custom_excerpt_length( $length ) {\n return 20;\n }", "title": "" }, { "docid": "1696113f20c39a70258ed9eda5484e37", "score": "0.5163803", "text": "function new_excerpt_length($length) {\n\t\tglobal $data;\n\t return $data['text_excerptlength'];;\n\t}", "title": "" }, { "docid": "4a11f33c2a7720d511c7aeba743f47c3", "score": "0.51481193", "text": "function SetWidths($w)\n{\n $this->widths=$w;\n}", "title": "" }, { "docid": "4a11f33c2a7720d511c7aeba743f47c3", "score": "0.51481193", "text": "function SetWidths($w)\n{\n $this->widths=$w;\n}", "title": "" }, { "docid": "4a11f33c2a7720d511c7aeba743f47c3", "score": "0.51481193", "text": "function SetWidths($w)\n{\n $this->widths=$w;\n}", "title": "" }, { "docid": "4a11f33c2a7720d511c7aeba743f47c3", "score": "0.51481193", "text": "function SetWidths($w)\n{\n $this->widths=$w;\n}", "title": "" }, { "docid": "4a11f33c2a7720d511c7aeba743f47c3", "score": "0.51481193", "text": "function SetWidths($w)\n{\n $this->widths=$w;\n}", "title": "" }, { "docid": "6bcfa1ce110cade7046caf2d14aea526", "score": "0.514487", "text": "public function setOptimizedMaximumWidth($width);", "title": "" }, { "docid": "47269b1f2d55a633b785ef2351fb3872", "score": "0.5139229", "text": "public function setWidth($value)\n {\n $this->width = $value;\n }", "title": "" }, { "docid": "47269b1f2d55a633b785ef2351fb3872", "score": "0.5139229", "text": "public function setWidth($value)\n {\n $this->width = $value;\n }", "title": "" }, { "docid": "526248158adefe71ae23ae6d165aef11", "score": "0.51300824", "text": "function SetMaxSize(wxSize $size){}", "title": "" }, { "docid": "526248158adefe71ae23ae6d165aef11", "score": "0.51300824", "text": "function SetMaxSize(wxSize $size){}", "title": "" }, { "docid": "f9587af91d6cb738d5beb73f9af51b78", "score": "0.51244235", "text": "public function set_max_line_length($v)\n\t\t{\n\t\t$this->max_line_length = $v;\n\t\t}", "title": "" }, { "docid": "f405fd5a72eb35a716c889d72d13bb1e", "score": "0.5108876", "text": "function bpmagic_custom_excerpt_length( $length ) {\r\n//allow to customize\r\n\treturn 40;\r\n}", "title": "" }, { "docid": "d115c63054841c696c86d67d530c325e", "score": "0.509421", "text": "private function setWidth($width) {\n if (is_int($width)) {\n $this->_width = $width;\n }\n //TODO: Error handling\n }", "title": "" }, { "docid": "708e3fadf0e4c71420ab17f3afaa389b", "score": "0.50922555", "text": "public function setWidth($width) {\n $this->width = $width;\n }", "title": "" }, { "docid": "dd3f4017217beb9a50c2f25694cfc1f0", "score": "0.508476", "text": "function new_excerpt_length($length) {\n\t\treturn 25;\n\t}", "title": "" }, { "docid": "2f1f1e08a8ac63cddc42a88b1691837f", "score": "0.50741434", "text": "#[@fromDia(xpath= 'dia:attribute[@name=\"comment_line_length\"]/dia:int/@val', value= 'int')]\n public function setCommentLineLength($length) {\n $this->setInt('comment_line_length', $length);\n }", "title": "" }, { "docid": "502573a05d3baf0707cf59d18464847f", "score": "0.50727355", "text": "protected function defineLengthOfSides(): void\n {\n $lengthOfSides = 0;\n\n if ($this->fourSides->isTopSideSelected()) {\n $lengthOfSides += $this->widthOfProduct;\n } else if ($this->fourSides->isRightSideSelected()) {\n $lengthOfSides += $this->heigthOfProduct;\n } else if ($this->fourSides->isBottomSideSelected()) {\n $lengthOfSides += $this->widthOfProduct;\n } else if ($this->fourSides->isLeftSideSelected()) {\n $lengthOfSides += $this->heigthOfProduct;\n }\n\n $this->lengthOfSides = $lengthOfSides;\n }", "title": "" }, { "docid": "3e90c2471dd9d44c25fcf18443e81646", "score": "0.50682217", "text": "public function setLineLength($lineLength)\n {\n Console::setLineLength($lineLength);\n }", "title": "" }, { "docid": "5d502fb98b3fc38aac23a2e3a3cf3344", "score": "0.5056765", "text": "public function SetMinLen( $minLen ) {\n $this->minLen = $minLen;\n }", "title": "" }, { "docid": "d29f6e3322f67b043c4744a09353e3e4", "score": "0.50543296", "text": "public function setSize($_size) {\n\t\t\t$this->size = $_size;\n\t}", "title": "" }, { "docid": "ee18ae4f72511ae7a3421146b2efcf0c", "score": "0.5053607", "text": "public function setPolicyNumber($policyNumber);", "title": "" }, { "docid": "8739bc5baa5f3cf50b8e25a41483c9bc", "score": "0.50534546", "text": "public function getMaxAllowedLen();", "title": "" }, { "docid": "8950e70854f31f9a5be09da1fe2a450e", "score": "0.50416213", "text": "function setContentLength($length)\n\t{\n\t\t$this->writeLog('setContentLength('.$length.')');\n\t\t$this->obj->setFileSize($length);\n\t}", "title": "" } ]
a64da42041bafee9241b2da2c405e26d
Destroy (remove) the namespace file resource and all contents
[ { "docid": "8ea9c7229f9e01ed244ac3bef3f3e34c", "score": "0.762664", "text": "protected function destroy( $namespace = null ) {\n\n $exist = false;\n $path = $this->getFile( $namespace, null, $exist );\n if( $exist ) $this->destroyFile( $path );\n }", "title": "" } ]
[ { "docid": "2961fd7e3d8100bdb9570443ca486260", "score": "0.71656996", "text": "public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }", "title": "" }, { "docid": "cf15f6055f619cfcdccce83fd0e77156", "score": "0.6656933", "text": "function __destruct()\n {\n $preserveRunFolder = $this->preserveRunFolder;\n $fs = Filesystem::create();\n foreach ( $this->files as $file ) {\n if ( $file[ 'preserve' ] ) {\n $preserveRunFolder = true;\n }\n if ( file_exists($file[ 'file' ]) && is_file($file[ 'file' ]) && !$file[ 'preserve' ] ) {\n $fs->remove($file[ 'file' ]);\n }\n }\n if ( !$preserveRunFolder ) {\n $fs->remove($this->getTmpPath());\n }\n }", "title": "" }, { "docid": "6521de49d5517ef17742054847b1b2f4", "score": "0.6624687", "text": "public function __destruct() {\n\t\tif (file_exists($this->fileName) && (!$this->cache)) {\n\t\t\tunlink($this->fileName);\n\t\t}\n\t}", "title": "" }, { "docid": "ab9242b0dff2d6f287a513cd2765006b", "score": "0.6588498", "text": "public function __destruct()\n\t{\n\t\t$this->delete_local_file();\n\t}", "title": "" }, { "docid": "2494b022b33aca629d30024743b947f2", "score": "0.6584001", "text": "private function destroy(): void\n {\n set_error_handler(static function () {});\n try {\n unlink($this->getFilePath());\n } finally {\n restore_error_handler();\n }\n }", "title": "" }, { "docid": "4d14f856514d2c61be0194d84b35e3bd", "score": "0.6533366", "text": "public function __destruct() {\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test.json' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test.xml' );\n\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/json.json' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/xml.xml' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/ini.ini' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/php.php' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/json.php' );\n }", "title": "" }, { "docid": "74175c60976c04dbaf4bc8b37f23ba9c", "score": "0.6519189", "text": "public function cleanup() {\r\n\t\t$this->resource->cleanup();\r\n\t}", "title": "" }, { "docid": "fcd3f9a6ab94fd62fb81fbf5f3cbc53e", "score": "0.6482885", "text": "public function __destruct()\r\n\t{\r\n\t\t@unlink($this->targetFile);\r\n\t\tif (strcmp($this->referenceFile, $this->outputReferenceFile) !== 0)\r\n\t\t\t@unlink($this->referenceFile);\r\n\t}", "title": "" }, { "docid": "6a1925015f5c54bb1554a932b7c36ee0", "score": "0.643904", "text": "public function destroy()\n {\n $this->contents = [];\n $filepath = $this->getFilepath();\n\n if ($this->getFilesystem()->has($filepath)) {\n return $this->getFilesystem()->delete($filepath);\n }\n }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.6396501", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "3e5a662d718cf1b2a159639ea903b46e", "score": "0.6387996", "text": "public static function destroy() {}", "title": "" }, { "docid": "57755b83ebf259d31741c9bc6b59e926", "score": "0.63600045", "text": "function __destruct() {\r\n\t\tunlink($this->uploadfile);\r\n\t}", "title": "" }, { "docid": "ab23112013cfca5b333b5f60b4d4edc2", "score": "0.63565004", "text": "public function __destruct()\n\t{\n\t\t//Remove temporal files\n\t\tif (isset($this->generated_documents['url_docx']) AND file_exists($this->generated_documents['url_docx']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_docx']);\n\t\t}\n\t\tif (isset($this->generated_documents['url_pdf']) AND file_exists($this->generated_documents['url_pdf']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_pdf']);\n\t\t}\n\t}", "title": "" }, { "docid": "a8fcb45badd8ea400af381f7e99d276d", "score": "0.6355004", "text": "function delete(){\n\n ob_start();\n try{\n AJXP_Controller::findActionAndApply(\"delete\", array(\n \"dir\" => dirname($this->path),\n \"file_0\" => $this->path\n ), array());\n }catch(Exception $e){\n\n }\n ob_get_flush();\n $this->putResourceData(array());\n\n }", "title": "" }, { "docid": "3a6c9146972b858f8f86423e675d8780", "score": "0.63048935", "text": "public function __destruct()\n\t{\n\t\tif (isset($this->filetmp) && file_exists($this->filetmp))\n\t\t{\n\t\t\t// Free all resources\n\t\t\tunlink($this->filetmp);\n\t\t}\n\t}", "title": "" }, { "docid": "8156bcdcec8c26be39d49d6d04dd1a85", "score": "0.6278397", "text": "public function __destruct()\n {\n if (file_exists($this->tempFilesFromFilename)) {\n unlink($this->tempFilesFromFilename);\n }\n }", "title": "" }, { "docid": "3fc0ca027327e3c808b12d4cdd81c10d", "score": "0.62760776", "text": "public function __destruct() {\n if (file_exists($this->tempFile)) {\n unlink($this->tempFile);\n }\n }", "title": "" }, { "docid": "7d0319a2ce0aaf6fd13ba6850b76a4e4", "score": "0.62370497", "text": "public function __destruct()\n {\n exec('rm -rf ' . $this->dir);\n }", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "ebc79a91879b1741098af91303fbb578", "score": "0.6228805", "text": "public function destroy();", "title": "" }, { "docid": "9ca475bf5f49104a8c73c0481279e0e7", "score": "0.62142533", "text": "public function destroy()\n {\n $downloads = Redis::get(\"themes/download/{id}\");\n Redis::incr(\"themes/download/{id}\");\n //\n return Storage::download('iaa-group.docx');\n\n }", "title": "" }, { "docid": "976bd42363f0e839ad100c9d4fe6f8c8", "score": "0.6203401", "text": "public static function cleanResources()\n {\n File::deleteDirectory(resource_path('sass'));\n File::delete(resource_path('js/app.js'));\n File::delete(resource_path('js/bootstrap.js'));\n }", "title": "" }, { "docid": "9d41c12b2878246892e453cf002c1ee4", "score": "0.6191242", "text": "public function destroy()\n {\n $this->_info = new stdClass();\n if( is_resource($this->_resource) )\n {\n imagedestroy($this->_resource);\n }\n }", "title": "" }, { "docid": "8f98860f37339af18cb44b61f6f167b6", "score": "0.61841387", "text": "public function destroy() {}", "title": "" }, { "docid": "8f98860f37339af18cb44b61f6f167b6", "score": "0.61841387", "text": "public function destroy() {}", "title": "" }, { "docid": "8f98860f37339af18cb44b61f6f167b6", "score": "0.61841387", "text": "public function destroy() {}", "title": "" }, { "docid": "8f98860f37339af18cb44b61f6f167b6", "score": "0.6183906", "text": "public function destroy() {}", "title": "" }, { "docid": "8f98860f37339af18cb44b61f6f167b6", "score": "0.6182274", "text": "public function destroy() {}", "title": "" }, { "docid": "8f98860f37339af18cb44b61f6f167b6", "score": "0.6182274", "text": "public function destroy() {}", "title": "" }, { "docid": "e74d41ab2400f980d8e96c2d1cfabacb", "score": "0.61804885", "text": "function __destruct() {\n\t\t@fclose($this->FILE);\n\t\tunset($this->FILE, $this->HEADERS, $this->DATA);\n\t}", "title": "" }, { "docid": "55e6fd2a3a7f4ccb32214b16ef2df61c", "score": "0.6157687", "text": "public function __destruct()\n {\n unlink($this->tmpListFile);\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.6145105", "text": "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "title": "" }, { "docid": "aee27c8c841a838f9586cd524e3aefb6", "score": "0.6131508", "text": "public function __destroy()\n\t{\n\t\t$this->Obj_Doc->disconnectWorksheets();\n\t\tunset($this->Obj_Doc);\n\t\t$this->Obj_Doc = false;\n\t}", "title": "" }, { "docid": "198fd165c47b33ebd5bc956ccfa7d7d5", "score": "0.61014134", "text": "function __destruct()\n {\n // No los borro si estoy en debug\n if (!ConfigGlobal::is_debug_mode()) {\n $this->deleteFile($this->getFileNew());\n $this->deleteFile($this->getFileRef());\n $this->deleteFile($this->getFileLogR());\n $this->deleteFile($this->getFileLogW());\n }\n }", "title": "" }, { "docid": "dc750acc8639c8e37ae9a3994fa36c91", "score": "0.61009914", "text": "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "title": "" }, { "docid": "708bfbe9cabb48f36f7f44c706485423", "score": "0.60953736", "text": "public function __destruct() {\n fclose($this->file);\n }", "title": "" }, { "docid": "85a8d03b0c01970f57fe2403d38a7103", "score": "0.60911876", "text": "public function delete(): void\n {\n\t\tif(@unlink($this->getPath())) {\n\t\t\t$this->deleteCacheEntries();\n\t\t\tself::unsetInstance($this->getPath());\n\t\t}\n\t\telse {\n\t\t\tthrow new FilesystemFileException(\"Delete of file '{$this->getPath()}' failed.\", FilesystemFileException::FILE_DELETE_FAILED);\n\t\t}\n\t}", "title": "" }, { "docid": "b72a7ee87298ca4a8d70f43d3b130b9c", "score": "0.6074544", "text": "public function destroy()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "b75bbe3f24a5ba55eef26610aebdbb92", "score": "0.6066565", "text": "public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.60623753", "text": "public function cleanup();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.60623753", "text": "public function cleanup();", "title": "" }, { "docid": "47dcda213186401223dc21b03c4b391d", "score": "0.60609776", "text": "public function __destruct()\n {\n unset($this->file_info);\n }", "title": "" }, { "docid": "fc39af53e8aed20dece10ce27edca8ab", "score": "0.6049737", "text": "public function __destruct() {\n\t\tfclose($this->file);\n\t}", "title": "" }, { "docid": "0b127512262550e76a03f7a907a800c9", "score": "0.60172427", "text": "public function __destruct()\n {\n if ($this->resource != null) fclose($this->resource);\n }", "title": "" }, { "docid": "989843fa3021035cbd711826bd3576d3", "score": "0.5978969", "text": "public function deleteFile();", "title": "" }, { "docid": "b283827044a31ab708f077a3a2cb5ce6", "score": "0.59769744", "text": "function __destruct() {\n fclose($this->file);\n }", "title": "" }, { "docid": "3d85f46131c29f9ae8aa17d59efdb42d", "score": "0.5972637", "text": "public function clear()\n\t{\n\t\tif (file_exists($this->_file)) {\n\t\t\tunlink($this->_file);\n\t\t}\n\t\t$this->_contents = null;\n\t}", "title": "" }, { "docid": "437665da46dd9c2275dd153eea9fcbf3", "score": "0.59688056", "text": "protected function removeFile()\n {\n }", "title": "" }, { "docid": "aa9d389eaa27c520583ce20f1b7bdff6", "score": "0.59655356", "text": "function __destroy() {\n }", "title": "" }, { "docid": "4c31c26ab7bd872d8354dee91aebab8b", "score": "0.59604234", "text": "public function __destruct() {\n if ( $this->fileHandle ) {\n fclose($this->fileHandle);\n }\n }", "title": "" }, { "docid": "d745a13b5a04a001c2fcfb15d5c77035", "score": "0.59560585", "text": "private function cleanup()\n {\n if ($this->cookiefile && is_file($this->cookiefile)) {\n @unlink($this->cookiefile);\n }\n }", "title": "" }, { "docid": "de8dcb45eb78fd3a990cbeea9c11c645", "score": "0.59559053", "text": "public function destroy(): void;", "title": "" }, { "docid": "53e256ddd47bf3ed31ee86fc6a4ea59a", "score": "0.5947983", "text": "protected function destroy() {\n\t}", "title": "" }, { "docid": "837f5afa885cec5c5652529a0eca7013", "score": "0.5940339", "text": "public function __destruct()\n {\n $this->closeFile();\n }", "title": "" }, { "docid": "837f5afa885cec5c5652529a0eca7013", "score": "0.5940339", "text": "public function __destruct()\n {\n $this->closeFile();\n }", "title": "" }, { "docid": "f37978716e8b9f8fb3e1fbe9124a865b", "score": "0.5939706", "text": "function __destruct() {\r\r\n\r\r\nif (file_exists ( TMP_FOLDER ) & strlen ( TMP_FOLDER ) > 4)\r\r\n$this->removetmp ();\r\r\n\r\r\n}", "title": "" }, { "docid": "22663c89502d5fd46809491a759b567d", "score": "0.59299576", "text": "protected static function removeComponent()\n {\n (new Filesystem)->deleteDirectory(\n resource_path('assets/js/components')\n );\n }", "title": "" }, { "docid": "8241a069e38e9a6fa2ded00d70eca95a", "score": "0.5924094", "text": "function __destruct () {\n fclose($this->file);\n }", "title": "" }, { "docid": "7eb7d30090b06f1d6024bf2187534c7e", "score": "0.59218866", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "9b96f71bf4216e5ddda4a6d8bfe16cea", "score": "0.5902774", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "5c5ce5810621f4a3c403096bc5e7bbf0", "score": "0.58996856", "text": "public static function reset(): void\n {\n self::getFile()->delete();\n }", "title": "" }, { "docid": "a553fabc3803142c562d0fe909b804d1", "score": "0.5887557", "text": "public function destroy()\r\n {\r\n }", "title": "" }, { "docid": "9ea78b987e463ef29803827f30131beb", "score": "0.58875275", "text": "public function __destruct() {\n\t\tparent::__destruct();\n\t\tif($this->auto_delete) {\n\t\t\t$this->unlink();\n\t\t}\n\t}", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "e4a54a30e406a86fbfdb33fedc0f2b45", "score": "0.5880992", "text": "public function destroy()\n {\n }", "title": "" }, { "docid": "f00ed406394df4778e8e1d177ed8f48c", "score": "0.5880617", "text": "public function destroy()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "c8154cfa526e91eb5af85d8d9972c5c2", "score": "0.5872198", "text": "public function destroy()\n {\n \n }", "title": "" }, { "docid": "ff1587ef150c614c90938270678eed0a", "score": "0.5871427", "text": "abstract public function destroy();", "title": "" }, { "docid": "648d6d7d32feeab3ce33b9aa1a96bdfb", "score": "0.5857267", "text": "public function destroy()\n {\n //\n }", "title": "" }, { "docid": "648d6d7d32feeab3ce33b9aa1a96bdfb", "score": "0.5857267", "text": "public function destroy()\n {\n //\n }", "title": "" } ]
c7e1cfd095b953b34e405d7918288eb0
Archives one comment and renders comment/view
[ { "docid": "81ecf020cef611ef22566bfc596548f6", "score": "0.7396747", "text": "public function actionArchive()\n {\n $id = Yii::$app->request->get('id');\n $comment = new Comment();\n $comment->archiveComment($id);\n Yii::$app->session->setFlash('messageArchived');\n $this->redirect(\n Yii::$app->getUrlManager()->createUrl('/comment/view')\n );\n }", "title": "" } ]
[ { "docid": "5f76ae3d5b9948a113f2d5023eb6d6c3", "score": "0.61477387", "text": "public function comment()\n { \n\n $author = $this->ctrlRequest->requestGetParam(\"author\");\n $content = $this->ctrlRequest->requestGetParam(\"content\");\n $idPost = $this->ctrlRequest->requestGetParam(\"idpost\");\n\n //Data saving\n $this->modelComment->addComment($author, $content, $idPost);\n\n //Updating of the view\n $this->ctrlExecuteAction(\"index\");\n }", "title": "" }, { "docid": "a2e141df105cfa2b949413d3c0e15861", "score": "0.6112625", "text": "public function comment()\n {\n $data = array(\n 'aid' => $_POST['articleid'],\n 'time' => time(),\n 'username' => $_POST['username'],\n 'content' => $_POST['comment']\n );\n\n $result = M('comments')->data($data)->add(); //add the comment into the table\n\n M('articles')->where('id='.$_POST['articleid'])->setInc('reply',1); // add the reply numbers;\n \n $str = ''; //return the ajax string\n if ($result) \n {\n $str .='<div class=\"comment-left\">';\n $str .='<div class=\"comment-img\">';\n $str .='<img src=\"/PUBLIC/images/c.jpg\" /></div></div>';\n $str .='</div><div class=\"comment-right\">';\n $str .='<div class=\"comment-title\">';\n $str .='<span class=\"comment-name\">';\n $str .=$_POST['username'];\n $str .='</span>';\n $str .='<span class=\"comment-time\">';\n $str .='•'.formatTime(time() - 1);\n $str .='</span></div>';\n $str .='<div class=\"comment-body\">';\n $str .='<div class=\"comment-content\">';\n $str .=$_POST['comment'];\n $str .='</div></div></div></div>';\n\n echo $str;\n }\n else\n {\n echo 'false';\n }\n }", "title": "" }, { "docid": "322d735bb25cb1c716635be188cbbc54", "score": "0.607771", "text": "public function commentSubmit()\n {\n $PostRepository = new PostRepository();\n $CommentRepository = new CommentRepository();\n $post = $PostRepository->getPosts($_GET['params']);\n if (isset($_GET['commentSubmit'])) {\n if (strlen($_POST['comment-username']) <= 2) {\n $Notif = 'username';\n } elseif (strlen($_POST['comment-content']) <= 2) {\n $Notif = 'content';\n } else {\n $allowedTags='<p><strong><em><u><h1><h2><h3><h4><h5><h6><img>';\n $allowedTags.='<li><ol><ul><span><div><br><ins><del>';\n $sHeader = strip_tags(stripslashes($_POST['comment-username']));\n $sContent = strip_tags(stripslashes($_POST['comment-content']), $allowedTags);\n $commentToSubmit = new Comment(\n null,\n htmlspecialchars($_POST['comment-username']),\n htmlspecialchars($_POST['comment-content']),\n null,\n $post->getId()\n );\n $_POST = array();\n $CommentRepository->submitComment($commentToSubmit);\n }\n } else {\n die($this->error('500'));\n }\n header('Location: ?p=post.single&params='.$_GET['params'].'&notif='.$Notif.'#commentbox');\n }", "title": "" }, { "docid": "c52a74e1db2c136c55b76ecbadbc74cd", "score": "0.60363555", "text": "function comment()\n{\n $modelManager = new ModelBackend();\n $comment = $modelManager->getComments($_GET['id']);\n $post = $modelManager->getPost($_GET['id']);\n require('adminViews/comment.php');\n}", "title": "" }, { "docid": "451ffc2548aecc6915b246a843193699", "score": "0.60104185", "text": "function comments()\n{\n $modelManager = new ModelBackend();\n $post = $modelManager->getPosts();\n require('adminViews/comments.php');\n}", "title": "" }, { "docid": "a03dbf476217bf1c2406bd99f1510620", "score": "0.5924464", "text": "public function commentsFeedAction()\n\t{\n\t\t$this->getResponse()\n\t\t\t->setHeader('Content-Type', 'text/xml; charset=UTF-8')\n\t\t\t->setBody(\n\t\t\t\t$this->getLayout()->createBlock('wordpress/feed_post_comment')\n\t\t\t\t\t->setSource(Mage::registry('wordpress_post'))\n\t\t\t\t\t->setFeedType($this->getRequest()->getParam('feed', 'rss2'))\n\t\t\t\t\t->toHtml()\n\t\t\t);\n\t}", "title": "" }, { "docid": "167cca6cd08ec9b67cc9a302b8fecea8", "score": "0.5890786", "text": "public function posts(int $id)\n {\n// $output = ['posts' => $this->model->getPostComment($id), 'count' => $this->model->getCountComment($id)];\n//$array = $this->model->getPostComment(1);\n// var_dump($this->model->renderAllComment($array));\n\n $this->view->generate('article-view.php', 'templateView.php', $this->model->getPostId($id), $this->model->commentView($this->model->getPostComment($id)));\n }", "title": "" }, { "docid": "cdfdfc2a529eb50613ec438edca40b50", "score": "0.58784777", "text": "function postWithComments() {\n \n $this->viewData['post'] = PostModel::create()->selectPostByPostId($_GET['postId']);\n $this->viewData['comments'] = PostModel::create()->selectComments( $_GET['postId'] );\n // Render the action with template\n $this->render('post/postWithComments');\n }", "title": "" }, { "docid": "098f68332bcdfb09267ac994477dc8b5", "score": "0.58387625", "text": "function bimber_render_entry_comments_link() {\n\techo bimber_capture_entry_comments_link();\n}", "title": "" }, { "docid": "f437d549756de7e21463c549472e949d", "score": "0.5799368", "text": "public function run() {\n\t\t//First check if the user just submitted a comment\n\t\t//by asking our view.\n\t\tif($this->postView->isCommentSubmit()) {\n\t\t\ttry {\n\t\t\t\t//Get the comment-\n\t\t\t\t$comment = $this->commentView->getComment();\n\n\t\t\t\t//Save the comment to the system.\n\t\t\t\t$this->commentModel->saveComment($comment);\n\t\t\t}\n\n\t\t\tcatch(\\Exception $e) {\n\t\t\t\t//If something goes wrong with creating\n\t\t\t\t//a comment object we need to show the user\n\t\t\t\t//some kind of error message.\n\t\t\t\t$this->postView->newCommentFailed($this->commentView);\n\t\t\t}\n\t\t}\n\n\t\t//Then we try to retrieve our post.\n\t\ttry {\n\t\t\t//PostID.\n\t\t\t$id = $this->postView->getPostId();\n\n\t\t\t//Get the post from our system.\n\t\t\t$this->post = $this->postModel->getPost($id);\n\n\t\t\t//Get the comments aswell.\n\t\t\t$this->comments = $this->commentModel->getComments($this->post);\n\t\t}\n\n\t\tcatch(\\Exception $e) {\n\t\t\t$this->appView->redirectToFrontPage();\n\t\t}\n\t}", "title": "" }, { "docid": "ef62bb9e17b0f88d7ddcb1c8c57e322a", "score": "0.5795941", "text": "public function getCommentView()\n {\n $title = \"H&G - Comment view\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $comment = new Comment();\n $comment->setDb($this->di->get(\"db\"));\n $reply = new Reply();\n $reply->setDb($this->di->get(\"db\"));\n\n $data = [\n \"items\" => $comment->findAll(),\n \"replies\" => $reply->findAll(),\n ];\n\n $view->add(\"comments/comment-view\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "title": "" }, { "docid": "d2d648b49705c669776fa9b24583c7cb", "score": "0.5781956", "text": "public function show_comment()\n {\n PeepSoTemplate::exec_template('activity', 'comment', $this->comment_data);\n }", "title": "" }, { "docid": "9b55262b3d34a9b44323cc3a18e29948", "score": "0.5756396", "text": "public function post_edit_comment() {\n\t\t$idComment = static::find(Input::get('id'));\n\t\tif(!$idComment) { return false; }\n\n\t\t$Avant = \\DB::table('projects_issues_comments')->where('id', '=', Input::get('id'))->first(array('id', 'project_id', 'issue_id', 'comment', 'created_at'));\n\t\t$Avant->comment = str_replace(\"`\", \"'\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"<li>\", \"&nbsp;&nbsp;&nbsp;-&nbsp;\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"</li>\", \"<br />\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"<ol>\", \"<br />\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"</ol>\", \"<br />\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"<ul>\", \"<br />\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"</ul>\", \"<br />\", $Avant->comment );\n\n\t\t\\User\\Activity::add(12, $Avant->project_id, $Avant->issue_id, Input::get('id'), $Avant->comment, $Avant->created_at, NULL);\n\t\t\\DB::table('projects_issues_comments')->where('id', '=', Input::get('id'))->update(array('comment' => Input::get('body'), 'updated_at' => date(\"Y-m-d H:i:s\")));\n\n\t\treturn Redirect::to(Project\\Issue::current()->to())\n\t\t\t->with('notice', __('tinyissue.comment_edited'));\n\t}", "title": "" }, { "docid": "1a3d252075c10c0eddf07b155622e7e6", "score": "0.5753428", "text": "function presscore_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase 'pingback' :\n\t\t\tcase 'trackback' :\n\t\t?>\n\t\t<li class=\"pingback\">\n\t\t\t<div class=\"pingback-content\">\n\t\t\t\t<span><?php _e( 'Pingback:', 'the7mk2' ); ?></span>\n\t\t\t\t<?php comment_author_link(); ?>\n\t\t\t\t<?php edit_comment_link( __( '(Edit)', 'the7mk2' ), ' ' ); ?>\n\t\t\t</div>\n\t\t<?php\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t?>\n\t\t\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\t\t\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$avatar = presscore_get_avatar( $comment, 60 );\n\n\t\t\t\t\t\t\tif ( ! $avatar ) {\n\t\t\t\t\t\t\t\t$avatar = '<span class=\"avatar no-avatar\"></span>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$author_url = get_comment_author_url();\n\t\t\t\t\t\t\tif ( ! empty( $author_url ) && 'http://' !== $author_url ) {\n\t\t\t\t\t\t\t\t$avatar = '<a href=\"' . $author_url . '\" rel=\"external nofollow\" class=\"rollover\" target=\"_blank\">' . $avatar . '</a>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Output comment author avatar.\n\t\t\t\t\t\t\techo $avatar;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says:</span>', 'the7mk2' ), sprintf( '<span class=\"comment-author-name h4-size\">%s</span>', get_comment_author_link( $comment ) ) ); ?>\n\t\t\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t\t\t<div class=\"comment-metadata\">\n\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>\">\n\t\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\">\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t/* translators: 1: comment date, 2: comment time */\n\t\t\t\t\t\t\t\t\tprintf( __( '%1$s at %2$s', 'the7mk2' ), get_comment_date( '', $comment ), get_comment_time() );\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'the7mk2' ), '(', ')' ); ?>\n\t\t\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'the7mk2' ); ?></p>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</footer><!-- .comment-meta -->\n\n\t\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div><!-- .comment-content -->\n\n\t\t\t\t\t<?php\n\t\t\t\t\t$icon = '<i class=\"dt-icon-the7-misc-099\" aria-hidden=\"true\"></i>&nbsp;';\n\n\t\t\t\t\tcomment_reply_link(array_merge( $args, array(\n\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t'before' => '<div class=\"reply\">',\n\t\t\t\t\t\t'after' => '</div>',\n\t\t\t\t\t\t'reply_text' => $icon . __( 'Reply', 'the7mk2' ),\n\t\t\t\t\t\t'reply_to_text' => $icon . __( 'Reply to %s', 'the7mk2' ),\n\t\t\t\t\t\t'login_text' => $icon . __( 'Log in to Reply', 'the7mk2' ),\n\t\t\t\t\t) ));\n\t\t\t\t\t?>\n\t\t\t\t</article><!-- .comment-body -->\n\t\t<?php\n\t\t\t\tbreak;\n\t\tendswitch;\n\t}", "title": "" }, { "docid": "af9f2c1986cf8192476ffd6e6489add6", "score": "0.5736922", "text": "public function delete() {\n if(isset($_GET['comment'])) {\n $comment = CommentaryManager::getManager()->get($_GET['comment']);\n if(CommentaryManager::getManager()->delete($comment)) {\n $article = ArticleManager::getManager()->get($_GET['article']);\n $comment = CommentaryManager::getManager()->getAll($article->getId());\n $this->render('article', 'Article', [\n \"article\" => $article,\n \"comment\" => $comment\n ]);\n }\n }\n }", "title": "" }, { "docid": "5aeba31f5336209d32db8d84a50cf6c8", "score": "0.5726556", "text": "public function archiveBlogEntryAction() {\n \n $this->view->currentPage = 'connect';\n $blogEntries = new Datasource_Cms_Connect_BlogEntries();\n \n $blogEntryID = $this->getRequest()->getParam('id');\n $blogEntries->setArchivedStatus($blogEntryID, true);\n \n // Changes saved - so send them back with a nice success message\n $this->_helper->getHelper('FlashMessenger')->addMessage(array('deleted' => true));\n $this->_helper->getHelper('Redirector')->goToUrl('/cms-admin/connect/blog');\n }", "title": "" }, { "docid": "88b4da7e08e6612a7eb1aa6303eeba84", "score": "0.57196236", "text": "function pyb_comment( $comment ) { ?>\n\n\t<li <?php comment_class( 'row' ); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\">\n \t\t<div class=\"three columns mobile-one\">\n \t\t<?php \n\t\t\t\t\n \t\t\t$avatar_size = 68;\n \t\tif ( '0' != $comment->comment_parent )\n \t\t\t$avatar_size = 39;\n\t\t\t\t\t\t\t\t\t\t\t\n \t\techo get_avatar( $comment, $avatar_size ); ?>\t\t\n \t\t\n \t\t<footer class=\"comment-meta\">\n \t\t <div class=\"comment-author vcard\">\n \t\t \t<?php\n \t\t\n \t\t \t\t/* translators: 1: comment author, 2: date and time */\n \t\t \t\tprintf( __( '%1$s %2$s', 'pyb' ),\n \t\t \t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author() ),\n \t\t \t\t\tsprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n \t\t \t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n \t\t \t\t\t\tget_comment_time( 'c' ),\n \t\t \t\t\t\t/* translators: 1: date, 2: time */\n \t\t \t\t\t\tsprintf( __( '%1$s at %2$s', 'pyb' ), get_comment_date(), get_comment_time() )\n \t\t \t\t\t)\n \t\t \t\t);\n \t\t \t?>\n \t\t\n \t\t \t<?php edit_comment_link( __( 'Edit', 'pyb' ), '<span class=\"edit-link\">', '</span>' ); ?>\n \t\t </div><!-- .comment-author .vcard --> \t\t\n \t\t</footer> \t\t\n \t\t</div>\n\n\t\t\t<div class=\"comment-content offset-by-one eight columns mobile-three\">\n \t\t\t<?php comment_text(); ?>\n </div>\n\t\t</article><!-- #comment-## --><?php\n\n}", "title": "" }, { "docid": "2a89fb5a5dc729dfd9040d242f558fe5", "score": "0.5662656", "text": "public function index()\n {\n $PostRepository = new PostRepository();\n $CommentRepository = new CommentRepository();\n $comments = $CommentRepository->getComments();\n $title = \"Blog de Jean Forteroche - Billet simple pour l'Alaska\";\n $header = '';\n $posts = \"\";\n if (sizeof($PostRepository->getPosts()) > 0) {\n foreach ($PostRepository->getPosts() as $post) {\n if (strlen($post->getContent()) > 500) {\n $content = substr(strip_tags($post->getContent()), 0, 500) . '... <a href=\"?p=post.single&params=' . $post->getId() . '\">lire la suite</a>' ;\n } else {\n $content = strip_tags($post->getContent());\n }\n $coms = 0;\n foreach ($comments as $comment) {\n if ($comment->getArticleId() == $post->getId()) {\n $coms++;\n }\n }\n $posts .= \"<div class=\\\"box post\\\" style=\\\"text-align: left;\\\">\n <div class=\\\"row\\\">\n <h2 class=\\\"post-titre titre col-lg-9\\\"><a href=\\\"?p=post.single&params=\" . $post->getId() . \"\\\"> \" . $post->getTitle() .\"</a>\n <p class=\\\"index-commentaires\\\">Commentaires: \" . $coms . \"</p>\n </h2>\n <h6 class=\\\"post-date col-lg-3\\\">\" . $post->getDate() . \"</h6>\n </div>\n <p class=\\\"postContent-index\\\">\" . $content . \"</p>\n </div>\";\n }\n } else {\n $posts = \"<div class=\\\"box post\\\">\n <h1>Aucun article :/</h1><br>\n <p>Aucun article n'as encore été rédiger.</p>\n </div>\";\n }\n require('../src/View/IndexView.php');\n }", "title": "" }, { "docid": "70a763dca7d4d090732ce3fd6a29ede1", "score": "0.56596345", "text": "function comment($f3) {\n\t\t$slug=($f3->get('POST.slug')?:'');\n\t\tif (!$f3->exists('POST.name') || !strlen($f3->get('POST.name')))\n\t\t\t$f3->set('message','Name is required');\n\t\telseif (!$f3->exists('POST.email') ||\n\t\t\t!strlen($email=$f3->get('POST.email')) ||\n\t\t\t!Audit::instance()->email($email))\n\t\t\t$f3->set('message','Invalid e-mail address');\n\t\telseif (!$f3->exists('POST.contents') ||\n\t\t\t!strlen($f3->get('POST.contents')))\n\t\t\t$f3->set('message','Comment cannot be blank');\n\t\telse {\n\t\t\t$db=$this->db;\n\t\t\t$comment=new DB\\SQL\\Mapper($db,'comments');\n\t\t\t$comment->copyfrom('POST');\n\t\t\t$img=new Image;\n\t\t\t$comment->set('identicon',\n\t\t\t\t$f3->base64($img->identicon($f3->get('POST.email'),48)->\n\t\t\t\tdump(),'image/png'));\n\t\t\t$comment->set('slug',$slug);\n\t\t\t$comment->set('posted',time());\n\t\t\t$comment->save();\n\t\t\t$f3->reroute('/'.$slug);\n\t\t}\n\t\t$args=array('slug'=>$slug);\n\t\t$this->show($f3,$args);\n\t}", "title": "" }, { "docid": "d94d894b3af852ac1611b3f2d8038d59", "score": "0.5639993", "text": "function comment_format($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n <div <?php comment_class(); ?> id=\"li-comment-<?php comment_ID() ?>\">\n <div id=\"comment-<?php comment_ID(); ?>\">\n \n <div class=\"comment-author vcard\">\n <?php echo get_avatar($comment,$size='48',$default='<path_to_url>', $alt='Gravatar Image for '. get_comment_author('').'' ); ?>\n \n\t\t\t\n\t\t<div class=\"comment-meta commentmetadata\"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?><?php edit_comment_link(__('(Edit)'),' ','') ?></div>\t\t\n\t\n <?php printf(__('<cite class=\"fn\">%s</cite> <span class=\"says\">writes:</span>'), get_comment_author_link()) ?>\n </div>\n <?php if ($comment->comment_approved == '0') : ?>\n <em><?php _e('Your comment is awaiting moderation.') ?></em>\n <br />\n <?php endif; ?>\n\n <?php comment_text() ?>\n \n </div>\n<?php\n }", "title": "" }, { "docid": "adfc5c34f365b7e26660fab98f07f08d", "score": "0.5627458", "text": "public function view( $id ){\r\n //$post_comments = $this->model->get_posts_comments_by_id( $id );\r\n \r\n $template_name = ROOT_DIR . $this->views_dir . 'single-comment.php';\r\n include_once ROOT_DIR . '/views/layout/' . $this->layout;\r\n }", "title": "" }, { "docid": "e6b207149339690ab800b1ab2d9d682b", "score": "0.5626609", "text": "public function commenter() {\r\n $idBillet = $this->requete->getParametre(\"id\");\r\n $auteur = $this->requete->getParametre(\"auteur\");\r\n $contenu = $this->requete->getParametre(\"contenu\");\r\n \r\n $commentaire = $this->commentaire->ajouterCommentaire($auteur, $contenu, $idBillet);\r\n // Exécution de l'action par défaut pour réafficher la liste des billets\r\n $this-> genererVue(['commentaire' => $commentaire ], null, false);\r\n }", "title": "" }, { "docid": "528018ebbdbe95b7963fd8c9ec020ca6", "score": "0.56126183", "text": "public function add() {\n $article = ArticleManager::getManager()->get($_GET['article']);\n\n if(isset($_POST['comment'], $_SESSION['id'])) {\n $comment = htmlentities($_POST['comment']);\n $commentary = new Commentary();\n $user = UserManager::getManager()->getById($_SESSION['id']);\n\n $commentary->setContent($comment)->setArticleFk($article)->setUserFk($user);\n\n if(CommentaryManager::getManager()->add($commentary)) {\n $comment = CommentaryManager::getManager()->getAll($article->getId());\n $this->render('article', 'Article', [\n \"article\" => $article,\n \"comment\" => $comment\n ]);\n }\n }\n else {\n $comment = CommentaryManager::getManager()->getAll($article->getId());\n $this->render('article', 'Article', [\n \"article\" => $article,\n \"comment\" => $comment,\n \"error\" => \"9\"\n ]);\n }\n }", "title": "" }, { "docid": "4e943c0691a1b59202c3c32d3f0f2d18", "score": "0.561122", "text": "public function displayComments()\n {\n $template = $this->templateService->getSubpart($this->templateFile, '###DISPLAY_COMMENTS###');\n $this->marker['###B_PUBLISH_FEED###'] = ($this->marker['###B_PUBLISH_FEED###'] == 1 ? 'true' : 'false');\n $this->marker['###B_URL###'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');\n $content = $this->templateService->substituteMarkerArray($template, $this->marker);\n return $content;\n }", "title": "" }, { "docid": "d893e5af057185426142c0c3fa8d0531", "score": "0.5594555", "text": "public function comment($comment, $key){\n global $users, $security, $snicker;\n\n // Get Page\n $page = new Page($comment->page_key());\n\n // Check User\n $user = $users->exists($comment->getValue(\"username\"));\n if($user && $comment->getValue(\"uuid\") === \"bludit\"){\n $user = new User($comment->getValue(\"username\"));\n }\n\n // Render\n $token = $security->getTokenCSRF();\n $depth = (int) $snicker->getValue(\"comment_depth\");\n $url = $page->permalink() . \"?action=snicker&snicker=form&page_key=%s&uid=%s&tokenCSRF=%s\";\n $url = sprintf($url, $comment->page_key(), $comment->uid(), $token);\n ?>\n <div id=\"comment-<?php echo $comment->uid(); ?>\" class=\"comment\">\n <div class=\"comment-inner\">\n <div class=\"comment-avatar\">\n <img src=\"<?php echo $this->gravatar($comment->email()); ?>\" alt=\"<?php echo $comment->username(); ?>\" />\n <?php\n if($user && $user->username() === $page->username()){\n echo '<span class=\"avatar-role\">Author</span>';\n } else if($user && $user->role() === \"admin\"){\n echo '<span class=\"avatar-role\">Admin</span>';\n }\n ?>\n </div>\n\n <div class=\"comment-content\">\n <?php if($snicker->getValue(\"comment_title\") !== \"disabled\" && !empty($comment->title())){ ?>\n <div class=\"comment-title\"><?php echo $comment->title(); ?></div>\n <?php } ?>\n <div class=\"comment-meta\">\n <span class=\"meta-author\">Written by <span class=\"author-username\"><?php echo $comment->username(); ?></span></span>\n <span class=\"meta-date\">on <?php echo $comment->date(); ?></span>\n </div>\n <div class=\"comment-comment\">\n <?php echo $comment->comment(); ?>\n </div>\n <div class=\"comment-action\">\n <div class=\"action-left\">\n <?php if($snicker->getValue(\"comment_enable_like\")){ ?>\n <a href=\"<?php echo $url; ?>&type=like\" class=\"action-like <?php echo ($this->hasLiked($comment->uid())? \"active\": \"\"); ?>\">\n Like <span data-snicker=\"like\"><?php echo $comment->like(); ?></span>\n </a>\n <?php } ?>\n <?php if($snicker->getValue(\"comment_enable_dislike\")){ ?>\n <a href=\"<?php echo $url; ?>&type=dislike\" class=\"action-dislike <?php echo ($this->hasDisliked($comment->uid())? \"active\": \"\"); ?>\">\n Dislike <span data-snicker=\"dislike\"><?php echo $comment->dislike(); ?></span>\n </a>\n <?php } ?>\n </div>\n <div class=\"action-right\">\n <!-- <?php if($depth === 0 || $depth > $comment->depth()){ ?>\n <a href=\"<?php echo $page->permalink(); ?>?snicker=reply&uid=<?php echo $comment->key(); ?>#snicker-comments-form\" class=\"action-reply\">Reply</a>\n <?php } ?> -->\n </div>\n </div>\n </div>\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "045be55c03501d6754eb52aab7b9f748", "score": "0.5586945", "text": "function format_comment($row){\n static $number = 0;\n $number++;\n\n $md5 = md5($row['mail']);\n $obf = strtr($row['mail'],array('@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '));\n\n $text = htmlspecialchars($row['text']);\n $text = preg_replace('/\\t/',' ',$text);\n $text = preg_replace('/ /',' &nbsp;',$text);\n $text = preg_replace_callback('/((https?|ftp):\\/\\/[\\w-?&;:#~=\\.\\/\\@]+[\\w\\/])/ui',\n array($this,'_format_link'),$text);\n $text = nl2br($text);\n\n $opts = str_replace('@MD5@',$md5,$this->gravopts);\n\n echo '<div class=\"'.MTC.'_comment\" id=\"comment-'.$number.'\">';\n echo '<img src=\"http://www.gravatar.com/avatar.php?gravatar_id='.$md5.$opts.'\" alt=\"\" />';\n echo '<a href=\"#comment-'.$number.'\" rel=\"self bookmark\" class=\"'.MTC.'_link\">'.$number.'</a>';\n\n echo '<div class=\"'.MTC.'_text\">';\n echo $text;\n echo '</div>';\n\n echo '<div class=\"'.MTC.'_info\">';\n\n echo '<div class=\"'.MTC.'_date\">';\n echo $row['date'];\n echo '</div>';\n\n echo '<div class=\"'.MTC.'_user\">';\n if($row['web']){\n echo '<a href=\"'.htmlspecialchars($row['web']).'\" rel=\"nofollow\" '.$this->target.' class=\"url\">';\n echo htmlspecialchars($row['name']);\n echo '</a>';\n }elseif($this->showmail){\n echo '<a href=\"mailto:'.htmlspecialchars($obf).'\" class=\"mail\">';\n echo htmlspecialchars($row['name']);\n echo '</a>';\n }else{\n echo htmlspecialchars($row['name']);\n }\n echo '</div>';\n\n echo '</div>';\n\n echo '<div class=\"'.MTC.'_clear\"></div>';\n $this->_admin_opts($row['id']);\n echo '</div>';\n }", "title": "" }, { "docid": "478cce1d3bef00e03897c51afdb74bd3", "score": "0.5580467", "text": "public function writeComment($comment){\n global $comments, $pages, $url, $users;\n $referer = DOMAIN . $url->uri();\n\n // Temp\n if(!Session::started()){\n Session::start();\n }\n Session::set(\"snicker-comment\", $comment);\n\n // Check Basics\n if(!isset($comment[\"page_key\"]) || !$pages->exists($comment[\"page_key\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => \"snicker-response-004\"));\n }\n if(isset($comment[\"parent_uid\"])){\n if(!$comments->exists($comment[\"parent_uid\"])){\n $comment[\"parent_uid\"] = null;\n } else {\n $parent = $comments->getCommentDB($comment[\"parent_uid\"]);\n $comment[\"type\"] = \"reply\";\n $comment[\"depth\"] = $parent[\"depth\"]+1;\n }\n }\n\n // Sanitize Terms\n if($this->getValue(\"frontend_terms\") !== \"disabled\"){\n if(!isset($comment[\"terms\"]) || $comment[\"terms\"] !== \"1\"){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_5\")\n ));\n }\n }\n\n // Sanitize Title\n if($this->getValue(\"comment_title\") === \"required\"){\n if(!isset($comment[\"title\"]) || empty($comment[\"title\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_4\")\n ));\n }\n }\n $comment[\"title\"] = isset($comment[\"title\"])? Sanitize::html($comment[\"title\"]): \"\";\n\n // Sanitize Comment\n if(!isset($comment[\"comment\"]) || empty($comment[\"comment\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_3\")\n ));\n }\n $comment[\"comment\"] = Sanitize::html($comment[\"comment\"]);\n\n // Sanitize User\n if(isset($comment[\"user\"]) && isset($comment[\"token\"])){\n if(!$users->exists($comment[\"user\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));\n }\n $user = new User($comment[\"user\"]);\n\n if(md5($user->tokenAuth()) !== $comment[\"token\"]){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));\n }\n unset($comment[\"user\"], $comment[\"token\"]);\n\n $comment[\"uuid\"] = \"bludit\";\n $comment[\"status\"] = \"approved\";\n $comment[\"username\"] = $user->username();\n $comment[\"email\"] = null;\n } else if(isset($comment[\"username\"]) && isset($comment[\"email\"])){\n if(!Valid::email($comment[\"email\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));\n }\n $comment[\"uuid\"] = null;\n $comment[\"status\"] = \"pending\";\n $comment[\"username\"] = Sanitize::html(strip_tags($comment[\"username\"]));\n $comment[\"email\"] = Sanitize::email($comment[\"email\"]);\n } else {\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));;\n }\n\n // Sanitize Data\n $comment[\"like\"] = 0;\n $comment[\"dislike\"] = 0;\n $comment[\"subscribe\"] = isset($comment[\"subscribe\"]);\n\n // Check\n if(($uid = $comments->add($comment)) === false){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_1\")\n ));\n }\n\n Session::set(\"snicker-comment\", null);\n return $this->handleResponse(true, array(\n \"referer\" => $referer . \"#comment-\" . $uid,\n \"success\" => $this->getValue(\"string_success_\" . ((int) $comment[\"subscribe\"] + 1)),\n \"comment\" => $this->renderTheme(\"comment\", array(new Comment($uid), $uid))\n ));\n }", "title": "" }, { "docid": "1ea074669729412a9a06f0ba288b956f", "score": "0.55765134", "text": "public function createPost() {\n //skip rendering first ad post\n echo '\n <div class=\"art-outer\">\n <div class=\"art-inner zooming\"> \n <div class=\"text-wrap\">\n <h2 class=\"\"><a target=\"_tab\" class=\"art-link\" href=\"'.$this->getPosturl().'\">'.$this->getHeading().'</a></h2>\n <p class=\"text-wrap-text\">'.$this->getText().'</p>\n <div class=\"meta-line\">\n <div class=\"meta-line-child-wrapper\">\n <p class=\"meta-child meta-author-min\">By '. $this->getMeta()['author'].'</p>\n <p class=\"meta-child meta-publish-date-min\">'.$this->getMeta()['publishDate'].'</p>\n <p class=\"meta-child meta-publish-time-min\">'.$this->getMeta()['publishTime'].'</p>\n </div>\n </div>\n </div>\n <div class=\"img-wrap\">\n <a target=\"_tab\" class=\"art-link\" href=\"'.$this->getPosturl().'\">\n <div class=\"img-wrap-inner\">\n <img alt=\"'.$this->getHeading().'\" class=\"zoom-child\" src=\"'.$this->getImage().'\"/>\n </div>\n </a>\n </div>\n </div>\n </div>\n ';\n }", "title": "" }, { "docid": "a546036354bf64dae753d0f36d0abca2", "score": "0.5565282", "text": "function kt_comment( $comment, $args, $depth) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\tswitch ( $comment->comment_type):\n\t\tcase 'pingback':\n\t\tcase 'trackback':\n\t\t\t// Display trackbacks differently than normal comments. ?>\n\t\t\t<li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n\t\t\t\t<p><?php _e( 'Pingback:', 'kwik' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link(__( '(Edit)', 'kwik' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t\t\t\t<?php\n\t\tbreak;\n\t\tdefault:\n\t\t\t// Proceed with normal comments.\n\t\t\tglobal $post;\n\t\t\t?>\n\t\t\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<header class=\"comment-meta comment-author vcard\">\n\t\t\t<?php\n\t\t\t\techo get_avatar( $comment, 44 );\n\t\t\tprintf( '<cite class=\"fn\">%1$s %2$s</cite>',\n\t\t\t\tget_comment_author_link(),\n\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t( $comment->user_id === $post->post_author) ? '<span> ' . __( 'Post author', 'kwik' ) . '</span>' : ''\n\t\t\t);\n\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\tesc_url( get_comment_link( $comment->comment_ID) ),\n\t\t\t\tget_comment_time( 'c' ),\n\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\tsprintf(__( '%1$s at %2$s', 'kwik' ), get_comment_date(), get_comment_time())\n\t\t\t);\n\t\t\t?>\n\t\t\t\t</header><!-- .comment-meta -->\n\t\t\t\t<?php if ( '0' == $comment->comment_approved): ?>\n\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'kwik' ); ?></p>\n\t\t\t\t<?php endif; ?>\n\t\t<section class=\"comment-content comment\">\n\t\t<?php comment_text(); ?>\n\t\t\t\t\t\t\t\t\t\t<?php edit_comment_link(__( 'Edit', 'kwik' ), '<p class=\"edit-link\">', '</p>' ); ?>\n\t\t</section><!-- .comment-content -->\n\t\t\t<div class=\"reply\">\n\t\t<?php comment_reply_link(array_merge( $args, array( 'reply_text' => __( 'Reply', 'kwik' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\t\t<?php\n\tbreak;\n\t\tendswitch; \t// end comment_type check\n\t}", "title": "" }, { "docid": "3f88145d078c62626025c360d62ad92c", "score": "0.5559946", "text": "function _show($comments = FALSE, $return = FALSE, $type = 'tree',$wrapper = TRUE){\n\t\tif($this->data && $this->data->comments > 0){\n\t\t\t$this->builder->h1(fc_t('!gears comments').' ('.$this->builder->a($this->data->comments,array('id'=>'comments_counter','class'=>'comments_counter','href'=>'#comments')).') &darr;',TRUE);\n\t\t}\n\t\t$this->check_access();\n\t\tif(!$comments){\n\t\t\t\t//$comments = $this->cache->get('comments/'.$this->table.'/'.$this->data->id);\n\t\t\t\t//if(!$comments){\n\t\t\t\t\t$this->db->join($this->links_table,$this->links_table.'.cid = comments.id','inner');\n\t\t\t\t\t$this->db->where($this->links_table.'.'.$this->link_field,$this->data->id);\n\t\t\t\t\t$this->db->order_by($type == 'tree' ? 'path' : 'comments.id',$type == 'tree' ? 'asc' : 'desc');\n\t\t\t\t\t$this->query();\n\t\t\t\t\t$comments = array4key($this->db->get('comments')->result_array(),'id');\n\t\t\t\t//\t$this->cache->set('comments/'.$this->table.'/'.$this->data->id,$comments);\n\t\t\t\t//}\n\t\t}\n\t\tif($type == 'tree'){\n\t\t\t$last_id = $this->comments_views($comments);\n\t\t\tforeach($comments as $key=>&$comment){\n\t\t\t\tif($last_id && $last_id < $key && $comment['aid'] != $this->user->get('id')){\n\t\t\t\t\t$comment['class'] = 'new';\n\t\t\t\t}\n\t\t\t\t$comment = $this->process($comment,$type);\n\t\t\t}\n\t\t\tif($this->user->get('id')){\n\t\t\t js('/gears/comments/js/inline/updater.class',FALSE,TRUE);\n\t\t\t if ($this->gears->comments->show_updater) js('/gears/comments/js/inline/comments',FALSE,TRUE);\n\t\t\t}\n\t\t\tif($this->access['edit'] OR $this->access['edit_all']){\n\t\t\t\tjs('/gears/comments/js/inline/edit',FALSE,TRUE);\n\t\t\t}\n\t\t\tif($this->access['destroy']){\n\t\t\t\tjs('/gears/comments/js/inline/destroy',FALSE,TRUE);\n\t\t\t}\n\t\t}\n\t\tif(is_object($comments)) $comments = object2array($comments);\n\t\treturn $return === TRUE ? $comments : $this->_template('comments comments',array('comments'=>$comments,'wrapper'=>$wrapper,'type'=>$type),$return);\n\t}", "title": "" }, { "docid": "f60720c1985d2e5bc55e9fd70c730f31", "score": "0.55521584", "text": "protected function _handlePostedComment()\n\t{\n\t\t$commentId = $this->getRequest()->getParam('comment');\n\t\t\n\t\tif ($commentId && $this->getRequest()->getActionName() === 'view') {\n\t\t\t$comment = Mage::getModel('wordpress/post_comment')->load($commentId);\n\t\t\t\n\t\t\tif ($comment->getId() && $comment->getPost()->getId() === $this->getEntityObject()->getId()) {\n\t\t\t\tif ($comment->isApproved()) {\n\t\t\t\t\theader('Location: ' . $comment->getUrl());\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tMage::getSingleton('core/session')->addSuccess($this->__('Your comment is awaiting moderation.'));\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d680adf2b19a53b0b8d4cd809cfa1083", "score": "0.55275214", "text": "public function actionView()\n\t{\n\t\t$post=$this->loadModel();\n\t\t$comment=$this->newComment($post);\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$post,\n\t\t\t'comment'=>$comment,\n\t\t));\n\t}", "title": "" }, { "docid": "e21d8035932abead57f5f00cd8b600b5", "score": "0.5525533", "text": "public function commentsAction()\n\t{\n\t\t$error = [];\n\t\t$model = new CommentsModel();\n\t\t$verifs = new ValidationTool();\n\t\t$items = new ItemsModel();\n\n\t\t$comments = $model->last5Comments();\n\n\t\t$user = $this->getUser();\n\n\t\tif(!empty($_POST['submit']))\n\t\t{\n\t\t\t$user = $this->getUser();\n\t\t\t$username = $user['username'];\n\t\t\t$user_id = $user['id'];\n\t\t\t$created_at = date('Y-m-d G:i:s');\n\n\n\t\t\t$comment = trim(strip_tags($_POST['comment']));\n\n\t\t\t$error['comment'] = $verifs->textValid($comment, 'commentaire',10,500);\n\n\t\t\tif($verifs->IsValid($error))\n\t\t\t{\n\t\t\t\t$model->insert(['users_id' => $user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'comment' => $comment,\n\t\t\t\t\t\t\t\t\t\t\t\t'created_at' => $created_at ]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$this->flash('Commentaire en attente de moderation', 'success');\n\t\t\t\t\t\t\t\t\t\t\t\t$this->redirectToRoute('default_home');\n\t\t\t} else {\n\t\t\t\t$results = $items->findAllproductactive('home', '1', $orderBy = 'created_at', $orderDir = 'DESC', $limit = 5);\n\t\t\t\t$this->show('default/home',['user' => $user , 'error' => $error , 'comments' => $comments, 'actualComment' => $comment, 'results' => $results]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a208ffb48e1c5679548634c7dde5575d", "score": "0.55253154", "text": "function renderComments() {\n\t\tglobal $wgUser;\n\t\t$html = '';\n\t\tforeach( $this->comments as $id => $comment ) {\n\t\t\tif( $comment[AJAXCOMMENTS_PARENT] === false ) $html = $this->renderComment( $id ) . $html;\n\t\t}\n\t\tif( $html == '' ) $html = \"<i id=\\\"ajaxcomments-none\\\">\" . wfMessage( 'ajaxcomments-none' )->text() . \"</i><br />\";\n\n\t\t// If logged in, allow replies and editing etc\n\t\tif( $this->canComment ) {\n\t\t\t$html = \"<ul class=\\\"ajaxcomment-links\\\">\" .\n\t\t\t\t\"<li id=\\\"ajaxcomment-add\\\"><a href=\\\"javascript:ajaxcomment_add()\\\">\" . wfMessage( 'ajaxcomments-add' )->text() . \"</a></li>\\n\" .\n\t\t\t\t\"</ul>\\n$html\";\n\t\t} else $html = \"<i id=\\\"ajaxcomments-none\\\">\" . wfMessage( 'ajaxcomments-anon' )->text() . \"</i><br />$html\";\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "e02f4c3d842bb1af5e6c87a6322b626b", "score": "0.55135447", "text": "function view($id){\r\n $this->layout = \"ajax\";\r\n\t\t$this->Comment->id = $id;\r\n\t\t$this->data = $this->Comment->read();\r\n\t\t$this->data['Comment']['read'] = 1;\r\n\t\t$this->Comment->save($this->data);\r\n\t\t$com_view = $this->Comment->read();\r\n\t\t$this->set('comments',$com_view);\r\n\t}", "title": "" }, { "docid": "f98c2c8a3adb0c1104d2c161dd768c23", "score": "0.5511305", "text": "public function single($id)\n {\n $this->checkParams();\n $PostRepository = new PostRepository();\n $post = $PostRepository->getPosts($id);\n $title = $post->getTitle() . \" - Jean Forteroche, Billet simple pour l'Alaska\";\n $header = '';\n if ($post == null) {\n die($this->error('404'));\n }\n if (isset($_GET['notif'])) {\n switch ($_GET['notif']) {\n case \"username\":\n $NotifWindow = new NotifWindow('red', 'Message non envoyé, nom d\\'utilisateur trop court.');\n break;\n case \"content\":\n $NotifWindow = new NotifWindow('red', 'Message non envoyé, contenu trop court.');\n break;\n }\n }\n $CommentRepository = new CommentRepository();\n $comments = $CommentRepository->getComments($id);\n $content = \"\";\n $i = 0;\n \n foreach ($comments as $comment) {\n $content .=\n \"<div class=\\\"comment box\\\" id=\\\"\" . $comment->getId() . \"\\\">\n <p class=\\\"comment-username\\\"> \" . $comment->getUsername() . \" <span class=\\\"comment-date\\\">\" . $comment->getDate() . \"</span></p>\n <p class=\\\"comment-content\\\"> \" . htmlspecialchars_decode($comment->getContent()) . \" </p>\";\n if (isset($_SESSION['auth'])) {\n $content .= '<a id=\"SupprBtn' . $comment->getId() . '\" class=\"btn btn-danger comment-btn-suppr\">Supprimer</a>';\n } else {\n $content .= '<a class=\"comment-btn btn btn-outline-danger\" href=\"?p=post.single&params=' . $post->getId() . '&flag=' . $comment->getId() . '\">Signaler</a>';\n }\n $content .= \"<script>\n document.addEventListener('click', function (event) {\n if (event.target.id == 'SupprBtn\" . $comment->getId() . \"'){\n CommentWindow.init('Confirmer la suppression du commentaire', '?p=admin.comments&id=\" . $comment->getArticleId() . \"&delete=\" . $comment->getId() . \"');\n }\n });\n </script>\n </div>\";\n }\n require('../src/View/SingleView.php');\n if (isset($_GET['flag'])) {\n $CommentService = new CommentService;\n $CommentService->flag($_GET['flag']);\n $flaggedUsername;\n foreach ($comments as $comment) {\n if ($comment->getId() == $_GET['flag']) {\n $flaggedUsername = $comment->getUsername();\n }\n }\n $NotifWindow = new NotifWindow('red', 'Le commentaire de ' . $flaggedUsername . ' à bien été signalé.');\n }\n if (isset($_GET['submit'])) {\n $NotifWindow = new NotifWindow('#47ff78', 'Message envoyé.');\n }\n }", "title": "" }, { "docid": "7a85949ce4c07e145869f0b70a92b5fc", "score": "0.55049074", "text": "function dashboardCommentListAction()\n\t{\n\t\t$comments = Comment::findAll();\n\n\t\techo self::$twig->load('DashboardCommentList.html.twig')->render(array(\n\t\t\t\"comments\" => $comments\n\t\t));\n\t}", "title": "" }, { "docid": "88f0c1661c2674d08d17b99741bc5c68", "score": "0.5504267", "text": "private function emailComment()\n {\n $app = App::getInstance();\n\n // Get content\n ob_start();\n $data = array(\n 'app' => $app,\n 'comment' => $this,\n );\n\n // Render email template\n call_user_func(function () use ($data) {\n extract($data);\n include realpath(__DIR__ . '/../../../templates/') . '/new_external_comment.php';\n });\n $content = ob_get_contents();\n ob_end_clean();\n\n // Create message\n $message = \\Swift_Message::newInstance()\n ->setSubject('New comment to moderate on \"'.$this->getArticle()->getTitle().'\"')\n ->setTo(explode(\", \", Settings::get('email_extcomment_notifyaddr')))\n ->setFrom(array(Settings::get('email_replyto_addr') => Settings::get('email_replyto_name')))\n ->setBody($content, 'text/html');\n\n // Send message\n return $app['email']->send($message);\n }", "title": "" }, { "docid": "cf309a7cbe736d5c0f4696a3c5b360ea", "score": "0.55037117", "text": "static public function showCallback( O_Dao_Renderer_Show_Params $params )\r\n\t{\r\n\t\t$comment = $params->record();\r\n\t\tif (!$comment instanceof R_Mdl_Site_Comment) {\r\n\t\t\techo \"Error<br/>\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$isList = $params->params() == \"list\";\r\n\t\tif ($isList && !$comment->root->isVisible())\r\n\t\t\treturn;\r\n\t\t?>\r\n\r\n<div class=\"comm\"<?\r\n\t\tif (!$isList) {\r\n\t\t\t?> style=\"margin-left:<?=$comment->level?>em\"<?\r\n\t\t}\r\n\t\t?> id=\"comm-<?=$comment->id?>\">\r\n<div class=\"comm-ava\"><?=$comment->owner->link()?>\r\n\t<?=$comment->owner->avatar()?></div>\r\n<a name=\"comment<?=$comment->id?>\"></a>\r\n\r\n<?\r\n\t\tif ($isList) {\r\n\t\t\t?>\r\n<div class=\"comm-post\" style=\"padding: 10px\">\r\nКомментарий на: <?=$comment->root->link()?> - <i><?=$comment->root->owner->link()?></i>; <?=$comment->root->system->link()?>\r\n</div>\r\n<?\r\n\t\t}\r\n\t\t?>\r\n\r\n\t<div class=\"comment-time\"><?=date( \"d.m.Y H:i:s\", $comment->time )?></div>\r\n\r\n<?=$comment->content?>\r\n</div>\r\n\r\n<?\r\n\t\tif (!$isList) {\r\n\t\t\tself::addForm( $comment[ \"root\" ], $comment->root->system->id, $comment->id, \r\n\t\t\t\t\tR_Mdl_Session::can( \"delete\", $comment ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3ec400028915f13ad25bcd761f522aa6", "score": "0.55004066", "text": "function flatmarket_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t<div class=\"comment-body\">\n\t\t\t<?php _e( 'Pingback:', 'flatmarket' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Edit', 'flatmarket' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t</div>\n\n\t<?php else : ?>\n\n\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\t\t<article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body\">\n\t\t\t\n\t\t\t<div class=\"comment-meta clearfix\">\n\t\t\t\t<div class=\"reply\">\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'flatmarket' ), '', '' ); ?>\n\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'add_below' => 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t</div><!-- .reply -->\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t\n\t\t\t\t\t<?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, 60 ); ?>\n\n\t\t\t\t</div><!-- .comment-author -->\n\n\t\t\t\t<div class=\"comment-metadata\">\n\t\t\t\t\t<?php printf( __( '%s <span class=\"says\">says: </span>', 'flatmarket' ), sprintf( '<cite class=\"fn\">%s</cite>', get_comment_author_link() ) ); ?>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"date\"><a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\"><time datetime=\"<?php comment_time( 'c' ); ?>\"><?php printf( _x( '%1$s at %2$s', '1: date, 2: time', 'flatmarket' ), get_comment_date(), get_comment_time() ); ?></time></a></div>\n\n\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'flatmarket' ); ?></p>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div><!-- .comment-metadata -->\n\n\t\t\t\t\n\t\t\t</div><!-- .comment-meta -->\n\n\t\t\t\n\n\t\t\t\n\t\t</article><!-- .comment-body -->\n\n\t<?php\n\tendif;\n}", "title": "" }, { "docid": "3a6522654953895cc56ad1d09cbc1db8", "score": "0.5496191", "text": "function doComment() {\n $data = $this->getInputManager()->doFilter();\n $this->addInputToModel($data, $this->getModel());\n\n try {\n $this->getModel()->addCommentToMovie($data['Comment']);\n systemLog::message('User posted comment to movie ' . $data['MovieID']);\n\n $message = 'Your comment has been added successfully.';\n $level = mvcSession::MESSAGE_OK;\n } catch (Exception $e) {\n systemLog::error($e->getMessage());\n $message = $e->getMessage();\n $level = mvcSession::MESSAGE_ERROR;\n }\n\n if ($this->getRequest()->isAjaxRequest()) {\n $oView = new videosView($this);\n $oView->sendJsonResult($message, $level);\n } else {\n $this->getRequest()->getSession()->setStatusMessage($message, $level);\n $this->redirect($this->buildUriPath(self::ACTION_EDIT, $this->getModel()->getMovieID()));\n }\n }", "title": "" }, { "docid": "a3cbf14adf1d920e02ff148f78d749e9", "score": "0.54762554", "text": "public function actionView()\n\t{\n\t\t$post=$this->loadModel();\n\t\t$comment=$this->newComment($post);\n\t\tif (!Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$comment->author = Yii::app()->user->user->fullname;\n\t\t\t$comment->email = Yii::app()->user->user->email;\n\t\t}\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$post,\n\t\t\t'comment'=>$comment,\n\t\t));\n\t}", "title": "" }, { "docid": "96307efecb09e0df0f943baa1527c605", "score": "0.54722184", "text": "function bhp_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t?>\n\t<li class=\"post pingback\">\n\t\t<p><?php _e( 'Pingback:', 'bhp' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'bhp' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t?>\n\t<li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t<footer class=\"comment-meta\">\n\t\t\t\t<div class=\"comment-author vcard\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$avatar_size = 50;\n\t\t\t\t\t\tif ( '0' != $comment->comment_parent )\n\t\t\t\t\t\t\t$avatar_size = 39;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s on %2$s <span class=\"says\">said:</span>', 'bhp' ),\n\t\t\t\t\t\t\tsprintf( '<span class=\"fn\">%s</span>', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '<a href=\"%1$s\"><time pubdate datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'bhp' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n\n\t\t\t\t\t<?php edit_comment_link( __( 'Edit', 'bhp' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\t\t\t\t</div><!-- .comment-author .vcard -->\n\n\t\t\t\t<?php if ( $comment->comment_approved == '0' ) : ?>\n\t\t\t\t\t<em class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'bhp' ); ?></em>\n\t\t\t\t\t<br />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t</footer>\n\n\t\t\t<div class=\"comment-content\"><?php comment_text(); ?></div>\n\n\t\t\t<div class=\"reply\">\n\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'bhp' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t</div><!-- .reply -->\n\t\t</article><!-- #comment-## -->\n\n\t<?php\n\t\t\tbreak;\n\tendswitch;\n}", "title": "" }, { "docid": "332ed7de6bfff1d6c38a8fd04a9daddc", "score": "0.54559255", "text": "function z_comment($comment, $args, $depth) {\n\n // Get comment object\n $GLOBALS['comment'] = $comment;\n\n // Get current comment data\n $author = get_comment_author_link();\n $class_name = implode(' ', get_comment_class());\n $date = get_comment_date();\n $id = get_comment_ID();\n $link = get_comment_link($comment->comment_ID);\n $time = get_comment_time();\n //$avatar = get_avatar($comment, 40);\n //$edit = get_edit_comment_link('Edit', '<p class=\"edit\">', '</p>');\n //$reply = get_comment_reply_link();\n\n // Generate comment output\n $output = \"<li class=\\\"$class_name\\\" id=\\\"comment-$id\\\">\";\n $output .= \"<h3>$author on <a href=\\\"$link\\\">$date at $time</a></h3>\";\n if($comment->comment_approved) {\n $output .= apply_filters( 'comment_text', get_comment_text() );\n } else {\n $output .= '<p>Your comment is awaiting moderation.</p>';\n }\n echo $output;\n\n}", "title": "" }, { "docid": "bd63913138d68e1961dc81db55152989", "score": "0.5454307", "text": "function displayPost($ar=NULL) {\n $p=new XParam($ar, array());\n $tplentry=$p->get('tplentry');\n $oid=$p->get('oid');\n $post=$p->get('post');\n\n $r = $this->xset->display(array('tplentry'=>TZR_RETURN_DATA, 'oid'=>$oid));\n XShell::toScreen1($tplentry.'blog',$r);\n $r = $this->xset->display(array('tplentry'=>TZR_RETURN_DATA, 'oid'=>$post));\n if ($this->object_sec){\n $lang_data = XShell::getLangData();\n $oids = array($post);\n list($r['object_sec']) = $GLOBALS['XUSER']->getObjectsAccess($this, $lang_data, $oids);\n }\n XShell::toScreen1($tplentry.'post',$r);\n $right= $this->secure($oid, 'validatePost');\n if($right)\n $query=$this->xset->select_query(array('order'=>'datep ASC',\n\t\t\t\t\t 'cond'=>array('blog'=>array('=',$oid),\n\t\t\t\t\t\t\t 'paperup'=>array('=',$post),\n\t\t\t\t\t\t\t 'dtype'=>array('=','comment'))));\n else\n $query=$this->xset->select_query(array('order'=>'datep ASC',\n\t\t\t\t\t 'cond'=>array('blog'=>array('=',$oid),\n\t\t\t\t\t\t\t 'paperup'=>array('=',$post),\n\t\t\t\t\t\t\t 'PUBLISH'=>array('=',1),\n\t\t\t\t\t\t\t 'dtype'=>array('=','comment'))));\n\n $this->xset->browse(array('tplentry'=>$tplentry.'comment','select'=>$query, \n\t\t\t 'pagesize'=>100, 'selectedfields'=>'all'));\n $this->addComment(array('tplentry'=>$tplentry.'add'));\t\n\n $ar=array();\n $ar['select']=$this->xset->select_query(array('order'=>'datep DESC','cond'=>\n\t\t\t\t\t\t array('dtype'=>array('=','post'),\n\t\t\t\t\t\t\t'blog'=>array('=',$oid))));\n $ar['selectedfields']=array('datep','title');\n $ar['pagesize']=100;\n $ar['tplentry']=$tplentry.'posts';\n XModTable::browse($ar);\n // commentaires recents\n $ar=array();\n $ar['select']=$this->xset->select_query(array('order'=>'datep DESC','cond'=>\n\t\t\t\t\t\t array('dtype'=>array('=','comment'),'blog'=>array('=',$oid))));\n $ar['selectedfields']=array('datep','title','blog','paperup');\n $ar['pagesize']=10;\n $ar['tplentry']=$tplentry.'comments';\n XModTable::browse($ar);\n }", "title": "" }, { "docid": "3f60062c3433c59884b3cb5d7b7e4b15", "score": "0.5452976", "text": "function bones_comments( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment; ?>\n\t<div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n\t\t<article class=\"cf\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t // create variable\n\t\t\t\t $bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t<div class=\"alert alert-info\">\n\t\t\t <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content cf\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" }, { "docid": "242fa0735f67ffb9b5fbe3a12cbade0c", "score": "0.5447899", "text": "public function commentpostAction() {\n $data = $this->getRequest()->getPost();\n $invitationstatus = $this->_initInvitationstatus();\n $session = Mage::getSingleton('core/session');\n if ($invitationstatus) {\n if ($invitationstatus->getAllowComments()) {\n if ((Mage::getSingleton('customer/session')->isLoggedIn() ||\n Mage::getStoreConfigFlag('tpl_eventsmanager/invitationstatus/allow_guest_comment'))) {\n $comment = Mage::getModel('tpl_eventsmanager/invitationstatus_comment')->setData($data);\n $validate = $comment->validate();\n if ($validate === true) {\n try {\n $comment->setInvitationstatusId($invitationstatus->getId())\n ->setStatus(Tpl_EventsManager_Model_Invitationstatus_Comment::STATUS_PENDING)\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\n ->setStores(array(Mage::app()->getStore()->getId()))\n ->save();\n $session->addSuccess($this->__('Your comment has been accepted for moderation.'));\n } catch (Exception $e) {\n $session->setInvitationstatusCommentData($data);\n $session->addError($this->__('Unable to post the comment.'));\n }\n } else {\n $session->setInvitationstatusCommentData($data);\n if (is_array($validate)) {\n foreach ($validate as $errorMessage) {\n $session->addError($errorMessage);\n }\n } else {\n $session->addError($this->__('Unable to post the comment.'));\n }\n }\n } else {\n $session->addError($this->__('Guest comments are not allowed'));\n }\n } else {\n $session->addError($this->__('This invitation status does not allow comments'));\n }\n }\n $this->_redirectReferer();\n }", "title": "" }, { "docid": "13af2257f06ea593cfe575a3a8c1f959", "score": "0.54463565", "text": "function renren_comment(&$comment, $op) {\n global $user;\n if (!is_array($comment)) {\n $comment = (array)$comment;\n }\n $comment_body = renren_clean_data($comment['comment']);\n $comment_subject = renren_clean_data($comment['subject']);\n \n if ($body_pattern = variable_get('renren_template_comment_body', '')) {\n $body = '{\"'.$body_pattern.'\" : \"'.$comment_body.'\"}';\n }\n\n if ($title_pattern = variable_get('renren_template_comment_title', '')) {\n $title = '{\"'.$title_pattern.'\" : \"'.$comment_subject.'\"}';\n }\n //$body = '{\"content\":\"'.$comment_body.'\"}';\n //$title = '{\"feedtype\":\"'.$comment_subject.'\"}';\n \n // if renren user logined\n $comment_author = renren_user_profile();\n if (isset($comment_author)) {\n global $RR_client;\n $result = $RR_client->POST('feed.publishTemplatizedAction', array(1, $title, $body));\n if ($result->result) {\n drupal_set_message('Successful share this comment on renren');\n }\n else {\n drupal_set_message('Renren Error: '.$result->error_msg);\n drupal_set_message('Renren Error Code: '.$result->error_code);\n }\n }\n}", "title": "" }, { "docid": "a430148b5799fe518c7951eac51dfa26", "score": "0.5435875", "text": "function comments_template() {\n\tglobal $bj,$entries,$entry,$comments,$comment;\r\n\tif(is_entry()) {\n\t\tforeach ($entries as $entry) {\n\t\t\t$comments = get_comments('postid='.get_entry_ID());\n\t\t\tif(file_exists(BJPATH . 'content/skins/' . current_skinname() . '/comments.php'))\r\n\t\t\t\tinclude(BJPATH . 'content/skins/' . current_skinname() . '/comments.php');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "887fbdc58f700daeabdb3281c3c1f75c", "score": "0.54284525", "text": "function buggm_format_ticket_comment( $comment, $args, $depth ) {\t\n\t$GLOBALS[ 'comment' ] = $comment;\n\t\n $updates =buggm_get_ticket_changes(get_comment_ID());\n\t\t\n\t$i = 0;\n ?>\n\t<li <?php comment_class( 'ticket-comment' ); ?> id=\"comment-<?php comment_ID(); ?>\"> \n\t\t<span class=\"alignright\"><a href=\"<?php echo get_comment_link();?>\"><?php _e('permalink','buggm');?></a></span>\n\t\t<div class=\"commenter-info\"> \n\t\t\t<span class=\"commenter-avatar\">\n <a href=\"<?php echo buggm_get_user_url($comment->user_id); ?>\">\n <span class='avatar'> <?php echo buggm_get_avatar($comment->user_id, 24);?> </span>\n <?php echo buggm_get_user_name($comment->user_id);?>\n </a> \n </span>\n <small><?php printf( __( 'about <em>%s</em> ', 'buggm' ), buggm_time_since( get_comment_time( 'U' ),current_time( 'timestamp' ) )); ?></small>\n\t\t</div> \n <div class=\"clear\"></div>\n\t\t<div class=\"comment-info\"> \n\t\t\n\t\t\t<div class=\"comment-entry\">\n\t\t\t\n\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\n\t\t\t\t<?php if( $updates ) : ?>\n\t\t\t\t\t\n\t\t\t\t\t<ul class=\"update-list\">\n\t\t\t\t\t\t<?php foreach( $updates as $update ) : ?>\n\t\t\t\t\t\t\t<li><?php echo $update; ?></li>\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</ul>\n\t\t\t\t\t\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t\n\t\t</div>\n<?php\n\t\n}", "title": "" }, { "docid": "19f1099251c28e28c0e67a9f686539c2", "score": "0.5428299", "text": "function romangie_magazin_comment($comment, $args, $depth) {\n \t$GLOBALS['comment'] = $comment; ?>\n \t<div <?php comment_class('row new-comment'); ?> >\n\t \t<div id=\"li-comment-<?php comment_ID() ?>\">\n\t \t\t<?php $posttype = get_comment_type(); if ($posttype == 'comment') { ?>\n\t\t <div class=\"meta col-sm-3 info\">\n\t\t <?php } else { ?>\n \t\t <div class=\"meta col-sm-4 info\">\n \t\t <?php } ?>\n\t\t\t\t<div id=\"comment-<?php comment_ID(); ?>\">\n\t\t \t\t<div class=\"comment-author vcard\">\n\t\t \t\t\t<?php $posttype = get_comment_type(); if ($posttype == 'comment') { ?>\n\t\t\t \t<div class=\"meta-item hidden-xs\"><?php echo get_avatar($comment,$size='48'); ?></div>\n\t\t\t \t<div class=\"meta-item\"><i class=\"fa fa-user\"></i><?php echo get_comment_author_link() ?></div>\n\t\t\t \t<?php } else { ?>\n\t\t\t \t<div class=\"meta-item\"><i class=\"fa fa-user\"></i><?php echo get_comment_author_link() ?></div>\n\t\t\t \t<?php } ?>\n\t\t\t \t<div class=\"hidden-xs\">\n\t\t\t\t \t<div class=\"meta-item\"><i class=\"fa fa-calendar\"></i><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf('%1$s', get_comment_date()) ?></a></div>\n\t\t\t\t \t<div class=\"meta-item\"><i class=\"fa fa-clock-o\"></i><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf('%1$s', get_comment_time()) ?></a></div>\n\t </div>\n\t <?php if( is_admin() ) { ?><div class=\"meta-item\"><i class=\"fa fa-pencil-square-o\"></i><?php edit_comment_link(__('(Edit)' , 'romangie'),' ','') ?></div><?php } ?>\n\t\t\t\t\t\t<div class=\"meta-item\"><?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'], 'add_below' => 'comment-content', 'reply_text' => '<i class=\"fa fa-reply\"></i>' . __('Reply', 'romangie')))) ?></div>\n\n\t <?php cancel_comment_reply_link(); ?>\n\t\t \t\t</div>\n\n\t\t\t\t\t\n\t\t\t \t</div>\n\t\t\t</div>\n\n\t\t\t<?php $posttype = get_comment_type(); if ($posttype == 'comment') { ?>\n\t\t <div class=\"comment-content col-sm-9\">\n\t\t <?php } else { ?>\n\t\t <div class=\"comment-content col-sm-8\">\n \t\t <?php } ?>\n\t\t \t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t\t<div class=\"alert alert-warning\" style=\"margin-top: -12px\"><em style=\"font-size: 13px\"><?php _e('Your comment is awaiting moderation.', 'romangie') ?></em></div>\n\t\t\t\t<?php endif; ?>\n\t\t \t<div id=\"comment-content-<?php comment_ID() ?>\">\n\t\t\t\t\t<?php comment_text() ?>\n\t\t\t\t</div>\n\t\t </div>\n\t\t</div>\n\t</div>\n\t<?php }", "title": "" }, { "docid": "1c22a1b6912f8edc7b697a00322d36aa", "score": "0.5423048", "text": "public function show(DebateComment $comment)\n {\n return $comment;\n }", "title": "" }, { "docid": "895657d76f7ffe674c6db361f1c56f9b", "score": "0.5420536", "text": "public function comment() {\n if ( $this->get_request_method() == \"POST\" ) {\n $data = json_decode( file_get_contents('php://input'), true );\n if ( !$this->authenticate( $data ) ){\n $this->response( \"unauthorized access\", 400 );\n }\n\n // write the comment to the database\n $comment = $data['data'];\n $post_id = $comment['post_id'];\n $comment_m = $comment['comment'];\n $user_id = $this->user['user_id'];\n $query = \"INSERT INTO comment( post_id, comment, user_id ) VALUES( $post_id, '$comment_m', $user_id)\";\n mysqli_query( $this->db, $query );\n $this->response( $this->json( $comment ), 200 );\n }\n else if ( $this->get_request_method() == \"GET\" ) {\n $post_id = $_REQUEST['post_id'];\n if ( !$post_id ) {\n $post_id = \"*\";\n }\n $query = \"SELECT * FROM comment WHERE post_id = $post_id\";\n $result = $this->convertMysqlToArray( mysqli_query( $this->db, $query ) );\n $this->response( $this->json( $result ), 200 );\n }\n }", "title": "" }, { "docid": "1cb3926c5b5ee118b08319c87dac2ca2", "score": "0.5417217", "text": "public function showComment()\n\t{\n\t\t /* $comments = Article::find(1)->comment;\n \n foreach($comments as $comment){\n print_r($comment->detail_comment.\"</br>\");\n }\n */\n return View::make('showComment');\n\t}", "title": "" }, { "docid": "a0c527049d1772bf42d3cb8aa0c4a242", "score": "0.5409652", "text": "public function show(BlogComment $blogComment)\n {\n //\n }", "title": "" }, { "docid": "ba215564fc57f212936f7ef3860762af", "score": "0.54088104", "text": "public function comment_attachment()\n {\n global $post;\n global $PeepSoActivityDidInit;\n\n if(!isset($PeepSoActivityDidInit)) {\n $PeepSoActivityDidInit = TRUE;\n $this->init();\n }\n\n // let other add-ons have a chance to attach content to the comment\n do_action('peepso_activity_comment_attachment', $post, $post->ID, $post->act_module_id);\n }", "title": "" }, { "docid": "78181968bc5db325f5119742bf6abf40", "score": "0.54039353", "text": "public function post($comments)\n {\n\n $addOne = $this->db->prepare(\n 'INSERT INTO comments (content, createdAt, entryID)\n VALUES (:content, :createdAt, :entryID)');\n\n date_default_timezone_set('Europe/Stockholm');\n $date = date(\"Y-m-d H:i:s\");\n\n $addOne->execute([\n ':content' => $comments['content'],\n ':createdAt' => $date,\n ':entryID' => $comments['entryID']\n ]);\n }", "title": "" }, { "docid": "83c8f258943d080e1f3011860e623344", "score": "0.53998333", "text": "protected function html5_comment( $comment, $depth, $args ) {\r\n $this->comment_count++;\r\n\r\n $tag = ( 'div' === $args['style'] ) ? 'div' : 'li';\r\n\r\n $commenter = wp_get_current_commenter();\r\n $show_pending_links = ! empty( $commenter['comment_author'] );\r\n\r\n if ( $commenter['comment_author_email'] ) {\r\n $moderation_note = __( 'Your comment is awaiting moderation.' );\r\n } else {\r\n $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' );\r\n }\r\n ?>\r\n <<?php echo $tag; ?> id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( $this->has_children ? 'parent' : '', $comment ); ?>>\r\n <article id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-body py-8 flex flex-wrap md:flex-no-wrap <?php echo $this->comment_count == 1 ? \"\" : \"border-t-2 border-gray-200 \"; ?>\">\r\n <div class=\"md:w-64 md:mb-0 mb-6 flex-shrink-0 flex flex-col <?php echo $depth > 1 ? \"ml-16\" : \"\" ?>\">\r\n <footer class=\"comment-meta\">\r\n <div class=\"comment-author vcard tracking-widest font-medium title-font text-gray-900\">\r\n <?php\r\n if ( 0 != $args['avatar_size'] ) {\r\n echo get_avatar( $comment, $args['avatar_size'] );\r\n }\r\n ?>\r\n <div class=\"tracking-widest font-medium title-font text-gray-900\">\r\n <?php\r\n $comment_author = get_comment_author_link( $comment );\r\n\r\n if ( '0' == $comment->comment_approved && ! $show_pending_links ) {\r\n $comment_author = get_comment_author( $comment );\r\n }\r\n\r\n printf(\r\n /* translators: %s: Comment author link. */\r\n __( '%s <span class=\"says\">says:</span>' ),\r\n sprintf( '<b class=\"fn\">%s</b>', $comment_author )\r\n );\r\n ?>\r\n </div>\r\n </div><!-- .comment-author -->\r\n\r\n <div class=\"comment-metadata mt-1 text-gray-400 text-sm\">\r\n <a href=\"<?php echo esc_url( get_comment_link( $comment, $args ) ); ?>\">\r\n <time class=\"text-sm\" datetime=\"<?php comment_time( 'c' ); ?>\">\r\n <?php\r\n /* translators: 1: Comment date, 2: Comment time. */\r\n printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() );\r\n ?>\r\n </time>\r\n </a>\r\n\r\n </div><!-- .comment-metadata -->\r\n\r\n <?php if ( '0' == $comment->comment_approved ) : ?>\r\n <em class=\"comment-awaiting-moderation\"><?php echo $moderation_note; ?></em>\r\n <?php endif; ?>\r\n </footer><!-- .comment-meta -->\r\n </div>\r\n <div class=\"md:flex-grow\">\r\n <div class=\"comment-content\">\r\n <?php\r\n comment_text(0, array('class' => 'leading-relaxed'));\r\n// comment_text();\r\n ?>\r\n\r\n <?php edit_comment_link(\r\n sprintf('%s <svg class=\"w-4 h-4 mr-2\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M5 12h14\"></path>\r\n <path d=\"M12 5l7 7-7 7\"></path>\r\n </svg>',__( 'Edit' )),\r\n '<span class=\"edit-link\">', '</span>' ); ?>\r\n <?php\r\n if ( '1' == $comment->comment_approved || $show_pending_links ) {\r\n comment_reply_link(\r\n array_merge(\r\n $args,\r\n array(\r\n 'add_below' => 'div-comment',\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth'],\r\n 'before' => '<div class=\"reply text-indigo-500 inline-flex items-center mt-4\">',\r\n 'after' => '</div>',\r\n 'reply_text' => sprintf('%s <svg class=\"w-4 h-4 mr-2\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"></path><path d=\"M12 5l7 7-7 7\"></path></svg>', __( 'Reply' )),\r\n /* translators: Comment reply button text. %s: Comment author name. */\r\n 'reply_to_text' => sprintf('%s <svg class=\"w-4 h-4 mr-2\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"></path><path d=\"M12 5l7 7-7 7\"></path></svg>', __( 'Reply to %s' )),\r\n 'login_text' => sprintf('%s <svg class=\"w-4 h-4 mr-2\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14\"></path><path d=\"M12 5l7 7-7 7\"></path></svg>', __( 'Log in to Reply' ))\r\n )\r\n )\r\n );\r\n }\r\n ?>\r\n </div><!-- .comment-content -->\r\n </div>\r\n\r\n\r\n\r\n </article><!-- .comment-body -->\r\n <?php\r\n }", "title": "" }, { "docid": "7d9c3d412296af2075228a36e7995928", "score": "0.5393339", "text": "public function renderComments(){\n global $comments, $login, $page;\n\n // Get Temp\n if(!Session::started()){\n Session::start();\n }\n $data = Session::get(\"snicker-comment\");\n\n // Prepare Data\n $user = $mail = $title = $comment = \"\";\n if(is_array($data)){\n $user = isset($data[\"username\"])? $data[\"username\"]: \"\";\n $mail = isset($data[\"email\"])? $data[\"email\"]: \"\";\n $title = isset($data[\"title\"])? $data[\"title\"]: \"\";\n $comment = isset($data[\"comment\"])? $data[\"comment\"]: \"\";\n }\n $title = ($this->getValue(\"comment_title\") === \"disabled\")? false: $title;\n\n // Prepare User Data\n $login = is_a($login, \"Login\")? $login: new Login();\n if($login->isLogged()){\n $user = new User($login->username());\n $user = array($user->username(), md5($user->tokenAuth()), $user->nickname());\n }\n\n // Render Form\n ?><div id=\"snicker-comments-form\" class=\"snicker-comments\"><?php\n if($page->allowComments()){\n print($this->renderTheme(\"form\", array($user, $mail, $title, $comment)));\n } else {\n ?>\n <div class=\"disabled-comments\">\n The comment section on this page has been disabled by the author!\n </div>\n <?php\n }\n ?></div><?php\n\n // Prepare Comment List\n $limit = $this->getValue(\"frontend_per_page\");\n $count = $comments->count(\"approved\", $page->key());\n $max = ceil($count / $limit);\n if(isset($_GET[\"cpage\"]) && $_GET[\"cpage\"] > 1){\n $num = ($_GET[\"cpage\"] < $max)? $_GET[\"cpage\"]: $max;\n } else {\n $num = 1;\n }\n $list = $comments->getList($num, $limit, \"approved\", $page->key());\n\n // Render Comment List\n ?><div id=\"snicker-comments-list\" class=\"snicker-comments-list\"><?php\n if(count($list) < 1){\n if($page->allowComments()){\n ?>\n <div class=\"no-comments\">\n Currently there are no comments, so be the first!\n </div>\n <?php\n }\n } else {\n if($count > $limit){\n print($this->renderTheme(\"pagination\", array(\"top\", $num, $limit, $count)));\n }\n foreach($list AS $key){\n $comment = new Comment($key);\n print($this->renderTheme(\"comment\", array($comment, $key)));\n }\n if($count > $limit){\n print($this->renderTheme(\"pagination\", array(\"bottom\", $num, $limit, $count)));\n }\n }\n ?></div><?php\n }", "title": "" }, { "docid": "a7a928f7f3440adae4a50f89030e2ae5", "score": "0.53914785", "text": "public function actionAddcomment($id)\n {\n $comment = new Comments(); \n $comment->save();\n return $this->renderSingle($id);\n }", "title": "" }, { "docid": "c3584e2c44d7fcd904c6754b380ff264", "score": "0.5381761", "text": "public function render()\n {\n return view('components.comment');\n }", "title": "" }, { "docid": "c3584e2c44d7fcd904c6754b380ff264", "score": "0.5381761", "text": "public function render()\n {\n return view('components.comment');\n }", "title": "" }, { "docid": "68b70ff71b1293f78695aac4e806a4c5", "score": "0.5378006", "text": "function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {\n\t\t$depth++;\n\t\t$GLOBALS['comment_depth'] = $depth;\n\t\t$GLOBALS['comment'] = $comment;\n\t\t$parent_class = ( empty( $args['has_children'] ) ? '' : 'parent' ); \n\n\t\tif ( 'article' == $args['style'] ) {\n\t\t\t$tag = 'article';\n\t\t\t$add_below = 'comment';\n\t\t} else {\n\t\t\t$tag = 'article';\n\t\t\t$add_below = 'comment';\n\t\t} ?>\n\n\t\t<article <?php comment_class(empty( $args['has_children'] ) ? '' :'parent') ?> id=\"comment-<?php comment_ID() ?>\" itemprop=\"comment\" itemscope itemtype=\"http://schema.org/Comment\">\n\t\t\t<div class=\"comment-header\">\n\t\t\t\t<figure class=\"gravatar\"><?php echo get_avatar($comment, 32); ?></figure>\n\t\t\t\t<div class=\"comment-meta post-meta\" role=\"complementary\">\n\t\t\t\t\t<div class=\"comment-author\"><?php comment_author(); ?></div>\n\t\t\t\t\t<time class=\"comment-time\" datetime=\"<?php comment_date('Y-m-d') ?>T<?php comment_time('H:iP') ?>\" itemprop=\"datePublished\"><?php comment_date('jS F Y') ?>, <a href=\"#comment-<?php comment_ID() ?>\" itemprop=\"url\"><?php comment_time() ?></a></time>\n\t\t\t\t\t<div class=\"edit-link\">\n\t\t\t\t\t\t<?php edit_comment_link(__('Edit this comment', 'easydita_knowledge_portal'),'',''); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php if ($comment->comment_approved == '0') :\n\t\t\t\t\t\techo __('Your comment is awaiting moderation.', 'easydita_knowledge_portal');\n\t\t\t\t\tendif; ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"comment-content post-content\" itemprop=\"text\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t\t<div class=\"comment-reply-area\">\n\t\t\t\t\t<i class=\"fa fa-reply fa-flip-horizontal\"><!-- filler --></i>\n\t\t\t\t\t<?php comment_reply_link(array_merge( $args, array('add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t<?php }", "title": "" }, { "docid": "7e9f6d6b3ccf1cb9042cf6f6894d34f3", "score": "0.5376679", "text": "function procAddComment($ar=NULL) {\n $p=new XParam($ar, array());\n $ar['dtype']='comment';\n $ar['blog']=$p->get('oid');\n $ar['paperup']=$p->get('post');\n $ar['datep']=date('Y-m-d H:i:s');\n if(!XUser::isNobody()) {\n $ar['whoa'] = XUser::get_current_user_uid();\n }\n parent::procInsert($ar);\n }", "title": "" }, { "docid": "487381a5d439f3d5fc6f29e360484278", "score": "0.53750205", "text": "function gothic_comment($comment, $args, $depth) {\n$GLOBALS['comment'] = $comment; ?>\n<div class=\"metadata\">\n\t<div class=\"avatar\">\n\t\t<?php echo get_avatar($comment,$size='64',$default='identicon' ); ?><br />\n\t</div>\n\t<div class=\"commentAuthor\">\n\t<?php printf(__('%s'), get_comment_author_link()) ?>\n\t</div>\n\t<a title=\"comment permalink\" alt=\"comment permalink\" href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php printf(__('%1$s'), get_comment_date('j M Y')) ?></a>\n\t<?php edit_comment_link(__(' (edit)'),' ','') ?>\n</div>\n<div class=\"post\">\n\t<div class=\"comment text\" id=\"comment-<?php comment_ID(); ?>\">\n\t<div class=\"bar\"> </div>\n\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t<h1><?php _e('your comment is awaiting moderation') ?></h1>\n\t\t<br />\n\t<?php endif; ?>\n\t\t<?php comment_text() ?>\n\t</div>\n\t<div class=\"reply\">\n\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t</div>\n</div>\n<?php\n}", "title": "" }, { "docid": "6dead1528f372eb474890dce7fe695a2", "score": "0.5364352", "text": "function delete_comment($comment_id, $for_ajax = 0)\n {\n \t$comment = $this->streams->entries->get_entry($comment_id, 'comments', 'streams');\n \tif($comment->created_by == $this->current_user->id){\t\n \t\t$deleted = $this->streams->entries->delete_entry($comment_id, 'comments', 'streams');\n \t\tif($deleted){\n \t\t\t$this->discuss->decrease_counter($comment->thread, $this->thread_table, 'total_komentar');\n\t \t\tif(!$for_ajax)\n\t\t \t\tredirect(getenv('HTTP_REFERER'));\n \t\t\techo $deleted;\t\n \t\t}\n \t}\n }", "title": "" }, { "docid": "34752c7763991ff1949e3f7e6e2004a7", "score": "0.5359972", "text": "public function deleteComment ()\n {\n $idPost = $this->request->getSetting( 'idComment' );\n $this->post->deleteComment( $idPost );\n $this->redirect( 'Admin' , 'allComments/' );\n }", "title": "" }, { "docid": "c8888098a63d16cd9d8d66fa60d783df", "score": "0.5354615", "text": "function snowproblem_comment($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\textract($args, EXTR_SKIP);\n?>\n\t<div>\n\t<article <?php comment_class(); ?> id=\"comment-<?php comment_ID() ?>\">\n\t\t<?php if ( $args['avatar_size'] != '0' ) : ?>\n\t\t\t<div class=\"author-image-container\">\n\t\t\t\t<?php echo get_avatar( $comment, ( isset($args['avatar_size']) ? $args['avatar_size'] : 96) ); ?>\n\t\t\t</div>\n\t\t<?php endif; ?>\n\n\t\t<section class=\"entry-meta\">\n\t\t\t<span class=\"byline\">\n\t\t\t\t<?php printf( __( '<span class=\"author\">%s</span>' ), get_comment_author_link() ); ?>\n\t\t\t</span>\n\n\t\t\t<span class=\"posted-on\">\n\t\t\t\t<?php printf( __('%1$s: %2$s'), get_comment_date(), get_comment_time() ); ?>\n\t\t\t</span>\n\t\t</section> <!-- .comment-meta -->\n\n\t\t<section class=\"comment-body\">\n\t\t\t<?php comment_text(); ?>\n\t\t</section> <!-- .comment-body -->\n\n\t\t<div class=\"reply\">\n\t\t\t<?php comment_reply_link( array_merge( $args, array( 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t</div>\n\n\t</article> <!-- #comment-? -->\n<?php\n}", "title": "" }, { "docid": "2484a655a2fa5a9eb0fb615953537ea0", "score": "0.53479123", "text": "public function actionArchive()\n {\n\n $this->forcePostRequest();\n\n $json = array();\n $json['success'] = false; // default\n\n $id = (int) Yii::app()->request->getParam('id', \"\");\n $className = Yii::app()->request->getParam('className', \"\");\n\n $object = Content::Get($className, $id);\n if ($object != null && $object->content->canArchive()) {\n $object->content->archive();\n\n $json['success'] = true;\n $json['wallEntryIds'] = $object->content->getWallEntryIds();\n }\n\n // returns JSON\n echo CJSON::encode($json);\n Yii::app()->end();\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "4482aae5f22c8502a7ab23ce997b3ac4", "score": "0.53401566", "text": "public function show(Comment $comment)\n {\n //\n }", "title": "" }, { "docid": "9c33f33c38f9ab537856c4c680b7e85b", "score": "0.5336853", "text": "function cera_comment( $comment, $args, $depth ) {\n\t\t// @codingStandardsIgnoreLine\n\t\t$GLOBALS['comment'] = $comment;\n\n\t\tif ( 'pingback' === $comment->comment_type || 'trackback' === $comment->comment_type ) : ?>\n\n\t\t\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\n\t\t\t\t<div class=\"comment-body mb-2\">\n\t\t\t\t\t<h5><?php esc_html_e( 'Pingback:', 'cera' ); ?></h5>\n\t\t\t\t\t<div><?php comment_author_link(); ?></div>\n\t\t\t\t</div><!-- .comment-body -->\n\n\t\t\t</li><!-- #-comment-## -->\n\n\t\t\t<?php\n\t\telse : ?>\n\n\t\t<li id=\"comment-<?php comment_ID(); ?>\" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>\n\n\t\t\t<div id=\"div-comment-<?php comment_ID(); ?>\" class=\"comment-main comment-main-<?php comment_ID(); ?> row ml-0 mr-0 mb-md-0 mb-4 mt-0\">\n\n\t\t\t\t<div class=\"col-12 col-sm-auto pl-0 pr-0 pr-md-2 pb-2 pb-md-0\">\n\t\t\t\t\t<div class=\"comment-img text-left m-0\">\n\t\t\t\t\t\t<a href=\"<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>\">\n\t\t\t\t\t\t\t<span class=\"avatar-round-ratio medium\"><?php echo 0 !== $args['avatar_size'] ? get_avatar( $comment, $args['avatar_size'] ) : ''; ?></span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div><!-- .comment-img -->\n\t\t\t\t</div><!-- .col -->\n\n\t\t\t\t<div class=\"col pr-0 pl-0\">\n\n\t\t\t\t\t<div class=\"comment-body p-3 p-sm-4\">\n\n\t\t\t\t\t\t<h5 class=\"comment-title media-heading\">\n\t\t\t\t\t\t\t<span class=\"fn\"><?php comment_author_link(); ?></span>\n\t\t\t\t\t\t</h5><!-- .media-heading -->\n\n\t\t\t\t\t\t<div class=\"comment-content\">\n\t\t\t\t\t\t\t<?php comment_text(); ?>\n\n\t\t\t\t\t\t\t<?php if ( '0' === $comment->comment_approved ) : ?>\n\t\t\t\t\t\t\t\t<p class=\"alert alert-danger comment-awaiting-moderation\"><?php esc_html_e( 'Your comment is awaiting moderation.', 'cera' ); ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t</div><!-- .comment-content -->\n\n\t\t\t\t\t\t<footer class=\"comment-meta\">\n\n\t\t\t\t\t\t\t<time datetime=\"<?php comment_time( 'c' ); ?>\" class=\"comment-time\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t/* translators: 1: Date, 2: Time */\n\t\t\t\t\t\t\t\t\tprintf( esc_html_x( '%1$s at %2$s', '1: date, 2: time', 'cera' ), esc_html( get_comment_date() ), esc_html( get_comment_time() ) ); ?>\n\t\t\t\t\t\t\t</time><!-- .comment-time -->\n\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$args = array_merge( $args, array(\n\t\t\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t'before' => '<span class=\"reply\">',\n\t\t\t\t\t\t\t\t'after' => '</span>',\n\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\tcomment_reply_link( $args ); ?>\n\n\t\t\t\t\t\t\t<?php edit_comment_link( esc_html__( 'Edit', 'cera' ), '<span class=\"edit-link\">', '</span>' ); ?>\n\n\t\t\t\t\t\t</footer><!-- .comment-meta -->\n\n\t\t\t\t\t</div><!-- .comment-body -->\n\n\t\t\t\t</div><!-- .col -->\n\n\t\t\t</div><!-- .comment-main -->\n\n\t\t\t<!-- \"</li>\" No closure tag, wp_list_comments \"end-callback\" do the job -->\n\t\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "9493acdc4fa12efce4d854b84040b227", "score": "0.5328956", "text": "function addcomment() { \n\t$comment = new Comment($_POST['pseudo'], $_POST['comment']);\n\t$comment->setPostID($_POST['postID']);\n\t$manager = new CommentManager();\n\t$try = $manager->addComment($comment);\n\theader(\"location:\". $_SERVER['HTTP_REFERER']);\n}", "title": "" }, { "docid": "2fa4b26405cca6183a5db90d5584afb1", "score": "0.53280896", "text": "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" }, { "docid": "2fa4b26405cca6183a5db90d5584afb1", "score": "0.53280896", "text": "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t<li <?php comment_class(); ?>>\n\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"clearfix\">\n\t\t\t<header class=\"comment-author vcard\">\n\t\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tthis is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n\t\t\t\t\techo get_avatar($comment,$size='32',$default='<path_to_url>' );\n\t\t\t\t*/\n\t\t\t\t?>\n\t\t\t\t<?php // custom gravatar call ?>\n\t\t\t\t<?php\n\t\t\t\t\t// create variable\n\t\t\t\t\t$bgauthemail = get_comment_author_email();\n\t\t\t\t?>\n\t\t\t\t<img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n\t\t\t\t<?php // end custom gravatar call ?>\n\t\t\t\t<?php printf(__( '<cite class=\"fn\">%s</cite>', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t<time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\t\t\t\t<?php edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ?>\n\t\t\t</header>\n\t\t\t<?php if ($comment->comment_approved == '0') : ?>\n\t\t\t\t<div class=\"alert alert-info\">\n\t\t\t\t\t<p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t\t<section class=\"comment_content clearfix\">\n\t\t\t\t<?php comment_text() ?>\n\t\t\t</section>\n\t\t\t<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t</article>\n\t<?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" }, { "docid": "7c00cd762bd3fe91b7e43e6802dda31a", "score": "0.5327741", "text": "function artscore_studio_comment( $comment, $args, $depth )\n{\n\t$GLOBALS['comment'] = $comment;\n\t\n\tswitch ( $comment->comment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t\t?>\n\t\t<div id=\"div-comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<div class=\"col-sm-4\"></div>\n\t\t\t\t\t<div class=\"col-sm-8 page-comments-area\">\n\t\t\t\t\t\t<p><?php _e( 'Pingback:', 'twentytwelve' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'twentytwelve' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t// Proceed with normal comments.\n\t\t\tglobal $post;\n\t\t\t?>\n\t\t\t<div id=\"div-comment-<?php comment_ID(); ?>\" <?php comment_class(); ?>>\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-sm-4 sidebar\">\n\t\t\t\t\t\t\t<header class=\"comment-meta comment-author vcard text-right\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tprintf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite> :',\n\t\t\t\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'twentytwelve' ) . '</span>' : ''\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tprintf( '<a href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n\t\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\t\tsprintf( __( '%1$s %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t</header>\n\t\t\t\t\t\t\t<div class=\"tools\">\n\t\t\t\t\t\t\t\t<div class=\"tool edit-link pull-left\"><?php edit_comment_link( '<span class=\"glyphicon glyphicon-edit\"></span>' ); ?></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"col-sm-8 content\">\n\t\t\t\t\t\t\t<article id=\"comment-<?php comment_ID(); ?>\" class=\"comment\">\n\t\t\t\t\t\t\t\t<?php if ( '0' == $comment->comment_approved ) : ?>\n\t\t\t\t\t\t\t\t\t<p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<section class=\"comment-content comment\">\n\t\t\t\t\t\t\t\t\t<?php comment_text(); ?>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t</section><!-- .comment-content -->\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"reply\">\n\t\t\t\t\t\t\t\t\t<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Répondre', 'artscore_studio' ), 'after' => ' <span class=\"glyphicon glyphicon-arrow-down\"></span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t\t\t\t\t</div><!-- .reply -->\n\t\t\t\t\t\t\t</article><!-- #comment-## -->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t<?php\n\t\t\tbreak;\n\t\t\n\tendswitch; // end comment_type check\n}", "title": "" }, { "docid": "bf1ea3511a7ba2f25e96c6b2c3d6abf9", "score": "0.5325185", "text": "public function postComment($comment)\n {\n try {\n $db = $this->dbConnect();\n $req = $db->prepare('INSERT INTO comment(post_id, author, comment, comment_date) VALUES(:post_id, :author, :comment, NOW())');\n $comments = $req->execute(array(\n 'post_id' => $_GET['id'],\n 'author' => $comment->getAuthor(),\n 'comment' => $comment->getComments()\n ));\n } catch (\\PDOException $exception) {\n var_dump($db->errorInfo());\n die('Erreur : ' . $exception->getMessage());\n }\n\n return $comments;\n }", "title": "" }, { "docid": "c65da1e7d89cf30047af0adcc6422c37", "score": "0.53166723", "text": "function vieddwCommentAction() {\n // Traitement des parametres\n $id_request_comment = $this->_request->getParam('id_request_comment');\n\n Zend_Loader::loadClass('Request');\n $information = Request::viewComment($id_request_comment);\n \n $this->view->information = $information;\n $this->view->comment = str_replace(\"\\'\", \"'\", $information->comment);\n \n $this->view->request = Request::getSummary($information->id_request);\n \n Zend_Loader::loadClass('User');\n $this->view->user = User::getCompleteName($information->id_user);\n\n // Variables\n $id_request = $information->id_request;\n \n // Requete\n if ($this->_request->isPost()) {\n // Traitement des variables POST\n Zend_Loader::loadClass('Zend_Filter_StripTags');\n $f = new Zend_Filter_StripTags();\n $comment = $f->filter($this->_request->getPost('comment'));\n \n // Verification avant enregistrement\n Zend_Loader::loadClass('Zend_Validate');\n \n $error = '';\n \n Zend_Loader::loadClass('Zend_Validate_NotEmpty');\n $validator = new Zend_Validate_NotEmpty();\n if (!$validator->isValid($comment)) {\n $error .= 'Veuillez indiquer un commentaire<br />';\n }\n \n // Enregistrement\n if ($error) {\n $this->view->error = $error;\n } else {\n // Enregistrement\n Zend_Loader::loadClass('Request');\n Request::updateComment($id_request_comment, $comment);\n\n // Redirection\n $this->_redirect($this->baseUrl.'/request/view/'.$id_request);\n }\n }\n \n\n }", "title": "" }, { "docid": "39a7e45195d8b02fe515113496b38eb7", "score": "0.5311658", "text": "private function AddComment()\n\t{\n\t\tglobal $DB;\n\t\t$arNotification = $this->Notify->getNotification();\n\n\t\t$arLog = CSocNetLog::GetList(\n\t\t\tarray(\"ID\" => \"DESC\"),\n\t\t\tarray(\n\t\t\t\t\"ENTITY_TYPE\" => SONET_ENTITY_USER,\n\t\t\t\t\"EVENT_ID\" => \"idea\",\n\t\t\t\t\"SOURCE_ID\" => $arNotification[\"POST_ID\"]),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tarray(\"ID\", \"RATING_ENTITY_ID\")\n\t\t)->Fetch();\n\n\t\tif($arLog)\n\t\t{\n\t\t\t$arNotify = Array(\n\t\t\t\t\"EVENT_ID\" => \"idea_comment\",\n\t\t\t\t\"URL\" => $arNotification[\"PATH\"],\n\t\t\t\t\"MESSAGE\" => $arNotification[\"POST_TEXT\"],\n\t\t\t\t\"SOURCE_ID\" => $arNotification[\"ID\"],\n\t\t\t\t\"ENTITY_TYPE\" => SONET_ENTITY_USER,\n\t\t\t\t\"ENTITY_ID\" => $arNotification[\"AUTHOR_ID\"],\n\t\t\t\t\"USER_ID\" => $arNotification[\"AUTHOR_ID\"],\n\t\t\t\t\"MODULE_ID\" => 'idea',\n\t\t\t\t\"LOG_ID\" => $arLog[\"ID\"],\n\t\t\t);\n\n\t\t\tif (isset($arNotification[\"LOG_DATE\"]))\n\t\t\t{\n\t\t\t\t$arNotify[\"LOG_DATE\"] = $arNotification[\"LOG_DATE\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$arNotify[\"=LOG_DATE\"] = $DB->CurrentTimeFunction();\n\t\t\t}\n\n\t\t\tif($arLog[\"RATING_ENTITY_ID\"]>0)\n\t\t\t{\n\t\t\t\t$arNotify[\"RATING_ENTITY_ID\"] = $arNotification[\"ID\"];\n\t\t\t\t$arNotify[\"RATING_TYPE_ID\"] = \"BLOG_COMMENT\";\n\t\t\t}\n\n\t\t\tif($arNotification[\"ACTION\"] == \"ADD\")\n\t\t\t{\n\t\t\t\t$LogCommentID = CSocNetLogComments::Add($arNotify, false, false);\n\t\t\t\tCSocNetLog::CounterIncrement($LogCommentID, false, false, \"LC\");\n\t\t\t}\n\t\t\telseif($arNotification[\"ACTION\"] == \"UPDATE\")\n\t\t\t{\n\t\t\t\t$arLogComment = CSocNetLogComments::GetList(\n\t\t\t\t\tarray(\"ID\" => \"DESC\"),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"ENTITY_TYPE\" => SONET_ENTITY_USER,\n\t\t\t\t\t\t\"EVENT_ID\" => \"idea_comment\",\n\t\t\t\t\t\t\"SOURCE_ID\" => $arNotification[\"ID\"]),\n\t\t\t\t\tfalse,\n\t\t\t\t\tfalse,\n\t\t\t\t\tarray(\"ID\")\n\t\t\t\t)->Fetch();\n\n\t\t\t\tif($arLogComment)\n\t\t\t\t{\n\t\t\t\t\tunset($arNotify[\"USER_ID\"]);\n\t\t\t\t\t$LogCommentID = CSocNetLogComments::Update($arLogComment[\"ID\"], $arNotify);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $LogCommentID>0;\n\t}", "title": "" }, { "docid": "d6ee0b5e5f6d5b9fd575809d6a8029cd", "score": "0.5304038", "text": "function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n <div id=\"comment-<?php comment_ID(); ?>\" <?php comment_class('cf'); ?>>\n <article class=\"cf\">\n <header class=\"comment-author vcard\">\n <?php\n /*\n this is the new responsive optimized comment image. It used the new HTML5 data-attribute to display comment gravatars on larger screens only. What this means is that on larger posts, mobile sites don't have a ton of requests for comment images. This makes load time incredibly fast! If you'd like to change it back, just replace it with the regular wordpress gravatar call:\n echo get_avatar($comment,$size='32',$default='<path_to_url>' );\n */\n ?>\n <?php // custom gravatar call ?>\n <?php\n // create variable\n $bgauthemail = get_comment_author_email();\n ?>\n <img data-gravatar=\"http://www.gravatar.com/avatar/<?php echo md5( $bgauthemail ); ?>?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"<?php echo get_template_directory_uri(); ?>/library/images/nothing.gif\" />\n <?php // end custom gravatar call ?>\n <?php printf(__( '<cite class=\"fn\">%1$s</cite> %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n <time datetime=\"<?php echo comment_time('Y-m-j'); ?>\"><a href=\"<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>\"><?php comment_time(__( 'F jS, Y', 'bonestheme' )); ?> </a></time>\n\n </header>\n <?php if ($comment->comment_approved == '0') : ?>\n <div class=\"alert alert-info\">\n <p><?php _e( 'Your comment is awaiting moderation.', 'bonestheme' ) ?></p>\n </div>\n <?php endif; ?>\n <section class=\"comment_content cf\">\n <?php comment_text() ?>\n </section>\n <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n </article>\n <?php // </li> is added by WordPress automatically ?>\n<?php\n}", "title": "" }, { "docid": "37b33aac89a093b888ecbd978dbc8f58", "score": "0.5302967", "text": "function addComment($postId, $author, $comment)\r\n{\r\n $commentManager = new CommentManager();\r\n $affectedLines = $commentManager->postComment($postId, $author, $comment);\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception('Impossible d\\'ajouter le commentaire !');\r\n } else {\r\n header('Location: ' .$GLOBALS['nomDeDomaine']. '?url=post&id=' . $postId);\r\n }\r\n}", "title": "" }, { "docid": "0a669856bc1e76200058a253d16e1bdb", "score": "0.5299247", "text": "function sumerian_comment( $comment, $args, $depth ) {\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n <li <?php comment_class(); ?> id=\"comment-<?php comment_ID(); ?>\">\n <p><?php _e( 'Pingback:', 'sumerian' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'sumerian' ), '<span class=\"edit-link\">', '</span>' ); ?></p>\n <?php\n break;\n default :\n // Proceed with normal comments.\n global $post;\n ?>\n <li <?php comment_class(); ?> id=\"li-comment-<?php comment_ID(); ?>\">\n <article id=\"comment-<?php comment_ID(); ?>\" class=\"comment clearfix\">\n\n <?php echo get_avatar( $comment, 60 ); ?>\n\n <div class=\"comment-wrapper\">\n\n <header class=\"comment-meta comment-author vcard\">\n <?php\n printf( '<cite><b class=\"fn\">%1$s</b> %2$s</cite>',\n get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'sumerian' ) . '</span>' : ''\n );\n printf( '<a class=\"comment-time\" href=\"%1$s\"><time datetime=\"%2$s\">%3$s</time></a>',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n /* translators: 1: date, 2: time */\n get_comment_date()\n );\n comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'sumerian' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );\n edit_comment_link( __( 'Edit', 'sumerian' ), '<span class=\"edit-link\">', '</span>' );\n ?>\n </header><!-- .comment-meta -->\n\n <?php if ( '0' == $comment->comment_approved ) : ?>\n <p class=\"comment-awaiting-moderation\"><?php _e( 'Your comment is awaiting moderation.', 'sumerian' ); ?></p>\n <?php endif; ?>\n\n <div class=\"comment-content entry-content\">\n <?php comment_text(); ?>\n <?php ?>\n </div><!-- .comment-content -->\n\n </div><!--/comment-wrapper-->\n\n </article><!-- #comment-## -->\n <?php\n break;\n endswitch; // end comment_type check\n}", "title": "" }, { "docid": "7955cb09aa89df530efa5a17284d3d26", "score": "0.5295793", "text": "public function commentOnAction(): object\n {\n $page = $this->di->get(\"page\");\n $request = $this->di->get(\"request\");\n $session = $this->di->get(\"session\");\n $response = $this->di->get(\"response\");\n\n $question = new Question();\n $question->setDb($this->di->get(\"dbqb\"));\n\n $id = $request->getGet(\"id\", null);\n $question = $question->getSingleQById($id);\n\n $login = $session->get(\"login\");\n if ($login) {\n $form = new CreateCommentForm($this->di);\n $form->check();\n\n $page->add(\"questions/singleqoraforcomment\", [\n \"newComment\" => $form->getHTML(),\n \"question\" => $question,\n ]);\n\n return $page->render([\n \"title\" => \"New comment\",\n ]);\n }\n //If not logged in, return to Q\n return $response->redirect(\"q/showq?id=$id\");\n }", "title": "" } ]
07ae77acec9374c4891afd15f8ae307f
Rachitha:this function will give topcards.
[ { "docid": "670b9ce2905e11bd546562723d59c7e7", "score": "0.0", "text": "function filter_top_cards($icon,$cardtitle,$data,$color){\n global $DB, $OUTPUT;\n $cardarray=[\n 'cards' =>array(\"hascard\"=>1,\n 'icon' =>$icon,\n 'cardtitle' =>strtoupper($cardtitle),\n 'data' =>$data,\n 'color' =>$color)];\n\n return $OUTPUT->render_from_template('local_deptrpts/card', $cardarray);\n }", "title": "" } ]
[ { "docid": "841795e327d045775881f1d44ca5c2f6", "score": "0.57414246", "text": "function supercard($pid){\n\t\n\t$playerstats = get_player_data($pid);\n\t$info = get_player_basic_info($pid);\n\t$firstname = $info[0]['first'];\n\t$lastname = $info[0]['last'];\n\t$position = $info[0]['position'];\n\n\t$getpotw = get_player_of_week();\n\t$thecount = array_count_values($getpotw);\n\n\t$plpotw = $totalpotw[$pid];\n\tif(is_array($sumpotw)){\n\t\t$sumpotw = array_sum($plpotw);\n\t}\n\t\n\t$career = get_player_career_stats($pid);\n\t$pbapps = array();\n\t$playerchamps = array();\n\t$printawards = array();\n\t\n\t$playerimgobj = get_attachment_url_by_slug($pid);\n\t$imgid = attachment_url_to_postid( $playerimgobj );\n\t$image_attributes = wp_get_attachment_image_src($imgid, array( 100, 100 ));\t\n\t$playerimg = $image_attributes[0];\n $teamsbyid = teamlist();\n\t$honorring = get_ring_of_honor();\n\t\n\t$justchamps = get_just_champions();\n\t$teams = get_teams();\n\t$teamslist = get_player_teams_season($pid);\n\t\t\t\t\t\t\n\t$get = playerplayoffs($pid);\n\t\n\tif(!empty($get)){\n\t\tforeach($get as $key => $value){\n\t\t\tif($value['week'] == 16){\n\t\t\t\t$pbapps[$value['year']] = $value['team'];\n\t\t\t}\n\t\t}\n\t}\n\t\n\tforeach ($pbapps as $key => $value){\n\t\tif ($value == $justchamps[$key]){\n\t\t\t$playerchamps[$key] = $value;\n\t\t}\n\t}\n\n\t$plawards = get_player_award($pid);\n\t\n\tif(!empty($plawards)){\n\t\tforeach ($plawards as $key => $value){\n\t\t\tif ($value['award'] != 'Hall of Fame Inductee'){\n\t\t\t\t$printawards[] = $value['awardid'];\n\t\t\t}\n\t\t}\n\t}\n\n\t$number_ones = get_number_ones();\n\t$halloffame = get_award_hall();\n\t$gamesbyteam = get_player_team_games($pid);\n\t\n\t\techo '<div class=\"col-xs-24 eq-box-sm\">';\n\t\t\techo '<div class=\"panel panel-bordered panel-dark the-supercard\">';\n\t\t\t\techo '<div class=\"panel-heading\">';\n\t\t\t\t\techo '<h3 class=\"panel-title\">Posse Football League</h3>';\n\t\t\t\techo '</div>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"panel-body\">';\n\t\t\t\t\techo '<span class=\"text-2x text-bold\"><a href=\"/player?id='.$pid.'\">'.$firstname.' '.$lastname.'</a></span>&nbsp;'.$position;\n\t\t\t\t\tif($info[0]['height'] != ''):\n\t\t\t\t\t\techo '<p>'.$info[0]['height'].', '.$info[0]['weight'].' lbs. | '.$info[0]['college'].' | <span class=\"text-bold\">#'.$info[0]['number'].'</span></p>';\n\t\t\t\t\tendif;\n\t\t\t\t//echo '<a href=\"/player/?id='.$val['pid'].'\"><img src=\"'.$playerimg.'\" class=\"img-responsive\"/></a>';\n if($playerimg):\n\t\t\t\t echo '<img alt=\"Profile Picture\" class=\"widget-img img-border-light\" style=\"width:100px; height:100px; left:75%; top:10px;\" src=\"'.$playerimg.'\">';\n endif;\n ?>\n <?php\n if($gamesbyteam):\n arsort($gamesbyteam);\n $r = 0;\n foreach ($gamesbyteam as $key => $value):\n if ($r == 0):\n $string .= '<strong>'.$teams[$key]['team'].'</strong>, ';\n else:\n $string .= $teams[$key]['team'].', ';\n endif;\n $r++;\n endforeach;\n echo 'PFL Teams: '.substr($string, 0, -2);\n endif;\n ?>\n\n\t\t\t\t<div class=\"table-responsive mar-top\">\n\t\t\t\t\t\t\n\t\t\t\t\t<table class=\"table table-striped\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Points Scored</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\"><?php if ($career['points'] > 0){ echo number_format($career['points'],0); } else {echo 0; } ?></span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Games Played</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\"><?php if ($career['games'] > 0){ echo $career['games']; } else { echo 0; } ?></span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Position Rank</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\"><?php if ($career['careerposrank'] != ''){ echo ordinal($career['careerposrank']);} else { echo '--';} ?></span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t$st = $career['years'][0];\n\t\t\t\t\t\tif($career['games'] > 0){\t\n\t\t\t\t\t\t\t$end = end($career['years']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($st != $end){\t?>\n\t\t\t\t\t\t\t<td class=\"text-left\">Seasons</td>\n\t\t\t\t\t\t\t<td><span class=\"text-bold\"><?php echo $st.' - '.$end; ?></span></td>\n\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t<td class=\"text-left\">Season</td>\n\t\t\t\t\t\t\t<td><span class=\"text-bold\"><?php echo $st; ?></span></td>\n\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Points Per Game</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\"><?php echo number_format($career['ppg'], 1); ?></span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Career High</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\"><?php echo $career['high']; ?></span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<?php if(!empty($printawards)){\n\t\t\t\t\t\tasort($printawards);\n\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Career Awards</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\">\n\t\t\t\t\t\t\t<?php foreach ($printawards as $value){\n\t\t\t\t\t\t\t\t$awid = substr($value , 0, -4);\n\t\t\t\t\t\t\t\t$awyr = substr($value, -4);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo $awyr.' ';\n\t\t\t\t\t\t\t\tlabeltheseaward($awid);\n\t\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}?>\n\t\t\t\t\t\t</span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach ($number_ones as $key => $value){\n\t\t\t\t\t\t\tif ($value['playerid'] == $pid){\n\t\t\t\t\t\t\t\t$player_number_ones[$key] = array(\n\t\t\t\t\t\t\t\t\t'id' => $value['id'],\n\t\t\t\t\t\t\t\t\t'points' => $value['points'],\n\t\t\t\t\t\t\t\t\t'team' => $value['teams']\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\n\t\t\t\t\t\tif(!empty($player_number_ones)){?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Position Scoring Titles</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\">\n\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\tforeach ($player_number_ones as $value){\n\t\t\t\t\t\t\t\t\t$stid = substr($value['id'], 2, 4);\n\t\t\t\t\t\t\t\t\t$stpts = $value['points'];\n\t\t\t\t\t\t\t\t\t$stteam = $value['team'];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo $stid.' - '.$teams[$stteam]['team'].' | '.$stpts.' Pts';\n\t\t\t\t\t\t\t\t\techo '<br>';\n\t\t\t\t\n\t\t\t\t\t\t\t\t}?>\n\t\t\t\t\t\t\t</span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($thecount[$pid] != ''){ \n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"text-left\">Player of The Week</td>\n\t\t\t\t\t\t\t<?php if ($thecount[$pid] == 1){ ?>\n\t\t\t\t\t\t\t\t<td><span class=\"text-bold\"><?php echo $thecount[$pid]; ?> Time</span></td>\n\t\t\t\t\t\t\t<?php } else { ?>\t\n\t\t\t\t\t\t\t\t<td><span class=\"text-bold\"><?php echo $thecount[$pid]; ?> Times</span></td>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!empty($pbapps)){ \n\t\t\t\t\t?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">Posse Bowl Appearances</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\">\n\t\t\t\t\t\t\t<?php foreach($pbapps as $key => $value){\n\t\t\t\t\t\t\t\t\techo $key.' - '.$teams[$value]['team'].'<br>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t</span></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<?php \n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!empty($playerchamps)){ \n\t\t\t\t\t?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"text-left\">PFL Championships</td>\n\t\t\t\t\t\t<td><span class=\"text-bold\">\n\t\t\t\t\t\t\t<?php foreach($playerchamps as $key => $value){\n\t\t\t\t\t\t\t\t\techo $key.' - '.$teams[$value]['team'].'<br>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\t\n\t\t\t\t\t\t</span></td>\n\t\t\t\t\t</tr>\n\t\n\t\t\t\t\t<?php \n\t\t\t\t\t\t\n\t\t\t\t\t\t} ?>\n\t\t\t\t\t\n\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<?php\n\t\t\t\t\t\tif (in_array($pid, $halloffame)):\n\t\t\t\t\t\t\techo '<h5 class=\"text-left text-bold\">&nbsp;Inducted into the PFL Hall of Fame</h5>';\n endif;\n\t\t\t\t\t\tif(in_array($pid, $honorring)):\n $pidkey = array_search ($pid, $honorring);\n\t\t\t\t\t\t $honorteam = substr($pidkey, 0,3);\n echo '<h5 class=\"text-left text-bold\">'.$teamsbyid[$honorteam].' Ring of Honor</h5>';\n endif;\n echo '</div>';\n\n\t\t\t//TEMPORARY TO BUILD OLD PLAYER INFO DATA\n\t\t\tif($info[0]['weight'] == ''):\n\t\t\t\tif($position == 'PK'):\n\t\t\t\t\techo '<a href=\"http://localhost:10060/?id='.$pid.'\" target=\"_blank\">INDEX LINK</a>';\n\t\t\t\tendif;\n\t\t\tendif;\n\t\t\t\n\t\techo '</div>';\n\t\t\n\t\techo '</div>';\n\t\techo '</div>';\n\n}", "title": "" }, { "docid": "8ff3c867429f177c3f5f35c0c466df48", "score": "0.5646972", "text": "public function getICards();", "title": "" }, { "docid": "68dce60066a2d6b11342f4c9b21d4487", "score": "0.5501153", "text": "public function getCards()\n {\n }", "title": "" }, { "docid": "828ca849511c91d0777187386c0793cd", "score": "0.5495686", "text": "public function getSortoutCards() : array;", "title": "" }, { "docid": "634af0e6b176178d47bbdb3c26dba351", "score": "0.5448515", "text": "protected function mappingCards(){\n\t\tfor($chairId=1;$chairId <= $this->chairAmount;$chairId++){\n\n\t\t\t$cards = $this->detailCards[$chairId]['single'];\n\n\t\t\t//cari kartu jendral\n\t\t\t$jendralCards = $this->getJendralCards($cards);\n\t\t\tif($jendralCards){\n\t\t\t\t$this->detailCards[$chairId]['jendral']=$jendralCards;\n\t\t\t\tforeach($jendralCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cari kartu urut 4 kartu\n\t\t\t$fourSeriesCards = $this->getFourSeriesCards($cards);\n\t\t\tif($fourSeriesCards){\n\t\t\t\t$this->detailCards[$chairId]['fourSeries']=$fourSeriesCards;\n\t\t\t\tforeach($fourSeriesCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cari kartu urut 3 kartu\n\t\t\t$treeSeriesCards = $this->getTreeSeriesCards($cards);\n\t\t\tif($treeSeriesCards){\n\t\t\t\t$this->detailCards[$chairId]['treeSeries']=$treeSeriesCards;\n\t\t\t\tforeach($treeSeriesCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cari kartu tree\n\t\t\t$treeCards = $this->getTreeCards($cards);\n\t\t\tif($treeCards){\n\t\t\t\t$this->detailCards[$chairId]['tree']=$treeCards;\n\t\t\t\tforeach($treeCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->detailCards[$chairId]['single'] = $cards;\n\t\t}\n\t}", "title": "" }, { "docid": "bce68ea547f40ac2be18e29bb360bdae", "score": "0.5426097", "text": "private function distribute()\n {\n // A,2-9,X,J,Q,K\n $this->loadmodel('Cards');\n $deck = $this->Cards->find();\n\n $player_and_cards = array();\n foreach($deck as $eachCard) {\n \n // distribute each card to random player\n $player_to_distribute = rand(1,$this->players);\n $card = ($eachCard['suit'].'-'.$eachCard['card_number']);\n if (!isset($player_and_cards[$player_to_distribute]['cards'])) {\n $player_and_cards[$player_to_distribute]['cards'] = array();\n }\n array_push($player_and_cards[$player_to_distribute]['cards'], $card);\n }\n\n // dd($player_and_cards);\n $this->request->getSession()->write('cards', $player_and_cards);\n $this->redirect(['controller' => 'Pages', 'action' => 'display', 'index']);\n \n }", "title": "" }, { "docid": "8274f866ea72e7fb89e9becd95bc10c9", "score": "0.53157175", "text": "public function getHoleCards(){\n\t\treturn array($this->dealCard(), $this->dealCard());\n\t}", "title": "" }, { "docid": "b7b711226b9ab1bd0d6ad85f8056365b", "score": "0.5313573", "text": "public function createJourney(): array\n {\n $boardingCards = $this->boardingCards->getBoardingCards();\n\n $sortedBoardingCards = $this->arraySorter($boardingCards);\n\n return $sortedBoardingCards;\n }", "title": "" }, { "docid": "a354a668b8886342f9d4a9a6a4ced410", "score": "0.5228113", "text": "public function get_hands() {\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$hand = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif (isset($card['place']['value']) && \r\n\t\t\t\t$card['place']['value'] == 'hand') {\r\n\t\t\t\tarray_push($hand, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hand;\r\n\t}", "title": "" }, { "docid": "ae7850c033f82190579d5e3d235a84d2", "score": "0.5195402", "text": "public function getFiveCards() : array;", "title": "" }, { "docid": "056c66534d084bda2d8b0e8932926451", "score": "0.5173233", "text": "public function dealICards();", "title": "" }, { "docid": "4e2b5e59b9188fa546dd71028e9a2b4b", "score": "0.51257366", "text": "public function cards()\n {\n //creating array of cardzz\n $cardzz = [];\n $i = 0; //taking temp var and intializing to 0\n for ($x = 0; $x < count($this->suite); $x++) {\n\n for ($y = 0; $y < count($this->rank); $y++) {\n\n //adding all the data into the cardzz array\n $cardzz[$i++] = $this->rank[$y] . \",\" . $this->suite[$x];\n\n }\n }\n return $cardzz;\n }", "title": "" }, { "docid": "29bef98939264d1a991756a147cb7ac7", "score": "0.5112266", "text": "function generate_crommosom() {\n $numb = 0;\n while($numb < $this->num_crommosom) { //diulang sesuai jumlah kromosom yang diinputkan\n $cro = $this->get_rand_crommosom(); \n $this->crommosom[] = $cro; \n $this->fitness[] = 0; \n $numb++;\n } \n //print_r($this->fitness);\n }", "title": "" }, { "docid": "8e1ddf0827494788569ccaed3bc7881e", "score": "0.5096745", "text": "function stGiveCards()\n {\n $this->gamestate->setAllPlayersMultiactive();\n\t\t// (and keep the current sentence builder non-active)\n\t\t$active_player_id = self::getGameStateValue( 'playerBuildingSentence' );\n $this->gamestate->setPlayerNonMultiactive( $active_player_id , \"giveCards\" );\n $players = self::loadPlayersBasicInfos();\t\n // give everybody except the active player time to choose cards \n foreach( $players as $player_id => $player ) {\n\n if ($player_id != $active_player_id) {\n $this-> giveExtraTime( $player_id);\n \n }\n }\n\n }", "title": "" }, { "docid": "0134b14db0fc5e76506a302caaf10567", "score": "0.50958425", "text": "function generate_crommosom() {\r\n $numb = 0;\r\n while($numb < $this->num_crommosom) { //diulang sesuai jumlah kromosom yang diinputkan\r\n $cro = $this->get_rand_crommosom(); \r\n $this->crommosom[] = $cro; \r\n $this->fitness[] = 0; \r\n $numb++;\r\n } \r\n //print_r($this->fitness);\r\n }", "title": "" }, { "docid": "54556f83e2796190d8f1e2ba5c72f4e5", "score": "0.5077199", "text": "function pmp_get_creators() {\n\treturn array(\n\t\t'APM' => '98bf597a-2a6f-446c-9b7e-d8ae60122f0d',\n\t\t'NPR' => '6140faf0-fb45-4a95-859a-070037fafa01',\n\t\t'PBS' => 'fc53c568-e939-4d9c-86ea-c2a2c70f1a99',\n\t\t'PRI' => '7a865268-c9de-4b27-a3c1-983adad90921',\n\t\t'PRX' => '609a539c-9177-4aa7-acde-c10b77a6a525'\n\t);\n}", "title": "" }, { "docid": "33edb8e50a49db5d0f6a173dfa867377", "score": "0.5042517", "text": "function getCards() {\n $query = \"select * from pkr_card where game=\" . $this->curr_game . \" order by seq\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "title": "" }, { "docid": "10f5929044e4a5f79b017a7b742bb507", "score": "0.5041633", "text": "public function calculateAllPossibilitiesProvider()\n {\n return array(\n array(\n new Subject(\n array(\n 'name' => 'Mario',\n 'surname' => 'Rossi',\n 'birthDate' => '1985-12-10',\n 'gender' => 'M',\n 'belfioreCode' => 'A562',\n )\n ),\n array(\n 'RSSMRA85T10A562S',\n 'RSSMRA85T10A56NH',\n 'RSSMRA85T10A5S2E',\n 'RSSMRA85T10A5SNT',\n 'RSSMRA85T10AR62N',\n 'RSSMRA85T10AR6NC',\n 'RSSMRA85T10ARS2Z',\n 'RSSMRA85T10ARSNO',\n 'RSSMRA85T1LA562V',\n 'RSSMRA85T1LA56NK',\n 'RSSMRA85T1LA5S2H',\n 'RSSMRA85T1LA5SNW',\n 'RSSMRA85T1LAR62Q',\n 'RSSMRA85T1LAR6NF',\n 'RSSMRA85T1LARS2C',\n 'RSSMRA85T1LARSNR',\n 'RSSMRA85TM0A562D',\n 'RSSMRA85TM0A56NS',\n 'RSSMRA85TM0A5S2P',\n 'RSSMRA85TM0A5SNE',\n 'RSSMRA85TM0AR62Y',\n 'RSSMRA85TM0AR6NN',\n 'RSSMRA85TM0ARS2K',\n 'RSSMRA85TM0ARSNZ',\n 'RSSMRA85TMLA562G',\n 'RSSMRA85TMLA56NV',\n 'RSSMRA85TMLA5S2S',\n 'RSSMRA85TMLA5SNH',\n 'RSSMRA85TMLAR62B',\n 'RSSMRA85TMLAR6NQ',\n 'RSSMRA85TMLARS2N',\n 'RSSMRA85TMLARSNC',\n 'RSSMRA8RT10A562E',\n 'RSSMRA8RT10A56NT',\n 'RSSMRA8RT10A5S2Q',\n 'RSSMRA8RT10A5SNF',\n 'RSSMRA8RT10AR62Z',\n 'RSSMRA8RT10AR6NO',\n 'RSSMRA8RT10ARS2L',\n 'RSSMRA8RT10ARSNA',\n 'RSSMRA8RT1LA562H',\n 'RSSMRA8RT1LA56NW',\n 'RSSMRA8RT1LA5S2T',\n 'RSSMRA8RT1LA5SNI',\n 'RSSMRA8RT1LAR62C',\n 'RSSMRA8RT1LAR6NR',\n 'RSSMRA8RT1LARS2O',\n 'RSSMRA8RT1LARSND',\n 'RSSMRA8RTM0A562P',\n 'RSSMRA8RTM0A56NE',\n 'RSSMRA8RTM0A5S2B',\n 'RSSMRA8RTM0A5SNQ',\n 'RSSMRA8RTM0AR62K',\n 'RSSMRA8RTM0AR6NZ',\n 'RSSMRA8RTM0ARS2W',\n 'RSSMRA8RTM0ARSNL',\n 'RSSMRA8RTMLA562S',\n 'RSSMRA8RTMLA56NH',\n 'RSSMRA8RTMLA5S2E',\n 'RSSMRA8RTMLA5SNT',\n 'RSSMRA8RTMLAR62N',\n 'RSSMRA8RTMLAR6NC',\n 'RSSMRA8RTMLARS2Z',\n 'RSSMRA8RTMLARSNO',\n 'RSSMRAU5T10A562P',\n 'RSSMRAU5T10A56NE',\n 'RSSMRAU5T10A5S2B',\n 'RSSMRAU5T10A5SNQ',\n 'RSSMRAU5T10AR62K',\n 'RSSMRAU5T10AR6NZ',\n 'RSSMRAU5T10ARS2W',\n 'RSSMRAU5T10ARSNL',\n 'RSSMRAU5T1LA562S',\n 'RSSMRAU5T1LA56NH',\n 'RSSMRAU5T1LA5S2E',\n 'RSSMRAU5T1LA5SNT',\n 'RSSMRAU5T1LAR62N',\n 'RSSMRAU5T1LAR6NC',\n 'RSSMRAU5T1LARS2Z',\n 'RSSMRAU5T1LARSNO',\n 'RSSMRAU5TM0A562A',\n 'RSSMRAU5TM0A56NP',\n 'RSSMRAU5TM0A5S2M',\n 'RSSMRAU5TM0A5SNB',\n 'RSSMRAU5TM0AR62V',\n 'RSSMRAU5TM0AR6NK',\n 'RSSMRAU5TM0ARS2H',\n 'RSSMRAU5TM0ARSNW',\n 'RSSMRAU5TMLA562D',\n 'RSSMRAU5TMLA56NS',\n 'RSSMRAU5TMLA5S2P',\n 'RSSMRAU5TMLA5SNE',\n 'RSSMRAU5TMLAR62Y',\n 'RSSMRAU5TMLAR6NN',\n 'RSSMRAU5TMLARS2K',\n 'RSSMRAU5TMLARSNZ',\n 'RSSMRAURT10A562B',\n 'RSSMRAURT10A56NQ',\n 'RSSMRAURT10A5S2N',\n 'RSSMRAURT10A5SNC',\n 'RSSMRAURT10AR62W',\n 'RSSMRAURT10AR6NL',\n 'RSSMRAURT10ARS2I',\n 'RSSMRAURT10ARSNX',\n 'RSSMRAURT1LA562E',\n 'RSSMRAURT1LA56NT',\n 'RSSMRAURT1LA5S2Q',\n 'RSSMRAURT1LA5SNF',\n 'RSSMRAURT1LAR62Z',\n 'RSSMRAURT1LAR6NO',\n 'RSSMRAURT1LARS2L',\n 'RSSMRAURT1LARSNA',\n 'RSSMRAURTM0A562M',\n 'RSSMRAURTM0A56NB',\n 'RSSMRAURTM0A5S2Y',\n 'RSSMRAURTM0A5SNN',\n 'RSSMRAURTM0AR62H',\n 'RSSMRAURTM0AR6NW',\n 'RSSMRAURTM0ARS2T',\n 'RSSMRAURTM0ARSNI',\n 'RSSMRAURTMLA562P',\n 'RSSMRAURTMLA56NE',\n 'RSSMRAURTMLA5S2B',\n 'RSSMRAURTMLA5SNQ',\n 'RSSMRAURTMLAR62K',\n 'RSSMRAURTMLAR6NZ',\n 'RSSMRAURTMLARS2W',\n 'RSSMRAURTMLARSNL',\n ),\n ),\n array(\n new Subject(\n array(\n 'name' => 'Roberto',\n 'surname' => 'Santi',\n 'birthDate' => '1963-05-08',\n 'gender' => 'M',\n 'belfioreCode' => 'H501',\n )\n ),\n array(\n 'SNTRRT63E08H501T',\n 'SNTRRT63E08H50ML',\n 'SNTRRT63E08H5L1E',\n 'SNTRRT63E08H5LMW',\n 'SNTRRT63E08HR01O',\n 'SNTRRT63E08HR0MG',\n 'SNTRRT63E08HRL1Z',\n 'SNTRRT63E08HRLMR',\n 'SNTRRT63E0UH501Q',\n 'SNTRRT63E0UH50MI',\n 'SNTRRT63E0UH5L1B',\n 'SNTRRT63E0UH5LMT',\n 'SNTRRT63E0UHR01L',\n 'SNTRRT63E0UHR0MD',\n 'SNTRRT63E0UHRL1W',\n 'SNTRRT63E0UHRLMO',\n 'SNTRRT63EL8H501E',\n 'SNTRRT63EL8H50MW',\n 'SNTRRT63EL8H5L1P',\n 'SNTRRT63EL8H5LMH',\n 'SNTRRT63EL8HR01Z',\n 'SNTRRT63EL8HR0MR',\n 'SNTRRT63EL8HRL1K',\n 'SNTRRT63EL8HRLMC',\n 'SNTRRT63ELUH501B',\n 'SNTRRT63ELUH50MT',\n 'SNTRRT63ELUH5L1M',\n 'SNTRRT63ELUH5LME',\n 'SNTRRT63ELUHR01W',\n 'SNTRRT63ELUHR0MO',\n 'SNTRRT63ELUHRL1H',\n 'SNTRRT63ELUHRLMZ',\n 'SNTRRT6PE08H501F',\n 'SNTRRT6PE08H50MX',\n 'SNTRRT6PE08H5L1Q',\n 'SNTRRT6PE08H5LMI',\n 'SNTRRT6PE08HR01A',\n 'SNTRRT6PE08HR0MS',\n 'SNTRRT6PE08HRL1L',\n 'SNTRRT6PE08HRLMD',\n 'SNTRRT6PE0UH501C',\n 'SNTRRT6PE0UH50MU',\n 'SNTRRT6PE0UH5L1N',\n 'SNTRRT6PE0UH5LMF',\n 'SNTRRT6PE0UHR01X',\n 'SNTRRT6PE0UHR0MP',\n 'SNTRRT6PE0UHRL1I',\n 'SNTRRT6PE0UHRLMA',\n 'SNTRRT6PEL8H501Q',\n 'SNTRRT6PEL8H50MI',\n 'SNTRRT6PEL8H5L1B',\n 'SNTRRT6PEL8H5LMT',\n 'SNTRRT6PEL8HR01L',\n 'SNTRRT6PEL8HR0MD',\n 'SNTRRT6PEL8HRL1W',\n 'SNTRRT6PEL8HRLMO',\n 'SNTRRT6PELUH501N',\n 'SNTRRT6PELUH50MF',\n 'SNTRRT6PELUH5L1Y',\n 'SNTRRT6PELUH5LMQ',\n 'SNTRRT6PELUHR01I',\n 'SNTRRT6PELUHR0MA',\n 'SNTRRT6PELUHRL1T',\n 'SNTRRT6PELUHRLML',\n 'SNTRRTS3E08H501Q',\n 'SNTRRTS3E08H50MI',\n 'SNTRRTS3E08H5L1B',\n 'SNTRRTS3E08H5LMT',\n 'SNTRRTS3E08HR01L',\n 'SNTRRTS3E08HR0MD',\n 'SNTRRTS3E08HRL1W',\n 'SNTRRTS3E08HRLMO',\n 'SNTRRTS3E0UH501N',\n 'SNTRRTS3E0UH50MF',\n 'SNTRRTS3E0UH5L1Y',\n 'SNTRRTS3E0UH5LMQ',\n 'SNTRRTS3E0UHR01I',\n 'SNTRRTS3E0UHR0MA',\n 'SNTRRTS3E0UHRL1T',\n 'SNTRRTS3E0UHRLML',\n 'SNTRRTS3EL8H501B',\n 'SNTRRTS3EL8H50MT',\n 'SNTRRTS3EL8H5L1M',\n 'SNTRRTS3EL8H5LME',\n 'SNTRRTS3EL8HR01W',\n 'SNTRRTS3EL8HR0MO',\n 'SNTRRTS3EL8HRL1H',\n 'SNTRRTS3EL8HRLMZ',\n 'SNTRRTS3ELUH501Y',\n 'SNTRRTS3ELUH50MQ',\n 'SNTRRTS3ELUH5L1J',\n 'SNTRRTS3ELUH5LMB',\n 'SNTRRTS3ELUHR01T',\n 'SNTRRTS3ELUHR0ML',\n 'SNTRRTS3ELUHRL1E',\n 'SNTRRTS3ELUHRLMW',\n 'SNTRRTSPE08H501C',\n 'SNTRRTSPE08H50MU',\n 'SNTRRTSPE08H5L1N',\n 'SNTRRTSPE08H5LMF',\n 'SNTRRTSPE08HR01X',\n 'SNTRRTSPE08HR0MP',\n 'SNTRRTSPE08HRL1I',\n 'SNTRRTSPE08HRLMA',\n 'SNTRRTSPE0UH501Z',\n 'SNTRRTSPE0UH50MR',\n 'SNTRRTSPE0UH5L1K',\n 'SNTRRTSPE0UH5LMC',\n 'SNTRRTSPE0UHR01U',\n 'SNTRRTSPE0UHR0MM',\n 'SNTRRTSPE0UHRL1F',\n 'SNTRRTSPE0UHRLMX',\n 'SNTRRTSPEL8H501N',\n 'SNTRRTSPEL8H50MF',\n 'SNTRRTSPEL8H5L1Y',\n 'SNTRRTSPEL8H5LMQ',\n 'SNTRRTSPEL8HR01I',\n 'SNTRRTSPEL8HR0MA',\n 'SNTRRTSPEL8HRL1T',\n 'SNTRRTSPEL8HRLML',\n 'SNTRRTSPELUH501K',\n 'SNTRRTSPELUH50MC',\n 'SNTRRTSPELUH5L1V',\n 'SNTRRTSPELUH5LMN',\n 'SNTRRTSPELUHR01F',\n 'SNTRRTSPELUHR0MX',\n 'SNTRRTSPELUHRL1Q',\n 'SNTRRTSPELUHRLMI',\n ),\n ),\n );\n }", "title": "" }, { "docid": "ccbdc7088a4ebdadd9d10fc507b37b86", "score": "0.5028845", "text": "public function getFinishRewards() \n {/*\n $conf = Common::getConfig('FinishRewards');\n \n $oUser = User::getById(Controller::$uId);\n $oEvent = Event::getById(Controller::$uId);\n $maxPearFlower = Common::getConfig('General','PearFlowerInfo','maxgetPearFlower');\n $rand_Id = $this->newRandom($conf);\n do\n {\n $gifId = $this->newRandom($conf[$rand_Id]['Rewards']);\n }\n while($conf[$rand_Id]['Rewards'][$gifId]['Color'] == 4 && $oEvent->EventList['PearFlower']['MaxPearFlower'] >=$maxPearFlower);\n if($conf[$rand_Id]['Rewards'][$gifId]['Color'] == 4)\n $oEvent->EventList['PearFlower']['MaxPearFlower'] += 1 ;\n \n $gift = $conf[$rand_Id]['Rewards'][$gifId] ;\n \n $arr_gift = array();\n \n if(SoldierEquipment::checkExist($gift['ItemType']))\n {\n $AutoId = $oUser->getAutoId(); \n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'][] = $oEquipment ;\n $arr_gift['SpecialGift'][] = $oEquipment ;\n }\n else\n {\n unset($gift['Rate']);\n $arr_gift['NormalGift'][]= $gift ; \n } \n */\n // them kinh nghiem\n $successExp = Common::getParam('SuccessRewards');\n $ExpGift = array('ItemType'=>'Exp','Num'=>$successExp);\n $arr_gift['NormalGift'][]= $ExpGift;\n \n return $arr_gift ;\n }", "title": "" }, { "docid": "5179137bf4bd93d3e2a7847c1af7630a", "score": "0.50281733", "text": "public function getTreasureRewards() \n {\n $conf_treasure = Common::getConfig('TreasureRewards') ;\n \n $oUser = User::getById(Controller::$uId); \n \n \n // kiem tra xem da ra maze key hay chua\n if($this->MazeKeyInfo['Num2'] > 0)\n $rand_Id = $this->newRandom($conf_treasure,12); // loai truong hop ra mazekey\n else if($this->MazeKeyInfo['OpenTreasure'] >= 6)\n $rand_Id = 12; // cho ra maze key luon\n else \n $rand_Id = $this->newRandom($conf_treasure);\n \n \n $gifId = $this->newRandom($conf_treasure[$rand_Id]['Rewards']);\n $gift = $conf_treasure[$rand_Id]['Rewards'][$gifId] ;\n \n //update MazekeyInfo\n if($rand_Id == 12 )\n {\n $this->MazeKeyInfo['Num']++ ;\n $this->MazeKeyInfo['Num2']++ ;\n }\n \n \n $this->MazeKeyInfo['OpenTreasure']++;\n \n \n $arr_gift = array();\n \n if(SoldierEquipment::checkExist($gift['ItemType']))\n {\n $AutoId = $oUser->getAutoId(); \n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'] = $oEquipment ;\n $arr_gift['SpecialGift'] = $oEquipment ; \n }\n else\n { \n unset($gift['Rate']);\n $arr_gift['NormalGift'] = $gift ;\n \n } \n return $arr_gift ;\n \n }", "title": "" }, { "docid": "a8281fcc96c4a4f6ff87c6f018d8f983", "score": "0.50109696", "text": "private function createCards()\n {\n \n $values = array('2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A');\n $suits = array('S', 'H', 'D', 'C');\n \n $response = array();\n foreach ($suits as $suit) {\n foreach ($values as $value) {\n $response[] = $value . $suit;\n }\n }\n \n return $response;\n \n }", "title": "" }, { "docid": "7e2d2f25e2072cbf868f9045a095df83", "score": "0.49926955", "text": "public function getRewardsList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "3a1a0146de2eb5e3b0da3b2e35fb4d85", "score": "0.49921963", "text": "public function getRewardsList(){\n return $this->_get(34);\n }", "title": "" }, { "docid": "a47e65d9be646409630099c0ed3a8b5d", "score": "0.4985543", "text": "public function planta_artigo()\n {\n \n }", "title": "" }, { "docid": "a42ce027f46eb7945a0dc879ba38e185", "score": "0.4969522", "text": "public function cards() {\n return $this->morphToMany('TypiCMS\\Modules\\Cards\\Models\\Card', 'insurancepages_card', 'insurancepages_cards', 'insurancepage_id', 'card_id')\n ->withPivot('card_id')\n ->orderBy('position')\n ->withTimestamps();\n }", "title": "" }, { "docid": "802397e709bdd6572ac9f981df6ba0f3", "score": "0.4966512", "text": "protected function cards()\n {\n return [\n new PaymentsPerDay,\n new ActiveMembers,\n new AttendancePerWeek,\n new ActiveAttendanceBreakdown,\n ];\n }", "title": "" }, { "docid": "123a46a163466616c3221da1c7abf68d", "score": "0.49628118", "text": "function isStraight() \n\t{\n\t\t$result[\"bool\"] = false;\n\t\t$result[\"ptg\"] = array();\n\t\t$result[\"type\"] = array();\t\n\t\n\t\t$c_cards = count($this->cards);\n\t for ($i=0; $i < $c_cards; $i++) \n\t {\n\t\t $arr_temp_i = $this->cards[$i];\n\t foreach($arr_temp_i as $nKey => $nValue) \n\t {\n\t $cache[$i] = $nKey;\n\t }\n\t }\n\t\t\t\t \t \n\t unset($arr_temp_i);\n\t \n\t // Se ho un K allora mi conviene cambiare il 1 in 14 per la scala...\n\t // Siccome ho trasformato l'1 in 14 lo rimetto a 1\n\t $c_cache = count($cache);\n\t if (!in_array(13,$cache))\n\t {\n\t for ($i = 0; $i < $c_cache; $i++)\n\t \t{\n\t\t \tif ($cache[$i]==14)\n\t\t \t\t$cache[$i]=1;\n\t \t}\n\t\t}\t\t\t\n\t\t\n\t arsort($cache);\t\n\t \n\t $total = count($cache);\n\t $retries = $total - 5;\n\t $counter = $start = current($cache);\n\t \n\t foreach ($cache as $a => $b) {\n\t if ($cache[$a] != $counter) {\n\t if ($retries > 0) {\n\t $retries--;\n\t $counter = $start = $cache[$a];\n\t } else {\n\t return $result;\n\t }\n\t }\n\t if (($start - 5) == $counter ) {\n\t break;\n\t }\n\t $counter--;\n\t }\n\t \n\n\t // Se nn ho 13 allora il 14 lo trasformo in 1 in caso di scala !!\n\t $c_cache = count($cache);\n\t if (!in_array(13,$cache))\n\t {\n\t for ($i = 0; $i < $c_cache; $i++)\n\t \t{\n\t\t \t$k = key($this->cards[$i]);\n\t\t \t$s = $this->cards[$i][$k];\n\t\t \tif ($k==14) {\n\t\t\t \tunset($this->cards[$i]);\n\t\t \t\t$this->cards[$i][1] = $s;\t\t \t\t\n\t \t\t}\n\t \t}\n\t\t}\t \n\t\t\n\t\tusort($this->cards, by_key);\n\n\t\t$result[\"bool\"] = true;\n\t\t$result[\"ptg\"] = $this->cards;\n\t\t$result[\"type\"] = PKR_STRAIGHT;\n\t return $result;\n\t}", "title": "" }, { "docid": "07cc776c66a922765cd88a768a95e68d", "score": "0.49538156", "text": "function getBestHand() {\n $checkptg = new CheckPtg($this->cards);\n\n $var = $checkptg->isRoyalFlush();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isStraightFlush();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isFourOfAKind();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n // Non mi serve fare Usort\n $var = $checkptg->isFullHouse();\n //usort($var[\"ptg\"], by_key);\t\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isFlush();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isStraight();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isThreeOfAKind();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isTwoPair();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isPair();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isHighCard();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n }", "title": "" }, { "docid": "5a44dad25eafe2c89ede1550b07eb379", "score": "0.49374753", "text": "public function getCard();", "title": "" }, { "docid": "8c503209f419104071412d3d996ecf93", "score": "0.49326724", "text": "function TirageAleatoire(){\n $couleur = array(\"green\", \"yellow\", \"red\", \"blue\", \"pink\", \"purple\", \"orange\", \"grey\");\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion1 = $couleur[$rand_keys[0]];\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion2 = $couleur[$rand_keys[0]];\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion3 = $couleur[$rand_keys[0]];\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion4 = $couleur[$rand_keys[0]];\n\n $resultat = array(\"$pion1\", \"$pion2\", \"$pion3\", \"$pion4\");\n return $resultat;\n }", "title": "" }, { "docid": "0d8114e2dcd2637547749f63aa3055e3", "score": "0.49278986", "text": "protected function cards()\n {\n return [];\n }", "title": "" }, { "docid": "93438a8ff0c2fbbc38b9e5c4b9a391a0", "score": "0.4924486", "text": "function do_all_pings()\n{\n}", "title": "" }, { "docid": "cea353b48a53d3b3b03c10e56791e9bb", "score": "0.49088225", "text": "function limitrofes($pais1,$pais2){\n\t\t\tswitch( $pais1->getId() ){\n\t\t\t\tcase 0: //yucon\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 1://canada\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2://alasca\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4://oregon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\tcase 1: //canada\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 0://yucon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4://oregon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5://nueva york\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6://terranova\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 2: //alasca\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 0://yucon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4://oregon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 35://alasca\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3: //groenlandia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 7://labrador\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5://nueva york\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 22://islandia\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 4: //oregon\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 5: //nueva york\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 6: //terranova\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 7: //labrador\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 8: //california\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 9: //mexico\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 10: //colombia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 11: //brasil\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 12: //peru\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 13: //chile\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 14: //argentina\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 15: //uruguay\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 16: //sahara\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 17: //egipto\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 21:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 42:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 18: //etiopia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 20:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 19: //zaire\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 21:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 20:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 20: //sudafrica\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 21: //madagascar\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 22: //islandia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 23: //gran bretaña\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 22:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 24: //suecia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 22:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 25: //rusia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 26: //polonia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 27: //alemania\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 28: //italia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 29: //francia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 30: //españa\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 31: //aral\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 32: //tartaria\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 33:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 33: //taimir\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 34: //siberia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 33:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 35:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 35: //camchatca\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 36:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 36: //japon\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 35:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 37: //iran\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 38: //mongolia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 39: //china\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 35:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 36:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 45:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 40: //gobi\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 41: //turquia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 42:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 43:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 42: //israel\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 43:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 43: //arabia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 42:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 44: //india\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 45:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 46:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 45: //malasia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 48:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 46: //sumatra\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 47: //australia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 46:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 48:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 49:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 48: //borneo\n\t\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 45:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 49: //java\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t//llave switch superior\t\n\t\t\t}\n\t\t\n\t\t//llave function\n\t\t}", "title": "" }, { "docid": "e1cd3343b991464f97e8bac0cb9dcd2d", "score": "0.48944932", "text": "private function splitCards()\n {\n \n //$cards = $this->shuffleCards($this->createCards());\n $cards = $this->createCards();\n shuffle($cards);\n \n return array_chunk($cards, intval(ceil(sizeof($cards) / 2)));\n \n }", "title": "" }, { "docid": "002d38c1d7bbc79480dc76460a0ff404", "score": "0.48690617", "text": "function getHand(){\n $players = 0;\n \n //creates arrays for the cards for each player\n $player1 = array();\n $player2 = array();\n $player3 = array();\n $player4 = array();\n \n //array to hold the scores of each player\n $scores = array();\n \n //value that cards will stop being distributed at\n $stop = 36;\n \n //creates the deck\n $deck = array();\n for ($i = 1; $i <= 52; $i++) {\n $deck[] = $i;\n }\n \n //shuffles the deck\n shuffle($deck);\n \n $j = 0;\n $k = 0;\n $temp;\n \n //test printing of array\n //prints each value of the array one a new line\n for($i = 0; $i < 4; $i++){\n while($players == 0)\n {\n if($score < $stop){\n $player1[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 1)\n {\n if($score < $stop){\n $player2[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 2)\n {\n if($score < $stop){\n $player3[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 3)\n {\n if($score < $stop){\n $player4[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n \n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n }\n echo $scores[0];\n echo \"<img src='img/players/Scott.jpg' />\";\n displayHand($player1);\n \n echo $scores[1];\n echo \"<img src='img/players/Michael.jpg' />\";\n displayHand($player2);\n \n echo $scores[2];\n echo \"<img src='img/players/Tristen.jpg' />\";\n displayHand($player3);\n \n echo $scores[3];\n echo \"<img src='img/players/Unknown.png' />\";\n displayHand($player4);\n \n \n $f = 0;\n \n ///////used to display the scores/////////////////////////\n \n // while ($f < 4) {\n // echo $scores[$f] . \"<br/>\";\n // $f++;\n // }\n return $scores;\n////////////////////////////////////////////\n \n}", "title": "" }, { "docid": "7088cfb763ea915df79bdc1e861ed818", "score": "0.4867626", "text": "public function processPool($p) {\r\n\t\t$p = $this->filterColor($p);\r\n\t\t$p = $this->filterBasics($p);\r\n\r\n\t\t$cardCount = count($p);\r\n\t\t$avgCMC = $this->averageCMC($p);\r\n\r\n\t\t// trim a card until we hit the sweet spot\r\n\t\t$isSaturated = false;\r\n\t\twhile(!$isSaturated) {\r\n\t\t\t$nonLandCount = $this->countNonLands($p);\r\n\t\t\tif(($this->model->getSize() == 60 && $nonLandCount >= 38)\r\n\t\t\t|| ($this->model->getSize() == 40 && $nonLandCount >= 22)) {\r\n\t\t\t\t$p = $this->trim($p);\r\n\t\t\t} else {\r\n\t\t\t\t$isSaturated = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$p = $this->addBasics($p);\r\n\t\treturn $p;\r\n\t}", "title": "" }, { "docid": "c16ee4c5f6e4df4dfa08fdb18d28818a", "score": "0.48627716", "text": "public function shuffleCards()\n {\n\n // looping over the suite array\n for ($i = 0; $i < count($this->suite); $i++) {\n\n // looping over the rank array\n for ($j = 0; $j < count($this->rank); $j++) {\n $firstRand = mt_rand(0, 3); //getting a random value btw 0 and 3\n $secondRand = mt_rand(0, 12); //getting a random value btw 0 and 12\n\n // creating a temporary variable and swaping the data\n $temp = $this->cards[$firstRand][$secondRand];\n $this->cards[$firstRand][$secondRand] = $this->cards[$i][$j];\n $this->cards[$i][$j] = $temp;\n }\n }\n // returns the card array\n return $this->cards;\n }", "title": "" }, { "docid": "1278a2121bcd8a5659542a67bc2a8876", "score": "0.48577997", "text": "public function getPerms();", "title": "" }, { "docid": "88b30a6638241bd292d54e7a048f0c03", "score": "0.48550534", "text": "public function getCard() {\n\n }", "title": "" }, { "docid": "6c288e26ea50161b8e8d701b9c69cca8", "score": "0.4853681", "text": "public function refrescacampos(){\n $this->hp=$this->nhorasparadainterna; //horas parada por mo interna o break dowwna\n $this->hpp=$this->nhorasparadaprogramada; //hora spdara programada precheck\n $this->hps=$this->nhorasparadaexterna; //horas prada por servicios\n $this->hd=$this->horasdisponibles();\n $this->hmt=$this->horasmotor();\n $this->hpt=$this->horasperfo();\n $this->tbd=$this->gethorasparada();//horas de parada total\n $this->np=$this->nparadasint;\n $this->ns=$this->nparadasext;\n $this->npp=$this->nparadasprog;\n $this->npp=$this->ns+$this->np+$this->npp;///veces parada servicio+veces parada interno, +veces parada programnada\n $this->ntt=$this->nparadastotales();\n $this->htt=$this->horasmotor()+$this->horasperfo();\n $this->dispo=$this->porcdispo();\n $this->util=$this->porcutil();\n }", "title": "" }, { "docid": "a6b50b96540823dc1068d0aaf0ca680f", "score": "0.48434305", "text": "public function zCard()\n {\n }", "title": "" }, { "docid": "d0c3057224056bd2145b5072a6c7271a", "score": "0.48432365", "text": "public function toolCardSplit()\n {\n ini_set('max_execution_time', 180); //3 minutes\n // grab all the info from cards\n\n $cards = Card::all();\n foreach ($cards as $card) {\n\n // Figure out the type for type id\n $color = $card->color;\n if ($color == 'red') {\n $type = 1;\n } else if ($color == 'blue') {\n $type = 2;\n } else if ($color == 'yellow') {\n $type = 3;\n } else {\n // There shouldnt be any here but just in case\n $type = 0;\n }\n\n\n // Make a new card stat\n $s = new Cardstat;\n $s->card_id = $card->id;\n $s->game_id = $card->game_id;\n $s->type_id = $type;\n $s->da = $card->da;\n $s->vo = $card->vo;\n $s->pf = $card->pf;\n $s->gr = 0;\n $s->da_max = $card->da_max;\n $s->vo_max = $card->vo_max;\n $s->pf_max = $card->pf_max;\n $s->gr_max = 0;\n $s->da_max5 = $card->da_max5;\n $s->vo_max5 = $card->vo_max5;\n $s->pf_max5 = $card->pf_max5;\n $s->gr_max5 = 0;\n $s->u_dorifes_id = $card->u_dorifes_id;\n $s->u_dorifes_j = '';\n $s->u_dorifes_e = '';\n $s->dorifes_id = $card->dorifes_id;\n $s->dorifes_j = '';\n $s->dorifes_e = '';\n $s->u_lesson_id = $card->u_lesson_id;\n $s->u_lesson_j = '';\n $s->u_lesson_e = '';\n $s->lesson_id = $card->lesson_id;\n $s->lesson_j = '';\n $s->lesson_e = '';\n $s->save();\n\n // Create an entry for music cards if the card is a basic card\n if ($card->game_id == 2) {\n $s = new Cardstat;\n $s->card_id = $card->id;\n $s->game_id = 3;\n $s->type_id = 0;\n $s->da = 0;\n $s->vo = 0;\n $s->pf = 0;\n $s->gr = 0;\n $s->da_max = 0;\n $s->vo_max = 0;\n $s->pf_max = 0;\n $s->gr_max = 0;\n $s->da_max5 = 0;\n $s->vo_max5 = 0;\n $s->pf_max5 = 0;\n $s->gr_max5 = 0;\n $s->u_dorifes_id = 0;\n $s->u_dorifes_j = '';\n $s->u_dorifes_e = '';\n $s->dorifes_id = 0;\n $s->dorifes_j = '';\n $s->dorifes_e = '';\n $s->u_lesson_id = 0;\n $s->u_lesson_j = '';\n $s->u_lesson_e = '';\n $s->lesson_id = 0;\n $s->lesson_j = '';\n $s->lesson_e = '';\n $s->save();\n }\n }\n }", "title": "" }, { "docid": "1416f73408a1e2418093cef54d370b6b", "score": "0.48347446", "text": "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}", "title": "" }, { "docid": "2d37372206cfd3a00e9804463059bf64", "score": "0.48344857", "text": "function determineGrantedAwards($geokretow_w_puli) {\n if ($geokretow_w_puli >= 1) {\n $odznaczenia_pliki['1'] = 'medal-1-1.png';\n }\n if ($geokretow_w_puli >= 10) {\n $odznaczenia_pliki['10'] = 'medal-1-2.png';\n }\n if ($geokretow_w_puli >= 20) {\n $odznaczenia_pliki['20'] = 'medal-1-3.png';\n }\n if ($geokretow_w_puli >= 50) {\n $odznaczenia_pliki['50'] = 'medal-1-4.png';\n }\n if ($geokretow_w_puli >= 100) {\n $odznaczenia_pliki['100'] = 'medal-bialy.png';\n }\n if ($geokretow_w_puli >= 120) {\n $odznaczenia_pliki['5! = 120'] = 'medal-120.png';\n }\n if ($geokretow_w_puli >= 200) {\n $odznaczenia_pliki['200'] = 'medal-brazowy.png';\n }\n if ($geokretow_w_puli >= 314) {\n $odznaczenia_pliki['100* Pi = 100 * 3.14 = 314'] = 'medal-pi.png';\n }\n if ($geokretow_w_puli >= 500) {\n $odznaczenia_pliki['500'] = 'medal-srebrny.png';\n }\n if ($geokretow_w_puli >= 512) {\n $odznaczenia_pliki['2^9 = 512'] = 'medal-512.png';\n }\n if ($geokretow_w_puli >= 720) {\n $odznaczenia_pliki['6! = 1*2*3*4*5*6 = 720'] = 'medal-720.png';\n }\n if ($geokretow_w_puli >= 800) {\n $odznaczenia_pliki['800'] = 'medal-zloty.png';\n }\n if ($geokretow_w_puli >= 1000) {\n $odznaczenia_pliki['1000'] = 'medal-1000.png';\n }\n if ($geokretow_w_puli >= 1024) {\n $odznaczenia_pliki['2^10 = 1024'] = 'medal-1024.png';\n }\n if ($geokretow_w_puli >= 2000) {\n $odznaczenia_pliki['2000'] = 'medal-2000.png';\n }\n if ($geokretow_w_puli >= 3000) {\n $odznaczenia_pliki['3000'] = 'medal-3000.png';\n }\n if ($geokretow_w_puli >= 5000) {\n $odznaczenia_pliki['5000'] = 'medal-5000.png';\n }\n if ($geokretow_w_puli >= 5040) {\n $odznaczenia_pliki['7! = 1*2*3*4*5*6*7 = 5040'] = 'medal-5040.png';\n }\n if ($geokretow_w_puli >= 10000) {\n $odznaczenia_pliki['10000'] = 'medal-10000.png';\n }\n\n return $odznaczenia_pliki;\n }", "title": "" }, { "docid": "eaa30337557e9a61df59cb7f38091f69", "score": "0.48332614", "text": "function getPermisstionList();", "title": "" }, { "docid": "6bb464f45d5a8828cc7f4bddd5604ae5", "score": "0.48215383", "text": "function cardShuffle($deck)\n {\n for ($i = 0; $i < count($deck); $i++) {\n for ($j = 0; $j < count($deck[$i]); $j++) {\n $r1 = rand(0, 3);\n $c1 = rand(0, 12);\n $r = rand(0, count($deck));\n $r2 = rand(0, 3);\n $r = rand(0, count($deck));\n $c2 = rand(0, 12);\n $r = rand(0, count($deck));\n $temp = $deck[$r1][$c1];\n $r = rand(0, count($deck));\n $deck[$r1][$c1] = $deck[$r2][$c2];\n $deck[$r2][$c2] = $temp;\n }\n }\n // print_r($deck);\n return $deck;\n }", "title": "" }, { "docid": "384746644fd1d98ca33d8759b38b8596", "score": "0.48203185", "text": "function doPageCollectorActions() {\n\t\t\t// add\n\t\tif ($this->piVars['prozess'] == 'add') {\n\t\t\t$this->currentPageCollectorValueArray[] = $this->piVars['pid'];\n\t\t\t\t// delete\n\t\t} elseif ($this->piVars['prozess'] == 'del') {\n\t\t\t$changedPageCollectorValueArray = array();\n\t\t\twhile (list($k, $v) = each($this->currentPageCollectorValueArray)) {\n\t\t\t\tif ($v != $this->piVars['pid']) {\n\t\t\t\t\t$changedPageCollectorValueArray[] = $v;\n\t\t\t\t} else {\n\t\t\t\t\t// no new value\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// rechange\n\t\t\t$this->currentPageCollectorValueArray = $changedPageCollectorValueArray;\n\t\t\t// move up\n\t\t} elseif ($this->piVars['prozess'] == 'up') {\n\t\t\t\t// get changings\n\t\t\t$keyCurrentMove = array_search($this->piVars['pid'], $this->currentPageCollectorValueArray);\n\t\t\t$valCurrentMove = $this->piVars['pid'];\n\t\t\t$keyContiguousMove = $keyCurrentMove -1;\n\t\t\t$valContiguousMove = $this->currentPageCollectorValueArray[$keyContiguousMove];\n\t\t\t\t// make changings now\n\t\t\t$this->currentPageCollectorValueArray[$keyContiguousMove] = $valCurrentMove;\n\t\t\t$this->currentPageCollectorValueArray[$keyCurrentMove] = $valContiguousMove;\n\t\t\t\t// move down\n\t\t} elseif ($this->piVars['prozess'] == 'down') {\n\t\t\t\t// get changings\n\t\t\t$keyCurrentMove = array_search($this->piVars['pid'], $this->currentPageCollectorValueArray);\n\t\t\t$valCurrentMove = $this->piVars['pid'];\n\t\t\t$keyContiguousMove = $keyCurrentMove +1;\n\t\t\t$valContiguousMove = $this->currentPageCollectorValueArray[$keyContiguousMove];\n\t\t\t\t// make changings now\n\t\t\t$this->currentPageCollectorValueArray[$keyContiguousMove] = $valCurrentMove;\n\t\t\t$this->currentPageCollectorValueArray[$keyCurrentMove] = $valContiguousMove;\n\t\t\t\t// add a holy list of pids (used via hmenu & TSscript by vikingeskibsmussets 'spor')\n\t\t} elseif ($this->piVars['prozess'] == 'addList') {\n\t\t\t$newPageCollectorValueArray = explode(',', $this->piVars['pid'], 1000);\n\t\t\twhile (list($k, $v) = each($newPageCollectorValueArray)) {\n\t\t\t\tif (!in_array($v, $this->currentPageCollectorValueArray)) {\n\t\t\t\t\tarray_push($this->currentPageCollectorValueArray, $v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// clearall action\n\t\t} elseif ($this->piVars['prozess'] == 'clearall') {\n\t\t\t$this->currentPageCollectorValueArray = array();\n\t\t\t// any other action\n\t\t} else {\n\t\t\t// any other action can be placed here\n\t\t}\n\t\t\t// any changings will result in dbUpdate for this session\n\t\t$this->updateUserSession();\n\t\treturn;\n\t}", "title": "" }, { "docid": "afe8cdfffe992d7d5c1e0e7104372073", "score": "0.47951308", "text": "function attack($p1, $p2)\n{\n for ($x = 0; $x <= 20; $x++) {\n\n if ($p1['title'] === \"hero\") {\n $p1['luc'] = rand(10, 30);\n $p2['luc'] = rand(25, 40);\n $heroIsLuckier = isLuckier($p1['luc'], $p2['luc']);\n if (getProb(10) === true) {\n echo \"\\n RAPID STRIKE hERE p1 hero..\";\n $p1['hp'] = (int)$p1['hp'] - (((int)$p2['str'] - (int)$p1['def']) * 2);\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else if (getProb(20) === true) {\n echo \"\\n MAGIC SHIELD hERE p1 hero..\";\n $p1['hp'] = (int)$p1['hp'] - (2 / ((int)$p2['str'] - (int)$p1['def']));\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else if ($heroIsLuckier === true) {\n\n echo \"\\n HERO LUCKIER HERE hERE p1 hero..\";\n $p1['hp'] = (int)$p1['hp'] - 0;\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else if ($heroIsLuckier === false) {\n echo \"\\n MAGE LUCKIER HERE hERE p2 mage..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - 0;\n } else {\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n }\n } else if ($p2['title'] === \"hero\") {\n $p2['luc'] = rand(10, 30);\n $p1['luc'] = rand(25, 40);\n $heroIsLuckier = isLuckier($p2['luc'], $p1['luc']);\n if (getProb(10) === true) {\n echo \"\\n RAPID STRIKE hERE p2 hero..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - (((int)$p1['str'] - (int)$p2['def']) * 2);\n } else if (getProb(20) === true) {\n echo \"\\n MAGIC SHIELD hERE p2 hero..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - (2 / ((int)$p1['str'] - (int)$p2['def']));\n } else if ($heroIsLuckier === true) {\n echo \"\\n HERO LUCKIER HERE hERE p2 hero..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - 0;\n } else if ($heroIsLuckier === false) {\n echo \"\\n MAGE LUCKIER HERE hERE p1 mage..\";\n $p1['hp'] = (int)$p1['hp'] - 0;\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else {\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n }\n }\n\n var_dump(\"\\n \" . $p2['title'] . \"'s heath:\" . intval($p2['hp']));\n var_dump(\"\\n\" . $p1['title'] . \"'s health:\" . intval($p1['hp']));\n if ($p2['hp'] <= 0) {\n echo \"\\n fight ended!\";\n var_dump($p2['hp']);\n echo \"\\niteration: $x\";\n die(\"\\n\" . $p2['title'] . \" died and\" . \" \" . $p1['title'] . \" won!\");\n } else if ($p1['hp'] <= 0) {\n echo \"\\n fight ended!\";\n var_dump($p1['hp']);\n echo \"\\niteration: $x\";\n die(\"\\n\" . $p1['title'] . \" died and\" . \" \" . $p2['title'] . \" won!\");\n }\n }\n}", "title": "" }, { "docid": "f45ea3a7cea860a25fc7fbde61554bd2", "score": "0.47905305", "text": "function shuffleCards($values)\n{\n// i used shuffle to randomize the order of the elements in my array\n shuffle($values);\n// i used the foreach loop so that it can loop through the values of my array, it will loop\n// through the array and each value\n foreach ($values as $value) {\n // The shuffle array variable is equal to the value\n $shuffleArray[] = $value;\n // i used array_slice so it can return a part of my array,\n $sliceFour = array_slice($shuffleArray, 0, 4);\n }\n// i used return so i could stop and get back the array\n return $sliceFour;\n}", "title": "" }, { "docid": "7e0ebd9f1aacc15b221e2599b35018df", "score": "0.47835618", "text": "function getCardioGoals()\n {\n return $this->cardioGoals;\n }", "title": "" }, { "docid": "d9084e497d1a8e83332c7aa87f7722bf", "score": "0.47802114", "text": "protected function shuffleCard()\n\t{\n\t\t$this->getCache('singleCardName');\n\t\t$cards = range(1, 54);\n\t\t$shuffleRound = range(1,10);\n\t\tfor($i=0;$i < shuffle($shuffleRound);$i++){\n\t\t\tshuffle($cards);\n\t\t}\n\n\t\t$chairId=$this->lastWinner?:1;\n\t\tfor ($i=0;$i < 54;$i++) {\n\t\t\t$this->cards[$chairId][]=$this->_singleCardName[$cards[$i]];\n\t\t\t$this->detailCards[$chairId]['single'][]=$this->_singleCardName[$cards[$i]];\n\t\t\tif($chairId==$this->chairAmount){\n\t\t\t\t$chairId = 1;\n\t\t\t}else{\n\t\t\t\t$chairId++;\n\t\t\t}\n\t\t}\n\n\t\tif($this->firstRound){\n\t\t\tforeach($this->cards as $k=>$v){\n\t\t\t\tif(in_array('3c',$v)){\n\t\t\t\t\t$this->have3c = $k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7137d137e8111432c75755d9dcf5ed0a", "score": "0.47695926", "text": "function roar()\r\n {\r\n }", "title": "" }, { "docid": "03ae7cbb0002af81c50bcf0a771346a4", "score": "0.47584644", "text": "protected function cards()\n\t{\n\t\t$user = auth()->user();\n\n\t\treturn [\n\t\t\t//new Help,\n\t\t\t(new MentorRequestCount)->canSee(function () use ($user) {\n\t\t\t\treturn $user->hasRole(RoleableInterface::ADMINISTRATOR);\n\t\t\t}),\n\t\t\t(new UsersPerRole)->canSee(function () use ($user) {\n\t\t\t\treturn $user->hasRole(RoleableInterface::ADMINISTRATOR);\n\t\t\t}),\n\t\t];\n\t}", "title": "" }, { "docid": "9b416a27a8350abac44e98656a58b5af", "score": "0.47562635", "text": "function getCard() {\n //$query = \"select number,card,seed,seat,s.player as player from pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number where s.player=\".$this->curr_player.\" and game=\".$this->curr_game.\" and d.idtable=\".$this->curr_table.\" and s.status=\".PLAYING.\" order by number\";\n $query = \"select number,card,seed,seat,player from pkr_dealer where player=\" . $this->curr_player . \" and game=\" . $this->curr_game . \" and idtable=\" . $this->curr_table . \" and player in (select player from pkr_seat where status=\" . PLAYING . \") order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "title": "" }, { "docid": "94026294fb5d15c8ae1fa6da424eeaaa", "score": "0.4754023", "text": "function generateRechargeCards($total, $length){\n\t\t// get the first number\n\t\t$card = genRandomNumber($length);\n\t\techo('1: ' . $card);\n\t\techo('<br/>');\n\n\t\tfor ($i = 2; $i <= $total; $i++) {\n\t\t\t$card += 7;\n\t\t\techo(\"$i: \" .$card);\n\t\t\techo '<br/>';\n\t\t}\n\t}", "title": "" }, { "docid": "968a837cf959bb571dcae62689bf40b5", "score": "0.47489887", "text": "function giveCards( $choice )\n {\n\t\t//convert choice into card\n\t\t$params = explode(\"_\", $choice);\n\t\t$card_id = $params[1];\n\t\t$card_pos = $params[2];\n\n // make sure noone else has submitted this card $type\n $count = self::getUniqueValueFromDB(\"select count(p.contribution) from card c JOIN player p\n ON p.contribution = c.card_type WHERE c.card_id='$card_id'\");\n if ($count > 0) {\n throw new BgaUserException( self::_(\"Sorry! Someone submitted this card type before you.\") );\n }\n \n\t\t\n\t\t// get object card\n\t\t$card = $this->cards->getCard( $card_id );\n $type = $card['type'];\n self::checkAction( \"giveCards\" );\n \n // !! Here we have to get CURRENT player (= player who send the request) and not\n // active player, cause we are in a multiple active player state and the \"active player\"\n // correspond to nothing.\n $current_player_id = self::getCurrentPlayerId();\n\n\n $players = self::loadPlayersBasicInfos();\t\n\t\t$active_player_id = self::getGameStateValue( 'playerBuildingSentence' );\n $current_player_name = $players[ $current_player_id ]['player_name'];\n\t\t$active_player_name = $players[ $active_player_id ]['player_name'];\n\t\t\n\t\t\n\t\t$card_ids[] = $card_id;\n \n //if( count( $card_ids ) != 1 )\n // throw new feException( self::_(\"You must give exactly 1 card\") );\n \n // Check if these cards are in player hands\n $cards[] = $card;\n \n if( count( $cards ) != 1 )\n throw new feException( self::_(\"This card doesn't exist\") );\n \n foreach( $cards as $card )\n {\n if( $card['location'] != 'hand' || $card['location_arg'] != $current_player_id )\n throw new feException( self::_(\"This card is not in your hand\") );\n }\n \n\n\t\t$this->cards->moveCard($card_id, 'current_sentence', $current_player_id);\t\t// add card to sentence\n\t\t\n\t\t// record the player's guess for helper scoring\n $sql = \"\n UPDATE player\n SET contribution = $type,\n guess = $card_pos\n WHERE player_id = $current_player_id\n \";\n self::DbQuery( $sql );\n $data = self::getNonEmptyObjectFromDB( 'SELECT verb, object from data where data_id = 1');\n $object = $data['object'];\n // handle (MY) cards\n if (preg_match('/^\\(MY\\)/', $object)) {\n $array = explode(\" \", $object);\n array_shift($array); // drop off (MY)\n $object = implode(\" \", $array);\n $article = clienttranslate('their');\n } else {\n $article = clienttranslate('the');\n }\n\t\n $message='ERROR with message';\n switch ($card['type']) {\n case 1:\n case 2:\n case 3:\n case 8:\n $message = '${player_name} guessed ${html}${color_displayed}${endHtml} ${active_player_name} ${verb} ${article} ${object}. ';\n break;\n case 5:\n case 6:\n $message = '${player_name} guessed ${html}${color_displayed}${endHtml} ${object} ${active_player_name} ${verb}. ';\n break;\n }\n \n \n // And notify\n self::notifyAllPlayers( \n\t\t\t'addCardToSentence', \n\t\t\tclienttranslate($message), \n\t\t\tarray(\n\t\t\t\t'i18n' => array( 'color_displayed', 'value_displayed' ),\n\t\t\t\t'card_id' => $card['id'],\n 'card' => $this->populateCard($card),\n\t\t\t\t'player_id' => $current_player_id,\n\t\t\t\t'player_name' => $current_player_name,\n\t\t\t\t'active_player_name' => $active_player_name,\n\t\t\t\t'color' => $card['type'],\n\t\t\t\t'color_displayed' => $this->colors[ $card['type'] ]['name'],\n 'verb' => $data['verb'],\n 'article' => $article,\n 'object' => $object,\n 'html' => \"<span class='role_icon_\".$card['type'].\"'><strong>\",\n 'endHtml' => \"</strong></span>\"\n\t\t\t) \n\t\t);\n\n\n // Notify the player so we can make these cards disapear\n self::notifyPlayer( $current_player_id, \"cardGiven\", \"\", array(\n \"card\" => $card\n ) );\n\n // Make this player unactive now\n // (and tell the machine state to use transtion \"giveCards\" if all players are now unactive\n $this->gamestate->setPlayerNonMultiactive( $current_player_id, \"giveCards\" );\n }", "title": "" }, { "docid": "f8cf53894483fa32fa204c51b3650835", "score": "0.47487012", "text": "function randAward($aid){\n\t$actList = $GLOBALS['db']->getAll ( \"SELECT title,lid,randnum,awardname,num FROM \".$GLOBALS['aos']->table('wx_prize').\" where aid=$aid and isopen=1 and num>num2 order by num desc\" );\n\tif($actList){\n\t\tforeach($actList as $v){\n\t\t\tif(intval(rand(1,10000)) <= $v['randnum']*100){\n\t\t\t\t$v['code'] = uniqid();\n\t\t\t\t$GLOBALS['db']->query(\"update \" . $GLOBALS['aos']->table('wx_prize') . \" set num2=num2+1 where lid={$v['lid']}\");\n\t\t\t\treturn $v;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "6c09e23fde51b38c2d222baf29b967ed", "score": "0.47412404", "text": "public function create($qtd) : array\n {\n $checks = [];\n $array = [];\n $sorteio = 1;\n if(self::LIMITE >= $qtd){\n while($this->cartela <= $qtd){\n for($i = 1; $i <= self::MARCADOR; $i++){\n $sorteio = $this->random(); \n if(!in_array($sorteio, $checks)){\n $checks[] = $sorteio; \n $array[$this->cartela][] = $sorteio; \n if(count($checks) == self::MARCADOR )\n $checks = [];\n }\n else{\n $sorteio = $this->inArrayNumber($sorteio, $checks);\n $checks[] = $sorteio; \n $array[$this->cartela][] = $sorteio; \n if(count($checks) == self::MARCADOR )\n $checks = [];\n } \n } \n $this->cartela++; \n }\n } \n return $array; \n }", "title": "" }, { "docid": "5e4151abdb6dcac44f33127e729c8b35", "score": "0.4740878", "text": "function getCardioProgresses()\n {\n return $this->cardioProgresses;\n }", "title": "" }, { "docid": "b7030e883a3a3ce9019720b8c9cdb1ea", "score": "0.47365975", "text": "public function roam() {\n echo $this->getNameSpecies().' is roaming';\n \n }", "title": "" }, { "docid": "1795362eea137aa10f90db9c39a453a1", "score": "0.47351933", "text": "public function getCreditCards() {\n return $this->creditcards;\n }", "title": "" }, { "docid": "8aa1459913affcf3311b81855fceceda", "score": "0.47329614", "text": "public function cards (): Vault;", "title": "" }, { "docid": "20f680d10ca2ae6193bcf417ffabaf13", "score": "0.47301275", "text": "protected function getFingerprintOfOrder() {}", "title": "" }, { "docid": "126e0d03745074ba886e63ea25da00d3", "score": "0.47267088", "text": "function consulta_CapacitacionPermanente()\n\t\t{\n\t\t\t$this->sql=\"select * from capacitacion\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}", "title": "" }, { "docid": "19aed454c400be4f589dd23a92b3c6a4", "score": "0.4726021", "text": "function shufflecards32(){\n\t$cards = 1;\n\tdo {\n\t\t$number = rand(1,32);\n\t\tif ($number == 1 AND $a[$number] != 1)\t\t{$deck[$cards]= \"1-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 2 AND $a[$number] != 1)\t{$deck[$cards]= \"2-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 3 AND $a[$number] != 1)\t{$deck[$cards]= \"3-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 4 AND $a[$number] != 1)\t{$deck[$cards]= \"4-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 5 AND $a[$number] != 1)\t{$deck[$cards]= \"1-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 6 AND $a[$number] != 1)\t{$deck[$cards]= \"2-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 7 AND $a[$number] != 1)\t{$deck[$cards]= \"3-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 8 AND $a[$number] != 1)\t{$deck[$cards]= \"4-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 9 AND $a[$number] != 1)\t{$deck[$cards]= \"1-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 10 AND $a[$number] != 1)\t{$deck[$cards]= \"2-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 11 AND $a[$number] != 1)\t{$deck[$cards]= \"3-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 12 AND $a[$number] != 1)\t{$deck[$cards]= \"4-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 13 AND $a[$number] != 1)\t{$deck[$cards]= \"1-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 14 AND $a[$number] != 1)\t{$deck[$cards]= \"2-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 15 AND $a[$number] != 1)\t{$deck[$cards]= \"3-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 16 AND $a[$number] != 1)\t{$deck[$cards]= \"4-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 17 AND $a[$number] != 1)\t{$deck[$cards]= \"1-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 18 AND $a[$number] != 1)\t{$deck[$cards]= \"2-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 19 AND $a[$number] != 1)\t{$deck[$cards]= \"3-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 20 AND $a[$number] != 1)\t{$deck[$cards]= \"4-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 21 AND $a[$number] != 1)\t{$deck[$cards]= \"1-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 22 AND $a[$number] != 1)\t{$deck[$cards]= \"2-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 23 AND $a[$number] != 1)\t{$deck[$cards]= \"3-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 24 AND $a[$number] != 1)\t{$deck[$cards]= \"4-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 25 AND $a[$number] != 1)\t{$deck[$cards]= \"1-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 26 AND $a[$number] != 1)\t{$deck[$cards]= \"2-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 27 AND $a[$number] != 1)\t{$deck[$cards]= \"3-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 28 AND $a[$number] != 1)\t{$deck[$cards]= \"4-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 29 AND $a[$number] != 1)\t{$deck[$cards]= \"1-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 30 AND $a[$number] != 1)\t{$deck[$cards]= \"2-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 31 AND $a[$number] != 1)\t{$deck[$cards]= \"3-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 32 AND $a[$number] != 1)\t{$deck[$cards]= \"4-14\" ;$cards++; $a[$number] = 1;}\n\t} while ($cards <= 32);\n\t\n\treturn $deck;\n}", "title": "" }, { "docid": "cfb3673ea6800a134ce3fdb6fc91b658", "score": "0.4724078", "text": "public function getCards(): array\n {\n return $this->cards;\n }", "title": "" }, { "docid": "8f4d1e82967781113cf2b898a46aa095", "score": "0.47220796", "text": "public function get_chambres(){ return $this->_chambres;}", "title": "" }, { "docid": "6508b3339114f2fd284a8222100c5215", "score": "0.47203156", "text": "function buscasprvmgas(){\n\t\t$tipo = $this->input->post('cargo');\n\t\t$cta = $this->input->post('acelem');\n\n\t\tif ( $cta == 'ctade')\n\t\t\t$tipo = substr($tipo,0,1);\n\t\telse\n\t\t\t$tipo = substr($tipo,2,1);\n\n\t\tif ( $tipo == 'P')\n\t\t\t$this->buscasprv();\n\t\telse\n\t\t\t$this->buscamgas();\n\t}", "title": "" }, { "docid": "6a52500cd5f8cb728fe716442c85f0ab", "score": "0.4719765", "text": "public function getCard()\n {\n $arr=array();\n foreach ( $this->_prop as $value ){\n $arr[$value] = $this->$value;\n }\n return $arr;\n }", "title": "" }, { "docid": "9a014fe7358e8bdbaacc35002df1c522", "score": "0.47177142", "text": "function getComplinePsalm(){\n return 4;\n}", "title": "" }, { "docid": "97e7086d3e7083591909f1a8cb1065fd", "score": "0.47165954", "text": "function snax_the_card() {\n\tsnax()->cards_query->the_post();\n}", "title": "" }, { "docid": "62b4b6d609b85281924e7536654b1f79", "score": "0.46873227", "text": "public function getSpecialTreasureRewards()\n {\n $arr_gift = array(); \n $conf_treasure = Common::getConfig('SpecialTreasure');\n \n $oUser = User::getById(Controller::$uId); \n \n $rand_Id = $this->newRandom($conf_treasure);\n $gifId = $this->newRandom($conf_treasure[$rand_Id]['Rewards']);\n $gift = $conf_treasure[$rand_Id]['Rewards'][$gifId] ; \n if(empty($gift))\n return $arr_gift ;\n \n if(SoldierEquipment::checkExist($gift['ItemType']))\n {\n $AutoId = $oUser->getAutoId(); \n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'] = $oEquipment ;\n $arr_gift['SpecialGift'] = $oEquipment ; \n }\n else\n { \n unset($gift['Rate']);\n $arr_gift['NormalGift'] = $gift ;\n \n }\n return $arr_gift ;\n \n }", "title": "" }, { "docid": "e3582deb55d6d514acac26cb9493632a", "score": "0.46825", "text": "function generateRareBlock($rares, $mythic){\n\tif (rand(1, 8) == 8){\n\t\treturn takeCards(1, $mythic);\n\t} else {\n\t\treturn takeCards(1, $rares);\n\t}\n}", "title": "" }, { "docid": "ede31127c221546cbe80240c6c04123d", "score": "0.46788722", "text": "public function getPieces()\n {\n }", "title": "" }, { "docid": "cf2083a1c7efd8cd6d30255e1dfede1c", "score": "0.46767625", "text": "function prepOutput($numDoors){\n global $globalNumRooms;\n\t global $array;\n\t global $gid;\n\t $id = 2;\n\t $subId = 1;\n $exits = 0;\n for( $i = 0; $i < $numDoors; $i++ ){\n //echo \"here\\n\";\n\n $globalNumRooms++;\n //echo $globalNumRooms . \"\\n\";\n if($globalNumRooms<=10){\n $exits = getChamberExits();\n array_push($array, array(\n \"id\" => $id,\n \"roomType\" => \"chamber\",\n \"passage\" => getPassage(),\n\t\t\t\"data\" => getChamber(),\n\t\t\t\"gid\" => $gid,\n \"chamberExits\" => $exits,\n ));\n\n\t }\n\t\twhile($exits > 0){\n array_push($array, array(\n \"id\" => $id . \".\" . $subId,\n \"roomType\" => \"chamber\",\n \"passage\" => getPassage(),\n\t\t\t\"data\" => getChamber(),\n\t\t\t\"gid\" => $gid,\n ));\n\t\t $subId++;\n\t\t $exits--;\n\t\t \t\n\t\t}\n\t\t$subId = 1;\n\t\t$id++;\n }\n return $array;\n }", "title": "" }, { "docid": "c9a9e09c6a796f40994b6e22d85fd6c0", "score": "0.4675262", "text": "public function haspermission($rota){\n\t\t\n\n\t}", "title": "" }, { "docid": "991fe27c369615da18297bdabb87cb6d", "score": "0.46747848", "text": "public function getBoardCards(){\n\t\treturn $this->boardCards;\n\t}", "title": "" }, { "docid": "482fc746cd70727f6f023234eccd3af3", "score": "0.46710575", "text": "function getBoardCards() {\n $query = \"select * from pkr_dealer where idtable=\" . $this->curr_table . \" and game=\" . $this->curr_game . \" and seat=\" . BOARD . \" order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "title": "" }, { "docid": "fda88f7ea8001247f6db7ffe6c78afdd", "score": "0.46707994", "text": "function getTotal($hand)\n{\n $total = 0;\n $hold = []; \n foreach ($hand as $card)\n {\n \n $hold[] = explode('-', $card);\n \n }\n foreach ($hold as $card){\n \t\n switch($card[0]) {\n \t \tcase 'A':\n \t \t\tbreak;\n \t \tcase 'K':\n \t \tcase 'Q':\n \t \tcase 'J':\n $total +=10;\n break;\n default:\n \t \t\t$total += (int)$card[0];\n \t \t\tbreak;\n \t }\n\n }\n foreach ($hold as $card){\n\n \tif($card[0] == 'A') {\n \t\tif(($total + 11) <=\t 21) {\n \t\t\t$total += 11;\n \t\t} else {\n \t\t\t$total += 1;\n \t\t}\n\n \t}\n }\n\n\n return $total;\n}", "title": "" }, { "docid": "c1ed2b1b5e35b4efd458e7fc382a6b0c", "score": "0.46536115", "text": "function get_player_award($pid){\n\tglobal $wpdb;\n\t$getaward = $wpdb->get_results(\"select * from wp_awards WHERE pid = '$pid'\", ARRAY_N);\n\t\n\tforeach ($getaward as $key => $revisequery){\n\t\t$awardinfo[] = array(\n\t\t\t'awardid' => $revisequery[0], \n\t\t\t'award' => $revisequery[1], \n\t\t\t'year' => $revisequery[2], \n\t\t\t'first' => $revisequery[3], \n\t\t\t'last' => $revisequery[4],\n\t\t\t'team' => $revisequery[5],\n\t\t\t'position' => $revisequery[6],\n\t\t\t'owner' => $revisequery[7],\n\t\t\t'pid' => $revisequery[8],\n\t\t\t'gamepoints' => $revisequery[9]\n\t\t);\n\t}\n\t\n\treturn $awardinfo;\n}", "title": "" }, { "docid": "a81f8edf07994386dcbce28689cd0db5", "score": "0.4649996", "text": "public function get_hand($player_id = null) {\r\n\t\tif ($player_id === null) $player_id = $this->session->userdata('user_id');\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$hand = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif (isset($card['place']['value']) && \r\n\t\t\t\t$card['place']['value'] == 'hand' &&\r\n\t\t\t\t$card['place']['id'] == $player_id) {\r\n\t\t\t\tarray_push($hand, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hand;\r\n\t}", "title": "" }, { "docid": "2269c67847601ba46d8920eaecb22397", "score": "0.46480885", "text": "function make_deck()\n{\n $deck = [];\n for($rank = 0; $rank < RANK_COUNT; $rank++){\n for($suit = 0; $suit < SUIT_COUNT; $suit++){\n $deck[] = [$rank, $suit];\n }\n }\n shuffle($deck);\n return($deck);\n}", "title": "" }, { "docid": "aa2119ff117bcc4994cee93a49d6da51", "score": "0.4642982", "text": "public function tarjetaPrimaria()\n {\n return $this->hasOne('App\\CardPerson', 'id', 'card_people1');\n }", "title": "" }, { "docid": "a6c7596a731c0edfeb382f56663d61f5", "score": "0.46410817", "text": "public function getCards()\n {\n return $this->_cards;\n }", "title": "" }, { "docid": "a6c7596a731c0edfeb382f56663d61f5", "score": "0.46410817", "text": "public function getCards()\n {\n return $this->_cards;\n }", "title": "" }, { "docid": "dd03c3879927c1d3edfeee072246134d", "score": "0.46377414", "text": "function GetPeticionesAbiertas()\r\n{\r\n$maquinas = array();\r\n//recibimos las peticiones pendientes de finalizar\r\n$peticiones = GetPeticionesPendientes();\r\n\tforeach($peticiones as $v_peticion)\r\n\t{\r\n\t //comprobamos que realmente esta abierta realizando un peticion a la api\r\n\t if( comprobarPeticion($v_peticion[0]) != \"terminated\" and comprobarPeticion($v_peticion[0]) != \"shutting-down\" ){\r\n\t $maquinas[] = $v_peticion[0];\r\n\t }\r\n\t}\r\n return $maquinas;\r\n}", "title": "" }, { "docid": "80a61c2e18e943d18ca99331e5e4da7d", "score": "0.46367055", "text": "private function calcBuffPheromone() {\n $t = $this->iter; //aktualna iteracja\n $allFoundedPoints = $this->antsVisitedPoints[$this->antNumber][$t]; //punkty przez ktore przeszla mrowka\n $i = array_shift($allFoundedPoints);\n\n while(!empty($allFoundPoints)){ // oblicz dawke feromonow pozostawioną przez mrowke\n $j = array_shift($allFoundPoints);\n $this->bufPheromone[$i][$j][$this->antNumber] = ($this->q3)/($this->graph[$i][$j]);\n $i = $j;\n }\n }", "title": "" }, { "docid": "1881c4cdf1835ab6673db3bf6343b876", "score": "0.4635588", "text": "public function get_list_card(){\n\t\t$cards = $this->db->get(db_prefix().'loy_card')->result_array();\n\t\treturn $cards;\n\t}", "title": "" }, { "docid": "1385489a6f612d744af167a2f145ebb2", "score": "0.4628046", "text": "function Chores(){\n $out = getChores();\n $out .= \"<br /><br />\";\n //$out .= getChoresDesc();\n //$out .= \"<br /><br />\";\n $out .= pickChoreList(1);\n return $out;\n\t\n}", "title": "" }, { "docid": "77552a561cd361af8f330a232307988f", "score": "0.46266922", "text": "function showcards($hand) {\n\tfor ($i=0; $hand[$i]; $i++) {\n\t\t\t$cards .= '<img src=\"cards/'.$hand[$i].'.gif\" alt=\"card\">';\n\t}\n\t\n\treturn $cards;\n}", "title": "" }, { "docid": "1cc82584e6403e4670dd8b7960cb0131", "score": "0.46264967", "text": "function playerDist($deck)\n {\n $playerQue = new queue();\n for ($i = 1; $i < 5; $i++) {\n echo \"Enter player $i name \";\n $player = new Player(Utility::String_input());\n for ($j = 0; $j < 9; $j++) {\n $r = rand(0, 3);\n $c = rand(0, count($deck[$r]) - 1);\n $player->pushCard($deck[$r][$c]);\n array_splice($deck[$r], $c, 1);\n }\n $playerQue->enqueue($player);\n }\n return $playerQue;\n }", "title": "" }, { "docid": "ab4f7c7b52e2ae46c55e3b46ebbb6524", "score": "0.46256393", "text": "function list_pembicara(){\r\n }", "title": "" }, { "docid": "5880b687e5ffd619c884be696be7794d", "score": "0.4624098", "text": "function isFullHouse()\n\t{\n\t\t$result[\"bool\"] = false;\n\t\t$result[\"ptg\"] = array();\n\t\t$result[\"type\"] = array();\n\t\t\n\t\t$myTrisCard = 0; \n\t\t\t\t\n\t\t$c_cards = count($this->cards);\n\t\tfor ($x = 0; $x < $c_cards; $x++)\n\t\t{\n\t\t\tfor ($y = ($x+1); $y < $c_cards; $y++)\n\t\t\t{\n\t\t\t\tfor ($t = ($y+1); $t < $c_cards; $t++)\n\t\t\t\t{\n\t\t\t\t\t$arr_temp_x = $this->cards[$x];\n\t\t\t\t\t$arr_temp_y = $this->cards[$y];\n\t\t\t\t\t$arr_temp_t = $this->cards[$t];\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (\n\t\t\t\t\t\t(key($arr_temp_x)==key($arr_temp_y)) && \n\t\t\t\t\t\t(key($arr_temp_x)==key($arr_temp_t))\n\t\t\t\t\t\t) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result[\"ptg\"][0][key($arr_temp_x)] = $this->cards[$x][key($arr_temp_x)];\n\t\t\t\t\t\t$result[\"ptg\"][1][key($arr_temp_y)] = $this->cards[$y][key($arr_temp_y)];\n\t\t\t\t\t\t$result[\"ptg\"][2][key($arr_temp_t)] = $this->cards[$t][key($arr_temp_t)];\n\t\t\t\t\t\t$myTrisCard = key($arr_temp_x);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tunset($arr_temp_x);\n\t\tunset($arr_temp_y);\n\t\tunset($arr_temp_t);\n\t\t\t\n\t\t\n\t\tif ($myTrisCard != 0) \n\t\t{\n\t\t\tfor($x = 0; $x < $c_cards; $x++)\n\t\t\t{\n\t\t\t\tfor ($y = ($x+1); $y < $c_cards; $y++)\n\t\t\t\t{\n\t\t\t\t\t$arr_temp_x = $this->cards[$x];\n\t\t\t\t\t$arr_temp_y = $this->cards[$y];\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (\n\t\t\t\t\t\t(key($arr_temp_x)==key($arr_temp_y)) && \n\t\t\t\t\t\t(key($arr_temp_x) != $myTrisCard) \n\t\t\t\t\t\t) \n\t\t\t\t\t{\n\t\t\t\t\t\t$result[\"ptg\"][3][key($arr_temp_x)] = $this->cards[$x][key($arr_temp_x)];\n\t\t\t\t\t\t$result[\"ptg\"][4][key($arr_temp_y)] = $this->cards[$y][key($arr_temp_y)];\n\t\t\t\t\t\t$result[\"type\"] = PKR_FULLHOUSE;\n\t\t\t\t\t\t$result[\"bool\"] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\t\n\t\tunset($arr_temp_x);\n\t\tunset($arr_temp_y);\t\t\n\t\t\n\t\treturn $result; \t\n\t}", "title": "" }, { "docid": "7755e152d6bb2a7c6d281f0af462a0b0", "score": "0.46230718", "text": "function getCardioGoals()\n {\n //make array of all cardio goals and index to iterate through\n $cardioGoals = [];\n $index = 0;\n\n //query database to get all cardio distance goals\n $cardioSQL = \"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_DISTANCE FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-DISTANCE' AND FITNESS_GOAL_ACTIVE='1'\";\n $cardioQuery = $this->comMod->queryDatabase($cardioSQL);\n\n //add distance goals to array\n while($currGoal = mysqli_fetch_array($cardioQuery))\n {\n //get goal details from database\n $days = $currGoal['FITNESS_GOAL_DURATION'];\n $type = $currGoal['FITNESS_GOAL_TYPE'];\n $milestone = $currGoal['FITNESS_GOAL_DISTANCE'];\n $id = $currGoal['FITNESS_GOAL_ID'];\n\n //create new goal object and add to array\n $goal = new CardioGoal($days, $type, $milestone, $id);\n $cardioGoals[$index] = $goal;\n\n //increase array index\n $index++;\n }//close while\n\n //query database to get all cardio speed goals\n $speedSQL = \"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_SPEED FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-SPEED' AND FITNESS_GOAL_ACTIVE='1'\";\n $speedQuery = $this->comMod->queryDatabase($speedSQL);\n\n //add speed goals to array\n while($currGoal = mysqli_fetch_array($speedQuery))\n {\n //get goal details from database\n $days = $currGoal['FITNESS_GOAL_DURATION'];\n $type = $currGoal['FITNESS_GOAL_TYPE'];\n $milestone = $currGoal['FITNESS_GOAL_SPEED'];\n $id = $currGoal['FITNESS_GOAL_ID'];\n\n //create new goal object and add to array\n $goal = new CardioGoal($days, $type, $milestone, $id);\n $cardioGoals[$index] = $goal;\n\n //increase array index\n $index++;\n }//close while\n\n //query database to get all cardio time goals\n $timeSQL = \"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_TIME FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-TIME' AND FITNESS_GOAL_ACTIVE='1'\";\n $timeQuery = $this->comMod->queryDatabase($timeSQL);\n\n //add time goals to array\n while($currGoal = mysqli_fetch_array($timeQuery))\n {\n //get goal details from database\n $days = $currGoal['FITNESS_GOAL_DURATION'];\n $type = $currGoal['FITNESS_GOAL_TYPE'];\n $milestone = $currGoal['FITNESS_GOAL_TIME'];\n $id = $currGoal['FITNESS_GOAL_ID'];\n\n //create new goal object and add to array\n $goal = new CardioGoal($days, $type, $milestone, $id);\n $cardioGoals[$index] = $goal;\n\n //increase array index\n $index++;\n }//close while\n\n //return array of all three cardio goal types\n return $cardioGoals;\n }", "title": "" }, { "docid": "3bbb3c310aaa55d29de1c9c0fe63d871", "score": "0.46204194", "text": "public function getCards()\n {\n return $this->cards;\n }", "title": "" }, { "docid": "3bbb3c310aaa55d29de1c9c0fe63d871", "score": "0.46204194", "text": "public function getCards()\n {\n return $this->cards;\n }", "title": "" }, { "docid": "3bbb3c310aaa55d29de1c9c0fe63d871", "score": "0.46204194", "text": "public function getCards()\n {\n return $this->cards;\n }", "title": "" }, { "docid": "04d035bd61f2e161b1ce4e98bd8942b1", "score": "0.46150744", "text": "public function includes_toprank_herokills() \n\t{\n\t\tglobal $home_module; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \" \t<div id=\\\"Ranking_HeroKills\\\" class=\\\"currentRanking\\\">\r\n \t\".(count($home_module['rankings']['heroKills']) > 0 ? \"\".($this->settings['HOME']['TOP_RANK']['HERO_KILLS'][2] == true ? \"<ul class=\\\"topRanks\\\">\r\n \t\".$this->loop__includes_toprank_herokills__0x04().\"\r\n \t\t</ul>\" : \"<ul class=\\\"ranks-classic\\\">\r\n <li>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['Position']}</span>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['Name']}</span>\r\n <span>{$this->lang->words['Home']['TopRank']['Words']['HeroKills']}</span>\r\n </li>\r\n \".$this->loop__includes_toprank_herokills__0x05().\"\r\n </ul>\").\"\" : NULL).\"\r\n \t\t</div>\";\n\t\treturn $CTM_HTML;\n\t}", "title": "" }, { "docid": "5bbe3e17996f13bb3cbd997b1eead792", "score": "0.46130693", "text": "function get_allp(){\n\t \n\t\t $this->db->order_by('p_name asc, cnum asc');\n\t\t $query = $this->db->get('patients'); \n return $query->result(); \n\t }", "title": "" }, { "docid": "bbd1321755f197b4d43431a49abd6b48", "score": "0.46096805", "text": "public function play() {\n\t\t// Jogo os Tokens Primeiro !\n\t\t$quantidade_cartas = count ( $this->hand );\n\t\tif ($quantidade_cartas == 0)\n\t\t\treturn;\n\t\tforeach ( $this->hand as $indice => $carta ) {\n\t\t\tif ($carta ['type'] == TOKEN) {\n\t\t\t\t$this->board [] = $this->hand [$indice];\n\t\t\t\tunset ( $this->hand [$indice] );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->board [] = array_shift ( $this->hand );\n\t\treturn;\n\t}", "title": "" }, { "docid": "21d85b1c4670d969a4e92de83dab4794", "score": "0.4607595", "text": "protected function buildRoute() {\n\t\t$count = $this->holder->getCount();\n $result = [];\n\n\t\tif ($count) {\n\t\t\tfor ($item = 0; $item < $count; $item++) {\n\t\t\t\t$card = $this->holder->getCard($item);\n\n\t\t\t\t$result[] = $card;\n\t\t\t\t$tmp_card = $card;\n\n\t\t\t\tfor ($index = 1; $index < $count; $index++) {\n\t\t\t\t $destination = $tmp_card->getDestination();\n\n\t\t\t\t\tif ($next_card = $this->holder->getCardByOrigin($destination)) {\n\t\t\t\t\t\t$result[] = $next_card;\n\t\t\t\t\t\t$tmp_card = $next_card;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (count($result) == $count) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $result = [];\n }\n\t\t\t}\n\t\t}\n\n $this->route = $result;\n\t}", "title": "" } ]
66e76a62a6e4b2253ab75f18f904745f
Operation deletePackageTypeWithHttpInfo Delete an packagetype
[ { "docid": "4b9e6238e6180e8b2725ccff0246b259", "score": "0.65124476", "text": "public function deletePackageTypeWithHttpInfo($package_type_id)\n {\n // verify the required parameter 'package_type_id' is set\n if ($package_type_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $package_type_id when calling deletePackageType');\n }\n // parse inputs\n $resourcePath = \"/package-type/{packageTypeId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // path params\n if ($package_type_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"packageTypeId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($package_type_id),\n $resourcePath\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type/{packageTypeId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" } ]
[ { "docid": "5f17a7cce1965dab5df1bb09fcf32b93", "score": "0.5600216", "text": "public function deleteWithHttpInfo($request)\n {\n $request = $this->deleteRequest($request);\n \n $response = $this->callClient($request);\n return [null, $response->getStatusCode(), $response->getHeaders()];\n }", "title": "" }, { "docid": "0e60a26115824b2022408cb7102193e7", "score": "0.5524437", "text": "function deleteType($dType){\n $result = $this->dma->managementApiCall('DELETE', \"{$this->hashid}/types/{$dType}\");\n return $result['statusCode'] == 204;\n }", "title": "" }, { "docid": "1dac7f22ffd3c9b61b0ee22decf8e240", "score": "0.5494976", "text": "function og_micro_type_delete($info) {\n variable_del('og_group_type_' . $info->machine_name);\n variable_del('og_group_content_type_' . $info->machine_name);\n}", "title": "" }, { "docid": "24bb90f034edcee5d9f9f6970e86a5ed", "score": "0.5456284", "text": "public function deletePaymentType(Request $request)\n {\n // VALIDATE Payment type id\n $payment_type_id_validator = Validator::make($request->all(), [\n 'payment_type_id' => ['required','integer','exists:App\\Models\\Student\\Payment\\Type,id'],\n ]);\n\n // CHECK VALIDATOR FAILS\n if($payment_type_id_validator->fails()):\n return response()->json(['status'=>'error', 'errors'=>$payment_type_id_validator->errors()]);\n else:\n Type::destroy($request->payment_type_id);\n return response()->json(['status'=>'success']);\n endif;\n return response()->json(['status'=>'error', 'data'=>$request->all()]);\n }", "title": "" }, { "docid": "39242301e83513243964f5f857023d26", "score": "0.5403116", "text": "function deleteType()\n {\n global $objDatabase, $_ARRAYLANG;\n\n if (isset($_GET['typeId'])) {\n $typeId=intval($_GET['typeId']);\n $objResult = $objDatabase->Execute(\"SELECT id FROM \".DBPREFIX.\"module_news WHERE typeid=\".$typeId);\n\n if ($objResult !== false) {\n if (!$objResult->EOF) {\n $this->strErrMessage = $_ARRAYLANG['TXT_TYPE_NOT_DELETED_BECAUSE_IN_USE'];\n }\n else {\n if ($objDatabase->Execute(\n \"DELETE tblC, tblL\n FROM \".DBPREFIX.\"module_news_types AS tblC\n INNER JOIN \".DBPREFIX.\"module_news_types_locale AS tblL ON tblL.type_id=tblC.typeid\n WHERE tblC.typeid=\".$typeId\n ) !== false\n ) {\n $this->strOkMessage = $_ARRAYLANG['TXT_DATA_RECORD_DELETED_SUCCESSFUL'];\n } else {\n $this->strErrMessage = $_ARRAYLANG['TXT_DATABASE_QUERY_ERROR'];\n }\n }\n }\n }\n }", "title": "" }, { "docid": "eb82fc067566fc2ad6fc16119bf7844f", "score": "0.5182083", "text": "abstract public function deleteContentTypeFromIndex($type_name);", "title": "" }, { "docid": "7b90c8fdd92dd1088c42f88f888b712a", "score": "0.50645626", "text": "public function deleteCommonBandwidthPackageWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bandwidthPackageId)) {\n $query['BandwidthPackageId'] = $request->bandwidthPackageId;\n }\n if (!Utils::isUnset($request->force)) {\n $query['Force'] = $request->force;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteCommonBandwidthPackage',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteCommonBandwidthPackageResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "04d6f6cc8ac5a317b37befd80acdd583", "score": "0.5061891", "text": "public function deleteById($packageId);", "title": "" }, { "docid": "d71e4452ec7a5a5b2bd196b49502a4e1", "score": "0.5008056", "text": "public function deleteCharterStatusTypeByIdWithHttpInfo($id, $if_match = null)\n {\n \n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling deleteCharterStatusTypeById');\n }\n \n // parse inputs\n $resourcePath = \"/charterStatusTypes/{id}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n // header params\n \n if ($if_match !== null) {\n $headerParams['If-Match'] = $this->apiClient->getSerializer()->toHeaderValue($if_match);\n }\n // path params\n \n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 500:\n $data = \\Swagger\\Client\\ObjectSerializer::deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\WebServiceError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "title": "" }, { "docid": "a99a70a898f240f8d0856572d1318000", "score": "0.49986213", "text": "public function typesRemove()\n {\n $session = FR_Session::singleton();\n $id_type = null;\n\n // Support POST & GET\n if(filter_input(INPUT_POST, 'type_id') != ''){\n $id_type = filter_input(INPUT_POST, 'type_id');\n }\n else{\n $id_type = filter_input(INPUT_GET, 'type_id');\n }\n\n if($id_type != null){\n require_once 'models/TypesModel.php';\n $model = new TypesModel();\n\n $status = 9; // 9 removed status\n\n // remove\n $result = $model->updateStatusType($id_type, $session->id_tenant, $status);\n\n if($result != null){\n $error = $result->errorInfo();\n $numr = $result->rowCount();\n\n if($error[0] == 00000 && $numr > 0){\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=1'\");\n }\n else{\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=10&message='No se lograron aplicar cambios: \".$error[2].\"'\");\n }\n }\n else{\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=10&message='Error: no se ha podido eliminar!\");\n }\n }\n else{\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=10&message='Error: esta materia ya no existe!\");\n }\n }", "title": "" }, { "docid": "09af0bfb980cf45472af8c61ba6ca7f7", "score": "0.49855638", "text": "public function destroy(Type $type)\n {\n // remove TYPE\n $type->delete();\n return response(Type::all()->jsonSerialize(), Response::HTTP_OK);\n }", "title": "" }, { "docid": "757d6ad9ffd8bf0b6dfd9251101636e5", "score": "0.4943237", "text": "public function delEntityWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/{uuid}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/{uuid}'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "ce1abab548a2ccbc0f8f6df7bbe26292", "score": "0.49417755", "text": "public function setPackageTypeWithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/package-type/set\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type/set'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "3555b05ed731f5342f51c74c80131dbe", "score": "0.4938556", "text": "public function deleteExamType(Request $request)\n {\n //Validate exam type id\n $exam_type_id_validator = Validator::make($request->all(), [\n 'exam_type_id' => ['required', 'integer', 'exists:App\\Models\\Exam\\Types,id'],\n ]);\n\n //Check validator fails\n if($exam_type_id_validator->fails()):\n return response()->json(['status'=>'error', 'errors'=>$exam_type_id_validator->errors()]);\n else:\n if(Types::destroy($request->exam_type_id)):\n return response()->json(['status'=>'success']);\n endif;\n endif;\n return response()->json(['status'=>'error', 'data'=>$request->all()]);\n }", "title": "" }, { "docid": "70e997e3761cd5306c421217a3683f46", "score": "0.4935121", "text": "public function delete($name, $type) {\n $this->redisClient->del([$this->generateKey($name, $type)]);\n }", "title": "" }, { "docid": "9d75661158b60d8bf8adc33699718f79", "score": "0.492966", "text": "public function createPackageTypeWithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/package-type\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "e8d8fc0c21645d627578370170912d0e", "score": "0.49048853", "text": "public function billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteWithHttpInfo($accept, $document_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteRequest($accept, $document_type_id, $jiwa_stateful);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "cf8d898dafdf90869b24dee7ae7d57fb", "score": "0.48920533", "text": "public function teamBuilderConfigsIdProductGroupsNkTypesDeleteWithHttpInfo($id, $nk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsNkTypesDelete');\n }\n // verify the required parameter 'nk' is set\n if ($nk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $nk when calling teamBuilderConfigsIdProductGroupsNkTypesDelete');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/{nk}/types\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($nk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"nk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($nk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/TeamBuilderConfigs/{id}/productGroups/{nk}/types'\n );\n\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "cc280bc3a6484e124d2befeadf3af996", "score": "0.48444647", "text": "function deleteType($typeId) {\n\t\tthrow new CmisNotImplementedException(\"deleteType\");\n\t}", "title": "" }, { "docid": "a4fe06f87a503169106664c5efc64c39", "score": "0.48351854", "text": "public function deleteById(int $idCompanyType): void;", "title": "" }, { "docid": "4d9de03b38fd028f30ddc37c8f204722", "score": "0.4823014", "text": "function delete_type($id)\n {\n return $this->db->delete('type',array('id'=>$id));\n }", "title": "" }, { "docid": "45c6fba3cea7dc0c45ebb87cc10d148f", "score": "0.4808812", "text": "function entity_type_delete($projectId, $entityTypeId)\n{\n $entityTypesClient = new EntityTypesClient();\n\n $parent = $entityTypesClient->entityTypeName($projectId,\n $entityTypeId);\n $entityTypesClient->deleteEntityType($parent);\n printf('Entity type deleted: %s' . PHP_EOL, $parent);\n\n $entityTypesClient->close();\n}", "title": "" }, { "docid": "68fdb27004606f40480fbaa9f0963f28", "score": "0.48045158", "text": "public function deleteAction() {\n\t\t$id = intval ( $this->getRequest ()->getParam ( 'id' ) );\n\t\t$ProductType = ProductType::getById ( $id );\n\t\tif ($ProductType) {\n\t\t\t$title = $ProductType->name;\n\t\t\t$id = $ProductType->id;\n\t\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t\tif ($ProductType->delete ()) {\n\t\t\t\t\t$this->Member->log ( 'Xóa Loại Danh mục: ' . $title . ' (' . $id . ')', '$ProductType' );\n\t\t\t\t\t\n\t\t\t\t\tMy_Plugin_Libs::setSplash ( 'Loại Danh mục <b>' . $title . '</b> đã được xóa' );\n\t\t\t\t}\n\t\t\t\t// NewsCategories::db2js ();\n\t\t\t\t$this->_redirect ( 'admin/producttype' );\n\t\t\t}\n\t\t\t$this->view->ProductType = $ProductType;\n\t\t}\n\t}", "title": "" }, { "docid": "24f575304aba4770f56d308f618e4420", "score": "0.48042196", "text": "function flowadmin_delete_devicetype()\r\n{\r\n\tglobal $user;\t\r\n\t$deviceTypeId = func_get_arg(0);\r\n\t\r\n\tflowadmin_access();\r\n\t\r\n\ttry {\r\n\t\t\t$oauthInfo = flowautho_get_oauth_credentials($user->mail);\r\n\t\t\t$deviceTypesServices = new FDWDeviceTypeServicesImpl($oauthInfo, $user);\r\n\t\t\t\t\r\n\t\t\tif (isset($deviceTypeId)) \r\n\t\t\t{\r\n\t\t\t\tif ($deviceTypesServices->deleteDeviceTypeByID($deviceTypeId)) \r\n\t\t\t\t{\r\n\t\t\t\t\t$msg = t('Your device type was successfully deleted.');\r\n\t\t\t\t\tflowautho_set_message('c-ate-delete-devicetype-success', $msg, 'status', true);\r\n\t\t\t\t\tdrupal_goto(FLOWADMIN_DASHBOARD.'/'.FLOWADMIN.'/'.FLOWADMIN_DEVICETYPES.'/1');\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$msg = t('Sorry an error occrured when we tried to delete your device type.');\r\n\t\t\t\t\tflowautho_set_message('c-ate-delete-devicetype-error', $msg, 'error', true);\r\n\t\t\t\t\tdrupal_goto(FLOWADMIN_DASHBOARD.'/'.FLOWADMIN.'/'.FLOWADMIN_DEVICETYPES.'/1');\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t} catch (FDWUnknownUserException $e) {\r\n\t\twatchdog('error', 'FDWDeviceTypeServicesImpl error:: '. print_r($e->getMessage(),true));\r\n\t}\t\r\n\t\r\n}", "title": "" }, { "docid": "19558b71dd08049ca1cd0f4b78861e84", "score": "0.47947705", "text": "public function teamBuilderConfigsIdProductTypesFkDeleteWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductTypesFkDelete');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductTypesFkDelete');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productTypes/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/TeamBuilderConfigs/{id}/productTypes/{fk}'\n );\n\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "8c35cb86d8cc0fa7c5984cb3ae303504", "score": "0.4759362", "text": "public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "8937d7eb91d617bc42224453b91af717", "score": "0.4730612", "text": "public function billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteAsyncWithHttpInfo($accept, $document_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteRequest($accept, $document_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "80b3e9c6de5b40a923b5ba1b38f4b464", "score": "0.47259614", "text": "public function destroy($id)\n {\n $model = Type::find($id);\n //删除该类型对应的属性, todo 删除了该类型下的所有商品属性,则库存也需要删除\n Attribute::where('type_id', $id)->delete();\n if (!$model)\n return response('删除失败',403);\n $res = $model->delete(); //成功返回1?失败返回0?\n return (string) $res;\n }", "title": "" }, { "docid": "afd9bc7b98fa71f9598d623f6bcfe635", "score": "0.47247607", "text": "public function destory(Request $request){\n $model = Type::find($request->input('id'));\n if(!empty($model)){\n if($model->delete()){\n return response()->json(['code' => 200, 'msg' => '删除成功']);\n }\n return response()->json(['code' => 400, 'msg' => '删除失败']);\n }\n return response()->json(['code' => 204, 'msg' => '信息不存在']);\n }", "title": "" }, { "docid": "3e7231aefb0442833a4b69a3c91de619", "score": "0.47111487", "text": "public function deleteItem() {\n $this->request->onlyAllow('post');\n $this->response->type('json');\n\n $status = false;\n $message = \"\";\n\n if (isset($this->request->data)) {\n $id = $this->request->data['id'];\n $type = $this->request->data['type'];\n $status = $this->Library->deleteItem($type, $id);\n }\n\n if ($status) {\n $message = \"Deletion successful\";\n } else {\n $message = \"Deletion unsuccessful\";\n }\n\n $this->set(compact('status', 'message', 'data'));\n $this->set('_serialize', array('data', 'status', 'message'));\n }", "title": "" }, { "docid": "25bcba90991fafb20a9da8d108721f1e", "score": "0.46833473", "text": "public function actionDelete($pro_type){\n\t\t$searchdata = Request::all();\n\t\t$recorddata = array();\n\t\t$recorddata['tr_action'] = 3; //異動動作:刪除\n\t\ttry {\n\t\t\tif($pro_type == 1){ //專案任務\n\t\t\t\t$recorddata['tr_goal'] = 1; //異動目標:專案任務\n\t\t\t\treturn $this->deleteProject($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 2){ //專案子任務\n\t\t\t\t$recorddata['tr_goal'] = 2; //異動目標:專案子任務\n\t\t\t\treturn $this->deleteSubProject($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 3){ //專案訊息\n\t\t\t\t$recorddata['tr_goal'] = 3; //異動目標:專案訊息\n\t\t\t\treturn $this->deleteProjectInformation($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 4){ //專案紀錄\n\t\t\t\t$recorddata['tr_goal'] = 4; //異動目標:專案紀錄\n\t\t\t\treturn $this->deleteProjectRecord($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 5){ //標籤\n\t\t\t\t$recorddata['tr_goal'] = 5; //異動目標:標籤\n\t\t\t\treturn $this->deleteTag($searchdata,$recorddata);\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\tCommonTools::writeErrorLogByException($e);\n\t\t\treturn CommonTools::returnData(false,'#030401',null,null);\n\t\t}\n\t}", "title": "" }, { "docid": "0728fcc1c51554a5d03098f09578c880", "score": "0.46737584", "text": "public function deleteProgramUrlTypeUrlWithHttpInfo($id_program, $id_url_type, $id_url)\n {\n $returnType = '';\n $request = $this->deleteProgramUrlTypeUrlRequest($id_program, $id_url_type, $id_url);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "292b5ad9f02cf1bf66e2f560edd9f395", "score": "0.467109", "text": "public function delete(string $type, string $phase, int $year, string $anchor, ?string $hoofdstukMinfinId);", "title": "" }, { "docid": "bef8926e62cffe9e00c0321480e41c02", "score": "0.46578243", "text": "public function destroy(DestroyTypeRequest $request)\n {\n //get Data\n $dataRequest = $request->all();\n $model = new Type();\n if ($model->where('id', $dataRequest['id'])->update([\n 'status'=>Type::HIDE\n ])) {\n return redirect()->back()->with('success', 'Delete!');\n } else {\n return redirect_errors('Have error, cannot delete!');\n }\n }", "title": "" }, { "docid": "ebb8509b02fca70171794ea60664c4b2", "score": "0.46537915", "text": "public function delete($tipo_proyecto);", "title": "" }, { "docid": "e26f3b737d65b80c7a82c330f1d10209", "score": "0.46536374", "text": "public function destroy(Request $request)\n {\n $server = Helper::doctieIsDemoSiteAjax();\n if (!empty($server)) {\n $json['type'] = 'error';\n $json['message'] = $server->getData()->message;\n return $json;\n }\n $json = array();\n $id = $request['id'];\n if (!empty($id)) {\n $this->package::where('id', $id)->delete();\n $json['type'] = 'success';\n $json['message'] = trans('lang.package_deleted');\n return $json;\n } else {\n $json['type'] = 'error';\n $json['message'] = trans('lang.something_wrong');\n return $json;\n }\n }", "title": "" }, { "docid": "5a7b9878fd55030361ec871745615ceb", "score": "0.46446118", "text": "public function action_delete_item()\n {\n try {\n $type_stub = $this->request->param('id');\n $type = $this->_crud_items[$type_stub];\n $id = $this->request->param('toggle');\n\n if (empty($type)) {\n IbHelpers::set_message('This action cannot be performed on items of type '.$type_stub, 'error popup_box');\n $this->request->redirect('/admin/'.$this->_plugin);\n }\n\n if (!empty($type['delete_permission']) && !Auth::instance()->has_access($type['delete_permission'])) {\n IbHelpers::set_message('You need access to the &quot;'.$type['delete_permission'].'&quot; permission to perform this action.', 'error popup_box');\n $this->request->redirect('/admin/'.$this->_plugin);\n }\n\n $model = ORM::factory($type['model'])->where('id', '=', $id)->find_undeleted();\n $model->delete_and_save();\n\n IbHelpers::set_message(htmlspecialchars($type['name'].' #'.$id.' successfully deleted.'), 'success popup_box');\n\n $name_plural = isset($type['name_plural']) ? $type['name_plural'] : $type['name'].'s';\n $stub_plural = isset($type['stub_plural']) ? $type['stub_plural'] : $type_stub.'s';\n\n $this->request->redirect('/admin/'.$this->_plugin.'/'.$stub_plural);\n }\n catch (Exception $e) {\n Log::instance()->add(Log::ERROR, \"Error deleting\\n\".$e->getMessage().\"\\n\".$e->getTraceAsString());\n IbHelpers::set_message('Unexpected internal error deleting. If this problem continues, please ask an administrator to check the error logs.');\n $this->request->redirect('/admin');\n }\n }", "title": "" }, { "docid": "6ee6ee659a4e38a837847a2cd6b1b7f5", "score": "0.46063715", "text": "public function destroy($id)\n {\n try {\n Type::destroy($id);\n return response(['The type has been deleted'], 204);\n } catch (Exception $e) {\n return response(['Problem deleting the type', 500]);\n }\n }", "title": "" }, { "docid": "9b817e1991a9457d56c733afe20c9d54", "score": "0.46028382", "text": "public static function del($type)\n {\n $cacheName = class_user_func($type . '::getName');\n\n $config = new Config();\n $c = $config->get();\n\n $file = $c['cachedir'] . DIRECTORY_SEPARATOR . $cacheName;\n\n if(file_exists($file))\n {\n unlink($file);\n }\n }", "title": "" }, { "docid": "80dfedbc55bf4e4a18087eae340f3c55", "score": "0.45909375", "text": "public function deleteNatGatewayWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->force)) {\n $query['Force'] = $request->force;\n }\n if (!Utils::isUnset($request->natGatewayId)) {\n $query['NatGatewayId'] = $request->natGatewayId;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteNatGateway',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteNatGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "0514fd5442d1623ace2c2c80dce54f90", "score": "0.45691252", "text": "public function destroy($id_type)\n {\n $type_product = TypeProduct::find($id_type);\n $type_product->status_type = 'ยกเลิก';\n $type_product->save();\n return response()->json('Users Deleted Successfully.');\n }", "title": "" }, { "docid": "2e1adc9444f318015faabf652871d05e", "score": "0.45670918", "text": "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n\t\t//GET MAPPING ID\n $this->view->planmap_id = $planmap_id = $this->_getParam('planmap_id');\n\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\t\t\t\t//GET MAPPING ITEM\n $sitestore_planmap = Engine_Api::_()->getItem('sitestore_planmap', $planmap_id);\n\n\t\t\t\t//DELETE MAPPING\n $sitestore_planmap->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Mapping deleted successfully !'))\n ));\n }\n $this->renderScript('admin-package/delete.tpl');\n }", "title": "" }, { "docid": "b1a7e7ebf26f7ec27825171c8bcd7241", "score": "0.45491484", "text": "public function destroy($id)\n {\n //\n $product_type = ProductType::find($id);\n $data = [\n 'product_type_id' => $product_type->id\n ];\n $product_type->delete();\n return response()->json($data);\n }", "title": "" }, { "docid": "647e8daab937d8784b55b06a0cd38e39", "score": "0.4519827", "text": "public function removeAction(){\n \n // Keep reference to the content type, if not sent send them back to content types\n $contentTypeIdent = $this->getRequest()->getParam('content-type');\n \n if (isset($contentTypeIdent) && is_numeric($contentTypeIdent)){\n $contentType = $this->getFromApi('/contenttypes/'.$contentTypeIdent, 'array');\n $this->view->contentType = $contentType;\n }else{\n $this->_helper->flashMessenger->addMessage('Unkown content type sent cannot add field');\n $this->view->messages = $this->_helper->flashMessenger->getMessages();\n $this->_redirect('/contenttypes');\n return;\n }\n \n // Get the content type buy the ID parsed\n $id = $this->getRequest()->getParam('id');\n \n // If the get param was sent and is in the correct format\n if (isset($id) && is_numeric($id)){\n \n // Make post request to remove content type from the API\n $removeAction = $this->postToApi('/contenttypefields', 'remove', $id);\n \n\n if ($removeAction == 1){\n $this->_helper->flashMessenger->addMessage(ucfirst($contentType['name']).' field removed from the system');\n \n }else{\n $this->_helper->flashMessenger->addMessage('Could not find the '.ucfirst($contentType['name']).' field to remove');\n }\n \n $this->view->messages = $this->_helper->flashMessenger->getMessages();\n $this->_redirect('/contenttypefields/index/id/'.$contentTypeIdent);\n return;\n \n }else{\n // Redirect back to content type fields\n $this->_redirect('/contenttypefields/index/id/'.$contentTypeIdent);\n return;\n }\n }", "title": "" }, { "docid": "819318e851547e6273f0250ef874a74a", "score": "0.45142516", "text": "public function destroy(Request $request, $id)\n {\n if ($request->isMethod('delete') && Package::where('id', $id)->exists()) {\n $site = site();\n $package = $site->packages()->where('id', $id)->firstOrFail();\n $stripe_error = '';\n $package->status = Package::INACTIVE;\n $stripe_plan = $package->stripe_plan;\n $package->saveOrFail();\n\n //------------------------------\n // Stripe Plan\n //------------------------------\n // Update stripe plan.\n if (filled($stripe_plan)) {\n try {\n \\Stripe\\Stripe::setApiKey(config('cashier.secret')); // stripe key\n\n $stripe_plan = \\Stripe\\Plan::update(\n $stripe_plan,\n [\n 'active' => false\n ]\n );\n } catch (\\Stripe\\Exception\\InvalidRequestException $e) {\n $json = json_decode(json_encode($e->getJsonBody()), false);\n $error = $json->error;\n $stripe_error = $error->message;\n }\n\n // Handle stripe errors\n if (filled($stripe_error)) {\n flash($stripe_error);\n return back()->withInput();\n }\n }\n\n if ($package->delete()) {\n flash('Successfully deleted package.');\n return redirect()->route('admin.packages.index');\n }\n }\n\n flash('Invaild action or packages does not exist.');\n return redirect()->route('admin.packages.index');\n }", "title": "" }, { "docid": "2bab31b429412e04fb4f9d86a85d7a51", "score": "0.45132256", "text": "public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteAsyncWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "baecc4f8cad1d018fe10779caeb5bf8e", "score": "0.45119327", "text": "public function delete(int $id) {\n\n return redirect(url('packageTypes'));\n }", "title": "" }, { "docid": "c2cb77d0147e5d9f5bccdd9941fb93ff", "score": "0.4510962", "text": "public function expenseTypesIdDeleteWithHttpInfo($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling expenseTypesIdDelete');\n }\n // parse inputs\n $resourcePath = \"/expense/types/{id}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires HTTP basic authentication\n if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {\n $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \":\" . $this->apiClient->getConfig()->getPassword());\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/expense/types/{id}'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 401:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Spinen\\ConnectWise\\Clients\\Expense\\Model\\Error', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "c61a1cacd3d6330feb74c4680e1fcaec", "score": "0.45093593", "text": "public function delete($id, Request $request)\n {\n\n try {\n $this->polizaTipoRepository->delete($request->all(), $id);\n\n return response()->json(['data' =>\n [\n 'id' => $id\n ]\n ], 200);\n } catch (\\Exception $e){\n return response()->json([\n 'data' => $e->getTraceAsString()], 500);\n }\n }", "title": "" }, { "docid": "a4eff61d9447d77919b5966f55d0615b", "score": "0.45072314", "text": "public function deleteUserType(Request $request){\n\t\n\t\t$userTye = UserType::find($request->id); \n\t\t$deleteUserType = $userTye->delete();\n\t\t\n \t\tif($deleteUserType){\n\t\t\tSession::flash('message', \"User Type deleted successfully!\"); \n\t\t\tSession::flash('alert-class', 'alert-success');\n\t\t\treturn back();\n\t \t}\n }", "title": "" }, { "docid": "1a234516b34c106ddc23d3928e4d779b", "score": "0.45005444", "text": "function delete_post_type() {\r\n\t\tcheck_ajax_referer('custom_post_types_suffusion', 'custom_post_types_wpnonce');\r\n\t\t$post_type_index = $_POST['post_type_index'];\r\n\t\t$ret = \"\";\r\n\t\tif (isset($post_type_index)) {\r\n\t\t\t$suffusion_post_types = get_option('suffusion_post_types');\r\n\t\t\tif (is_array($suffusion_post_types)) {\r\n\t\t\t\tunset($suffusion_post_types[$post_type_index]);\r\n\t\t\t\tupdate_option('suffusion_post_types', $suffusion_post_types);\r\n\t\t\t\t$ret = \"Post type deleted.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$ret = \"Failed to delete post type. Post types are not stored as an array in the database.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "9bb8c4276b9470a2d815d68d5a11fe52", "score": "0.44934562", "text": "public function deleteTranscoderStreamNameGroupConfigWithHttpInfo($server_name, $vhost_name, $template_name, $group_name)\n {\n $returnType = '';\n $request = $this->deleteTranscoderStreamNameGroupConfigRequest($server_name, $vhost_name, $template_name, $group_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b59f75796c5f94690dd08b6bac8b51ba", "score": "0.44904438", "text": "function delete($url = \"\",$options = array()){\n\t\tif(is_array($url)){\n\t\t\t$options = $url;\n\t\t\t$url = \"\";\n\t\t}\n\t\t$options[\"request_method\"] = \"DELETE\";\n\t\treturn $this->fetchContent($url,$options);\n\t}", "title": "" }, { "docid": "0e3171c766dab3072226974740834051", "score": "0.4489704", "text": "public function deleteIdentity(string $type, string $name);", "title": "" }, { "docid": "a06a723eb11348e56e1d43f2ad87bc0f", "score": "0.4478995", "text": "public function deleteVpnGatewayWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpnGatewayId)) {\n $query['VpnGatewayId'] = $request->vpnGatewayId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpnGateway',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpnGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "ef1f09296852dc6cf04bfd00627900e8", "score": "0.44787332", "text": "public function updatePackageTypeWithHttpInfo($package_type_id, $body = null)\n {\n // verify the required parameter 'package_type_id' is set\n if ($package_type_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $package_type_id when calling updatePackageType');\n }\n // parse inputs\n $resourcePath = \"/package-type/{packageTypeId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // path params\n if ($package_type_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"packageTypeId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($package_type_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type/{packageTypeId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "e64ac44dd956b624cf14e7edb161e1d6", "score": "0.4478231", "text": "function DEL()\n{\n\tif ($this->isError()) return;\n\n\t$id_type_fiche = $this->id_type_fiche;\n\n\t$sql = \" DELETE FROM \".$GLOBALS['prefix'].\"param_type_fiche\n\t\t\t\tWHERE id_type_fiche = $id_type_fiche\";\n\n\tif (!Sql_exec($sql)) $this->setError(ERROR);\n\tif (!$this->isError()) Lib_sqlLog($sql);\n\n\treturn;\n}", "title": "" }, { "docid": "f8631609cd395e7c37d8f215956b8851", "score": "0.4476143", "text": "public function retrieveListPackageTypeWithHttpInfo($arguments)\n {\n // verify the required parameter 'arguments' is set\n if ($arguments === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $arguments when calling retrieveListPackageType');\n }\n // parse inputs\n $resourcePath = \"/package-type\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // body params\n $_tempBody = null;\n if (isset($arguments)) {\n $_tempBody = $arguments;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\PackageTypeListResponse',\n '/package-type'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\PackageTypeListResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\PackageTypeListResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "1372e2e4451ed177c11e59fe05fa9c3d", "score": "0.44722387", "text": "public function realizaPeticionDelete($url, $http, $data){\n\t\tRequests::register_autoloader();\n\t\t$request = Requests::delete(\n\t\t\t$url, \n\t\t\tarray(\n\t\t\t\t'Content-Type' => 'application/json'\n\t\t\t), \n\t\t\t$data\n\t\t);\n\t\treturn($request->body); \n }", "title": "" }, { "docid": "24d0030ebc420252f7c843ef361d89a1", "score": "0.44665372", "text": "public function delete_contract_type() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\t$id = $this->uri->segment(3);\n\t\t\t$result = $this->Graphene_model->delete_contract_type_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = 'Contract Type deleted.';\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}", "title": "" }, { "docid": "552bc29492672a7ffba1a899d30c2927", "score": "0.4464114", "text": "protected function drop_key($type, $name)\n\t{\n\t\treturn $this->command($type, compact('name'));\n\t}", "title": "" }, { "docid": "9ab20a5882372b1c5f9db037adb2da76", "score": "0.44576827", "text": "public function delete($params) {\n if (!isset($params['userId'])) throw new osapiException(\"Invalid or no userId specified for osapiAppData->delete\");\n if (!isset($params['groupId'])) throw new osapiException(\"Invalid or no groupId specified for osapiAppData->delete\");\n if (!isset($params['appId'])) throw new osapiException(\"Invalid or no appId specified for osapiAppData->delete\");\n if (isset($params['fields'])) {\n if (!is_array($params['fields'])) throw new osapiException(\"Optional param 'fields' should be an array in osapiAppData->delete\");\n foreach ($params['fields'] as $key) {\n if (!self::isValidKey($key)) {\n throw new osapiException(\"Invalid key specified in osapiAppData->delete: $key\");\n }\n }\n }\n return osapiRequest::createRequest('appdata.delete', $params);\n }", "title": "" }, { "docid": "8ff9c63dfb006a5ac7bd9e174f5e1f84", "score": "0.44545767", "text": "public function destroy(Request $request)\n {\n $goal_type = GoalType::findOrFail($request->id);\n $goal_type->delete();\n return back()->with('success',\"Goal Type has been deleted\");\n }", "title": "" }, { "docid": "dd3b20208142c3e4858e7f2505e2c5fa", "score": "0.44429618", "text": "public function index_delete($nID = NULL)\n {\n // Delete shop type\n return $this->lib_rest_shop_types->deleteShopType($nID);\n }", "title": "" }, { "docid": "d9d7545cb66f1ac6783128ddd232ef76", "score": "0.44405052", "text": "public function forceDelete(Request $request, $id)\n {\n if ($request->isMethod('delete') && Package::withTrashed()->where('id', $id)->exists()) {\n $site = site();\n $package = $site->packages()->withTrashed()->where('id', $id)->firstOrFail();\n $products = $package->products()->cursor();\n $stripe_id = $package->stripe_plan;\n\n // Unassign any products\n if ($products && $products->count() !== 0) {\n foreach ($products as $product) {\n $package->unassignProduct($product);\n }\n }\n\n //-------------------------//\n // Stripe Product\n //-------------------------//\n if (filled($stripe_id)) {\n try {\n \\Stripe\\Stripe::setApiKey(config('cashier.secret')); // stripe key\n\n $stripe_plan = \\Stripe\\Plan::retrieve($stripe_id);\n $stripe_plan->delete();\n } catch (\\Stripe\\Exception\\InvalidRequestException $e) {\n $json = json_decode(json_encode($e->getJsonBody()), false);\n $error = $json->error;\n $stripe_error = $error->message;\n\n if (filled($stripe_error)) {\n flash($stripe_error);\n return redirect()->route('admin.packages.index');\n }\n }\n }\n\n // Delete Images\n $images = $package->getMedia('images');\n\n if ($images && count($images) !== 0) {\n foreach ($images as $index => $_image) {\n $_image->delete();\n }\n }\n\n // Remove from site\n $site->unassignPackage($package);\n $package->forceDelete();\n\n flash('Successfully deleted package forever.');\n return redirect()->route('admin.packages.index');\n }\n\n flash('Invaild action or package does not exist.');\n return redirect()->route('admin.packagess.index');\n }", "title": "" }, { "docid": "8da109ca7ffd8f2291545f5a7efcd457", "score": "0.44401118", "text": "public function delete(string $url, RequestOptionsInterface $requestOptions) : ResponseInterface;", "title": "" }, { "docid": "ae69cf3c70a9752a8268e8ac03adafcd", "score": "0.44390172", "text": "public function deleteApplicationUsingDeleteWithHttpInfo($application_id)\n {\n $returnType = '';\n $request = $this->deleteApplicationUsingDeleteRequest($application_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "83e679ecdb0211c2815bfa2704cf9a24", "score": "0.44310552", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }", "title": "" }, { "docid": "83e679ecdb0211c2815bfa2704cf9a24", "score": "0.44310552", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }", "title": "" }, { "docid": "83e679ecdb0211c2815bfa2704cf9a24", "score": "0.44310552", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }", "title": "" }, { "docid": "83e679ecdb0211c2815bfa2704cf9a24", "score": "0.44310552", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }", "title": "" }, { "docid": "83e679ecdb0211c2815bfa2704cf9a24", "score": "0.44310552", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }", "title": "" }, { "docid": "83e679ecdb0211c2815bfa2704cf9a24", "score": "0.44310552", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }", "title": "" }, { "docid": "c75613b8ea56ab76cc8300f78edb5571", "score": "0.44304055", "text": "public function delAttributeWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/{uuid}/attribute/{key}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2004',\n '/{uuid}/attribute/{key}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2004', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2004', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "6be470ed6d2505edaee4b857352d783a", "score": "0.44279456", "text": "public function deleteServiceAuthorizationWithHttpInfo($options)\n {\n $request = $this->deleteServiceAuthorizationRequest($options);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') {\n $header = $response->getHeader('Fastly-RateLimit-Remaining');\n if (count($header) > 0) {\n $this->config->setRateLimitRemaining($header[0]);\n }\n\n $header = $response->getHeader('Fastly-RateLimit-Reset');\n if (count($header) > 0) {\n $this->config->setRateLimitReset($header[0]);\n }\n } \n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "79e7205af31755754f60fa3c4b0f3ac6", "score": "0.44171318", "text": "public function destroy(ContactType $contactType)\n {\n $contactType->delete();\n\n return response()->json([\n 'message' => 'Contact Type Deleted Successfully!!'\n ]);\n }", "title": "" }, { "docid": "a2792e0af60a1eae4b4502397419bece", "score": "0.44136465", "text": "public function deleteType($lpaId)\n {\n $helper = new ApplicationResourceService($lpaId, 'type', $this);\n return $helper->deleteResource();\n }", "title": "" }, { "docid": "ac609400ae00a90fe6f5cdc281166176", "score": "0.4407292", "text": "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('ZIMZIMBundlesOpinionBundle:TypeButchery')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find TypeButchery entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n $this->deleteSuccess();\n }\n\n return $this->redirect($this->generateUrl('zimzim_opinion_typebutchery'));\n }", "title": "" }, { "docid": "9b09d5d522d544aa2176b6bb439b2e87", "score": "0.44070202", "text": "function deleteType() {\r\n\r\n if(!array_key_exists(36,$this->role_privileges)){\r\n echo(json_encode(array('status' => 'access')));\r\n } else {\r\n $id = $this->input->post('id');\r\n $data = array('deleted' => 1, 'updated_by' => $this->vendorId, 'updated_time' => date('Y-m-d H:i:s'));\r\n $result = $this->k_master_vehicle_type_model->delete($id, $data);\r\n if ($result > 0) {\r\n echo(json_encode(array('status' => TRUE)));\r\n } else {\r\n echo(json_encode(array('status' => FALSE)));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7dfb787096ccc9fa809fa0b898c97e04", "score": "0.44069", "text": "public function destroy(Request $request)\n {\n Type::find($request->id)->delete();\n return $this->create();\n }", "title": "" }, { "docid": "e6d4206d8fb3aa058ba91ca10098e679", "score": "0.44059187", "text": "public function destroy(Brand $brand, Type $type)\n {\n $type->delete();\n\n return response()->json([\n 'Deleted Type'\n ]);\n }", "title": "" }, { "docid": "aa9545de0adce3f1c193caa46f3ebf5c", "score": "0.4402174", "text": "public function delete($package, $name)\n {\n $this->table()\n ->where('package', $package)\n ->where('name', $name)\n ->delete();\n }", "title": "" }, { "docid": "c89272b0fd4f97bd6df170e631cd3c78", "score": "0.43942875", "text": "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('IbaseStoreBundle:ProductPerPackage')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ProductPerPackage entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('package_include'));\n }", "title": "" }, { "docid": "1f07e3216abc85b6de8db8c1cbf4a0c1", "score": "0.43935055", "text": "public function deleteRoutineWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $body = [];\n if (!Utils::isUnset($request->name)) {\n $body['Name'] = $request->name;\n }\n $req = new OpenApiRequest([\n 'body' => OpenApiUtilClient::parseToMap($body),\n ]);\n $params = new Params([\n 'action' => 'DeleteRoutine',\n 'version' => '2018-01-15',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteRoutineResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "801dd5319c0c34b25fed1f08302ec22b", "score": "0.43933755", "text": "public function deletePackage($request, $response)\n {\n $post = $request->getattributes('id');\n\n /** Find and update package information */\n $package = Package::find($post['id']);\n $package->disabled = 1;\n $package->save();\n\n return $response->withRedirect($this->router->pathFor('agent.packages'));\n }", "title": "" }, { "docid": "c9cce688c06507f63ae7bc464f089209", "score": "0.4385794", "text": "public function deleteType()\n {\n $query = \"DELETE FROM sms_todo_status WHERE todo_status_id = :id\";\n\n $sql = $this->db->prepare($query);\n $sql->bindValue(':id', $this->data->id);\n\n if ($sql->execute()) {\n $data[\"status\"] = 'success';\n }\n return $data;\n }", "title": "" }, { "docid": "46812ac3ff997d2215e17c16c98d435e", "score": "0.4384278", "text": "public function destroy(Request $request)\n {\n $result = InfoClass::destroyInfoClass($request->input('Id'));\n\n if ($result) {\n return response()->json(['message' => '删除成功', 'code' => 200]);\n } else {\n return response()->json(['message' => '删除失败', 'code' => 0]);\n }\n }", "title": "" }, { "docid": "4cee075db8612133a2eb1814dfc61374", "score": "0.43753105", "text": "public function deleteDnsRecord($type, $name, $content)\r\n {\r\n $result = $this->listAllDnsRecords();\r\n $res = '';\r\n $id = '';\r\n if ( $result['status'] == 'success' ) {\r\n $json = json_decode( $result['data'] );\r\n \r\n foreach($json->result as $record) {\r\n if ( $type == 'CNAME' && $record->type == 'CNAME' ) {\r\n if ( $record->type == $type && $record->name == $name . '.' . $content ) {\r\n $id = $record->id;\r\n break;\r\n }\r\n } else {\r\n if ( $record->type == $type && $record->name == $name && $record->content == $content ) {\r\n $id = $record->id;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Than, call delete id\r\n if ( $id != '' ) {\r\n $method = 'DELETE';\r\n $path = 'zones/' . $this->zoneId . '/dns_records/' . $id;\r\n return $this->call($method, $path);\r\n } else {\r\n return array(\r\n 'status' => 'error',\r\n 'data' => 'DNS Record not found'\r\n );\r\n }\r\n }", "title": "" }, { "docid": "7e17cf6cf2b4c3514e0bdadeb6725383", "score": "0.43741024", "text": "public function deleteVpcWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->dryRun)) {\n $query['DryRun'] = $request->dryRun;\n }\n if (!Utils::isUnset($request->forceDelete)) {\n $query['ForceDelete'] = $request->forceDelete;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpcId)) {\n $query['VpcId'] = $request->vpcId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpc',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpcResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "03146793a2e28a7b291b9a7c1221b8f8", "score": "0.43730873", "text": "public function delete_currency_type() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\t$id = $this->uri->segment(3);\n\t\t\t$result = $this->Graphene_model->delete_currency_type_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = 'Currency Type deleted.';\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}", "title": "" }, { "docid": "c07aef47e3c3ba974b3f2e8ee32b9f6d", "score": "0.43690553", "text": "public function deleteDhcpOptions($request);", "title": "" }, { "docid": "f8df34ba161af695c5afcd5c306e3de1", "score": "0.4366733", "text": "function delete_user_type($user_type_id)\n {\n $parameter_array = array();\n \n array_push($parameter_array, array(\n 'and',\n 'id',\n '=',\n $user_type_id\n ));\n \n parent::delete('i', $parameter_array);\n }", "title": "" }, { "docid": "f14c6de131893a7b05c4c7fce4a31d73", "score": "0.43592575", "text": "public function deleteAction(Request $request)\n {\n $helpers = $this->get(\"app.helpers\");\n $hash = $request->get(\"authorization\", null);\n $authCheck = $helpers->authCheck($hash);\n\n if ($authCheck== true) {\n $json = $request->get(\"data\",null);\n $params = json_decode($json);\n\n $em = $this->getDoctrine()->getManager();\n\n $descuento = $em->getRepository('JHWEBContravencionalBundle:CvCdoCfgDescuento')->find(\n $params->id\n );\n\n $descuento->setActivo(false);\n\n $em->flush();\n\n $response = array(\n 'status' => 'success',\n 'code' => 200,\n 'message' => \"Registro eliminado con exito\"\n );\n }else{\n $response = array(\n 'status' => 'error',\n 'code' => 400,\n 'message' => \"Autorizacion no valida\", \n );\n }\n \n return $helpers->json($response);\n }", "title": "" }, { "docid": "160f16cdf4698931ab2ce115a8eade44", "score": "0.43585265", "text": "public function deletePackageType($package_type_id)\n {\n list($response) = $this->deletePackageTypeWithHttpInfo($package_type_id);\n return $response;\n }", "title": "" }, { "docid": "69257d0e3f2a607df921d32c713c286d", "score": "0.43572706", "text": "public function deletionProtectionWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->instanceId)) {\n $query['InstanceId'] = $request->instanceId;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->protectionEnable)) {\n $query['ProtectionEnable'] = $request->protectionEnable;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->type)) {\n $query['Type'] = $request->type;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeletionProtection',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeletionProtectionResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" }, { "docid": "053735800dbc38a695137c43f520b257", "score": "0.43568933", "text": "public function destroy(Type $type)\n {\n if($type==null){\n $errors = ['No se ha encontrado el id especificado'];\n return redirect()->back()->withErrors($errors);\n }\n\n $type->delete();\n\n session()->flash('message', 'El tipo de café se ha eliminado correctamente.');\n return redirect( route('admin.types') );\n }", "title": "" }, { "docid": "94c02416f30f546340e6727fdcbfbc77", "score": "0.4355165", "text": "public function deleteAction(Request $request)\n {\n $helpers = $this->get(\"app.helpers\");\n $hash = $request->get(\"authorization\", null);\n $authCheck = $helpers->authCheck($hash);\n\n if ($authCheck == true) {\n $em = $this->getDoctrine()->getManager();\n $json = $request->get(\"json\", null);\n $params = json_decode($json);\n\n $placa = $em->getRepository('JHWEBVehiculoBundle:VhloCfgPlaca')->find($params);\n\n $placa->setEstado(0);\n $em = $this->getDoctrine()->getManager();\n $em->persist($placa);\n $em->flush();\n $response = array(\n 'status' => 'success',\n 'code' => 200,\n 'message' => \"Placa eliminada con éxito\",\n );\n\n }else{\n $response = array(\n 'status' => 'error',\n 'code' => 400,\n 'message' => \"Autorización no válida\",\n );\n }\n return $helpers->json($response);\n }", "title": "" }, { "docid": "c3037d6543bace9c8cd9d795cca08637", "score": "0.43489024", "text": "public function actionDeleteErrorType() {\n $model = AudioQCErrorType::model()->findByPk(Yii::app()->request->getPost('errorTypeId'));\n\n // Only in case the record exist\n if (!$model instanceof AudioQCErrorType)\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => 'error')));\n\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $model->delete() ? 'ok' : 'error')));\n }", "title": "" }, { "docid": "515ad107a6adec730a1c0d518c0425c9", "score": "0.4343692", "text": "function delete_type()\r\n{\t\r\n\tglobal $con;\r\n\t/////////Delete the record//////////\r\n\t$SQL=\"DELETE FROM type WHERE type_id = $_REQUEST[type_id]\";\r\n\tmysqli_query($con,$SQL) or die(mysqli_error($con));\r\n\theader(\"Location:../type-report.php?msg=Deleted Successfully.\");\r\n}", "title": "" }, { "docid": "4f164017d1dc83fbb2ed4a4b7dd7d4bf", "score": "0.43402538", "text": "public function deleteVpnAttachmentWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpnConnectionId)) {\n $query['VpnConnectionId'] = $request->vpnConnectionId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpnAttachment',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpnAttachmentResponse::fromMap($this->callApi($params, $req, $runtime));\n }", "title": "" } ]
853bae4c1f832824ca803ba2f74a382e
Retrieve consents. This function should return a list of consents the user has saved.
[ { "docid": "e7ff34bbf12337ebfc68d47822a6bc02", "score": "0.5491765", "text": "public function getConsents($userId)\n {\n assert('is_string($userId)');\n\n $ret = array();\n\n $st = $this->_execute(\n 'SELECT service_id, attribute, consent_date, usage_date ' .\n 'FROM ' . $this->_table . ' ' .\n 'WHERE hashed_user_id = ?',\n array($userId)\n );\n\n if ($st === false) {\n return array();\n }\n\n while ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret[] = $row;\n }\n\n return $ret;\n }", "title": "" } ]
[ { "docid": "8910b50329640cfde336b0658cf864e0", "score": "0.55958676", "text": "public function clientCorrespondences()\n {\n return Basecamp::clientCorrespondences($this->id);\n }", "title": "" }, { "docid": "145cc46624d165c8a9cadfd8da1b4de7", "score": "0.5520358", "text": "public function getAll()\n {\n $clients = $this->getEntityManager()\n ->getRepository('AppBundle:Client')\n ->createQueryBuilder('client')\n ->select('client')\n ->orderBy('client.nom')\n ->getQuery()\n ->getResult();\n return $clients;\n }", "title": "" }, { "docid": "62114ebe557bedcd30eefc305a65c455", "score": "0.5460961", "text": "public static function obtenerConductoresDisponibles(){\n $conductores = Persona::all();\n $ocupados = DB::table('TBL_Persona as p')\n ->join('TBL_Vehiculo as v', 'v.VHC_Conductor_Id', '=', 'p.id')\n ->select('p.id')\n ->get();\n $disponibles = [];\n foreach ($conductores as $conductor) {\n if(!$ocupados->contains('id', $conductor->id)){\n array_push($disponibles, $conductor);\n }\n }\n return $disponibles;\n }", "title": "" }, { "docid": "0c89fa720e903ab652063deb3b1d2fbe", "score": "0.5445692", "text": "private function findContribuyente()\r\n\t\t{\r\n\t\t\t$results = [];\r\n\t\t\t$findModel = self::findContribuyenteModel();\r\n\t\t\t$findModel = $findModel->select([\r\n\t\t\t\t\t\t\t\t\t\t'id_contribuyente',\r\n\t\t\t\t\t\t\t\t\t\t'naturaleza',\r\n\t\t\t\t\t\t\t\t\t\t'cedula',\r\n\t\t\t\t\t\t\t\t\t\t'tipo',\r\n\t\t\t\t\t\t\t\t\t\t'id_rif',\r\n\t\t\t\t\t\t\t\t\t\t'razon_social',\r\n\t\t\t\t\t\t\t\t\t\t'domicilio_fiscal',\r\n\t\t\t\t\t\t\t\t\t\t'tlf_ofic',\r\n\t\t\t\t\t\t\t\t\t\t'tlf_ofic_otro',\r\n\t\t\t\t\t\t\t\t\t\t'tlf_celular',\r\n\t\t\t\t\t\t\t\t\t\t'email',\r\n\t\t\t\t\t\t\t\t\t])\r\n\t\t\t\t\t\t\t\t ->where(['inactivo' => 0])\r\n\t\t\t\t\t\t\t\t ->andWhere(['tipo_naturaleza' => 1])\r\n\t\t\t\t\t\t\t\t ->andWhere(['no_declara' => 0]);\r\n\r\n\t\t\tif ( (int)$this->todos_contribuyentes == 1 ) {\r\n\t\t\t\t// La consulta se realiza sobre un lote\r\n\t\t\t\t$results = $findModel->asArray()->all();\r\n\t\t\t} else {\r\n\t\t\t\t// La consulta se realiza sobre uno\r\n\t\t\t\tif ( (int)$this->id_contribuyente > 0 ) {\r\n\t\t\t\t\t$results = $findModel->andWhere('id_contribuyente =:id_contribuyente',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[':id_contribuyente' => (int)$this->id_contribuyente])\r\n\t\t\t\t\t\t\t\t\t\t ->asArray()\r\n\t\t\t\t\t\t\t\t\t\t ->all();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $results;\r\n\t\t}", "title": "" }, { "docid": "ab2c0eb962f3cf03b6b723efd26b4d6d", "score": "0.5431517", "text": "public static function insurances()\n {\n $user = Sentinel::getUser();\n $member = DB::table('members')->where('email', '=', $user->email)->first();\n $insurances=Member::find($member->id)->insurances()->latest()->get();\n return $insurances;\n\n }", "title": "" }, { "docid": "19333b40ba0315de1d650637a12beddf", "score": "0.5346143", "text": "function get_all_credito()\n {\n $credito = $this->db->query(\"\n SELECT\n *\n\n FROM\n `credito`\n\n WHERE\n 1 = 1\n\n ORDER BY `credito_id` DESC\n \")->result_array();\n\n return $credito;\n }", "title": "" }, { "docid": "394dd6bc982ecf7c42810b8d647f0d44", "score": "0.53388995", "text": "static function getAllClients() {\n $model = \\app\\models\\Clients::find()\n ->where(['is_deleted' => 0])\n ->all();\n $list = ArrayHelper::map($model, 'client_id', 'business_name');\n return $list;\n }", "title": "" }, { "docid": "55f84b373672e24594084dbe0c0c1b8c", "score": "0.5318582", "text": "public function index()\n {\n $clientes = Cliente::with(['pessoa', 'carrinho'])->get();\n return $clientes;\n }", "title": "" }, { "docid": "041cc9bbbeac87a56918b3d37fab3834", "score": "0.53031504", "text": "static function findAllSuspense(){\n $cnpj = $_SESSION['login']['cnpj_empresa'];\n /*id, nome, login, senha, perfil, ativo, cnpj_empresa*/\n $sql = \"SELECT * FROM tb_cliente WHERE cnpj_empresa = :cnpj_empresa ORDER BY nome\";\n $DB = db_connect();\n $stmt = $DB->prepare($sql);\n $stmt->bindParam(':cnpj_empresa', $cnpj);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_CLASS, 'Cliente');\n }", "title": "" }, { "docid": "c88566e7a209e9087675d21e84d1d79e", "score": "0.52982473", "text": "public function getContatos()\n {\n return $this->contatos;\n }", "title": "" }, { "docid": "c88566e7a209e9087675d21e84d1d79e", "score": "0.52982473", "text": "public function getContatos()\n {\n return $this->contatos;\n }", "title": "" }, { "docid": "bfd47c96e1d63447b4d49c23877047a6", "score": "0.5276311", "text": "public function index()\n {\n //\n\n $clases=Clases::all();\n return $clases;\n }", "title": "" }, { "docid": "1b892b3365ead169345e3033f3a0da8a", "score": "0.5274984", "text": "public function index()\n {\n $contacts = Brindes::all();\n\n return $contacts;\n }", "title": "" }, { "docid": "c5e22f70af5508c441feda25397bd4ce", "score": "0.5270017", "text": "public function getContatos()\n {\n $sql = $this->pdo->prepare('select * from tb_contatos');\n $sql->execute();\n\n $lista = array();\n\n if ($sql->execute()) {\n // Query succeeded.\n while ($dados = $sql->fetch(PDO::FETCH_OBJ)) {\n $contato = new Contato();\n\n $contato->setId_usuario($dados->id_usuario);\n $contato->setTelefone($dados->telefone);\n $contato->setTipo($dados->tipo);\n\n $lista[] = $contato;\n }\n } else {\n // Query failed.\n echo $sql->errorCode();\n return null;\n }\n\n return $lista;\n }", "title": "" }, { "docid": "7a98dba23a9b9109bb3192d0e8b57f0c", "score": "0.52620876", "text": "public function index()\n {\n $dados = Cliente::all();\n return $dados;\n }", "title": "" }, { "docid": "8b6883247147542da980cafa395b17a2", "score": "0.5252663", "text": "public function getBeacons()\n {\n $result = $this->request('get', '/device');\n\n return collect($result->devices)->map(function ($device) {\n return $this->getBeacon($device);\n });\n }", "title": "" }, { "docid": "9e90e401e83462a79ba889736a38985c", "score": "0.52377", "text": "function getCapstoneAll() {\n return DB::query(\"SELECT cs.id, u.first_name , u.last_name, u.username, cs.title, cs.description, cs.defense_date, cs.plagerism_score, cs.grade, cs.type\n FROM capstone cs JOIN student s ON cs.student_id = s.id\n JOIN user u ON s.uid = u.uid\n ORDER BY cs.defense_date;\");\n }", "title": "" }, { "docid": "2994434965f7bd77eb9ac514c784d4df", "score": "0.5235964", "text": "public function getClientes() {\r\n //obtenemos la informacion de la bdd:\r\n $pdo = Database::connect();\r\n $sql = \"select * from cliente order by apellidos\";\r\n $resultado = $pdo->query($sql);\r\n //transformamos los registros en objetos:\r\n $listado = array();\r\n foreach ($resultado as $res) {\r\n $cliente = new Cliente($res['cedula'], $res['apellidos'], $res['nombres'], $res['direccion']);\r\n array_push($listado, $cliente);\r\n }\r\n Database::disconnect();\r\n //retornamos el listado resultante:\r\n return $listado;\r\n }", "title": "" }, { "docid": "377172be0e34e6d2f08a1dc6d9b262e6", "score": "0.5224592", "text": "public function clients()\n {\n return $this->hasMany(\n Passport::clientModel(),\n 'user_id'\n )->select(\n [\n 'id',\n 'user_id',\n 'name',\n 'secret',\n 'revoked',\n 'created_at',\n 'updated_at',\n ]\n );\n }", "title": "" }, { "docid": "286c3ca22fbb42cb823a597ebe2ba4dd", "score": "0.5213156", "text": "public function index()\n {\n $incidents = Incident::all();\n\n return response()->json($incidents);\n }", "title": "" }, { "docid": "dbc1eade2c107b0893093e99558d3d9a", "score": "0.5208467", "text": "public function getConsumers()\n {\n\n#\n### Initialise data connector\n#\n $this->data_connector = LTI_Data_Connector::getDataConnector($this->data_connector);\n\n return $this->data_connector->Tool_Consumer_list();\n\n }", "title": "" }, { "docid": "4bc983dbb8e245e0d6ec7fd3a8d038cf", "score": "0.5193406", "text": "public function getAllClientActif()\n {\n $clients = $this->getEntityManager()\n ->getRepository('AppBundle:Client')\n ->createQueryBuilder('client')\n ->select('client')\n ->where('client.status = :status')\n ->setParameters([\n 'status' => 1,\n ])\n ->orderBy('client.nom')\n ->getQuery()\n ->getResult();\n return $clients;\n }", "title": "" }, { "docid": "4e79d8b69c2c2d4be036959124886008", "score": "0.51912814", "text": "public function listClients()\n {\n $clients = $this->clientService->list();\n return ClientResource::collection($clients);\n }", "title": "" }, { "docid": "f6d7fee10c70c07918c96c94cedba343", "score": "0.51896083", "text": "public function index()\n {\n $contrato = contrato::all();\n return $contrato;\n }", "title": "" }, { "docid": "1ac61cdde5628425a6288810a5b283cd", "score": "0.51800644", "text": "public static function getAllClients(){\n $sql = \"SELECT * FROM Clients ORDER BY idClient;\";\n return Model::fetchDB($sql);\n }", "title": "" }, { "docid": "410ad5d8d87513e7e422a32a87352d6d", "score": "0.5177919", "text": "protected function getClients()\n {\n /* @var $collection \\yii\\authclient\\Collection */\n $collection = Yii::$app->get($this->clientCollection);\n\n return $collection->getClients();\n }", "title": "" }, { "docid": "4a31805ac7068957ca9cb0f3c3e39020", "score": "0.5142657", "text": "public function getBeacons(){\n\t\t$this->db->from('ads');\n \t$this->db->where('status = 1');\n\t\treturn $this->db->get()->result();\n\t}", "title": "" }, { "docid": "53eed9bed6f3d1ea27769d059f58d820", "score": "0.5139372", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $consommables = $em->getRepository('AppBundle:Consommable')->findAll();\n\n return $this->render('consommable/index.html.twig', array(\n 'consommables' => $consommables,\n ));\n }", "title": "" }, { "docid": "6d0791d1f9faa6196f34a2062846ca40", "score": "0.5134875", "text": "public function get_clients(){\n\t\t$this->dal->connect();\n\t\t$result = $this->dal->select(\"SELECT client_name, client_id FROM Client\");\t\n\t\t$this->dal->disconnect();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c3125e9e8cc3307e44a6c6e6db57e262", "score": "0.5109347", "text": "public function index()\n {\n // Get accountBlockAssociations\n $accountBlockAssociations = AccountBlockAssociation::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of accountBlockAssociations as a resource\n return AccountBlockAssociationResource::collection($accountBlockAssociations);\n }", "title": "" }, { "docid": "a4f7dd2903b805ac130aa447c84144ed", "score": "0.5099835", "text": "public function index()\n {\n $enderecos = Endereco::with(\"cidade\")->get();\n return $enderecos;\n }", "title": "" }, { "docid": "eb6106d714d8ecb7e1a8cec4738a9f48", "score": "0.5084105", "text": "public function findCapstones()\n {\n $users = $this->createQueryBuilder('u')\n ->andWhere(\"u.progress = '5' or u.progress = '6' or u.progress = '12' or u.progress = '13'\")\n ->addOrderBy('u.lastname', 'ASC')\n ->addOrderBy('u.firstname', 'ASC')\n ->getQuery()\n ->getResult();\n return $users;\n }", "title": "" }, { "docid": "c128f5202bcf725b5aeecada5b66e0f3", "score": "0.5081435", "text": "public function Listar(){\n $convenios = new Convenio();\n\n // Chama o metodo para selecionar os registros\n return $convenios::Select();\n }", "title": "" }, { "docid": "7d8170093d3f70fa184e93e5ce8afba9", "score": "0.50809443", "text": "public function ListAction(){\n $em = $this->getDoctrine()->getManager();\n\n //recupere de la liste des internautes au travers du repository\n $internautes = $em->getRepository('BackBundle:Internaute')->findAll();\n\n return $internautes;\n }", "title": "" }, { "docid": "77f4386cd0104203e05a08fb61d93396", "score": "0.50808156", "text": "public function listcancelation(){ \n $sts=$this->db->prepare(\"SELECT * FROM `cancelation`\");\n $sts->execute();\n\t\t$data=$sts->fetchAll(PDO::FETCH_ASSOC);\n\t\t\n return $data;\n\t\t\n }", "title": "" }, { "docid": "2c537594c6f5d05d5ee5ca8bab80a28e", "score": "0.5069361", "text": "public function accounts()\n {\n return $this->request('eth_accounts', []);\n }", "title": "" }, { "docid": "2cceea8bf31313b40ca3de6efb000151", "score": "0.5068681", "text": "public function all()\n {\n return $this->bank_account->all();\n }", "title": "" }, { "docid": "e6fb45dcb0c56a9eaa21dec2f941b9e3", "score": "0.506302", "text": "public function users(){\n // Replace with company later\n // $clients = Auth::user()->clients;\n return ClientResource::collection(Auth::user()->clients);\n }", "title": "" }, { "docid": "7efae927e123b512ff28710a9254f804", "score": "0.50600183", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $cons = $em->getRepository('ConsultationBundle:Cons')->findAll();\n\n return $this->render('cons/index.html.twig', array(\n 'cons' => $cons,\n ));\n }", "title": "" }, { "docid": "22494360a31f3d4530dbfbb41bca9ab5", "score": "0.5033673", "text": "public function getList()\n {\n return $this\n ->where('cookie_id', request()->cookie_id)\n ->where('status', true)\n ->get();\n }", "title": "" }, { "docid": "4448a6a8029fd583323928ac49916082", "score": "0.502563", "text": "public function fetch()\n {\n return $this->configurationModel->all();\n }", "title": "" }, { "docid": "21d338aa0dda3a10c04cc32eacc0d194", "score": "0.5009652", "text": "public static function getAll() {\n\t\t\t//list\n\t\t\t$list = array();\n\t\t\t//get connection\n\t\t\t$connection = MySqlConnection::getConnection();\n\t\t\t//query\n\t\t\t$query = 'call usp_getIncidentsWithStatusActive();';\n\t\t\t//command\n\t\t\t$command = $connection->prepare($query);\n\t\t\t//execute\n\t\t\t$command->execute();\n\t\t\t//bind results\n\t\t\t$command->bind_result($id,\n\t\t\t$disUsername, $disFirstName, $disLastName, $disBirthdate, $disGender, $disPhotograph, $disPhone, $disEmail, $acoDisLastLogin,\n\t\t\t$usUsername, $usFirstName, $usLastName, $usBirthdate, $usGender, $usPhotograph, $usPhoneNumber, $usEmail, $acoUsLastLogin,\n\t\t\t$itId, $itDescription, $description, $dateTime, $latitude, $longitude, $summon, $status);\n\t\t\t//fetch data\n\t\t\twhile($command->fetch()) {\n\t\t\t\t$id = $id;\n\t\t\t\t$contactDataDispacher = new ContactData($disPhone, $disEmail);\n\t\t\t\t$contacDataUser = new ContactData($usPhoneNumber, $usEmail);\n\t\t\t\t$accountDipacher = new Account($disUsername, $acoDisLastLogin);\n\t\t\t\t$accountUser = new Account($usUsername, $acoUsLastLogin);\n\t\t\t\t$dispatcher = new Dispatcher($accountDipacher, $disFirstName, $disLastName, $disBirthdate, $disGender, $disPhotograph, $contactDataDispacher);\n\t\t\t\t$user = new User($accountUser, $usFirstName, $usLastName, $usBirthdate, $usGender, $usPhotograph, $contacDataUser);\n\t\t\t\t$incidentType = new IncidentType($itId, $itDescription);\n\t\t\t\t$description = $description;\n\t\t\t\t$date = $dateTime;\n\t\t\t\t$location = new Location($latitude, $longitude);\n\t\t\t\t$summon = $summon;\n\t\t\t\t$status = $status;\n\t\t\t\tarray_push($list, new Incident($id, $dispatcher, $user, $incidentType, $description, $dateTime, $location, $summon, $status));\n\t\t\t}\n\t\t\t//close command\n\t\t\tmysqli_stmt_close($command);\n\t\t\t//close connection\n\t\t\t$connection->close();\n\t\t\t//return list\n\t\t\treturn $list;\n\t\t}", "title": "" }, { "docid": "49f3dc3df25919b754c11e5fc69a38e5", "score": "0.50063217", "text": "public function list()\n {\n return $this->careerApplicationService->list();\n }", "title": "" }, { "docid": "2d7e339de6fbf68511d42ad1dc6d5777", "score": "0.49957934", "text": "public function getAll()\n {\n return $this->candidateModel->orderBy('candidates.id','desc')\n ->get();\n }", "title": "" }, { "docid": "6408520add92fff3cc38f66869a5ae16", "score": "0.49956858", "text": "public function getInfos()\n {\n if(!$this->ping())\n return false;\n\n $response = $this->client->get('/cds/application',$this->headers);\n \n return $response->json();\n }", "title": "" }, { "docid": "f7bde9b619c165c5eace92e37ddd28cc", "score": "0.49920824", "text": "public function getAll()\n {\n $data = array();\n $rs = parent::findAll(array(\"name\" => \"Client\"));\n foreach ($rs as $k => $v) {\n foreach ($v as $vi) {\n $data[$k] = new Client($v['CLIENTID'],$v['NOM'],$v['EMAIL'],$v['MOTPASSE']);\n }\n }\n return $data;\n }", "title": "" }, { "docid": "93d8761ba860344fa7bae0b5e7b41b9a", "score": "0.49920416", "text": "public function getAll()\n {\n return $this->boat_service->getAll();\n }", "title": "" }, { "docid": "57cef047e3c5e3d0f94614210cd518a1", "score": "0.49906743", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('WoojinAgencyBundle:Contractor')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d29e2410f7c52c28f001ab4ad79bd789", "score": "0.49866912", "text": "function disciplineFetch()\n\t{\n\t\treturn [\n\t\t\t'list'=>JbDisciplines::get()\n\t\t];\n\t}", "title": "" }, { "docid": "7497590c8bf60a84b697963584ff60dd", "score": "0.49832225", "text": "public function readAll()\n {\n $sql = 'SELECT id_recomendaciones, recomendaciones, fecha, estado, nombres_cliente\n FROM recomendaciones INNER JOIN clientes USING(id_cliente) \n ORDER BY id_cliente';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "5e133c17462078a7c9f4de4646a80e0a", "score": "0.49754944", "text": "public function getCurrensies();", "title": "" }, { "docid": "a22c4131d83af98d6f3a80282cd0e303", "score": "0.49713996", "text": "public function index()\n {\n $lancamentoConta = LancamentoConta::all();\n return $lancamentoConta;\n }", "title": "" }, { "docid": "3ee6a4b1ae0c7641dc0309e62454eeb7", "score": "0.49584424", "text": "public static function getCarList() {\n $cars = DB::table('cars')->get();\n return $cars;\n }", "title": "" }, { "docid": "c5b05883a4a7c5a8603c91d9047ccc40", "score": "0.4954885", "text": "public function getComentarios(){\n\t\t$sql = \"SELECT c.Comentario, cli.Usuario FROM comentarios c, cliente cli, producto p where c.IdCliente=cli.IdCliente and p.IdProducto=c.IdProducto and c.Estado=1\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "e0de5477847b79f75ccfee4abc1d832f", "score": "0.49547556", "text": "public function allClientes()\n {\n $clientes = Cliente::all();\n return response()->json($clientes, 200);\n }", "title": "" }, { "docid": "9ba658ab2d1d3b936cd6879c4c2bfc60", "score": "0.49536398", "text": "public function findAll()\n {\n try {\n $clients = $this->db->createQueryBuilder()\n ->select('c')\n ->from(ClientPhysique::class,'c')\n ->getQuery()\n ->getArrayResult();\n\n return $clients;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "title": "" }, { "docid": "f6b1e3c44b41b8042c1958569858927d", "score": "0.4943648", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Cliente')->findByEstado(1);\n\n return array(\n 'entities' => $entities\n );\n }", "title": "" }, { "docid": "40aa3f59a10c66b3f0709ca46141df7a", "score": "0.49356428", "text": "public function clientApprovals()\n {\n return Basecamp::clientApprovals($this->id);\n }", "title": "" }, { "docid": "9b54fa14c680076ebdcb5757039fb0e7", "score": "0.4935288", "text": "public function getStatistics()\n {\n $ret = array();\n\n // Get total number of consents\n $st = $this->_execute('SELECT COUNT(*) AS no FROM consent', array());\n \n if ($st === false) {\n return array(); \n }\n\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret['total'] = $row[0];\n }\n\n // Get total number of users that has given consent\n $st = $this->_execute(\n 'SELECT COUNT(*) AS no ' .\n 'FROM (SELECT DISTINCT hashed_user_id FROM consent ) AS foo',\n array()\n );\n \n if ($st === false) {\n return array(); \n }\n\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret['users'] = $row[0];\n }\n\n // Get total number of services that has been given consent to\n $st = $this->_execute(\n 'SELECT COUNT(*) AS no ' .\n 'FROM (SELECT DISTINCT service_id FROM consent) AS foo',\n array()\n );\n \n if ($st === false) {\n return array();\n }\n\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret['services'] = $row[0];\n }\n\n return $ret;\n }", "title": "" }, { "docid": "36cd2c00e64fcb7dab80f0509055b5aa", "score": "0.49331528", "text": "public function contatos()\n {\n return $this->hasMany(ClienteContato::class);\n }", "title": "" }, { "docid": "4d0034d393ca385edbf1c174a1dc2df8", "score": "0.4929256", "text": "public function getAll()\n {\n return Courier::mapArrayFromJson(\n $this->client->sendRequest(\n new Request('GET', 'couriers')\n )\n );\n }", "title": "" }, { "docid": "ada6781254d8afd578f357e448f42ea6", "score": "0.49189928", "text": "private function _getClans() {\n \n //Role Super Admin get all Clans\n if ($this->session_data->role == 1) {\n $clan = new Clan();\n return $clan->get();\n }\n \n //Role Admin get all Clans\n if ($this->session_data->role == 2) {\n $clan = new Clan();\n return $clan->get();\n }\n \n //Role Rector then get all clans related to rector\n if ($this->session_data->role == 3) {\n $clan = new Clan();\n return $clan->getClanOfRector($this->session_data->id);\n }\n \n //Role Dean then get all clans related to dean\n if ($this->session_data->role == 4) {\n $clan = new Clan();\n return $clan->getClanOfDean($this->session_data->id);\n }\n \n //Role Teacher then get all clans related to teacher\n if ($this->session_data->role == 5) {\n $clan = new Clan();\n return $clan->getClanOfTeacher($this->session_data->id);\n }\n \n //Role Student then get all clans related to student\n if ($this->session_data->role == 6) {\n $clan = new Clan();\n return $clan->getClanOfStudent($this->session_data->id);\n }\n }", "title": "" }, { "docid": "c7e3608ae42113b3cafcd5eca2188b76", "score": "0.4918706", "text": "public function getClients(){\n\t\t \t$all_organisations = new User;\n\n\t\t \t$organisations = $all_organisations->where('role_id','=',2)->get();\n \t\treturn view('clients.list',compact('organisations'));\n }", "title": "" }, { "docid": "7d0f0b26e59662938da0406048a96bc6", "score": "0.49138373", "text": "public function get_client_list()\n {\n\n $data_list = $this->model->get_client_list();\n\n return $this->respond($data_list);\n }", "title": "" }, { "docid": "f706e892842e429d12887f8cf41fa9a5", "score": "0.4910518", "text": "public function index()\n {\n //return all collections\n $collections = Customer::where('company_id', Auth::user()->company_id)\n ->orderBy('id', 'desc')\n ->with('collection', 'company', 'bin')\n ->get();\n\n return $collections;\n }", "title": "" }, { "docid": "18e79f452c750dcc20af703a84ad471a", "score": "0.4909431", "text": "public function congesListeAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Conge')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Super-Admin/DonneesSysteme/Conges:conges.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "31fd5874830c576fd432438e738d4178", "score": "0.4905666", "text": "public function index()\n {\n return PresidencyConsolidate::all();\n }", "title": "" }, { "docid": "23f38a0d6f318b0d56bb26602b0b9992", "score": "0.4904415", "text": "public function index()\n {\n $clients = Client::all();\n \n return ClientResource::collection($clients);\n }", "title": "" }, { "docid": "2a55a376a6b81ae3ceb4e7efb13fa6e2", "score": "0.48985922", "text": "public function getAllClients(){\r\n return $this->database->getRows(\"SELECT * FROM client WHERE client_trash = 0\");\r\n }", "title": "" }, { "docid": "3c00acbd7b26d56d141e51646aa6c375", "score": "0.48962793", "text": "static function findAllActive(){\n $cnpj = $_SESSION['login']['cnpj_empresa'];\n $s = NULL;\n /*id, nome, login, senha, perfil, ativo, cnpj_empresa*/\n $sql = \"SELECT * FROM tb_cliente WHERE cnpj_empresa = :cnpj_empresa ORDER BY nome\";\n $DB = db_connect();\n $stmt = $DB->prepare($sql);\n $stmt->bindParam(':cnpj_empresa', $cnpj);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_CLASS, 'Cliente');\n }", "title": "" }, { "docid": "44f5bc4bb203a9cecb96b298e4e7a6fd", "score": "0.48948744", "text": "public function getAccounts()\n {\n return UserAccount::getAll(['where' => \"osoba_id = $this->id AND active = 1\"]);\n }", "title": "" }, { "docid": "076d4f4dc9d75667010a1dbb76925bb5", "score": "0.4890949", "text": "public function connectedAccounts()\n {\n return $this->hasMany(Socialstream::connectedAccountModel(), 'user_id');\n }", "title": "" }, { "docid": "a04bf554ba964c1ca6461f1b793da955", "score": "0.48842958", "text": "public function getList() {\n\n\t\t$logger = $this->getServiceLocator()->get( 'Log\\App' );\n\t\t$logger->log( \\Zend\\Log\\Logger::INFO, \"Rest call to /customer\" );\n\n\t\t/* this serves as the get call for the create account page */\n\t\t/* get the possible roles */\n\t\t$e = $this->getServiceLocator()->get( 'doctrine.entitymanager.orm_default' );\n\t\t$r = $e->createQuery( \"SELECT r FROM CAP\\Entity\\Role r\" )->getResult( \\Doctrine\\ORM\\Query::HYDRATE_OBJECT );\n\n\t\t$results = array();\n\n\t\tforeach ($r as $role) {\n\n\t\t\tarray_push($results, array('id' => $role->getId(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'name'=> $role->getName()));\n\t\t}\n\t\treturn new JsonModel(array('roles' => $results));\n\t}", "title": "" }, { "docid": "c48b462898f0e7d19c16a8b764ee3553", "score": "0.48840687", "text": "public function getClients();", "title": "" }, { "docid": "d2e4dc6314cddb8ff45b50b083ac8f79", "score": "0.48808023", "text": "public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n\n if ($user->hasRole('ROLE_ECOMMERCE_ADMIN')) {\n $commandes = $em->getRepository(Commande::class)->getCommandeALivrer();\n } else {\n $commandes = $em->getRepository(Commande::class)->getCommandeALivrerByCommerce($user);\n }\n\n return [\n 'commandes' => $commandes,\n ];\n }", "title": "" }, { "docid": "35731a4823e2d4fcdddd65ec4b4763e5", "score": "0.4876098", "text": "public function getBalances ()\n {\n return $this->call ('account/getbalances', array(), true);\n }", "title": "" }, { "docid": "fcdd8b975f2cbacc47f4fbb6e33646f5", "score": "0.4875129", "text": "public function index()\n\t{\n $assistencies = Assistencies::all();\n return $assistencies;\n\t}", "title": "" }, { "docid": "ea9415e5e908aa53ca275918716d809a", "score": "0.487489", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Cuenta')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "73e2f55a047b3519f61715a8b01f9975", "score": "0.48743296", "text": "public function getClients()\n {\n $webstoreRepository = pluginApp(WebstoreRepositoryContract::class);\n\n $clients = array();\n\n $result = $webstoreRepository->loadAll();\n\n foreach ($result as $record)\n {\n if ($record->storeIdentifier > 0)\n {\n $clients[] = $record->storeIdentifier;\n }\n }\n\n return $clients;\n }", "title": "" }, { "docid": "6ea2e4a172c3f21d9bec96b7ddb51c02", "score": "0.48740748", "text": "public function getObservacoes()\n {\n return $this->observacoes;\n }", "title": "" }, { "docid": "85f13a19cde38a801f798be417e0247a", "score": "0.48711053", "text": "public function index()\n {\n return Client::all();\n }", "title": "" }, { "docid": "85f13a19cde38a801f798be417e0247a", "score": "0.48711053", "text": "public function index()\n {\n return Client::all();\n }", "title": "" }, { "docid": "85f13a19cde38a801f798be417e0247a", "score": "0.48711053", "text": "public function index()\n {\n return Client::all();\n }", "title": "" }, { "docid": "519f8d11bd0000f9ad78359646936a97", "score": "0.48698908", "text": "public static function getCouleurs(){\n\t\t$dao = new CouleurDAO();\n\t\treturn $dao->getCouleurs();\n\t}", "title": "" }, { "docid": "57095c3e678a80ab6e3a32dbcd1a3923", "score": "0.4867414", "text": "public static function getAllClues()\n\t{\n\t\treturn self::getClues(null);\t\n\t}", "title": "" }, { "docid": "a15ff61060445c8629726037cb7ea460", "score": "0.4865551", "text": "public function consultar_clientes(){\n $query = \"SELECT * FROM cliente;\";\n $res = $this->mysqli->query($query);\n $this->results = $res->fetch_all(MYSQLI_ASSOC);\n return $this->results;\n }", "title": "" }, { "docid": "1f2b3ce9a7cf0d5138b09953c0e0b6e9", "score": "0.48618746", "text": "public function index()\n {\n $compra = Compra::all();\n return $compra;\n }", "title": "" }, { "docid": "8589c3c28b4314e59de8362187cddf2a", "score": "0.48607698", "text": "public static function getBosses()\n {\n $results = self::where('disabled', '=', false)->where('role', '=', BOSS);\n\n return $results;\n }", "title": "" }, { "docid": "99166138ddb27772ee6d3c0f22d9544a", "score": "0.4860737", "text": "public function getClients()\n {\n /** @var OauthServer $this */\n return $this->get('clients');\n }", "title": "" }, { "docid": "035e8d2aeb5872f61b6f6c3572865f97", "score": "0.48566833", "text": "public static function getTransedCopartners () {\n return \\Sooh\\Db\\Broker::getInstance(\\Rpt\\Tbname::db_rpt)\n ->getPair(\\Rpt\\Tbname::tb_copartners_trans, 'copartnerName', 'contractId');\n }", "title": "" }, { "docid": "cb5fed7002af2afdae9791753085aa34", "score": "0.48532146", "text": "function getClaves()\n {\n return $this->claves;\n }", "title": "" }, { "docid": "a3d60def27c764a5bbe13f90765556b2", "score": "0.48521492", "text": "public function concerns()\n\t{\n\t\treturn $this->hasMany(Concern::class)->orderBy('created_at', 'DESC');\n\t}", "title": "" }, { "docid": "d5560a60ee407e107ba5514e3ac731d8", "score": "0.48516566", "text": "public function getAll(){\n $query=\"select * from clientes\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "798f51d4caeb3ef4858aa5e412032fc3", "score": "0.48509118", "text": "public function index()\n {\n $clients = Client::paginate();\n\n return ClientResource::collection($clients);\n }", "title": "" }, { "docid": "76491d1c5ae0dca8fa9d30e9d61e525b", "score": "0.4849676", "text": "public function getAllOwners() {}", "title": "" }, { "docid": "40c50fbf361ccffb64b7813914d83226", "score": "0.48477876", "text": "public function getCustomers()\n {\n $role = Role::where('name', 'customer')->first();\n return $role->users;\n }", "title": "" }, { "docid": "495a96de3d1dbe6f7838c19ad98a4b7d", "score": "0.48474693", "text": "public function index()\n {\n //\n return new CandidatesResource(Candidate::all());\n }", "title": "" }, { "docid": "62cd273589d51d0bf9c594de929960a9", "score": "0.48455605", "text": "public function getReadersList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "24d30b1b2d2a71f3528c9e905b4f1ada", "score": "0.48417187", "text": "public function index()\n {\n return Borrow::with('user', 'book')->get();\n }", "title": "" }, { "docid": "567ba358a5bdbb09528507c34b17aea7", "score": "0.4837243", "text": "public function findAll()\n {\n $role = Auth::user()->role;\n\n $donations = [];\n\n if ($role === 'admin') {\n $donations = Donation::with(['donor', 'patient', 'service'])->paginate(6);\n } else if ($role === 'donor') {\n $donations =\n Donation::with(['patient', 'service'])->where('donor_id', Auth::id())->paginate(6);\n } else {\n $donations =\n Donation::with(['donor', 'service'])->where('patient_id', Auth::id())->paginate(6);\n }\n\n return $donations;\n }", "title": "" } ]
1e73f40de055272663c9bcdc84c70dbb
Filter the query on the tdate column Example usage: $query>filterByTdate('20110314'); // WHERE tdate = '20110314' $query>filterByTdate('now'); // WHERE tdate = '20110314' $query>filterByTdate(array('max' => 'yesterday')); // WHERE tdate > '20110313'
[ { "docid": "03414ceee785d952e1b6ef62bed2544d", "score": "0.53202915", "text": "public function filterByTdate($tdate = null, $comparison = null)\n {\n if (is_array($tdate)) {\n $useMinMax = false;\n if (isset($tdate['min'])) {\n $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($tdate['max'])) {\n $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate, $comparison);\n }", "title": "" } ]
[ { "docid": "690fceaae0bc63c2404145f48ff9ffea", "score": "0.5598991", "text": "public function scopeFilterByEndDate( $query )\n {\n $date = request() -> get( 'end_date' );\n\n if( $date )\n {\n try \n {\n $date = Carbon :: parse($date);\n $query -> whereDate( 'created_at', '<=', $date );\n }\n catch ( \\Exception $e )\n {\n // Do nothing, it's ok.\n }\n }\n }", "title": "" }, { "docid": "8328dfebf8a9099bafbe5774103dcb4c", "score": "0.5571023", "text": "function filterByDate($date) {\n $this->setDateFilter(self::DATE_FILTER_SELECTED_DATE);\n $this->setAdditionalProperty('date_filter_on', (string) $date);\n }", "title": "" }, { "docid": "c08962c7c785b20f767fd28d89121fac", "score": "0.5482131", "text": "function setDateFilter($value) {\n return $this->setAdditionalProperty('date_filter', $value);\n }", "title": "" }, { "docid": "e4a449c3f8cdc0d9e48dc3298de665eb", "score": "0.54168165", "text": "function getFilterDate($top){\n\tif(!$top)\n\t\t$top=20;\n\n\t$data = M('event');\n\t$date_set = Array();\n\t$condition = Array('event_date' => Array('egt', todayDate()));\n\t$result = $data->where($condition)->group('event_date')->limit($top)->order('event_date asc')->select();\n\tforeach($result as $value)\n\t\tarray_push($date_set, $value['event_date']);\n\n\treturn $date_set;\n}", "title": "" }, { "docid": "649c4720ba41fe12830c82114a444992", "score": "0.5393599", "text": "function filter_where( $where = '' ) {\r\n\t$where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-99930 days')) . \"'\";\r\n\treturn $where;\r\n}", "title": "" }, { "docid": "6def562ef81d28c5f5eb50bbfea3e457", "score": "0.5375973", "text": "static function apply($query) {\n\t\t$query = DateFilter::after($query);\n\t\t$query = DateFilter::before($query);\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "182a3d18f45a86ed0bf98349f52f6b47", "score": "0.5351299", "text": "function getFiltroTempoEntrega($get,$where = \" 1 = 1\"){\n \n if(isset($get['hrini']) && isset($get['hrfim'])){\n $hrIni = $get['hrini'];\n $hrFim = $get['hrfim'];\n if (!empty($hrIni) && !empty($hrFim)){\n \n return $where .= \" AND TO_CHAR(EXTRACT(HOUR from NUMTODSINTERVAL((to_date(DtFim,'YYYYMMDDHH24MISS') - to_date(DtIni,'YYYYMMDDHH24MISS')),'DAY')),'FM00') \n ||':' ||\n TO_CHAR(EXTRACT(Minute from NUMTODSINTERVAL((to_date(DtFim,'YYYYMMDDHH24MISS') - to_date(DtIni,'YYYYMMDDHH24MISS')),'DAY')),'FM00') \n BETWEEN '{$hrIni}' AND '{$hrFim}'\";\n \n }\n \n } \n }", "title": "" }, { "docid": "c99027a145199e6371d147dbcde6ddbd", "score": "0.5285243", "text": "public function filterDataTable($query, $request)\n {\n if (isset($request['req']['from']) && $request['req']['from'] != '') {\n $query->whereDate('created_at', '>=', $request['req']['from']);\n }\n\n if (isset($request['req']['to']) && $request['req']['to'] != '') {\n $query->whereDate('created_at', '<=', $request['req']['to']);\n }\n\n if (isset($request['req']['type']) && $request['req']['type'] != '') {\n $query->where('type', '=', $request['req']['type']);\n }\n \n \n\n \n\n \n return $query;\n }", "title": "" }, { "docid": "bfd9ff5f288d0e3b261fcee15a47e7fd", "score": "0.52795666", "text": "private function filterDay()\n {\n try {\n if(empty($this->day)) {\n return;\n }\n\n $dayDT = new DateTime(DateHelper::parseDateTime($this->day), DateHelper::getSystemTimeZone());\n\n $endDT = clone $dayDT;\n $endDT->setTime(23,59,59);\n $end = $endDT->getTimestamp();\n\n $start = $dayDT->setTime(0,0,0)->getTimestamp();\n\n $this->query->andWhere(['<=', 'log_time', $end]);\n $this->query->andWhere(['>=', 'log_time', $start]);\n\n } catch (\\Exception $e) {\n Yii::error($e, 'admin');\n }\n }", "title": "" }, { "docid": "664b43fd6b1a85debac35639e47f5a68", "score": "0.5276063", "text": "function filter_where($where = '') {\n $postid = get_the_ID();\n $format = 'Y-m-d';\n $publish_date = get_the_date( $format, $postid);\n\n $where .= \" AND post_date <= '\" . $publish_date . \"'\";\n\n return $where;\n }", "title": "" }, { "docid": "0b2acb92545d5fab94748179115ff620", "score": "0.525917", "text": "public function filterByTdate($tdate = null, $comparison = null)\n {\n if (is_array($tdate)) {\n $useMinMax = false;\n if (isset($tdate['min'])) {\n $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($tdate['max'])) {\n $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate, $comparison);\n }", "title": "" }, { "docid": "d2074f34a539bb906bc316076bb6c049", "score": "0.5222251", "text": "function getDateFilter() {\n return $this->getAdditionalProperty('date_filter', self::DATE_FILTER_ANY);\n }", "title": "" }, { "docid": "b23a21251213f50b2f1caf37026baa7f", "score": "0.52122027", "text": "public function filterByTdate($tdate = null, $comparison = null)\n {\n if (is_array($tdate)) {\n $useMinMax = false;\n if (isset($tdate['min'])) {\n $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($tdate['max'])) {\n $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate, $comparison);\n }", "title": "" }, { "docid": "b734474cc5bbff22ac75badff18387e7", "score": "0.51908195", "text": "function wpfc_temp_filter_where( $where = '' ) {\n\t \t$where .= \" AND post_date >= '\".date(\"Y-m-d\", $_REQUEST['start']).\"' AND post_date < '\".date(\"Y-m-d\", $_REQUEST['end']).\"'\";\n\t \treturn $where;\n\t }", "title": "" }, { "docid": "09ea27314e7785f927b8c13767ab3b3e", "score": "0.5175028", "text": "public function makeFilter_date($field, $date, $negate = false) {\r\n\t\treturn TodoyuSearchFilterHelper::makeFilter_date(self::TABLE, $field, $date, $negate);\r\n\t}", "title": "" }, { "docid": "70edd964dcc805c34233b719ac222a31", "score": "0.5145515", "text": "function filter_where($where = '') {\n global $popular_days;\n //posts in the last X days\n $where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-'.$popular_days.' days')) . \"'\";\n return $where;\n}", "title": "" }, { "docid": "2dbded59e734c865f83222e187801c66", "score": "0.51413924", "text": "public function scopeFilterByStartDate( $query )\n { \n $date = request() -> get( 'start_date' );\n if( $date )\n {\n try \n {\n $date = Carbon :: parse( $date );\n $query -> whereDate( 'created_at', '>=', $date );\n }\n catch( \\Exception $e )\n {\n // Do nothing, it's ok.\n }\n }\n }", "title": "" }, { "docid": "003db7cab4485178555808abda2f5786", "score": "0.5117767", "text": "function todays_posts_only($atts) {\n\n $DEFAULT_DATE = 'today';\n $DEFAULT_TEMPLATE_PART = 'content';\n\n // if we were not passed a date, use the default date instead\n if ((! array_key_exists ('date', $atts))\n || (is_null ($atts['date']))\n ) {\n $post_date = $DEFAULT_DATE;\n } else {\n $post_date = $atts['date'];\n }\n\n // if we were not passed a template part, use the default instead\n if ((! array_key_exists ('template_part', $atts))\n || (is_null ($atts['template_part']))\n ) {\n $template_part = $DEFAULT_TEMPLATE_PART;\n }\n\n // start with an empty query filter\n $query_filter = array();\n\n // parse the date string we were passed into an array\n // http://php.net/manual/en/function.date-parse.php\n $parsed_date = date_parse ($post_date);\n\n // add a query filter based on the specified date\n // https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters\n $query_filter['date_query'] = array(\n array(\n 'year' => $parsed_date['year'],\n 'month' => $parsed_date['mon'],\n 'day' => $parsed_date['day'],\n ),\n );\n\n // if we were passed a category (name), add that as a filter\n // http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters\n if ((array_key_exists ('category', $atts))\n && (! is_null ($atts['category']))\n ) {\n $query_filter['category_name'] = $atts['category'];\n }\n\n // if we were passed a tag, add that as a filter\n // https://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters\n if ((array_key_exists ('tag', $atts))\n && (! is_null ($atts['tag']))\n ) {\n $query_filter['tag'] = $atts['tag'];\n }\n\n // instantiate a new query based on the filter we've constructed\n // https://codex.wordpress.org/Class_Reference/WP_Query\n $custom_query = new WP_Query($query_filter);\n\n // if the query returned any posts, process them\n if ($custom_query->have_posts()) {\n\n // loop through all of the posts the query returned\n while ($custom_query->have_posts()) {\n $custom_query->the_post();\n\n $format = get_post_format();\n get_template_part($template_part, $format);\n\n }// end custom loop\n\n // restore the global $post from the main query loop\n // https://codex.wordpress.org/Function_Reference/wp_reset_postdata\n wp_reset_postdata();\n\n return '';\n\n } else {\n\n // restore the global $post from the main query loop\n // https://codex.wordpress.org/Function_Reference/wp_reset_postdata\n wp_reset_postdata();\n\n return FALSE;\n\n }// end if\n }", "title": "" }, { "docid": "38b3e9854a990bb2ab53f45ee2655401", "score": "0.5111801", "text": "protected function _myDdateFilter($collection, $column)\n {\n /*if (!$value = $column->getFilter()->getValue()) {\n return $this;\n }\n $from = $filters['from'];\n $to = $filters['to'];\n if ($from) {\n $this->getCollection()->addFieldToFilter('main_table.ddate', array(\n 'gteq' => $from->toString('yyyy-MM-dd')\n ));\n }\n if ($to) {\n $this->getCollection()->addFieldToFilter('main_table.ddate', array(\n 'lteq' => $to->toString('yyyy-MM-dd')\n ));\n }*/\n if (!$value = $column->getFilter()->getValue()) {\n return $this;\n }\n $filters = $column->getFilter()->getValue();\n\n $from = $filters['from'];\n $to = $filters['to'];\n if($from)\n $this->getCollection()->addFieldToFilter('main_table.ddate', array('gteq' => $from->toString('yyyy-MM-dd')));\n if($to)\n $this->getCollection()->addFieldToFilter('main_table.ddate', array('lteq' => $to->toString('yyyy-MM-dd')));\n }", "title": "" }, { "docid": "3b08661f7edaa14c8a6fe622ec941d38", "score": "0.5092028", "text": "public function filter_where($where = '') {\n $where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-30 days')) . \"'\";\n return $where;\n }", "title": "" }, { "docid": "bccca81a9edc66db9360ef38379b931a", "score": "0.5086713", "text": "protected function filteringWhereComparison($query, $value)\n {\n $compares = $this->explodeCompare($value);\n $query = $query->orWhere(function ($subquery) use ($compares) {\n foreach ($compares as $compare) {\n $function = $compare->function;\n $subquery = $subquery->$function(\n $this->isDate($compare->value)\n ? DB::raw(\"{$this->fieldName}\")\n : DB::raw(\"LOWER(\" . $this->fieldName . \")\"),\n $compare->compare,\n $this->transformValueForFilter($compare->value)\n );\n }\n });\n }", "title": "" }, { "docid": "35ff25159072a07ba70ddce978f624ab", "score": "0.508217", "text": "public function filterByDate(&$row)\n {\n $row[3] = Carbon::createFromFormat('j/n/Y', $row[3]);\n return $row[3] >= $this->today;\n }", "title": "" }, { "docid": "54061a225558221f1c8237026f381518", "score": "0.5029461", "text": "public function scopeOndate($query, $variable)\n\t{\n\t\tif(!is_array($variable))\n\t\t{\n\t\t\treturn $query->where('created_at', '<=', date('Y-m-d H:i:s', strtotime($variable)))->orderBy('created_at', 'desc');\n\t\t}\n\n\t\tif(!strtotime($variable[1]) && strtotime($variable[0]))\n\t\t{\n\t\t\treturn $query->where('created_at', '<=',date('Y-m-d H:i:s', strtotime($variable[0])));\n\t\t}\n\n\t\treturn $query->where('created_at', '>=', date('Y-m-d H:i:s', strtotime($variable[0])))->where('created_at', '<=', date('Y-m-d H:i:s', strtotime($variable[1])))->orderBy('created_at', 'asc');\n\t}", "title": "" }, { "docid": "822eed995c267d0f18cd29a7b0bfaad8", "score": "0.5021632", "text": "public function addDateFilter()\n\t{\n\t\t$this->_addFilter(new DataGrid\\Filters\\DateFilter());\n\t\treturn $this->getFilter();\n\t}", "title": "" }, { "docid": "74cf9818010cfdcaedbb9ad833b55a0e", "score": "0.4995949", "text": "function getFilterDatePast($top){\n\tif(!$top)\n\t\t$top=20;\n\n\t$data = M('event');\n\t$date_set = Array();\n\t$condition = Array('event_date' => Array('elt', todayDate()));\n\t$result = $data->where($condition)->group('event_date')->limit($top)->order('event_date desc')->select();\n\tforeach($result as $value)\n\t\tarray_push($date_set, $value['event_date']);\n\n\treturn $date_set;\n}", "title": "" }, { "docid": "082149420af0f9396d43eabe86e47465", "score": "0.49820295", "text": "public function Filter_taskFilter($value, $negate = false) {\r\n\t\t$filterSets\t= TodoyuArray::intExplode(',', $value, true, true);\r\n\t\t$queryParts\t= false;\r\n\r\n\t\tif( sizeof($filterSets) === 0 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$taskFilter = new TodoyuProjectTaskFilter(array(array('filter' => 'filterSet', 'value' => $filterSets)));\r\n\r\n\t\t$queryArray = $taskFilter->getQueryArray();\r\n\t\t$queryArray['group']\t= '';\r\n\t\t$queryArray['fields']\t= str_ireplace('sql_calc_found_rows', '', $queryArray['fields']);\r\n\t\t$subQuery = TodoyuSql::buildSELECTquery($queryArray['fields'], $queryArray['tables'], $queryArray['where'], 'ext_project_task.id_project');\r\n\r\n\t\t// This double sub query is here for performance reasons (don't optimize it!)\r\n\t\t$subQuery = ' SELECT id FROM ( ' . $subQuery . ') as x';\r\n\r\n\t\t$compare\t= $negate ? ' NOT IN ' : ' IN ';\r\n\r\n\t\t$queryParts['tables']\t= array('ext_project_project', 'ext_project_task');\r\n\t\t$queryParts['where']\t= 'ext_project_task.id ' . $compare . ' (' . $subQuery . ')';\r\n\t\t$queryParts['join']\t\t= array('ext_project_project.id = ext_project_task.id_project');\r\n\r\n\t\treturn $queryParts;\r\n\t}", "title": "" }, { "docid": "7cb33974d84a4ce89fe2d760941180ca", "score": "0.49718788", "text": "public function Filter_editdateDyn($value, $negate) {\r\n\t\t$timeStamps = TodoyuSearchFilterHelper::getDynamicDateTimestamp($value, $negate);\r\n\r\n\t\treturn $this->Filter_dateDyn($timeStamps, 'date_update', $negate);\r\n\t}", "title": "" }, { "docid": "766cf849adf0e38003c61808d94e1f60", "score": "0.49677926", "text": "protected function applyDateFilter($field)\n {\n $dates = explode('..', $this->value);\n\n if(count($dates)=== 2){\n $timestampFrom = $this->dateParser->getTimestamp($dates[0].\" 00:00\");\n $timestampTo = $this->dateParser->getTimestamp($dates[1].\" 00:00\");\n\n $this->query->gte($field, $timestampFrom);\n $this->query->lte($field, $timestampTo + 86399);\n }\n }", "title": "" }, { "docid": "f813b2cf3330cc821b7f70873d62a9f4", "score": "0.49474782", "text": "public function applyLatestOnlyCondition(Event $event)\n {\n /** @var \\yii\\db\\BaseActiveRecord|\\zarv1k\\sync\\twoway\\behavior\\model\\SyncableBehavior $model */\n $model = $event->data;\n /** @var \\yii\\db\\ActiveRecordInterface $modelClass */\n $modelClass = $this->owner->modelClass;\n /** @var ActiveQuery $activeQuery */\n $activeQuery = $event->sender;\n\n $updatedAfterDate = \\Yii::$app->request->getQueryParam($model->timestampQueryParam);\n\n $orderBy = [$model->timestampColumn => SORT_ASC];\n foreach ($modelClass::primaryKey() as $column) {\n $orderBy[$column] = SORT_ASC;\n }\n\n $activeQuery\n ->andFilterWhere(['>', $model->timestampColumn, $updatedAfterDate])\n ->addOrderBy($orderBy);\n\n Event::off(ActiveQuery::className(), ActiveQuery::EVENT_INIT, [$this, 'applyLatestOnlyCondition']);\n }", "title": "" }, { "docid": "4522155795d06d294400964763848d49", "score": "0.4945606", "text": "public function twig_filter_sdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('sdate', function ($_string, $_max =\"day\", $_format =\"Y/m/d\")\n\t\t{\n\t\t\treturn \\lib\\utility::humanTiming($_string, $_max, $_format, $this->data->site['currentlang']);\n\t\t});\n\t}", "title": "" }, { "docid": "a39596bbe68b64237776d95842c2b8fa", "score": "0.4930032", "text": "public function DateGreater($time) {\n $this->filter->Greater('udate', $time);\n }", "title": "" }, { "docid": "d67ddc028d0c6200de4cf4fcf8826565", "score": "0.49218166", "text": "function getDateforStdFilterBytype($type)\n\t{\n\t\t//$thisyear = date(\"Y\");\n\t\t$maxdate = \"2099-12-31\";\n\t\t$mindate = \"1900-01-01\";\n\t\t$datevalue = array();\n\n\t\tif($type == \"today\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"yesterday\" )\n\t\t{\n\t\t\t$yesterday = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-1, date(\"Y\")));\n\t\t\t$datevalue[0] = $yesterday;\n\t\t\t$datevalue[1] = $yesterday;\n\t\t}\n\t\telseif($type == \"tomorrow\" )\n\t\t{\n\t\t\t$tomorrow = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\")));\n\t\t\t$datevalue[0] = $tomorrow;\n\t\t\t$datevalue[1] = $tomorrow;\n\t\t}\n\t\telseif($type == \"thisweek\" )\n\t\t{\n\t\t\t$thisweek0 = date(\"Y-m-d\",strtotime(\"-1 week Sunday\"));\n\t\t\t$thisweek1 = date(\"Y-m-d\",strtotime(\"this Saturday\"));\n\t\t\t$datevalue[0] = $thisweek0;\n\t\t\t$datevalue[1] = $thisweek1;\n\t\t}\n\t\telseif($type == \"lastweek\" )\n\t\t{\n\t\t\t$lastweek0 = date(\"Y-m-d\",strtotime(\"-2 week Sunday\"));\n\t\t\t$lastweek1 = date(\"Y-m-d\",strtotime(\"-1 week Saturday\"));\n\t\t\t$datevalue[0] = $lastweek0;\n\t\t\t$datevalue[1] = $lastweek1;\n\t\t}\n\t\telseif($type == \"nextweek\" )\n\t\t{\n\t\t\t$nextweek0 = date(\"Y-m-d\",strtotime(\"this Sunday\"));\n\t\t $nextweek1 = date(\"Y-m-d\",strtotime(\"+1 week Saturday\"));\n\t\t\t$datevalue[0] = $nextweek0;\n\t\t\t$datevalue[1] = $nextweek1;\n\t\t}\n\t\telseif($type == \"thismonth\" )\n\t\t{\n\t\t\t$currentmonth0 = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\"), \"01\", date(\"Y\")));\n\t\t\t$currentmonth1 = date(\"Y-m-t\");\n\t\t\t$datevalue[0] =$currentmonth0;\n\t\t\t$datevalue[1] = $currentmonth1;\n\t\t}\n\n\t\telseif($type == \"lastmonth\" )\n\t\t{\n\t\t\t$lastmonth0 = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\")-1, \"01\", date(\"Y\")));\n\t\t\t$lastmonth1 = date(\"Y-m-t\", mktime(0, 0, 0, date(\"m\")-1, \"01\", date(\"Y\")));\n\t\t\t$datevalue[0] = $lastmonth0;\n\t\t\t$datevalue[1] = $lastmonth1;\n\t\t}\n\t\telseif($type == \"nextmonth\" )\n\t\t{\n\t\t\t$nextmonth0 = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\")+1, \"01\", date(\"Y\")));\n\t\t $nextmonth1 = date(\"Y-m-t\", mktime(0, 0, 0, date(\"m\")+1, \"01\", date(\"Y\")));\n\t\t\t$datevalue[0] = $nextmonth0;\n\t\t\t$datevalue[1] = $nextmonth1;\n\t\t}\n\t\telseif($type == \"next3days\" )\n\t\t{\n\t\t\t$next7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+2, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next7days;\n\t\t}\n\t\telseif($type == \"next7days\" )\n\t\t{\n\t\t\t$next7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+6, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next7days;\n\t\t}\n\t\telseif($type == \"next15days\" )\n\t\t{\n\t\t\t$next7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+14, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next7days;\n\t\t}\n\t\telseif($type == \"next30days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+29, date(\"Y\")));\n\n\t\t\t$datevalue[0] =$today;\n\t\t\t$datevalue[1] =$next30days;\n\t\t}\n\t\telseif($type == \"next60days\" )\n\t\t{\n\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+59, date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next60days;\n\t\t}\n\t\telseif($type == \"next90days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next90days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+89, date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next90days;\n\t\t}\n\t\telseif($type == \"next180days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+179, date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next180days;\n\t\t}\n\t\telseif($type == \"before3days\" )\n\t\t{\n\t\t\t$before7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-3, date(\"Y\")));\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before7days;\n\t\t}\n\t\telseif($type == \"before7days\" )\n\t\t{\n\t\t\t$before7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-7, date(\"Y\")));\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before7days;\n\t\t}\n\t\telseif($type == \"before15days\" )\n\t\t{\n\t\t\t$before7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-15, date(\"Y\")));\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before7days;\n\t\t}\n\t\telseif($type == \"before30days\" )\n\t\t{\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-30, date(\"Y\")));\n\n\t\t\t$datevalue[0] =$mindate;\n\t\t\t$datevalue[1] =$before30days;\n\t\t}\n\t\telseif($type == \"before60days\" )\n\t\t{\n\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-60, date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before60days;\n\t\t}\n\t\telseif($type == \"before100days\" )\n\t\t{\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before100days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-100, date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before100days;\n\t\t}\n\t\telseif($type == \"before180days\" )\n\t\t{\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-180, date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before180days;\n\t\t}\n\t\telseif($type == \"after3days\" )\n\t\t{\n\t\t\t$after7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+2, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $after7days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after7days\" )\n\t\t{\n\t\t\t$after7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+6, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $after7days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after15days\" )\n\t\t{\n\t\t\t$after7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+14, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $after7days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after30days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+29, date(\"Y\")));\n\n\t\t\t$datevalue[0] =$after30days;\n\t\t\t$datevalue[1] =$maxdate;\n\t\t}\n\t\telseif($type == \"after60days\" )\n\t\t{\n\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+59, date(\"Y\")));\n\t\t\t$datevalue[0] = $after60days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after100days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after100days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+99, date(\"Y\")));\n\t\t\t$datevalue[0] = $after100days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after180days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+179, date(\"Y\")));\n\t\t\t$datevalue[0] = $after180days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"last3days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-2, date(\"Y\")));\n\t\t\t$datevalue[0] = $last7days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last7days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-6, date(\"Y\")));\n\t\t\t$datevalue[0] = $last7days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last15days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-14, date(\"Y\")));\n\t\t\t$datevalue[0] = $last7days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last30days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-29, date(\"Y\")));\n\t\t\t$datevalue[0] = $last30days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last60days\" )\n\t\t{\n\t\t\t$last60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-59, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $last60days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telse if($type == \"last90days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last90days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-89, date(\"Y\")));\n\t\t\t$datevalue[0] = $last90days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last180days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-179, date(\"Y\")));\n\t\t\t$datevalue[0] = $last180days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"thisfy\" )\n\t\t{\n\t\t\t$currentFY0 = date(\"Y-m-d\",mktime(0, 0, 0, \"01\", \"01\", date(\"Y\")));\n\t\t\t$currentFY1 = date(\"Y-m-t\",mktime(0, 0, 0, \"12\", date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $currentFY0;\n\t\t\t$datevalue[1] = $currentFY1;\n\t\t}\n\t\telseif($type == \"prevfy\" )\n\t\t{\n\t\t\t$lastFY0 = date(\"Y-m-d\",mktime(0, 0, 0, \"01\", \"01\", date(\"Y\")-1));\n\t\t\t$lastFY1 = date(\"Y-m-t\", mktime(0, 0, 0, \"12\", date(\"d\"), date(\"Y\")-1));\n\t\t\t$datevalue[0] = $lastFY0;\n\t\t\t$datevalue[1] = $lastFY1;\n\t\t}\n\t\telseif($type == \"nextfy\" )\n\t\t{\n\t\t\t$nextFY0 = date(\"Y-m-d\",mktime(0, 0, 0, \"01\", \"01\", date(\"Y\")+1));\n\t\t\t$nextFY1 = date(\"Y-m-t\", mktime(0, 0, 0, \"12\", date(\"d\"), date(\"Y\")+1));\n\t\t\t$datevalue[0] = $nextFY0;\n\t\t\t$datevalue[1] = $nextFY1;\n\t\t}\n\t\telseif($type == \"nextfq\" )\n\t\t{\n\t\t\tif(date(\"m\") <= 3)\n\t\t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"04\",\"01\",date(\"Y\")));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"06\",\"30\",date(\"Y\")));\n \t\t}else if(date(\"m\") > 3 and date(\"m\") <= 6)\n \t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"07\",\"01\",date(\"Y\")));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"09\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 6 and date(\"m\") <= 9)\n \t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"10\",\"01\",date(\"Y\")));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"12\",\"31\",date(\"Y\")));\n\n \t\t}\n\t\t\telse\n \t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"01\",\"01\",date(\"Y\")+1));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"03\",\"31\",date(\"Y\")+1));\n \t\t}\n\t\t\t$datevalue[0] = $nFq;\n\t\t\t$datevalue[1] = $nFq1;\n\t\t}\n\t\telseif($type == \"prevfq\" )\n\t\t{\n\t\t\tif(date(\"m\") <= 3)\n\t\t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"10\",\"01\",date(\"Y\")-1));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"12\",\"31\",date(\"Y\")-1));\n \t\t}\n\t\t\telse if(date(\"m\") > 3 and date(\"m\") <= 6)\n \t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"01\",\"01\",date(\"Y\")));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"03\",\"31\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 6 and date(\"m\") <= 9)\n \t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"04\",\"01\",date(\"Y\")));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"06\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse\n \t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"07\",\"01\",date(\"Y\")));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"09\",\"30\",date(\"Y\")));\n \t\t}\n\t\t\t$datevalue[0] = $pFq;\n\t\t\t$datevalue[1] = $pFq1;\n\t\t}\n\t\telseif($type == \"thisfq\")\n\t\t{\n\t\t\tif(date(\"m\") <= 3)\n\t\t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"01\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"03\",\"31\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 3 and date(\"m\") <= 6)\n \t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"04\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"06\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 6 and date(\"m\") <= 9)\n \t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"07\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"09\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse\n \t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"10\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"12\",\"31\",date(\"Y\")));\n \t\t}\n\t\t\t$datevalue[0] = $cFq;\n\t\t\t$datevalue[1] = $cFq1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$datevalue[0] = \"\";\n\t\t\t$datevalue[1] = \"\";\n\t\t}\n\n\t\treturn $datevalue;\n\t}", "title": "" }, { "docid": "fa0e17fa611ccba2165df9295d8210d5", "score": "0.49126953", "text": "public static function should_remove_date_filters( $query ) {\n\t\t\t// if we're doing ajax, let's keep the date filters\n\t\t\tif ( tribe( 'context' )->doing_ajax() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// otherwise, let's remove the date filters if we're in the admin dashboard and the query is\n\t\t\t// and event query on the tribe_events edit page\n\t\t\treturn (\n\t\t\t\tis_admin()\n\t\t\t\t&& $query->tribe_is_event_query\n\t\t\t\t&& Tribe__Admin__Helpers::instance()->is_screen( 'edit-' . Tribe__Events__Main::POSTTYPE )\n\t\t\t)\n\t\t\t|| true === $query->get( 'tribe_remove_date_filters', false );\n\t\t}", "title": "" }, { "docid": "e1b464ecafb0a2f2a2362449ff8ddda8", "score": "0.49040937", "text": "protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and')\n {\n return $this->callHook(\"where{$type}\", $this->packArgs(compact('column', 'operator', 'value', 'boolean')));\n }", "title": "" }, { "docid": "0cfe09eb23837ab2956242ed4eaf51d1", "score": "0.48513946", "text": "public function scopeFilter($query, $filters) {\n if( $month = $filters['month'] ) {\n\n // Carbon::parse($month)->month --> converts to month number. \n $query->whereMonth('created_at', Carbon::parse($month)->month );\n }\n\n if( $year = $filters['year'] ) {\n \n $query->whereYear('created_at', $year );\n }\n\n }", "title": "" }, { "docid": "bfc550d60a0f4cdf059aeb8836fc95be", "score": "0.48400205", "text": "function get_date_where($max_levels=3)\n {\n global $page;\n $date = $page['chronology_date'];\n while (count($date)>$max_levels)\n {\n array_pop($date);\n }\n $res = '';\n if (isset($date[CYEAR]) and $date[CYEAR]!=='any')\n {\n $y = $date[CYEAR];\n $res = \" AND $this->date_field BETWEEN '$y-01-01' AND '$y-12-31 23:59:59'\";\n }\n\n if (isset($date[CWEEK]) and $date[CWEEK]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CWEEK]['sql'].'='.$date[CWEEK];\n }\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\n }\n if (empty($res))\n {\n $res = ' AND '.$this->date_field.' IS NOT NULL';\n }\n return $res;\n }", "title": "" }, { "docid": "5a3756c6dc5a5e4d33663e92c688f0bb", "score": "0.4837852", "text": "public function scopePublishedAfter($query, $date)\n {\n $query->where('created_at', '>=', $date);\n }", "title": "" }, { "docid": "0f395a8f5b5daff23da43e9bbb7fee71", "score": "0.48036596", "text": "function filtersecondary()\r\n\t{\t\r\n\t\t// make date and time variables\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t// get categories for filtering\r\n\t\t\r\n\t\t$filter_category = JRequest::getVar( 'filter_category' );\r\n\t\t$model->setState( 'filter_secondary_category', $filter_category );\r\n\t\t\r\n\t\t$model->setState( 'order', 'tbl.eventinstance_date' );\r\n\t\t$model->setState( 'direction', 'ASC' );\r\n\t\t$query = $model->getQuery( );\r\n\t\t$query->order( 'tbl.eventinstance_time' );\r\n\t\t$model->setQuery( $query );\r\n\t\t\r\n\t\t$vars->date = $date;\r\n\t\t$vars->items = $model->getList( );\r\n\t\t\r\n\t\t$html = $this->getLayout( 'default', $vars, 'three' ); \r\n\t\techo ( json_encode( array('msg'=>$html) ) );\r\n\t}", "title": "" }, { "docid": "f66d2227b3d26338fa6beaa1a0ef74de", "score": "0.47997433", "text": "public function filterAction()\r\n {\r\n \t/*\r\n \t * form needs to include:\r\n \t * \r\n \t * user id\r\n \t * task category\r\n \t * client id\r\n \t * project id\r\n \t * start date\r\n \t * end date\r\n \t */\r\n $this->view->allUsers = $this->userService->getUserList();\r\n $task = new Task();\r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->clients = $this->clientService->getClients();\r\n \t $this->view->projects = new ArrayObject();\r\n $this->renderView('timesheet/filter.php'); \t\r\n }", "title": "" }, { "docid": "4bca08df9b45888b725e7cb261e0c936", "score": "0.4795844", "text": "public function Filter_createdateDyn($value, $negate) {\r\n\t\t$timeStamps = TodoyuSearchFilterHelper::getDynamicDateTimestamp($value, $negate);\r\n\r\n\t\treturn $this->Filter_dateDyn($timeStamps, 'date_create', $negate);\r\n\t}", "title": "" }, { "docid": "fafff90c9207fba1988ff1ffbab0e102", "score": "0.47860122", "text": "function getColumnFilter ( &$where = array(),\n $table,\n $column,\n $columnLogicOpr,\n $minOper,\n $minValue,\n $rangeLogicOper,\n $maxOper,\n $maxValue ) {\n if ( ($minOper != \"\" and $minValue != \"\") and ( $maxValue == \"\" )) {\n $where[] = \"$columnLogicOpr \".self::getTableAlias( $table ).\".$column \".self::assignSymbol( $minOper ).\" $minValue\";\n }\n // Assign just the max limit\n if ( ($maxOper != \"\" and $maxValue != \"\") and ( $minValue == \"\") ) {\n $where[] = \"$columnLogicOpr \". self::getTableAlias ($table) . \".$column \".self::assignSymbol($maxOper).\" $maxValue\";\n }\n\t// Assign both min and max limit\n if ( ($maxOper != \"\" and $maxValue != \"\") and ($minOper != \"\" and $minValue != \"\") ) {\n $where[] = \"$columnLogicOpr ( \".self::getTableAlias( $table ).\".$column \".self::assignSymbol( $minOper ).\" $minValue $rangeLogicOper \".\n self::getTableAlias ($table) . \".$column \".self::assignSymbol($maxOper).\" $maxValue )\";\n }\n }", "title": "" }, { "docid": "2584725220447762439923e2d8bc3026", "score": "0.47745287", "text": "public function twig_filter_tdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('tdate', function ($_string, $_format =\"Y/m/d\", $_convert = true)\n\t\t{\n\t\t\t$result = $_string;\n\t\t\tif($this->data->site['currentlang'] == 'fa')\n\t\t\t{\n\t\t\t\t$result = \\lib\\utility\\jdate::date($_format, $_string, $_convert);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = date($_format, strtotime($_string));\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t});\n\t}", "title": "" }, { "docid": "f517a5ca5834e6e5e4e4b2eff85d02f4", "score": "0.47505686", "text": "function getDateFilterSelectedDate() {\n $on = $this->getAdditionalProperty('date_filter_on');\n \n return $on ? new DateValue($on) : null;\n }", "title": "" }, { "docid": "f14f0bb14b3c29e8530aef625a9c52c5", "score": "0.4737189", "text": "protected function _applyDateRangeFilter()\n {\n // Remember that field PERIOD is a DATE(YYYY-MM-DD) in all databases including Oracle\n\n if ($this->_from !== null) {\n $this->getSelect()->where('created_time >= ?', $this->_from .' 00:00:00');\n }\n if ($this->_to !== null) {\n $this->getSelect()->where('created_time <= ?', $this->_to .' 23:59:59');\n }\n\n return $this;\n\n }", "title": "" }, { "docid": "fe79d7023b0225b3c383194deb21150c", "score": "0.4722661", "text": "public function getFileFilterByDate($conn, $date){\n\t\t//preparo lo statement che mi ricava tutte le informazioni \n\t\t$sth = $conn->prepare(\"select * from Filmato_Presentazione where data_inizio >= :data_inizio or data_fine >= :data_fine limit 1\");\n\t\t$sth->bindParam(':data_inizio', $date, PDO::PARAM_STR);\n\t\t$sth->bindParam(':data_fine', $date, PDO::PARAM_STR);\n\t\t$sth->execute();\n\t\treturn $sth; \n\t}", "title": "" }, { "docid": "39fa9551fa3b4601a727adc6e96a2865", "score": "0.4722035", "text": "public function filterByDate()\n {\n global $connection;\n //echo \"Im on the purchases ->filterByDate()\";\n\n //else\n //{\n #set_error_handler\n #set_exception_handler\n #call the stored procedure\n \n \n $SQLQuery = \"CALL purchases_filter_date(\"\n . \":fk_customer_id,\"\n . \":fk_product_id,\"\n . \":purchase_quantity,\"\n . \":purchase_price,\"\n . \":purchase_comment,\"\n . \":purchase_subtotal,\"\n . \":purchase_taxesAmount,\"\n . \":purchase_grandtotal,\"\n . \":purchase_id);\";\n $PDOStatement = $connection->prepare($SQLQuery);\n $PDOStatement->bindParam(\":fk_customer_id\", $this->customer_id);\n $PDOStatement->bindParam(\":fk_product_id\", $this->product_id);\n $PDOStatement->bindParam(\":purchase_quantity\", $this->purchase_quantity);\n $PDOStatement->bindParam(\":purchase_price\", $this->purchase_price);\n $PDOStatement->bindParam(\":purchase_comment\", $this->purchase_comment);\n $PDOStatement->bindParam(\":purchase_subtotal\", $this->purchase_subtotal);\n $PDOStatement->bindParam(\":purchase_taxesAmount\", $this->purchase_taxesAmount);\n $PDOStatement->bindParam(\":purchase_grandtotal\", $this->purchase_grandtotal);\n $PDOStatement->bindParam(\":purchase_id\", $this->purchase_id); \n $PDOStatement->execute(); \n }", "title": "" }, { "docid": "5437479e75616da6193a7c1728715c59", "score": "0.47145924", "text": "function wck_fep_filter_auto_drafts_where( $where = '' ){\n\t\t// posts older than 12 hours\n\t\t$where .= \" AND post_date <= '\" . date('Y-m-d H:i:s', strtotime('-12 hours')) . \"'\";\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "d53ed9a83ecc78cfd48313520dbc5592", "score": "0.47128385", "text": "protected function filterQuery(&$query) {\n foreach($this->filter_params as $filter) {\n if(Input::has($filter)) {\n $val = Input::get($filter);\n $query->where($filter, '=', $val);\n }\n }\n }", "title": "" }, { "docid": "bcb443e823d0ff4881080aea164a51ee", "score": "0.4700585", "text": "function get_occurs_within_where_clause($table_name, $rel_table, $start_ts_obj, $end_ts_obj, $field_name='date_start', $view){\n\t\tglobal $timedate;\n\t\n\t\t$start = clone $start_ts_obj;\n\t\t$end = clone $end_ts_obj;\n\n\t\t$field_date = $table_name.'.'.$field_name;\n\t\t$start_day = $GLOBALS['db']->convert(\"'{$start->asDb()}'\",'datetime');\n\t\t$end_day = $GLOBALS['db']->convert(\"'{$end->asDb()}'\",'datetime');\n\n\t\t$where = \"($field_date >= $start_day AND $field_date < $end_day\";\n\t\tif($rel_table != ''){\n\t\t\t$where .= \" AND $rel_table.accept_status != 'decline'\";\n\t\t}\n\n\t\t$where .= \")\";\n\t\treturn $where;\n\t}", "title": "" }, { "docid": "8c27d34d0aa2f2fe3aae7b9c6d196f3d", "score": "0.46966797", "text": "function filterprimary()\r\n\t{\t\r\n\t\t// make date and time variables\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t// take filter categories and do filtering\r\n\t\t$elements = json_decode( preg_replace('/[\\n\\r]+/', '\\n', JRequest::getVar( 'elements', '', 'post', 'string' ) ) );\r\n\t\t\r\n\t\t$categories = array();\r\n\t\tforeach($elements as $element)\r\n\t\t{\r\n\t\t\tif($element->checked && strpos ( $element->name , 'primary_cat_' ) !== false )\r\n\t\t\t{\r\n\t\t\t\t$categories[$element->name] = $element->value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$model->setState( 'filter_primary_categories', $categories );\r\n\t\t\r\n\t\t// order event instances by date and time\r\n\t\t$model->setState( 'order', 'tbl.eventinstance_date' );\r\n\t\t$model->setState( 'direction', 'ASC' );\r\n\t\t$query = $model->getQuery( );\r\n\t\t$query->order( 'tbl.eventinstance_start_time' );\r\n\t\t$model->setQuery( $query );\r\n\t\t\r\n\t\t// attach variables to the $vars object\r\n\t\t$vars->date = $date;\r\n\t\t$vars->items = $model->getList( );\r\n\t\t\r\n\t\t// echo output\r\n\t\t$html = $this->getLayout( 'default', $vars, 'three' ); \r\n\t\techo ( json_encode( array('msg'=>$html) ) );\r\n\t}", "title": "" }, { "docid": "783309896e344013dd9a51fa2f8e605f", "score": "0.4695176", "text": "abstract public function filter(Octopus_Model_ResultSet $resultSet, $query);", "title": "" }, { "docid": "54ceeef96f5e97c5fbc56b29d00859c6", "score": "0.46802437", "text": "public static function filter($table, $fields){ \r\n $queryType = \"filter\";\r\n include '../helper/retrieve_data.php'; //query and data rertrieval are handled here\r\n return $querySet;\r\n }", "title": "" }, { "docid": "cc050acd63a9a8029dd646d9c6436ace", "score": "0.46778077", "text": "function getFilterEndDate($date)\n{\n $endDate = date('Y-m-d', strtotime('+1 day', strtotime($date)));\n if (!$date)\n $endDate = date(\"9999-12-31 23:59:59\");\n return $endDate;\n}", "title": "" }, { "docid": "f60d90b74247a8afc8908335dd22e012", "score": "0.4664104", "text": "protected function dates_filter(){\n \t//+Constraint Isgi: only one year data\n \t$temporal = $this->get_temporal();\n \tif( strtolower($temporal->end) == \"now\"){\n \t\t$now = new \\DateTime();\n \t\t$temporal->end = $now->format(\"Y-m-d\");\n \t}\n \t\n \t\n \t//change start and end\n \tif( $this->start < $temporal->start){\n \t\t$this->start = $temporal->start;\n \t}\n \tif( $this->end > $temporal->end){\n \t\t$this->end = $temporal->end;\n \t}\n \t$update = $this->get_update();\n \tif( !empty( $update) && $update < $this->end){\n \t\t$this->end = $update;\n \t}\n \t// diff between start and end\n \t$start = new \\DateTime( $this->start);\n \t$end = new \\DateTime( $this->end);\n \t$interval = $start->diff( $end);\n \tif( $interval->invert){\n \t\t//end < start\n \t\t$this->error = \"NO_DATA\";\n \t}else{\n\t \tif( $interval->days > 365){\n\t \t\t$start = clone $end;\n\t \t\t$start->sub( new \\DateInterval(\"P364D\"));\n\t \t\t$this->start = $start->format(\"Y-m-d\");\n\t \t}\n \t}\n }", "title": "" }, { "docid": "7e1eb098b38e2b9121caf6a09c86b2ab", "score": "0.46535712", "text": "public function getFilterTimeCount() {\n \n $columns = array();\n $params = array();\n\n // TODAY\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :todayStart AND n.start_date <= :todayEnd \n OR\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \n OR\n n.start_date < :todayStart AND n.end_date > :todayEnd \n THEN 1 \n ELSE 0 \n END\n ) as today\";\n $params['todayStart'] = $dateStart;\n $params['todayEnd'] = $dateEnd;\n\n // YESTERDAY\n $dateStart = new \\DateTime('yesterday');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime('yesterday');\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \n OR\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \n OR\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \n THEN 1 \n ELSE 0 \n END\n ) as yesterday\";\n $params['yesterdayStart'] = $dateStart;\n $params['yesterdayEnd'] = $dateEnd;\n\n // THIS WEEK\n $today = new \\DateTime();\n if('Sunday' == $today->format('l')) {\n $dateStart = clone $today;\n $dateStart->modify('Monday last week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = $today;\n $dateEnd->setTime(23, 59, 59);\n } else {\n $dateStart = clone $today;\n $dateStart->modify('Monday this week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = clone $today;\n $dateEnd->modify('Sunday this week');\n $dateEnd->setTime(23, 59, 59);\n }\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \n OR\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \n OR\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as thisWeek\";\n $params['thisWeekStart'] = $dateStart;\n $params['thisWeekEnd'] = $dateEnd;\n\n // LAST WEEK\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P7D'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \n OR\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \n OR\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as lastWeek\";\n $params['lastWeekStart'] = $dateStart;\n $params['lastWeekEnd'] = $dateEnd;\n \n // PAST MONTH\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P1M'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \n OR\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \n OR\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \n THEN 1 \n ELSE 0 \n END\n ) as pastMonth\";\n $params['pastMonthStart'] = $dateStart;\n $params['pastMonthEnd'] = $dateEnd;\n\n return $this->createQueryBuilder('n')\n ->select(implode(', ', $columns))\n ->where('n.draft = false')\n ->setParameters($params)\n ->getQuery()\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "ed0dbc56c4ec5ff82003b88078ea7601", "score": "0.46339327", "text": "public function scopePastEventsOnly($query)\n {\n return $query->where('date_start', '<=', Carbon::now());\n }", "title": "" }, { "docid": "a7232f7057b4fc0f515fc3276c946037", "score": "0.45658055", "text": "public function findTribeEventsByDate($tribe) \n {\n $date = new \\DateTime('now'); \n $date->modify('-10 days');\n\n $qb = $this->createQueryBuilder('e')\n ->join('e.tribe', 't')\n ->addselect('t')\n ->join('e.user', 'u')\n ->addselect('u')\n ->join('e.category', 'c')\n ->addselect('c')\n ->where('e.tribe = :myTribe')\n ->andWhere('e.createdAt > :date')\n ->setParameters([\n 'myTribe' => $tribe,\n 'date' => $date\n ])\n ;\n\n return $qb->getQuery()->getArrayResult();\n }", "title": "" }, { "docid": "b341324552dc2b52b593135e75ab43c8", "score": "0.45548645", "text": "protected function dateBasedWhere($type, Builder $query, $where)\n {\n $value = $this->parameter($where['value']);\n\n return $type.'('.$this->wrap($where['column']).') '.$where['operator'].' '.$value;\n }", "title": "" }, { "docid": "88124f3461f00004563c5fb3c4b6f58e", "score": "0.45537654", "text": "public function setDate($value){\n return $this->setParameter('date', $value);\n }", "title": "" }, { "docid": "0633c42d4b718250c4b318de604a8b66", "score": "0.45497492", "text": "protected function filterDate($date)\n {\n switch (true)\n {\n case (!$date || !strlen(trim(implode('', (array) $date)))):\n case (is_array($date) && (!isset($date['year']) || !isset($date['month']) || !isset($date['day']))):\n // $date is null or is an array with empty or zero string elements\n // or one of its components is not set (year, month, day)\n return null;\n case (is_array($date)):\n // is an array and is not bad formed\n return $date['year'].'-'.$date['month'].'-'.$date['day'];\n default:\n // is not an array\n return $date;\n }\n }", "title": "" }, { "docid": "ca7ae146f421717ecda700a2ea4bb2a6", "score": "0.45443663", "text": "private function _sql_custom_date_filter($date_value, $operation='=') {\n\t\tglobal $wpdb;\n\t\tif ($date_value) {\n\t\t\t$query = \" AND ({$wpdb->postmeta}.meta_key = %s AND {$wpdb->postmeta}.meta_value $operation %s)\";\n\t\t\treturn $wpdb->prepare( $query, $this->date_column, $date_value );\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "f799d8699899640cc1f0a4157a4d1244", "score": "0.45411038", "text": "function _max_date($field, $date)\r\n\t{\r\n\t\treturn (strtotime($this->{$field}) > strtotime($date)) ? FALSE : TRUE;\r\n\t}", "title": "" }, { "docid": "c84b9cf932d345078d68746c655dfb0f", "score": "0.45355132", "text": "public function scopeResultsLastPublishedAt($query)\n {\n // Get the last published_at from results\n $lastPublishedAt = $this->latest('published_at')->value('published_at');\n\n // Filter the results of the last pusblished_at\n return $query->where('published_at', $lastPublishedAt);\n }", "title": "" }, { "docid": "7a8bfe179af1c821a2864bc9929d8402", "score": "0.4531833", "text": "public function scopeLastDate($query) {\n return $query->orderBy('date', 'desc');\n }", "title": "" }, { "docid": "8f96d9fe96cabe779ea2659bcbcea071", "score": "0.45195037", "text": "private function modifyQuery($query, $tasksTable, $casesTable, $tpTable, $filteredTasksTable = false, $args)\n\t{\n\t\t$type = 'default';\n\t\tif (!empty($args['type'])) {\n\t\t\t$type = $args['type'];\n\t\t}\n\n\t\t$query->whereNested(function ($query) use ($tasksTable, $casesTable, $tpTable, $filteredTasksTable, $args) {\n\t\t\tif (!empty($args['addConditions'])) {\n\t\t\t\t$args['addConditions']($query);\n\t\t\t}\n\n\t\t\tif ($tasksTable) {\n\t\t\t\tif (count($this->fields->assignee)) {\n\t\t\t\t\t$query->whereIn(\"{$tasksTable}.assignee_id\", $this->fields->assignee);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->assignor)) {\n\t\t\t\t\t$query->whereIn(\"{$tasksTable}.assignor_id\", $this->fields->assignor);\n\t\t\t\t}\n\t\t\t\tif ($this->fields->surveystatus !== false) {\n\t\t\t\t\t$query->where(\"{$tasksTable}.status\", '=', $this->fields->surveystatus);\n\t\t\t\t}\n\t\t\t\tif (!$casesTable) {\n\t\t\t\t\tif (count($this->fields->caseid)) {\n\t\t\t\t\t\t$query->whereIn(\"{$tasksTable}.case_id\", $this->fields->caseid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($casesTable) {\n\t\t\t\tif ($this->fields->casestatus !== false) {\n\t\t\t\t\t$query->where(\"{$casesTable}.status\", '=', $this->fields->casestatus);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->patient)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.patient_id\", $this->fields->patient);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->tp)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.treatment_path_id\", $this->fields->tp);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->tpstep)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.step_id\", $this->fields->tpstep);\n\t\t\t\t}\n\n\t\t\t\tif (count($this->fields->caseid)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.id\", $this->fields->caseid);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($tpTable) {\n\t\t\t\tif (count($this->fields->cp)) {\n\t\t\t\t\t$query->whereIn(\"{$tpTable}.clinical_path_id\", $this->fields->cp);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($filteredTasksTable) {\n\t\t\t\t$query->whereNotNull(\"{$filteredTasksTable}.id\");\n\t\t\t}\n\t\t});\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "301de3df9ea0a7a9279cf1a6b4c94cff", "score": "0.45118698", "text": "protected function dateBasedWhere(string $type, Builder $query, array $where)\n {\n $value = $this->parameter($where['value']);\n\n return $type . '(' . $this->wrap($where['column']) . ') ' . $where['operator'] . ' ' . $value;\n }", "title": "" }, { "docid": "5854f0a4adfc98c89535fa198f80a0cc", "score": "0.45077533", "text": "protected function filter(&$query)\n {\n if (!empty($this->filterModel)) {\n if (isset($this->filterModel->status_id)) {\n $query->andWhere(['status' => $this->filterModel->status_id]);\n }\n }\n }", "title": "" }, { "docid": "100ac7a6afac18a139e5a00abf201650", "score": "0.45069352", "text": "private static function _getFilter() {}", "title": "" }, { "docid": "c131d6eb0725d75e813946262691f47d", "score": "0.45003167", "text": "private function compare_with_date()\n {\n }", "title": "" }, { "docid": "ab8e304136c6568e7c8b94932665f501", "score": "0.44866413", "text": "public function get_filter_data()\n {\n if(!empty($_POST['cntxt']))\n {\n if($_POST['cntxt']=='today')\n {\n $from_date=date('Y-m-d');\n $to_date=date('Y-m-d');\n }\n // echo date('d/m/Y', strtotime('-7 days'));\n if($_POST['cntxt']=='7 days')\n {\n $to_date=date('Y-m-d');\n $from_date = date('Y-m-d',strtotime(\"-7 days\"));\n }\n if($_POST['cntxt']=='30 days')\n {\n $to_date=date('Y-m-d');\n $from_date = date('Y-m-d',strtotime(\"-30 days\"));\n }\n if($_POST['cntxt']=='this month')\n {\n $to_date=date('Y-m-d');\n $from_date = date('Y-m-01');\n }\n if($_POST['cntxt']=='last month')\n {\n $to_date= date('Y-m-d', strtotime('last day of last month'));\n $from_date = date('Y-m-d', strtotime('first day of last month'));\n }\n \n $this->process_data($from_date,$to_date); \n }\n else\n {\n $data['status_text']='Input error';\n $data['status_code']='0';\n echo json_encode($data);\n }\n \n }", "title": "" }, { "docid": "051486b035ce2ad935f9d1d46af6592f", "score": "0.44836998", "text": "public function filter($date)\n {\n if (empty($date)) {\n return null;\n } elseif (is_string($date)) {\n return $date;\n } elseif (!is_array($date) || empty($date['year']) || empty($date['month']) || empty($date['day'])) {\n return null;\n }\n\n return $date['year'] . '-' . $date['month'] . '-' . $date['day'];\n }", "title": "" }, { "docid": "678e5388c6962f57f83270db89bad216", "score": "0.4483415", "text": "public function __invoke($query, $input)\n {\n $arguments = $this->getFilterParams($input);\n\n return $query->where($arguments);\n }", "title": "" }, { "docid": "34a44132503d56a91d768fa9b72dd44e", "score": "0.44764555", "text": "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \n }\n\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }", "title": "" }, { "docid": "eaa57f83d7817bc1eb3d5f6c49a72265", "score": "0.44731528", "text": "protected function _applyDateRangeFilter() {\r\n return $this;\r\n }", "title": "" }, { "docid": "9916963fafe241a55e41316b3bde7ada", "score": "0.44635335", "text": "function get_date_where($max_levels=3)\n {\n global $page;\n\n $date = $page['chronology_date'];\n while (count($date)>$max_levels)\n {\n array_pop($date);\n }\n $res = '';\n if (isset($date[CYEAR]) and $date[CYEAR]!=='any')\n {\n $b = $date[CYEAR] . '-';\n $e = $date[CYEAR] . '-';\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\n {\n $b .= sprintf('%02d-', $date[CMONTH]);\n $e .= sprintf('%02d-', $date[CMONTH]);\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $b .= sprintf('%02d', $date[CDAY]);\n $e .= sprintf('%02d', $date[CDAY]);\n }\n else\n {\n $b .= '01';\n $e .= $this->get_all_days_in_month($date[CYEAR], $date[CMONTH]);\n }\n }\n else\n {\n $b .= '01-01';\n $e .= '12-31';\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];\n }\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\n }\n }\n $res = \" AND $this->date_field BETWEEN '$b' AND '$e 23:59:59'\" . $res;\n }\n else\n {\n $res = ' AND '.$this->date_field.' IS NOT NULL';\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];\n }\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\n }\n }\n return $res;\n }", "title": "" }, { "docid": "a9fbb2515b46cfb27dbf15780897b1be", "score": "0.44630572", "text": "private function sql_whereAnd_fromTS()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS value\n $andWhere = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'andWhere' ];\n\n if ( !empty( $andWhere ) )\n {\n $andWhere = \" AND \" . $andWhere;\n }\n\n // RETURN AND WHERE statement\n return $andWhere;\n }", "title": "" }, { "docid": "ce5b5e4fbff6c0548d9698e75312bb83", "score": "0.44617042", "text": "public function __invoke($query, $input)\n {\n $arguments = $this->getFilterParams($input);\n \n // Convert the invoice_date parameter to created_at parameter\n if ( isset($arguments['invoice_date'])) {\n\n $arguments['created_at'] = $arguments['invoice_date'];\n\n unset($arguments['invoice_date']);\n }\n\n // Convert the grand_total parameter to base_grand_total parameter\n if ( isset($arguments['grand_total'])) {\n\n $arguments['base_grand_total'] = $arguments['grand_total'];\n\n unset($arguments['grand_total']);\n }\n\n return $query->where($arguments);\n }", "title": "" }, { "docid": "1603cd3124cde07cf1ad4d75dbec19ad", "score": "0.4458376", "text": "protected function addCommonViewFiltersForDate(QueryBuilder $qb)\n {\n if (null === $this->request) {\n return $qb;\n }\n $routeName = $this->request->get('_route');\n if (false !== strpos($routeName, 'edit')) {\n return $qb;\n }\n \n $parameters = $this->getViewQuickNavParametersForDate();\n foreach ($parameters as $k => $v) {\n if ($k == 'catId') {\n if (intval($v) > 0) {\n // single category filter\n $qb->andWhere('tblCategories.category = :category')\n ->setParameter('category', $v);\n }\n continue;\n }\n if ($k == 'catIdList') {\n // multi category filter\n $qb = $this->categoryHelper->buildFilterClauses($qb, 'date', $v);\n continue;\n }\n if (in_array($k, ['q', 'searchterm'])) {\n // quick search\n if (!empty($v)) {\n $qb = $this->addSearchFilter('date', $qb, $v);\n }\n continue;\n }\n \n if (is_array($v)) {\n continue;\n }\n \n // field filter\n if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {\n if ($k == 'workflowState' && substr($v, 0, 1) == '!') {\n $qb->andWhere('tbl.' . $k . ' != :' . $k)\n ->setParameter($k, substr($v, 1, strlen($v)-1));\n } elseif (substr($v, 0, 1) == '%') {\n $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)\n ->setParameter($k, '%' . substr($v, 1) . '%');\n } else {\n $qb->andWhere('tbl.' . $k . ' = :' . $k)\n ->setParameter($k, $v);\n }\n }\n }\n \n $qb = $this->applyDefaultFiltersForDate($qb, $parameters);\n \n return $qb;\n }", "title": "" }, { "docid": "adb2c29ef357a43f532d1a361f5acd27", "score": "0.44578302", "text": "public function ShowTicketsFilter($date, $idMovie, $idUser){\n\n $ticketList = $this->ticketDAO->GetFilteredTicket($date, $idMovie, $idUser);\n $ticketFilter = $this->ticketDAO->GetMovie($idUser);\n if($ticketList == null){\n $message = \"La bùsqueda no arrojo ninguna entrada para el dia de hoy.\";\n $this->ShowTicketsView($message, $idUser);\n }\n require_once (VIEWS_PATH . \"ticket-list.php\");\n }", "title": "" }, { "docid": "3e1c19a8b254b77d60b617fd74675fe0", "score": "0.44563895", "text": "public function searchpast($params)\n {\n\n if(Yii::$app->user->identity['role']=='student') {\n $date1= date('Y-m-d H:i:s', time()+60*60*5+30*60);\n// print_r(gettype($date1));\n\n $query = Quiz::find()->where(['<', 'endtime', $date1]);\n /* $query = Quiz::find()->where(['quizid'=>2])->one();\n print_r($query['endtime']);\n exit();\n*/\n }\n\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'quizid' => $this->quizid,\n 'starttime' => $this->starttime,\n 'endtime' => $this->endtime,\n 'totalscore' => $this->totalscore,\n 'totalquestions' => $this->totalquestions,\n ]);\n\n $query->andFilterWhere(['like', 'quizname', $this->quizname])\n ->andFilterWhere(['like', 'inchargename', $this->inchargename])\n ->andFilterWhere(['like', 'courseid', $this->courseid])\n ->andFilterWhere(['like', 'coursename', $this->coursename])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'setterid', $this->setterid]);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "e4e1dc592a2451922931146e6efb7251", "score": "0.44499135", "text": "public function on_filter( $query ) {\n\t global $post_type, $pagenow;\n \tif( !$pagenow == 'edit.php' || \n \t\t$post_type != $this->get_id() || \n \t\t!$query->is_main_query() ) {\n \t\treturn;\n \t}\n\n \tforeach ($this->args['columns'] as $key => $col) {\n\t\t\tif( empty( $col['filter_cb'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( !isset( $_GET[$key] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$col['filter_cb']( $query, $_GET[$key] );\n \t}\n\n \treturn $query;\n\t}", "title": "" }, { "docid": "4f09dbf0e82d027e3521e0a441398056", "score": "0.44462866", "text": "public function scopeMonth($query,$filters){\n if($month = $filters['month']){\n $query->whereMonth('created_at', Carbon::parse($month)->month);\n }\n\n if($year = $filters['year']){\n $query->whereYear('created_at',$year);\n }\n\n }", "title": "" }, { "docid": "1ec3b531c1b2d6aa03a7fb44f9dd2176", "score": "0.4445821", "text": "function getFilterStartDate($date)\n{\n $startDate = date($date);\n if (!$startDate)\n $startDate = date(\"1000-01-01 00:00:00\");\n return $startDate;\n}", "title": "" }, { "docid": "add15e53d9f4dbb5b7f51d6366db8b3f", "score": "0.444326", "text": "public function applyFilter(Query $query);", "title": "" }, { "docid": "37aba9d83e9083e0d8dda303abf13d63", "score": "0.44348836", "text": "public function createQuery($filtered = TRUE) {\n\t\t$query = parent::createQuery();\n\t\tif ($filtered === TRUE) {\n\t\t\t$startDate = new \\DateTime('last Friday');\n\t\t\t$query->matching($query->greaterThan('created', $startDate));\n\t\t\t$query->setOrderings(array(\n\t\t\t\t'created' => \\TYPO3\\Flow\\Persistence\\QueryInterface::ORDER_DESCENDING\n\t\t\t));\n\n\t\t\t$customers = $this->customerRepository->findAll()->toArray();\n\n\t\t\t$ratings = array();\n\t\t\tforeach ($query->execute() as $rating) {\n\t\t\t\tif (in_array($rating->getCustomer(), $customers)) {\n\t\t\t\t\t$identifier = $this->persistenceManager->getIdentifierByObject($rating->getCustomer());\n\t\t\t\t\t$ratings[] = $rating;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$query = new \\Famelo\\ADU\\Domain\\ArrayQuery();\n\t\t\t$query->setArray($ratings);\n\t\t\treturn $query;\n\t\t}\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "f5c2971cd1f633cbeb5e444eb830a608", "score": "0.4422316", "text": "public function scopeSearch($query, $filter)\n {\n return $query->where('date', '=', $filter)\n // INNER JOIN dealers d on d.id=t.id_dealer\n ->join('dealers', 'tasks.id_dealer', '=', 'dealers.id') \n ;\n \n }", "title": "" }, { "docid": "3a863e911d2047d102707cf08fe0bc62", "score": "0.44204935", "text": "public static function getDateFilterTypes()\n\t{\n\t\t$dateFilters = Array('custom' => array('label' => 'LBL_CUSTOM'),\n\t\t\t'prevfy' => array('label' => 'LBL_PREVIOUS_FY'),\n\t\t\t'thisfy' => array('label' => 'LBL_CURRENT_FY'),\n\t\t\t'nextfy' => array('label' => 'LBL_NEXT_FY'),\n\t\t\t'prevfq' => array('label' => 'LBL_PREVIOUS_FQ'),\n\t\t\t'thisfq' => array('label' => 'LBL_CURRENT_FQ'),\n\t\t\t'nextfq' => array('label' => 'LBL_NEXT_FQ'),\n\t\t\t'yesterday' => array('label' => 'LBL_YESTERDAY'),\n\t\t\t'today' => array('label' => 'LBL_TODAY'),\n\t\t\t'tomorrow' => array('label' => 'LBL_TOMORROW'),\n\t\t\t'lastweek' => array('label' => 'LBL_LAST_WEEK'),\n\t\t\t'thisweek' => array('label' => 'LBL_CURRENT_WEEK'),\n\t\t\t'nextweek' => array('label' => 'LBL_NEXT_WEEK'),\n\t\t\t'lastmonth' => array('label' => 'LBL_LAST_MONTH'),\n\t\t\t'thismonth' => array('label' => 'LBL_CURRENT_MONTH'),\n\t\t\t'nextmonth' => array('label' => 'LBL_NEXT_MONTH'),\n\t\t\t'last7days' => array('label' => 'LBL_LAST_7_DAYS'),\n\t\t\t'last15days' => array('label' => 'LBL_LAST_15_DAYS'),\n\t\t\t'last30days' => array('label' => 'LBL_LAST_30_DAYS'),\n\t\t\t'last60days' => array('label' => 'LBL_LAST_60_DAYS'),\n\t\t\t'last90days' => array('label' => 'LBL_LAST_90_DAYS'),\n\t\t\t'last120days' => array('label' => 'LBL_LAST_120_DAYS'),\n\t\t\t'next15days' => array('label' => 'LBL_NEXT_15_DAYS'),\n\t\t\t'next30days' => array('label' => 'LBL_NEXT_30_DAYS'),\n\t\t\t'next60days' => array('label' => 'LBL_NEXT_60_DAYS'),\n\t\t\t'next90days' => array('label' => 'LBL_NEXT_90_DAYS'),\n\t\t\t'next120days' => array('label' => 'LBL_NEXT_120_DAYS')\n\t\t);\n\t\tforeach ($dateFilters as $filterType => $filterDetails) {\n\t\t\t$dateValues = \\DateTimeRange::getDateRangeByType($filterType);\n\t\t\t$dateFilters[$filterType]['startdate'] = $dateValues[0];\n\t\t\t$dateFilters[$filterType]['enddate'] = $dateValues[1];\n\t\t}\n\t\treturn $dateFilters;\n\t}", "title": "" }, { "docid": "08ea376d1e60be037efc5c7c56995a4b", "score": "0.4416581", "text": "function filter($exprs=array(), $gexprs=array())\n\t{\n\t\t$where = array('sql'=>array(), 'args'=>array());\n\t\t$having = array('sql'=>array(), 'args'=>array());\n\t\tforeach($_REQUEST as $k=>$v) {\n\t\t\t$args = array();\n\t\t\t$sql = array();\n\n\t\t\tif($v === '') continue;\n\t\t\tif(!preg_match('|^f_[dts]_|', $k)) continue;\n\t\t\t$t = substr($k, 2, 1);\n\t\t\t$k = substr($k, 4);\n\t\t\t// only alphanumerics allowed\n\t\t\tif(!preg_match('|^[A-z0-9_-]+$|', $k)) continue;\n\t\t\tswitch($t) {\n\t\t\t\tcase 'd': $coltype = 'date'; break;\n\t\t\t\tcase 's': $coltype = 'select'; break;\n\t\t\t\tcase 't':\n\t\t\t\tdefault: $coltype = 'text';\n\t\t\t}\n\n\t\t\t// look for an expression passed to the function first -- this is\n\t\t\t// used for trickier SQL expressions, eg, functions\n\t\t\tif(isset($exprs[$k])) {\n\t\t\t\t$s = $exprs[$k];\n\t\t\t\t$t = 'where';\n\t\t\t} else if(isset($gexprs[$k])) {\n\t\t\t\t$s = $gexprs[$k];\n\t\t\t\t$t = 'having';\n\t\t\t} else {\n\t\t\t\t// use the literal column name\n\t\t\t\t$s = \"\\\"$k\\\"\";\n\t\t\t\t$t = 'where';\n\t\t\t}\n\n\t\t\t$range = explode('<>', $v);\n\t\t\tif(count($range) == 2) {\n\t\t\t\t// double-bounded range\n\t\t\t\t$sql[] = \"($s>='%s' AND $s<='%s')\";\n\t\t\t\t$args[] = $range[0];\n\t\t\t\t$args[] = $range[1];\n\t\t\t} else if(strlen($v) == 1) {\n\t\t\t\t// no range (explicit)\n\t\t\t\t// FYI: this check is needed, as the \"else\" block assumes\n\t\t\t\t// a string length of at least 2\n\t\t\t\t$sql[] = is_numeric($v) ? \"$s='%s'\" : \"$s LIKE '%%s%'\";\n\t\t\t\t$args[] = $v;\n\t\t\t} else {\n\t\t\t\t// everything else: single-bounded range, eq, neq, like, not like\n\t\t\t\t$chop = 0;\n\t\t\t\t$like = false;\n\t\t\t\tswitch(substr($v, 0, 1)) {\n\t\t\t\t\tcase '=': // exactly equals to\n\t\t\t\t\t\t$s .= '=';\n\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '>': // greater than\n\t\t\t\t\t\tif(substr($v, 1, 1) == '=') {\n\t\t\t\t\t\t\t$s .= '>=';\n\t\t\t\t\t\t\t$chop = 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$s .= '>';\n\t\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '<': // less than\n\t\t\t\t\t\tif(substr($v, 1, 1) == '=') { \n\t\t\t\t\t\t\t$s .= '<=';\n\t\t\t\t\t\t\t$chop = 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$s .= '<';\n\t\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '!': // does not contain\n\t\t\t\t\t\tif(substr($v, 1, 1) == '=') {\n\t\t\t\t\t\t\t$s .= '!=';\n\t\t\t\t\t\t\t$chop = 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$s .= ' NOT LIKE ';\n\t\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\t\t$like = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: // contains\n\t\t\t\t\t\t$s .= ' LIKE ';\n\t\t\t\t\t\t$like = true;\n\t\t\t\t}\n\t\t\t\t$v = substr($v, $chop);\n\t\t\t\tif($like) {\n\t\t\t\t\t$s .= \"'%%s%'\";\n\t\t\t\t} else {\n\t\t\t\t\t$s .= \"'%s'\";\n\t\t\t\t}\n\t\t\t\t$sql[] = $s;\n\t\t\t\t$args[] = $v;\n\n\t\t\t\t// special handling for various filter types\n\t\t\t\tif($coltype == 'date' && $chop) {\n\t\t\t\t\t// don't include the default '0000-00-00' fields in ranged selections\n\t\t\t\t\t$s = isset($exprs[$k]) ? $exprs[$k] : \"\\\"$k\\\"\";\n\t\t\t\t\t$s .= \"!='0000-00-00'\";\n\t\t\t\t\t$sql[] = $s;\n\t\t\t\t}\n\t\t\t}\n\t\t\tswitch($t) {\n\t\t\t\tcase 'where':\n\t\t\t\t\t$where['sql'] = array_merge($where['sql'], $sql);\n\t\t\t\t\t$where['args'] = array_merge($where['args'], $args);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'having':\n\t\t\t\t\t$having['sql'] = array_merge($having['sql'], $sql);\n\t\t\t\t\t$having['args'] = array_merge($having['args'], $args);\n\t\t\t}\n\t\t}\n\n\t\t// ensure the WHERE clause always has something in it\n\t\t$where['sql'][] = '1=1';\n\n\t\t$final = array(implode(' AND ', $where['sql']), $where['args']);\n\t\tif(!empty($having['sql'])) {\n\t\t\t$final[] = implode(' AND ', $having['sql']);\n\t\t\t$final[] = $having['args'];\n\t\t}\n\n\t\treturn $final;\n\t}", "title": "" }, { "docid": "7051ee377487365f5d6b63c080de1d8c", "score": "0.44136626", "text": "function getFiltroTiposTaxa($get = null,$where = \" 1 = 1\"){\n $Result = \"\"; \n if(isset($get['getFiltroTipo'])){\n foreach ($get['getFiltroTipo'] as $key => $value ) {\n \n switch ($value) {\n case 1:\n $where .= \" AND TDE <> 0 \";\n break;\n case 2:\n $where .= \" AND TDA <> 0 \";\n break;\n case 3:\n $where .= \" AND TDE = 0 \";\n break;\n case 4:\n $where .= \" AND TDA = 0 \";\n break;\n } \n } \n return $where;\n }\n }", "title": "" }, { "docid": "c641ee90a684457e97309515ffe70e4f", "score": "0.44132292", "text": "public function filteredByDate(Request $request){\n return response(Expense::where('user_id', $request->user()->id)\n ->whereBetween('created_at',[Date(\"Y-m-d\", $request->start/1000).\" 00:00:00\", Date(\"Y-m-d\", $request->end/1000).\" 23:59:59\"])\n ->with('category')\n ->orderBy('created_at', 'desc')\n ->paginate(4), 200);\n }", "title": "" }, { "docid": "aeddd2a600ef0353a255da94eb283357", "score": "0.44104567", "text": "public function scopePublishedBefore($query, $date)\n {\n $query->where('created_at', '<=', $date);\n }", "title": "" }, { "docid": "15e07635777efb584797e59ee911ac02", "score": "0.44094056", "text": "public function scopePublished($query){\n $query->where('RDate','<=',Carbon::now()->format('Y-m-d'))->where('EXDate','>=',Carbon::now()->format('Y-m-d'));\n }", "title": "" }, { "docid": "52f365f8395adc25f034025f4ca1bceb", "score": "0.44026864", "text": "protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new EventDateFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('AtkRegistrationBundle:EventDate')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('EventDateControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('EventDateControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('EventDateControllerFilter')) {\n $filterData = $session->get('EventDateControllerFilter');\n $filterForm = $this->createForm(new EventDateFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }", "title": "" }, { "docid": "fc3024f42473bd5563346d7dc9dbd6c1", "score": "0.44025835", "text": "function getEvents($filter, $sort_string = '', $limit = 0, $start = 0, $count = false) {\n\t \tglobal $wpdb;\n\n\t \tif (empty($sort_string)) {\n\t \t\t$sort_string = 'e.`datefrom` ASC';\n\t \t}\n\t \t\n\t \t// Convert timestamps to mysql date format\n\t \tif (isset($filter['datefrom']) && !empty($filter['datefrom'])) {\n\t \t\t// Neu auch text unterstützen\n\t \t\tif (strpos(strtolower($filter['datefrom']), 'now') !== false) { // Now\n\t \t\t\t$filter['datefrom'] = $this->calculate_dates($filter['datefrom']);\n\t \t\t} else if (strpos(strtolower($filter['datefrom']), 'today') !== false) { // Today\n\t \t\t\t$filter['datefrom'] = $this->calculate_dates($filter['datefrom']);\n\t \t\t} else if (strpos($filter['datefrom'], '-') === false) { // Integer format\n\t \t\t\t$filter['datefrom'] = date('Y-m-d H:i:s', $filter['datefrom']);\n\t \t\t} else {\n\t \t\t\t// Validate!\n\t \t\t\tif (strtotime($filter['datefrom']) == false || strtotime($filter['datefrom']) == -1) {\n\t \t\t\t\t$filter['datefrom'] = $this->calculate_dates('now');\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t \tif (isset($filter['dateto']) && !empty($filter['dateto'])) {\n\t \t\tif (strpos(strtolower($filter['dateto']), 'now') !== false) {\n\t \t\t\t$filter['dateto'] = $this->calculate_dates($filter['dateto']);\n\t \t\t} else if (strpos(strtolower($filter['dateto']), 'today') !== false) {\n\t \t\t\t$filter['dateto'] = $this->calculate_dates($filter['dateto'], true);\n\t \t\t} else if (strpos($filter['dateto'], '-') === false) {\n\t \t\t\t$filter['dateto'] = date('Y-m-d H:i:s', $filter['dateto']);\n\t \t\t} else {\n\t \t\t\t// Validate!\n\t \t\t\tif (strtotime($filter['dateto']) == false || strtotime($filter['dateto']) == -1) {\n\t \t\t\t\tunset($filter['dateto']);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t \t// If its an allday event, modify any selection time, because allday events allways starts at 00:00\n\t \tif (isset($filter['allday']) && $filter['allday'] == true) {\n\t \t\tif (isset($filter['datefrom'])) {\n\t \t\t\t$df = $filter['datefrom'];\n\t \t\t\t$filter['datefrom'] = date('Y-m-d H:i:s', mktime(0,0,0,mysql2date('m', $df), mysql2date('d', $df), mysql2date('Y', $df)));\n\t \t\t}\n\t \t\tif (isset($filter['dateto'])) {\n\t \t\t\t$df = $filter['dateto'];\n\t \t\t\t$filter['dateto'] = date('Y-m-d H:i:s', mktime(0,0,0,mysql2date('m', $df), mysql2date('d', $df)+1, mysql2date('Y', $df)) - 1);\n\t \t\t}\n\t \t}\n\n\t \t$where = ' WHERE ';\n\t \tif (isset($filter['id_inc']) && is_array($filter['id_inc']))\n\t \t$where .= \" e.`eventid` IN (\".implode(',', $filter['id_inc']).\") AND\";\n\t \tif (isset($filter['id_exc']) && is_array($filter['id_exc']))\n\t \t$where .= \" e.`eventid` NOT IN (\".implode(',', $filter['id_exc']).\") AND\";\n\t \tif (isset($filter['state']) && isset(self::$valid_states[$filter['state']]))\n\t \t$where .= \" e.`state`='{$filter['state']}' AND\";\n\t \tif (isset($filter['author']))\n\t \t$where .= \" e.`author`='{$filter['author']}' AND\";\n\t \tif (isset($filter['allday']))\n\t \t$where .= \" e.`allday`=\".($filter['allday'] === true ? '1' : '0').\" AND\";\n\t \tif (isset($filter['datefrom']) || isset($filter['dateto'])) {\n\n\t \t\tif (!isset($filter['datemode'])) {\n\t \t\t\t$filter['datemode']\t= FSE_DATE_MODE_ALL;\n\t \t\t}\n\n\t \t\t// Make date selection complete\n\t \t\tif (!isset($filter['datefrom']) || empty($filter['datefrom']))\n\t \t\t$filter['datefrom'] = date('Y-m-d H:i:s', 0);\n\t \t\tif (!isset($filter['dateto']) || empty($filter['dateto']))\n\t \t\t$filter['dateto'] = date('Y-m-d H:i:s', mktime(23, 59, 59, 12, 31, 2037));\n\n\t \t\t// Allday events to-stamp is at the beginning of the day!\n\t \t\t$date_to_allday = date('Y-m-d H:i:s', mktime(0, 0, 0, mysql2date('m', $filter['datefrom']), mysql2date('d', $filter['datefrom']), mysql2date('y', $filter['datefrom'])));\n\n\n\t \t\t// Events must always start before the end and\n\t \t\t// must end after start\n\t \t\t$where .= ' (e.`datefrom` <= \"'.$filter['dateto'].'\") AND '.\n \t\t\t\t\t\t' ((e.`dateto` >= \"'.$filter['datefrom'].'\") OR (e.`dateto` >= \"'.$date_to_allday.'\" AND `allday` = 1))'; \n\n\t \t\t//\n\t \t\tif ($filter['datemode'] == FSE_DATE_MODE_START) {\n\t \t\t\t$where .= ' AND (e.`datefrom` >= \"'.$filter['datefrom'].'\")';\n\t \t\t} elseif ($filter['datemode'] == FSE_DATE_MODE_END) {\n\t \t\t\t$where .= ' AND (e.`datefrom` <= \"'.$filter['dateto'].'\")';\n\t \t\t}\n\n\t \t\t$where .= ' AND';\n\t \t}\n\n\t \t// Join for categories\n\t \t$join = '';\n\t \tif (isset($filter['categories'])) {\n\t \t\t$f = $filter['categories'];\n\t \t\tif (!is_array($f))\n\t \t\t$f = array($f);\n\t \t\t$in = '';\n\t \t\tforeach($f as $c) {\n\t \t\t\t$c = intval($c);\n\t \t\t\tif (!empty($c))\n\t \t\t\t$in .= $c.',';\n\t \t\t}\n\n\t \t\tif (!empty($in)) {\n\t \t\t\t$in = substr($in, 0, strlen($in)-1);\n\t \t\t\t$where .= ' c.`catid` IN ('.$in.') AND';\n\t \t\t\t$join = ' LEFT JOIN `'.$wpdb->prefix.'fsevents_cats` AS c ON e.`eventid` = c.`eventid` ';\n\t \t\t}\n\t \t}\n\n\t \tif ($where != ' WHERE ')\n\t \t\t$where = substr($where, 0, strlen($where) - 3);\n\t \telse\n\t \t\t$where = '';\n\n\t \t// Special Case 'Count'!\n\t \tif ($count == true) {\n\t \t\t$sql = 'SELECT DISTINCT count(e.`eventid`) FROM `'.$wpdb->prefix.'fsevents` AS e '.$join.$where.' ORDER BY '.$sort_string;\n\t \t\treturn $wpdb->get_var($sql);\n\t \t} else {\n\t \t\t$sql = 'SELECT DISTINCT e.`eventid` FROM `'.$wpdb->prefix.'fsevents` AS e '.$join.$where.' ORDER BY '.$sort_string;\n\t \t\tif (!empty($limit)) {\n\t \t\t\t$sql .= ' LIMIT '.intval($start).', '.intval($limit);\n\t \t\t}\n\t \t}\n\n\t \tif (defined('FSE_SQL_DEBUG') && FSE_SQL_DEBUG == true && defined('WP_DEBUG') && WP_DEBUG == true) {\n\t \t\techo '<p>'.$sql.'</p>';\n\t \t}\t\n\t \t\n\t \t$res = $wpdb->get_col($sql);\n\n\t \tif ($res === NULL)\n\t \t\treturn false;\n\n\t \treturn $res;\n\t }", "title": "" }, { "docid": "333ade94769349e2e739926330bffdb8", "score": "0.44000697", "text": "public static function xfilter($table, $fields, $orderBy, $limit){\r\n $queryType = \"xfilter\"; \r\n include '../helper/retrieve_data.php';\r\n return $querySet;\r\n }", "title": "" }, { "docid": "bb63727dc141fd9866259eeb9572e0cf", "score": "0.43842334", "text": "public function filterByT($t = null, $comparison = null)\n {\n if (is_array($t)) {\n $useMinMax = false;\n if (isset($t['min'])) {\n $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($t['max'])) {\n $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t, $comparison);\n }", "title": "" }, { "docid": "ff7460dade66e0e0589509e9665e888c", "score": "0.43714315", "text": "public function TyleUngThanhCong($f_date, $t_date){\r\n\t\t$select = $this->Select(\"select log_date, sum(total) as total, sum(sucess) as sucess from (\r\n\t\tselect trunc(log_date) log_date, 0 total, count(*) sucess from credit_trans \r\n\t\twhere log_date >= to_date('\".$f_date.\"','dd/mm/yyyy') and log_date <= to_date('\".$t_date.\"','dd/mm/yyyy') + 1 and status = 1 and mt_status = 2 group by log_date\r\n\t\tunion all\r\n\t\tselect trunc(log_date) log_date , count(*) total, 0 sucess from credit_trans \r\n\t\twhere log_date >= to_date('\".$f_date.\"','dd/mm/yyyy') and log_date <= to_date('\".$t_date.\"','dd/mm/yyyy') + 1 and condition_status =1 group by log_date\r\n\t\t)\r\n\t\tgroup by log_date\r\n\t\torder by log_date\");\r\n\t\t\r\n\t\t$result = $this->FetchAll($select);\r\n\t\t//$this->DumpQueriesStack(); \r\n\t\tif($this->NumRows($select) > 0){\r\n return $result;\r\n }\r\n }", "title": "" }, { "docid": "e3ca121e0bc0d2db2f3109d199233c76", "score": "0.4370509", "text": "public function getDataWithTypeDate() {}", "title": "" }, { "docid": "84893638a7b5c4be3efdc7b6ce0396da", "score": "0.4369703", "text": "public function checkDateWithStrtotimeValuesDataProvider() {}", "title": "" }, { "docid": "fa0996eafaef491e44e318ed84c44f82", "score": "0.43663988", "text": "protected function _buildWhere(&$query)\r\n {\r\n\r\n\r\n \t//if($this->_checkin!=null)\r\n \t//{\r\n \t//\t$query->where('ltap.ltap_qdatu = \"'.$this->_confdate.'\"');\r\n \t//}\r\n return $query;\r\n }", "title": "" } ]
b7864522ebbd3ab0de3c513c368673e4
Set the id of the user who created this rule.
[ { "docid": "d4adf21c3c8413f91ef5f19cd1e76fe4", "score": "0.0", "text": "public function setGrantedByUser($createdByUser);", "title": "" } ]
[ { "docid": "8afd6015c7b16259cc1e26158b5f17db", "score": "0.72755086", "text": "public function setUserId( $id ) {\n\t\t$this->userId = $id;\n\t}", "title": "" }, { "docid": "7fc9491b2b9efc727280fb3b5d5173ce", "score": "0.7209619", "text": "public function setUserId($value){\n $this->attributes['user_id'] = $value;\n }", "title": "" }, { "docid": "c8cdc9f531267f4f8cf3f4bb6feb12ef", "score": "0.7112066", "text": "protected function _setUserId() {\n\n if ($this->_identity !== null) {\n\n $userid = $this->_identity->getId();\n\n if ((int) $userid > 0) {\n $conn = $this->_em->getConnection();\n $conn->query('SET @userid = ' . $userid);\n }\n }\n }", "title": "" }, { "docid": "dea52945e7f80ddcf8beaf07d8746763", "score": "0.7091921", "text": "public function set_id_user($arg)\n {\n if ($this->is_valid_int_format($arg))\n $this->_id_user = $arg;\n }", "title": "" }, { "docid": "8ce1d9afacca4d2b1e80cf13655d20e7", "score": "0.7051809", "text": "public function setIdUser($idUser)\n {\n $this->idUser = (int) $idUser;\n }", "title": "" }, { "docid": "23ca38c24f82a82abbfd8f42d3d09acd", "score": "0.70433855", "text": "public function set_user_id( $value ) {\n\t\t$this->set_prop( 'user_id', absint( $value ) ) ;\n\t}", "title": "" }, { "docid": "32783f1c39d295c36c6908fabd78bea6", "score": "0.7022507", "text": "public function setIdUser($idUser)\r\n {\r\n $this->idUser = $idUser;\r\n }", "title": "" }, { "docid": "d989c41efb514feff2480651085b0acd", "score": "0.7004882", "text": "function setUserId($id){\n\t\techo $this->userId\t=\t$id;\n\t}", "title": "" }, { "docid": "cad46a84a220f0e0ff0f4e079694cb59", "score": "0.6890296", "text": "private function manageUserId() {\n if ($user_id =$this->getUserIdFromSession()) {\n $this->setUserId($user_id);\n }\n }", "title": "" }, { "docid": "f756176ff5a48f7ecad38b5b0ef22a01", "score": "0.6706175", "text": "public function setUserId($value)\n {\n return $this->set(self::user_id, $value);\n }", "title": "" }, { "docid": "9f8bfdbfa53c25721a6c25a2760ae0c2", "score": "0.6693652", "text": "public function setUserId($value)\n {\n $this->setProperty(\"UserId\", $value, true);\n }", "title": "" }, { "docid": "df0fdb0a1a5a1e7e97d634a665dcc764", "score": "0.66570204", "text": "function set_user_id($user_id)\n\t{\n\t\t$this->set_default_property(self :: PROPERTY_USER_ID, $user_id);\n\t}", "title": "" }, { "docid": "289e6ff3a985d165e43714270ce21fc1", "score": "0.66401225", "text": "public function setId_user($id_user)\n {\n $id_user = (int) $id_user;\n $this->_id_user = $id_user;\n }", "title": "" }, { "docid": "c9c21b7dcc7d0f9b8edc72894d95e230", "score": "0.6618805", "text": "public function setIdUser($idUser)\n {\n $idUser = (int) $idUser;\n $this->idUser = $idUser;\n\n return $this;\n }", "title": "" }, { "docid": "b0ac410a3ae564e9e25c1549ceff2047", "score": "0.66121054", "text": "protected function setUser_id($value)\n\t{\n\t\tif (isCeleKladneCislo($value) || is_null($value)) {\n\t\t\t$this->user_id = $value;\n\t\t}\n\t\tif (isCeleKladneCislo($value) && $this->lazyLoad) {\n\t\t\t$this->userUserEntity = new UserEntity($value,false);\n\t\t} else {\n\t\t\t$this->userUserEntity = null;\n\t\t}\n\t}", "title": "" }, { "docid": "6a406a22f58e0c0a60091f5997c5d04a", "score": "0.66034997", "text": "private function setCurrentUserId()\n {\n// $this->currentUserId = get_current_user_id();\n }", "title": "" }, { "docid": "3c78c02e0d7f64d74602b162e0573fe2", "score": "0.658795", "text": "public function setUserIdAttribute($value)\n {\n $this->attributes['user_id'] = $value ?: null;\n }", "title": "" }, { "docid": "d7b8c74b5ceab7daae69bd313fd47777", "score": "0.6555244", "text": "protected function setEditedUserId()\n {\n $this->editedUserId = intval($_REQUEST['user_id']);\n if ($this->editedUserId == 0) {\n $this->editedUserId = intval(get_current_user_id());\n }\n $this->editedUser = get_user_by('id', $this->editedUserId);\n if ($this->editedUser->ID > 0) {\n $this->editedUser->profileCategories = ArrayManipulation::forceArray(get_user_meta($this->editedUserId, 'profile-categories', true));\n }\n }", "title": "" }, { "docid": "d1efe851d96cf24413425c48d9305be7", "score": "0.65452516", "text": "public function setID($id)\r\n {\r\n $this->userID = $id;\r\n }", "title": "" }, { "docid": "b1bd6291fcdf08a3ce4c036f30a331e2", "score": "0.6542437", "text": "function setUser( $value )\r\n {\r\n if ( is_a( $value, \"eZUser\" ) )\r\n $value = $value->id();\r\n\r\n $this->UserID = $value;\r\n }", "title": "" }, { "docid": "444f5bd0ba93377ede1c2f115fa7b39b", "score": "0.654227", "text": "public function setIdUser($idUser)\n {\n $this->idUser = $idUser;\n\n return $this;\n }", "title": "" }, { "docid": "444f5bd0ba93377ede1c2f115fa7b39b", "score": "0.654227", "text": "public function setIdUser($idUser)\n {\n $this->idUser = $idUser;\n\n return $this;\n }", "title": "" }, { "docid": "79c27088a4fc4e8e977a384a46eda009", "score": "0.65036803", "text": "public function setToUserId($data)\n {\n $this->_ToUserId=$data;\n return $this;\n }", "title": "" }, { "docid": "146a20e7ed380acd5f4250884694867a", "score": "0.6489751", "text": "private function setUserId($user_id) {\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "a2ccda0e5a5ad57ace6a1fbb0ca83d81", "score": "0.6473248", "text": "public function setUserId($data)\n {\n $this->_UserId=$data;\n return $this;\n }", "title": "" }, { "docid": "439125163d84d8629d48b04fa503467f", "score": "0.6472386", "text": "public function setUserId($userId);", "title": "" }, { "docid": "2ebdd39abad01cc6fcaef824fcc4facd", "score": "0.64626414", "text": "public function setUser_id($user_id){\n\t\t$this->$user_id = $user_id;\n\t}", "title": "" }, { "docid": "852a9f3758bfa8b60af46e33b7dec90b", "score": "0.64474916", "text": "public function setUserId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->user_id !== $v) {\n $this->user_id = $v;\n $this->modifiedColumns[] = PrincipalPeer::USER_ID;\n }\n\n if ($this->aUser !== null && $this->aUser->getId() !== $v) {\n $this->aUser = null;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "fc791e73bc3da3ea3d71c6b4e385aa3e", "score": "0.6434163", "text": "public static function setUserId($id) {\n Cookie::set('id', $id);\n self::$user = Auth::NONE;\n }", "title": "" }, { "docid": "525e3aa9eddfd568ce81b44c8cc29c56", "score": "0.6429236", "text": "public function setUserId( $user_id )\n {\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.642923", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "be6acd16f67be8d49e9e1aa55f228553", "score": "0.6402343", "text": "public function setUserId(int $value): self\n {\n $this->userId = $value;\n return $this;\n }", "title": "" }, { "docid": "dc59ecf94c2fa5969ea4900d282479e3", "score": "0.6399636", "text": "public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "title": "" }, { "docid": "dc59ecf94c2fa5969ea4900d282479e3", "score": "0.6399636", "text": "public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "title": "" }, { "docid": "dc59ecf94c2fa5969ea4900d282479e3", "score": "0.6399636", "text": "public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "title": "" }, { "docid": "ed4993a01a23468e581af3cada879a9b", "score": "0.63852", "text": "public function testSetUserID() {\n $testUser = new User();\n $testUser->setUsername('test');\n $testUser->create();\n\n // Create a test mission note\n $testMissionNote = new MissionNote();\n\n // Try and set id\n try {\n $testMissionNote->setUserID($testUser->getID(), true);\n $this->assertEquals($testUser->getID(), $testMissionNote->getUserID());\n } finally {\n $testUser->delete();\n }\n }", "title": "" }, { "docid": "1770b6b23368da8fe9cef9915ae63bea", "score": "0.6373896", "text": "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "title": "" }, { "docid": "1770b6b23368da8fe9cef9915ae63bea", "score": "0.6373896", "text": "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "title": "" }, { "docid": "1770b6b23368da8fe9cef9915ae63bea", "score": "0.6373896", "text": "public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }", "title": "" }, { "docid": "b575f300bd1822466dc339d1df6f5575", "score": "0.63727087", "text": "public function set_user_id(?int $user_id) : self {\n\t\t$this->user_id = $user_id;\n\t\t$this->user = NULL; //Create new user from user_id\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b053ec4ed3646ef60d24f9eb395606a0", "score": "0.6356549", "text": "public function setUser_id($user_id){\r\n $this->user_id = $user_id;\r\n }", "title": "" }, { "docid": "9d76de09e287f814caf43fd25d16f920", "score": "0.6340145", "text": "public function setPreviousUserId( $id );", "title": "" }, { "docid": "f2b0556b59e5d04069dec22550e3c6ae", "score": "0.6338055", "text": "function setCoachUserId($id)\n {\n $this->__coachuserid = $id;\n }", "title": "" }, { "docid": "c3da49ad7608eaf2ba260291067568cd", "score": "0.6327077", "text": "function setUserId($userid)\n\t\t{\n\t\t\t$this->mUserId = $userid;\n\t\t}", "title": "" }, { "docid": "2b122120fc3cab685fcf3cce619c57f4", "score": "0.63209724", "text": "public function setUserId( $userId )\n {\n $this->_daChallenge->setUserId( $this->getId(), $userId );\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.63146603", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "eec689a4f23a174cef9c71a5738f1314", "score": "0.63146603", "text": "public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "5d42e74a82f15d6fbe9ef31b90894781", "score": "0.6299653", "text": "public function setCreatedBy($v)\n {\n if (is_a('\\TechWilk\\Rota\\User', $v)) {\n $v = $v->getId();\n }\n\n return parent::setCreatedBy($v);\n }", "title": "" }, { "docid": "041414637a70ff7af7821c6705fb6c07", "score": "0.6293224", "text": "public function setUserId($user_id) {\n\n if(!isset($user_id) || $user_id == \"\"){\n $user_id = \"0\";\n }\n $this->fields[\"user_id\"] = $user_id;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "041414637a70ff7af7821c6705fb6c07", "score": "0.6293224", "text": "public function setUserId($user_id) {\n\n if(!isset($user_id) || $user_id == \"\"){\n $user_id = \"0\";\n }\n $this->fields[\"user_id\"] = $user_id;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "041414637a70ff7af7821c6705fb6c07", "score": "0.6293224", "text": "public function setUserId($user_id) {\n\n if(!isset($user_id) || $user_id == \"\"){\n $user_id = \"0\";\n }\n $this->fields[\"user_id\"] = $user_id;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "b130a6e602689a54658399388d057058", "score": "0.62880635", "text": "protected function setUserId($user_id): void {\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "11a8202bbfd67c0afb1de6c0c9aa4c64", "score": "0.6272965", "text": "public function setUserId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->user_id !== $v) {\n $this->user_id = $v;\n $this->modifiedColumns[] = JournalDeVenteLignePeer::USER_ID;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "c8ea3dbaed54bd7a91e1c800a372672d", "score": "0.6259451", "text": "public function setId_user($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }", "title": "" }, { "docid": "d97ce289cd3994c59cdc87e29fd57d7b", "score": "0.6258782", "text": "public function should_assign_an_id_to_the_created_user()\n {\n $this->expectsEvents(UserCreated::class);\n\n $response = $this->call('POST', '/v1/users', [\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => 'berzel@app.com',\n 'password' => 'secret123',\n 'password_confirmation' => 'secret123'\n ]);\n\n $this->seeJsonContains([\n 'id' => 1,\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => 'berzel@app.com'\n ]);\n }", "title": "" }, { "docid": "2bdff526626ead2655baf401e12eceab", "score": "0.6254985", "text": "public function setId($id): User\n {\n $this->id = $id;\n return $this;\n }", "title": "" }, { "docid": "4baefb62f2a710e20ba2d5fa05d45cf9", "score": "0.624619", "text": "public function setUserId($user_id)\n {\n $this->user_id = $user_id;\n }", "title": "" }, { "docid": "0b89980236eb07bb532df728e74af3c2", "score": "0.6238676", "text": "public function setUserId($newUserId) {\n $this->userId = $newUserId;\n }", "title": "" }, { "docid": "b9ef02070f9c554f0ef1df5aedd8f6b3", "score": "0.62343305", "text": "public function setUserID($id)\n {\n if (!is_int($id))\n throw new InvalidParameterException(__FUNCTION__ . ' function only accepts integers. Input was: ' . $id);\n else\n $this->User_ID = $id;\n }", "title": "" }, { "docid": "ad2df2a1bc7c03aaab3d8ece5f12e0b4", "score": "0.6194981", "text": "protected function set_user_id( $user_id ) {\n\t\t$this->user_id = $user_id;\n\t\t$this->get_datastore()->set_object_id( $user_id );\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$datastore = $field->get_datastore();\n\t\t\tif ( $datastore->get_object_id() === 0 ) {\n\t\t\t\t$datastore->set_object_id( $user_id );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "630a0fcf4c2cec245371c572580c8c7b", "score": "0.61770463", "text": "public function idUser()\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "448c8c240252c801e2523829ccaa06db", "score": "0.6176872", "text": "public function setCreatorId($id)\n {\n $this->creatorId = $id;\n }", "title": "" }, { "docid": "454b6ec4c410a09ad3cc700ce5aaaacc", "score": "0.6172319", "text": "function setUserId($userId) {\n\t\treturn $this->setData('userId', $userId);\n\t}", "title": "" }, { "docid": "2f5787c5f5d89576f2e5363b18a2ca6b", "score": "0.6151508", "text": "function setUserId($userId) {\r\n\t\treturn $this->setData('userId', $userId);\r\n\t}", "title": "" }, { "docid": "8d96e880b5f2a8d3c040fdccbf245c65", "score": "0.6139318", "text": "function setRealtorUserId($a_iRealtorUserId)\n {\n if (!is_null($this->_iRealtorUserId) && $this->_iRealtorUserId !== (int) $a_iRealtorUserId) {\n $this->_markModified();\n }\n $this->_iRealtorUserId = (int) $a_iRealtorUserId;\n }", "title": "" }, { "docid": "dda9ff7b5aaf677e481df51dc35a7f5f", "score": "0.6128203", "text": "public function setCreator() {\r\n $this->Creator = new Warecorp_User('id',$this->creatorId);\r\n }", "title": "" }, { "docid": "418cbdc933883fa06681ceb8fd56c832", "score": "0.61273396", "text": "function setUserId($a_iUserId)\n {\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\n $this->_markModified();\n }\n $this->_iUserId = (int) $a_iUserId;\n }", "title": "" }, { "docid": "418cbdc933883fa06681ceb8fd56c832", "score": "0.61273396", "text": "function setUserId($a_iUserId)\n {\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\n $this->_markModified();\n }\n $this->_iUserId = (int) $a_iUserId;\n }", "title": "" }, { "docid": "9e1142a08098960dfa90af07705f6c80", "score": "0.61261296", "text": "public function setUser_id ($user_id) : self\n {\n $this->user_id = $user_id;\n return $this;\n }", "title": "" }, { "docid": "fe74fb1990d02c19081cc4ffd92b5e3e", "score": "0.61176026", "text": "public function setId($value) { $this->id = $value;}", "title": "" }, { "docid": "930a22d1bbec4a3a029ef622a4b610ab", "score": "0.61101454", "text": "public function getIdUser()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "930a22d1bbec4a3a029ef622a4b610ab", "score": "0.61101454", "text": "public function getIdUser()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "930a22d1bbec4a3a029ef622a4b610ab", "score": "0.61101454", "text": "public function getIdUser()\n {\n return $this->id_user;\n }", "title": "" }, { "docid": "05b39e5091c4ed5c8ba4ea7dd1ec7a27", "score": "0.6100162", "text": "function setUserId($userId) {\r\n\t\t$this->setData('userId', $userId);\r\n\t}", "title": "" }, { "docid": "a4a463f41919326dd0bf9a73640646ea", "score": "0.609867", "text": "public function setUsersID($username);", "title": "" }, { "docid": "ce186b6c285fdc9076852bcee9e66324", "score": "0.6094834", "text": "public function setInitiatedByUserId(?string $value): void {\n $this->getBackingStore()->set('initiatedByUserId', $value);\n }", "title": "" }, { "docid": "c6292049d4c2720c50ea8d0e76a87abf", "score": "0.6094628", "text": "public function setUserId(\\ParticipantId $value=null)\n {\n return $this->set(self::USER_ID, $value);\n }", "title": "" }, { "docid": "40ce3a792c4e2332f754a4aa0eb7cf81", "score": "0.6080037", "text": "public function setUserId($userId)\r\n {\r\n $this->_userId = $userId;\r\n }", "title": "" }, { "docid": "1885b52c80e6c5e77bcb471e55576807", "score": "0.6062265", "text": "public function getIdUser() {\r\n return idUser;\r\n }", "title": "" }, { "docid": "3ffa95ddf3613c0470583fc79d459e7b", "score": "0.6057569", "text": "public function userId($user_id = null)\n {\n if( empty($user_id) ){\n return $this->user_id;\n } else {\n return $this->user_id = $user_id;\n }\n }", "title": "" }, { "docid": "3309c81d2f8ef2cab9185df421c065d4", "score": "0.60562617", "text": "public function getIdUser(): int\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "8217d12dc2d329d65c53708e7da421b6", "score": "0.6046321", "text": "public function setUserId($newUserId){\n\t\t//base case: if the new user ID is null, this is a new user, and there is no mySQL ID assigned as of yet\n\t\tif($newUserId === null){\n\t\t\t$this->userId = null;\n\t\t\treturn;\n\t\t}\n\n\t\t//verify that the ID is a valid integer\n\t\t$newUserId = filter_var($newUserId, FILTER_VALIDATE_INT);\n\t\tif($newUserId === false){\n\t\t\tthrow(new InvalidArgumentException(\"User ID is not a valid integer.\"));\n\t\t}\n\n\t\t//now, verify that the ID number is positive\n\t\tif($newUserId <= 0){\n\t\t\tthrow(new RangeException(\"User ID is not positive\"));\n\t\t}\n\n\t\t//convert the value to integer, and store\n\t\t$this->userId = intval($newUserId);\n\t}", "title": "" }, { "docid": "3e3d13b5c5ef001b44e128ce52b95f22", "score": "0.6041792", "text": "public function setUser($userId);", "title": "" }, { "docid": "2d82e99d786fabee98c4e7953fd6031b", "score": "0.6039068", "text": "public function getUserId()\n {\n return $this->id;\n }", "title": "" }, { "docid": "5cd7e3c2aa3e605574ead2a3c09c0dfd", "score": "0.60345817", "text": "public function setUserid($userid)\r\n {\r\n $this->userid = $userid;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "30be8b397e01b4f41d8bfb18eaa5c0a2", "score": "0.6034413", "text": "public function getId() {\n return $this->id_user;\n }", "title": "" }, { "docid": "9fec26ef6782ef7f1ac4b14403b491c9", "score": "0.60268563", "text": "public function getIdUser()\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "9fec26ef6782ef7f1ac4b14403b491c9", "score": "0.60268563", "text": "public function getIdUser()\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "9fec26ef6782ef7f1ac4b14403b491c9", "score": "0.60268563", "text": "public function getIdUser()\n {\n return $this->idUser;\n }", "title": "" }, { "docid": "58e6af67c1b84d7278b10abbc1350652", "score": "0.6013502", "text": "public function getIdUser()\r\n {\r\n return $this->idUser;\r\n }", "title": "" }, { "docid": "0c7503c6507ce566d134e848f8868650", "score": "0.60107124", "text": "public function getIdAttribute()\n {\n return $this->user_id;\n }", "title": "" }, { "docid": "567f9c2f768d7daf2b79bc39ce20ef6b", "score": "0.60067284", "text": "public function setUserId($userId)\n {\n $this->userId = $userId;\n }", "title": "" }, { "docid": "4835f0b4c6b04f1aba9e149f1e097e08", "score": "0.6006465", "text": "public function setUserId($userId)\n\t\t{\n\t\t\t$this->userId = $userId;\n\t\t}", "title": "" }, { "docid": "5b8b70a0f5a327f5bfd37b9a893b7cbe", "score": "0.59938496", "text": "function setOwnerID($value) { $this->set('ownerid', $value); }", "title": "" }, { "docid": "d9aad50f7f9755dcb0d70b0f75c8d5ee", "score": "0.5992688", "text": "public function setUserId( $userId )\n {\n $this->_daContent->setUserId( $this->getId(), $userId );\n }", "title": "" }, { "docid": "c47d688b978d351942a485f06c4af9de", "score": "0.5990392", "text": "function initUserId() {\n $objFWUser = \\FWUser::getFWUserObject();\n $this->_intCurrentUserId = $objFWUser->objUser->login() ? $objFWUser->objUser->getId() : 0;\n }", "title": "" }, { "docid": "4366759f2b4ddd38e42c5c7a2d2a59ba", "score": "0.5986308", "text": "public function setUser($userId)\n {\n $this->userId = $userId;\n }", "title": "" }, { "docid": "d6b34163270e8852d29e4b6a9e42ea0d", "score": "0.5979831", "text": "public function setCreatorAccount( $username, $id = '' ) {\n\t\t$user = self::filter_account_info( $username, $id );\n\t\tif ( $user && isset( $user->username ) )\n\t\t\t$this->creator = $user;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "faa4b7e62f25e6fd5f98a919d298ec68", "score": "0.59689903", "text": "public function setUserId(?int $userId): self\n {\n $this->initialized['userId'] = true;\n $this->userId = $userId;\n\n return $this;\n }", "title": "" }, { "docid": "26376b0ea4ba6a63691b0ee61b5d77e3", "score": "0.5966963", "text": "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "title": "" }, { "docid": "6f60c489901a5c2087bc562b2aca24b4", "score": "0.5954189", "text": "public function getIdUser()\n {\n return $this->IdUser;\n }", "title": "" } ]
366628ea005432297a28d0fda76a254d
Store a newly created CentralElectrica in storage. POST /centralElectricas
[ { "docid": "517f0e820b2d2a778aa1f20237af6856", "score": "0.7422654", "text": "public function store(CreateCentralElectricaAPIRequest $request)\n {\n $input = $request->all();\n\n $centralElectrica = $this->centralElectricaRepository->create($input);\n\n return $this->sendResponse($centralElectrica->toArray(), 'Central Electrica saved successfully');\n }", "title": "" } ]
[ { "docid": "d3eb15451fd1ef1117dff6cbf3ecd9d0", "score": "0.606247", "text": "public function store(Request $request)\n {\n $request->validate([\n 'storage_code' => ['required', 'max:255', 'unique:silo_actuals'],\n 'date' => ['required'],\n 'value_actual' => ['required'],\n ]);\n\n $silo = SiloActual::create($request->except('_token'));\n try {\n $request->request->add(['id' => $silo->id]);\n SiloActualCloud::create($request->except('_token'));\n } catch (\\Throwable $th) {\n return redirect('setting/silo-manual')->with(['update' => 'Data saved successfully!']);\n }\n return redirect('setting/silo-manual')->with(['create' => 'Data saved successfully!']);\n }", "title": "" }, { "docid": "1eadd46cb5f082ff7082550863de3774", "score": "0.5910282", "text": "public function store(Request $request)\n {\n $validateData = $request->validate([\n 'description' => 'required',\n 'somme' => 'required',\n 'apercu' => 'required',\n 'client_id' => 'required',\n 'modele_id' => 'required'\n ]);\n $clientId = $request->input('client_id');\n $modeleId = $request->input('modele_id');\n \n\n $client = Client::find($clientId);\n $modele = Modele::find($modeleId);\n \n if ($client && $modele) {\n // Store image in public file;\n $request->file('apercu')->store('couture', 'public');\n echo \"start saving...\";\n $couture = Couture::create([\n 'description'=> $request->input('description'),\n 'date' => $request->input('date'),\n 'somme' => $request->input('somme'),\n 'apercu' => $request->file('apercu')->hashName(),\n 'client_id' => $request->input('client_id'),\n 'modele_id' => $request->input('modele_id')\n ]);\n }else{\n return response()->json(['status'=>FALSE, 'message'=>\"Veuillez vous assurez de l'existance du client et du modele dans la base de donnée svp.\" ]);\n }\n \n if ($couture) {\n return response()->json(['status'=>TRUE, 'couture'=>$couture]);\n }else{\n return response()->json(['status'=>FALSE, 'couture'=>[]]);\n }\n \n }", "title": "" }, { "docid": "4679a89e7503db0dab15892f6746501d", "score": "0.5896923", "text": "public function store(Request $request){\n try{\n if(!$request->input('central_name') )\n throw new Exception(\"Central name is required!\");\n $centralOffice = new CentralOffice();\n $centralOffice->central_name = $request->input('central_name');\n $centralOffice->central_details = $request->input('central_details');\n if(!$centralOffice->save())\n throw new Exception(\"Critical error when save central office data!\");\n $where = ['central_office_id'=>$centralOffice->id,'role'=>1];\n $centralOffice->head = TermRelation::findMyAdmin($where);\n return ['success'=>true, 'message'=>'Cetnral office save success', 'data'=>$centralOffice];\n\n }catch (Exception $e){\n return ['success'=>false, 'message'=> $e->getMessage()];\n }\n }", "title": "" }, { "docid": "15066a1a5efcf88c05402f9d157276db", "score": "0.5878643", "text": "public function store() {\n try {\n $data = Input::all();\n $this->validator->validate($data);\n $data['valor'] = Helpers::toDecimal($data['valor']);\n $data['vencimento'] = Helpers::dateDb($data['vencimento']);\n $this->conta->fill($data)->save();\n Session::flash('message', 'Conta criada com sucesso!');\n return Redirect::route('admin.contas.edit', [$this->conta->id]);\n } catch (InvalidArgumentException $e) {\n return Redirect::route('admin.contas.create')->withErrors($e->getMessage())->withInput();\n }\n }", "title": "" }, { "docid": "03c8e4645690d0e12be40f8303b5711d", "score": "0.58098084", "text": "public function store()\n {\n $this->setBillingCycles();\n\n $body = [\n \"product_id\" => \"XRP-PROD-001\",\n \"name\" => $this->name,\n \"description\" => $this->description,\n \"status\" => $this->status,\n \"billing_cycles\" => [$this->billing_cycles],\n \"payment_preferences\" => $this->payment_preferences,\n \"taxes\" => $this->taxes,\n ];\n\n try {\n $response = $this->client->request(\"POST\", $this->store, [\"headers\" => $this->headers(), \"json\" => $body]);\n } catch (ClientException $e) {\n return $e->getMessage();\n }\n\n return $response->getBody();\n }", "title": "" }, { "docid": "130810cbfa71fb94195381385cf376c4", "score": "0.58057463", "text": "public function store(Request $request)\n {\n /*$emergencias = new Emergencias;\n $emergencias->Institucion = request('Institucion');\n $emergencias->Zona = request('Zona');\n $emergencias->Telefono = request('Telefono'); \n $emergencias->save();*/\n //return redirect('practica/lista');\n $emergencia = $this->emergencia->create($request->all());\n return response()->json($emergencia);\n }", "title": "" }, { "docid": "68f875cbd20a6dbaaf3a2d1cdc7faff2", "score": "0.5756716", "text": "public function store(ComputerInsertFormRequest $request)\n {\n\n $computer = new Computer();\n $computer->local_id = $request->get('local_id');\n $computer->brand =$request->get('brand');\n $computer->model_or_serial = $request->get('model_or_serial');\n $computer->specification = $request->get('specification');\n $computer->company_id = $request->get('company_id');\n $computer->ip_address = $request->get('ip_address');\n\n $live_year = $request->get('live_year');\n if ($request->get('active') == 'year')\n $active_live = $live_year * 12 ;\n else\n $active_live = $live_year;\n\n $computer->live_year =$active_live;\n\n $getprice = $request->get('price');\n $usa_rate =floatval(preg_replace('/[^\\d.]/', '', $request->get('USA_rate')));\n $eur_rate =floatval(preg_replace('/[^\\d.]/', '', $request->get('EUR_rate')));\n $sgd_rate =floatval(preg_replace('/[^\\d.]/', '', $request->get('SGD_rate')));\n if ($request->get('country') == \"USA\" )\n $usa = $getprice * $usa_rate;\n elseif ($request->get('country') == \"EUR\" )\n $usa = $getprice * $eur_rate;\n elseif ($request->get('country') == \"SGD\" )\n $usa = $getprice * $sgd_rate;\n else\n $usa = $getprice;\n\n $computer->price = $usa;\n $computer->bought_date = $request->get('bought_date');\n\n if($request->file('image')) {\n $image = $request->file('image');\n $image_name = date('YmdHis').\"_\". $image->getClientOriginalName();\n $image_path = $_SERVER['DOCUMENT_ROOT']. \"/computers\";\n $image->move($image_path,$image_name);\n }else {$image_name = \"noimage.gif\";}\n if ($request->file('warranty_card')) {\n $warranty_card = $request->file('warranty_card');\n $warranty_card_name = date('YmdHis') . \"_\" . $warranty_card->getClientOriginalName();\n $warranty_card_path = $_SERVER['DOCUMENT_ROOT'] . \"/warrantyCards\";\n $warranty_card->move($warranty_card_path, $warranty_card_name);\n }else $warranty_card_name = \"noimage.gif\";\n $computer->image = $image_name;\n $computer->warranty_card = $warranty_card_name;\n\n $computer->save();\n return redirect('backend/dropDowns/computers/index')->with('success','Successfully Inserted Data!');\n\n }", "title": "" }, { "docid": "c6beca3db8c550c50a63c05e5ecb2fc5", "score": "0.5755776", "text": "public function store(Request $request){ \n $institucion = Helpers::codigo_inst_seleccionada();\n\n $ultimoId = $this->INCentroCosto($institucion);\n $idMasUno = count($ultimoId)+1;\n\n $ultimoIdCorr = $this->codCorrelativo();\n $codMasUno = count($ultimoIdCorr)+1;\n try{\n $centroCosto = new CentroCostos();\n \n $centroCosto->id = $codMasUno;\n $centroCosto->ccDesc =$request->descCC;\n $centroCosto->estatus = $request->tipo;\n $centroCosto->INCodigo = $institucion;\n $centroCosto->ccCod =$idMasUno; \n\n $centroCosto->save();\n \n $notificacion=Helpers::Notificaciones(true, 'success', '¡Exito!', 'El centro de costo se creo con éxito');\n\n }catch(Exception $e){\n $notificacion=Helpers::Notificaciones(true, 'error', 'Error!', 'El centro de costo no se registro con éxito.');\n }\n return redirect()->action('CentroCostoController@index')->with($notificacion);\n\n }", "title": "" }, { "docid": "bad03adcdbeca7e9a7f0990fe6641b7e", "score": "0.5746824", "text": "public function store(CentroFormacionRequest $request)\n {\n //\n }", "title": "" }, { "docid": "5341dac5f674b713ed54604730ccb8d7", "score": "0.5727088", "text": "public function store(Request $request)\n {\n \n $conductor = new Conductor;\n\n $conductor->rut = $request->rut;\n $conductor->nombre = $request->nombre;\n //$vehiculo->idUser = Auth::user()->id;\n\n $conductor->save();\n\n return redirect('sispam/conductores')->with('info', 'Conductor Registrado con Éxito !');\n\n }", "title": "" }, { "docid": "56c61086080d753d9e332e1a080acc40", "score": "0.5723747", "text": "public function store(Request $request) {\n $data = $request->all();\n $status = 0;\n switch ($data['type_compromise_id']) {\n case TypeCompromise::QUOTE_HOME:\n $status = 1;\n break;\n case TypeCompromise::QUOTE_DISTANCE:\n $status = 18;\n break;\n case TypeCompromise::SALE_NOTE:\n $status = 3;\n break;\n case TypeCompromise::INFO_SEND:\n $status = Carbon::parse($data['documents']['moment'])->day === Carbon::now()->day ? 17 : 16;\n break;\n }\n\n $cg = CGlobal::query()->create([\n 'moment' => $data['moment'],\n 'emit' => Carbon::now(),\n 'client_id' => $data['client']['id'],\n 'user_id' => $data['user_id'],\n 'type_contact_id' => $data['type_contact_id'],\n 'repeater' => $data['repeater'],\n 'type_compromise_id' => $data['type_compromise_id'],\n 'type_motive' => $data['type_motive'],\n 'type_motive_id' => $data['type_motive_id'],\n 'required_time' => $data['required_time'],\n 'traser' => 1,\n 'note' => $data['note'],\n 'status_id' => $status\n ]);\n\n $this->setID('cglobals', $cg->id);\n\n foreach ($data['info'] as $inf) {\n CGlobalInfo::query()->create([\n 'cglobal_id' => $cg->id,\n 'type_info_id' => $inf['info']['id'],\n 'type_info_detail_id' => $inf['info_det']['id'],\n 'info_descrip' => $inf['info_descrip']\n ]);\n }\n\n // CREANDO COTIZACION A DOMICILIO\n\n $client = Client::query()->find($data['client']['id']);\n\n if ($data['type_compromise_id'] === TypeCompromise::QUOTE_HOME) {\n\n $cg->LandScaper()->create($data['landscaper']);\n\n $user_email = User::query()->where('uid', $data['landscaper']['user_uid'])->first();\n\n $generador = User::query()->where('id', $data['user_id'])->first();\n\n $data_email = [\n 'user' => $user_email,\n 'generador' => $generador->name,\n 'visit' => $data['landscaper'],\n 'client' => $client,\n 'company' => Company::query()->find(1),\n ];\n // ENVIANDO ALERTA A PAISAJISTA\n // SendMails::dispatch(new AlertLandscape($data_email), $user_email->email);\n Mail::to($user_email->email)->send(new AlertLandscape($data_email));\n\n Calendar::query()->create([\n 'cglobal_id' => $cg->id,\n 'user_id' => $data['user_id'],\n 'for_user_id' => 0,\n 'start' => Carbon::parse($data['landscaper']['moment'] . ' '.$data['landscaper']['timer']),\n 'end' => Carbon::parse($data['landscaper']['moment'] . ' '.$data['landscaper']['timer'])->addHours(2),\n 'title' => 'Visita a cliente: ' . $client->name,\n 'contentFull' => 'DOMICILIO: ' . $client->street . ' '. $client->home_number . ' '. $client->colony . ' / NOTA: '. $data['landscaper']['note'],\n 'class' => 'domicilio'\n ]);\n\n Quote::query()->create([\n 'cglobal_id' => $cg->id,\n 'type_quote_id' => 1,\n 'token' => random_int(0,99999),\n 'moment' => Carbon::now(),\n 'emit' => Carbon::now(),\n 'status_id' => 1,\n ]);\n\n return response()->json('Se generó un evento de visita en el calendario y se informo al paisajista!');\n }\n\n\n if ($data['type_compromise_id'] === TypeCompromise::INFO_SEND) {\n\n $cg->Documents()->create($data['documents']);\n\n Calendar::query()->create([\n 'cglobal_id' => $cg->id,\n 'user_id' => $data['user_id'],\n 'for_user_id' => 0,\n 'start' => Carbon::parse($data['documents']['moment'] . ' 8:00'),\n 'end' => Carbon::parse($data['documents']['moment'] . ' 18:00'),\n 'allDay' => 1,\n 'contentFull' => ' DOMICILIO: ' . $client->street . ' '. $client->home_number . ' '. $client->colony,\n 'title' => 'Información a: ' .$client->name ,\n 'class' => 'info'\n ]);\n\n return response()->json('Se generó un evento de envio de información a cliente!');\n }\n\n if ($data['type_compromise_id'] === TypeCompromise::SALE_NOTE) {\n\n $sale = SalesNote::create([\n 'global_id' => $cg->id,\n 'moment' => Carbon::now(),\n 'emit' => Carbon::now(),\n 'advance' => 0,\n 'origin' => SalesNote::ORIGIN_CAG,\n 'status_id' => 3,\n ]);\n\n return response()->json(['id'=>$sale->id]);\n }\n\n if ($data['type_compromise_id'] === TypeCompromise::QUOTE_DISTANCE) {\n $quote = Quote::query()->create([\n 'cglobal_id' => $cg->id,\n 'type_quote_id' => 2,\n 'token' => mt_rand(0,99999),\n 'moment' => Carbon::now(),\n 'emit' => Carbon::now(),\n 'status_id' => 2,\n ]);\n return response()->json(['id'=>$quote->id]);\n }\n\n\n }", "title": "" }, { "docid": "835dc50bea0c30632bcfc83e866ef57d", "score": "0.5684494", "text": "public function store($sec, Request $request)\n {\n $compromiso = new Compromiso;\n $compromiso->id_lider = $request->input('id_lider');\n $compromiso->nombre = $request->input('nombre');\n $compromiso->descripcion = $request->input('descripcion');\n $compromiso->cumplimiento = $request->input('cumplimiento');\n $compromiso->costo = $request->input('costo');\n\n $compromiso->save();\n\n return redirect('/Administracion/'.$sec.'/Compromisos')->with('success', 'Compromiso creado');\n }", "title": "" }, { "docid": "3fad5779d0172a9db04b02dd692ec17f", "score": "0.56778353", "text": "public function store(Request $request)\n {\n $request->validate([\n 'empresa_id' => 'required|unique:cau',\n ]);\n\n $date_inicio = $request->get('data_inicio');\n $date_fim = $request->get('data_fim');\n $date_doc = $request->get('data_doc');\n\n $cau = new cau();\n $cau->empresa_id = $request->get('empresa_id');\n $cau->agente_integracao = $request->get('agente_integracao');\n $cau->data_inicio = Carbon::createFromFormat('d/m/Y', $date_inicio)->format('Y-m-d');\n $cau->data_fim = Carbon::createFromFormat('d/m/Y', $date_fim)->format('Y-m-d');\n $cau->data_doc = Carbon::createFromFormat('d/m/Y', $date_doc)->format('Y-m-d');\n $cau->obs = $request->get('obs');\n // dd($cau);\n $cau->save();\n\n $request->session()->flash('success', 'Cadastrado com sucesso!');\n return redirect('cau_convenio');\n\n // return redirect()->route('cau_convenio.index')\n // ->with('success', 'Cadastrado com sucesso.');\n }", "title": "" }, { "docid": "1663439e4f253318f25f9b67c61398c4", "score": "0.5677689", "text": "public function store(Request $request)\n {\n $calle = new Calle();\n\n $calle->idbarrio = $request->input('idbarrio');\n $calle->namecalle = $request->input('nombrecalle');\n $calle->fechaingreso = date('Y-m-d');\n\n $calle->save();\n\n return response()->json(['success' => true]);\n\n }", "title": "" }, { "docid": "fcc5e8ae84a36562961c55c0bed76ffb", "score": "0.56738746", "text": "public function store(StoreCelsRequest $request)\n {\n $request = $this->saveFiles($request);\n $cel = Cel::create($request->all());\n return redirect()->route('cels.index');\n\n }", "title": "" }, { "docid": "6a240fa78c11959127c6d30997a11cd9", "score": "0.56656355", "text": "public function store(CocheCreateRequest $request)\n {\n $coche = new Coche($request->all());\n $coche->iduser = auth()->user()->id;\n $archivo = null;\n \n if($request->hasFile('foto')){\n if($request->file('foto')->isValid()) {\n $archivo = $request->file('foto');\n $path = $archivo->getRealPath();\n $imagen = $this->reduceImage($path);\n $coche->foto = base64_encode($imagen); \n } \n }\n try {\n $result = $coche->save();\n if($archivo != null){\n $fecha = new \\DateTime();\n $nombre = $fecha->getTimestamp() . '.' . $archivo->extension(); //nombre con el que se guarda el archivo en el storage\n $archivo->storeAs('public/images/'. $coche->iduser . '/' . $coche->id, $nombre);\n }\n } catch(\\Exception $e) {\n return redirect('coche/index')->withInput()->withErrors(['error' => 'Se ha producido un error al guardar los datos del vehiculo.']);\n }\n return redirect('coche/index')->with(['store' => 'Se ha publicado su vehiculo correctamente']);\n }", "title": "" }, { "docid": "8e02d63513e246652999042acd9f77df", "score": "0.5663955", "text": "public function store(Request $request)\n {\n \n $solicitud = new AsignarServicio();\n $solicitud->descripcion = $request->descripcion;\n $solicitud->estado = 'E';\n $solicitud->fecha = date('d/m/Y H:i:s');\n $solicitud->fkidcliente = $request->cliente;\n $solicitud->fkidservicio = $request->servicio;\n $solicitud->save();\n DB::table('cliente')\n ->where('idcliente','=',$request->cliente)\n ->update(['fkidzona'=>2 ]);\n \n return redirect()->route('admin.solicitud.index');\n }", "title": "" }, { "docid": "52ab8a635aa1240b4e4d61172fa0d733", "score": "0.566306", "text": "public function store()\n {\n $inputs = Input::except( '_token', 'characteristic_id');\n $race = Input::except( '_token', 'characteristic_id', 'characteristic_date', 'characteristic_racial_type', 'characteristic_aggressivness_level', 'characteristic_swarming_level', 'characteristic_winter_hardiness_level', 'characteristic_wake_up_month', 'characteristic_comment' );\n\n $race['name'] = [ 'name' => $race[ 'name' ] ]; // dans l'attente de modification ws $race_name\n\n $characteristics = [];\n foreach ( $inputs as $key => $input )\n if( str_contains( $key, 'characteristic_' ) )\n $characteristics[ str_replace( 'characteristic_', '', $key ) ] = $input;\n\n $characteristics['racial_type'] = null;// dans l'attente de modification ws $characteristics_race_name\n\n $characteristics[ 'date' ] = date( 'Y-m-d', strtotime( $characteristics[ 'date' ] ) );\n\n $response_characteristic = BeeTools::entityStore( $characteristics, 'characteristics' );\n $view = BeeTools::isError( $response_characteristic );\n if( $view ) return $view;\n\n $race['characteristic'] = $response_characteristic;\n\n $race = BeeTools::cleanElement( $race );\n $response_race = BeeTools::entityStore( $race, 'races' );\n $view = BeeTools::isError( $response_race );\n if( $view ) return $view;\n\n return Redirect::to( 'races' );\n }", "title": "" }, { "docid": "211cd61b20176ed728a8d66a3a77b1d3", "score": "0.56602544", "text": "public function store(Request $request)\n {\n $censado = new Registered();\n\n $ultimo = Registered::all()->last();\n if ($ultimo) {\n $numerolegajo = $ultimo->numerolegajo;\n } else {\n $numerolegajo = 10000;\n }\n\n $censado->nombre = $request->nombre;\n $censado->apellido = $request->apellido;\n $censado->dni = $request->dni;\n $censado->fechanacimiento = $request->fechanacimiento;\n $censado->sexo = $request->sexo;\n $censado->estadocivil = $request->estadocivil;\n $censado->ocupacion = $request->ocupacion;\n $censado->localidad_id = $request->localidad_id;\n $censado->situacionresidencial_id = $request->situacionresidencial_id;\n $censado->direccion = $request->direccion;\n $censado->entornofamiliar = $request->entornofamiliar;\n $censado->telefono = $request->telefono;\n $censado->formacionescolar = $request->formacionescolar;\n\n $censado->numerocertificadod = $request->numerocertificadod;\n $censado->fechaemision = $request->fechaemision;\n $censado->fechavencimiento = $request->fechavencimiento;\n $censado->entidadcertificado = $request->entidadcertificado;\n $censado->obrasocial_id = $request->obrasocial_id;\n $censado->observacion = $request->observacion;\n $numerolegajo++;\n $censado->numerolegajo = $numerolegajo;\n $censado->legajo = 'CE' . $numerolegajo;\n\n $censado->save();\n\n //ver attach institucioneucativa\n $censado->schoolings()->attach($request->institucioneducativa_id);\n\n //ver pension\n $censado->pensions()->attach($request->pension);\n\n //ver patologia\n $censado->pathologies()->attach($request->patologia);\n\n //tratamiento\n $censado->treatments()->attach($request->tratamiento);\n\n toastr()->success('Se ha registrado correctamente el censado');\n\n\n return redirect()->route('censado.show', $censado->id);\n }", "title": "" }, { "docid": "624ecbff7de8265f723abbce14147079", "score": "0.5658977", "text": "public function store(Request $request)\n {\n\n $course= new Course;\n $course->course_name=$request->input('name');\n $course->course_desc=$request->input('description');\n //send the id of auth center to save it's data to DB\n\n $adminId=auth()->guard('institute')->user()->id;\n Institute::find($adminId)->cities()->save($course,['city_id'=> $request->input('address'),\n 'branch_name'=>$request->input('value')\n ]);\n\n Institute::find($adminId)->courses()->save($course,['duration'=>$request->input('duration'),\n 'co_sc_sDate'=>$request->input('start-date'),\n 'trainer'=>$request->input('trainer'),\n 'co_sc_price'=>$request->input('price'),\n ]);\n\n\n return redirect('/centers');\n }", "title": "" }, { "docid": "e15a8d1da33db26e9daadce06e567736", "score": "0.56571937", "text": "public function store()\n {\n $form = $this->getForm();\n $data = $form->getFieldValues();\n $form->redirectIfNotValid();\n\n $slug = Str::slug($form->getFieldValues()['name']);\n $data = array_merge($data,compact('slug'));\n\n Region::create($data);\n\n return redirect()->route('admin.settings.regions.index')->with('success','Une region a été créée avec succès!');\n }", "title": "" }, { "docid": "0a59c170c3fca3e65cb1895035836d7f", "score": "0.5654032", "text": "public function store(Request $request)\n {\n $celular = '844552968';\n $valor = 10;\n $reference = '7y7y7y37t3g';\n// $recharge = Recharge::create($request->only(['reference', 'value','code']));\n// $recharge->save();\n $client = new Client ([\n 'apiKey' =>'5rqh0hssv2qtmp9648ys9nt83l0w65o2',\n 'publicKey' => 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAmptSWqV7cGUUJJhUBxsMLonux24u+FoTlrb+4Kgc6092JIszmI1QUoMohaDDXSVueXx6IXwYGsjjWY32HGXj1iQhkALXfObJ4DqXn5h6E8y5/xQYNAyd5bpN5Z8r892B6toGzZQVB7qtebH4apDjmvTi5FGZVjVYxalyyQkj4uQbbRQjgCkubSi45Xl4CGtLqZztsKssWz3mcKncgTnq3DHGYYEYiKq0xIj100LGbnvNz20Sgqmw/cH+Bua4GJsWYLEqf/h/yiMgiBbxFxsnwZl0im5vXDlwKPw+QnO2fscDhxZFAwV06bgG0oEoWm9FnjMsfvwm0rUNYFlZ+TOtCEhmhtFp+Tsx9jPCuOd5h2emGdSKD8A6jtwhNa7oQ8RtLEEqwAn44orENa1ibOkxMiiiFpmmJkwgZPOG/zMCjXIrrhDWTDUOZaPx/lEQoInJoE2i43VN/HTGCCw8dKQAwg0jsEXau5ixD0GUothqvuX3B9taoeoFAIvUPEq35YulprMM7ThdKodSHvhnwKG82dCsodRwY428kg2xM/UjiTENog4B6zzZfPhMxFlOSFX4MnrqkAS+8Jamhy1GgoHkEMrsT5+/ofjCx0HjKbT5NuA2V/lmzgJLl3jIERadLzuTYnKGWxVJcGLkWXlEPYLbiaKzbJb2sYxt+Kt5OxQqC1MCAwEAAQ==',\n 'serviceProviderCode' => '171717'\n ]);\n\n if(!empty($celular) || !empty($valor) || !empty($reference)){\n $paymentData = [\n 'from' => '258' . $celular, // input_CustomerMSISDN\n 'reference' => $reference, // input_ThirdPartyReference\n 'transaction' => 'T12344CC', // input_TransactionReference\n 'amount' => $valor // input_Amount\n ];\n\n $result = $client->receive($paymentData);\n\n if ($result->success) {\n dd( \"Pagamento efectuado!\");\n } else {\n dd(\"Falha ao processar pagamento\");\n }\n }else{\n dd(\"Preencha todos os campos do formulário\");\n }\n }", "title": "" }, { "docid": "658ec2c4333b9616c0cd5aed6d39a040", "score": "0.56514955", "text": "public function store(){\n $json = $this->list();\n $bg = new BienesGenerales();\n\n $bg->id = $_REQUEST['id'];\n\n //? Busco mi elemento con el id y traigo sus datos\n $bien = $this->searchBienGeneral($bg->id, $json);\n\n $bg->direccion = $bien['Direccion'];\n $bg->ciudad = $bien['Ciudad'];\n $bg->telefono = $bien['Telefono'];\n $bg->codigo_postal = $bien['Codigo_Postal'];\n $bg->tipo = $bien['Tipo'];\n\n //* Damos formato al precio \n $precio = $bien['Precio'];\n\n $precio = str_replace(\",\",\".\",$precio);\n $precio = str_replace(\"$\",\"\",$precio);\n\n $bg->precio = $precio;\n\n if($this->model->Unico($bg->id)){\n $this->mensaje=array(\"Advertencia\", \"Ya fue registrado\");\n } else {\n $this->model->Registrar($bg);\n $this->mensaje=array(\"Guardado\", \"Registrado Correctamente\");\n }\n\n $this->index();\n }", "title": "" }, { "docid": "148baafdecd83c676c510f421c0aae98", "score": "0.56485337", "text": "public function store(SpecificateRequest $request)\n {\n $storage = new Storage();\n $storage->fill([\n 'storage' => $request->storage,\n ]);\n $storage->save();\n return redirect()->route('admin.specificate.storage.index');\n }", "title": "" }, { "docid": "9b6e626abfe939e19874500ca299f7f0", "score": "0.5632344", "text": "public function store(Request $request)\n {\n $solar_meter = SolarMeter::firstOrCreate([\n 'name' => $request->name,\n 'units' => $request->value_type,\n 'description'=>''\n ]);\n $all_params = $request->all();\n $all_params['meter_id']=$solar_meter->id;\n $all_params['timestamp']=time();\n if (!is_string($all_params['serialized'])){\n $all_params['serialized']=json_encode($all_params['serialized']);\n }\n $res = SolarPower::create($all_params);\n\n return response()->json([\n 'payload' => [$res],\n 'errors' => []\n ]);\n }", "title": "" }, { "docid": "4b9b9d4a7b2e9c101cec72a06bb11c5d", "score": "0.56317055", "text": "public function storeasptranse(Request $request) {\n //aspirante, datos personales, datos de ubicacion, circunscripcion\n $aspi = new Aspirante();\n $aspi->tipodoc_id = (isset($request->tipodoc_id)) ? $request->tipodoc_id : 0;\n $aspi->numerodocumento = (isset($request->numero_documento)) ? $request->numero_documento : 0;\n $aspi->lugar_expedicion = (isset($request->lugar_expedicion)) ? $request->lugar_expedicion : null;\n $aspi->fecha_expedicion = (isset($request->fecha_expedicion)) ? $request->fecha_expedicion : null;\n $aspi->sexo = (isset($request->sexo)) ? $request->sexo : null;\n $aspi->estatura = (isset($request->estatura)) ? $request->estatura : null;\n $aspi->primer_nombre = (isset($request->primer_nombre)) ? $request->primer_nombre : \"\";\n $aspi->segundo_nombre = (isset($request->segundo_nombre)) ? $request->segundo_nombre : null;\n $aspi->primer_apellido = (isset($request->primer_apellido)) ? $request->primer_apellido : \"\";\n $aspi->segundo_apellido = (isset($request->segundo_apellido)) ? $request->segundo_apellido : null;\n $aspi->libreta_militar = (isset($request->libreta_militar)) ? $request->libreta_militar : null;\n $aspi->claselibretamilitar = (isset($request->clase_libreta_militar)) ? $request->clase_libreta_militar : null;\n $aspi->distrito_militar = (isset($request->distrito_militar)) ? $request->distrito_militar : null;\n $aspi->tiposanguineo = (isset($request->tipo_sanguineo)) ? $request->tipo_sanguineo : null;\n if (isset($request->eps)) {\n if ($request->eps == \"OTRA\") {\n $aspi->eps = $request->aspi_eps;\n } else {\n $aspi->entidadsalud_id = $request->eps;\n }\n }\n $aspi->estadocivil_id = (isset($request->estado_civil)) ? $request->estado_civil : null;\n $aspi->pais_nacimiento = (isset($request->pais_id)) ? $request->pais_id : null;\n $aspi->dpto_nacimiento = (isset($request->dpto_id)) ? $request->dpto_id : null;\n $aspi->ciudad_nacimiento = (isset($request->ciudad_id)) ? $request->ciudad_id : null;\n $aspi->fecha_nacimiento = (isset($request->fecha_nacimiento)) ? $request->fecha_nacimiento : null;\n $aspi->numerovisa = (isset($request->numero_visa)) ? $request->numero_visa : null;\n $aspi->estadovisa = (isset($request->estado_visa)) ? $request->estado_visa : null;\n $aspi->fechavencevisa = (isset($request->fechavence_visa)) ? $request->fechavence_visa : null;\n $aspi->mediodivulgacion_id = (isset($request->mediodivulgacion_id)) ? $request->mediodivulgacion_id : null;\n $aspi->nivelacademico = (isset($request->nivelacademico)) ? $request->nivelacademico : null;\n $aspi->nivel_educativo_id = (isset($request->nivel_educativo_id)) ? $request->nivel_educativo_id : null;\n $aspi->circunscripcion_id = (isset($request->circunscripcion_id)) ? $request->circunscripcion_id : null;\n $aspi->pais_residencia = (isset($request->pais2_id)) ? $request->pais2_id : null;\n $aspi->dpto_residencia = (isset($request->dpto2_id)) ? $request->dpto2_id : null;\n $aspi->ciudad_residencia = (isset($request->ciudad2_id)) ? $request->ciudad2_id : null;\n $aspi->sectorciudad_id = (isset($request->sectorciudad_id)) ? $request->sectorciudad_id : null;\n $aspi->direccion_residencia = (isset($request->direccion_aspirante)) ? $request->direccion_aspirante : null;\n $aspi->barrio_residencia = (isset($request->barrio_aspirante)) ? $request->barrio_aspirante : null;\n $aspi->barrio_id = (isset($request->barrio_id)) ? $request->barrio_id : null;\n $aspi->vereda_residencia = (isset($request->vereda_aspirante)) ? $request->vereda_aspirante : null;\n $aspi->etnia = (isset($request->etnia_aspirante)) ? $request->etnia_aspirante : null;\n $aspi->telefono_residencia = (isset($request->telefono_contacto)) ? $request->telefono_contacto : null;\n $aspi->telefonocelular = (isset($request->telefono_celular)) ? $request->telefono_celular : null;\n $aspi->email = (isset($request->correo)) ? $request->correo : null;\n $aspi->dpto_residenciasec = (isset($request->dpto3_id)) ? $request->dpto3_id : null;\n $aspi->ciudad_residenciasec = (isset($request->ciudad3_id)) ? $request->ciudad3_id : null;\n $aspi->direccion_residenciasec = (isset($request->direccion_ec)) ? $request->direccion_ec : null;\n $aspi->direccion_estudio = (isset($request->direccion_ciudade)) ? $request->direccion_ciudade : null;\n $aspi->telefonoestudio = (isset($request->telefono_ciudade)) ? $request->telefono_ciudade : null;\n $response = null;\n if (count($aspi) > 0) {\n if ($aspi->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información básica del aspirante</p>\";\n //formulario, pin\n $foin = new Formularioinscripcion();\n $foin->medioinscripcion = \"ON LINE\";\n $foin->simultaneidad = \"NINGUNO\";\n $foin->aspirante_id = $aspi->id;\n $foin->estadoadmision = \"ASPIRANTE\";\n $foin->tipoinscripcion_id = 4;\n $pin = Pin::where('pin', $request->pin)->first();\n if (count($pin) > 0) {\n if ($pin->estado == \"USADO\") {\n $foin->pin_id = $pin->id;\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó no ha sido vendido en el banco. Si usted compro el PIN, por favor Acérquese a la oficina de registro y control para validar su PIN.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó es inválido. No puede continuar.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n if (count($foin) > 0) {\n if ($foin->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se ha creado el formulario de inscripción del aspirante</p>\";\n//estudios secundarios\n $esse = new Estudiossecundario();\n $esse->pais = (isset($request->paisn_id)) ? $request->paisn_id : null;\n $esse->ciudad = (isset($request->ciudadn_id)) ? $request->ciudadn_id : null;\n $esse->codigo_snp = (isset($request->iem_id)) ? $request->iem_id : null;\n $esse->enfasis_mod_sec = (isset($request->enfasis)) ? $request->enfasis : null;\n $esse->fechaterminacion = (isset($request->ft)) ? $request->ft : null;\n $esse->formaobtuvotitulo = (isset($request->forma_obt_titulo)) ? $request->forma_obt_titulo : null;\n $esse->valormatricula10 = (isset($request->vmd)) ? $request->vmd : null;\n $esse->valorpension10 = (isset($request->vpd)) ? $request->vpd : null;\n $esse->valorpension11 = (isset($request->vpu)) ? $request->vpu : null;\n $esse->valormatricula11 = (isset($request->vmu)) ? $request->vmu : null;\n $esse->libro = (isset($request->libro)) ? $request->libro : null;\n $esse->folio = (isset($request->folio)) ? $request->folio : null;\n $esse->snp = (isset($request->snp_aspirante)) ? $request->snp_aspirante : null;\n $esse->puntajeobtenido = (isset($request->poes)) ? $request->poes : null;\n $esse->ciudadpresentoprueba = (isset($request->ciudad5_id)) ? $request->ciudad5_id : null;\n $esse->fechapresentopruebas = (isset($request->fpes)) ? $request->fpes : null;\n if ($esse->fechapresentopruebas !== null) {\n $time = strtotime($esse->fechapresentopruebas);\n $newformat = date('Y-m-d', $time);\n $fff = explode(\"-\", $newformat);\n $aniop = $fff[0];\n $mesp = $fff[1];\n if ($aniop < 2014) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp < 6) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp > 6) {\n $esse->tipoprueba = \"NUEVA\";\n }\n if ($aniop > 2014) {\n $esse->tipoprueba = \"NUEVA\";\n }\n }\n $esse->tipodocicfes = (isset($request->tipodoc_prueba)) ? $request->tipodoc_prueba : null;\n $esse->documentoicfes = (isset($request->dipi)) ? $request->dipi : null;\n $esse->aspirante_id = $aspi->id;\n if (count($esse) > 0) {\n if ($esse->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de estudios secundarios</p>\";\n }\n }\n $tb1 = $tb2 = $tb3 = $tb4 = $tb5 = $tb6 = $tb7 = $tb8 = $tb9 = $tb10 = $tb11 = $tb12 = $tb13 = $tb14 = $tb15 = $tb16 = null;\n //tb1 lista inst en las que estudió institucionsecundaria\n if (isset($request->tb1)) {\n foreach ($request->tb1 as $value) {\n $is = new Institucionsecundaria();\n $v = explode(\";\", $value);\n $is->institucionestudio = (strlen($v[0]) > 0) ? $v[0] : null;\n $is->fechainicial = (strlen($v[1]) > 0) ? $v[1] : date('Y-m-d', strtotime('00-00-0000'));\n $is->fechafin = (strlen($v[2]) > 0) ? $v[2] : date('Y-m-d', strtotime('00-00-0000'));\n $is->aspirante_id = $aspi->id;\n $tb1[] = $is;\n }\n }\n if (count($tb1) > 0) {\n foreach ($tb1 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de instituciones donde estudió.</p>\";\n }\n //tb6 familiares\n if (isset($request->tb6)) {\n foreach ($request->tb6 as $value) {\n $g = new Grupofamiliar();\n $v = explode(\";\", $value);\n $g->sitiotrabajoestudio = $v[0];\n $g->ciudad = $v[1];\n $g->parentesco_id = (count($v[4]) > 0) ? $v[4] : 0;\n $g->cedula = $v[5];\n $g->nombrecompleto = $v[6];\n $g->vive = $v[7];\n $g->ocupacion = $v[8];\n $g->profesion = $v[9];\n $g->edad = $v[10];\n $g->niveleducativo = $v[11];\n $g->ingresomensual = $v[12];\n $g->ingresomensual_rango = $v[13];\n $g->lee = $v[14];\n $g->ciudadresidencia = $v[16];\n $g->direccion = $v[17];\n $g->telefonoresidencia = $v[18];\n $g->ciudadresidencia = $v[19];\n $g->direccionempresa = $v[20];\n $g->celular = $v[21];\n $g->aspirante_id = $aspi->id;\n $tb6[] = $g;\n }\n }\n if (count($tb6) > 0) {\n foreach ($tb6 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de familiares.</p>\";\n }\n //informacion socioeconomica\n $ise = new Informacionsocioeconomica();\n $ise->situacionpadres = (isset($request->sdlp)) ? $request->sdlp : null;\n $ise->numerofamiliares = (isset($request->nmf)) ? $request->nmf : null;\n $ise->numeromiembrostrabaja = (isset($request->pqt)) ? $request->pqt : null;\n $ise->numerohermanos = (isset($request->nhise)) ? $request->nhise : null;\n $ise->posicionhermanos = (isset($request->pelh)) ? $request->pelh : null;\n $ise->ingresomensualfamilia = (isset($request->imaf)) ? $request->imaf : null;\n $ise->egresomensualfamilia = (isset($request->emaf)) ? $request->emaf : null;\n $ise->hermanosestudiandou = (isset($request->nheu)) ? $request->nheu : null;\n $ise->viveconfamilia = (isset($request->vcsf)) ? $request->vcsf : null;\n $ise->numhermanosestudiaunivers = (isset($request->nhceu)) ? $request->nhceu : null;\n $ise->quiencosteaestudios = (isset($request->cdse)) ? $request->cdse : null;\n $ise->conquienreside = (isset($request->edr)) ? $request->edr : null;\n $ise->estrato = (isset($request->eise)) ? $request->eise : null;\n $ise->situacioneconomica = (isset($request->se)) ? $request->se : null;\n $ise->sufragoelecciones = (isset($request->selue)) ? $request->selue : null;\n $ise->rentagravable = (isset($request->rg)) ? $request->rg : null;\n $ise->patrimoniogravable = (isset($request->pg)) ? $request->pg : null;\n $ise->ingresoretenciones = (isset($request->iyr)) ? $request->iyr : null;\n $ise->sisben = (isset($request->tsise)) ? $request->tsise : null;\n $ise->nivelsisben = (isset($request->nivelsisben)) ? $request->nivelsisben : null;\n $ise->cajacompensacion = (isset($request->ccf)) ? $request->ccf : null;\n $ise->ingresosnogravables = (isset($request->ing)) ? $request->ing : null;\n $ise->patrimoniobruto = (isset($request->pb)) ? $request->pb : null;\n $ise->ingresobruto = (isset($request->ib)) ? $request->ib : null;\n $ise->rentanogravable = (isset($request->rng)) ? $request->rng : null;\n $ise->ingresosgravables = (isset($request->ig)) ? $request->ig : null;\n $ise->aspirante_id = $aspi->id;\n if (count($ise) > 0) {\n if ($ise->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información socioeconómica.</p>\";\n }\n }\n //tb13 idiomas\n if (isset($request->tb13)) {\n foreach ($request->tb13 as $value) {\n $ep = new Idiomaaspirante();\n $v = explode(\";\", $value);\n $ep->idioma_id = $v[0];\n $ep->oir = $v[1];\n $ep->habla = $v[2];\n $ep->lee = $v[3];\n $ep->escribe = $v[4];\n $ep->aspirante_id = $aspi->id;\n $tb13[] = $ep;\n }\n }\n if (count($tb13) > 0) {\n foreach ($tb13 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de idiomas.</p>\";\n }\n //tb14 pasatiempos\n if (isset($request->tb14)) {\n foreach ($request->tb14 as $value) {\n $ep = new Pasatiempoaspirante();\n $v = explode(\";\", $value);\n $ep->pasatiempo_id = $v[0];\n $ep->aspirante_id = $aspi->id;\n $tb14[] = $ep;\n }\n }\n if (count($tb14) > 0) {\n foreach ($tb14 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de pasatiempos.</p>\";\n }\n flash($response)->success();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n } else {\n $foin->delete();\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n $aspi->delete();\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n }", "title": "" }, { "docid": "fc8939e1262c8edc26db048ca14d7f52", "score": "0.56270176", "text": "public function store(Request $request)\n {\n$dados = $request->all();\nCozinha::create($dados);\nreturn redirect()->route('cozinhas.index');\n\n\n}", "title": "" }, { "docid": "af38732a19ec96d86008a0b93e637600", "score": "0.562443", "text": "public function store(StoreCEO $request)\n {\n $validated = $request->validated();\n CEO::create($validated);\n return redirect(route('ceo.index'));\n }", "title": "" }, { "docid": "7c2beab841180f9cf83e579358004da1", "score": "0.56147045", "text": "public function store(Request $request) \n {\n //dd($request->all());\n\n $Strain = Strain::create([\n 'strainName' => $request['strainName'],\n 'systemID' => app('system')->id, // from appServiceprovider\n 'testingStatus' => $request['testingStatus'],\n 'floweringTimeInDays' => $request['floweringTimeInDays'],\n 'genetics' => $request['genetics'],\n 'operatorUserName' => Auth::user()->username,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n return redirect('strains');\n }", "title": "" }, { "docid": "c47171eac1ae6b9ee15e46019f7a6ca8", "score": "0.56116235", "text": "public function store() {\n\n\t\t$input = Input::all();\n\t\t//echo json_encode($input);\n\t\t//exit;\n\t\t$clienteInstance = new Cliente();\n\t\t$clienteInstance -> numcte = $input['numcte'];\n\t\t$clienteInstance -> nomcte = $input['nomcte'];\n\t\t$clienteInstance -> rfccte = $input['rfccte'];\n\t\t$clienteInstance -> dircte = $input['dircte'];\n\t\t$clienteInstance -> nlecte = $input['nlecte'];\n\t\t$clienteInstance -> nlicte = $input['nlicte'];\n\t\t$clienteInstance -> colcte = $input['colcte'];\n\t\t$clienteInstance -> pobcte = $input['pobcte'];\n\t\t$clienteInstance -> estado = $input['estado'];\n\t\t$clienteInstance -> pais = $input['pais'];\n\t\t$clienteInstance -> telcte = $input['telcte'];\n\t\t$clienteInstance -> mailcte = $input['mailcte'];\n\t\t$clienteInstance -> usuarioInsert_id = 1;\n\t\t$clienteInstance -> save();\n\t\treturn Redirect::action('ClienteController@show', array($clienteInstance -> id));\n\n\t}", "title": "" }, { "docid": "6574a9afe7e3a2f8d723e14ecb0b9a86", "score": "0.5601652", "text": "public function store(CreateSerieRequest $request)\n {\n $serie = Serie::create($request->all());\n\n return redirect()->route('series.index');\n }", "title": "" }, { "docid": "2b35844fbca373a04f079101c5079168", "score": "0.5601288", "text": "public function store(Request $request){\n //'Precio_venta', 'Stock', 'Descripcion', 'Condicion'];\n $articulo = new Articulo;\n $articulo->categoria = $request->categoria;\n $articulo->codigo = $request->codigo;\n $articulo->nombre = $request->nombre;\n $articulo->precio_venta = $request->precio_venta;\n $articulo->stock = $request->stock;\n $articulo->descripcion = $request->descripcion;\n $articulo->condicion = 1;\n\n $articulo->save();\n return response()->json(['Message'=>'Articulo creado correctamente',$articulo],200);\n\n }", "title": "" }, { "docid": "5df192879a5669cd948bb2164f615b29", "score": "0.55990016", "text": "public function store(Request $request) {\n //aspirante, datos personales, datos de ubicacion, circunscripcion\n $aspi = new Aspirante();\n $aspi->tipodoc_id = (isset($request->tipodoc_id)) ? $request->tipodoc_id : 0;\n $aspi->numerodocumento = (isset($request->numero_documento)) ? $request->numero_documento : 0;\n $aspi->lugar_expedicion = (isset($request->lugar_expedicion)) ? $request->lugar_expedicion : null;\n $aspi->fecha_expedicion = (isset($request->fecha_expedicion)) ? $request->fecha_expedicion : null;\n $aspi->sexo = (isset($request->sexo)) ? $request->sexo : null;\n $aspi->estatura = (isset($request->estatura)) ? $request->estatura : null;\n $aspi->primer_nombre = (isset($request->primer_nombre)) ? $request->primer_nombre : \"\";\n $aspi->segundo_nombre = (isset($request->segundo_nombre)) ? $request->segundo_nombre : null;\n $aspi->primer_apellido = (isset($request->primer_apellido)) ? $request->primer_apellido : \"\";\n $aspi->segundo_apellido = (isset($request->segundo_apellido)) ? $request->segundo_apellido : null;\n $aspi->libreta_militar = (isset($request->libreta_militar)) ? $request->libreta_militar : null;\n $aspi->claselibretamilitar = (isset($request->clase_libreta_militar)) ? $request->clase_libreta_militar : null;\n $aspi->distrito_militar = (isset($request->distrito_militar)) ? $request->distrito_militar : null;\n $aspi->tiposanguineo = (isset($request->tipo_sanguineo)) ? $request->tipo_sanguineo : null;\n if (isset($request->eps)) {\n if ($request->eps == \"OTRA\") {\n $aspi->eps = $request->aspi_eps;\n } else {\n $aspi->entidadsalud_id = $request->eps;\n }\n }\n $aspi->estadocivil_id = (isset($request->estado_civil)) ? $request->estado_civil : null;\n $aspi->pais_nacimiento = (isset($request->pais_id)) ? $request->pais_id : null;\n $aspi->dpto_nacimiento = (isset($request->dpto_id)) ? $request->dpto_id : null;\n $aspi->ciudad_nacimiento = (isset($request->ciudad_id)) ? $request->ciudad_id : null;\n $aspi->fecha_nacimiento = (isset($request->fecha_nacimiento)) ? $request->fecha_nacimiento : null;\n $aspi->numerovisa = (isset($request->numero_visa)) ? $request->numero_visa : null;\n $aspi->estadovisa = (isset($request->estado_visa)) ? $request->estado_visa : null;\n $aspi->fechavencevisa = (isset($request->fechavence_visa)) ? $request->fechavence_visa : null;\n $aspi->mediodivulgacion_id = (isset($request->mediodivulgacion_id)) ? $request->mediodivulgacion_id : null;\n $aspi->nivelacademico = (isset($request->nivelacademico)) ? $request->nivelacademico : null;\n $aspi->nivel_educativo_id = (isset($request->nivel_educativo_id)) ? $request->nivel_educativo_id : null;\n $aspi->circunscripcion_id = (isset($request->circunscripcion_id)) ? $request->circunscripcion_id : null;\n $aspi->pais_residencia = (isset($request->pais2_id)) ? $request->pais2_id : null;\n $aspi->dpto_residencia = (isset($request->dpto2_id)) ? $request->dpto2_id : null;\n $aspi->ciudad_residencia = (isset($request->ciudad2_id)) ? $request->ciudad2_id : null;\n $aspi->sectorciudad_id = (isset($request->sectorciudad_id)) ? $request->sectorciudad_id : null;\n $aspi->direccion_residencia = (isset($request->direccion_aspirante)) ? $request->direccion_aspirante : null;\n $aspi->barrio_residencia = (isset($request->barrio_aspirante)) ? $request->barrio_aspirante : null;\n $aspi->barrio_id = (isset($request->barrio_id)) ? $request->barrio_id : null;\n $aspi->vereda_residencia = (isset($request->vereda_aspirante)) ? $request->vereda_aspirante : null;\n $aspi->etnia = (isset($request->etnia_aspirante)) ? $request->etnia_aspirante : null;\n $aspi->telefono_residencia = (isset($request->telefono_contacto)) ? $request->telefono_contacto : null;\n $aspi->telefonocelular = (isset($request->telefono_celular)) ? $request->telefono_celular : null;\n $aspi->email = (isset($request->correo)) ? $request->correo : null;\n $aspi->dpto_residenciasec = (isset($request->dpto3_id)) ? $request->dpto3_id : null;\n $aspi->ciudad_residenciasec = (isset($request->ciudad3_id)) ? $request->ciudad3_id : null;\n $aspi->direccion_residenciasec = (isset($request->direccion_ec)) ? $request->direccion_ec : null;\n $aspi->direccion_estudio = (isset($request->direccion_ciudade)) ? $request->direccion_ciudade : null;\n $aspi->telefonoestudio = (isset($request->telefono_ciudade)) ? $request->telefono_ciudade : null;\n $response = null;\n if (count($aspi) > 0) {\n if ($aspi->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información básica del aspirante</p>\";\n //formulario, pin\n $foin = new Formularioinscripcion();\n $foin->medioinscripcion = \"ON LINE\";\n $foin->simultaneidad = \"NINGUNO\";\n $foin->aspirante_id = $aspi->id;\n $foin->estadoadmision = \"ASPIRANTE\";\n $foin->servicioperiodo_id = $request->serp;\n $pr = Programaunidad::find($request->programaunidad_id);\n $codigo = substr($pr->programa_id, strlen($pr->programa_id) - 2, 2) . substr(date('Y'), strlen(date('Y')) - 2, 2) . substr($request->numero_documento, strlen($request->numero_documento) - 3, 3);\n $foin->codigo = $codigo;\n $sp = Servicioperiodo::find($request->serp);\n if (count($sp) > 0) {\n $foin->tipoinscripcion_id = $sp->servicioinscripcion->tipoinscripcion_id;\n } else {\n $foin->tipoinscripcion_id = 1;\n }\n $pin = Pin::where('pin', $request->pin)->first();\n if (count($pin) > 0) {\n if ($pin->estado == \"USADO\") {\n $foin->pin_id = $pin->id;\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó no ha sido vendido en el banco. Si usted compro el PIN, por favor Acérquese a la oficina de registro y control para validar su PIN.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó es inválido. No puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n if (count($foin) > 0) {\n if ($foin->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se ha creado el formulario de inscripción del aspirante</p>\";\n //programaXformulario\n $pxf = new Programaxformulario();\n $pxf->prioridad = 1;\n $pxf->puntajeobtenido = 0;\n $pxf->puesto = 0;\n $pxf->formularioinscripcion_id = $foin->id;\n $pxf->programaunidad_id = $request->programaunidad_id;\n $conv = Convocatoria::where([['programaunidad_id', $request->programaunidad_id], ['periodoacademico_id', $sp->periodoacademico_id]])->first();\n if (count($conv) > 0) {\n $pxf->convocatoria_id = $conv->id;\n }\n if (count($pxf) > 0) {\n if ($pxf->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>El programa que ha seleccionado ha sido asociado al aspirante</p>\";\n //estudios secundarios\n $esse = new Estudiossecundario();\n $esse->pais = (isset($request->paisn_id)) ? $request->paisn_id : null;\n $esse->ciudad = (isset($request->ciudadn_id)) ? $request->ciudadn_id : null;\n $esse->codigo_snp = (isset($request->iem_id)) ? $request->iem_id : null;\n $esse->enfasis_mod_sec = (isset($request->enfasis)) ? $request->enfasis : null;\n $esse->fechaterminacion = (isset($request->ft)) ? $request->ft : null;\n $esse->formaobtuvotitulo = (isset($request->forma_obt_titulo)) ? $request->forma_obt_titulo : null;\n $esse->valormatricula10 = (isset($request->vmd)) ? $request->vmd : null;\n $esse->valorpension10 = (isset($request->vpd)) ? $request->vpd : null;\n $esse->valorpension11 = (isset($request->vpu)) ? $request->vpu : null;\n $esse->valormatricula11 = (isset($request->vmu)) ? $request->vmu : null;\n $esse->libro = (isset($request->libro)) ? $request->libro : null;\n $esse->folio = (isset($request->folio)) ? $request->folio : null;\n $esse->snp = (isset($request->snp_aspirante)) ? $request->snp_aspirante : null;\n $esse->puntajeobtenido = (isset($request->poes)) ? $request->poes : null;\n $esse->ciudadpresentoprueba = (isset($request->ciudad5_id)) ? $request->ciudad5_id : null;\n $esse->fechapresentopruebas = (isset($request->fpes)) ? $request->fpes : null;\n if ($esse->fechapresentopruebas !== null) {\n $time = strtotime($esse->fechapresentopruebas);\n $newformat = date('Y-m-d', $time);\n $fff = explode(\"-\", $newformat);\n $aniop = $fff[0];\n $mesp = $fff[1];\n if ($aniop < 2014) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp < 6) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp > 6) {\n $esse->tipoprueba = \"NUEVA\";\n }\n if ($aniop > 2014) {\n $esse->tipoprueba = \"NUEVA\";\n }\n }\n $esse->tipodocicfes = (isset($request->tipodoc_prueba)) ? $request->tipodoc_prueba : null;\n $esse->documentoicfes = (isset($request->dipi)) ? $request->dipi : null;\n $esse->aspirante_id = $aspi->id;\n if (count($esse) > 0) {\n if ($esse->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de estudios secundarios</p>\";\n }\n }\n $tb1 = $tb2 = $tb3 = $tb4 = $tb5 = $tb6 = $tb7 = $tb8 = $tb9 = $tb10 = $tb11 = $tb12 = $tb13 = $tb14 = $tb15 = $tb16 = null;\n //tb1 lista inst en las que estudió institucionsecundaria\n if (isset($request->tb1)) {\n foreach ($request->tb1 as $value) {\n $is = new Institucionsecundaria();\n $v = explode(\";\", $value);\n $is->institucionestudio = (strlen($v[0]) > 0) ? $v[0] : null;\n $is->fechainicial = (strlen($v[1]) > 0) ? $v[1] : date('Y-m-d', strtotime('00-00-0000'));\n $is->fechafin = (strlen($v[2]) > 0) ? $v[2] : date('Y-m-d', strtotime('00-00-0000'));\n $is->aspirante_id = $aspi->id;\n $tb1[] = $is;\n }\n }\n if (count($tb1) > 0) {\n foreach ($tb1 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de instituciones donde estudió.</p>\";\n }\n //tb2 estudios de pregrado\n if (isset($request->tb2)) {\n foreach ($request->tb2 as $value) {\n $eu = new Estudiosuniversitario();\n $v = explode(\";\", $value);\n $eu->codigosnp = $v[0];\n $eu->programa = $v[1];\n $eu->periodoscursados = $v[2];\n $eu->fechaterminacion = $v[3];\n $eu->tarjetaprofesional = $v[4];\n $eu->ciudadrural = $v[5];\n if ($v[6] == \"PRESENTO\") {\n $eu->registroecaes = $v[7];\n $eu->puntajeecaes = $v[8];\n }\n $eu->aspirante_id = $aspi->id;\n $tb2[] = $eu;\n }\n }\n if (count($tb2) > 0) {\n foreach ($tb2 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de pregrado.</p>\";\n }\n //tb3 estudios de postgrado\n if (isset($request->tb3)) {\n foreach ($request->tb3 as $value) {\n $ep = new Estudiospostgrado();\n $v = explode(\";\", $value);\n $ep->codigosnp = $v[0];\n $ep->programa = $v[1];\n $ep->fechaterminacion = $v[2];\n $ep->aspirante_id = $aspi->id;\n $tb3[] = $ep;\n }\n }\n if (count($tb3) > 0) {\n foreach ($tb3 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de postgrado.</p>\";\n }\n //tb4 cursos realizados\n if (isset($request->tb4)) {\n foreach ($request->tb4 as $value) {\n $cr = new Cursorealizado();\n $v = explode(\";\", $value);\n $cr->titulo = $v[0];\n $cr->institucion = $v[1];\n $cr->fechaterminacion = $v[2];\n $cr->aspirante_id = $aspi->id;\n $tb4[] = $cr;\n }\n }\n if (count($tb4) > 0) {\n foreach ($tb4 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de cursos realizados.</p>\";\n }\n //tb5 publicaciones\n if (isset($request->tb5)) {\n foreach ($request->tb5 as $value) {\n $p = new Publicacion();\n $v = explode(\";\", $value);\n $p->nombre = $v[0];\n $p->tipoobra = $v[1];\n $p->anio = $v[2];\n $p->entidadauspiciadora = $v[3];\n $p->aspirante_id = $aspi->id;\n $tb5[] = $p;\n }\n }\n if (count($tb5) > 0) {\n foreach ($tb5 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de publicaciones.</p>\";\n }\n //tb6 familiares\n if (isset($request->tb6)) {\n foreach ($request->tb6 as $value) {\n $g = new Grupofamiliar();\n $v = explode(\";\", $value);\n $g->sitiotrabajoestudio = $v[0];\n $g->ciudad = $v[1];\n $g->parentesco_id = (count($v[4]) > 0) ? $v[4] : 0;\n $g->cedula = $v[5];\n $g->nombrecompleto = $v[6];\n $g->vive = $v[7];\n $g->ocupacion = $v[8];\n $g->profesion = $v[9];\n $g->edad = $v[10];\n $g->niveleducativo = $v[11];\n $g->ingresomensual = $v[12];\n $g->ingresomensual_rango = $v[13];\n $g->lee = $v[14];\n $g->ciudadresidencia = $v[16];\n $g->direccion = $v[17];\n $g->telefonoresidencia = $v[18];\n $g->ciudadresidencia = $v[19];\n $g->direccionempresa = $v[20];\n $g->celular = $v[21];\n $g->aspirante_id = $aspi->id;\n $tb6[] = $g;\n }\n }\n if (count($tb6) > 0) {\n foreach ($tb6 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de familiares.</p>\";\n }\n //informacion socioeconomica\n $ise = new Informacionsocioeconomica();\n $ise->situacionpadres = (isset($request->sdlp)) ? $request->sdlp : null;\n $ise->numerofamiliares = (isset($request->nmf)) ? $request->nmf : null;\n $ise->numeromiembrostrabaja = (isset($request->pqt)) ? $request->pqt : null;\n $ise->numerohermanos = (isset($request->nhise)) ? $request->nhise : null;\n $ise->posicionhermanos = (isset($request->pelh)) ? $request->pelh : null;\n $ise->ingresomensualfamilia = (isset($request->imaf)) ? $request->imaf : null;\n $ise->egresomensualfamilia = (isset($request->emaf)) ? $request->emaf : null;\n $ise->hermanosestudiandou = (isset($request->nheu)) ? $request->nheu : null;\n $ise->viveconfamilia = (isset($request->vcsf)) ? $request->vcsf : null;\n $ise->numhermanosestudiaunivers = (isset($request->nhceu)) ? $request->nhceu : null;\n $ise->quiencosteaestudios = (isset($request->cdse)) ? $request->cdse : null;\n $ise->conquienreside = (isset($request->edr)) ? $request->edr : null;\n $ise->estrato = (isset($request->eise)) ? $request->eise : null;\n $ise->situacioneconomica = (isset($request->se)) ? $request->se : null;\n $ise->sufragoelecciones = (isset($request->selue)) ? $request->selue : null;\n $ise->rentagravable = (isset($request->rg)) ? $request->rg : null;\n $ise->patrimoniogravable = (isset($request->pg)) ? $request->pg : null;\n $ise->ingresoretenciones = (isset($request->iyr)) ? $request->iyr : null;\n $ise->sisben = (isset($request->tsise)) ? $request->tsise : null;\n $ise->nivelsisben = (isset($request->nivelsisben)) ? $request->nivelsisben : null;\n $ise->cajacompensacion = (isset($request->ccf)) ? $request->ccf : null;\n $ise->ingresosnogravables = (isset($request->ing)) ? $request->ing : null;\n $ise->patrimoniobruto = (isset($request->pb)) ? $request->pb : null;\n $ise->ingresobruto = (isset($request->ib)) ? $request->ib : null;\n $ise->rentanogravable = (isset($request->rng)) ? $request->rng : null;\n $ise->ingresosgravables = (isset($request->ig)) ? $request->ig : null;\n $ise->aspirante_id = $aspi->id;\n if (count($ise) > 0) {\n if ($ise->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información socioeconómica.</p>\";\n }\n }\n //posesion de residencia\n $pos = new Posesionresidencia();\n if (isset($request->PROPIA)) {\n if ($request->PROPIA == \"PROPIA\") {\n $pos->tipoposesion = \"PROPIA\";\n }\n }\n if (isset($request->pppc)) {\n if ($request->pppc == \"CASA PROPIA\") {\n $pos->tipoposesion = \"CASA PROPIA\";\n $pos->deudavivienda = (isset($request->ddlv)) ? $request->ddlv : null;\n $pos->vrmensualcuota = (isset($request->vmc)) ? $request->vmc : null;\n $pos->dirmueblehipotecado = (isset($request->ddih)) ? $request->ddih : null;\n $pos->numcredito = (isset($request->ndc)) ? $request->ndc : null;\n }\n }\n if (isset($request->aoa)) {\n if ($request->aoa == \"ARRENDADA\") {\n $pos->tipoposesion = \"ARRENDADA\";\n $pos->vrmensualarriendo = (isset($request->vma)) ? $request->vma : null;\n $pos->vrdelanticres = (isset($request->vdac)) ? $request->vdac : null;\n $pos->nombrearrendador = (isset($request->nda)) ? $request->nda : null;\n $pos->ciudadarrendador = (isset($request->cda)) ? $request->cda : null;\n $pos->direccarrendador = (isset($request->dda)) ? $request->dda : null;\n $pos->telarrendador = (isset($request->tda)) ? $request->tda : null;\n }\n }\n if (isset($request->ndla)) {\n if ($request->ndla == \"NINGUNA POSESION\") {\n $pos->tipoposesion = \"NINGUNA POSESION\";\n }\n }\n $pos->aspirante_id = $aspi->id;\n if (count($pos) > 0) {\n if ($pos->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de residencia.</p>\";\n }\n }\n //tb7 jefes de familia\n if (isset($request->tb7)) {\n foreach ($request->tb7 as $value) {\n $jf = new Jefefamilia();\n $v = explode(\";\", $value);\n $jf->nombre = $v[0];\n $jf->empresa = $v[1];\n $jf->cargo = $v[2];\n $jf->tiemposervicio = $v[3];\n $jf->sueldo = $v[4];\n $jf->jefeinmediato = $v[5];\n $jf->areadesempenio = $v[6];\n $jf->teltrabajo = $v[7];\n $jf->numpersonascargo = $v[8];\n $jf->eljefedefamiliaeselpadre = $v[9];\n $jf->ciudad = $v[11];\n $jf->dirempresa = $v[12];\n $jf->parentesco_id = (count($v[13]) > 0) ? $v[13] : 0;\n $jf->celular = $v[14];\n $jf->niveleducativo = $v[15];\n $jf->ocupacionlaboral_id = $v[16];\n $jf->tipodoc_id = $v[17];\n $jf->documentoidentidad = $v[18];\n $jf->aspirante_id = $aspi->id;\n $tb7[] = $jf;\n }\n }\n if (count($tb7) > 0) {\n foreach ($tb7 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de jefes de familia.</p>\";\n }\n //tb8 experiencia profesional\n if (isset($request->tb8)) {\n foreach ($request->tb8 as $value) {\n $ep = new Experienciaprofesional();\n $v = explode(\";\", $value);\n $ep->institucion = $v[0];\n $ep->cargo = $v[1];\n $ep->rangosalario_id = $v[2];\n $ep->fechaingreso = $v[3];\n $ep->fecharetiro = $v[4];\n $ep->telefonotrabajo = $v[5];\n $ep->aspirante_id = $aspi->id;\n $tb8[] = $ep;\n }\n }\n if (count($tb8) > 0) {\n foreach ($tb8 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de experiencia profesional.</p>\";\n }\n //tb9 experiencia docente\n if (isset($request->tb9)) {\n foreach ($request->tb9 as $value) {\n $ep = new Experienciadocente();\n $v = explode(\";\", $value);\n $ep->institucion = $v[0];\n $ep->nivel = $v[1];\n $ep->area = $v[2];\n $ep->tiemposervicio = $v[3];\n $ep->aspirante_id = $aspi->id;\n $tb9[] = $ep;\n }\n }\n if (count($tb9) > 0) {\n foreach ($tb9 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de experiencia docente.</p>\";\n }\n //tb10 experiencia en investigacion\n if (isset($request->tb10)) {\n foreach ($request->tb10 as $value) {\n $ep = new Experienciainvestigacion();\n $v = explode(\";\", $value);\n $ep->institucion = $v[0];\n $ep->proyecto = $v[1];\n $ep->cargo = $v[2];\n $ep->anio = $v[3];\n $ep->aspirante_id = $aspi->id;\n $tb10[] = $ep;\n }\n }\n if (count($tb10) > 0) {\n foreach ($tb10 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de investigación.</p>\";\n }\n //tb11 referencias\n if (isset($request->tb11)) {\n foreach ($request->tb11 as $value) {\n $ep = new Referenciaacademica();\n $v = explode(\";\", $value);\n $ep->nombre = $v[0];\n $ep->direccion = $v[1];\n $ep->telefono = $v[2];\n $ep->aspirante_id = $aspi->id;\n $tb11[] = $ep;\n }\n }\n if (count($tb11) > 0) {\n foreach ($tb11 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de referencias.</p>\";\n }\n //tb12 Asociaciones Científicas, Sociales y Culturales\n if (isset($request->tb12)) {\n foreach ($request->tb12 as $value) {\n $ep = new Asociacioncientifica();\n $v = explode(\";\", $value);\n $ep->nombre = $v[0];\n $ep->objetosocial = $v[1];\n $ep->fechaingreso = $v[2];\n $ep->aspirante_id = $aspi->id;\n $tb12[] = $ep;\n }\n }\n if (count($tb12) > 0) {\n foreach ($tb12 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información científica.</p>\";\n }\n //tb13 idiomas\n if (isset($request->tb13)) {\n foreach ($request->tb13 as $value) {\n $ep = new Idiomaaspirante();\n $v = explode(\";\", $value);\n $ep->idioma_id = $v[0];\n $ep->oir = $v[1];\n $ep->habla = $v[2];\n $ep->lee = $v[3];\n $ep->escribe = $v[4];\n $ep->aspirante_id = $aspi->id;\n $tb13[] = $ep;\n }\n }\n if (count($tb13) > 0) {\n foreach ($tb13 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de idiomas.</p>\";\n }\n //tb14 pasatiempos\n if (isset($request->tb14)) {\n foreach ($request->tb14 as $value) {\n $ep = new Pasatiempoaspirante();\n $v = explode(\";\", $value);\n $ep->pasatiempo_id = $v[0];\n $ep->aspirante_id = $aspi->id;\n $tb14[] = $ep;\n }\n }\n if (count($tb14) > 0) {\n foreach ($tb14 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de pasatiempos.</p>\";\n }\n //caracterizacion\n $car = new Caracterizacion();\n $car->practicadeporte = (isset($request->pd)) ? $request->pd : null;\n $car->deporte = (isset($request->cd)) ? $request->cd : null;\n $car->frecuenciadeporte = (isset($request->fp)) ? $request->fp : null;\n $car->formadeporte = (isset($request->flp)) ? $request->flp : null;\n $car->porquenodeporte = (isset($request->pnpd)) ? $request->pnpd : null;\n $car->eventopreferido = (isset($request->ecp)) ? $request->ecp : null;\n $car->frecuenciaeventopreferido = (isset($request->fca)) ? $request->fca : null;\n $car->practicaartistica = (isset($request->paa)) ? $request->paa : null;\n $car->actividadartistica = (isset($request->caa)) ? $request->caa : null;\n $car->formaactividadartistica = (isset($request->felp)) ? $request->felp : null;\n $car->ocupatiempolibre = (isset($request->eotl)) ? $request->eotl : null;\n $car->fuma = (isset($request->f)) ? $request->f : null;\n $car->frecuenciafuma = (isset($request->ccpd)) ? $request->ccpd : null;\n $car->bebe = (isset($request->cl)) ? $request->cl : null;\n $car->frecuenciabebe = (isset($request->cqfcl)) ? $request->cqfcl : null;\n $car->sustanciapsicoactivas = (isset($request->cssa)) ? $request->cssa : null;\n $car->frecuenciasustancia = (isset($request->cqfcssa)) ? $request->cqfcssa : null;\n $car->relacionessexuales = (isset($request->htrs)) ? $request->htrs : null;\n $car->edadprimrelacion = (isset($request->epr)) ? $request->epr : null;\n $car->metodoanticonceptivo = (isset($request->ma)) ? $request->ma : null;\n $car->numerohijos = (isset($request->nh)) ? $request->nh : null;\n $car->gradoaceptacion = (isset($request->gasm)) ? $request->gasm : null;\n $car->depresionsinmotivo = (isset($request->sdsm)) ? $request->sdsm : null;\n $car->gradoconcentracion = (isset($request->gcc)) ? $request->gcc : null;\n $car->aspirante_id = $aspi->id;\n if (count($car) > 0) {\n if ($car->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de caracterización.</p>\";\n }\n }\n //tb15 inst donde ha soliscitado admision\n if (isset($request->tb15)) {\n foreach ($request->tb15 as $value) {\n $p = new Instsolicitudadmision();\n $v = explode(\";\", $value);\n $p->codigosnp = $v[0];\n $p->programa = $v[1];\n $p->anio = $v[2];\n $p->aceptado = $v[3];\n $p->aspirante_id = $aspi->id;\n $tb15[] = $p;\n }\n }\n if (count($tb15) > 0) {\n foreach ($tb15 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de instituciones donde solicitó admisión.</p>\";\n }\n //tb16 datos de discapacitados\n if (isset($request->tb16)) {\n foreach ($request->tb16 as $value) {\n $p = new Discapacidad();\n $v = explode(\";\", $value);\n $p->tipodiscapacidad_id = (count($v[0]) > 0) ? $v[0] : 1;\n $p->nombre = $v[1];\n $p->fechadiagnostico = $v[2];\n $p->aspirante_id = $aspi->id;\n $tb16[] = $p;\n }\n }\n if (count($tb16) > 0) {\n foreach ($tb16 as $value) {\n $value->save();\n }\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información de discapacidades.</p>\";\n }\n //otros datos\n $inf = new Informacioncomplementaria();\n $inf->tienehijos = (isset($request->tienehijos)) ? $request->tienehijos : null;\n $inf->cuantoshijos = (isset($request->chdi)) ? $request->chdi : null;\n $inf->sisben = (isset($request->sisben)) ? $request->sisben : null;\n $inf->desplazado = (isset($request->desplazado)) ? $request->desplazado : null;\n $inf->laboraactualmente = (isset($request->labora)) ? $request->labora : null;\n $inf->telefonocontactosec = (isset($request->tcs)) ? $request->tcs : null;\n $inf->otrocorreocontacto = (isset($request->cec)) ? $request->cec : null;\n $inf->personastrabajanfam = (isset($request->cptgf)) ? $request->cptgf : null;\n $inf->cuentaequipocomputo = (isset($request->ccec)) ? $request->ccec : null;\n $inf->accesointernet = (isset($request->eaie)) ? $request->eaie : null;\n $inf->aspirante_id = $aspi->id;\n if (count($tb1) > 0) {\n if ($inf->save()) {\n $response = $response . \"<p style='font-size:14px; color:green;'>Se guardó la información complementaria.</p>\";\n }\n }\n $pu = Programaunidad::find($request->programaunidad_id);\n $requisitos = null;\n if (count($pu) > 0) {\n $docins = Documentoinscripcion::where([['circunscripcion_id', $request->circunscripcion_id], ['programa_id', $pu->programa_id]])->get();\n if (count($docins) > 0) {\n foreach ($docins as $item) {\n $obj[\"ob\"] = $item->obligatorio;\n $obj[\"item\"] = $item->tipodocanexo->descripcion;\n $requisitos[] = $obj;\n }\n }\n }\n return view('inscripcion_publico.resultado_inscripcion')\n ->with('doc', $aspi->id)\n ->with('requisitos', $requisitos)\n ->with('rta', $response)\n ->with('sp', $request->serp);\n } else {\n $foin->delete();\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n $foin->delete();\n $aspi->delete();\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n $aspi->delete();\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n }", "title": "" }, { "docid": "b087facea726acecbf1828d70c6214d9", "score": "0.55980456", "text": "public function store()\n {\n $this->validate();\n\n $producto = Producto::create([\n 'color_id' => $this->color_id,\n 'talla_id' => $this->talla_id,\n 'nombre' => $this->nombre,\n 'precio_venta' => $this->precio_venta,\n 'imagen' => $this->imagen,\n 'stock' => $this->stock\n ]);\n\n $this->resetInput();\n $this->action = 1;\n\n }", "title": "" }, { "docid": "8fbdf93382796d1b0830ebdaaaf32c15", "score": "0.559054", "text": "public function store(Request $request)\n {\n $estante=new Estante;\n $estante->fill($request->all());\n $estante->save();\n Bitacora::bitacora('store','estantes','estantes',$estante->id);\n return redirect('/estantes')->with('mensaje','¡Guardado!');\n }", "title": "" }, { "docid": "f1d0af0f067bd82cab33d8f47388842b", "score": "0.5583906", "text": "public function store(Request $request)\n {\n \n $requestData = $request->all();\n \n sector_af::create($requestData);\n\n return redirect('sector_af')->with('flash_message', 'sector_af added!');\n }", "title": "" }, { "docid": "27030caec153d6ead37b37458496da9e", "score": "0.5579884", "text": "public function store()\n {\n // store the object itself\n parent::store(); \n parent::saveComposite('Contato', 'servidor_id', $this->id, $this->contatos);\n }", "title": "" }, { "docid": "ff594b91ea9fbb00a38a7bc3306fd739", "score": "0.5575716", "text": "public function store(Request $request)\n {\n $asistente = new Asistente;\n $asistente->cuil = $request->cuil;\n $asistente->apellido = $request->apellido;\n $asistente->nombre = $request->nombre;\n $asistente->matricula = $request->matricula;\n $asistente->titulo = $request->titulo;\n $asistente->direccion = $request->direccion;\n $asistente->telefono = $request->telefono;\n $asistente->email = $request->email;\n\n $asistente->save();\n }", "title": "" }, { "docid": "994a40a0cd60f22179369d6c6be995f4", "score": "0.5568811", "text": "public function store()\n\t{\n\t\t$input = Input::all();\n\t\ttry{\n\t\t\t$this->cemetery->store($input);\n\t\t\treturn Redirect::route('admin.cemeteries.index')\n \t->with('success', 'The new cemetery has been created');\n\t\t}\n\t\tcatch(ValidationException $e){\n\t\t\treturn Redirect::route('admin.cemeteries.create')\n\t\t ->withInput()\n\t\t ->withErrors($e->getErrors())\n\t\t ->with('error', 'The cemetery was not saved.');\n\t\t}\n\t}", "title": "" }, { "docid": "02b20eee08907e4cd5189620c74a7a9d", "score": "0.5567966", "text": "public function store(Request $request)\n {\n $caroussel = new Caroussel;\n $caroussel->name = $request->name;\n $caroussel->photo = $request->photo->store('','DiskImage');\n $caroussel->save();\n\n return redirect()->route('caroussels.show');\n }", "title": "" }, { "docid": "f3c89b63d23435139715bbcb5e318959", "score": "0.5566875", "text": "public function adminStore()\n {\n $data = request()->all();\n// dd($data);\n FFFlights::create([\n 'origin_id' => $data['origin'],\n 'destination_id' => $data['destination'],\n 'airline_id' => $data['airline'],\n 'departure' => $data['departure'],\n 'arival' => $data['arrival'],\n ]);\n return redirect(route('app.flights.index'));\n }", "title": "" }, { "docid": "85e074736a4c2ff9ef8e89ac182e7f3d", "score": "0.55647427", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'nombre' => 'required|unique:escuelas,nombre',\n 'carrera' => 'required',\n ]);\n \n $escuela = new Escuela;\n $escuela->nombre = $request->input('nombre');\n $escuela->descripcion = $request->input('descripcion');\n $escuela->user_id = auth()->user()->id;\n\n $escuela->save();\n $escuela->carreras()->sync($request->input('carrera'));\n\n return redirect()->route('escuelas.index')\n ->with('success', trans('School').' '.trans('created successfully '));\n }", "title": "" }, { "docid": "01bb31c278c0eee0ccb35797bdee1b2d", "score": "0.55466723", "text": "public function store()\n\t{\n\t\t$ngo = NGOs::create(array(\n 'name' => Input::get('name'),\n 'registation_date' => Input::get('reg_date'),\n 'certificate_no' => Input::get('certificate'),\n 'registation_type' => Input::get('reg_type'),\n 'operation_level' => Input::get('operation'),\n 'postal_adress' => Input::get('postal'),\n 'phisycal_add' => Input::get('physical'),\n 'region' => Input::get('region'),\n 'district' => Input::get('district'),\n 'phone_number' => Input::get('phone'),\n 'email' => Input::get('email'),\n ));\n\n $name = $ngo->name;\n foreach(Input::get('sector') as $sector_id){\n $ngo_sector = NGOSector::create(array(\n \"sector_id\" => $sector_id,\n \"n_gos_id\" => $ngo->id\n ));\n $sector = Sector::find($sector_id);\n Logs::create(array(\n \"user_id\"=> Auth::user()->id,\n \"action\" =>\"Add Sector \".$sector['sector_name'].\" to NGO nammed \".$name\n ));\n }\n\n Logs::create(array(\n \"user_id\"=> Auth::user()->id,\n \"action\" =>\"Add NGO nammed \".$name\n ));\n return \"<h4 class='text-success'>NGO Added Successfull</h4>\";\n\t}", "title": "" }, { "docid": "a55cc6ad9e9e92848b2e504092f5c006", "score": "0.55461484", "text": "public function store(Request $request)\n {\n $cad= $this->objEntrega->create([\n 'produto'=>$request->produto,\n 'quantidade'=>$request->quantidadeproduto,\n 'categoria'=>$request->categoria,\n 'enderecoentrega'=>$request->enderecoentrga,\n 'enderecocoleta'=>$request->enderecocoleta,\n ]);\n if($cad){\n return redirect('entrega');\n }\n }", "title": "" }, { "docid": "f0d2d65c8e0fa1ce6fda1566f3067600", "score": "0.5542125", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'wet' =>'required|numeric',\n 'c_wet' =>'required',\n 'dry' =>'required',\n 'c_dry' =>'required'\n ]);\n\n $info = new AgriFacility;\n $info->subsector = session('SUBSEC');\n $info->wet = $request->input('wet');\n $info->c_wet = $request->input('c_wet');\n $info->dry = $request->input('c_dry');\n $info->c_dry = $request->input('c_dry');\n $info->orchard = $request->input('orchard');\n $info->c_orchard = $request->input('c_orchard');\n\n $info->food_processing = $request->input('food_processing');\n $info->mills = $request->input('mills');\n $info->tradition_mills = $request->input('tradition_mills');\n $info->oil_expeller = $request->input('oil_expeller');\n $info->corn_flake = $request->input('corn_flake');\n $info->electric_dryer = $request->input('electric_dryer');\n $info->potatoe_fryer = $request->input('potatoe_fryer');\n $info->power_tiller = $request->input('power_tiller');\n $info->tractor = $request->input('tractor');\n $info->transplanter = $request->input('transplanter');\n $info->grass_cutter = $request->input('grass_cutter');\n $info->green_house = $request->input('green_house');\n\n $info->save();\n return redirect('/agrifacility')->with('success','Saved successfully!!');\n }", "title": "" }, { "docid": "b9d27003418811cb8b4db2c5dce0ec54", "score": "0.5540304", "text": "public function store() {\n $this->validate(request(), [\n 'asset_id'\t\t=> 'required',\n 'item' \t\t\t=> 'required', // Advanced Validation\n 'type'\t\t\t=> 'required',\t// Advanced Validation\n 'qty' => 'nullable|numeric',\n 'weight_uom' \t=> 'required',\t// Advanced Validation\n 'note' \t\t\t=> 'required'\n ]);\n\n $now \t\t= new DateTime();\n $last_id \t= $this->getID();\n \n DB::table('asset_part')->insert([\n\t\t\t'id'\t\t\t\t=> $last_id,\n\t\t\t'asset_id'\t\t\t=> request('asset_id'),\n\t\t\t'in_id'\t\t\t\t=> request('item'),\n\t\t\t'type_id'\t\t\t=> request('type'),\n\t\t\t'qty'\t\t\t\t=> request('qty'),\n\t\t\t'uom_id'\t\t\t=> request('weight_uom'),\n\t\t\t'note'\t\t\t\t=> request('note'),\n\t\t\t'modified_time' => $now,\n\t\t\t'modified_id' => $this->user_id,\n\t\t\t'created_time' => $now,\n\t\t\t'created_id' => $this->user_id\n\t\t]);\n\n return response(['status' => 'ok'], 200);\n }", "title": "" }, { "docid": "0ed0e4c1494f8dfcc936c62df42cfd3b", "score": "0.55357647", "text": "public function store(Request $request)\n {\n // = ['designat','date_paiement','mode_paiement','montant','ref_paiement','type_opr','observations'];\n\n $user = Auth::user();\n if($user->can('create-client')){\n\n $caisse = new Caisse();\n $caisse->designat = $request->input('designat');\n $caisse->date_paiement = $request->input('date_paiement');\n $caisse->mode_paiement = $request->input('mode_paiement');\n $caisse->montant = $request->input('montant');\n $caisse->ref_paiement = $request->input('ref_paiement');\n $caisse->type_opr = $request->input('type_opr');\n $caisse->observations = $request->input('observations');\n $user->caisses()->save($caisse);\n\n return response()->json('user can add caisse');\n }\n else{\n return response()->json('user not can add caisse');\n }\n }", "title": "" }, { "docid": "993cb06ea7022b5a9ff29810908f3a17", "score": "0.5534853", "text": "public function storeC(Request $request)\n {\n //Troquei nome do LogCaixa pq Log e reservado buga o sistema\n \n $caixa = new CaixaStatus();\n \n $caixa->user_id = Auth::user()->id;\n \n $caixa->status = 1;\n\n $caixa->save();\n \n \n \n $caixaID = CaixaStatus::select('*')\n ->where('user_id','=',Auth::user()->id)\n ->where('status','=',1)\n ->first();\n \n $data = $request->all();\n \n $cashier = new Cashier;\n \n $cashier->fill($data);\n \n $cashier->caixa_status_id = $caixaID->id;\n\n\n // dd($cashier);\n \n $cashier->save();\n \n \n // return view('admin.cashier.index');\n return redirect()->route('admin.cashier.index');\n \n \n }", "title": "" }, { "docid": "6c2f8808393af66df6bc6a282054bd2c", "score": "0.5533907", "text": "public function store()\n\t{\n\n\t\tprint_r(\\Request::all());\n\n\t\tif( $snapshot = XSnapCourier::createSnapshot(\\Request::get('volume_name'), \\Request::get('snapshot_name') )) {\n\t\t\techo \"Created successfully\";\n\t\t\tprint_r($snapshot);\n\t\t}\n\n\t}", "title": "" }, { "docid": "6268027e52e06aef54b1f9b7b764a918", "score": "0.55338377", "text": "public function store(Request $request)\n { \n if ($request->session()->get('codigoLotacaoFisica') == null || $request->session()->get('codigoLotacaoFisica') === \"NULL\") {\n $lotacao = $request->session()->get('codigoLotacaoAdministrativa');\n } \n else {\n $lotacao = $request->session()->get('codigoLotacaoFisica');\n }\n \n try {\n DB::beginTransaction();\n // REALIZA O INSERT NA TABELA DE DEMANDA\n $demanda = new ContratacaoDemanda;\n $demanda->tipoPessoa = $request->tipoPessoa;\n if ($request->tipoPessoa === \"PF\") {\n $demanda->cpf = $request->cpf;\n } \n else {\n $demanda->cnpj = $request->cnpj;\n }\n \n $demanda->nomeCliente = $request->nomeCliente;\n $demanda->dadosContaCliente = $request->agenciaContaCliente . '.' . $request->operacaoContaCliente . '.' . $request->contaCliente . '-' . $request->digitoContaCliente;\n $demanda->tipoOperacao = $request->tipoOperacao;\n $demanda->tipoMoeda = $request->tipoMoeda;\n $demanda->valorOperacao = str_replace(\",\",\".\", str_replace(\".\", \"\", $request->valorOperacao));\n \n if ($request->tipoOperacao == \"Pronto Exportação Antecipado\" || $request->tipoOperacao == \"Pronto Importação Antecipado\") {\n $demanda->dataPrevistaEmbarque = date(\"Y-m-d\", strtotime(str_replace('/', '-', $request->dataPrevistaEmbarque)));\n }\n \n $demanda->statusAtual = \"CADASTRADA\";\n $demanda->responsavelAtual = $request->session()->get('matricula');\n \n if ($request->session()->get('acessoEmpregadoEsteiraComex') == \"SR\") {\n $demanda->agResponsavel = null;\n $demanda->srResponsavel = $lotacao;\n } else {\n // CAPTURA A SR RESPONSÁVEL PELA AGÊNCIA\n $objRelacaoEmailUnidades = RelacaoAgSrComEmail::where('codigoAgencia', $lotacao)->first();\n\n $demanda->agResponsavel = $lotacao;\n $demanda->srResponsavel = $objRelacaoEmailUnidades->codigoSr;\n }\n \n $demanda->analiseAg = $request->analiseAg;\n $demanda->dataCadastro = date(\"Y-m-d H:i:s\", time());\n $demanda->cnaeRestrito = $request->cnaeRestrito;\n $demanda->liberadoLiquidacao = 'NAO';\n $demanda->save();\n\n // VALIDA SE É OPERACAO DE IMPORTAÇÃO PARA CADASTRO DO DADOS DO BENEFICIARIO E INTERMEDIARIO (SE HOUVER)\n // if ($request->tipoOperacao == 'Pronto Importação Antecipado' || $request->tipoOperacao == 'Pronto Importação') {\n // $dadosContaImportador = new ContratacaoContaImportador;\n // $dadosContaImportador->idDemanda = $demanda->idDemanda;\n // $dadosContaImportador->nomeBeneficiario = $request->nomeBeneficiario;\n // $dadosContaImportador->enderecoBeneficiario = $request->enderecoBeneficiario;\n // $dadosContaImportador->cidadeBeneficiario = $request->cidadeBeneficiario;\n // $dadosContaImportador->paisBeneficiario = $request->paisBeneficiario;\n // $dadosContaImportador->nomeBancoBeneficiario = $request->nomeBancoBeneficiario;\n // $dadosContaImportador->ibanBancoBeneficiario = $request->ibanBancoBeneficiario;\n // $dadosContaImportador->swiftAbaBancoBeneficiario = $request->swiftAbaBancoBeneficiario;\n // $dadosContaImportador->numeroContaBeneficiario = $request->numeroContaBeneficiario;\n // // VALIDA SE EXITE BANCO INTERMADIARIO\n // if ($request->has('temBancoIntermediario')) {\n // $dadosContaImportador->nomeBancoIntermediario = $request->nomeBancoIntermediario;\n // $dadosContaImportador->ibanBancoIntermediario = $request->ibanBancoIntermediario;\n // $dadosContaImportador->contaBancoIntermediario = $request->contaBancoIntermediario;\n // $dadosContaImportador->swiftAbaBancoIntermediario = $request->swiftAbaBancoIntermediario;\n // }\n // $dadosContaImportador->save();\n // }\n\n // CRIA O DIRETÓRIO PARA UPLOAD DOS ARQUIVOS\n $this->criaDiretorioUploadArquivo($request, $demanda->idDemanda);\n\n // REALIZA O UPLOAD DOS ARQUIVOS E FAZ O INSERT NAS TABELAS TBL_EST_CONTRATACAO_LINK_UPLOADS E TBL_EST_CONTRATACAO_CONFERE_CONFORMIDADE\n switch ($request->tipoOperacao) {\n case 'Pronto Importação Antecipado':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DADOS_CONTA_DO_BENEFICIARIO\", $demanda->idDemanda);\n break;\n case 'Pronto Importação':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadConhecimento\", \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadDi\", \"DI\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DI\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DADOS_CONTA_DO_BENEFICIARIO\", $demanda->idDemanda);\n break;\n case 'Pronto Exportação Antecipado':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n break;\n case 'Pronto Exportação':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadConhecimento\", \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadDue\", \"DUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DUE\", $demanda->idDemanda);\n break;\n }\n // DOCUMENTOS DIVERSOS\n if ($request->has('uploadDocumentosDiversos')) {\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadDocumentosDiversos\", \"DOCUMENTOS_DIVERSOS\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DOCUMENTOS_DIVERSOS\", $demanda->idDemanda);\n }\n\n // REALIZA O INSERT NA TABELA DE HISTORICO\n $historico = new ContratacaoHistorico;\n $historico->idDemanda = $demanda->idDemanda;\n $historico->tipoStatus = \"CADASTRO\";\n $historico->dataStatus = date(\"Y-m-d H:i:s\", time());\n $historico->responsavelStatus = $request->session()->get('matricula');\n $historico->area = $lotacao;\n $historico->analiseHistorico = $request->analiseAg;\n $historico->save();\n\n // ENVIA E-MAIL PARA A AGÊNCIA\n if (env('DB_CONNECTION') === 'sqlsrv') {\n $dadosDemandaCadastrada = ContratacaoDemanda::find($demanda->idDemanda);\n ContratacaoPhpMailer::enviarMensageria($request, $dadosDemandaCadastrada, 'demandaCadastrada', 'faseConformidadeDocumental', null);\n }\n \n $request->session()->flash('corMensagem', 'success');\n $request->session()->flash('tituloMensagem', \"Protocolo #\" . str_pad($demanda->idDemanda, 4, '0', STR_PAD_LEFT) . \" | Cadastro Realizado com Sucesso!\");\n $request->session()->flash('corpoMensagem', \"Sua demanda foi cadastrada com sucesso! Para acompanhar todas suas demandas já cadastradas \");\n DB::commit();\n return redirect('esteiracomex/solicitar/contratacao');\n } catch (\\Exception $e) {\n DB::rollback();\n dd($e);\n $request->session()->flash('corMensagem', 'danger');\n $request->session()->flash('tituloMensagem', \"Protocolo não foi cadastrado\");\n $request->session()->flash('corpoMensagem', \"Aconteceu algum erro durante o cadastro, tente novamente.\");\n return redirect('esteiracomex/solicitar/contratacao');\n }\n }", "title": "" }, { "docid": "10a2cfb31c1dc13c5d61b59f568dd3a8", "score": "0.55319875", "text": "public function store(Request $request)\n {\n\n $centro = json_decode($request->getContent(), true);\n\n if(!Auth::user()->isSuperAdmin()){\n $centro['coordinador'] = Auth::id();\n }\n\n if(in_array(\"verificado\", $centro)){\n unset($centro['verificado']);\n }\n\n $centro = Centro::create($centro);\n\n return new CentroResource($centro);\n }", "title": "" }, { "docid": "a5f8bda492d957cd5c0917fbb7a083a8", "score": "0.553024", "text": "public function store(Request $request)\n {\n $construction = New Construction;\n $construction->name = $request->name;\n $construction->honorary = $request->honorary;\n $construction->date = $request->date;\n $construction->square_meter = $request->square_meter;\n if($request->status==\"Activo\")\n $construction->status=\"0\";\n else if($request->status==\"Finalizado\")\n $construction->status=\"1\";\n else if($request->status==\"Espera\")\n $construction->status=\"2\";\n $construction->client_id = $request->client_id;\n $construction->save();\n\n $msg = [\n 'title' => 'Creado!',\n 'text' => 'Obra creada exitosamente.',\n 'icon' => 'success'\n ];\n\n $honorary_remaining = New HonoraryRemaining;\n $honorary_remaining->construction_id = $construction->id;\n $honorary_remaining->remaining = 0;\n $honorary_remaining->save();\n\n return redirect('construction')->with('message', $msg);\n }", "title": "" }, { "docid": "364eeae3687052f99013e799f4469d92", "score": "0.5527333", "text": "public function store(StoreVacanciesRequest $request)\n {\n if (! Gate::allows('vacancy_create')) {\n return abort(401);\n }\n $request = $this->saveFiles($request);\n $vacancy = Vacancy::create($request->all());\n $vacancy->sphere_id()->sync(array_filter((array)$request->input('sphere_id')));\n $vacancy->schedule_id()->sync(array_filter((array)$request->input('schedule_id')));\n\n\n\n return redirect()->route('admin.vacancies.index');\n }", "title": "" }, { "docid": "5521da03b557ef076a9bc19bca7a7bad", "score": "0.55185604", "text": "public function store(Request $request)\n {\n request()->validate([\n 'beneficiario_id' => 'required',\n ]);\n\n $peso = floatval(request('peso'));\n $estatura = floatval(request('estatura'));\n if($estatura != null){ \n $estatura = $estatura/100;\n $estatura = pow($estatura,2);\n $imc = $peso/$estatura;\n $imc = round($imc,2);\n }\n else{\n $imc = null;\n }\n \n $consulta= new nutricionConsulta([\n 'ocupacion'=> request('ocupacion'),\n 'horarioscomida'=> request('horarioscomida'),\n 'cantidadalimentos'=> request('cantidadalimentos'),\n 'apetito'=> request('apetito'),\n 'distension'=> request('distension'),\n 'estrenimiento'=> request('estrenimiento'),\n 'flatulencias'=> request('flatulencias'),\n 'vomitos'=> request('vomitos'),\n 'caries'=> request('caries'),\n 'edema'=> request('edema'),\n 'mareo'=> request('mareo'),\n 'zumbido'=> request('zumbido'),\n 'cefaleas'=> request('cefaleas'),\n 'disnea'=> request('disnea'),\n 'poliuria'=> request('poliuria'),\n 'actividadfisica'=> request('actividadfisica'),\n 'suenohoras'=> request('suenohoras'),\n 'comidasdia'=> request('comidasdia'),\n 'lugarcomida'=> request('lugarcomida'),\n 'preparacomida'=> request('preparacomida'),\n 'entrecomidas'=> request('entrecomidas'),\n 'alimentospreferidos'=> request('alimentospreferidos'),\n 'alimentosodiados'=> request('alimentosodiados'),\n 'suplementos'=> request('suplementos'),\n 'medicamentos'=> request('medicamentos'),\n 'consumoagua'=> request('consumoagua'),\n 'recordatoriodesayuno'=> request('recordatoriodesayuno'),\n 'recordatoriocolacionm'=> request('recordatoriocolacionm'),\n 'recordatoriocomida'=> request('recordatoriocomida'),\n 'recordatoriocolaciont'=> request('recordatoriocolaciont'),\n 'recordatoriocena'=> request('recordatoriocena'),\n 'peso'=> request('peso'),\n 'estatura'=> request('estatura'),\n 'tipodieta'=> request('tipodieta'),\n 'kilocaloriastotal'=> request('kilocaloriastotal'),\n 'kilocaloriashidratos'=> request('kilocaloriashidratos'),\n 'porcentajehidratos'=> request('porcentajehidratos'),\n 'porcentajeproteinas'=> request('porcentajeproteinas'),\n 'porcentajegrasas'=> request('porcentajegrasas'),\n 'diagnostico'=> request('diagnostico'),\n 'nota'=> request('nota'),\n 'imc'=> $imc,\n 'fecha'=> request('fecha'),\n //'beneficiario_id' => request('beneficiario_id'),\n ]);\n\n $id = request('beneficiario_id');\n $beneficiario = Beneficiario::find($id);\n $beneficiario->nutricionconsulta()->save($consulta);\n\n return view('nutriologia.edit',compact('consulta'));\n // return redirect('beneficiario/'.$id)->with('nuevo','Consulta agregada con éxito');\n }", "title": "" }, { "docid": "5eb9b4e8df5594ad76af8f6f33d394f2", "score": "0.55176973", "text": "public function store()\n {\n //\n $this->supplier->createSupplier(Input::all());\n return Redirect::action('SupplierController@index');\n }", "title": "" }, { "docid": "8aed2227138873c176aaff64d3416ff5", "score": "0.5516383", "text": "public function store()\n {\n $client = Client::create(array(\n \"attention_name\"=> Input::get(\"attention_name\"),\n \"campany_name\" => Input::get(\"campany_name\"),\n \"address\" => Input::get(\"address\"),\n \"email\" => Input::get(\"email\"),\n \"phone_no\" => Input::get(\"phone_no\"),\n \"tin_no\" => Input::get(\"tin_no\"),\n \"vat_no\" => Input::get(\"vat_no\"),\n \"status\" => Input::get(\"status\"),\n// \"country\" => Input::get(\"country\"),\n\n ));\n\n return \"<h3 class='text-success'> Client Registered Successful </h3>\";\n\n }", "title": "" }, { "docid": "db53cd50f0951f368ad9ee1136d42921", "score": "0.55158925", "text": "public function store()\n {\n $attributes = request()->validate([\n 'make' => ['required', 'max:255'],\n 'model' => ['required', 'max:255'],\n 'description' => ['required', 'min:3', 'max:255']\n ]);\n\n $attributes['owner_id'] = auth()->id();\n\n $tag = request()->get('tag');\n\n $car = Car::create($attributes);\n\n $car->tags()->attach($tag);\n\n session()->flash('added', 'You have added a new car!');\n\n event(new CarAdded($car)); // fires an event which sends an email to user\n\n return redirect ('cars');\n }", "title": "" }, { "docid": "54db356d5922a4564d7e55415e63b41e", "score": "0.5510926", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'from' => 'required',\n 'to' => 'required',\n 'tour_number' => 'required',\n 'price' => 'required',\n 'file' => 'required|image',\n ]);\n\n $circuit = new Circuit();\n\n if($request->hasFile('file')){\n $image = $request->file('file');\n $filename = time(). '.' . $image->getClientOriginalExtension();\n $location = public_path('uploads/' .$filename);\n Image::make($image)->fit(310, 201)->save($location);\n $circuit->file = $filename;\n }\n\n $circuit->name = $request->get('name');\n $circuit->from = $request->get('from');\n $circuit->to = $request->get('to');\n $circuit->price = $request->get('price');\n $circuit->tour_number = $request->get('tour_number');\n $circuit->save();\n\n Session::flash('success', 'Circuit ajouté avec succès');\n return redirect()->route('admin.circuit.index');\n }", "title": "" }, { "docid": "f503a6d59b85fa22de2ba93f00eb0f6a", "score": "0.5510771", "text": "public function store()\n\t{\n\t\t$this->gateway->create(Input::only(['name'])); \n\t\treturn Redirect::to('admin/course');\n\t}", "title": "" }, { "docid": "b4e4df912aef65fffd3587228101f760", "score": "0.55086887", "text": "public function store(ClientRequest $request)\n {\n Supplier::create($request->only('name', 'phoneNumber'));\n\n flash('supplier created success fully');\n\n return redirect()->route('suppliers.index');\n }", "title": "" }, { "docid": "42fd000919e74e694e3b803d9038b66f", "score": "0.5507637", "text": "public function store(Request $request)\n {\n Cliente::create($request->all());\n return redirect()->route('cliente.index')->with('success','Registro creado satisfactoriamente');\n }", "title": "" }, { "docid": "86ccd2c2299a50fe4de5efe0536fd217", "score": "0.55056787", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'welfare' => 'required',\n 'cadre' => 'required',\n 'value' => 'required',\n 'active' => 'required'\n ]);\n\n ByCadre::create([\n 'welfare_id'=> $request->welfare,\n 'cadre_id' => $request->cadre,\n 'value' => $request->value,\n 'percentage'=> $request->percentage,\n 'active' => $request->active\n ]);\n\n return redirect('hrpayroll/allowance/by-cadre')->with('success', 'Record has been added.');\n }", "title": "" }, { "docid": "6bd3b0b54a5feb2759712b3290ab19b2", "score": "0.5505329", "text": "public function store(Request $request)\n {\n $request['produto'] = mb_strtoupper($request->produto, 'UTF-8');\n $request['user_id'] = 1;\n $request['area_id'] = 1;\n\n Estoque::create($request->all());\n return redirect('/admin/farmacia/estoque/cadastro')->with('success', 'Item cadastrado com sucesso!');\n }", "title": "" }, { "docid": "c7fe55cef40c463739ba8fc103491390", "score": "0.5503317", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'serial_number' => 'required',\n 'weight' => 'required',\n 'manufacture_date' => 'required',\n 'shelf_life' => 'required',\n 'country_of_origin' => 'required',\n 'source' => 'required',\n 'source_address' => 'required',\n 'current_location' => 'required',\n ]);\n \n $cylinder = new Cylinder();\n $cylinder->serial_number = $request->serial_number;\n $cylinder->weight = $request->weight;\n $cylinder->manufacture_date = $request->manufacture_date;\n $cylinder->shelf_life = $request->shelf_life;\n $cylinder->country_of_origin = $request->country_of_origin;\n $cylinder->source = $request->source;\n $cylinder->source_address = $request->source_address;\n $cylinder->current_location = $request->current_location;\n $cylinder->save();\n\n $history = new History();\n $history->serial_number = $request->serial_number;\n $history->current_location = $request->current_location;\n $history->save();\n $request->session()->flash('success', 'Cylinder Added successfully');\n return redirect()->route('admin.cylinder');\n }", "title": "" }, { "docid": "8a178edcea7e06905bd094220ab5fe42", "score": "0.55009794", "text": "public function store()\n\t{\n\t\t$carrier = new $this->repo;\n\n\t\tif ($carrier->save()) {\n\t\t\treturn $this->rest->response(201, $carrier);\n\t\t}\n\n\t\treturn $this->response->errorBadRequest($carrier->errors());\n\t}", "title": "" }, { "docid": "9df0dbf18f74eb02e89331243a109e55", "score": "0.5498913", "text": "public function store(Request $request){\n\n $nuevoSeguimiento->paciente=$request->paciente;\n $nuevoSeguimiento->perfil_medico=$request->perfil_medico;\n $nuevoSeguimiento->diagnostico_medico=$request->diagnostico_medico;\n $nuevoSeguimiento->pronostico_medico=$request->pronostico_medico;\n $nuevoSeguimiento->objetivos_medico=$request->objetivos_medico;\n $nuevoSeguimiento->actividades_medico=$request->actividades_medico;\n $nuevoSeguimiento->ind_evaluacion_medico=$request->ind_evaluacion_medico;\n $nuevoSeguimiento->observaciones_medico=$request->observaciones_medico;\n $nuevoSeguimiento->perfil_nutricionista=$request->perfil_nutricionista;\n $nuevoSeguimiento->diagnostico_nutricionista=$request->diagnostico_nutricionista;\n $nuevoSeguimiento->pronostico_nutricionista=$request->pronostico_nutricionista;\n $nuevoSeguimiento->objetivos_nutricionista=$request->objetivos_nutricionista;\n $nuevoSeguimiento->actividades_nutricionista=$request->actividades_nutricionista;\n $nuevoSeguimiento->ind_evaluacion_nutricionista=$request->ind_evaluacion_nutricionista;\n $nuevoSeguimiento->observaciones_nutricionista=$request->observaciones_nutricionista;\n $nuevoSeguimiento->perfil_fisioterapeuta=$request->perfil_fisioterapeuta;\n $nuevoSeguimiento->diagnostico_fisioterapeuta=$request->diagnostico_fisioterapeuta;\n $nuevoSeguimiento->pronostico_fisioterapeuta=$request->pronostico_fisioterapeuta;\n $nuevoSeguimiento->objetivos_fisioterapeuta=$request->objetivos_fisioterapeuta;\n $nuevoSeguimiento->actividades_fisioterapeuta=$request->actividades_fisioterapeuta;\n $nuevoSeguimiento->ind_evaluacion_fisioterapeuta=$request->ind_evaluacion_fisioterapeuta;\n $nuevoSeguimiento->observaciones_fisioterapeuta=$request->observaciones_fisioterapeuta;\n $nuevoSeguimiento->perfil_psicologico=$request->perfil_psicologico;\n $nuevoSeguimiento->diagnostico_psicologico=$request->diagnostico_psicologico;\n $nuevoSeguimiento->pronostico_psicologico=$request->pronostico_psicologico;\n $nuevoSeguimiento->objetivos_psicologico=$request->objetivos_psicologico;\n $nuevoSeguimiento->actividades_psicologico=$request->actividades_psicologico;\n $nuevoSeguimiento->ind_evaluacion_psicologico=$request->ind_evaluacion_psicologico;\n $nuevoSeguimiento->observaciones_psicologico=$request->observaciones_psicologico;\n $nuevoSeguimiento->perfil_gerontologo=$request->perfil_gerontologo;\n $nuevoSeguimiento->objetivos_gerontologo=$request->objetivos_gerontologo;\n $nuevoSeguimiento->actividades_gerontologo=$request->actividades_gerontologo;\n $nuevoSeguimiento->ind_evaluacion_gerontologo=$request->ind_evaluacion_gerontologo;\n $nuevoSeguimiento->observaciones_gerontologo=$request->observaciones_gerontologo;\n $nuevoSeguimiento->perfil_recreacion=$request->perfil_recreacion;\n $nuevoSeguimiento->objetivos_recreacion=$request->objetivos_recreacion;\n $nuevoSeguimiento->actividades_recreacion=$request->actividades_recreacion;\n $nuevoSeguimiento->ind_evaluacion_recreacion=$request->ind_evaluacion_recreacion;\n $nuevoSeguimiento->observaciones_recreacion=$request->observaciones_recreacion;\n $nuevoSeguimiento->perfil_religioso=$request->perfil_religioso;\n $nuevoSeguimiento->objetivos_religioso=$request->objetivos_religioso;\n $nuevoSeguimiento->actividades_religioso=$request->actividades_religioso;\n $nuevoSeguimiento->ind_evaluacion_religioso=$request->ind_evaluacion_religioso;\n $nuevoSeguimiento->observaciones_religioso=$request->observaciones_religioso;\n $nuevoSeguimiento->perfil_enfermera=$request->perfil_enfermera;\n $nuevoSeguimiento->objetivos_enfermera=$request->objetivos_enfermera;\n $nuevoSeguimiento->actividades_enfermera=$request->actividades_enfermera;\n $nuevoSeguimiento->ind_evaluacion_enfermera=$request->ind_evaluacion_enfermera;\n $nuevoSeguimiento->observaciones_enfermera=$request->observaciones_enfermera;\n }", "title": "" }, { "docid": "47202a124297d48771d4e762644ea80c", "score": "0.54983157", "text": "public function store(StorePartCreate $request)\n {\n $partenaire = New Partenaire;\n $partenaire->name = $request->name;\n if($request->image != NULL){\n $partenaire->image = $request->image->store('','imgPartenaire');\n }\n $partenaire->save();\n\n return redirect()->route('partenaires.index');\n }", "title": "" }, { "docid": "de140b8a490d0876a83ad8c7296182f3", "score": "0.54964936", "text": "public function store(CinemaRequest $request)\n {\n Cinema::create($request->all());\n return redirect()->route('cinema.index')->with('ok', __('Le cinema a bien été enregistré'));//\n }", "title": "" }, { "docid": "63212869d3788883caa17587ed5d33b1", "score": "0.5496032", "text": "public function store()\n\t{\n\t\t$this->stocklocation->create(Input::all());\n\t\t//return view('');\n\t}", "title": "" }, { "docid": "62be5efef3ecad29e541e8871fb7d512", "score": "0.5492393", "text": "public function store()\n {\n $input = Request::all();\n\n Client::create($input);\n\n return redirect('clients');\n }", "title": "" }, { "docid": "fbbb1095210aa47b238926ef418f7895", "score": "0.5492094", "text": "public function store(Request $request)\n {\n $machinery_time=$request->input('machinery_time');\n $gas=$request->input('gas');\n $delivery_time = date(\"h:i:s\");\n $trade=DB::table('entregas')->insert([\"Delivery_time\" =>$delivery_time, \"Machine_time\"=>$machinery_time, \"Gas\" =>$gas]);\n\n return View('DispachCenter.document_contract');\n }", "title": "" }, { "docid": "03ce3a076d4441326e3a0ec8cfe147d8", "score": "0.5490453", "text": "public function store(Request $request)\n {\n $solicitud_beca = new SolicitudBeca();\n $solicitud_beca->fill($request->all())->save();\n return response()->json(\n ['message'=>'Solicitud de beca creado satisfactoriamente', 'data'=>$solicitud_beca]);\n }", "title": "" }, { "docid": "7da6b3437cfd5093d4b6eb2f239fe0e7", "score": "0.5488208", "text": "public function store(Request $request)\n {\n /* $request->validate([\n 'nome_sector' => 'required|min:3',\n 'edificio' => 'required'\n ]);*/\n\n $equipamento = new Equipamento();\n $equipamento->codigo_equipamento = $request->codigo_equipamento;\n $equipamento->referencia = $request->referencia;\n $equipamento->estado_conputador = $request->estado_conputador;\n $equipamento->necessario = $request->necessario;\n $equipamento->sector_id = $request->sector_id;\n $equipamento->tipo_id = $request->tipo_id;\n\n\n if ($equipamento->save()) {\n return response()->json($equipamento, 200);\n } else {\n return response()->json([\n 'message' => 'Some error occurred, please try agian',\n 'status_code' => 500\n ], 500);\n }\n }", "title": "" }, { "docid": "84bd063185498af5ad6304a729a66212", "score": "0.54874974", "text": "public function store(SerreRequest $request)\n {\n $alpha = $request->enviroment_alpha;\n $beta = $request->enviroment_beta;\n\n /* switch ($request->get('envirenement')) {\n case 1:\n $alpha = 0.1;\n $beta = 1.3;\n break;\n case 2:\n $alpha = 1.15;\n $beta = 1;\n break;\n case 3:\n $alpha = 0.2;\n $beta = 0.85;\n break;\n case 4:\n $alpha = 0.25;\n $beta = 0.67;\n break;\n case 5:\n $alpha = 0.35;\n $beta = 0.47;\n break;\n default:\n $alpha = null;\n $beta = null;\n break;\n }*/\n // dd($envirenement['alpha']);\n // dd($alpha,$beta);\n $serre = new Serre();\n $serre->name = $request->get('name');\n $serre->zone_id = $request->get('zone_id');\n $serre->nbr = $request->get('nbr');\n $serre->ctz = $request->get('ctz');\n $serre->c = $request->get('c');\n $serre->w = $request->get('w');\n $serre->l = $request->get('l');\n $serre->h = $request->get('h');\n $serre->e = $request->get('e');\n $serre->d = $request->get('d');\n $serre->tc = $request->get('tc');\n $serre->hvouv = $request->get('hvouv');\n $serre->stouv = $request->get('stouv');\n $serre->srf = $request->get('srf');\n $serre->ssd = $request->get('ssd');\n $serre->y = $request->get('y');\n $serre->alpha = $alpha;\n $serre->beta = $beta;\n $serre->type = $request->get('type');\n $serre->save();\n /*Serre::create([\n 'name' => $request->get('name'),\n 'zone_id' => $request->get('zone_id'),\n 'nbr' => $request->get('nbr'),\n 'ctz' => $request->get('ctz'),\n 'c' => $request->get('c'),\n 'w' => $request->get('w'),\n 'l' => $request->get('l'),\n 'h' => $request->get('h'),\n 'e' => $request->get('e'),\n 'd' => $request->get('d'),\n 'tc' => $request->get('tc'),\n 'hvouv' =>$request->get('hvouv'),\n 'stouv' =>$request->get('stouv'),\n 'srf' =>$request->get('srf'),\n 'ssd' =>$request->get('ssd'),\n 'y' =>$request->get('y'),\n 'alpha' =>$alpha,\n 'beta' =>$beta\n ]);*/\n\n return redirect()->route('serre.index');\n }", "title": "" }, { "docid": "34c38a8e904e6c06a8d3ec1638f7bbbc", "score": "0.54869026", "text": "public function store(StoreCliente $request){\n\n $cliente = Cliente::create($request->all());\n\n return redirect()->route('cliente.show', $cliente);\n }", "title": "" }, { "docid": "3e73e75f0810d5c05bb6e07ca805159d", "score": "0.548563", "text": "public function store(CreateArtistaRequest $request)\n {\n Artista::create($request->all());\n return redirect('artistas');\n }", "title": "" }, { "docid": "bb7e6e82bec8695569f1d209223ba31d", "score": "0.54751456", "text": "public function store() {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "dcf2b1f653dd44b74c47264d4ceb3c86", "score": "0.54689413", "text": "public function store(Request $request)\n {\n request()->validate([\n 'beneficiario_id' => 'required',\n ]);\n\n if (request('urobilinogeno') == null) {\n $urobilinogeno = '0.2';\n }\n else {\n $urobilinogeno = request('urobilinogeno');\n }\n\n\n $examenorina= new ExamenOrina([\n 'color' => request('color'),\n 'aspecto' => request('aspecto'),\n 'ph' => request('ph'),\n 'densidad' => request('densidad'),\n 'nitritos' => request('nitritos'),\n 'glucosa' => request('glucosa'),\n 'proteinas' => request('proteinas'),\n 'hemoglobina' => request('hemoglobina'),\n 'cuerposCetonicos' => request('cuerposCetonicos'),\n 'bilirribuna' => request('bilirribuna'),\n 'urobilinogeno' => $urobilinogeno,\n 'leucocitos' => request('leucocitos'),\n 'eritrocitosIntactos' => request('eritrocitosIntactos'),\n 'eritrocitosCrenados' => request('eritrocitosCrenados'),\n 'observacionLeucocitos' => request('observacionLeucocitos'),\n 'cristales' => request('cristales'),\n 'cilindros' => request('cilindros'),\n 'celulasEpiteliales' => request('celulasEpiteliales'),\n 'bacterias' => request('bacterias'),\n 'nota' => request('nota'),\n 'metodo' => request('metodo'),\n 'observaciones' => request('observaciones'),\n 'fecharegistro' => request('fecharegistro'),\n ]);\n\n $id = request('beneficiario_id');\n $beneficiario = Beneficiario::find($id);\n $beneficiario->antecedentes()->save($examenorina);\n\n return redirect('beneficiario/'.$id)->with('nuevo','Examen de orina registrado con éxito');\n }", "title": "" }, { "docid": "4068491f822b923aad1d2c8572974020", "score": "0.54685533", "text": "public function store(CatalogoRequest $request){\n $data = $request->validated();\n \n \n try{\n $tarifa_cargos = floatval(str_replace('$','', $data['tarifa_cargos']));\n\n $catalogo = new Catalogo;\n $catalogo->nombre = $data['nombre']; \n $catalogo->interes = $data['interes'];\n $catalogo->porcentaje = $data['porcentaje'];\n $catalogo->num_plazodevolucion = $data['num_plazoDevolucion'];\n $catalogo->time_plazodevolucion = $data['time_plazoDevolucion'];\n $catalogo->no_cobranza = $data['no_cobranza'];\n $catalogo->tarifa_cargos = $tarifa_cargos;\n $catalogo->creo_id_usuario = auth()->user()->id;\n $catalogo->save();\n return redirect()->route('catalogo.index')->with('success', 'El nuevo concepto de prestamo se ha agregado correctamete');\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "e3e71d463d3aa2abe949c137e87e474e", "score": "0.5466491", "text": "public function store(Request $request)\n {\n VehicleCollateral::create($request->all());\n return redirect('/admin/vehiclecollateral')->with('Success', 'Collateral Created Successfully');\n }", "title": "" }, { "docid": "bb4a9198ce48cbf8b725ee8c6a371cab", "score": "0.5462925", "text": "public function store(Request $request)\n {\n $informacion=['error'=>false, 'resultado' => '','id'=>''];\n\n\n\n try{\n //Aqui se guarda el representante legal\n /*$repLegal=new RepresentanteLegal;\n $repLegal->nombre=strtoupper($request['cliente']['replegal']);\n $repLegal->tipo=\"Cliente\";\n $repLegal->save();\n*/\n\n //Aqui se guarda el cliente\n $cliente=new ComercializacionCliente;\n $cliente->razon_social=strtoupper($request['cliente']['razon_social']);\n //$cliente->domicilio_fiscal=strtoupper($request['cliente']['domicilio_fiscal']);\n $cliente->fecha_alta=$request['cliente']['fecha'];\n $cliente->nombre_comercial=strtoupper($request['cliente']['nombre_comercial']);\n //$cliente->rfc=\"PENDIENTE\";//no necesario que lo capturen\n //$cliente->cargo=strtoupper($request['cliente']['cargo']);\n $cliente->giro=strtoupper($request['cliente']['giro']);\n\n //$cliente->domicilio_notificacion=\"PENDIENTE\";//no necesario que lo capturen\n $cliente->id_delegacion=$request['cliente']['id_delegacion'];\n //$cliente->tipo_contrato=$request['cliente']['tipo_contrato'];\n //$cliente->id_representante_legal=$repLegal->id;//$ultimorep->id;\n $cliente->save();\n\n\n $this->historial('Registro del Cliente id:'. $cliente->id);\n $informacion['resultado']='El registro del cliente '.$cliente->razon_social.' fue exitoso';\n $informacion['id']=$cliente->id;\n }\n catch(\\Exception $e) {\n $informacion['error']=true;\n $informacion['resultado']='Registro de datos incorrecto, reporte añadido a SISTEMAS';\n\n }\n return $informacion;\n\n }", "title": "" }, { "docid": "f0dce62eec35d53d1929414898265222", "score": "0.54625607", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n\n 'name' => 'required|max:255',\n 'lastnames' => 'required|max:255',\n 'CIN' => 'required|unique:solicituds',\n 'email' => 'required|email|max:255',\n 'phone' => 'required|integer|max:255',\n 'city' => 'required|max:255',\n\n ]);\n\n $cataloge = Cataloge::find($request['cat']);\n \n Solicitud::create([\n 'name' => $request['name'],\n 'lastnames' => $request['lastnames'],\n 'CIN' => $request['CIN'],\n 'phone' => $request ['phone'],\n 'city' => $request['city'],\n 'email' => $request['email'],\n 'user_id'=> Auth::id(),\n ])->cataloge()->save($cataloge);\n \n\n\n /* Cataloge_Solicitud::create([\n 'cataloge_id' => $request['cataloge_id'],\n 'solicitud_id' => $request['solicitud_id'],\n ]); */\n\n Session::flash('message','Solicitud creada correctamente');\n return Redirect::to('/solicitud');////\n }", "title": "" }, { "docid": "5204fe0ff805a8b50ac74f9733ca9f08", "score": "0.54596287", "text": "public function store()\n {\n try {\n $userId = Input::get('user_id') ?: getCurrentUserId();\n $supplier = Input::get('supplier');\n $invoice = Input::get('invoice');\n $products = Input::get('products') ?: [];\n $description = Input::get('description');\n\n // Abre um transaction no banco de dados\n \\DB::beginTransaction();\n \\Log::debug('Transaction - begin');\n\n $supplier = $this->importSupplier($supplier);\n\n $entry = (self::MODEL)\n ::create([\n 'description' => $description,\n 'confirmed_at' => null,\n 'user_id' => $userId,\n 'supplier_id' => $supplier ? $supplier->id : null,\n ]);\n\n $invoice = $this->importInvoice($invoice, $entry->id);\n $products = $this->importProducts($products, $entry->id);\n\n // Fecha a transação e comita as alterações\n \\DB::commit();\n \\Log::debug('Transaction - commit');\n\n return $this->createdResponse($entry);\n } catch (\\Exception $exception) {\n \\DB::rollBack();\n \\Log::debug('Transaction - rollback');\n\n \\Log::error(logMessage($exception, 'Erro ao salvar recurso'), ['model' => self::MODEL]);\n\n return $this->clientErrorResponse([\n 'exception' => '[' . $exception->getLine() . ']' . ' ' . $exception->getMessage()\n ]);\n }\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.54595274", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
ca9f6429434e393d6f262a5e33bf67c6
bool player_camera = 6;
[ { "docid": "cb0ae94e8fb8ec318dbeaa23792a1140", "score": "0.6332921", "text": "public function setPlayerCamera($var)\n {\n GPBUtil::checkBool($var);\n $this->player_camera = $var;\n }", "title": "" } ]
[ { "docid": "1d5fee24f5da8713e837dd00ed29e236", "score": "0.6100702", "text": "function cameraInput()\n {\n return isset($this->whiteMap[\"{$this->y},{$this->x}\"]) ? 1 : 0;\n }", "title": "" }, { "docid": "adc72085a4e9a135b3678d0163e50bff", "score": "0.6055702", "text": "public function hasStationaryCamera(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "850d1174b1baa4821e4813d7e41b5047", "score": "0.552724", "text": "public function isPlayable(): bool;", "title": "" }, { "docid": "8cee593fff3e4d38f82da688d388480d", "score": "0.536648", "text": "function setSurvivalModeTrue()\n{\n global $isSurvival;\n if (isset($_POST['page']) && !isset($_POST['survivalMode']) && $_SESSION['survivalMode']) {\n // NEW GAME WITH CAMPAIGN MODE\n $_SESSION[\"survivalMode\"] = false;\n resetPoints();\n }\n if (isset($_POST['page']) && isset($_POST['survivalMode']) && !$_SESSION['survivalMode']) {\n // NEW GAME WITH SURVIVE MODE\n $isSurvival = true;\n $_SESSION[\"survivalMode\"] = true;\n resetPoints();\n }\n if (isset($_POST['survivalMode']) or $_SESSION[\"survivalMode\"]) {\n // FOLLOW WITH THE SAME SURVIVAL MODE\n $isSurvival = true;\n $_SESSION[\"survivalMode\"] = true;\n }\n}", "title": "" }, { "docid": "cec0f61f6e6973fa543a700ec569f2ad", "score": "0.53636265", "text": "public function getPlayerCamera()\n {\n return $this->player_camera;\n }", "title": "" }, { "docid": "a0a51167bb6f23fded25f7fdc2b25d4b", "score": "0.5261664", "text": "function wpvideocoach_checked_six() {\r\n\tglobal $wpvideocoach_visible_036, $wpvideocoach_visible_037, $wpvideocoach_visible_038, $wpvideocoach_visible_039, $wpvideocoach_visible_040;\r\n\tif(!empty($wpvideocoach_visible_036) && !empty($wpvideocoach_visible_037) && !empty($wpvideocoach_visible_038) && !empty($wpvideocoach_visible_039) && !empty($wpvideocoach_visible_040)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "2c08869306bf557dd9d5cdc226bed6fd", "score": "0.52284294", "text": "public function testUpdateDeviceCameraVideoSettings()\n {\n }", "title": "" }, { "docid": "f777b0df7f03af8d3ffbb69640ade054", "score": "0.51885533", "text": "function wpvideocoach_checked_four() {\r\n\tglobal $wpvideocoach_visible_028, $wpvideocoach_visible_029, $wpvideocoach_visible_030, $wpvideocoach_visible_031;\r\n\tif(!empty($wpvideocoach_visible_028) && !empty($wpvideocoach_visible_029) && !empty($wpvideocoach_visible_030) && !empty($wpvideocoach_visible_031)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "ce1902b8dd87bb1062520151793bbf55", "score": "0.5130662", "text": "function wpvideocoach_checked_twelve() {\r\n\tglobal $wpvideocoach_visible_141, $wpvideocoach_visible_142;\r\n\tif(!empty($wpvideocoach_visible_141) && !empty($wpvideocoach_visible_142)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "ad57ea3ed75107c7431eb59a496cf122", "score": "0.5085652", "text": "public function setImageMatte(bool $matte): bool {}", "title": "" }, { "docid": "3b4ab27511b51b1ef1251efe490a06ab", "score": "0.50723946", "text": "public function setImageScene(int $scene): bool {}", "title": "" }, { "docid": "16d03bc3399735f12572a29a562b7882", "score": "0.5061079", "text": "function wpvideocoach_checked_eight() {\r\n\tglobal $wpvideocoach_visible_046, $wpvideocoach_visible_047, $wpvideocoach_visible_048, $wpvideocoach_visible_049, $wpvideocoach_visible_050;\r\n\tif(!empty($wpvideocoach_visible_046) && !empty($wpvideocoach_visible_047) && !empty($wpvideocoach_visible_048) && !empty($wpvideocoach_visible_049) && !empty($wpvideocoach_visible_050)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "8fbb9d30ee850c4e19ea08fc873e1bef", "score": "0.506105", "text": "function wpvideocoach_checked_three() {\r\n\tglobal $wpvideocoach_visible_024, $wpvideocoach_visible_025, $wpvideocoach_visible_026, $wpvideocoach_visible_027;\r\n\tif(!empty($wpvideocoach_visible_024) && !empty($wpvideocoach_visible_025) && !empty($wpvideocoach_visible_026) && !empty($wpvideocoach_visible_027)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "47078f3993b43efa16eebf7a89eb9b16", "score": "0.5038036", "text": "function CAPTURE_toggle()\n{\n\tCAPTURE_deActivate(!CAPTURE_isActive());\n}", "title": "" }, { "docid": "b2f9689bf424fb9fc7c34f28c95b562e", "score": "0.50333124", "text": "function wpvideocoach_checked_one() {\r\n\tglobal $wpvideocoach_visible_001, $wpvideocoach_visible_002, $wpvideocoach_visible_003;\r\n\tif(!empty($wpvideocoach_visible_001) && !empty($wpvideocoach_visible_002) && !empty($wpvideocoach_visible_003)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "073a2c3a3ad6da0840cf6f4e04f48f3d", "score": "0.5031164", "text": "function wpvideocoach_checked_thirteen() {\r\n\tglobal $wpvideocoach_visible_151, $wpvideocoach_visible_152, $wpvideocoach_visible_153;\r\n\tif(!empty($wpvideocoach_visible_151) && !empty($wpvideocoach_visible_152) && !empty($wpvideocoach_visible_153)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "924cb46b8b759f2d38097b8e593ce5e6", "score": "0.4954004", "text": "function wpvideocoach_checked_five() {\r\n\tglobal $wpvideocoach_visible_032, $wpvideocoach_visible_033, $wpvideocoach_visible_034, $wpvideocoach_visible_035;\r\n\tif(!empty($wpvideocoach_visible_032) && !empty($wpvideocoach_visible_033) && !empty($wpvideocoach_visible_034) && !empty($wpvideocoach_visible_035)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "912888cfbcaee11b8a2211217baabe4e", "score": "0.49328542", "text": "function wpvideocoach_checked_ten() {\r\n\tglobal $wpvideocoach_visible_121, $wpvideocoach_visible_122, $wpvideocoach_visible_123, $wpvideocoach_visible_124, $wpvideocoach_visible_125, $wpvideocoach_visible_126;\r\n\tif(!empty($wpvideocoach_visible_121) && !empty($wpvideocoach_visible_122) && !empty($wpvideocoach_visible_123) && !empty($wpvideocoach_visible_124) && !empty($wpvideocoach_visible_125) && !empty($wpvideocoach_visible_126)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "8717a27aa02f3d1912d93e693c708618", "score": "0.4923841", "text": "function wpvideocoach_checked_seven() {\r\n\tglobal $wpvideocoach_visible_041, $wpvideocoach_visible_042, $wpvideocoach_visible_043, $wpvideocoach_visible_044, $wpvideocoach_visible_045;\r\n\tif(!empty($wpvideocoach_visible_041) && !empty($wpvideocoach_visible_042) && !empty($wpvideocoach_visible_043) && !empty($wpvideocoach_visible_044) && !empty($wpvideocoach_visible_045)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "5ca0e9719bfa5efc1f30d75e7a2f9ab2", "score": "0.49162614", "text": "public function setPublic(bool $bool);", "title": "" }, { "docid": "5f60b453bdea0b5129cbf41fe3c6c426", "score": "0.49046075", "text": "public abstract function isPlaying();", "title": "" }, { "docid": "0283201acca5b1e056b39f418c3fd2b8", "score": "0.4900024", "text": "public function main()\n {\n // Set now playing overlay time to current time\n $this->nowPlayingOverlayShownTime = time();\n\n // Create our master loop\n while(true) {\n\n // Keep track of whether we have done a switch\n $switched = false;\n\n // Set a random time for the next switch to occur\n $switchDelayTime = rand($this->switchTimeMin,$this->switchTimeMax);\n\n // Get the state of the cameras\n $videoInput = $this->getVideoState();\n\n // Grab our volume state\n $audioInput = $this->getVolumeState();\n\n // Get the state of our overlays\n $titleInput = $this->getTitleState();\n\n $onAirOverlays = $this->getOnAirOverlays();\n\n // Remove ignored inputs\n foreach($this->ignoreInputs as $inputIgnore) {\n unset($audioInput[$inputIgnore]);\n }\n\n // Check if nexgen is above the threshold and if it is, cut to the wide shot.\n foreach($this->playoutInputNames as $inValue) {\n if($audioInput[$inValue]['volume'] > $this->playoutThreshold) {\n $switched = true;\n echo \" Switching to wide \\r \\n\";\n $this->switchApiInput('cut', $videoInput[$this->wideCamera]['key']);\n\n // Run now playing function to determine if we should show 'Now Playing Title'\n $this->nowPlaying($titleInput, $onAirOverlays);\n }\n }\n\n // Nexgen isn't playing, so now find the microphone that is exceeding our threshold and cut to it\n if($switched == false) {\n $loudest = array_reduce($audioInput, function($a, $b) {\n return $a['volume'] > $b['volume'] ? $a : $b;\n });\n\n if($this->micCameraMap[$loudest['name']] != NULL) {\n echo \" Switching to \".$loudest['name'].\"\\r \\n\";\n $this->switchApiInput('cut', $videoInput[$this->micCameraMap[$loudest['name']]]['key']);\n\n // Show the now playing title if it is still shown\n $this->nowPlaying($titleInput, $onAirOverlays, true);\n }\n }\n\n // Sleep for duration of the switch\n sleep($switchDelayTime);\n\n // If we are in the browser we only execute one loop, to avoid an endless loop\n if (!php_sapi_name() == \"cli\") {\n break;\n }\n }\n }", "title": "" }, { "docid": "01adfc05ab9c1217c55ef90b0db7d215", "score": "0.4899832", "text": "public function testUpdateDeviceCameraSense()\n {\n }", "title": "" }, { "docid": "2013fa0421f2a2771fa302711ba5881f", "score": "0.48899117", "text": "function BotOpped()\n{\n if (isset($GLOBALS['BOT_OPPED'])) {\n return true;\n } else { \n return false;\n }\n}", "title": "" }, { "docid": "6cef344e3bb0cabf9fd32bfdcb6a73c4", "score": "0.48880386", "text": "public function isGrabable(){ // $grabar\n return $this->save;\n }", "title": "" }, { "docid": "89ba07f58db2f5a6bb495e2729498541", "score": "0.48850176", "text": "public function set_init($bool);", "title": "" }, { "docid": "4ea7e70ae6a59bdfd6b0cab60e23563b", "score": "0.48813272", "text": "function wpvideocoach_checked_eleven() {\r\n\tglobal $wpvideocoach_visible_131, $wpvideocoach_visible_132, $wpvideocoach_visible_133, $wpvideocoach_visible_134;\r\n\tif(!empty($wpvideocoach_visible_131) && !empty($wpvideocoach_visible_132) && !empty($wpvideocoach_visible_133) && !empty($wpvideocoach_visible_134)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "c7d8fc17c3e468c6a4cb13c08f02be3c", "score": "0.4877666", "text": "public function setEsGrabable($val){ // $grabar\n $this->save = (bool)$val;\n }", "title": "" }, { "docid": "6342d48e58b3e16ae7aed016fdfb6ae3", "score": "0.48596755", "text": "public function setCameraBlocked(?bool $value): void {\n $this->getBackingStore()->set('cameraBlocked', $value);\n }", "title": "" }, { "docid": "6342d48e58b3e16ae7aed016fdfb6ae3", "score": "0.48596755", "text": "public function setCameraBlocked(?bool $value): void {\n $this->getBackingStore()->set('cameraBlocked', $value);\n }", "title": "" }, { "docid": "5546ffa1ba2615efc1dd5823c1c15357", "score": "0.485461", "text": "public function isPlayed() { return false; }", "title": "" }, { "docid": "87215e43602ccbc717d7761cd9390c4a", "score": "0.48528007", "text": "public static function setUserMode($flag){\n\t\tif($flag === true){\n\t\t\tself::$user_mode = true;\n\t\t}else{\n\t\t\tself::$user_mode = false;\n\t\t}\n\t}", "title": "" }, { "docid": "a41b66a15edc904eb43c4b8b9a1addc2", "score": "0.4816592", "text": "public function inLimbo(): bool;", "title": "" }, { "docid": "1183f386785edcff3af7ff40623ce7ca", "score": "0.4793966", "text": "public static function getBoolean()\n {\n return (boolean)(\\rand() & 1);\n }", "title": "" }, { "docid": "fda50afb6b16bf0cd61e9113b0398ff4", "score": "0.478334", "text": "abstract protected function gameShouldContinue(): bool;", "title": "" }, { "docid": "bece6d0dc65869dd775539246f5ef5e7", "score": "0.4781173", "text": "public static function debug($bool=true){\n\t\n\t\tself::$debug = (bool) $bool;\n\t}", "title": "" }, { "docid": "0b77507e025421975d5daae191fd7461", "score": "0.4778276", "text": "public function getImageMatte(): bool {}", "title": "" }, { "docid": "8f897e360beba457707399007772d576", "score": "0.4772368", "text": "public function restrict_webcam_sharing($value)\n {\n $old_value = 'presenterShareOnly=\"false\"';\n $new_value = 'presenterShareOnly=\"true\"';\n\n switch ($value) {\n case true:\n $this->changeValue($old_value, $new_value, $this->files['client']['config']);\n break;\n case false:\n $this->changeValue($new_value, $old_value, $this->files['client']['config']);\n break;\n }\n }", "title": "" }, { "docid": "dad1427eae3f092bdb9f41e4c7af7914", "score": "0.47711524", "text": "public function testGetDeviceCameraVideoSettings()\n {\n }", "title": "" }, { "docid": "f4096b97d19387223412cb87c3509ba9", "score": "0.47531518", "text": "function wpvideocoach_checked_nine() {\r\n\tglobal $wpvideocoach_visible_101, $wpvideocoach_visible_102, $wpvideocoach_visible_103, $wpvideocoach_visible_104, $wpvideocoach_visible_105, $wpvideocoach_visible_106, $wpvideocoach_visible_107, $wpvideocoach_visible_108, $wpvideocoach_visible_109;\r\n\tif(!empty($wpvideocoach_visible_101) && !empty($wpvideocoach_visible_102) && !empty($wpvideocoach_visible_103) && !empty($wpvideocoach_visible_104) && !empty($wpvideocoach_visible_105) && !empty($wpvideocoach_visible_106) && !empty($wpvideocoach_visible_107) && !empty($wpvideocoach_visible_108) && !empty($wpvideocoach_visible_109)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "4f8fcd732ad3dbdd20fead758c5e64ba", "score": "0.47331393", "text": "function air_horn_sound_setflag($user_login, $user)\n{\n\tupdate_user_meta($user->ID, 'air_horn_playsound', 1);\n}", "title": "" }, { "docid": "6d01061579a8e0f991e1d3eacc55f4d6", "score": "0.47187388", "text": "function gameComplete(){\n return isset($_SESSION[\"gamecomplete\"]) ? $_SESSION[\"gamecomplete\"] :false;\n}", "title": "" }, { "docid": "8f37f2792a0ec080a78241930b123c75", "score": "0.4688589", "text": "public function player_loaded() { \n\n\t\tif (is_object($this->_player)) { \n\t\t\treturn true; \n\t\t} \n\t\telse { \n\t\t\treturn false; \n\t\t} \n\n\t}", "title": "" }, { "docid": "1d1cd3aa49a87900470b5072994cf805", "score": "0.46694636", "text": "final static function boolean() {}", "title": "" }, { "docid": "5688b2c2cab3f7ef30c9ee755f6b26ad", "score": "0.46661937", "text": "public static function setGuestMode($flag){\n\t\tif($flag === true){\n\t\t\tself::$guest_mode = true;\n\t\t}else{\n\t\t\tself::$guest_mode = false;\n\t\t}\n\t}", "title": "" }, { "docid": "3925099313f1dc798f4988cd49ede8da", "score": "0.46618417", "text": "public function setBoolean(string $name, bool $value): bool\n {\n $this->_globalVariables['db 0x43'][$name] = (int)$value;\n return (bool)$this->_globalVariables['db 0x43'][$name];\n }", "title": "" }, { "docid": "2769fb6633b44b776b1b10344b23b9f6", "score": "0.46600857", "text": "public function isMelee(): bool;", "title": "" }, { "docid": "c965901ab9806f7a23c3ae0190325cde", "score": "0.46565008", "text": "public function isPreviewMode(): bool\n\t{\n\t\treturn $this->isPreviewMode;\n\t}", "title": "" }, { "docid": "79843ef08ef437896af8ecf4d36f27cd", "score": "0.46556088", "text": "function wpvideocoach_checked_two() {\r\n\tglobal $wpvideocoach_visible_004, $wpvideocoach_visible_005, $wpvideocoach_visible_006, $wpvideocoach_visible_007, $wpvideocoach_visible_008, $wpvideocoach_visible_009, $wpvideocoach_visible_010, $wpvideocoach_visible_011, $wpvideocoach_visible_012, $wpvideocoach_visible_013, $wpvideocoach_visible_014, $wpvideocoach_visible_015, $wpvideocoach_visible_016, $wpvideocoach_visible_017, $wpvideocoach_visible_018, $wpvideocoach_visible_019, $wpvideocoach_visible_020, $wpvideocoach_visible_021, $wpvideocoach_visible_022, $wpvideocoach_visible_023;\r\n\tif(!empty($wpvideocoach_visible_004) && !empty($wpvideocoach_visible_005) && !empty($wpvideocoach_visible_006) && !empty($wpvideocoach_visible_007) && !empty($wpvideocoach_visible_008) && !empty($wpvideocoach_visible_009) && !empty($wpvideocoach_visible_010) && !empty($wpvideocoach_visible_011) && !empty($wpvideocoach_visible_012) && !empty($wpvideocoach_visible_013) && !empty($wpvideocoach_visible_014) && !empty($wpvideocoach_visible_015) && !empty($wpvideocoach_visible_016) && !empty($wpvideocoach_visible_017) && !empty($wpvideocoach_visible_018) && !empty($wpvideocoach_visible_019) && !empty($wpvideocoach_visible_020) && !empty($wpvideocoach_visible_021) && !empty($wpvideocoach_visible_022) && !empty($wpvideocoach_visible_023)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}", "title": "" }, { "docid": "003a6d98291d267c10e5e899b6f1ba1b", "score": "0.46495613", "text": "function prepare_bool( $p_bool ) {\n\t\treturn (int)(bool)$p_bool;\n\t}", "title": "" }, { "docid": "ee05c752018bea05c0d7966f563ea98b", "score": "0.46485397", "text": "public function isSingleRegistration()\n {\n return 1 == $this->players;\n }", "title": "" }, { "docid": "8827c43e42c36e78b98b716f7eff8f08", "score": "0.46419957", "text": "public function playersAreAlive(){\n if($this->hero->getHealth() > 0 && $this->beast->getHealth() > 0){\n return true;\n } else{\n return false;\n }\n }", "title": "" }, { "docid": "94afa2965f97fb99498d70b2e79bf024", "score": "0.46402207", "text": "public function hasEye(){\n return $this->_has(8);\n }", "title": "" }, { "docid": "60545405e1b6b16ce2f6d05273eea807", "score": "0.46230078", "text": "function getIsPreset()\n {\n return (bool) $this->_bIsPreset;\n }", "title": "" }, { "docid": "60545405e1b6b16ce2f6d05273eea807", "score": "0.46230078", "text": "function getIsPreset()\n {\n return (bool) $this->_bIsPreset;\n }", "title": "" }, { "docid": "a9cb1e24f939ffb6e44bc17431212644", "score": "0.46198142", "text": "function isPreview() {\n\t\treturn ($this->conf[$this->cmdKey.'.']['preview'] && $this->feUserData['preview']);\n\t}", "title": "" }, { "docid": "59659fe37a21c707e03a0e3dddcef9e7", "score": "0.4617984", "text": "function setImposterModeTrue()\n{\n global $isImposter;\n if (isset($_POST['page']) && !isset($_POST['imposterMode']) && $_SESSION['imposterMode']) {\n // NEW GAME WITHOUT IMPOSTOR\n $_SESSION[\"imposterMode\"] = false;\n resetPoints();\n }\n if (isset($_POST['page']) && isset($_POST['imposterMode']) && !$_SESSION['imposterMode']) {\n // NEW GAME WITH IMPOSTOR\n $isImposter = true;\n $_SESSION[\"imposterMode\"] = true;\n resetPoints();\n }\n if (isset($_POST['imposterMode']) or $_SESSION[\"imposterMode\"]) {\n // FOLLOW WITH THE SAME IMPOSTER MODE\n $isImposter = true;\n $_SESSION[\"imposterMode\"] = true;\n }\n}", "title": "" }, { "docid": "17ec52a0bf8594106b2293f806cf16b5", "score": "0.46147388", "text": "public function hasGamePort()\n {\n return $this->game_port !== null;\n }", "title": "" }, { "docid": "0eba5b4db67a6eb3304b5c6233982765", "score": "0.4590185", "text": "public function getLightsStatus(): bool\n {\n return $this->lights;\n }", "title": "" }, { "docid": "85330b126e18ea3b8a6a0c2fd077a5b6", "score": "0.45834893", "text": "function CAPTURE_isActive()\n{\n\treturn(file_exists(\"/m23/tmp/captureSave\"));\n}", "title": "" }, { "docid": "9658486d16a7bd6c184618892b64fa13", "score": "0.45786512", "text": "public function debug($bool){\n $this->debug = (bool) $bool;\n }", "title": "" }, { "docid": "ca96b827c748b40a24fa1f54cbfdbc93", "score": "0.45737106", "text": "public static function setSensor($sensor)\n {\n if (!is_bool($sensor))\n {\n// throw new Exception('The parameter must be boolean.');\n } // if\n\n self::$sensor = $sensor;\n }", "title": "" }, { "docid": "67bfbb758ed0f66573977fb33d93c0bf", "score": "0.4569562", "text": "function cb_motion_detected()\n{\n echo \"Motion Detected\\n\";\n}", "title": "" }, { "docid": "e8c9641624c42213d05523acc0e75569", "score": "0.4569271", "text": "public static function setDevelopment($flag)\r\n\t{\r\n\t self::$_isDev = (bool) $flag;\r\n\t}", "title": "" }, { "docid": "5e3993de45f14db9c1dab510c20b8e06", "score": "0.45606783", "text": "public function testUpdateOrganizationCameraOnboardingStatuses()\n {\n }", "title": "" }, { "docid": "44180dc69cf772006779dc5fd133fc5a", "score": "0.45497355", "text": "function update_turns_by_player_moves($game){\n // if in match not throwed cube then not change turns\n if($game['throwed_cube'] == 0){\n return false;\n }\n $points = $game['last_throw_points'];\n $game_id = $game['id'];\n $player = get_game_active_player($game_id);\n // if none player in game has status 4, so active not throw cube pass\n // change turns\n if ($player == null){\n return false;\n }\n // check if player have move\n $player_manager = new PlayerManager($player['id']);\n if ($player_manager->check_if_player_have_moves($points)){\n echo \"player have moves <br>\";\n } else {\n // if player have not any move\n $turnManager = new TurnManager($game_id);\n $turnManager->change_turn();\n }\n}", "title": "" }, { "docid": "5103f7453b8466510b0c16fa3980a614", "score": "0.45485303", "text": "public function turnOn()\n {\n echo 'light is already on->take no action <br>';\n }", "title": "" }, { "docid": "bc3e88844f2f758244be8284f69b02df", "score": "0.4542378", "text": "function checkWinner()\n {\n // $player = $_SESSION[\"currentplayer\"];\n $computer = $_SESSION[\"computerturn\"];\n\n if ($computer === false) {\n if ($_SESSION[\"gameroundSum\"] >= 100) {\n $_SESSION[\"haveWinner\"] = \"Spelare 1\";\n } else {\n changePlayer();\n }\n } elseif ($computer === true) {\n if ($_SESSION[\"computersum\"] >= 100) {\n $_SESSION[\"haveWinner\"] = \"datorn\";\n } else {\n changePlayer();\n }\n }\n }", "title": "" }, { "docid": "4fe4ac1f7f74b802023d07cde42dd4cd", "score": "0.45354906", "text": "function one_zero( $new_value ) {\n\t\treturn (int) (bool) $new_value;\n\t}", "title": "" }, { "docid": "94858476a3437fcfca7e0b677e17006d", "score": "0.45336163", "text": "function octopus_get_visible_flag($user, $cmid) {\n global $DB;\n\n return $DB->get_record_sql('SELECT p.private, u.firstname FROM mdl_octopus_private_profile p, mdl_user u\n WHERE p.user_id = ' . $user . ' AND p.cmid = ' . $cmid . ' AND u.id = ' . $user . ' ');\n}", "title": "" }, { "docid": "a54514f5a21b882795a8ce92ae51457a", "score": "0.4531986", "text": "function setNvpRequest($flag)\n {\n $this->nvpRequest = (bool)$flag;\n }", "title": "" }, { "docid": "92616f145fc5a9d6e3b9a43359a089de", "score": "0.45307848", "text": "function Camion()\n {\n //se llama igual que la clase,\n //le da un estado inicial a la clase\n $this->ruedas = 8; //nuestro coche en estadio inicial tiene 4 ruedas\n $this->color = \"gris\"; //El color esta sin definir\n $this->motor = 2600; //Con esto le dimos estado inicial a nuestro objeto coche\n }", "title": "" }, { "docid": "b6f2903bb381afb149f0d60b63307c99", "score": "0.4528312", "text": "public function isSettingDefaultImage() :bool\n\t{\n\t\treturn (bool) static::$is_saving_default_image;\n\t}", "title": "" }, { "docid": "e1335bfc2cbf98b71121cc9554ce54aa", "score": "0.4527293", "text": "public function flag(): ?bool;", "title": "" }, { "docid": "a78d1671e9782c7289a8aae6471e8735", "score": "0.45262432", "text": "function check_session_variable($main_object) {\n\t\t\tif(isset($_SESSION[\"account\"])) {\n\t\t\t\tif($_SESSION[\"account\"] == \"Manager\") {\n\t\t\t\t\tif(isset($_SESSION[\"research_group\"])){\n\t\t\t\t\t\t$main_object->research_group = $_SESSION[\"research_group\"];\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse return false;\n }", "title": "" }, { "docid": "9860577c02e07ffb5baf635a3a29d69d", "score": "0.45195323", "text": "public function setDevMode($flag)\n {\n $this->devMode = (bool)$flag;\n }", "title": "" }, { "docid": "8f525f279cf96c67b6ab845de083c3eb", "score": "0.4518466", "text": "public function activateCards($player){\n if(!empty($player->getPlateau())){\n foreach ($player->getPlateau()as $carte){\n if($carte->getActive() == 0){\n $carte->setActive(1);\n }\n }\n }\n }", "title": "" }, { "docid": "39d3ebc022102042c7bf12963e1877e3", "score": "0.45174855", "text": "function uv_is_active(UV $handle)\n{\n}", "title": "" }, { "docid": "a6782eafb39e4b5f3a31e57937d14481", "score": "0.4513184", "text": "function get_im() {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "440196c9686eb1987aab37cbc8500c33", "score": "0.45126188", "text": "function pak_player($in)\r\n\t{\r\n\t\tglobal $pak_player;\r\n\t\t$pak_player = true;\r\n\t\t\r\n\t\t$vdetails = $in['vdetails'];\r\n\t\t$vid_file = get_video_file($vdetails,true,true);\r\n\t\t//Checking for YT Referal\r\n\t\t$ref = $vdetails['refer_url'];\r\n\t\t//Checking for youtube\r\n\t\tif(function_exists('is_ref_youtube'))\r\n\t\t\t$ytcom = is_ref_youtube($ref);\r\n\t\tif($ytcom)\r\n\t\t\t$is_youtube = true;\r\n\t\telse\r\n\t\t\t$is_youtube = false;\r\n\t\r\n\t\tif($vid_file || $is_youtube)\r\n\t\t{\r\n\t\t\t$hd = $data['hq'];\r\n\t\t\t\r\n\t\t\tif($hd=='yes') $file = get_hq_video_file($vdetails); else $file = get_video_file($vdetails,true,true);\r\n\t\t\t$hd_file = get_hq_video_file($vdetails);\r\n\t\t\t\r\n\t\t\tif($is_youtube)\r\n\t\t\t{\r\n\t\t\t\tpreg_match(\"/\\?v\\=(.*)/\",$ref,$srcs);\r\n\r\n\t\t\t\t$srcs = explode(\"&\",$srcs[1]);\r\n\t\t\t\t$srcs = $srcs[0];\r\n\t\t\t\t$srcs = explode(\"?\",$srcs);\r\n\t\t\t\t$ytcode = $srcs[0];\r\n\t\t\t\tassign('youtube',true);\r\n\t\t\t\tassign('ytcode',$ytcode);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!strstr($in['width'],\"\\%\"))\r\n\t\t\t\t$in['width'] = $in['width'].'px';\r\n\t\t\tif(!strstr($in['height'],\"\\%\"))\r\n\t\t\t\t$in['height'] = $in['height'].'px';\r\n\t\t\t\r\n\t\t\tif($in['autoplay'] =='yes' || $in['autoplay']===true)\r\n\t\t\t\t$in['autoplay'] = \"true\";\r\n\t\t\telse\r\n\t\t\t\t$in['autoplay'] = \"false\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Logo Placement\r\n\t\t\t$placement = config('logo_placement');\r\n\t\t\tswitch($placement)\r\n\t\t\t{\r\n\t\t\t\tcase \"tl\":\r\n\t\t\t\tassign('logo_top','5');\r\n\t\t\t\tassign('logo_left','5');\r\n\t\t\t\tassign('logo_position','top:5,left:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"tr\":\r\n\t\t\t\tassign('logo_top','5');\r\n\t\t\t\tassign('logo_right','5');\r\n\t\t\t\tassign('logo_position','top:5,right:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"br\":\r\n\t\t\t\tassign('logo_bottom','5');\r\n\t\t\t\tassign('logo_right','5');\r\n\t\t\t\tassign('logo_position','bottom:5,right:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"bl\":\r\n\t\t\t\tassign('logo_bottom','5');\r\n\t\t\t\tassign('logo_left','5');\r\n\t\t\t\tassign('logo_position','bottom:5,left:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tassign('player_data',$in);\r\n\t\t\tassign('player_logo',website_logo());\r\n\t\t\tassign('normal_vid_file',$vid_file);\r\n\t\t\tassign(\"hq_vid_file\",$hd_file);\t\t\t\r\n\t\t\tassign('vdata',$vdetails);\r\n\t\t\tTemplate(PAK_PLAYER_DIR.'/player.html',false);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ff45b48aeef28a1807a9f79e90163ce5", "score": "0.4511899", "text": "public function testGetDeviceCameraSense()\n {\n }", "title": "" }, { "docid": "15eceed5f2a5d9abcaaf497fdd306b1a", "score": "0.45060098", "text": "function isVisible($row,$mode) {\n if (($mode == \"dm\") && ($row['dmVisible'] == 1)) {return True;}\n elseif ($row['visible'] == 1) {return True;}\n else {return False;}\n}", "title": "" }, { "docid": "f6c1250cff208b3db59e6a1e307892f4", "score": "0.44935986", "text": "function use_ki($game_id) {\n\tglobal $db;\n\t$ki = false;\n\t$sql = 'SELECT player1 FROM addle WHERE id = '.$game_id;\n\t$result = $db->query($sql, __FILE__, __LINE__, __FUNCTION__);\n\t$rs = $db->fetch($result);\n\tif($rs['player1'] == BARBARA_HARRIS) {\n\t\t$ki = true;\n\t}\n}", "title": "" }, { "docid": "23f12c0092824c884066cbb5fee2607a", "score": "0.44875294", "text": "function gallery_enable_player_for_activity(){\r\n?>\r\n<script type=\"text/javascript\">\r\njQuery(document).ready(function(){\r\njQuery('video','audio').mediaelementplayer();\r\n\r\n \r\n\r\n});\r\n </script>\r\n<?php\r\n}", "title": "" }, { "docid": "d082d568bcd2f34946f72e797ae91239", "score": "0.44871396", "text": "function active()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "802d0af7838688b8b01f3da8f71919bf", "score": "0.44851205", "text": "public function hasGameFlags()\n {\n return $this->game_flags !== null;\n }", "title": "" }, { "docid": "ee37ca07cae8e3527ee8424c9f43d06d", "score": "0.4483417", "text": "function setForceAudioPreview($a_val)\n\t{\n\t\t$this->force_audio_preview = $a_val;\n\t}", "title": "" }, { "docid": "61a31977fb73680e608fbbef7f466987", "score": "0.44817832", "text": "public function nativeBoolean()\n {\n $this->use_native_boolean = true;\n }", "title": "" }, { "docid": "1cad7a8296b28c2260f4f4005eaf0923", "score": "0.4481151", "text": "public function isPublic($flag){\n return $this->setVar('public', $flag);\n }", "title": "" }, { "docid": "a963b01b6025dd88b337e5a28c6ac0f3", "score": "0.44801444", "text": "public function isShootingWeapon(): bool;", "title": "" }, { "docid": "f0a075699ede7170f086a6c48a1c7a3c", "score": "0.44794244", "text": "function markGameAsNew(){\n $_SESSION[\"gamecomplete\"] = false;\n}", "title": "" }, { "docid": "4382a94502ef792ee1b9f491d083c4b0", "score": "0.4479254", "text": "function hasHonors(){\n if($this->gpa >= 3.5){\n return \"true\";\n }\n else{ \n return \"false\"; \n }\n }", "title": "" }, { "docid": "bb1053e129d745bc1c86f16421a0ea6a", "score": "0.44783607", "text": "static public function connected(){return (self::$_connected==true);}", "title": "" }, { "docid": "4b2fdf4d273b08b0afaea94e6148a299", "score": "0.44698387", "text": "public function setGamingBlockMultiplayer(?bool $value): void {\n $this->getBackingStore()->set('gamingBlockMultiplayer', $value);\n }", "title": "" }, { "docid": "0c30b15176239c88cd94572c92a26cf4", "score": "0.44659618", "text": "function checkLogin(){\n if ($this->userid <= 0){\n return 0;\n }else{\n return 1;\n }\n}", "title": "" }, { "docid": "4fb9714cf66661bb8444f882da877444", "score": "0.44643655", "text": "function Camion() {\n //Con la flecha se refencia o una propiedad o un metodo de la clase\n $this->ruedas=4;\n $this->color='';\n $this->motor=1600;\n\n }", "title": "" }, { "docid": "123e4e623f572fa3f3e91bc49ecd6e6e", "score": "0.44625556", "text": "public function getFilmGeoblockingEnabled()\n\t{\n\t\treturn $this->film_geoblocking_enabled;\n\t}", "title": "" }, { "docid": "bf3933f6a7ab406dbcf1013cf6fb31a9", "score": "0.44596493", "text": "protected function randomBoolean(){\n\n $values = [false , true];\n\n return $values[array_rand($values)];\n }", "title": "" }, { "docid": "3846d50d926106cb2003c9444a94c3cf", "score": "0.44595778", "text": "function is_preview_mode() {\n\treturn array_key_exists( 'preview', $_GET ) && 'true' == $_GET['preview']; // WPCS: loose comparison ok, CSRF.\n}", "title": "" }, { "docid": "35c6605089084eb7c8e698a0babe9269", "score": "0.44593683", "text": "public function set_loggable(bool $flag);", "title": "" } ]
78a0569df5a22d38dc8d5af391417789
/ check items function v1.0 function to check item in database [function accept parameters] $select = the item to select [example : user , item , category] $from = the table to select from [example : users , items , categories ] $value = the value of select [example : osama , box , electronics]
[ { "docid": "31824d556f79bd1d41ad175b80fc94b6", "score": "0.74108577", "text": "function checkItem ($select , $from , $value) {\n\t\n\tglobal $con; \n\t\n\t$statement = $con->prepare(\"select $select from $from where $select = ? \"); \n\t\n\t$statement->execute(array($value)); \n\t\n\t$count = $statement->rowCount(); \n\t\n\treturn $count; \n}", "title": "" } ]
[ { "docid": "fdc8da9ba3e0295c135bab9617fd8666", "score": "0.76120293", "text": "function checkItem($select, $from, $value) {\n\t\t\n\t\tglobal $con;\n\n\t\t$statement = $con->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n\n\t\t$statement->execute(array($value));\n\n\t\t$count = $statement->rowCount();\n\n\t\treturn $count;\n\n\t}", "title": "" }, { "docid": "9bb841e1141e179d6750c85d6ed6513d", "score": "0.7502494", "text": "function checkItem($select, $fromTable, $valueItemCheck)\n{\n global $conn;\n $sqlStat = \"SELECT $select FROM $fromTable WHERE $select = ? \";\n $satment = $conn->prepare($sqlStat);\n $satment->execute(array($valueItemCheck));\n $resf = $satment->rowCount();\n if ($resf > 0) {\n return $resf;\n } else {\n return 0;\n }\n\n}", "title": "" }, { "docid": "f1c7084d0a2501a81bc8f6012dd54535", "score": "0.7484502", "text": "function checkItems($select, $from, $value) {\n global $con;\n $statement = $con->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n $statement->execute(array(\n $value\n ));\n $count = $statement->rowCount();\n return $count;\n}", "title": "" }, { "docid": "982503397cb64477e772a85f811a82c1", "score": "0.74468964", "text": "function checkItem($select, $from, $value) {\n\t\tglobal $db;\n\n\t\t$statment = $db->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n\n\t\t$statment->execute(array($value));\n\n\t\t$counter = $statment->rowCount();\n\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "0ba2506d19acf7252898886f8f63b801", "score": "0.73915315", "text": "function checkItem($select, $table, $value){\n\n // Make the MySQL query dynamic using $select, $table, $value [Being called from members page]\n global $connection ;\n\n $statement = $connection->prepare(\"SELECT $select FROM $table WHERE $select= ? \");\n $statement -> execute(array($value));\n $count = $statement->rowCount(); \n\n return $count;\n\n }", "title": "" }, { "docid": "8dc349ae385d155ef41a1ed6d503f80f", "score": "0.7296195", "text": "function checkItem($select, $from, $value){\r\n\r\n\r\nglobal $con;\r\n\r\n$statement = $con->prepare(\"SELECT $select FROM $from WHERE $select=?\");\r\n\r\n$statement->execute(array($value));\r\n$count = $statement->rowCount();\r\n\r\nreturn $count;\r\n\r\n\r\n}", "title": "" }, { "docid": "08fd93799563e9f33314ff41c7602805", "score": "0.72418994", "text": "function checkItem($select, $from, $value, $exceptKey = \"\", $exceptValue = \"\") {\n global $con;\n $sql = \"SELECT $select FROM $from WHERE $select = ?\";\n $values[] = $value;\n if (!empty($exceptKey) && !empty($exceptValue)) {\n $sql .= \" AND $exceptKey != ?\";\n $values[] = $exceptValue;\n }\n $statement = $con->prepare($sql);\n $statement->execute($values);\n\n return ($statement->rowCount() >= 1) ? true : false;\n }", "title": "" }, { "docid": "b09d54a78931dbb7348ed9959ce5414b", "score": "0.7231176", "text": "function checkItem($select, $user, $value)\n{\n global $conn;\n $statment = $conn->prepare(\"SELECT $select FROM $user WHERE $select=? \");\n $statment->execute(array($value));\n $conect = $statment->rowCount();\n return $conect;\n}", "title": "" }, { "docid": "c9c21a9f32cb62b596fe6b93be0549ef", "score": "0.7056379", "text": "function checkItem($select, $from, $value){\n\n global $con;\n\n $statment = $con->prepare('SELECT ' . $select . ' FROM ' . $from . ' WHERE ' . $select . ' = ?');\n $statment->execute(array($value));\n $count = $statment->rowCount();\n return $count;\n}", "title": "" }, { "docid": "1bd71facb30d5287f80eafc2dc2354c6", "score": "0.69792205", "text": "function checkItem($select,$from,$value){\n\tglobal $con;\n\t$statment=$con->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n\t$statment->execute(array($value));\n\t$count=$statment->rowCount();\n\treturn $count;/// return item not like echo return value of output\n\n\n}", "title": "" }, { "docid": "2ac139948c23b87476c5b2c4bfbf73ec", "score": "0.6959769", "text": "public static function checkItem($select, $from, $value, $And=NULL){\n\n global $con;\n\n $statement = $con->Prepare(\"SELECT $select FROM $from WHERE $select like ? $And\");\n\n $statement->execute(array($value));\n\n $count = $statement->rowCount();\n\n return $count;\n\n }", "title": "" }, { "docid": "99e2024cf46292b1db06590156911c23", "score": "0.67115545", "text": "function check_column($item,$table_name,$column_name,$item_name,$item_value)\n {\n global $connection;\n $selectQuery=\"select $item from $table_name where $column_name ='$item_name'\";\n $result=mysqli_query($connection,$selectQuery);\n if(mysqli_num_rows($result)>0)\n {\n while($row=mysqli_fetch_assoc($result))\n {\n if($row[\"$item\"]==$item_value)\n return true;\n else\n return false;\n }\n }\n \n }", "title": "" }, { "docid": "240299e26bc20c49670da72231cb897d", "score": "0.65187186", "text": "function checkItem($select, $from, $value) {\n global $conn;\n $stmt = $conn->prepare(\"SELECT $select FROM $from WHERE $select = ?\"); // This is Same [\"SELECT Username FROM `users` WHERE Username = ? \"]\n $stmt->execute(array($value)); // Execute The Result ..\n $count = $stmt->rowCount();\n return $count;\n\n}", "title": "" }, { "docid": "240299e26bc20c49670da72231cb897d", "score": "0.65187186", "text": "function checkItem($select, $from, $value) {\n global $conn;\n $stmt = $conn->prepare(\"SELECT $select FROM $from WHERE $select = ?\"); // This is Same [\"SELECT Username FROM `users` WHERE Username = ? \"]\n $stmt->execute(array($value)); // Execute The Result ..\n $count = $stmt->rowCount();\n return $count;\n\n}", "title": "" }, { "docid": "d53260bb1af3c62cb9caee3133e88184", "score": "0.6297642", "text": "function select_item()\r\n{\r\n global $world_db, $characters_db, $realm_id, $user_name, $output, $action_permission,\r\n $base_datasite, $name_datasite, $user_lvl, $sql;\r\n\r\n valid_login($action_permission[\"view\"]);\r\n\r\n if ( empty($_GET[\"charname\"]) )\r\n redirect(\"ultra_vendor.php?error=1\");\r\n\r\n $output .= '\r\n <table class=\"top_hidden\">\r\n <tr>\r\n <td>\r\n <center>\r\n <div class=\"half_frame fieldset_border\">\r\n <span class=\"legend\">'.lang(\"ultra\", \"selectitem\").'</span>\r\n <form method=\"get\" action=\"ultra_vendor.php\" name=\"form\">\r\n <input type=\"hidden\" name=\"action\" value=\"selected_item\" />\r\n <input type=\"hidden\" name=\"charname\" value=\"'.$_GET[\"charname\"].'\" />'\r\n .lang(\"ultra\", \"itemline1\").'.\r\n <br />\r\n <br />\r\n <small>\r\n ('.lang(\"ultra\", \"itemline2\").' <a href=\"'.$base_datasite.'\">'.$name_datasite.'</a>.\r\n <br />'\r\n .lang(\"ultra\", \"itemline3\").'.)\r\n </small>\r\n <br />\r\n <br />\r\n <input name=\"myItem\" type=\"text\" />\r\n <br />\r\n <br />\r\n <table>\r\n <tr>\r\n <td>';\r\n makebutton(lang(\"ultra\", \"select\"), \"javascript:do_submit()\\\" type=\\\"def\", 180);\r\n $output .= '\r\n </td>\r\n <td>';\r\n makebutton(lang(\"global\", \"back\"), \"javascript:window.history.back()\\\" type=\\\"def\", 130);\r\n $output .= '\r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n </div>\r\n </center>\r\n </td>\r\n </tr>\r\n </table>';\r\n}", "title": "" }, { "docid": "5c74dbbb35ac24996d94276a7a525ba2", "score": "0.6249586", "text": "function Query($database, $un, $name, $price, $cat){\n\t/*\n\t * Generates the SELECT query for the items in the user's inventory. The following line is the base query followed by 3 if statements\n\t * that add to the query if conditions where sent. If no conditions were sent, the query will return the same result as the my_inv\n\t * pageLoadQuery function.\n\t */\n\t$sql_query = \"SELECT * FROM ITEM WHERE inventory_id IN (SELECT inventory_id FROM HASACCESSTO WHERE user_id=\\\"$un\\\") AND is_sold=0\";\n\tif(!($name == \"\")){\n\t\t$sql_query .= \" AND item_name=\\\"$name\\\"\";\t\t\n\t}\n\tif(!($price == \"\")){\n\t\t$sql_query .= \" AND value=\\\"$price\\\"\";\t\t\n\t}\n\tif(!($cat == \"\")){\n\t\t$sql_query .= \" AND category=\\\"$cat\\\"\";\t\t\n\t}\n\t$sql_query .=\" LIMIT 0, 20\";\n\t\n\t// Runs the generated query against the database. If the query fails to run, an ERROR will be returned, otherwise the result of the\n\t// query will be returned.\n\t$result = mysql_query($sql_query,$database);\n\tif(!$result){\n\t\techo mysql_errno($database) . \": \" . mysql_error($database). \"\\n\";\n\t\techo $sql_query;\n\t\techo \"ERROR!\";\n\t\treturn 0;\n\t}else{\n\t\treturn $result;\n\t}\n}", "title": "" }, { "docid": "c04087c7fadc3fb16b4cc833745e2b50", "score": "0.6180792", "text": "function avalia_sql($item)\n{\n global $posicao;\t\n global $ordem;\n global $db; \n $in=desformatar($_REQUEST['in']); // variavel pra obter valor $res[item] de menus1.php\n$tam_item=strlen($item);\n\n if($tam_item >1)\n { \n $new=$item{0};\n\t$sql=\"SELECT item from menu_item as a where a.item like'$new%' \";\n\t$db->query($sql);\n $conta=$db->contalinhas();\n //////////////////////////////////\n if($conta >0)\n\t { \n\t $sql=\"SELECT item from menu_item as a where a.item='$item'\";\n\t\t$db->query($sql);\n $conta2=$db->contalinhas();\n\t\t\tif($conta2 >0)\n\t\t\t{\n\t\t\t if($in==$item){\n\t\t\t\t return $item;\n\t\t\t\t exit(); }\n\t\t\t if($in<>$item){\n\t\t\t echo\"<script>alert('Erro!Item:\".formata($item).\" já se encontra cadastrado.')</script>\";\n echo\"<script>window.history.go(-1)</script>\";\n exit();\n\t\t\t }\n\t\t\t }\n elseif($conta2==0)\n\t\t\t\t{\n return $item;\n\t exit();\n\t\t\t\t}\n\t\t\t\t \n\t }\n \n\t////////////////////////////\n elseif($conta==0)\n\t{\n echo\"<script>alert('Erro! Cadastrou um item-filho sem ter pelo menos um item-pai.')</script>\";\n echo\"<script>window.history.go(-1)</script>\";\n exit();\n\t}\n exit();\n }\n \nelseif($tam_item==1)\n{\n $sql=\"SELECT item from menu_item as a where a.item='$item'\";\n $db->query($sql);\n $conta=$db->contalinhas();\n if($conta>0)\n\t\t {\n echo\"<script>alert('Erro!Menu principal já se encontra cadastrado.')</script>\";\n echo\"<script>window.history.go(-1)</script>\";\n exit(); \n\t\t }\n if($conta==0)\n\t\t { \n return $item;\n\t\t}\n }\n}", "title": "" }, { "docid": "25c3a44e67780948044926333ce20a65", "score": "0.60329336", "text": "public function checkitems(){\n\n\t\t $deviceId = $this->input->post('deviceId');\n\t\t\t\t$userId=$this->input->post('userId');\n\t\t\t\t$existitem=$this->Patient_model->check_items($deviceId,$userId);\n\t\t\t\tif($existitem==1){\n\t\t\t\t\t$data['response']='true';\n\t\t\t\t\t$data['message']=$this->message()[3]->message;\n\t\t\t\t\t\n\t\t\t\t\t$this->response($data);\n\t\t\t\t}else{\n\t\t\t\t\t$data['response']='false';\n\t\t\t\t\t$data['message']=$this->message()[4]->message;\n\t\t\t\t\t\n\t\t\t\t\t$this->response($data);\n\n\t\t\t\t}\n\n\n\t}", "title": "" }, { "docid": "4f272b8bfce15084e12206bf9ac111a8", "score": "0.6029326", "text": "function checkvalue($selected, $table, $value) {\n global $con;\n\n $stmt = $con->prepare(\"SELECT $selected FROM $table WHERE $selected = ?\");\n $stmt->execute(array($value));\n $count = $stmt->rowCount();\n return $count;\n \n}", "title": "" }, { "docid": "c7e250454082cbf8a79b5a501bd322a9", "score": "0.60136074", "text": "public function checkItem($id){\n\n\t}", "title": "" }, { "docid": "64b30743c7479e726a17605473f38deb", "score": "0.59146297", "text": "public static function checkval($select, $from, $WHERE = NULL, $AND = NULL, $value1, $value2=NULL,$value3 = NULL){\n\n global $con;\n\n $statement = $con->Prepare(\"SELECT $select FROM $from $WHERE $AND \");\n if ($value2 == NULL) {\n $statement->execute(array($value1));\n }elseif ($value3 == NULL) {\n\n $statement->execute(array($value1, $value2));\n\n }else {\n\n $statement->execute(array($value1, $value2,$value3));\n\n }\n\n $count = $statement->rowCount();\n\n return $count;\n\n }", "title": "" }, { "docid": "81688df6baf8b47b1cce16842b175a66", "score": "0.5860909", "text": "function check_item($user_id, $item_id) {\n $this->db->select(\"*\");\n $this->db->where('user_id', $user_id);\n\t\t$this->db->where('item_id', $item_id);\n return $this->db->get('user_per_item')->num_rows();\n }", "title": "" }, { "docid": "6bdb9baa6ed1daab6ae665dc6f8d15f8", "score": "0.583971", "text": "function pujado($cn, $id_item){\n $sql = \"select id from pujas where id_item=$id_item\";\n $rs= $cn->query($sql);\n if($rs->num_rows==0){\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "46c2fc4c5f5bdbb1be5101add2f9c36d", "score": "0.5804893", "text": "function query_items($dbc,$system,$genres,$pricemin,$pricemax){\n\t$query = \"SELECT * from items WHERE \";\n\tif($system != \"any\"){\n\t\t$query = $query.\"system = '\".$system.\"' AND \";\n\t}\n\tif(sizeof($genres)>0){\n\t\t$size = sizeof($genres);\n\t\t$query = $query.\"(\";\n\t\tfor($i=0;$i<$size;$i++){\n\t\t\t$query = $query.\"genre = '\".$genres[$i].\"'\";\n\t\t\tif(($i+1)>=$size){\n\t\t\t\t$query = $query.\") AND \";\n\t\t\t}else{\n\t\t\t\t$query = $query.\" OR \";\n\t\t\t}\n\t\t}\n\t}\n\t$query = $query.\"price>=\".$pricemin.\" AND price<=\".$pricemax.\" ORDER BY name\";\n\t$result = mysqli_query($dbc,$query);\n\treturn $result;\n}", "title": "" }, { "docid": "77b491421aa5a147ca77210b9c41cbf8", "score": "0.55647975", "text": "function ShowValue($tablename, $fieldid, $returnfield, $selected=\"\")\r\n{\r\n\t$chkquery = \"select * from \". $tablename . \" where \" .$fieldid . \" = '\". $selected .\"'\" ;\r\n\t$res = mysql_query($chkquery);\r\n\t$result = mysql_fetch_array($res);\r\n\t$str = \"\";\r\n\t$str\t= $result[ $returnfield];\r\n\r\n\treturn $str;\r\n\r\n}", "title": "" }, { "docid": "94398a0a918d441b49259a00de6cc1eb", "score": "0.554003", "text": "function search_data($Value,$type){\r\n\r\n\t//jika nilai $Value=*, maka program akan mengambil seluruh nilai field yg ada di tabel,jika tidak, isikan sesuai dengan field yg akan dicari dlm tabel, isikan $type dengan selectAll untuk memilih semua data atau isikan dengan notAll untuk memilih sesuai dengan identifier,\r\n\t//if $value=*, program will take all value from the table, if not, fill the $Value with the field that will be taken from the table, fill $type with selectAll to select all data from table or notAll to select the data according to the $identifier\r\n\t\tif($type==\"selectAll\"){\r\n\t\t\treturn mysqli_query($this->conn,\"select \".$Value.\" from \".$this->table);\t\r\n\t\t}\r\n\t\telse if($type==\"notAll\"){\r\n\t\t\t$value_e=explode(\"+#+\",$this->Value);\r\n\t\t\treturn mysqli_query($this->conn,\"select \".$Value.\" from \".$this->table.\" where \".$this->identifier.\"='\".$value_e[0].\"'\");\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cbbbc89310e630bd9fb62f1a30418327", "score": "0.5518737", "text": "public function actionItemnamecheck()\n {\n if (Yii::$app->request->isAjax) {\n $data = Yii::$app->request->post();\n }\n if ($data['item_id'] == 0) {\n $itemname = Vendoritem::find()->select('item_name')\n ->where(['item_name' => $data['item']])\n ->andwhere(['trash' => 'Default'])\n ->all();\n } else {\n $itemname = Vendoritem::find()->select('item_name')\n ->where(['item_name' => $data['item']])\n ->where(['item_id' => $data['item_id']])\n ->andwhere(['trash' => 'Default'])\n ->all();\n if (count($itemname) > 0) {\n return $result = 0;\n die;\n } else {\n return $result = 1;\n die;\n }\n }\n return $result = count($itemname);\n \n }", "title": "" }, { "docid": "34b19e5c36c902eed6bd1963b9d567d0", "score": "0.5502967", "text": "function itemExists($itemNo) {\n global $db;\n \n $query = 'SELECT 1 FROM inventory \n WHERE itemNo = :itemNo\n LIMIT 1;';\n \n try {\n $statement = $db->prepare($query);\n $statement->bindValue(':itemNo', $itemNo);\n $statement->execute();\n $result = $statement->fetch();\n $statement->closeCursor();\n \n return $result['1'] == 1 ? true : false;\n } catch (PDOException $e) {\n $error_message = $e->getMessage();\n include('..\\..\\view\\errors\\error.php');\n }\n}", "title": "" }, { "docid": "8a8da43e42caed864204360ec525bbfe", "score": "0.5497728", "text": "static public function mdlShowUsers($table, $item, $valor){\n\n $stmt = Connection::connect()->prepare(\"SELECT * FROM $table WHERE $item = :$item\");\n $stmt->bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n\n $stmt->execute();\n return $stmt->fetch();\n $stmt->close();\n $stmt = null;\n\n }", "title": "" }, { "docid": "48ff28795c3e6cddaf5d4daef0b01482", "score": "0.54883933", "text": "public static function have_items( $category = array(), $place = '', $special = array() ) {\r\n\r\nglobal $db, $GET;\r\n\r\n $categories = \\site\\utils::validate_user_data( $category );\r\n\r\n $where = array();\r\n\r\n /*\r\n\r\n WHERE / ORDER BY\r\n\r\n */\r\n\r\n if( !empty( $categories['update'] ) ) {\r\n $date = array_map( 'trim', explode( ',', $categories['update'] ) );\r\n $where[] = 'c.lastupdate >= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[0] ) . ')';\r\n if( isset( $date[1] ) ) {\r\n $where[] = 'c.lastupdate <= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[1] ) . ')';\r\n }\r\n }\r\n\r\n if( !empty( $categories['date'] ) ) {\r\n $date = array_map( 'trim', explode( ',', $categories['date'] ) );\r\n $where[] = 'c.date >= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[0] ) . ')';\r\n if( isset( $date[1] ) ) {\r\n $where[] = 'c.date <= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[1] ) . ')';\r\n }\r\n }\r\n\r\n /*\r\n\r\n */\r\n\r\n switch( $place ) {\r\n\r\n case 'category':\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare( \"SELECT istop,connect FROM \" . DB_TABLE_PREFIX . \"categories WHERE id = ?\" );\r\n $stmt->bind_param( \"i\", $GET['id'] );\r\n $stmt->execute();\r\n $stmt->bind_result( $istop,$connect );\r\n\r\n $ids[] = (int) $GET['id'];\r\n if( $stmt->fetch() ) {\r\n if($istop > 0){\r\n $connect_arr = explode(\"|\", $connect);\r\n foreach($connect_arr as $value){\r\n $v = intval($value);\r\n if($v > 0){\r\n $ids[] = $v;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $stmt->prepare(\"SELECT COUNT(*) FROM \" . DB_TABLE_PREFIX . \"coupons c LEFT JOIN \" . DB_TABLE_PREFIX . \"stores s ON (c.store = s.id) WHERE c.category IN(\" . implode( ',', $ids ) . \") AND c.visible > 0 AND s.visible > 0\");\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n\r\n break;\r\n\r\n case 'search':\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare(\"SELECT COUNT(*) FROM \" . DB_TABLE_PREFIX . \"coupons c LEFT JOIN \" . DB_TABLE_PREFIX . \"stores s ON (s.id = c.store) WHERE CONCAT(c.title, c.tags, s.name, s.tags) REGEXP ? AND c.visible > 0 AND s.visible > 0\");\r\n\r\n if( gettype( $GET['id'] ) === 'string' ) {\r\n $search = implode( '.*', explode( ' ', trim( $GET['id'] ) ) );\r\n } else {\r\n $search = '';\r\n }\r\n\r\n $stmt->bind_param( \"s\", $search );\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n\r\n break;\r\n\r\n default:\r\n\r\n /*\r\n\r\n WHERE / ORDER BY\r\n\r\n */\r\n\r\n if( !empty( $categories['ids'] ) && $categories['ids'] != 'all' ) {\r\n $arr = array_filter( array_map( function( $w ){\r\n return (int) $w;\r\n }, explode( ',', $categories['ids'] ) ));\r\n if( !empty( $arr ) )\r\n $where[] = 'c.id IN(' . \\site\\utils::dbp( implode(',', $arr) ) . ')';\r\n }\r\n\r\n if( !empty( $categories['categories'] ) && $categories['categories'] != 'all' ) {\r\n $arr = array_filter( array_map( function( $w ){\r\n return (int) $w;\r\n }, explode( ',', $categories['categories'] ) ));\r\n if( !empty( $arr ) )\r\n $where[] = 'c.category IN(' . \\site\\utils::dbp ( implode(',', $arr) ) . ')';\r\n }\r\n\r\n if( !empty( $categories['store'] ) && $categories['store'] != 'all' ) {\r\n $arr = array_filter( array_map( function( $w ){\r\n return (int) $w;\r\n }, explode( ',', $categories['store'] ) ));\r\n if( !empty( $arr ) )\r\n $where[] = 'c.store IN(' . \\site\\utils::dbp( implode(',', $arr) ) . ')';\r\n }\r\n\r\n if( !empty( $categories['user'] ) ) {\r\n $where[] = 'c.user = \"' . (int) $categories['user'] . '\"';\r\n }\r\n\r\n if( !empty( $categories['search'] ) ) {\r\n $search = implode( '.*', explode( ' ', trim( $categories['search'] ) ) );\r\n $where[] = 'CONCAT(c.title, c.tags) REGEXP \"' . \\site\\utils::dbp( $search ) . '\"';\r\n }\r\n\r\n if( isset( $categories['show'] ) ) {\r\n $show = array_map( 'trim', explode( ',', strtolower( $categories['show'] ) ) );\r\n foreach( $show as $v ) {\r\n switch( $v ) {\r\n case 'all': break;\r\n case 'expired': $where[] = 'c.expiration <= NOW()'; break;\r\n case 'active': $where[] = 'c.expiration > NOW()'; break;\r\n case 'popular': $where[] = 'c.popular > 0'; break;\r\n case 'exclusive': $where[] = 'c.exclusive > 0'; break;\r\n case 'feed': $where[] = 'c.feedID > 0'; break;\r\n case 'visible': $where[] = 'c.visible > 0 AND s.visible > 0'; break;\r\n case 'notvisible': $where[] = 'c.visible = 0'; break;\r\n default: $where[] = 'c.visible > 0 AND s.visible > 0'; break;\r\n }\r\n }\r\n } else {\r\n $where[] = 'c.visible > 0 AND s.visible > 0';\r\n }\r\n\r\n /*\r\n\r\n */\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare( \"SELECT COUNT(*) FROM \" . DB_TABLE_PREFIX . \"coupons c LEFT JOIN \" . DB_TABLE_PREFIX . \"stores s ON (s.id = c.store)\" . ( empty( $where ) ? '' : ' WHERE ' . implode( ' AND ', $where ) ) );\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n\r\n break;\r\n\r\n }\r\n\r\n $stmt->close();\r\n\r\n if( isset( $special['only_count'] ) ) {\r\n return $count;\r\n }\r\n\r\n\r\n $pags = array();\r\n $pags['results'] = $count;\r\n $pags['per_page'] = ( !empty( $categories['per_page'] ) ? (int) $categories['per_page'] : \\query\\main::get_option( 'items_per_page' ) );\r\n $pags['pages'] = ceil( $pags['results'] / $pags['per_page'] );\r\n $page = ( !empty( $_GET['page'] ) ? (int) $_GET['page'] : 1 );\r\n if( $page < 1 ) $page = 1;\r\n if( $page > $pags['pages'] ) $page = $_GET['page'] = $pags['pages'];\r\n $pags['page'] = $page;\r\n if( $pags['pages'] > $pags['page'] ) $pags['next_page'] = \\site\\utils::update_uri( '', array( 'page' => ($pags['page']+1) ) );\r\n if( $pags['pages'] > 1 && $pags['page'] > 1 ) $pags['prev_page'] = \\site\\utils::update_uri( '', array( 'page' => ($pags['page']-1) ) );\r\n\r\n return $pags;\r\n\r\n}", "title": "" }, { "docid": "ab0e9728242989ed076ae6cbb461eb40", "score": "0.5483852", "text": "static public function mdlValidarCategoria($tabla, $item, $valor){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE $item = :$item\");\n\n\t\t$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n\t\t$stmt -> close();\n\t\t\n\t\t$stmt = null;\n\t\n\t}", "title": "" }, { "docid": "946a577426bc3a03905b66e908ac68e6", "score": "0.5478328", "text": "public function checkItemIfExistInMenu()\n {\n }", "title": "" }, { "docid": "de71f12390c47ef37bd349d4a9f1ea0f", "score": "0.54683524", "text": "function callselect($value){\r\nif($value == 2)\r\n listobjmarca($value);\r\nelse if($value == 3) \r\n listcolores($value,2);\r\nelse if($value == 4) \r\n listobjequivalencia($value,1); \r\n}", "title": "" }, { "docid": "3ca63f460739a938f915a1836bfeeba1", "score": "0.5457211", "text": "function showForm()\n{\n\tglobal $config;\n get_header(); #defaults to header_inc.php\t\n\t\n\techo \n\t'<script type=\"text/javascript\" src=\"' . VIRTUAL_PATH . 'include/util.js\"></script>\n\t<script type=\"text/javascript\">\n\t\tfunction checkForm(thisForm)\n\t\t{//check form data for valid info\n\t\t\tif(empty(thisForm.YourName,\"Please Enter Your Name\")){return false;}\n\t\t\treturn true;//if all is passed, submit!\n\t\t}\n\t</script>\n\t<h3 align=\"center\">Order great food here!</h3>\n\t<p align=\"center\">Please select your items and submit your order</p>\n <BR />\n <BR />\n <BR />\n\t<form action=\"' . THIS_PAGE . '\" method=\"post\" onsubmit=\"return checkForm(this);\">\n ';\n echo '<table>\n <tr>\n <th>Quantity</th>\n <th>Item</th>\n <th>Description</th>\n <th>Price</th>\n </tr>';\n\t\tforeach($config->items as $item)\n {\n //echo \"<p>ID:$item->ID Name:$item->Name</p>\"; \n //echo '<p>Taco <input type=\"text\" name=\"item_1\" /></p>';\n echo '\n <tr>\n <td> <select name=\"item_' .$item->ID . '\">\n <option value=0>0</option>\n <option value=1>1</option>\n <option value=2>2</option>\n <option value=3>3</option>\n <option value=4>4</option>\n <option value=5>5</option>\n <option value=6>6</option>\n <option value=7>7</option>\n <option value=8>8</option>\n <option value=9>9</option>\n <option value=10>10</option>\n </select>\n </td>\n <td>' . $item->Name . '</td>\n <td>' .$item->Description . '</td>\n <td>' . money_format('%n', $item->Price) . '</td>\n </tr>';\n //echo '<p>' . $item->Name . ' <input type=\"text\" name=\"item_' . $item->ID . '\" /></p>';\n \n } \n echo '</table>';\n \n echo '\n\t\t\t\t<p>\n\t\t\t\t\t<input type=\"submit\" value=\"Submit your order\"><em>(<font color=\"red\"><b>*</b> required field</font>)</em>\n\t\t\t\t</p>\n\t\t<input type=\"hidden\" name=\"act\" value=\"display\" />\n\t</form>\n\t';\n\tget_footer(); #defaults to footer_inc.php\n}", "title": "" }, { "docid": "1ae462af251f67f4e579c83c2ef91f2e", "score": "0.54557794", "text": "public static function item_exists( $id = 0, $special = array() ) {\r\n\r\nglobal $db, $GET;\r\n\r\n$id = empty( $id ) ? $GET['id'] : $id;\r\n\r\n $where = array();\r\n\r\n if( isset( $special['user_view'] ) ) {\r\n $where[] = 'visible > 0';\r\n }\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare(\"SELECT id FROM \" . DB_TABLE_PREFIX . \"coupons WHERE id = ?\" . ( empty( $where ) ? '' : ' AND ' . implode( ' AND ', $where ) ) );\r\n $stmt->bind_param( \"i\", $id );\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n $stmt->close();\r\n\r\n if( $count > 0 ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n\r\n}", "title": "" }, { "docid": "caa96c38f768dbca8f5d037282e3ebd5", "score": "0.5447897", "text": "function selectbox($c1, $c2, $current_cmds)\n{\n// c2 = script || alert\n\n\tif($c2==\"alert\") {$label=\"Alerts\"; }\n\telse ($label=\"Scripts\"); \t\n\t\n\t//result = sqlite3_open(\"/etc/rms100.db\", &db);\n\t$dbh = new PDO('sqlite:/etc/rms100.db');\n\tprintf(\"<div align='center'><table><tr><td align='center'><font color='blue'>Available %s</font><br><select size='5' name='%s_%s_addcmd' multiple>\",$label, $c1, $c2);\n\n\tif($c2==\"script\")\n\t\t{ \n\t\t\t$result = $dbh->query(\"SELECT * FROM scripts WHERE type = 'relay' UNION SELECT * FROM scripts WHERE type = 'io' ORDER BY id\"); \n\t\t}\n\telse\n\t\t{\n\t\t\t$result = $dbh->query(\"SELECT * FROM alerts ORDER BY id\"); \n\t\t}\n\n\n\tforeach($result as $row)\n\t\t{\n\t\t\t$id = $row['id'];\n\t\t\t$sdbuf1 = $row['type'];\n\t\t\t$sdbuf2 = $row['name'];\n\t\t\tif($sdbuf1==\"relay\"){$sdbuf1=\"RELAY\";}\n\t\t\tif($sdbuf1==\"io\"){$sdbuf1=\"GPIO\";}\n\t\t\tprintf(\"<option value='%s'>%s-%s</option>\\n\", $id, $sdbuf1, $sdbuf2);\n\t\t}\n\n\tprintf(\"<option value='(null)'>-------------------------------------</option></select>\");\n\tprintf(\"<br><p align='center'><input type='submit' name='%s_%s_additem' value='Add' \", $c1, $c2);\n\techo\"class='commonButtonsd_add' onMouseOver='mouse_move(&#039;b_cmd_add&#039;);' onMouseOut='mouse_move();'></p>\\n\";\n\techo\"</td>\";\n\techo\"<td align='center'><br>&nbsp;<-->&nbsp;<br><br><br>\\n\";\n\techo\"</td>\";\n\tprintf(\"<td align='center'><font color='green'>Selected %s</font><br><select size='5' name='%s_%s_delcmd'>\\n\", $label, $c1, $c2);\n\n// sample commands:\t\t\"2.12.7.\\0x00\"\n\n\t//sprintf($buf,\"%s\", $current_cmds);\n\t//$current_cmds=\"1.\";\n\t\n//sprintf(tmpsql, \"echo 'in selectbox Curcmds: -%s-\\n' >> /tmp/bumf.txt\", $current_cmds);\tsystem(tmpsql);\n//printf(\"<option value=\\\"\\\">%s\", $current_cmds);\n\n\n\t$id=0;\n\t$cc = explode(\".\",$current_cmds);\n\t$cnt=count($cc);\n\n\tif($cnt > 1)\n\t\t{\n\t\t\tfor($ii=1; $ii < $cnt; $ii++)\n\t\t\t\t{\n\t\t\t\t\tprintf(\"<option value='%d'>\", $id);\n\t\t\t\t\tif($c2==\"script\") \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t//sprintf($tmpsql, \"SELECT * FROM scripts where id = '%s';\", $cnt[$bid]);\n\t\t\t\t\t\t\t$result = $dbh->query(\"SELECT * FROM scripts where id = '\" . $cc[$id] . \"';\");\n\t\t\t\t\t\t\tforeach($result as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sdbuf1 = $row['type'];\n\t\t\t\t\t\t\t\t\t$sdbuf2 = $row['name'];\n\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\tif($sdbuf1==\"relay\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sdbuf1=\"RELAY\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($sdbuf1==\"io\")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sdbuf1=\"GPIO\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tprintf(\"%s-%s</option>\",$sdbuf1,$sdbuf2);\n\t\t\t \t\t}\n\t\t\t\t\telseif($c2==\"alert\")\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t//sprintf($tmpsql, \"SELECT * FROM alerts where id = '%s';\", \"1\");\n\t\t\t\t\t\t\t$result = $dbh->query(\"SELECT * FROM alets where id = '\" . $cnt[$id] . \"';\");\n\t\t\t\t\t\t\tforeach($result as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sdbuf1 = $row['type'];\n\t\t\t\t\t\t\t\t\t$sdbuf2 = $row['name'];\n\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tprintf(\"%s-%s</option>\",$sdbuf1,$sdbuf2);\t\t\t\n\t\t\t \t\t}\n\t\t\t \telse\n\t\t\t \t\t{\n\t\t\t \t\t\tprintf(\"uuuu</option>\");\n\t\t\t \t\t}\n\t\t\t\t\t$id++;\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t$dbh=NULL;\n\techo\"<option value='(null)'>-------------------------------------</option></select>\";\n\n\tprintf(\"<br><p align='center'><input type='submit' name='%s_%s_delitem' value='Remove' \", $c1, $c2);\n\techo\"class='commonButtonsd_del' onMouseOver='mouse_move(&#039;b_cmd_del&#039;);' onMouseOut='mouse_move();'></p>\\n\";\t\n\techo\"</td></tr>\";\n\techo\"</table></div>\";\n}", "title": "" }, { "docid": "3e0327294ca6e2df49f4701692d3ff1e", "score": "0.5443798", "text": "function check_data_in_db($table_name,$data_id_field,$data_id_value,$user_id_field,$where_clause=\"\",$dump_query=0){\r\n\t\tif ($this->logged!=1) return 0;\r\n\t\t$my_query = \"SELECT \" . $data_id_field . \"\r\n\t\t\t\t\t FROM \" . $table_name . \"\r\n\t\t\t\t\t WHERE \" . $data_id_field . \"=\" . $data_id_value . \" AND \" . $user_id_field . \"=\" . intval($this->u_id) . \" \" . $where_clause;\r\n\r\n\t\t//neu dump_query = 1 thi in ra ma`n hinh\r\n\t\tif ($dump_query==1) echo $my_query;\r\n\r\n\t\t//kiem tra query\r\n\t\t$db_check = new db_query($my_query);\r\n\t\t//neu ton tai record do thi` tra ve gia tri 1, neu ko thi` tra ve gia tri 0\r\n\t\tif (mysqli_num_rows($db_check->result) > 0){\r\n\t\t\tunset($db_check);\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tunset($db_check);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "71490ef328820dd1d3ecc876365b1b2f", "score": "0.5430748", "text": "function select_quantity()\r\n{\r\n global $world_db, $characters_db, $realm_id, $user_name, $output, $action_permission, $user_lvl,\r\n $locales_search_option, $ultra_mult, $ultra_base, $uv_credits, $uv_money, $credits_fractional,\r\n $sql, $core;\r\n\r\n valid_login($action_permission[\"view\"]);\r\n\r\n if ( empty($_GET[\"myItem\"]) )\r\n redirect(\"ultra_vendor.php?error=1\");\r\n\r\n if ( $core == 1 )\r\n $iquery = \"SELECT * FROM items \"\r\n .( ( $locales_search_option != 0 ) ? \"LEFT JOIN items_localized ON (items_localized.entry=items.entry AND language_code='\".$locales_search_option.\"') \" : \" \" ).\r\n \"WHERE items.entry='\".$_GET[\"myItem\"].\"'\";\r\n else\r\n $iquery = \"SELECT *,\r\n name AS name1, Quality AS quality, SellPrice AS sellprice, BuyPrice AS buyprice\r\n FROM item_template \"\r\n .( ( $locales_search_option != 0 ) ? \"LEFT JOIN locales_item ON locales_item.entry=item_template.entry \" : \" \" ).\r\n \"WHERE item_template.entry='\".$_GET[\"myItem\"].\"'\";\r\n $iresult = $sql[\"world\"]->query($iquery);\r\n $item = $sql[\"world\"]->fetch_assoc($iresult);\r\n\r\n // Localization\r\n if ( $locales_search_option != 0 )\r\n {\r\n if ( $core == 1 )\r\n $item[\"name1\"] = $item[\"name\"];\r\n else\r\n $item[\"name1\"] = $item[\"name_loc\".$locales_search_option];\r\n }\r\n else\r\n $item[\"name1\"] = $item[\"name1\"];\r\n\r\n if ( $core == 1 )\r\n $cquery = \"SELECT guid, level, gold FROM characters WHERE name='\".$_GET[\"charname\"].\"'\";\r\n else\r\n $cquery = \"SELECT guid, level, money AS gold FROM characters WHERE name='\".$_GET[\"charname\"].\"'\";\r\n $cresult = $sql[\"char\"]->query($cquery);\r\n $char = $sql[\"char\"]->fetch_assoc($cresult);\r\n\r\n $chargold = $char[\"gold\"];\r\n $chargold = str_pad($chargold, 4, \"0\", STR_PAD_LEFT);\r\n $pg = substr($chargold, 0, -4);\r\n if ( $pg == '' )\r\n $pg = 0;\r\n $ps = substr($chargold, -4, 2);\r\n if ( ( $ps == '' ) || ( $ps == '00' ) )\r\n $ps = 0;\r\n $pc = substr($chargold, -2);\r\n if ( ( $pc == '' ) || ( $pc == '00' ) )\r\n $pc = 0;\r\n\r\n $mul = $ultra_mult[$item[\"quality\"]];\r\n $qual = quality($item[\"quality\"]);\r\n\r\n if ( $item[\"sellprice\"] <> 0 )\r\n $base_price = $item[\"sellprice\"];\r\n else\r\n {\r\n if ( $item[\"buyprice\"] == 0 )\r\n $base_price = $ultra_base;\r\n else\r\n $base_price = $item[\"buyprice\"];\r\n }\r\n\r\n $output .= '\r\n <table class=\"top_hidden\">\r\n <tr>\r\n <td>\r\n <center>\r\n <div class=\"half_frame fieldset_border\">\r\n <span class=\"legend\">'.lang(\"ultra\", \"selectquantity\").'</span>';\r\n\r\n $gold = $mul * $base_price;\r\n $gold = str_pad($gold, 4, \"0\", STR_PAD_LEFT);\r\n $cg = substr($gold, 0, -4);\r\n if ( $cg == '' )\r\n $cg = 0;\r\n $cs = substr($gold, -4, 2);\r\n if ( ( $cs == '' ) || ( $cs == '00' ) )\r\n $cs = 0;\r\n $cc = substr($gold, -2);\r\n if ( ( $cc == '' ) || ( $cc == '00' ) )\r\n $cc = 0;\r\n $gold = $mul * $base_price;\r\n\r\n $base_gold = $base_price;\r\n $base_gold = str_pad($base_gold, 4, \"0\", STR_PAD_LEFT);\r\n $bg = substr($base_gold, 0, -4);\r\n if ( $bg == '' )\r\n $bg = 0;\r\n $bs = substr($base_gold, -4, 2);\r\n if ( ( $bs == '' ) || ( $bs == '00' ) )\r\n $bs = 0;\r\n $bc = substr($base_gold, -2);\r\n if ( ( $bc == '' ) || ( $bc == '00' ) )\r\n $bc = 0;\r\n\r\n // Localization\r\n $isranked = lang(\"ultra\", \"isranked\");\r\n $isranked = str_replace(\"%1\", '<b>'.$item[\"name1\"].'</b>', $isranked);\r\n $isranked = str_replace(\"%2\", '<b>\"'.$qual.'\"</b>', $isranked);\r\n\r\n $output .= $isranked;\r\n $output .= '\r\n <br />';\r\n\r\n // Localization\r\n $willcost = lang(\"ultra\", \"willcost\");\r\n $willcost = str_replace(\"%1\", '<span id=\"uv_mul\">'.$mul.'</span>', $willcost);\r\n $cost_display = $bg.'<img src=\"img/gold.gif\" alt=\"\" align=\"middle\" />'\r\n .$bs.'<img src=\"img/silver.gif\" alt=\"\" align=\"middle\" />'\r\n .$bc.'<img src=\"img/copper.gif\" alt=\"\" align=\"middle\" />';\r\n $willcost = str_replace(\"%2\", $cost_display, $willcost);\r\n\r\n $output .= $willcost;\r\n $output .= '\r\n <br />';\r\n\r\n // Localization\r\n $orcost = lang(\"ultra\", \"or\");\r\n $or_display = $cg.'<img src=\"img/gold.gif\" alt=\"\" align=\"middle\" />'\r\n .$cs.'<img src=\"img/silver.gif\" alt=\"\" align=\"middle\" />'\r\n .$cc.'<img src=\"img/copper.gif\" alt=\"\" align=\"middle\" />';\r\n $orcost = str_replace(\"%1\", $or_display, $orcost);\r\n\r\n $output .= $orcost;\r\n $output .= '\r\n <br />\r\n <br />';\r\n\r\n // Localization\r\n $charhas = lang(\"ultra\", \"has\");\r\n $charhas = str_replace(\"%1\", '<b>'.$_GET[\"charname\"].'</b>', $charhas);\r\n $money_display = $pg.'<img src=\"img/gold.gif\" alt=\"\" align=\"middle\" />'\r\n .$ps.'<img src=\"img/silver.gif\" alt=\"\" align=\"middle\" />'\r\n .$pc.'<img src=\"img/copper.gif\" alt=\"\" align=\"middle\" />';\r\n $charhas = str_replace(\"%2\", $money_display, $charhas);\r\n\r\n $output .= $charhas;\r\n $output .= '\r\n <br />\r\n <br />';\r\n\r\n // credits\r\n if ( $uv_money > 0 )\r\n {\r\n // get our credit balance\r\n $query = \"SELECT Credits FROM config_accounts WHERE Login='\".$user_name.\"'\";\r\n $result = $sql[\"mgr\"]->query($query);\r\n $result = $sql[\"mgr\"]->fetch_assoc($result);\r\n $credits = $result[\"Credits\"];\r\n\r\n if ( $credits < 0 )\r\n {\r\n // unlimited credits\r\n $output .= lang(\"global\", \"credits_unlimited\");\r\n $output .= '\r\n <br />\r\n <br />';\r\n }\r\n elseif ( $credits >= 0 )\r\n {\r\n $credit_cost = $uv_credits * ($gold / $uv_money);\r\n\r\n // if Allow Fractional Credits is disabled then cost must be a whole number\r\n $credit_cost = ( ( !$credits_fractional ) ? ceil($credit_cost) : $credit_cost );\r\n\r\n $credits_per_item = lang(\"ultra\", \"credits_peritem\");\r\n $credits_per_item = str_replace(\"%1\", '<b>'.$credit_cost.'</b>', $credits_per_item);\r\n $credits_per_item = str_replace(\"%2\", '<b>'.$item[\"name1\"].'</b>', $credits_per_item);\r\n\r\n $output .= $credits_per_item;\r\n $output .= '\r\n <br />\r\n <br />';\r\n\r\n $credits_avail = lang(\"ultra\", \"credits_avail\");\r\n $credits_avail = str_replace(\"%1\", '<b>'.(float)$credits.'</b>', $credits_avail);\r\n\r\n $output .= $credits_avail;\r\n $output .= '\r\n <br />\r\n <br />';\r\n }\r\n }\r\n\r\n $output .= '\r\n <br />\r\n <br />\r\n <form method=\"get\" action=\"ultra_vendor.php\" name=\"form\">\r\n <input type=\"hidden\" name=\"action\" value=\"selected_quantity\" />\r\n <input type=\"hidden\" name=\"charname\" value=\"'.$_GET[\"charname\"].'\" />\r\n <input type=\"hidden\" name=\"gold\" value=\"'.$gold.'\" />\r\n <input type=\"hidden\" name=\"item\" value=\"'.$item[\"entry\"].'\" />'\r\n .lang(\"ultra\", \"wanted\").':\r\n <input type=\"text\" name=\"want\" value=\"0\" />\r\n <br />\r\n <br />\r\n <table>\r\n <tr>\r\n <td>';\r\n makebutton(lang(\"ultra\", \"submit\"), \"javascript:do_submit()\\\" type=\\\"def\",180);\r\n $output .= '\r\n </td>\r\n <td>';\r\n makebutton(lang(\"global\", \"back\"), \"javascript:window.history.back()\\\" type=\\\"def\",130);\r\n $output .= '\r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n </div>\r\n </center>\r\n </td>\r\n </tr>\r\n </table>';\r\n}", "title": "" }, { "docid": "f1be3195806d684eae5f86f3f8cf0a87", "score": "0.54198307", "text": "function selComb($nome, $val, $sql) {\r\n //Executa a consulta\r\n include \"connection.php\"; // Conecta ao banco de dados\r\n $res = sqlexec($id, $sql);\r\n //Exibe as linhas encontradas na consulta\r\n echo \"<select name='$nome' id='$nome'>\";\r\n echo \" <option value=''> </option>\";\r\n while ($row = mysql_fetch_array($res)) {\r\n echo \" <option value='\" . $row[0] . \"'\";\r\n echo $row[0] == $val ? \"selected>\" : \">\";\r\n echo $row[1] . \"</option>\";\r\n }\r\n echo \"</select>\";\r\n}", "title": "" }, { "docid": "64a0583cd2edffb4436f5b3fa3850fa9", "score": "0.5419794", "text": "function show_items($key,$table){\n\t\n\t$sql = \"SELECT * FROM inspection_form_$table WHERE key=$key AND (status=1 OR status=0) ORDER BY id\";\n\n\t//echo $sql;\n\t\n\tif(($res = pg_query($sql)) == false)\n\t\tdie(\"nepodarilo sa zobrziť výsledky\");\n\t\t\n\t$html = '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" >';\n\t\n\twhile($pole = pg_fetch_row($res)){\n\t\tif($pole[7]==\"t\"){\n\t\t\t$checked_func = 'checked=\"checked\"';\n\t\t\t$checked_func_val = '&nbsp;funguje';\n\t\t}\n\t\telse{\n\t\t\t$checked_func = \"\";\n\t\t\t$checked_func_val = '&nbsp;nefunguje';\n\t\t}\n\t\tif($pole[8]==\"t\"){\n\t\t\t$checked_poloha = 'checked=\"checked\"';\n\t\t\t$checked_poloha_val = '&nbsp;vyhovuje';\n\t\t}\n\t\telse{\n\t\t\t$checked_poloha = \"\";\n\t\t\t$checked_poloha_val = '&nbsp;nevyhovuje';\n\t\t}\n\t\tif($pole[6]==\"t\"){\n\t\t\t$checked_zaloha = 'checked=\"checked\"';\n\t\t\t$checked_zaloha_val = '&nbsp;zálohovaná';\n\t\t}\n\t\telse{\n\t\t\t$checked_zaloha = '\"\"';\n\t\t\t$checked_zaloha_val = '&nbsp;nezálohovaná';\n\t\t}\n\t\t\n\t\tif($table == \"snimace\")\t\n\t\t\t$html .= '\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<div style=\"float: left;margin-left: -7px;\">\n\t\t\t\t\t\t <input type=\"hidden\" name=\"id_snimac\" value=\"'.$pole[0].'\" id=\"id_snimac_'.$pole[0].'\"/>&nbsp;\n\t\t\t\t\t\t <!-- <input type=\"text\" value=\"'.$pole[2].'\" size=\"3\" class=\"input_t\" />&nbsp; -->\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[2].'\" size=\"1\" class=\"input_t\" id=\"snimac_id_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[4].'\" size=\"5\" class=\"input_t\" id=\"snimac_adresa_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[5].'\" size=\"39\" class=\"input_t\" id=\"snimac_popis_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[6].'\" size=\"15\" class=\"input_t\" id=\"snimac_typ_'.$pole[0].'\" />\n\t\t\t\t\t </div>\n\t\t\t\t\t <div style=\"float: left; width: 130px; text-align: center\"><input type=\"checkbox\" value=\"true\" id=\"snimac_funkcnost_'.$pole[0].'\" '.$checked_func.' />'.$checked_func_val.'</div>\n\t\t\t\t\t <div style=\"float: left; width: 130px; text-align: center\"><input type=\"checkbox\" value=\"true\" id=\"snimac_poloha_'.$pole[0].'\" '.$checked_poloha.' />'.$checked_poloha_val.'</div>\n\t\t\t\t \t <div style=\"float: right;\"><input type=\"button\" value=\"uprav\" size=\"20\" onclick=\"prevedQuery_snimac_update(document.getElementById(\\'id_snimac_'.$pole[0].'\\').value)\" />&nbsp;<input type=\"button\" value=\"zruš\" size=\"20\" onclick=\"prevedQuery_snimac_delete(document.getElementById(\\'id_snimac_'.$pole[0].'\\').value)\" /></div>\n\t\t\t\t \t <div style=\"clear: both\"></div>\n\t\t\t\t <td>\n\t\t\t</tr>\n\t\t\t';\n\t\tif($table == \"sireny\")\n\t\t\t$html .= '\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t <div style=\"float: left\">\n\t\t\t\t\t\t <input type=\"hidden\" name=\"id_sirena\" value=\"'.$pole[0].'\" id=\"id_sirena_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[2].'\" size=\"1\" class=\"input_t\" id=\"sirena_id_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"hidden\" value=\"'.$pole[3].'\" size=\"10\" class=\"input_t\" id=\"sirena_cislo_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[4].'\" size=\"25\" class=\"input_t\" id=\"sirena_umiestnenie_'.$pole[0].'\" />&nbsp;\n\t\t\t\t\t\t <input type=\"text\" value=\"'.$pole[5].'\" size=\"20\" class=\"input_t\" id=\"sirena_typ_'.$pole[0].'\" />\n\t\t\t\t\t </div>\n\t\t\t\t\t <div style=\"float: left; width: 210px; text-align: center\"><input type=\"checkbox\" value=\"true\" id=\"sirena_zalohovana_'.$pole[0].'\" '.$checked_zaloha.' />'.$checked_zaloha_val.'</div>\n\t\t\t\t\t <div style=\"float: left; width: 140px; text-align: center\"><input type=\"checkbox\" value=\"true\" id=\"sirena_funkcnost_'.$pole[0].'\" '.$checked_func.' />'.$checked_func_val.'</div>\n\t\t\t\t\t <div style=\"float: right;\"><input type=\"button\" value=\"uprav\" size=\"20\" onclick=\"prevedQuery_sirena_update(document.getElementById(\\'id_sirena_'.$pole[0].'\\').value)\" />&nbsp;<input type=\"button\" value=\"zruš\" size=\"20\" onclick=\"prevedQuery_sirena_delete(document.getElementById(\\'id_sirena_'.$pole[0].'\\').value)\" /></div>\n\t\t\t\t\t <div style=\"clear: both\"></div>\n\t\t\t\t </td>\n\t\t\t</tr>\n\t\t\t';\n\t}\n\t$html .= '</table>';\n\t\n\treturn $html;\n}", "title": "" }, { "docid": "996b44f8d6f382b7777fde64b4bff393", "score": "0.5397022", "text": "function getTableList_skype($value='',$id='',$_table='',$_label=''){\n global $_LIST;\n \n\n\n $sql=\"Select * from $_table where status=2 or id=$value\";\n\n \n \n $result=mysql_query($sql);\n $return=\"<select name='$id'>\";\n $return.=\"<option value='0'>Select \". $_label.\"</option>\";\n if(mysql_num_rows($result)>0)\n while($rows=mysql_fetch_assoc($result)){\n $return.=\"<option value='\".$rows['id'].\"'\"; if($value==$rows['id']){ $return.= \"selected='selected'\"; }$return.=\">\".$rows['skype'].\"</option>\";\n }\n $return.=\"</select>\";\n return $return;\n \n }", "title": "" }, { "docid": "ef206d0b35849ecf520ac8ac48c97ea3", "score": "0.5389437", "text": "function list_users($name, $selected_id='', $required=false, $all=false, $text_all='-', $where='', $params=''){\r\n $db_obj = new database();\r\n \r\n\t$table = TB_PREF.\"users\";\r\n $query = $db_obj->display_table_all_column($table, $where, false, false, 0, 0, 'nama');\r\n\techo \"<select name='$name' \"; if($required) echo \"required='required'\"; echo \" class='form-control' \".$params.\" >\";\r\n //pilihan semua / kosong\r\n if($all){ \r\n echo \"<option value=''> $text_all </option>\";\r\n }\r\n\t\r\n //loop data\r\n while($myrow = $db_obj->db_fetch_array($query)){\t\r\n echo \"<option value='\".$myrow['id'].\"' \"; if($selected_id==$myrow['id']) echo \"selected='selected'\";\r\n echo \">\".$myrow['user_id'].\" -> \".$myrow['nama'].\"</option>\";\t\t\r\n }\r\n\techo \"</select>\";\r\n}", "title": "" }, { "docid": "a740462e28f9c6dcba49ca9d5be1bca4", "score": "0.53869104", "text": "function getitems($where, $catID)\n{\n global $conn;\n\n $getitems = $conn->prepare(\"SELECT * FROM items Where $where = ? \");\n $getitems->execute(array($catID));\n $items = $getitems->fetchAll();\n\n return $items;\n}", "title": "" }, { "docid": "fe117fd3954ae705ae3707b1d8ff1866", "score": "0.5376847", "text": "function get_mu_item_details($upc) {\r\n if ((!$upc) || ($upc=='')) {\r\n return false;\r\n }\r\n $conn = db_connect();\r\n $query = \"select * from mu_items where upc='\".$conn->real_escape_string($upc).\"'\";\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n }\r\n $result = @$result->fetch_assoc();\r\n return $result;\r\n}", "title": "" }, { "docid": "19b5e2e375462c4e70ebca9cf67aca4f", "score": "0.53626233", "text": "function checked_akses($id_user_level,$id_menu){\n $ci = get_instance();\n $ci->db->where('user_level',$id_user_level);\n $ci->db->where('menu_id',$id_menu);\n $data = $ci->db->get('tbl_userlevel');\n if($data->num_rows()>0){\n return \"checked='checked'\";\n }\n}", "title": "" }, { "docid": "4f6c818856c2e44c5a0bf272a62612ae", "score": "0.53561425", "text": "function checked_akses($id_user_level, $id_menu)\n{\n $ci = get_instance();\n $ci->db->where('id_user_level', $id_user_level);\n $ci->db->where('id_menu', $id_menu);\n $data = $ci->db->get('tbl_hak_akses');\n if ($data->num_rows() > 0) {\n return \"checked='checked'\";\n }\n}", "title": "" }, { "docid": "b4ec5dabd0fcd106c11dfc80e0b41658", "score": "0.53526443", "text": "function check_item_data()\n{\n\t//if (!check_num('amount', 0))\n\t//{\n\t//\tdisplay_error( _(\"The amount entered is not a valid number or is less than zero.\"));\n\t//\tset_focus('amount');\n\t//\treturn false;\n\t//}\n\n\tif ($_POST['code_id'] == $_POST['bank_account'])\n\t{\n\t\tdisplay_error( _(\"The source and destination accouts cannot be the same.\"));\n\t\tset_focus('code_id');\n\t\treturn false;\n\t}\n\n\t//if (is_bank_account($_POST['code_id']))\n\t//{\n\t//\tif ($_SESSION['pay_items']->trans_type == ST_BANKPAYMENT)\n\t//\t\tdisplay_error( _(\"You cannot make a payment to a bank account. Please use the transfer funds facility for this.\"));\n\t//\telse\n \t//\t\tdisplay_error( _(\"You cannot make a deposit from a bank account. Please use the transfer funds facility for this.\"));\n\t//\tset_focus('code_id');\n\t//\treturn false;\n\t//}\n\tdisplay_error( _(\"Good data.\"));\n\n \treturn true;\n}", "title": "" }, { "docid": "85ace34b5b3bf4cfd620d4016d5a889d", "score": "0.53468", "text": "function selComb($nome,$val,$sql){\r\n\t//Executa a consulta\r\n\t$res = sqlexec($id,$sql);\r\n\t//Exibe as linhas encontradas na consulta\r\n\techo \"<select name='$nome' id='$nome'>\";\r\n\techo \" <option value='0'> </option>\";\r\n\twhile ($row = mysql_fetch_array($res)) {\r\n\t\techo \"<option value='\".$row[0].\"'\";\r\n\t\techo $row[0]==$val?\"selected\":\"\";\r\n\t\techo \">\".$row[1].\"</option>\";\r\n\t}\r\n\techo \"</select>\";\r\n}", "title": "" }, { "docid": "ed533877418adf486e3e9e71bf156434", "score": "0.53463006", "text": "function get_mu_items($catid) {\r\n if ((!$catid) || ($catid == '')) {\r\n return false;\r\n }\r\n $conn = db_connect();\r\n $query = \"select * from mu_items where catid = '\".$conn->real_escape_string($catid).\"'\";\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n }\r\n $num_books = @$result->num_rows;\r\n if ($num_books == 0) {\r\n return false;\r\n }\r\n $result = db_result_to_array($result);\r\n return $result;\r\n}", "title": "" }, { "docid": "623a8c1d30b2ff6b8d9480e2ad8fd8f1", "score": "0.5339574", "text": "function itemExists($itemName)\n {\n $sql = \"SELECT `itemName` FROM `items` WHERE `itemName` = :itemName\";\n\n //prepare the statement\n $preparedStatement = $this->db->prepare($sql);\n\n //bind the values\n $preparedStatement->bindParam(':itemName', $itemName, PDO::PARAM_STR);\n\n //run the query\n $preparedStatement->execute();\n\n //check the result\n if($preparedStatement->fetch()) { //if item has been found (fetch returns false if no results and an array if there are results)\n $this->result = true;\n } else { //false was returned, the item does not exist\n $this->result = false;\n }\n return $this->result;\n }", "title": "" }, { "docid": "b5579b700d99924c0da3c14f337e5bce", "score": "0.53382945", "text": "function getDataList_transaction_new($value='',$id='',$_type='',$_user=''){\n global $_LIST;\n if(!empty($_type) && $_type==4){\n $sql=\"Select * from campus_students where (std_status=1 or std_status=2)\";\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\n $sql.=\" and agent_id=$_user\";\n }\n }else{\n $sql=\"Select * from capmus_users where user_type=$_type and status=1\";\n \n \n }\n $result=mysql_query($sql);\n $return=\"<select name='$id'>\";\n $return.=\"<option value=''>\". $_LIST['userType'][$_type].\"</option>\";\n if(mysql_num_rows($result)>0)\n while($rows=mysql_fetch_assoc($result)){\n $return.=\"<option value='\".$rows['id'].\"'\";if($value==$rows['id']){ $return.= \"selected='selected'\"; }$return.=\">\".$rows['firstName'].' '.$rows['lastName'].\"</option>\";\n }\n $return.=\"</select>\";\n return $return;\n \n }", "title": "" }, { "docid": "160573963d34ceaec4e37819e496ecc9", "score": "0.5338284", "text": "function checkStatus($field,$table, $where,$value)\n{\n global $connection;\n $stmt = $connection ->prepare(\"SELECT\n $field\n FROM\n $table\n Where\n $where =?\n \");\n $stmt ->execute(array($value));\n $status = $stmt ->fetch();\n return $status[$field];\n}", "title": "" }, { "docid": "b958af1bd14afdb4294f2791654bf145", "score": "0.53355134", "text": "function _search_all_db($str)\n{\n $servername = \"localhost\";\n $username = \"aman\";\n $password = \"password\";\n $database = \"test\";\n $reply=\"<Items>\";\n $conn = new mysqli($servername, $username, $password, $database);\n if(!$conn->connect_error) { //connection succeeded\n $sql = \"SELECT Repository.UserID AS UserID, /*UserID will be used to retrieve userinfo*/\n TempTable.ItemID AS ItemID,\n\t\t\t\t\tTempTable.ItemName AS ItemName,\n\t\t\t\t\tTempTable.Aliases AS Aliases,\n\t\t\t\t\tTempTable.Category AS Category,\n\t\t\t\t\tTempTable.Description AS DefaultDescription,\n\t\t\t\t\tTempTable.ImageURI AS ImageURI,\n\t\t\t\t\tRepository.RepID AS RepID,\n\t\t\t\t\tRepository.Quantity AS Quantity,\n\t\t\t\t\tRepository.Units AS Units,\n\t\t\t\t\tRepository.UnitPrice AS UnitPrice,\n\t\t\t\t\tRepository.State AS State,\n\t\t\t\t\tRepository.DateAdded AS DateAdded,\n\t\t\t\t\tRepository.Description AS Description,\n\t\t\t\t\tRepository.Deliverable AS Deliverable,\n\t\t\t\t\tRepository.DeliverableAreas AS DeliverableAreas\n\t\t\t\t\t FROM (SELECT * FROM Items \n\t\t\t\t\t WHERE ItemName LIKE '%\".$str.\"%' OR Aliases LIKE '%\".$str.\"%')\n\t\t\t\t\t AS TempTable JOIN Repository ON TempTable.ItemID = Repository.ItemID\n\t\t\t\t\t \"\n\t\t\t\t\t ;\n $result = $conn->query($sql);\n if($result!=false) { //Query executed successfully\n if($result->num_rows>0) { //At least one record was found\n echo \"<status>0</status>\";\n while($row=$result->fetch_assoc()) { //Fetch row by row\n global $UserID;\n $UserID = $row['UserID'];\n $ItemID = $row['ItemID'];\n $ItemName = $row['ItemName'];\n $Aliases = setdefault($row['Aliases'], \"None\");\n $Category = $row['Category'];\n $DefaultDescription = setdefault($row['DefaultDescription'], \"None\");\n $ImageURI =\tsetdefault($row['ImageURI'], \"None\");\n $RepID = $row['RepID'];\n $Quantity = $row['Quantity'];\n $Units = $row['Units'];\n $UnitPrice = $row['UnitPrice'];\n $State = setdefault($row['State'], \"None\");\n $DateAdded = $row['DateAdded'];\n $Description = setdefault($row['Description'], \"None\");\n $Deliverable = $row['Deliverable'];\n $DeliverableAreas = $row['DeliverableAreas'];\n $reply.=\"<Item>\";\n $reply.=\"<UserID>\".$UserID.\"</UserID>\";\n $reply.=\"<ItemID>\".$ItemID.\"</ItemID>\";\n $reply.=\"<ItemName>\".$ItemName.\"</ItemName>\";\n $reply.=\"<Aliases>\".$Aliases.\"</Aliases>\";\n $reply.=\"<Category>\".$Category.\"</Category>\";\n $reply.=\"<DefaultDescription>\".$DefaultDescription.\"</DefaultDescription>\";\n $reply.=\"<ImageURI>\".$ImageURI.\"</ImageURI>\";\n $reply.=\"<RepID>\".$RepID.\"</RepID>\";\n $reply.=\"<Quantity>\".$Quantity.\"</Quantity>\";\n $reply.=\"<Units>\".$Units.\"</Units>\";\n $reply.=\"<UnitPrice>\".$UnitPrice.\"</UnitPrice>\";\n $reply.=\"<State>\".$State.\"</State>\";\n $reply.=\"<DateAdded>\".$DateAdded.\"</DateAdded>\";\n $reply.=\"<Description>\".$Description.\"</Description>\";\n $reply.=\"<Deliverable>\".$Deliverable.\"</Deliverable>\";\n $reply.=\"<DeliverableAreas>\".$DeliverableAreas.\"</DeliverableAreas>\";\n $reply.=\"</Item>\";\n }\n //Close the xml\n $reply.=\"</Items>\";\n //Return the xml\n echo $reply;\n\n\n } else { //No results were found\n echo \"<status>1</status>\";\n }\n } else { //There was a problem with the query\n echo \"<status>2</status>\";\n }\n $conn->close(); //Close the connection\n } else { //connection failed\n echo \"<status>3</status>\";\n }\n}", "title": "" }, { "docid": "e1a4d059820041eb75fc3c5461ae1ffe", "score": "0.532925", "text": "function countItem($item, $table, $status = null, $value = null) {\n global $con;\n \n if ($status != null && $value != null){\n $query = \"WHERE $status = $value\";\n } else { \n $query = \"\";\n }\n \n\n $stmt2 = $con->prepare(\"SELECT COUNT($item) FROM $table $query\");\n $stmt2->execute();\n $count = $stmt2->fetchColumn();\n echo $count;\n}", "title": "" }, { "docid": "d74cd66a877dcbac6d45112e1ab7e18e", "score": "0.5308957", "text": "public function item_fetch(){\n\n\t\t\t$items = $this->master_model->custom_query(\"SELECT c.description AS c_desc, c.code, i.cat_id, i.common_name, i.description AS i_desc, i.brand, i.size_type, i.price, i.item_id, i.is_sold FROM items i LEFT JOIN categories c ON c.cat_id = i.cat_id WHERE i.is_deleted = 0 ORDER BY i.cat_id ASC\");\n\n\n\t\t\tif($items != FALSE)\n\t\t\t{\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'success' => $items->result()\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'error' => 'No items found!'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9d7ad0d8f68c3799b0027aad2562ddba", "score": "0.5290532", "text": "function getItem($item)\n{\n $item = filter_var($item, FILTER_SANITIZE_SPECIAL_CHARS);\n\t\n //remove whitespace characters before search\n $item = trim($item);\n \n\tglobal $dbc;\n\t$item = \"%\" . $item . \"%\";\n\t\n $query = \"SELECT prod_id, prod_name, prod_weight, prod_price, prod_description, prod_image, cat_name\n FROM ICS199db.tblProducts\n JOIN ICS199db.tblCategory\n ON tblCategory_cat_id = cat_id \n\t\t\t\tWHERE upper(prod_name) LIKE upper(:item) OR upper(cat_name) LIKE upper(:item);\";\n $statement = $dbc->prepare($query);\n\t$statement->bindValue(':item', $item);\n $statement->execute();\n $products = $statement->fetchAll();\n $statement->closeCursor();\n return $products;\n}", "title": "" }, { "docid": "05d5b3b7aba939b1d283ed1312eba460", "score": "0.5290504", "text": "function search_item($item_name)\n\t\t{\n\t\t\t$selectQ = \"SELECT * FROM \".INVENTORY_TABLE.\" WHERE name = '$item_name'\";\n\t\t\t$selectResult = $this->conn->query($selectQ);\n\n\t\t\tif ($selectResult->num_rows == 0){return null;}\n\n\t\t\t$search_results = array();\n\t\t\twhile($table_row = $selectResult->fetch_assoc())\n\t\t\t{\n\t\t\t\tarray_push($search_results, $table_row);\n\t\t\t}\n\t\t\treturn $search_results;\n\t\t}", "title": "" }, { "docid": "cd31b235131e72bced4544241582fd62", "score": "0.5289049", "text": "function record_exists_select($table, $select='') {\n\n global $CFG;\n\n if ($select) {\n $select = 'WHERE '.$select;\n }\n\n return record_exists_sql('SELECT * FROM '. $CFG->prefix . $table . ' ' . $select);\n}", "title": "" }, { "docid": "73d74b78e07cbf0a9c0123cc91d79924", "score": "0.5286422", "text": "function item_held($member_id, $item_name)\n{\n // Is the item held by the user\n $r = $GLOBALS['SITE_DB']->query_select_value_if_there('w_inventory', 'item_count', array('item_owner' => $member_id, 'item_name' => $item_name));\n return !is_null($r);\n}", "title": "" }, { "docid": "dab22def700f265aaa6b9bf5727792f8", "score": "0.52856696", "text": "function getdbfields($returntype=\"\", $itemsperrow)\n {\n global $selectfield;\n global $search;\n global $order;\n $q=new Cdb;\n $a=$q->metadata(\"members\", false);\n $a[]=array('table' => 'members', 'name' => 'affiliate_name', 'type' => 'int', 'len' => '10', 'flags' => 'not_null primary_key auto_increment');\n $j=0;\n $k=0;\n foreach ($a as $b)\n {\n\n $i=0;\n foreach ($b as $c)\n {\n if ($i==1) \n {\n if ($returntype==\"check\")\n {\n if ($k%$itemsperrow==0) \n {\n $return.=\"<tr>\n \";\n $j=$k;\n }\n $k++;\n $return.='<td><input type=\"checkbox\" name=\"selectfield[]\" value=\"'.$c.'\" '.(in_array($c, $selectfield)? \"checked\" : \"\").'>'.$c.'</td>\n ';\n $m=0;\n if ($k%$itemsperrow==0 && $k!=$j)\n {\n $return.=\"</tr>\n \"; $m=1;\n }\n }\n if ($returntype==\"select\")\n {\n $m=3;\n $return.='<option value=\"'.$c.'\"'.($c == $search ? \"selected\" : \"\").'>'.$c.'</option>';\n }\n if ($returntype==\"select_x\")\n {\n $return.='<option value=\"'.$c.'\"'.($c == $search ? \"selected\" : \"\").'>'.$c.'</option>';\n }\n if ($returntype==\"select_s\")\n {\n $m=3;\n $return.='<option value=\"'.$c.'\"'.($c == $order ? \"selected\" : \"\").'>'.$c.'</option>';\n }\n break;\n }\n else $i++;\n }\n\n }\n if ($m==0) $return.='</tr>';\n return $return;\n }", "title": "" }, { "docid": "069bcd0e95c4f5ffd489f3a3be305e81", "score": "0.5285205", "text": "function save_name($item) {\n\n $result = \\Drupal::database()->select('myusers', 'm')\n ->fields('m', array('id', 'name'))\n ->condition('m.name', $item)\n ->countQuery()\n ->execute()\n ->fetchField(); \n\n if($result===0){\n $database = \\Drupal::service('database');\n $database->insert('myusers')\n ->fields([\n 'name' => $item\n ])\n ->execute();\n return true;\n }else{\n return false;\n }\n\n}", "title": "" }, { "docid": "27338e1a33bea03da137e5f79f69ba50", "score": "0.5274581", "text": "function select($conexion,$valoresSeleccion,$tabla,$where = ['']){\n $consulta=\"SELECT \";\n for ($i=0; $i < count($valoresSeleccion); $i++) { \n if($i < count($valoresSeleccion)-1){\n $consulta=$consulta.$valoresSeleccion[$i].' ,';\n } else {\n $consulta=$consulta.$valoresSeleccion[$i].' ';\n }\n }\n $consulta=$consulta.'FROM ';\n for ($i=0; $i < count($tabla); $i++) { \n \n if($i < count($tabla)-1){\n $consulta=$consulta.$tabla[$i].' ,';\n } else {\n $consulta=$consulta.$tabla[$i].' ';\n }\n }\n if ($where[0]!=''){\n $consulta=$consulta.' WHERE ';\n for ($i=0; $i < count($where); $i++) { \n if($i < count($where)-1){\n $consulta=$consulta.$where[$i].' AND ';\n } else {\n $consulta=$consulta.$where[$i].' ';\n }\n }\n }\n $resultado = $conexion->query($consulta);\n return $resultado;\n}", "title": "" }, { "docid": "4ed89c507ae20b8b0272d6827acbc2f5", "score": "0.52655804", "text": "function showoptionlists2($fieldname,$tablename,$returnvaluefield,$showfield , $whereclause){\n global $dbprefix,$$fieldname;\n $sql=\"select $returnvaluefield,$showfield from \".$dbprefix.\"$tablename \";\n if($whereclause <> '' ) $sql = $sql .\" where \" . $whereclause;\n $result=mysql_query($sql);\n echo \"<select name=\\\"$fieldname\\\">\";\n echo \"<option value=\\\"\\\" \";\n echo \">\";\n echo \"</option>\";\n if($result){\n while($row=mysql_fetch_object($result)){\n $returnvalue=$row->$returnvaluefield;\n $showvalue=$row->$showfield;\n echo \"<option value=\\\"$returnvalue\\\" \";\n if($$fieldname==$returnvalue){\n echo \"selected\";\n }\n echo \">\";\n echo \"($returnvalue) $showvalue\";\n echo \"</option>\";\n }\n } \n echo \"</select>\";\n}", "title": "" }, { "docid": "92af404d863153dab73fda12cda59954", "score": "0.52460337", "text": "public function test_input_field_select()\n\t{\n\t\t$id = '';\n\t\t$seloptions = array();\n\t\t$selected_value = '';\n\t\t$parameters = array($id, $seloptions, $selected_value);\n $msg = self::invokeMethod('LiteSpeed_Cache_Admin_Display','input_field_select', $parameters);\n\t\t$bool = self::isString($msg);\n \t$this->assertTrue($bool);\t\t\n \t\n\t}", "title": "" }, { "docid": "e8bc7067417c1c2cce75e8ec4fe7e45d", "score": "0.5234986", "text": "function getDataList_reference($value='',$id='',$_type='',$_user=''){\n global $_LIST;\n if(!empty($_type) && $_type==4){\n $sql=\"Select * from campus_students where (std_status=1 or std_status=2)\";\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\n $sql.=\" and agent_id=$_user\";\n }\n }else{\n $sql=\"Select * from capmus_users where status=1\";\n \n \n }\n $result=mysql_query($sql);\n $return=\"<select name='$id'>\";\n $return.=\"<option value=''>\". $_LIST['userType'][$_type].\"</option>\";\n if(mysql_num_rows($result)>0)\n while($rows=mysql_fetch_assoc($result)){\n $return.=\"<option value='\".$rows['id'].\"'\";if($value==$rows['id']){ $return.= \"selected='selected'\"; }$return.=\">\".$rows['firstName'].' '.$rows['lastName'].\"</option>\";\n }\n $return.=\"</select>\";\n return $return;\n \n }", "title": "" }, { "docid": "f4478e40638564909c117454bdd5f559", "score": "0.5234897", "text": "public function search_items($item) {\n $this->db->select(\"item_id as value, concat(item_number,' / ',item_name) as label\",FALSE);\n $this->db->from('v_itemsearch');\n $this->db->like('upper(concat(item_name,item_number)) ', strtoupper($item));\n $this->db->order_by('item_number');\n $result=$this->db->get()->result_array();\n return $result;\n }", "title": "" }, { "docid": "bda07529006910fbf4eea5dd95d5f2db", "score": "0.52305186", "text": "function select_itmlist(){\n\t\t$username = $this->session->userdata('username');\n\t\t$query = $this->db->query(\"select * from mod_itm_list\");\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "76749257c03b1f715f5057b146dd08f5", "score": "0.5222353", "text": "function items_info($item_id=null) {\n\treturn query('select * from item');\n}", "title": "" }, { "docid": "969fe9dc537c01ddb373256dc13fb892", "score": "0.52190423", "text": "public function CheckItem($fieldName,$fieldValue)\n {\n $this->copen();\n $stmt = $this->DBH->prepare(\"SELECT * FROM users WHERE $fieldName=:itemValue\");\n $stmt->execute(['itemValue' => $fieldValue]);\n $result = $stmt->fetch();\n $this->cclose();\n return $result[\"$fieldName\"];\n }", "title": "" }, { "docid": "15fa4335c891e8576e29e793533c340b", "score": "0.5207522", "text": "abstract public static function getItemsSelectStatement() : string;", "title": "" }, { "docid": "7a9cde33e000c50a73c8376e20bf9432", "score": "0.5200764", "text": "function DB_select ($SQL, &$vystup, &$pocet_zaznamu)\n{\t//echo \"<P>SQL = \".$SQL.\"<P>\";\n\t$funguje = false;\n\tif (!(DB_spojeni(c_Databaze, $chyba, $spojeni))):\n\t\techo \"<FONT COLOR=red><B><P>Do�lo k chyb� p�i spojen� s datab�z�.\n\t\t\t($chyba)<P></B></FONT><BR>\\n\";\n\t\treturn false;\n\tendif;\n\t$vysledek = MySQL_Query($SQL);\n\tif (!$vysledek):\n\t\techo \"<FONT COLOR=red><B><P>Do�lo k chyb� p�i zpracov�n� dotazu v\n\t\t\t\tdatab�zi.<P></B></FONT><BR>\\n\";\n\telse:\n \t$funguje = true;\n\t\t$vystup = $vysledek;\n $pocet_zaznamu = MySQL_num_rows($vystup);\n endif;\n\tDB_odpojeni($spojeni);\n\treturn $funguje;\n}", "title": "" }, { "docid": "9ca7faaefa4217baf6bc0a9a67377443", "score": "0.520033", "text": "function check_value_unique($options, $table) {\n\tif( !empty( $options['unique'] ) ) {\n\n\t\tforeach( $options['unique'] as $key=>$value ) {\n\n\t\t\t$sql = \"SELECT * FROM `\" . $table . \"` WHERE \";\n\t\t\t\n\t\t\t$sql .= \"`\" . $key . \"`='\" . $value['value'] . \"'\";\n\n\t\t\tif( $res = query($sql) ) {\n\t\t\t\tif( mysql_num_rows($res) > 0 ) {\n\n\t\t\t\t\t//There was a match, so error out.\n\t\t\t\t\terrorBox($value['message']);\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t//If we've gotten here, they all checked out.\n\t\treturn TRUE;\n\t}else{ \n\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "b9b6f9759c57373277a937a2c79bce83", "score": "0.51990783", "text": "function populate_user_select() {\nglobal $db;\n// get list of available users\n$modify_query = \"SELECT users_id, name FROM admin_users\";\n$sth = $db->prepare($modify_query);\n$res = $db->execute($sth,$category);\n\nwhile ($row = $res->fetchRow()) {\n$page_content .= '<option value=\"'.$row[0].'\">'.$row[1].'</option>' . \"\\n\";\n}\n\nreturn $page_content;\n}", "title": "" }, { "docid": "65adf218734f1af02dcc077c7a7428e2", "score": "0.5199023", "text": "function ItemInfoFetch($start = null, $limit = null){\r\n$searchq \t= getRequest('searchq');\r\n$page \t= getRequest('page');\r\n$sub_item_category_id \t= getRequest('sub_item_category_id');\r\nif($searchq){\r\n\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id\r\n\twhere branch_name LIKE '%\".$searchq.\"%' or main_item_category_name LIKE '%\".$searchq.\"%' or sub_item_category_name LIKE '%\".$searchq.\"%' order by receive_date desc LIMIT 0, 5\"; \r\n\t}if($page){\r\n\t\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id\r\n\torder by receive_date desc LIMIT $start, $limit\"; \r\n\t}if($sub_item_category_id){\r\n\t\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id \r\n\twhere sub_item_category_id=$sub_item_category_id order by receive_date desc\"; \r\n\t}\r\nif(!$page && !$searchq && !$sub_item_category_id){\r\n\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id \r\n\torder by receive_date desc LIMIT 0, 29\"; \r\n\t\t}\r\n\t\t//echo $sql;\r\n\t\t$res= mysql_query($sql);\r\n\t $type = '<table width=\"1200\" cellspacing=0 class=\"tableGrid\" >\r\n\t <tr>\r\n\t\t\t\t<th>SL</th>\r\n\t <th nowrap=nowrap align=left>Brand Name</th>\r\n\t <th nowrap=nowrap align=left>Item Name</th>\r\n\t <th nowrap=nowrap align=left>Quantity</th>\r\n<!--\t\t\t\t <th nowrap=nowrap align=left>Category</th>\r\n-->\t\t\t\t <th nowrap=nowrap align=left>Cost</th>\r\n\t\t\t\t <th nowrap=nowrap align=left>Sales(retail)</th>\r\n\t\t\t\t <th nowrap=nowrap align=left>Sales(whole)</th>\r\n\t\t\t\t <th nowrap=nowrap align=left>Size</th>\r\n\t\t\t\t <th nowrap=nowrap align=left>Date</th>\r\n<!--\t\t\t\t <th nowrap=nowrap align=left>Description</th>\r\n-->\t\t\t\t <th nowrap=nowrap align=left>Created By</th>\r\n\t\t\t\t <th nowrap=nowrap align=left>Branch</th>\r\n\t\t\t\t<th></th>\r\n\t\t\t\t<th></th>\r\n\t </tr>';\r\n\t\t$rowcolor=0;$i=1;\r\n\t\twhile($row = mysql_fetch_array($res)){\r\n \t\t\t\r\n\t\t\t\r\n\t\t if($rowcolor==0){ \r\n\t\t\t\t$style = \"oddClassStyle\";$rowcolor=1;\r\n\t\t\t }else{\r\n\t\t\t\t$style = \"evenClassStyle\";$rowcolor=0;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t$type .='<tr class=\"oddClassStyle\" onMouseOver=\"this.className=\\'highlight\\'\" \r\n\t\t\tonMouseOut=\"this.className=\\''.$style.'\\'\" >\r\n\t\t\t\r\n\t\t\t<td nowrap=nowrap>'.$i.'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['main_item_category_name'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['sub_item_category_name'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['quantity'].'&nbsp;</td>\r\n<!--\t\t\t<td nowrap=nowrap>'.$row['sub_item_category_name'].'&nbsp;</td>\r\n-->\t\t\t<td nowrap=nowrap>'.$row['cost_price'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['sales_price'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['whole_sales_price'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['item_size'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'._date($row['receive_date']).'&nbsp;</td>\r\n<!--\t\t\t<td nowrap=nowrap>'.$row['description'].'&nbsp;</td>\r\n-->\t\t\t<td nowrap=nowrap>'.$row['createdby'].'&nbsp;</td>\r\n\t\t\t<td nowrap=nowrap>'.$row['branch_name'].'&nbsp;</td>\r\n\t\t\t<td width=\"30\"><a href=\"?app=item_distribute&cmd=edit&item_id='.$row['item_id'].'\"><img src=\"images/common/edit.gif\" style=\"border:none\"></a></td>\r\n\t\t\t<td width=\"30\"><a href=\"?app=item_distribute&cmd=DeleteItem&item_id='.$row['item_id'].'\" onclick=\"return confirmDelete();\" title=\"Delete\">\r\n\t\t\t<img src=\"images/common/delete.gif\" style=\"border:none\"></a></td>\r\n\t\t\t</tr>';\r\n\t\t\t\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$type .= '</table>';\r\n\t\treturn $type;\r\n}", "title": "" }, { "docid": "d2d6fed790638f78004bfee6679c754e", "score": "0.5187584", "text": "function getTableList_ext($value='',$id='',$_table='',$_label=''){\n global $_LIST;\n \n $skid=showStudents($value,'extId');\n if(!empty($skid)){\n\t$sql=\"Select * from $_table where status=2 or id=$skid\";\n }else{\n $sql=\"Select * from $_table where status=2\";\n }\n \n \n $result=mysql_query($sql);\n $return=\"<select name='$id'>\";\n $return.=\"<option value=''>Select \". $_label.\"</option>\";\n if(mysql_num_rows($result)>0)\n while($rows=mysql_fetch_assoc($result)){\n $return.=\"<option value='\".$rows['id'].\"'\"; if($value==$rows['id']){ $return.= \"selected='selected'\"; }$return.=\">\".$rows['extId'].\"</option>\";\n }\n $return.=\"</select>\";\n return $return;\n \n }", "title": "" }, { "docid": "89ba8cfefc2f73b62babdce2e4e58009", "score": "0.51858157", "text": "function check_resource_item($rid, $t, $m, $l) {\n global $con;\n $sql = \"SELECT id FROM resourceItem WHERE deleted_at IS NULL AND resource_id='$rid' AND title='$t' AND mime='$m' AND link='$l' LIMIT 1\";\n if (($temp = mysql_query($sql, $con))) {\n if (mysql_num_rows($temp) > 0) {\n return true;\n } else {\n return false;\n }\n } else {\n die_error(-2, json_encode(mysql_error()));\n }\n}", "title": "" }, { "docid": "d58372c83795d0fa5da708dd571cfd7a", "score": "0.51836336", "text": "public function scan_item($barcode)\n {\n $sql = \"SELECT a.itemlink,a.packsize,a.itemcode,a.description,b.barcode \n FROM backend.itemmaster a INNER JOIN backend.itembarcode b ON a.itemcode=b.itemcode \n WHERE b.barcode='$barcode'\";\n $query = $this->db->query($sql);\n //echo $this->db->last_query();die;\n return $query;\n \n }", "title": "" }, { "docid": "de73a1ca19405c1c2c5d7a42ff67b8e4", "score": "0.5173374", "text": "function checkStatus($table,$column,$status){\r\nglobal $connection;\r\n\r\n$query = \"SELECT * FROM $table WHERE $column = '$status'\";\r\n\r\n$result = mysqli_query($connection,$query);\r\n\r\nconfirmQuery($result);\r\n\r\n return mysqli_num_rows($result);\r\n\r\n\r\n}", "title": "" }, { "docid": "82663d529b4838538da70bbddac417f0", "score": "0.5166895", "text": "function validate_dropdowntable($id, $value)\n{ \n\n\t//echo \"<script type='text/javascript'>alert('$id')</script>\";\n\tglobal $db;\n\n\t$select = $db->select();\n\n\t\n\t//The following updates the column 'value' with the changed dropdown option's value \n\t$columns['value']\t= $value;\n\t$db->update(\"station_variables\",$columns,'\"svid\"=\\''.$id.'\\'');\n\n\t$result = $db->fetchAll('select sid from station_variables where \"svid\"=\\''.$id.'\\'');\n\t//$result[0]['sid'] == sid\n\tworkflow_input($result[0]['sid']);\n\t\n\treturn $value; \n}", "title": "" }, { "docid": "0cd8671c8b5a92ba7be392876f4fdaa4", "score": "0.5164167", "text": "public function qty($a){\n $sql = \"SELECT qty FROM products WHERE product_id='$a'\";\n //execute the query and return boolean\n return $this->db_query($sql);\n}", "title": "" }, { "docid": "9707bded6ee16237292f271ec1d9159f", "score": "0.5161214", "text": "static public function mdlMostrarCategorias($tabla,$item,$valor){\n if($item!= null){\n \n $stmt=Conexion::conectar()->prepare(\"SELECT * FROM $tabla where $item = '$valor'\");\n $stmt->bindParam(\":\".$item, $valor,PDO::PARAM_STR); /*el metodo bindParam sirve para enlazar parametros */\n $stmt->execute();\n /*if(isset($stmt) && !empty($stmt)){\n return $stmt->errorInfo();\n \n }else{*/\n return $stmt->fetch();\n \n \n }else{\n $stmt=Conexion::conectar()->prepare(\"SELECT * FROM $tabla\");\n $stmt->execute();\n return $stmt->fetchAll();\n }\n\n $stmt->close();\n $stmt=null;\n \n }", "title": "" }, { "docid": "490cd950cd6d67ad4f29a8241f5e61bf", "score": "0.51592916", "text": "function check_if_you_want_this_thing_exist_in_database_or_not($colum,$table,$value){\r\n global $con;\r\n $select = $con ->prepare(\"SELECT $colum FROM $table WHERE $colum = ?\");\r\n $select ->execute(array($value));\r\n $result =$select ->rowCount();\r\n return $result;\r\n\r\n \r\n}", "title": "" }, { "docid": "8f6caba9292e14f49385564cfc44470d", "score": "0.5154782", "text": "function SelectTableOnTwoConditions($TableName,$ConditionColumn1,$ConditionValue1,$ConditionColumn2,$ConditionValue2)\r\n{\r\n \r\n //connecting to database\r\n $Connection=ConnetToDatabaseFuntion();\r\n\r\n $my_county_select=$my_county_select=\"SELECT * FROM `$TableName` WHERE `$ConditionColumn1`='\".mysqli_real_escape_string($Connection,$ConditionValue1).\"' AND `$ConditionColumn2`='\".mysqli_real_escape_string($Connection,$ConditionValue2).\"' \";\r\n\t\r\n \r\n\t\t$do_my_county_select=mysqli_query($Connection,$my_county_select);\r\n \r\n if($do_my_county_select)\r\n {\r\n $selected_manage_data=mysqli_fetch_all($do_my_county_select,MYSQLI_ASSOC);\r\n \r\n $Connection->close();\r\n mysqli_free_result($do_my_county_select);\r\n return $selected_manage_data;\r\n }\r\n else \r\n {\r\n die(\"could not select on two conditions table--\".$my_county_select);\r\n }\r\n\r\n}", "title": "" }, { "docid": "6c29068f80d71de27b881f09fd30d2a7", "score": "0.51494884", "text": "public function itemID_AutoComplete($id=\"\"){\n return (Items::find_by_sql(\"SELECT * FROM items WHERE item_name LIKE '%\".$_POST['input'].\"%'\"));\n }", "title": "" }, { "docid": "cc8280498f19c58de4710c75958ba7d7", "score": "0.51163733", "text": "function find_specified($specified, $table, $column, $item)\n{\n try\n {\n $connection = open_connection();\n $statement = $connection->prepare(\"SELECT $specified FROM $table WHERE $column = :item\");\n if($statement->execute(array('item' => $item)))\n {\n //echo \"Successfully looked for $specified <br />\";\n $temp = $statement->fetchAll();\n //print_r($temp);\n if(!isset($temp[0][0]))\n {\n return(-1);\n }\n else\n {\n return ($temp[0][0]);\n }\n }\n }\n catch(PDOException $e)\n {\n print(\"Failed to look for $specified: \" . $e->getMessage() . \"<br />\");\n $statement->debugDumpParams();\n die();\n }\n}", "title": "" }, { "docid": "e26a11a41aaa401dd7cc7b27dac0080b", "score": "0.5114054", "text": "function optionSelected($value , $comboBox){\n if (isset($_POST) && $_POST[$comboBox]==$value || isset($_GET) && $_GET[$comboBox]==$value) {\n echo \" selected\";\n }\n }", "title": "" }, { "docid": "f3612c7e9d88fad85ec4037ddfa606e6", "score": "0.5100969", "text": "function Selallscnd($data1,$data2,$data3)\r\n{\r\n global $db_table_prefix;\r\n $Ckhstt = \"SELECT * FROM \".$db_table_prefix.$data1.\" WHERE $data2=$data3\";\r\n $exQry = mysql_query($Ckhstt)or die(doLogDb(mysql_error().__LINE__).\"$Ckhstt <br /> failed @ line \".__LINE__);\r\n return $exQry;\r\n}", "title": "" }, { "docid": "dbf0be89ee58a3003ed820351e4cbc8a", "score": "0.50984263", "text": "function insert_record($dbc, $id, $desc, $create, $update, $room, $owner, $finder, $item_status) {\r\n $query = 'INSERT INTO stuff(location_id, description, create_date, update_date, room, owner, finder, item_status) VALUES (\"' . $id . '\" ,\"' . $desc . '\" , \"' . $create . '\",\"' . $update . '\",\"' . $room . '\",\"' . $owner . '\",\"' . $finder . '\",\"' . $item_status . '\")' ;\r\n show_query($query);\r\n\t$results = mysqli_query($dbc,$query) ;\r\n\tif(!valid_description($desc))\r\n\t echo '<p style =\"color:red; font-size:16px;\">Please give a description.</p>';\r\n\telse if (!valid_date($create))\r\n\t echo '<p style =\"color:red; font-size:16px;\">Please give a valid date.</p>'; \r\n\telse if (!valid_status($item_status))\r\n\t echo '<p style =\"color:red; font-size:16px;\">Please complete the item status.</p>';\r\n\telse\r\n\t\tcheck_results($results) ;\r\n return $results ;\r\n}", "title": "" }, { "docid": "544eec506c2a73fece5dcbf005e83cb4", "score": "0.5095081", "text": "function mysql_select($table) {\r\r\n $noerror = true;\r\r\n if (($noerror = $this->mysql_qry($table, 1))) {\r\r\n }\r\r\n return $noerror;\r\r\n }", "title": "" }, { "docid": "3216d7da072f67dc02f1a0c05a50fc06", "score": "0.50919384", "text": "function claim_found_item($status) {\r\n global $dbc, $debug;\r\n\t\r\n if($status === 'Claimed'){\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_email']))))\r\n\t\t\t$owner_email = $_POST['owner_email'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unabled to be processed to to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\tif(trim(is_numeric(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_phone'])))))\r\n\t\t\t$owner_phone = $_POST['owner_phone'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unabled to be processed to to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_full_name']))))\r\n\t\t\t$owner_full_name = $_POST['owner_full_name'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unabled to be processed to to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($status))))\r\n\t\t\t$status1 = $status;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t\tif(is_numeric($_POST['id']))\r\n\t\t\t$id = $_POST['id'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unabled to be processed to to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n $query = 'UPDATE stuff SET update_date=NOW()' . ', claimed_date=NOW()' . ', owner_email=\"' . $owner_email . '\", owner_phone=\"' . $owner_phone . '\", owner=\"' . $owner_full_name . '\", status=\"' . $status1 . '\" WHERE id=' . $id;\r\n }\r\n\t\r\n else if($status === 'Found') {\r\n $title_query = 'SELECT title FROM stuff WHERE id=' . $_POST['id'];\r\n $title_results = mysqli_query($dbc, $title_query);\r\n check_results($title_results);\r\n $row = mysqli_fetch_array($title_results);\r\n $title = $row['title'];\r\n\t\t\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_email']))))\r\n\t\t\t$finder_email = $_POST['finder_email'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unable to be processed due to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\tif(trim(is_numeric(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_phone'])))))\r\n\t\t\t$finder_phone = $_POST['finder_phone'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unable to be processed due to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_full_name']))))\r\n\t\t\t$finder_full_name = $_POST['finder_full_name'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unable to be processed due to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($status))))\r\n\t\t\t$status1 = $status;\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unable to be processed due to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(is_numeric($_POST['id']))\r\n\t\t\t$id = $_POST['id'];\r\n\t\telse {\r\n\t\t\techo '<script>$(document).ready(function () {$(\"#error\").html(\"Sorry, your request was unable to be processed due to invalid input.\");});</script>';\r\n\t\t\treturn false;\r\n\t\t}\r\n \r\n # update item as found only if it has not been reported found already\r\n if(!is_numeric(strpos($title, 'REPORTED FOUND:')))\r\n $query = 'UPDATE stuff SET title=\"REPORTED FOUND: ' . $title . '\", update_date=NOW()' . ', found_date=NOW()'. ', finder_email=\"' . $finder_email . '\", finder_phone=\"' . $finder_phone . '\", finder=\"' . $finder_full_name . '\", status=\"' . $status1 . '\" WHERE id=' . $id;\r\n }\r\n else\r\n return false;\r\n if(!empty($query)) {\r\n $results = mysqli_query($dbc, $query);\r\n check_results($results);\r\n \r\n if($status === 'Found')\r\n echo '<script>$(document).ready(function () {$(\"#success\").html(\"Success! The item has been marked found.\");});</script>';\r\n \r\n else if($status === 'Claimed')\r\n echo '<script>$(document).ready(function () {$(\"#success\").html(\"Success! The item has been marked as claimed. An admin will be in contact with you to address your claim.\");});</script>'; \r\n }\r\n\t\r\n if($debug)\r\n echo '<script>$(document).ready(function () {$(\"#error\").html(\"' . 'Query: ' . addslashes($query) . '\");});</script>';\r\n}", "title": "" }, { "docid": "db6e01721fdfd6cd2a4a5991e538d97f", "score": "0.5090051", "text": "function MakeSelectFieldWithItems($edit,$data,$items,$datas,$namer,$item,$rdata=\"\",$titler=\"\",$empty=\"\")\n {\n if ($edit==0)\n {\n return $this->MakeSelectShowField($data,$datas,$namer,$item,$titler,$empty);\n }\n\n $values=array();\n $names=array();\n $titles=array();\n\n $value=0;\n if(!empty($item[ $data ]))\n {\n $value=$item[ $data ];\n }\n else { $empty=\"\"; }\n\n $values=array(0);\n $names=array($empty);\n if (!empty($titler)) { $titles=array(\"\"); }\n\n\n $title=\"\";\n foreach ($items as $ritem)\n {\n if (!empty($ritem[ \"__Disabled__\" ]))\n {\n array_push($values,\"disabled\");\n }\n else\n {\n array_push($values,$ritem[ \"ID\" ]);\n }\n\n $this->ApplySqlObjectDataNames($ritem,$datas);\n\n array_push($names,$this->Filter($namer,$ritem));\n if (!empty($titler))\n {\n array_push($titles,$this->Filter($titler,$ritem));\n if ($ritem[ \"ID\" ]==$value) { $title=$this->Filter($titler,$ritem); }\n }\n elseif ($ritem[ \"ID\" ]==$value)\n {\n $title=$this->Filter($namer,$ritem);\n }\n }\n\n \n\n if (empty($rdata)) { $rdata=$data; }\n\n return $this->MakeSelectField\n (\n $rdata,\n $values,\n $names,\n $value,\n array(),\n $titles,\n $title\n );\n }", "title": "" }, { "docid": "de17a6a463288dec90910d975de2b52a", "score": "0.50886464", "text": "public function selectItems($content){\n foreach($this->_items as $name => $item){\n if (is_array($content)){\n if (in_array($item->getItemValue(), $content))\n $item->selected(true);\n } else {\n if ($item->getItemValue() == $content)\n $item->selected(true); \n }\n }\n }", "title": "" }, { "docid": "0f22503674d3b367420a9f556d92dd10", "score": "0.5086063", "text": "function fetch_items($category=0)\n{\n\t\t$sql = \"SELECT stock_id, stock.description AS name,\n\t\t\t\tstock.category_id,\n\t\t\t\tunits,material_cost,\n\t\t\t\tcat.description\n\t\t\tFROM \".TB_PREF.\"stock_master stock LEFT JOIN \".TB_PREF.\"stock_category cat ON stock.category_id=cat.category_id\n\t\t\t\tWHERE mb_flag <> 'D'\";\n\t\tif ($category != 0)\n\t\t\t$sql .= \" AND cat.category_id = \".db_escape($category);\n\t\t$sql .= \" ORDER BY stock.category_id, stock_id\";\n\n return db_query($sql,\"No transactions were returned\");\n}", "title": "" }, { "docid": "c9d8ba30399b9a77f92573105758947e", "score": "0.5082954", "text": "function getDataList_active_deactive_teachers($value='',$id='',$_type='',$_user=''){\n global $_LIST;\n if(!empty($_type) && $_type==4){\n $sql=\"Select * from campus_students where (std_status=1 or std_status=2)\";\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\n $sql.=\" and agent_id=$_user\";\n }\n }else{\n $sql=\"Select * from capmus_users where user_type=$_type\";\n \n \n }\n $result=mysql_query($sql);\n $return=\"<select name='$id'>\";\n $return.=\"<option value=''>\". $_LIST['userType'][$_type].\"</option>\";\n if(mysql_num_rows($result)>0)\n while($rows=mysql_fetch_assoc($result)){\n $return.=\"<option value='\".$rows['id'].\"'\";if($value==$rows['id']){ $return.= \"selected='selected'\"; }$return.=\">\".$rows['firstName'].' '.$rows['lastName'].\"</option>\";\n }\n $return.=\"</select>\";\n return $return;\n \n }", "title": "" }, { "docid": "9e8ae6b2fc5d10488bb4cda8d72c0502", "score": "0.5082712", "text": "public function selectAllMineItems($customerId, $selected);", "title": "" }, { "docid": "81501b5b46b0d0969bfbf3550a40be20", "score": "0.5081719", "text": "function errorCheck($table, $id) {\r\n\t$result = mysql_query(\"select * from $table where id = $id\");\r\n\tif (!$result) return \"Query failed: \" . mysql_error();\r\n \r\n $ses_replacement = mysql_real_escape_string(trim($_SESSION['gwasreplacement']));\r\n if (!(isset($ses_replacement)) || ($ses_replacement == '') || $ses_replacement == \"%\") {\r\n return \"No replacement selected.\";\r\n }\r\n \r\n\t$item = mysql_fetch_array($result);\r\n\t$id_visit = $item['id_visit'];\r\n\t$id_subject = $item['id_subject'];\r\n\t$date_visit = $item['date_visit'];\r\n\r\n\r\n \r\n\t//wrong item type\r\n\tif ($item['type'] != \"tube\") return \"wrong item type\";\r\n\t//wrong study\r\n\tif ($item['id_study'] != \"CRIC\") return \"wrong study\";\r\n\t//wrong sample type\r\n\tif ($item['sample_type'] != \"BUFFY\") return \"wrong sample type\";\r\n\t//pid exists check\r\n\t$gwasresult = mysql_query(\"select * from gwas_specimens where pid = $id_subject\");\r\n\tif (!$gwasresult) return \"Query failed: \" . mysql_error();\r\n\tif (mysql_affected_rows() == 0) return \"PID not on list\";\r\n \r\n //any tube for this patent already scanned\r\n $gwasresult = mysql_query(\"select * from gwas_specimens where pid = $id_subject and barcode != '' and replacement = $ses_replacement\");\r\n if (!$gwasresult) return \"Query failed: \" . mysql_error();\r\n\tif (mysql_affected_rows() > 0) return \"PID already scanned\";\r\n \r\n //vnum/replacement id check\r\n\t$gwasresult = mysql_query(\"select * from gwas_specimens where pid = $id_subject and vnum = '$id_visit' and replacement = $ses_replacement\");\r\n\tif (!$gwasresult) return \"Query failed: \" . mysql_error();\r\n\tif (mysql_affected_rows() == 0) return \"TCL_VNUM != VNUM\";\r\n\t$gwas_item = mysql_fetch_array($gwasresult);\r\n\t//pid already scanned check\r\n\tif ($gwas_item['scan_date'] != '0000-00-00') return \"PID already scanned\";\r\n\t\r\n //vdate check\r\n\t$gwas_date_visit = $gwas_item['vdate'];\r\n\tif ($date_visit == 0) {\r\n\t\treturn \"TCL_VDATE not set\";\r\n\t}\r\n\t$diff = dateDiff($gwas_item['vdate'], $item['date_visit']);\r\n //$diff = 0; #debug!\r\n\t$dateRange = 90;\r\n\t/*\r\n\techo $gwas_item['vdate'] . \", \" . $item['date_visit'];\r\n\techo $diff;\r\n\t*/\r\n\tif ($diff < - $dateRange) {\r\n\t\treturn \"TCL_VDATE < VDATE - 90\";\r\n\t}\r\n\tif ($diff > $dateRange) {\r\n\t\treturn \"TCL_VDATE > VDATE + 90\";\r\n\t}\r\n\treturn \"ok\";\r\n}", "title": "" }, { "docid": "8071903409d419d2af433ce0278058ba", "score": "0.5079654", "text": "function showContent($title) {\r\n require \"includes/dbconvars.php\";\r\n $dbCnx = mysql_connect($dbhost, $dbuser, $dbpwd)\r\n or die(mysql_error());\r\n mysql_select_db($dbname, $dbCnx)\r\n or die(mysql_error());\r\n\r\n $category = $_SESSION[\"category\"];\r\n $selection = $_SESSION[\"selection\"];\r\n $userEntry = $_SESSION[\"userEntry\"];\r\n\r\n if (!get_magic_quotes_gpc()) {\r\n $selection = mysql_real_escape_string($selection);\r\n $userEntry = mysql_real_escape_string($userEntry);\r\n }\r\n\r\n\r\n $sql = \"\r\n SELECT ID, FIRST_NAME, LAST_NAME, COMPANY, STREET\r\n FROM $category\r\n WHERE $selection LIKE '$userEntry%'\r\n ORDER BY LAST_NAME\r\n \";\r\n $result = mysql_query($sql);\r\n\r\n if (mysql_num_rows($result) == 0) {\r\n echo \"<h4 color=\\\"red\\\">No Results Matched Your Search. Please Use Your Browser's Back Button and Try Again</h4>\";\r\n }\r\n\r\n echo \"<h3>$title</h3>\\n\";\r\n echo \"<table width=\\\"55%\\\">\\n\";\r\n showHeading();\r\n while ($row = mysql_fetch_row($result)) {\r\n list($id, $fname, $lname, $company, $address) = $row;\r\n showItem($id, $fname, $lname, $company, $address);\r\n }\r\n echo \"</table>\\n\";\r\n\r\n mysql_free_result($result);\r\n mysql_close($dbCnx);\r\n}", "title": "" }, { "docid": "7aa7fdbccfa97669b8de6818b673f87d", "score": "0.50791806", "text": "function getItem() {\n $sql = \"SELECT Tuotetunnus FROM tuote WHERE tuotetyyppi = ?\";\n $prepare = $db_handle->db()->prepare($sql);\n $prepare->bind_param($POST['tuote']);\n $result = $prepare->get_result();\n return $result;\n}", "title": "" }, { "docid": "24c12e2095bd96319be78cf80b4ef611", "score": "0.5075969", "text": "function customer_have_saved_item($customer_id, $item_id)\n{\n global $conn;\n\n $sql = \"SELECT * FROM savedproducts WHERE customerid='$customer_id' AND productid='$item_id';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n\n if ($numrows > 0) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "8fa0540e6f97ac9d717a2904260c634a", "score": "0.5071931", "text": "function ajr_trackmate_check_lists( $args ) {\n\n\tglobal $wpdb;\n\t\n\t# args\n\t$visible_nonrunners\t= $args['visible_nonrunners'];\n\t$arg_get\t\t\t= $args['get'];\n\t$arg_select\t\t\t= $args['select'];\n\t$type\t\t\t\t= $args['type'];\n\t$sub_type\t\t\t= $args['sub_type'];\n\t$horse_name\t\t\t= $args['horse_name'];\n\t$race_date\t\t\t= $args['race_date'];\n\t$race_time\t\t\t= $args['race_time'];\n\t$track_name\t\t\t= $args['track_name'];\n\t$user_id\t\t\t= get_current_user_id();\n\t\n\t//$visible_nonrunners = false;\n\t\n\t# build query\n\tif( $type == 'all' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, type, sub_type, notes, user_id, user_name';\n\t\t$where\t= 'WHERE '.($visible_nonrunners?'':'user_id=\"'.$user_id.'\" AND ').'horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';\n\telseif( $type == 'toggle_onoff' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, info';\n\t\t$where\t= 'WHERE user_id=\"'.$user_id.'\" AND type=\"'.$type.'\" AND sub_type=\"'.$sub_type.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';\n\telseif( $sub_type == 'notebook' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, type, sub_type';\n\t\t$where\t= 'WHERE user_id=\"'.$user_id.'\" AND (type=\"notebook\" AND sub_type=\"notebook\" AND horse_name=\"'.$horse_name.'\") OR (type=\"favourite\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\")';\n\telseif( $type == 'favourite' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, type, sub_type, user_id';\n\t\t$where\t= 'WHERE type=\"'.$type.'\" AND user_id=\"'.$user_id.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';\n\telseif( $type == 'ignore' && in_array($sub_type, array('nonrunner','ignore_horse')) ) :\n\t\t$get\t= $arg_get;\n\t\t$select\t= 'SELECT '.$arg_select; \n\t\t$where\t= 'WHERE '.($visible_nonrunners?'':'user_id=\"'.$user_id.'\" AND ').'type=\"'.$type.'\" AND sub_type=\"'.$sub_type.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';//'.(!empty($sub_type) ? ' AND sub_type=\"'.$sub_type.'\"' : '' ).'\n\telseif( $type == 'ignore' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, rating, notes';\n\t\t$where\t= 'WHERE type=\"ignore\" AND user_id=\"'.$user_id.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';//'.(!empty($sub_type) ? ' AND sub_type=\"'.$sub_type.'\"' : '' ).'\n\telse :\n\t\t$get\t= 'get_var';\n\t\t$select\t= 'SELECT id';\n\t\t$where\t= 'WHERE type=\"'.$type.'\" AND user_id=\"'.$user_id.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';//'.(!empty($sub_type) ? ' AND sub_type=\"'.$sub_type.'\"' : '' ).'\n\tendif;\n\n\t# query\n\t$results\t= $wpdb->$get( $select.' FROM ajr_trackmate_lists '.$where );\n\n\t# testing\n\t//echo '<pre>'; print_r($args); echo '</pre>';\n\t//echo $get.' '.$select.' FROM ajr_trackmate_lists '.$where;\n\t//echo '<pre>check_list results:'; print_r($result); echo '</pre>';\n\t\n\t#return\n\treturn ( $results ?: '' );\n}", "title": "" } ]
4d9bbbf3cba6fa1bb4cdc7717913bd37
Determine if the user is authorized to make this request.
[ { "docid": "392040ec403ae875aeef2d2a3d96424a", "score": "0.0", "text": "public function authorize()\n {\n return Auth::check();\n }", "title": "" } ]
[ { "docid": "9fb39029db943b6c00f8b0416336e051", "score": "0.82641774", "text": "public function authorize()\n {\n return $this->session()->has('user');\n }", "title": "" }, { "docid": "31beff90f07fc0d7b251495f888cf277", "score": "0.8246314", "text": "public function authorize()\n {\n\t\treturn $this->user()->isUser();\n }", "title": "" }, { "docid": "0479d42b86e5cc69fe13f40dac477d18", "score": "0.82355934", "text": "public function authorize()\n {\n return ! empty($this->user());\n }", "title": "" }, { "docid": "863c6df1a64b6980d99e321f5f5e2d24", "score": "0.8213121", "text": "public function authorize()\n {\n return !is_null($this->user());\n }", "title": "" }, { "docid": "aafc12ff0512ce2fb4f697c308e5f661", "score": "0.81675667", "text": "public function authorize()\n {\n return $this->getUser()->isYou();\n }", "title": "" }, { "docid": "ec001bd38e23218816604180027e4b42", "score": "0.8145075", "text": "public function authorize()\n {\n return ($this->user = $this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "97ff65f09cf39bf2988dedb9c7c1f6e7", "score": "0.81407666", "text": "public function authorize()\n {\n return $this->user() === null;\n }", "title": "" }, { "docid": "d6ac25c880181d2c548e111a3ac86671", "score": "0.8105579", "text": "public function authorize()\n {\n return (bool)$this->user();\n }", "title": "" }, { "docid": "05590fc9a3eaa9395069921dc992b629", "score": "0.8101211", "text": "public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }", "title": "" }, { "docid": "ca1bdb4f82e7d03f71573e2c1ecd59f3", "score": "0.80493444", "text": "public function isAuthorized()\n {\n if ($this->Auth->user('status') === 'admin') {\n return true;\n } \n if (in_array($this->request->getParam('action'), ['index','logout','login','rps','api'])) {\n return true;\n }\n\n }", "title": "" }, { "docid": "50a1858aaf4be32130881da51a4ba50e", "score": "0.80292636", "text": "public function is_user_authorized() {\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "9e03a611541dce0c22ee584309b77ab3", "score": "0.80142987", "text": "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n return true;\n break;\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n default:\n return false;\n break;\n }\n }", "title": "" }, { "docid": "02a3582aa8830bf5e50a9f6468365620", "score": "0.7986208", "text": "public function isAuthorised()\n {\n if( $this->getLocalHttpClient() instanceof Zend_Oauth_Client ) \n return true;\n \n return false;\n }", "title": "" }, { "docid": "8eb22930c13eab73be9b778a8382478f", "score": "0.797119", "text": "public function authorize()\n {\n $method = strtoupper(request()->method());\n return request()->loggedin_role === ($method === 'PATCH' || $method === 'PUT' ? 1 : 0);\n }", "title": "" }, { "docid": "fca99c69a62646c9993bb1b5cad9f01e", "score": "0.79579306", "text": "public function authorize()\n {\n $statuse = $this->route('statuse');\n\n return $statuse->user_id == auth()->id();\n }", "title": "" }, { "docid": "68cbbf2a944e943c11bb4d48842aef74", "score": "0.7932432", "text": "public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "ef9e3c49b61ee70ff93893a1e68f8cd6", "score": "0.7922112", "text": "public function isAuthorized() {\n if (empty($this->authorizedToken) && empty($this->accessToken)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "935a0da134c0bfa79ad09ddb3e7615c5", "score": "0.78689", "text": "public function authorize()\n {\n return request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "b9e686a9cac988a9a0e707383d1afae8", "score": "0.7867058", "text": "public function isUserAllowed() {\n return $this->requiresAuthorization == false || SessionManager::isUserLoggedIn();\n }", "title": "" }, { "docid": "327cd01f92f76b75d2229e7e8f47fe5e", "score": "0.786551", "text": "public static function userIsAuthorized()\n {\n if (isset($_SESSION['user'])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d89fe5921e4fd9a2f1fd4ee09095a657", "score": "0.78291756", "text": "public function authorize()\n {\n return $this->isMethod('PATCH') ? $this->user() !== null : true;\n }", "title": "" }, { "docid": "4ec73613993002d512777b70d5e26322", "score": "0.78120255", "text": "public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n\n if ($this->isPut()) {\n return false;\n }\n\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('order'));\n }\n\n return true;\n }", "title": "" }, { "docid": "73b7dce2fefe6e6d8604c3fe33ecbddb", "score": "0.78080106", "text": "public function authorized() : bool\n {\n return $this->guard->check() && $this->authorization()->checkImpersonator($this->getImpersonator());\n }", "title": "" }, { "docid": "2743358e871796a5c78deb89fa6ac709", "score": "0.77941877", "text": "public function authorize()\n {\n return request()->session()->has('storefront_key') || request()->session()->has('api_credential');\n }", "title": "" }, { "docid": "e44b62f87dba8a7e1dfb82bc22a4649f", "score": "0.7791976", "text": "public function isAuthorized() {\n\t\treturn $this->authorized;\n\t}", "title": "" }, { "docid": "49cab148f10aad996ebaf915db12267a", "score": "0.7786787", "text": "protected function _isAuthorized()\n {\n return true;\n }", "title": "" }, { "docid": "5e3e481a70f68b7298ec6f10369940d0", "score": "0.77863365", "text": "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7e018dd32eb997c8f95bceb67e866e35", "score": "0.77716076", "text": "public function hasAuthorizedUser()\n {\n return (bool) $this->getSfGuardUser()->getIsAuthorized();\n }", "title": "" }, { "docid": "a0fea693a7831a81b368c3b480b2f21b", "score": "0.77690256", "text": "public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Hit::class);\n }\n\n return $this->user()->can('update', Hit::class);\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.7763308", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "771449ccda0adb0569e1a5079730e8ba", "score": "0.7757949", "text": "public function authorize()\n {\n if ($this->user()->hasRole('admin')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5f91e98a58f6f773245b5ac81143eb4e", "score": "0.77484", "text": "public function isAuthorized()\n {\n return $this->isAuthorized;\n }", "title": "" }, { "docid": "4a6b902d3aee0b742535a85aea0c0b8a", "score": "0.7741106", "text": "public function authorize()\n {\n $trip = $this->route()->parameter('trip');\n\n if ($trip->user_id === Auth::user()->id) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "08d69a0dee566bd1dc0d8e6fb481d1bf", "score": "0.7724704", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }", "title": "" }, { "docid": "08d69a0dee566bd1dc0d8e6fb481d1bf", "score": "0.7724704", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }", "title": "" }, { "docid": "08d69a0dee566bd1dc0d8e6fb481d1bf", "score": "0.7724704", "text": "public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }", "title": "" }, { "docid": "5c528e677793952976076d3dd492467d", "score": "0.77225506", "text": "public function authorize(): bool\n {\n $game = $this->route('game');\n\n return $game->user_id === auth()->id();\n }", "title": "" }, { "docid": "14db1af2b2071d6c2ea1b5e78b1da6a2", "score": "0.7708531", "text": "public function authorize()\n {\n $this->user = $this->user('api');\n\n if ($this->route('job') !== null) {\n return $this->user->can('update', $this->route('job'));\n }\n\n return true;\n }", "title": "" }, { "docid": "b22054a627c56ee2013dbfd1144e23fb", "score": "0.76961654", "text": "public function authorize()\n {\n $user = Auth::user();\n if (1 === $user->user_type_id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "e45cb38000c87c835bc1548b4be9d50b", "score": "0.7695674", "text": "public function authorize()\n {\n $article = Article::find($this->article_id);\n return $this->user()->id == $article->user->id;\n }", "title": "" }, { "docid": "532c6c1036e7cfad132d50317ea265f2", "score": "0.76932836", "text": "function isAuthorized() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7832f71f834c25d9f63805254a90e749", "score": "0.7692503", "text": "function isAuthorized(){\n\t\treturn $this->__permitted($this->name,$this->action);\n\t}", "title": "" }, { "docid": "e4e4812d5edca7c6ea5a3ecbd3fc774a", "score": "0.76909506", "text": "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "title": "" }, { "docid": "eed0ee104e748302648f3eb88bb951d7", "score": "0.76826715", "text": "public function userAuthorized()\n {\n $result = false;\n $user = $this->grav['user'];\n\n if ($user->authorized) {\n $result = $user->authorize('site.editable') || $user->authorize('admin.super') || $user->authorize('admin.pages');\n }\n return $result;\n }", "title": "" }, { "docid": "e48df3a15c8c653e638c72b60bf35dbd", "score": "0.76771003", "text": "public function authorize()\n {\n $authenticated = false;\n if (Auth::check() || Auth::guard('ngo')->check()) {\n $authenticated = true;\n }\n return $authenticated;\n }", "title": "" }, { "docid": "7493ff038140e7ba0f73ea8447c19fc3", "score": "0.76743484", "text": "public function authorize() {\n return auth()->user()->can('user', $this->route('objUser'));\n }", "title": "" }, { "docid": "37976a5e0664f41e34be2e8efe3036aa", "score": "0.7670316", "text": "public function isAuthorized() {\n\t\t$authorized = true;\n\n\t\t// Restrict \"admin\" prefix routes to users with the role \"admin\".\n\t\tif (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {\n\t\t\t$authorized = $this->Auth->user('role') === 'admin';\n\t\t}\n\t\treturn $authorized;\n\t}", "title": "" }, { "docid": "acd39263de7f8581d42809fa4fb0cc78", "score": "0.7648311", "text": "public function authorize()\n {\n $id = $this->route('id');\n $project_environment = ProjectEnvironment::query()->find($id);\n return $project_environment && $project_environment->isUserAuthorized(auth()->user()->id);\n }", "title": "" }, { "docid": "49244cd1f602e42e9958d295c3378652", "score": "0.76471764", "text": "public function authorize(): bool\n {\n if ($this->user()->isAdmin()) {\n return true;\n }\n\n return $this->get('subscribable_type') === 'user' && $this->get('subscribable_id') === $this->user()->id;\n }", "title": "" }, { "docid": "ca5a88163402aefc49609eaa3c705e81", "score": "0.7640693", "text": "public function authorize()\r\n {\r\n\r\n return (!\\Auth::check()) ? false : true;\r\n }", "title": "" }, { "docid": "a5ee51c13ce7b19c27772102a42ca3da", "score": "0.7633139", "text": "public function authorize()\n {\n $contact = Contact::find(request('contact_id'));\n\n if (! $contact) {\n return false;\n }\n\n return $contact->user_id === Auth::user()->id;\n }", "title": "" }, { "docid": "1620e920e650721bba18703186c82201", "score": "0.7625041", "text": "public function authorize()\n {\n $this->userRouteId = $this->route(\"user\");\n return true;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612475", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "dac595333da84dfb8ae02f841a4b3dea", "score": "0.7612475", "text": "public function authorize()\n {\n return auth()->check() == true;\n }", "title": "" }, { "docid": "44441de2b8bb958d7102b43285859291", "score": "0.7610816", "text": "public function authorize()\n {\n return (bool) auth()->user();\n }", "title": "" }, { "docid": "c78e31ee952b9abb7f96de3c25225186", "score": "0.7609951", "text": "public function authorize()\n {\n if (Auth::check()) {\n if (Auth::user()->role_id == 1) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "d8cf48f23bcac99e7a4634f63c1b3826", "score": "0.7608681", "text": "public function authorize()\n {\n // if $user->id != $tweet->id\n // return false\n\n // policies\n return true;\n }", "title": "" }, { "docid": "054563d3bfdafc8d20246eb29d0ee33f", "score": "0.76065665", "text": "public function authorize()\n {\n return $this->user()->can('send application') || $this->user()->can('accept application');\n }", "title": "" }, { "docid": "9a106fe865928acb311133a944e2f523", "score": "0.76035625", "text": "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "title": "" }, { "docid": "e7103b0956700fca99d764e01b6e63e6", "score": "0.7592604", "text": "public function authorize()\n {\n $routePath = explode('/', $this->decodedPath());\n $authorize = false;\n\n switch ($this->method()) {\n case 'POST':\n $authorize = true;\n break;\n case 'PUT':\n $job = Job::find($routePath[2]);\n\n if ($job->user_id == auth()->id()) {\n $authorize = true;\n }\n break;\n }\n\n return $authorize;\n }", "title": "" }, { "docid": "d874e8d00c74a72170175676432fd1f0", "score": "0.75822276", "text": "public function authorize()\n {\n if ($this->path() == 'rgst/custom/add' || $this->path() == 'rgst/custom/edit') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "99318457b951c3326b52b869881516f0", "score": "0.75755775", "text": "public function authorize()\n {\n return (Auth::user() == NULL);\n }", "title": "" }, { "docid": "54c565a6e372b2e0f2bc66fef64e4e67", "score": "0.7573726", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('associate_photos') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4162b13edd3da988db0394dd164b7649", "score": "0.7564263", "text": "public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') || $this->user->hasPermission('manage_pages') ) ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "80f9611cc7474a1a8232bfe2bad2767d", "score": "0.7562698", "text": "public function authorize()\n {\n $user = auth()->user();\n\n return $user->hasRole('employee') || ($user->hasRole('customer') && $user->id == $this->request->get('id'));\n\n }", "title": "" }, { "docid": "5090c03d5e3c1f0545aa32370c0d2c37", "score": "0.7550086", "text": "public function authorize()\n {\n return Auth::user()->id === $this->private_category->owner_id;\n }", "title": "" }, { "docid": "7450b44b718db968f30e3839cf4c0278", "score": "0.7545441", "text": "protected function isAuthorized()\n {\n return true;\n return $this->app->make('antares.acl')->make('antares/api')->can('can-use-api');\n }", "title": "" }, { "docid": "1e5bc4bbb7e375fd2e6207c90646128b", "score": "0.75436807", "text": "public function authorize()\n {\n return Auth::user() ? true : false;\n }", "title": "" }, { "docid": "57012fa7d21a8d6482f4b84293f5743f", "score": "0.7541938", "text": "public function authorize()\n {\n if(! Auth::user()->active)\n return true;\n \n return false;\n }", "title": "" }, { "docid": "9faacb6cf0c3b57abd2336d53e4fc648", "score": "0.75405705", "text": "function isAuthorized()\n {\n $session = true;\n include(GEO_BASE_DIR . 'get_common_vars.php');\n if ($session->getUserId() !== 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "16be1c2e01ca4b01d24569f5268bb3e8", "score": "0.7528504", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_pages') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d7ff45b4a6226d5137f2ee870c0d7519", "score": "0.75248927", "text": "public function authorize()\n {\n if (App::environment('testing')) {\n /* Example, deal with it in a middleware */\n return !Auth::guest() && (Auth::user()->id == $this->route->post->user_id);\n } else {\n return true;\n }\n \n }", "title": "" }, { "docid": "3594daafa944b6c0730db5d3ea25e5d1", "score": "0.7520546", "text": "public function authorize()\n {\n return $this->user()->is_admin;\n }", "title": "" }, { "docid": "a3356463f9788727db560744fe9198e3", "score": "0.7506139", "text": "public function authorize()\n {\n return $this->user()->can(\n 'edit', $this->route('user')\n );\n }", "title": "" }, { "docid": "b8c138dfbf0a96d5b19051c395e3e939", "score": "0.7501601", "text": "public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }", "title": "" }, { "docid": "12ec45746bcaed1634532b2424547923", "score": "0.75000906", "text": "public function authorized()\n {\n return true;\n }", "title": "" }, { "docid": "d32ff1413ce4cacbf2de6ef55ec899ee", "score": "0.74859905", "text": "public function authorize()\n {\n // $user = User::find($this->route('user'));\n\n // return $user && $user->can('update', $user);\n\n return true;\n }", "title": "" }, { "docid": "05a21538b18332e2a1193803e1be39df", "score": "0.74828404", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_seo_booster') ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "ac7a1db84c95a405336f2ae0703ac714", "score": "0.7480357", "text": "public function authorize()\n {\n if($this->method() == 'DELETE' && ($this->route('user') == config('cms.DEFAULT_USER_ID') || auth()->id() == $this->route('user')) )\n return false;\n return true;\n }", "title": "" }, { "docid": "3ae2e4849befde1a04f41438d973326f", "score": "0.74711835", "text": "public function authorize()\n {\n // Set to true we will not do authentication here\n return true;\n }", "title": "" }, { "docid": "e382e69b62fc12f837b5f5aa867c89bb", "score": "0.7471096", "text": "public function isAuthorized() {\n\t\t$role = $this->Auth->user('role');\n\t\tif ($role === 'admin') return true;\n\t\tif (empty($this->_permissions[$this->action])) return false;\n\t\t$perms = $this->_permissions[$this->action];\n\t\tif (is_string($perms)) {\n\t\t\tif ($perms === '*') return true;\n\t\t\treturn (bool) call_user_func(array(&$this, $perms));\n\t\t}\n\t\tif ($role) return in_array($role, $perms);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "60a6050aa49198976abe4cf6aad32bbd", "score": "0.74658936", "text": "public function authorize()\n {\n return $this->user()->type === 'admin';\n }", "title": "" }, { "docid": "a0c263182891c2e6a287e26ed64201f7", "score": "0.74655193", "text": "public function authorize()\n {\n /* request must have auth.id and auth.secret, and they must match our config */\n $auth = $this->post('auth');\n $id = $auth['id'] ?? false;\n $secret = $auth['secret'] ?? false;\n\n return ($id && $secret && $id === config('app.client_id') && $secret === config('app.client_secret'));\n }", "title": "" }, { "docid": "4da31466613c2e9da8bec1e82f21f108", "score": "0.7450424", "text": "abstract protected function _isAuthorized();", "title": "" }, { "docid": "784e4dc5b747a63b7eb02fe96e885f68", "score": "0.7448189", "text": "public function authorize(Request $request)\n {\n return Auth::id() == $request->user_id;\n }", "title": "" }, { "docid": "803eb51e8df89ef3bc81e58be36297f8", "score": "0.74467045", "text": "public function authorize()\n {\n /** @var User|null $user */\n $user = $this->user();\n $isWorkshop = $user->roles()->where('name', User::USER_ROLE_SHOP);\n $isAdmin = $user->roles()->where('name', User::USER_ROLE_ADMIN);\n\n $this->user = $user;\n\n return null !== $user && ($isWorkshop || $isAdmin);\n }", "title": "" }, { "docid": "ee5c25dcb01bf3fb0810d94934968b57", "score": "0.74301696", "text": "public function authorize()\n {\n $user = auth()->user();\n return ($user->hasRole(3)&&$user->hasStatus(3));\n }", "title": "" }, { "docid": "0707b38a55ec6b7b4afe1caae8d23c78", "score": "0.7421741", "text": "public function authorize()\n {\n if(\\Auth::check()) {\n\n /* Check if user has permission */\n if(\\Auth::user()->hasRole('Creating/Designing/Editing/Removing of Forms'))\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "8475169486c92e03cf299d95b2673f70", "score": "0.7415748", "text": "public function authorize()\n {\n return auth()->user()->id ? true : false;\n }", "title": "" }, { "docid": "aec154c99202d5d8ff163aefea8ab474", "score": "0.7415425", "text": "public function authorize()\n {\n if($this->isMethod('get')){\n if(auth()->user()->canIndexPermissions()) return true;\n return false;\n }elseif($this->isMethod('post')){\n if(auth()->user()->canStorePermissions()) return true;\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "ab8c626bc07a5ea7eaae1c4d17fb6e41", "score": "0.74144197", "text": "public function authorize()\n {\n return $this->user()->hasRole('admin');\n }", "title": "" }, { "docid": "6f4551e441e27e01695753b04f3292d0", "score": "0.74024", "text": "public function authorize()\n {\n return Auth::id() && $this->userOwnsWallets();\n }", "title": "" }, { "docid": "67111946b51e489606ae7759398c7326", "score": "0.739976", "text": "public function authorize()\n {\n if(Auth::user()->user_type === 1)\n return true;\n return false;\n }", "title": "" }, { "docid": "cab47d70a82dbc1ccbde6527f927a4e7", "score": "0.7398635", "text": "public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "a5ffedc84c87aa995195bffa59825b64", "score": "0.7398006", "text": "public function authorize()\n {\n return hasPermission('admin.user.permission');\n }", "title": "" }, { "docid": "3c412a98951830835550fbc0685dbb71", "score": "0.73944557", "text": "public function authorize()\n {\n /**\n * Para saber si el usuario que esta haciendo la peticion es un administrador\n */\n return ($this->user()->roles->name === 'SuperUsuario Estatal');\n }", "title": "" }, { "docid": "61ed9cbce2ea309049ee1a5d78bee45a", "score": "0.7384167", "text": "public function authorize()\r\n {\r\n if( ! \\Auth::check() ){\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "3913dc0ea21f5beab08adb110b71cdd9", "score": "0.7380253", "text": "public function authorize()\n {\n \t$applicant = $this->route('applicant');\n \tif(!is_object($applicant)){\n \t\t$applicant=User::find($applicant);\n\t }\n\t if ($applicant){\n \t\treturn $applicant->status==User::STATUS_ON_APPROVAL || $applicant->status==User::STATUS_REJECTED;\n\t }\n return false;\n }", "title": "" }, { "docid": "bca3a815d4acc2513af6f111c6aaacb9", "score": "0.736582", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->getResponse());\n }", "title": "" }, { "docid": "c7b6c1b120f0892042ccc26cb422ee9e", "score": "0.7357182", "text": "public function authorize()\n {\n return Auth::user()->hasRole('superadministrator|administrator|user');\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.735548", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" } ]
f25b0db1ccb95daf541da004683a033f
Gets as description Text description of error.
[ { "docid": "6ea2220043d501427df36dbc55009ffa", "score": "0.0", "text": "public function getDescription()\n {\n return $this->description;\n }", "title": "" } ]
[ { "docid": "5f62441f2f130f2be0738f6d145b1c49", "score": "0.8368376", "text": "public function getErrorDesc() {\n\t\treturn $this->errorDesc;\n\t}", "title": "" }, { "docid": "370ea3a059738f67a0d3e4ed60c3f132", "score": "0.81451356", "text": "public function getDescription()\n {\n\t\t\treturn ($this->error_description)? $this->error_description:'';\n\t\t}", "title": "" }, { "docid": "a1377de343f370e4b31a9e8856d8b1b4", "score": "0.77344495", "text": "public function text_error() {\r\n\t\t\r\n\t\tif($this->title != null) {\r\n\t\t\treturn $this->title.\": \".$this->error;\r\n\t\t}else{\r\n\t\t\treturn $this->error;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5d23869c0e2df489f4c7adc36028fb5c", "score": "0.7512672", "text": "public function getError() : string {\r\n return $this->errormessage;\r\n }", "title": "" }, { "docid": "9cca4d55eea418056446b380400112b0", "score": "0.74938214", "text": "protected function getFailureDescription()\n {\n return 'the page contains '.$this->toString();\n }", "title": "" }, { "docid": "38c48064c0655ed487a908daa89b8bdc", "score": "0.74743193", "text": "public function getMessage()\n {\n return $this->_error;\n }", "title": "" }, { "docid": "69e9f98cbb5d9e662a530a9c1b9e5a1d", "score": "0.74067223", "text": "public function error_message() { return $this->_error['message']; }", "title": "" }, { "docid": "23aa6f039c230208b1430088f6a9ec58", "score": "0.7404739", "text": "public function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "ab8ee690209d0dc9653f295e6ab47986", "score": "0.7365628", "text": "public function getMessage()\n {\n if ($this->isError()) {\n if (!empty($this->data['errordescription'])) {\n return $this->data['errordescription'];\n }\n if (!empty($this->data['errorcode'])) {\n return $this->data['errorcode'];\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "ae385ebc95e4ac55f61b09e0a2c66058", "score": "0.72713995", "text": "function describe() {\n return get_class($this) . \": \\\"\" \n . $this->getMessage() . \"\\\" (status: \"\n . $this->getStatus() . \", error code: \"\n . $this->getErrorCode() . \", reference: \"\n . $this->getReference() . \")\";\n }", "title": "" }, { "docid": "8c8e593bd637c229d341d37c8dfe276a", "score": "0.7226713", "text": "public function get_error_message() {\n\t\treturn $this->error_message;\n\t}", "title": "" }, { "docid": "c05e2e6606bf55bd6bb7c738be405041", "score": "0.7220599", "text": "public function getErrorMessage() {\n $error = $this->getError();\n return $error['error']['message'];\n }", "title": "" }, { "docid": "13bb68a333959a25655fc4b50728d081", "score": "0.7210056", "text": "public function message()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "2be80c84c95d2f34bf4fb9174676b376", "score": "0.7209022", "text": "public function getErrorMsg() {\n return $this->get(self::ERROR_MSG);\n }", "title": "" }, { "docid": "a4e185a40cc534e8451a7d1787bcd8e8", "score": "0.72049576", "text": "public function getDescription(): string\n {\n return $this->message;\n }", "title": "" }, { "docid": "9759736fdde7f48f0fcacead49ff7112", "score": "0.71973366", "text": "public function message()\n {\n return $this->error;\n }", "title": "" }, { "docid": "9759736fdde7f48f0fcacead49ff7112", "score": "0.71973366", "text": "public function message()\n {\n return $this->error;\n }", "title": "" }, { "docid": "ff4a8f78bf0f2607ac2265875f8b9781", "score": "0.71862936", "text": "public function errorMessage()\n {\n return $this->operation['error']['message'] ?? null;\n }", "title": "" }, { "docid": "34e8d4029624942921c09788067d8c86", "score": "0.7183678", "text": "public function getErrorString()\n\t{\n\t\treturn $this->error_string;\n\t}", "title": "" }, { "docid": "35d3d6b8f9dc1e610a7033fb38ff363d", "score": "0.71617365", "text": "public function errorMsg() {\n return $this->command_output[0];\n }", "title": "" }, { "docid": "c14b8481babd642f5061e48c894725f4", "score": "0.71448636", "text": "public function getError()\n {\n return $this->errMsg;\n }", "title": "" }, { "docid": "f464afc631a9b2d9f264a93b706720b1", "score": "0.71363795", "text": "public function getDescription()\n {\n return $this->message;\n }", "title": "" }, { "docid": "0f5b4b0a57326a06e8077928c64daa94", "score": "0.71243995", "text": "public function error() : string\n {\n return !empty($this->error_msg) ? $this->error_msg : '' ;\n }", "title": "" }, { "docid": "7dcf132725cdb1ad0f93795ae85a2a92", "score": "0.7112695", "text": "public static function _desc() { return 'Provides a graphical wrapper for Errors and Exceptions'; }", "title": "" }, { "docid": "346a0f02a326156568e9d7fc7c5a9d82", "score": "0.71103555", "text": "public function getErrorMessage(): string {\n return $this->message;\n }", "title": "" }, { "docid": "39983492a115c0e253cdf6a82ba765e2", "score": "0.7109234", "text": "public function getError() :string\n {\n return $this->error;\n }", "title": "" }, { "docid": "4b7c13f53c880ae3be7dac32a94526c9", "score": "0.7101948", "text": "public function GetErrorMessage()\n {\n return $this->error_string;\n }", "title": "" }, { "docid": "dfbcd21418352efb86e586267df03043", "score": "0.70987654", "text": "public function getErrorString()\n {\n $errors = $this -> getErrors();\n return !empty($errors) ? implode('', $errors) : '';\n }", "title": "" }, { "docid": "a38df858ddaa517f96cc5df1800caeb1", "score": "0.7084696", "text": "public function getErrorMessage()\n {\n return $this->errorInfo[2];\n }", "title": "" }, { "docid": "ff3ae68212484bc434875a37976bed28", "score": "0.70846945", "text": "public function getErrorString()\n {\n return $this->hasErrors ? implode(', ', ArrayHelper::getColumn($this->errors, 'message')) : '';\n }", "title": "" }, { "docid": "0ee3eb5daaf81ecc83b0982250905e5e", "score": "0.7070229", "text": "public function errorMessage()\n {\n return '<strong>' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . \"</strong><br />\\n\";\n }", "title": "" }, { "docid": "f2fabe0b343f3f342fbaab9872faa8ac", "score": "0.7063558", "text": "public function getErrorMessage()\n {\n $content = json_decode($this->response['content'], true);\n\n //Check if an error message is availbale.\n if((isset($content['error']) === true) && (isset($content['message']) === true)) {\n return $content['error'].': '.$content['message'];\n }\n\n //Return an empty string.\n return print_r($content,true) . \"*\";\n }", "title": "" }, { "docid": "1ec79b99eed90acf8608b36d8dd653e3", "score": "0.70555854", "text": "public function message()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "1ec79b99eed90acf8608b36d8dd653e3", "score": "0.70555854", "text": "public function message()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "19faea41ec1fa582749001e21b94e1cf", "score": "0.7049367", "text": "public function getErrorString()\r\n {\r\n $string = \"\";\r\n\r\n foreach($this->error AS $error)\r\n {\r\n $string .= $error . \"\\n\";\r\n }\r\n\r\n return $string;\r\n }", "title": "" }, { "docid": "fa35f749ffaea7ba9d3bfb6a52dffa6a", "score": "0.70197135", "text": "public function html_error() {\r\n\t\t\r\n\t\tif($this->title != null) {\r\n\t\t\treturn \"<b>\".$this->title.\":</b> \".$this->error;\r\n\t\t}else{\r\n\t\t\treturn \"<b>Error:</b> \".$this->error;\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c9730162941758810008038e3306e442", "score": "0.700436", "text": "public function getErrorDetails(): string\n {\n return $this->getMessage();\n }", "title": "" }, { "docid": "3820d3e5b43ef689ac86c11864542971", "score": "0.6994359", "text": "public function getErrorMessage()\n {\n if ($this->getSuccess()) {\n return '';\n }\n\n return trim($this->xml->StatusCode . ' ' . $this->xml->Status . ' ' . $this->xml->Reason);\n }", "title": "" }, { "docid": "5157d01b7874a80d097f2e05a96fbd9a", "score": "0.6978252", "text": "public function error(): string\n {\n return $this->error ?? '';\n }", "title": "" }, { "docid": "c038bf79972c7d23d699432974d0a998", "score": "0.69512796", "text": "public function errorMessage()\n {\n $errorMsg = '<strong>' . $this->getMessage() . \"</strong><br />\\n\";\n return $errorMsg;\n }", "title": "" }, { "docid": "2fbce20a831eb4066036cba3027caa95", "score": "0.69478756", "text": "public function getError(): string;", "title": "" }, { "docid": "16651abef6728de62baff3ade72bbdd8", "score": "0.6939883", "text": "public function getErrorMessage()\n {\n if(isset($this->get_vars['error'])) {\n return 'An error occured. Please try again';\n }\n \n return '';\n }", "title": "" }, { "docid": "1052de13c8ed8dc36b7d57e764539ca1", "score": "0.6938928", "text": "public function message(): string\n {\n return $this->failure;\n }", "title": "" }, { "docid": "98ddcd134ebd45d6c815f9931666d87a", "score": "0.6930323", "text": "protected function _getErrorMessage()\n {\n //get failed rules for the resource\n $rules = $this->getResource()->getAccessRule()->getFailedRules();\n $message = '';\n foreach ($rules as $rule) {\n if (!$rule->isAutoBuiltRule()) {\n $message .= __($rule->getTranslationKey()) . ' ';\n }\n }\n $message = rtrim($message);\n return $message;\n }", "title": "" }, { "docid": "a32a0e9a57908360d12a6e4dcf254d90", "score": "0.6910928", "text": "public function message()\n {\n return $this->fail_message;\n }", "title": "" }, { "docid": "1a32ac2592d39b571fa8c67f6e928720", "score": "0.69052714", "text": "public function getErrorDescription(){\n return mysql_error();\n }", "title": "" }, { "docid": "14d9717304d11362cbdb8b139d1c489c", "score": "0.690466", "text": "public function getError(): string\n {\n return $this->lastError ?? '';\n }", "title": "" }, { "docid": "e03a3dbe535e42b9a05cd139baf37d8f", "score": "0.68966955", "text": "public function message()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "230ca862d39ce7e3a83d5ad7c1a2a442", "score": "0.6893097", "text": "public function getMessageError()\n {\n return $this->msgError;\n }", "title": "" }, { "docid": "e0e897c23c623505d200b1a7a10ca0cf", "score": "0.6874268", "text": "function getDescription(){\n\t\t/*** #pass */\n\t\treturn Message::_n($this->description());\n\t}", "title": "" }, { "docid": "3a75fd99c7bf752e87443cdac9a441f0", "score": "0.6863585", "text": "public function message()\n {\n return 'label or directive error';\n }", "title": "" }, { "docid": "c0fc4173847421ed2c9e1075096be432", "score": "0.6854869", "text": "public function getMessage()\n {\n return isset($this->data['errormessage']) ? $this->data['errormessage'] : null;\n }", "title": "" }, { "docid": "338f10ac8252a9c732d6e85c8accff41", "score": "0.68348473", "text": "public function getFailureMessage() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"failure_message\");\n\t}", "title": "" }, { "docid": "84af76ad6fd976a8ea8fdee8038edb87", "score": "0.68143916", "text": "public function getDescription() {\n if (empty($this->description)) {\n return $this->code;\n }\n return $this->description;\n }", "title": "" }, { "docid": "26153674227fbd288c43c56f19d0ab9f", "score": "0.68134224", "text": "public function message() {\n\t\treturn $this->smError;\n\t}", "title": "" }, { "docid": "8b22a12c968b0f07a2f8042fe20cc9c2", "score": "0.6811645", "text": "public function getError()\n {\n return $this->get('error', '');\n }", "title": "" }, { "docid": "034f2d404d4c98720d725b1307e078e4", "score": "0.6808419", "text": "public function getError()\n {\n $strReturn = null;\n if (isset($this->arrResponse['error']['message'])) {\n $strReturn = $this->arrResponse['error']['message'];\n }\n return $strReturn;\n }", "title": "" }, { "docid": "499ea292aa7ca1f7869b1a7b0cc667ea", "score": "0.6800794", "text": "public function getFullMessage()\n {\n\t\t\t$error_message = sprintf(\n\t\t\t\t\"Error with message '%s (Description: %s)' in file '%s' on line %d\",\n\t\t\t\tparent::getMessage(),\n $this->getDescription(),\n $this->getFilename(),\n $this->getLineNumber()\n\t\t\t);\n\t\t\treturn $error_message;\n\t\t}", "title": "" }, { "docid": "165914f9e5d0be14ee920ba78685769d", "score": "0.6798947", "text": "public function toString()\n {\n $error = $this->result->getFirstError();\n\n return 'Invalid JsonApi. Error: '.$error->keyword().PHP_EOL;\n }", "title": "" }, { "docid": "0a2aa20a89d21d92a02bf1d029a7a28e", "score": "0.679598", "text": "public function getError() {\n return $this->get(self::ERROR);\n }", "title": "" }, { "docid": "0a2aa20a89d21d92a02bf1d029a7a28e", "score": "0.679598", "text": "public function getError() {\n return $this->get(self::ERROR);\n }", "title": "" }, { "docid": "7e7d6f5f3a0e71b1f5f47401d1147618", "score": "0.67953146", "text": "public function errorMessage()\n\t{\n\t\treturn $this->_errmsg;\n\t}", "title": "" }, { "docid": "fb9e98fec3dcfd5cc12d4cda6485e0b3", "score": "0.6788874", "text": "function get_error_message_str ()\r\n {\r\n return $this->error_message_str;\r\n }", "title": "" }, { "docid": "27eb7029798f3b36de74b3590fa4a8e1", "score": "0.67857504", "text": "public function getDescription(): string\n {\n return (string) $this->description;\n }", "title": "" }, { "docid": "dc5e15c587b8efa71a8925de43b11309", "score": "0.6782834", "text": "public function getError() {\n return $this->root->getAttribute('message');\n }", "title": "" }, { "docid": "aab19d41f333d082422e4768b41605d5", "score": "0.67824614", "text": "function getErrorMessage() {\n return $this->error_message;\n }", "title": "" }, { "docid": "20e098d4fbd8723a0e81d8b992650396", "score": "0.6780535", "text": "public function getDescription()\n {\n $value = $this->get(self::description);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "c9b14ad065b985e7a9f3d8e76ce713d3", "score": "0.6777792", "text": "public function errorMsg(){\n $errorMsg = $this->pdoStatement->errorInfo();\n return $errorMsg[2];\n }", "title": "" }, { "docid": "a4f6f6b71312db253c660be6f768d692", "score": "0.677517", "text": "public static function getDescription() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.67602", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.67602", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.67602", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.67602", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.67602", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.67602", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "35a07caa917cce6df8307f45c2dda055", "score": "0.675228", "text": "public function getErrorMessage()\n {\n return $this->error;\n }", "title": "" }, { "docid": "9f233d233e885135870a6503d733c154", "score": "0.67455596", "text": "public function __toString(): string\n {\n return 'ERROR TYPE: ' . $this->type . '. DESCRIPTION TEST: ' . $this->description;\n }", "title": "" }, { "docid": "d3489a32d965dfd1c0dde1d068067c7d", "score": "0.6727811", "text": "public function getErrorMessage()\n \t{\n \t\treturn $this->error;\n \t}", "title": "" }, { "docid": "1b91538cd721f5fadcd7a47c27726c5b", "score": "0.67225397", "text": "function getMessage()\n {\n return ($this->error_message_prefix . $this->message);\n }", "title": "" }, { "docid": "db4a1db166de5b05996ec69d1f819e39", "score": "0.66910374", "text": "public function getDescription() {\n return $this->get(self::DESCRIPTION);\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.6687775", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.6687775", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "7be890f53f4c0fff27427499b7f41a02", "score": "0.6687602", "text": "public function getDescription()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "722c5fad116f69917af4abb15730515c", "score": "0.6678807", "text": "protected function getJsonErrorDescription() {\n\t\t$error = '';\n\t\tswitch (json_last_error()) {\n\t\t\tcase JSON_ERROR_NONE:\n\t\t\t\t$error = 'No errors';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_DEPTH:\n\t\t\t\t$error = 'Maximum stack depth exceeded';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_STATE_MISMATCH:\n\t\t\t\t$error = 'Underflow or the modes mismatch';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\t\t$error = 'Unexpected control character found';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_SYNTAX:\n\t\t\t\t$error = 'Syntax error, malformed JSON';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_UTF8:\n\t\t\t\t$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$error = 'Unknown error';\n\t\t\tbreak;\n\t\t}\n\t\treturn $error;\n\t}", "title": "" }, { "docid": "16437168041ea06be954e453c2b981dd", "score": "0.6677953", "text": "public function getFormattedErrorInfo()\n\t{\n\t\t$query = $this->getQuery();\n\t\t$error = $this->errorInfo();\n\n\t\t// Check the error code\n\t\tif ($error[0] === '00000') {\n\t\t\treturn 'No errors occured';\n\t\t}\n\n\t\t// Append error code\n\t\t$errorMessage = '<strong>Error code ' . $error[0] . ':</strong><pre> ' . $error[2] . '</pre>';\n\n\t\t// Append query\n\t\t$errorMessage .= '<strong>Executed query:</strong><pre>' . $query . '</pre>';\n\n\t\t// Append possible solution, check missing \",\"\n\t\tpreg_match_all('/at line (?P<lineNumber>\\d+)/', $error[2], $aMatches);\n\t\tif (isset($aMatches['lineNumber'])) {\n\t\t\t$lineInfo = array_slice(explode(PHP_EOL, $query), 4, 1);\n\t\t\t$lineProblem = array_pop($lineInfo);\n\n\t\t\t// Check if we are missing a \",\"\n\t\t\tif (strrchr($errorMessage, ',') !== strlen($lineProblem)) {\n\t\t\t\t$errorMessage .= '<strong>Possible solution:</strong><pre>Add a \",\" at the end of line: \"' . trim($lineProblem) . '\"</pre>';\n\t\t\t} else {\n\t\t\t\t$errorMessage .= '<strong>The error should exists in this line:</strong><pre>' . $query . '</pre>';\n\t\t\t}\n\t\t}\n\n\t\treturn $errorMessage;\n\t}", "title": "" }, { "docid": "bf52cdd35845e61b8a7cc045db74fbc8", "score": "0.66752404", "text": "public function failureMessage($description);", "title": "" }, { "docid": "a7b57002527397f2fc47619f9c63d46f", "score": "0.6673295", "text": "public function getDescription() : string\n {\n return (string) $this->getField('Description');\n }", "title": "" }, { "docid": "e850fda4a5106cd9d2f176810aafbf42", "score": "0.66652346", "text": "public function getMessage()\n {\n return rtText::get('valgrindNotAvailable');\n }", "title": "" }, { "docid": "bc56f799e5515cedc33cd8fda314b54d", "score": "0.66595834", "text": "public function getError(): ?string\n {\n if ($e = $this->getException()) {\n return $e->getMessage();\n }\n\n return \"The item [{$this->class}] is not a valid task\";\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "e87f3d0785ed2fe6f46fe4276adde811", "score": "0.66583306", "text": "public function getDescription(): string\n {\n return $this->description;\n }", "title": "" }, { "docid": "5207a884ac7f504042ff5eaf88e7aecc", "score": "0.6650241", "text": "public function getDescription()\n {\n return '';\n }", "title": "" }, { "docid": "5207a884ac7f504042ff5eaf88e7aecc", "score": "0.6650241", "text": "public function getDescription()\n {\n return '';\n }", "title": "" }, { "docid": "b44453cc06355a829fb3c9297181b17a", "score": "0.6649932", "text": "static public function error() {\n\t\t$ar = self::$db->errorInfo();\n\t\treturn $ar[2] . ' (' . $ar[1] . '/' . $ar[0] . ')';\n\t}", "title": "" } ]
fbdbdab7706aa244ead79e839624452a
// relationship between todos and items
[ { "docid": "305be780a868f714e63fe0858f1a3d33", "score": "0.5846517", "text": "public function items()\n {\n return $this->hasMany('App\\Item');\n }", "title": "" } ]
[ { "docid": "4a70c65a043004c38014d6495ca33682", "score": "0.68108135", "text": "public function todos()\n {\n return $this->hasMany('App\\Models\\Todo');\n }", "title": "" }, { "docid": "7ecab6fefaa5b5a81e9003497f9471b7", "score": "0.67878985", "text": "public function todos()\n {\n return $this->hasMany('App\\Todo');\n }", "title": "" }, { "docid": "d0fe2cb13bf0f53a630df49c4509fbbe", "score": "0.66327155", "text": "public function todos()\n {\n return $this->hasMany(Todo::class);\n }", "title": "" }, { "docid": "9b68a2d3783afd1389937ae3164f0b55", "score": "0.65953755", "text": "public function todos()\n {\n return $this->hasMany(Todo::class, 'todolist_id', 'id');\n }", "title": "" }, { "docid": "0e09fb099e58f735d4a516e667842121", "score": "0.6451311", "text": "public function todo()\n {\n return $this->hasMany('App\\Models\\Security\\Todo', 'user_id');\n }", "title": "" }, { "docid": "ac7f8456e769d5f3626e235647617961", "score": "0.6431436", "text": "public function todo() {\n return $this->hasMany('App\\ProjectTodo');\n }", "title": "" }, { "docid": "80c3567646a374758a3c8ff8dde05b74", "score": "0.621157", "text": "public function todo()\n {\n return $this->belongsTo('App\\Todo');\n }", "title": "" }, { "docid": "d96a879cf9c1095965b9602e321d49e5", "score": "0.61120164", "text": "public function items()\n {\n \treturn $this->hasMany('App\\Item');\n }", "title": "" }, { "docid": "b6e017e8742e4e4c8f3e677532ab60de", "score": "0.6076279", "text": "public function testTodoItem()\n {\n $this->app['session']->set('user', [\n 'id' => 1,\n 'username' => 'user1',\n 'password' => 'user1',\n ]);\n\n $todo = [\n 'id' => 123,\n 'description' => 'mock todo description',\n 'completed' => '1',\n ];\n\n $db = $this->mockDb(['fetchAssoc']);\n\n $db->expects($this->any())\n ->method('fetchAssoc')\n ->with(\"SELECT id, description, completed FROM todos WHERE id = ?\", [\n 123,\n ])\n ->willReturn($todo);\n $this->app['db'] = $db;\n\n $client = $this->createClient();\n $crawler = $client->request('GET', '/api/v1/todo/123', [], [], ['CONTENT_TYPE' => 'application/json']);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertEquals('{\"success\":true,\"todo\":{\"id\":123,\"description\":\"mock todo description\",\"completed\":\"1\"}}', $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "5fe66ffc5f1becb00cf29fd53f5342b6", "score": "0.59959406", "text": "public function items()\n {\n \treturn $this->hasMany('Item');\n }", "title": "" }, { "docid": "3b9c154b3a6d0da4d9941e1392dc7e1d", "score": "0.59287643", "text": "public function items(){\n //we're connecting it to the newitem model\n //note one to may uses 'hasMany'. One to one uses 'hasOne'\n return $this->hasMany('App\\Newitem');\n }", "title": "" }, { "docid": "6f6da856f590257ebd43fabb2a0f982c", "score": "0.5926159", "text": "public function items()\n {\n return $this->hasMany('App\\Models\\Access\\item');\n }", "title": "" }, { "docid": "453707da7a233122e1ce3f91ddbfb011", "score": "0.5921219", "text": "public function items(){\n return $this->hasMany('App\\Item');\n }", "title": "" }, { "docid": "0c60dae82f0d0cfcf15b05692c2a765b", "score": "0.59031963", "text": "public function todos(){\n return $this->all();\n }", "title": "" }, { "docid": "40cd72fc78d9109cfe1b05ee98e0e5ad", "score": "0.59018207", "text": "public function item()\n {\n return $this->belongsTo(Item::class);\n }", "title": "" }, { "docid": "2d9444c28d7a67bce41b849595c58a9c", "score": "0.58087444", "text": "public function items(){\n return $this->hasMany('Item','no');\n }", "title": "" }, { "docid": "d88768a79e8270a36ecb61c49bb1796a", "score": "0.58060825", "text": "public function todos(){\n $lista = item::select(\"id\",\"nombre\",\"precio\")->get();\n return ['data' => $lista];\n }", "title": "" }, { "docid": "f7013f0309e01bb7fbe539e2b38359a2", "score": "0.5799104", "text": "public function item() \n {\n return $this->belongsTo('App\\Models\\Item\\Item');\n }", "title": "" }, { "docid": "788d278c5f019cefd31803eb1991435a", "score": "0.5794537", "text": "public function items()\n {\n return $this->hasMany('App\\Models\\Item');\n }", "title": "" }, { "docid": "4fc623330862f8351d82998ddef2800b", "score": "0.57677907", "text": "public function item()\n {\n return $this->belongsTo('App\\Models\\Item', 'id_parent');\n\t}", "title": "" }, { "docid": "6447c6f28486ad6d65b82d255981142b", "score": "0.5765491", "text": "public function item() {\n return $this->belongsTo('App\\Item');\n }", "title": "" }, { "docid": "2f9b70f6956ea7b47037c52e1f858b3d", "score": "0.5725856", "text": "public function itemfodas()\n {\n return $this->hasMany('App\\Itemfoda');\n }", "title": "" }, { "docid": "5ad7f40e28b05264e53fc60903107687", "score": "0.5695152", "text": "public function item()\n {\n return $this->belongsTo(Item::class, 'item_id');\n }", "title": "" }, { "docid": "f98cbd7f1ca120b13d7818361de5c6b2", "score": "0.5678163", "text": "public function item()\n\t{\n\t\treturn $this->belongsTo('Item');\n\t}", "title": "" }, { "docid": "607fc6d09a80d0bf642de402f526be5d", "score": "0.565402", "text": "public function items() {\n\t\treturn $this->hasMany(Item);\n\t}", "title": "" }, { "docid": "c46fb0098299e44d6b8692e55bd4dcb9", "score": "0.56474006", "text": "public function items()\n\t{\n\t\treturn $this->hasMany('Item');\n\t}", "title": "" }, { "docid": "f02175fa3960d14cd8620b8cbead3b3a", "score": "0.5634289", "text": "public function items()\n {\n return $this->hasMany('App\\OrderItem');\n }", "title": "" }, { "docid": "4c78d6141668c49ab7ec79741c359491", "score": "0.56236225", "text": "public function testOrderOrderItemOneToMany()\n\t{\n\t\t$order = Order::create(array(\n\t\t\t'id' => 5,\n\t\t\t'user_id' => 8\n\t\t));\n\t\t$orderItem = new OrderItem(array('id' => 20));\n\n\t\t$order->items()->insert($orderItem);\n\n\t\t$orderItem = OrderItem::find(20);\n\t\t$this->assertEquals($order->id, $orderItem->order_id);\n\n\t\t$orderItem = Order::find(5)->items()->first();\n\t\t$this->assertEquals($order->id, $orderItem->order_id);\n\n\t\t$order = OrderItem::find(20)->order()->first();\n\t\t$this->assertEquals(8, $order->user_id);\n\t}", "title": "" }, { "docid": "d86bd1b989e0346b712751c1d9b75792", "score": "0.5562278", "text": "public function items() {\n return $this->belongsToMany('App\\Item', 'invoice_items', 'invoice_id', 'item_id');\n }", "title": "" }, { "docid": "3bb8915b4cc3b4e6f2e74f17889c1e14", "score": "0.54866177", "text": "public function getTodo()\n {\n return $this->todo;\n }", "title": "" }, { "docid": "64aab04d598782a22d4ad90787d7a16c", "score": "0.54419345", "text": "public function items(){\n return $this->hasMany('Sales\\Quote\\Models\\QuoteItem');\n }", "title": "" }, { "docid": "916e65fd4ed763f400231a931ae410ec", "score": "0.54104877", "text": "public function Item()\n {\n return $this->belongsToMany('junecity\\shop\\models\\Item');\n }", "title": "" }, { "docid": "d3ffe8bfb47e41c644f5ab505c2535f3", "score": "0.5399813", "text": "protected function item() {\n return $this->belongsTo('App\\Model\\Item');\n }", "title": "" }, { "docid": "50fb056347133b91cda96362ad368fa7", "score": "0.5396898", "text": "public function show(Todos $todos)\n {\n //\n }", "title": "" }, { "docid": "b4b647b35fc3238e751ad817bfda837e", "score": "0.53847873", "text": "public function items()\n {\n return $this->hasMany(OrderItemDetails::class, 'order_id', 'id');\n }", "title": "" }, { "docid": "0d7b9ded943e09a1cbefb395a38d113f", "score": "0.5345151", "text": "public static function getListsWithTodos()\n {\n session_start();\n\n // Check if auth session is available\n if (isset($_SESSION[\"id\"])) {\n\n // Join \"lists\" and \"todos\" table, create list containing list_name, list_id, (todo) id, created_by, title, description, status, created_at\n $data = self::query('SELECT lists.NAME AS list_name, lists.id AS list_id, todos.id, todos.created_by, todos.title, todos.description, todos.status, todos.created_at FROM lists LEFT JOIN todos ON lists.id = todos.list_id WHERE lists.created_by = ? ', array($_SESSION[\"id\"]));\n\n // Reduce above mentioned data and order them by list. Create one object for each list, with all todos associated to said list as children.\n $reduced_data = array_reduce($data, function ($acc, $curr) {\n $list_id = $curr[\"list_id\"];\n $list_name = $curr[\"list_name\"];\n\n unset($curr[\"list_id\"]);\n unset($curr[\"list_name\"]);\n\n $acc[$list_id][\"name\"] = $list_name;\n if (isset($curr[\"id\"])) {\n $acc[$list_id][\"todos\"][] = $curr;\n }\n\n return $acc;\n }, []);\n\n return $reduced_data;\n } else {\n echo \"No user logged in\";\n }\n }", "title": "" }, { "docid": "5422fdc2fcf6cf8d920509e1d08ca7a2", "score": "0.53217727", "text": "public function createAction()\n {\n\t $todo = new TodoItem();\n\t $todo->title = $this->_params['title'];\n\t $todo->description = $this->_params['description'];\n\t $todo->due_date = $this->_params['due_date'];\n\t $todo->is_done = 'false';\n\t \n\t //pass the user's username and password to authenticate the user\n\t $todo->save($this->_params['username'], $this->_params['userpass']);\n\t \n\t //return the todo item in array format\n\t return $todo->toArray();\n }", "title": "" }, { "docid": "e92c0618f0bf679826fa2dd93094cc7e", "score": "0.5320402", "text": "public function print_todo() {\n\t\t\tforeach ($this->todo as $id => $item) {\n\t\t\t\techo \"<li>\" . $item . PHP_EOL .\n\t\t\t\t\t \"<br /><a href=\\\"actions/chart.php?project=\" . $this->name . \"&act=del_todo&id=\" . $id . \"\\\"><input type=\\\"button\\\" class=\\\"button-delete\\\" /></a> <a href=\\\"actions/chart.php?project=\" . $this->name . \"&act=todo_to_doing&id=\" . $id . \"\\\"><input type=\\\"button\\\" class=\\\"button-next\\\" /></a></li>\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "23737afa0896fd8e663d5f006c924cc2", "score": "0.53175646", "text": "public function todos($id = null)\n {\n $deal = $this->deal->findOrFail($id);\n $todos = new TodosResource($deal->todos()->with(['agent:id,username,name'])->orderBy('id', 'desc')->paginate(50));\n return response($todos, Response::HTTP_OK);\n }", "title": "" }, { "docid": "3f0a8d1d4c41d3c8bb1dd9946681c968", "score": "0.5311732", "text": "public function order_item()\n {\n //Redireccion\n return $this->hasOne('App\\OrderItem');\n }", "title": "" }, { "docid": "11fd091c3a45a5ab55cd4d13e3dbad5f", "score": "0.5272882", "text": "public function test_can_create_todo() {\n $data = [\n 'title' => $this->faker->sentence,\n ];\n $this->post(route('todos.store'), $data)\n ->assertStatus(201);\n }", "title": "" }, { "docid": "e45b9eabcc324d0459266b50e55ed105", "score": "0.5257306", "text": "public function order_item()\n { \n return $this->hasMany('App\\Model\\OrderItem');\n }", "title": "" }, { "docid": "7cad4a145b0fba6886a4542f01f8aa67", "score": "0.5253484", "text": "public function todos($id = null)\n {\n $indexing = $this->indexing->findOrFail($id);\n $todos = new TodosResource($indexing->todos()->with(['agent:id,username,name'])->orderBy('id', 'desc')->paginate(50));\n return response($todos, Response::HTTP_OK);\n }", "title": "" }, { "docid": "089a8fa2b80603033f3215b900ff0bf2", "score": "0.5251132", "text": "public function getItems()\n {\n return $this->hasMany(Item::className(), ['item_id' => 'item_id'])->viaTable('cos_item', ['cos_id' => 'cos_id']);\n }", "title": "" }, { "docid": "8ea01b4639be4256b17b1f5a2cda261e", "score": "0.5237535", "text": "public function items()\n {\n \treturn $this->hasMany(Item::class, 'vendor_id');\n }", "title": "" }, { "docid": "23dabf2111d551bf4f47ad95ce14ec15", "score": "0.5230548", "text": "public function orderItems(){\n return $this->hasMany(ItemOrder::class);\n }", "title": "" }, { "docid": "d5b2e070bd2aeb627acd0a9254e5985b", "score": "0.52190965", "text": "public function testGetTodoTask(): void\n {\n $response = $this->request('GET', $this->findOneIriBy(TodoTask::class, ['description' => 'Develop TODO test']));\n $json = json_decode($response->getContent(), true);\n\n //assert there is a valid reply\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('application/ld+json; charset=utf-8', $response->headers->get('Content-Type'));\n\n //assert that description of the returned JSON object is correct\n $this->assertEquals('Develop TODO test', $json['description']);\n\n //assert that the returned task is properly serialized\n $this->assertArrayHasKey('@id', $json);\n $this->assertArrayHasKey('@type', $json);\n $this->assertArrayHasKey('@context', $json);\n $this->assertArrayHasKey('id', $json);\n $this->assertArrayHasKey('state', $json);\n $this->assertArrayHasKey('description', $json);\n $this->assertArrayHasKey('createDate', $json);\n $this->assertArrayHasKey('list', $json);\n }", "title": "" }, { "docid": "fb472f32d7dac54dad413c3b844c0f79", "score": "0.52032095", "text": "function testToDo() {\n// $this->todo('factory to create new');\n }", "title": "" }, { "docid": "070fdb03dd666d57e88584ce59095baf", "score": "0.51949", "text": "public function orderItem()\n {\n return $this->hasMany('App\\OrderItem', 'orderid', 'id' );\n }", "title": "" }, { "docid": "4840fc27e2ba86a1bc4a5e8a36d16252", "score": "0.51584846", "text": "public function testTodoList()\n {\n $this->app['session']->set('user', [\n 'id' => 1,\n 'username' => 'user1',\n 'password' => 'user1',\n ]);\n\n $todos = [\n [\n 'id' => 123,\n 'description' => 'mock todo description',\n 'completed' => '1',\n ],\n ];\n\n $db = $this->mockDb(['fetchAll']);\n $db->expects($this->any())\n ->method('fetchAll')\n ->with(\"SELECT id, description, completed FROM todos WHERE user_id = ?\", [\n 1,\n ])\n ->willReturn($todos);\n $this->app['db'] = $db;\n\n $client = $this->createClient();\n $crawler = $client->request('GET', '/api/v1/todo', [], [], ['CONTENT_TYPE' => 'application/json']);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertEquals('{\"success\":true,\"todos\":[{\"id\":123,\"description\":\"mock todo description\",\"completed\":\"1\"}]}', $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "8ef9a2609c6b5f88f98c01f966c1bc59", "score": "0.51536524", "text": "public function listTodo(){\n\n /**Store user's todo in $todos */\n $todos = auth()->user()->todos;\n\n return view('admin.listTodo')\n ->with('todos', $todos); \n }", "title": "" }, { "docid": "19c3718d71b20ce06401ce524a85bbde", "score": "0.5144039", "text": "public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todo($todo){\n $userid = \\SYSTEM\\SECURITY\\security::getUser()->id;\n $vars = \\SYSTEM\\SQL\\SYS_SAIMOD_TODO_TODO::Q1(array($todo,$userid));\n $vars['trace'] = implode('</br>', array_slice(explode('#', $vars['trace']), 1, -1));\n $vars['display_assign'] = $vars['assignee_id'] != $userid ? '' : 'display: none;';\n $vars['display_deassign'] = $vars['assignee_id'] == $userid ? '' : 'display: none;';\n $vars['assignees'] = '';\n $res = \\SYSTEM\\SQL\\SYS_SAIMOD_TODO_ASSIGNEES::QQ(array($todo,$userid));\n while($row = $res->next()){\n $vars['assignees'] .= \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl'))->SERVERPATH(), $row);\n }\n $vars = array_merge($vars,\\SYSTEM\\PAGE\\text::tag(\\SYSTEM\\SQL\\system_text::TAG_SAI_TODO));\n return $vars[\\SYSTEM\\SQL\\system_todo::FIELD_TYPE] == \\SYSTEM\\SQL\\system_todo::FIELD_TYPE_USER ?\n \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl'))->SERVERPATH(), $vars) :\n \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl'))->SERVERPATH(), $vars);}", "title": "" }, { "docid": "e449ba36f8a38d029d03acb69e406f8f", "score": "0.5136388", "text": "public function delete(){\n\t\t$todoItems = TodoItem::model()->findAllByAttributes(['list_id' => $this->id]);\n\t\tforeach ($todoItems as $ti) {\n\t\t\t$tu->delete();\n\t\t}\n\t\tNotification::remove('Todo', $this->id);\n\t\treturn parent::delete();\n\t}", "title": "" }, { "docid": "593a7519a782955c1123d7dc14ade830", "score": "0.5130684", "text": "static function item_deleted($item) {\r\n $existingFaces = ORM::factory(\"items_face\")\r\n ->where(\"item_id\", \"=\", $item->id)\r\n ->find_all();\r\n if (count($existingFaces) > 0) {\r\n db::build()->delete(\"items_faces\")->where(\"item_id\", \"=\", $item->id)->execute();\r\n }\r\n\r\n $existingNotes = ORM::factory(\"items_note\")\r\n ->where(\"item_id\", \"=\", $item->id)\r\n ->find_all();\r\n if (count($existingNotes) > 0) {\r\n db::build()->delete(\"items_notes\")->where(\"item_id\", \"=\", $item->id)->execute();\r\n }\r\n\r\n $existingUsers = ORM::factory(\"items_user\")\r\n ->where(\"item_id\", \"=\", $item->id)\r\n ->find_all();\r\n if (count($existingUsers) > 0) {\r\n db::build()->delete(\"items_users\")->where(\"item_id\", \"=\", $item->id)->execute();\r\n }\r\n }", "title": "" }, { "docid": "e6b17d5d43c64b19462982b920c28af3", "score": "0.5128146", "text": "public function getToDos($project_id,$todo_list_id)\n\t{\n\t\treturn $this->get_data('https://basecamp.com/'.$this->accout_id.'/api/v1/projects/'.$project_id.'/todolists/'.$todo_list_id.'.json');\t\n\t}", "title": "" }, { "docid": "64489906181b1d084ab526860d071ab5", "score": "0.51197714", "text": "public function item(){\n \treturn $this->belongsToMany('App\\Models\\Item\\Item')->withPivot('itemlist_id','qty','uom','created_at','updated_at');\n }", "title": "" }, { "docid": "6e0406aa6c768869354bdb28e661b857", "score": "0.5105048", "text": "public function items() {\n return $this->hasMany(InvoiceItemProxy::modelClass())->whereNull('parent_id');\n }", "title": "" }, { "docid": "e0c68120a679348cdf46b94deeede5ee", "score": "0.5095908", "text": "public function show(Todo $todo)\n {\n\n }", "title": "" }, { "docid": "b21c60e914fb1def197b163da781052b", "score": "0.5092529", "text": "function append_todolist($todo_item)\t{ \n foreach($todo_item as $item){\n echo $item.'</br>';\n }\n \n}", "title": "" }, { "docid": "3f3fc3abb50932603886bfa85c3ca062", "score": "0.50910187", "text": "public function workItems()\n {\n \treturn $this->belongsToMany('App\\WorkItem');\n }", "title": "" }, { "docid": "4ec1ebbbd18919fc9456acf5a06a3760", "score": "0.5072363", "text": "function create_todo_item()\n{\n register_post_type('todo-item', [\n 'labels' => [\n 'name' => 'ToDo Items',\n 'singular_name' => 'ToDO item',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New ToDo Item',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit ToDo Item',\n 'new_item' => 'New ToDo Item',\n 'view' => 'View',\n 'view_item' => 'View ToDo Item',\n 'search_items' => 'Search ToDo Items',\n 'not_found' => 'No ToDo Items found',\n 'not_found_in_trash' => 'No ToDo Items found in Trash',\n 'parent' => 'Parent ToDo Item',\n ],\n 'description' => 'ToDo items are displayed In TodO List plugin.',\n 'public' => true,\n 'supports' => ['title', 'editor', 'custom-fields'],\n 'menu_icon' => 'dashicons-editor-ul',\n 'has_archive' => true,\n ]);\n}", "title": "" }, { "docid": "c98ebe1d6af14c4dd9a8dd7f395214f9", "score": "0.5070802", "text": "public function __construct(Todo $todo)\n\t{\n\t\t$this->todo = $todo;\n\t}", "title": "" }, { "docid": "33b6d63f2420646ceb13e2037f086015", "score": "0.5067051", "text": "public function index()\n {\n \n $id = Auth::id(); //kirjautuneen käyttäjän id muuttujaan\n \n $results = DB::table('items')\n ->where('user_id', $id) //Missä user_id on käyttäjän id\n ->orderBy('items.id', 'DESC') //Järjestyksessä uusin esin\n ->get(); \n\n \n\n #Tekee Tyhjän rivin todo listalle ja tulee unshift errori tulee kun tehdään uusi tehtävä\n /* if($results->isEmpty()) {\n return response(['message' => 'Tehtäviä ei ole.']);\n } else {\n return $results;\n } */\n \n //Postman palauttaa tyhjän arrayn, jos ei ole tehtäviä\n return $results;\n \n }", "title": "" }, { "docid": "80de576e35289d38b093dc222d84d71b", "score": "0.5059461", "text": "public function testCreateItem()\n {\n }", "title": "" }, { "docid": "d8ba78e9987c5a9c5360960a66c4bfbc", "score": "0.50482064", "text": "public function items() {\n return $this->hasMany('Nixzen\\Models\\Item', 'unittype_id');\n }", "title": "" }, { "docid": "5e56906fd515758d4647bb10af3a3e1c", "score": "0.5043584", "text": "function syncItems($table,$items,$where=[]){\n\t\tDb::startTransaction();\n\t\t//collect ids to exclude from delete\n\t\t$ids = [];\n\n\t\tforeach((array)$items as $item){\n\t\t\t$keys = Control::$model->flatMatchedKeys($table,$item);\n\t\t\t$itemWhere = array_merge($where,Arrays::extract($keys,$in));\n\t\t\t$id = \\Db::row($table,$itemWhere,'id');\n\t\t\tif($id){\n\t\t\t\t$ids[] = $id;\n\t\t\t\t\\Db::update($table,$item,$itemWhere);\n\t\t\t}else{\n\t\t\t\t$id = \\Db::insert($table,array_merge($where,$item));\n\t\t\t\t$ids[] = $id;\n\t\t\t}\n\t\t}\n\t\t$where['\"'] = 'id not in ('.implode(',',$ids).')';\n\t\t\\Db::query('delete',$where);\n\n\t\tDb::commitTransaction();\n\t\t\\Hook::run('userAction','interest update');\n\t}", "title": "" }, { "docid": "101d787084bbce2a0433c33597002bfb", "score": "0.5022634", "text": "function createTodoTable(PDO $pdo): void\n{\n $query = \"CREATE TABLE IF NOT EXISTS items (\n `id` INT(11) NOT NULL AUTO_INCREMENT, \n `text` VARCHAR(255) NOT NULL, \n `checked` TINYINT(1) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8\";\n $pdo->exec($query);\n}", "title": "" }, { "docid": "9c1d80628c1b58430e35eb14caa45d75", "score": "0.501494", "text": "public function getUserTodosList($id)\n {\n return $this->find($id)->todos;\n }", "title": "" }, { "docid": "3beebb7a3e042c9dbf36d42bec090a3f", "score": "0.50101644", "text": "public function index()\n {\n return Todo::all();\n }", "title": "" }, { "docid": "3beebb7a3e042c9dbf36d42bec090a3f", "score": "0.50101644", "text": "public function index()\n {\n return Todo::all();\n }", "title": "" }, { "docid": "3beebb7a3e042c9dbf36d42bec090a3f", "score": "0.50101644", "text": "public function index()\n {\n return Todo::all();\n }", "title": "" }, { "docid": "b2d8254afb9b5a272f044007e3e3c5c6", "score": "0.5000052", "text": "public function amulet()\n {\n return $this->belongsTo(Item::class, 'amulet_id');\n }", "title": "" }, { "docid": "7ec07b37fc99fe17643e79b5a55fae7a", "score": "0.49968356", "text": "public function orderItem()\n {\n return $this->morphMany(OrderItem::class, 'item');\n }", "title": "" }, { "docid": "88d43c9755a1116bf4034bd6111dcc4a", "score": "0.49909496", "text": "public function test_user_can_add_todo()\n {\n $formData =[\n 'title'=>'first task', \n 'description'=>'first task description',\n ];\n $response = $this->post('/api/todos',$formData);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "8a6639ad91cc699b27093bac122e5bbf", "score": "0.49909428", "text": "public function favoriteMusic()\n\t{\n\t\treturn $this->belongsToMany('App\\Models\\MusicType','user_music_type');\n\t}", "title": "" }, { "docid": "293c66fd9d8f4fbae233616123122099", "score": "0.4990898", "text": "public function getTaskItems($item = 'name')\n {\n \t$task_names = '';\n \t$query = TodoList::whereEmployeeId($this->employee_id);\n \tif(!isSuperAdmin()) {\n \t\t$query->whereAssignedBy(\\Auth::id());\n \t}\n\n \t$task_ids = $query->pluck('task_id')->all();\n\n \tif($item == 'id') {\n \t\treturn $task_ids;\n \t}\n\n \tif($task_ids) {\n \t\t$tasks = Task::whereIn('id', $task_ids)->pluck('title');\n \t\tif($tasks->isNotEmpty()) {\n \t\t\tforeach($tasks as $task_name) {\n \t\t\t\t$task_names .= $task_name . '<br/>';\n \t\t\t}\n \t\t}\n \t}\n\n \treturn rtrim($task_names, '<br/>');\n }", "title": "" }, { "docid": "78360638dd888968a53824c7cb3dd8a5", "score": "0.49883494", "text": "public function setItems($items);", "title": "" }, { "docid": "0c9088728beecde4a2c30673c4423953", "score": "0.49798414", "text": "public function createItem();", "title": "" }, { "docid": "b852e952b245dfd61578b444631f91c7", "score": "0.4978497", "text": "public function products(){\n //match the name of the eloquent model\n //corresponding to the item\n return $this->hasMany('Product');\n}", "title": "" }, { "docid": "33514239aabc7b7fcc310b85d5ac8ba0", "score": "0.49692035", "text": "public function show(ToDo $task)\n {\n //\n }", "title": "" }, { "docid": "4c1c735ea34f2c6bb4d117ec5756a0de", "score": "0.4968539", "text": "public function markDone(TodoListItem $todoListItem);", "title": "" }, { "docid": "3fdaf3b17cc1d8bf5bf94f1932f03032", "score": "0.49645516", "text": "abstract protected function _getItems();", "title": "" }, { "docid": "81f370a600106115a768e3555d6275b1", "score": "0.49595308", "text": "public function itemOrders(){\n return $this->hasMany(ItemOrder::class);\n }", "title": "" }, { "docid": "fbea0987d32c330090651d4a0f99479b", "score": "0.49594542", "text": "public function items()\n {\n return $this->hasMany('App\\BoardItem');\n }", "title": "" }, { "docid": "a77d6e643329ae95bf3918cb9f51db8f", "score": "0.49553734", "text": "static function item_deleted($item) {\n db::build()->delete(\"item_links\")->where(\"item_id\", \"=\", $item->id)->execute();\n }", "title": "" }, { "docid": "3421411417e1824e6474210345ea6a56", "score": "0.49501118", "text": "public function show(Todo $todo)\n {\n //\n }", "title": "" }, { "docid": "3421411417e1824e6474210345ea6a56", "score": "0.49501118", "text": "public function show(Todo $todo)\n {\n //\n }", "title": "" }, { "docid": "3421411417e1824e6474210345ea6a56", "score": "0.49501118", "text": "public function show(Todo $todo)\n {\n //\n }", "title": "" }, { "docid": "122417fa41e941c62595fc88fc4db690", "score": "0.49304518", "text": "public function delete(User $user, ToDo $toDo)\n {\n //\n }", "title": "" }, { "docid": "ca8e3d0ef13cb571896ccea3e071c5b0", "score": "0.4925346", "text": "public function testList()\n {\n $json = '[\n {\n \"uuid\": \"ac753187-2f22-4b5c-b716-f1fcecfb4410\",\n \"created_at\": \"2016-08-06T06:48:52.000Z\",\n \"updated_at\": \"2016-08-06T06:51:12.000Z\",\n \"description\": \"Catch some little Monsters\",\n \"notice\": null,\n \"pin\": false,\n \"completed\": false,\n \"completed_at\": null,\n \"repeat_type\": \"none\",\n \"remind_time\": null,\n \"estimated_pomo_count\": null,\n \"costed_pomo_count\": 0,\n \"sub_todos\": [\n \"81921b2e-8b54-46cf-bb47-0d3c3c7e8302\",\n \"ff59811e-4c53-404f-a842-9590b632616f\"\n ]\n }\n]';\n $mock = new MockHandler(\n [\n new Response(200, ['Content-Type' => 'application/json'], $json),\n ]\n );\n $handler = HandlerStack::create($mock);\n $client = new Client(['handler' => $handler]);\n $pomotodoQuery = new PomotodoQuery($client, 'TEST_KEY');\n\n $application = new Application();\n $application->add(new TodoListCommand($pomotodoQuery));\n $command = $application->find('todo:list');\n $tester = new CommandTester($command);\n $tester->execute(['command' => $command->getName()]);\n $result = '+---------------------+----------------------------+----------+\n| Date Created | Description | Estimate |\n+---------------------+----------------------------+----------+\n| 2016-08-06 06:48:52 | Catch some little Monsters | N/A |\n+---------------------+----------------------------+----------+\n';\n self::assertEquals($result, $tester->getDisplay());\n }", "title": "" }, { "docid": "232ef3b501b452185e4629d9996884e6", "score": "0.49244553", "text": "abstract public function items();", "title": "" }, { "docid": "a807e59675c826f6d735c0d8bfa1d6c7", "score": "0.49239412", "text": "public function testGetFavoriteListForItem()\n {\n }", "title": "" }, { "docid": "05e5fd601a3eed390f8f3239f44f1d0a", "score": "0.4919485", "text": "function BeforeDelete($item);", "title": "" }, { "docid": "3f231f2a0134c731d772ed3731678841", "score": "0.49135634", "text": "function get_related_items () {\r\n $conn = db_connect();\r\n $query = \"select * from items where item_creator_id = '\".$_SESSION['current_user_id'].\"'\r\n or item_follower_id = '\".$_SESSION['current_user_id'].\"' order by item_priority_id\";\r\n $result = $conn->query(\"set names utf8\");\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n throw new Exception(\"Could not connect to DB.\");\r\n }\r\n if ($result->num_rows == 0) {\r\n //throw new Exception(\"NO items records!\");\r\n }\r\n\r\n $row = db_result_to_array($result);\r\n return $row;\r\n }", "title": "" }, { "docid": "008558cfa45c1efc6c64a2c03278f200", "score": "0.49088857", "text": "public function update(Request $request, Todo $todo)\n {\n //сделать uncheck\n $todo = Todo::find($request->body);\n $todo->status = 1;\n $todo->save();\n $deals = Todo::all()->where('user_id', Auth::user()->id);\n return $deals;\n }", "title": "" }, { "docid": "cadf7477ec5edc377b724e0a39a642ba", "score": "0.49087542", "text": "public function items();", "title": "" }, { "docid": "185974951ed3693bedbacb9a8e3fbbff", "score": "0.48944712", "text": "public function createItemsChildrenTable(): void\n {\n if (\n $this->itemsTable === null ||\n $this->itemsChildrenTable === null ||\n $this->hasTable($this->itemsChildrenTable)\n ) {\n return;\n }\n\n $this\n ->database\n ->createCommand()\n ->createTable(\n $this->itemsChildrenTable,\n [\n 'parent' => 'string(128) NOT NULL',\n 'child' => 'string(128) NOT NULL',\n 'PRIMARY KEY ([[parent]], [[child]])',\n \"FOREIGN KEY ([[parent]]) REFERENCES {{%$this->itemsTable}} ([[name]])\",\n \"FOREIGN KEY ([[child]]) REFERENCES {{%$this->itemsTable}} ([[name]])\",\n ],\n )\n ->execute();\n }", "title": "" }, { "docid": "21198b2358a21671a464db68803cb942", "score": "0.4890994", "text": "function assign_todo_to_project() {\n\t\tcheck_ajax_referer( 'bct_security', 'security' );\n\t\t$todo\t\t\t\t = new stdClass();\n\t\t$todo->account_id\t = esc_attr( $_POST['account_id'] );\n\t\t$todo->project_id\t = esc_attr( $_POST['project_id'] );\n\t\t$todo->name\t\t\t = esc_attr( $_POST['todo_name'] );\n\t\t$todo->description\t = esc_attr( $_POST['todo_description'] );\n\t\t$post_id\t\t\t = (int) esc_attr( $_POST['post_id'] );\n\n\t\t# Get the Tasks\n\t\t$todo->todos = get_post_meta( $post_id, \"_todolist\", true );\n\n\t\t$results = $this->create_todo( $todo );\n\t\tdelete_transient( $this->user_ID . \"_\" . $todo->project_id );\n\t\tdie();\n\t}", "title": "" } ]
aa9b2063c9bf2dd7eb0ead1782e95844
Create request for operation 'mailingIdQueuePut'
[ { "docid": "457ac55f3a283f4bd2cbfaa755099b22", "score": "0.7434382", "text": "protected function mailingIdQueuePutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdQueuePut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdQueuePut'\n );\n }\n\n $resourcePath = '/mailing/{id}/queue';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "dab5644055551f80735148ca57743297", "score": "0.64982796", "text": "protected function mailingIdPutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdPut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdPut'\n );\n }\n\n $resourcePath = '/mailing/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "1c464d6cf86d1ff27011e5b1cf4329a3", "score": "0.60579675", "text": "protected function mailingIdArchivePutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdArchivePut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdArchivePut'\n );\n }\n\n $resourcePath = '/mailing/{id}/archive';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2f6ba3137c72f89b0313a21062ef996b", "score": "0.58087623", "text": "function setQueue($id)\n {\n $response = $this->db->where('BK_ID', $id)\n ->set('Q_ID', '2')\n ->update('booking');\n return $response;\n }", "title": "" }, { "docid": "1017fd20b7a2fbf31b294eb97d0b90a0", "score": "0.5723639", "text": "public function make(string $queue_id): AmqpQueue;", "title": "" }, { "docid": "daa776dfe3f4496ae154fc3add2a7eab", "score": "0.56924355", "text": "protected function jobsJobIdSubmitPutRequest($authorization, $job_id, $body) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdSubmitPut'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdSubmitPut'\n );\n }\n // Verify the required parameter 'body' is set.\n if ($body === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling jobsJobIdSubmitPut'\n );\n }\n\n $resourcePath = '/jobs/{jobId}/submit';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\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 }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7c694acab5c990559a8771856a783912", "score": "0.5656543", "text": "protected function mailingsPutRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingsPut'\n );\n }\n\n $resourcePath = '/mailings';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4444e6176029b7d99cd0536a06741c14", "score": "0.55238295", "text": "public function queueingAction()\n {\n $request = Request::createFromGlobals();\n $id = $request->get('id');\n\n // On historise pour ne pas perdre l'information de reprise\n // on historise tout ce qui est terminé\n $Request = $this->getDoctrine()->getRepository(\"AriiSelfBundle:Request\")->find($id);\n\n $Request->setReqStatus('QUEUED');\n $Request->setProcessed(null);\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($Request);\n $em->flush();\n \n return new Response(\"success\");\n }", "title": "" }, { "docid": "8ba1aaf3d9b0ecee5742a21d543f6134", "score": "0.5506591", "text": "protected function mailingIdDeleteRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdDelete'\n );\n }\n\n $resourcePath = '/mailing/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "41829c61c090dd02d106489a94ade425", "score": "0.5309802", "text": "public static function addToQueue($queue, $ownerID, $vCode, $api, $scope) {\n\n\t\t// Set the root namesace for queued commands\n\t\t$command_namespace = 'Seat\\EveQueues\\\\';\n\n\t\t// Prepare the auth array\n\t\tif($vCode != NULL)\n\t\t\t$auth = array('keyID' => $ownerID, 'vCode' => $vCode);\n\t\telse\n\t\t\t$auth = array();\n\n\t\t// Check the databse if there are jobs outstanding ie. they have the status\n\t\t// Queued or Working. If not, we will queue a new job, else just capture the\n\t\t// jobID and return that\n\t\t$jobID = \\SeatQueueInformation::where('ownerID', '=', $ownerID)\n\t\t\t->where('api', '=', $api)\n\t\t\t->whereIn('status', array('Queued', 'Working'))\n\t\t\t->first();\n\n\t\t// Check if the $jobID was found, else, queue a new job\n\t\tif(!$jobID) {\n\n\t\t\t$jobID = \\Queue::push($command_namespace . implode('\\\\', $queue), $auth);\n\t\t\t\\SeatQueueInformation::create(array('jobID' => $jobID, 'ownerID' => $ownerID, 'api' => $api, 'scope' => $scope, 'status' => 'Queued'));\n\t\t} else {\n\n\t\t\t// To aid in potential capacity debugging, lets write a warning log entry so that a user\n\t\t\t// is able to see that a new job was not submitted\n\t\t\t\\Log::warning('A new job was not submitted due a similar one still being outstanding. Details: ' . $jobID, array('src' => __CLASS__));\n\n\t\t\t// Set the jobID to the ID from the database\n\t\t\t$jobID = $jobID->jobID;\n\t\t}\n\n\t\treturn $jobID;\n\t}", "title": "" }, { "docid": "d1165a6d8a60a479811f5fcec6d45115", "score": "0.52378625", "text": "function quickbooks_webconnect_queue_request($element, $element_type, $operation) {\r\n\r\n // create the item to place on the queue\r\n $item = array(\r\n 'element' => $element,\r\n 'type' => $element_type,\r\n 'op' => $operation,\r\n );\r\n \r\n // add the item to the queue\r\n $queue = DrupalQueue::get('quickbooks_webconnect');\r\n $queue->createItem($item);\r\n \r\n _quickbooks_webconnect_debug('[queue_request] item : @item', array('@item' => var_export($item, TRUE)));\r\n}", "title": "" }, { "docid": "c52ed7919367772cd84e967d91ceb3f3", "score": "0.5208331", "text": "private function _convertCreateQueue($request) {\n \n $parameters = array();\n $parameters['Action'] = 'CreateQueue';\n if ($request->isSetQueueName()) {\n $parameters['QueueName'] = $request->getQueueName();\n }\n if ($request->isSetDefaultVisibilityTimeout()) {\n $parameters['DefaultVisibilityTimeout'] = $request->getDefaultVisibilityTimeout();\n }\n\n return $parameters;\n }", "title": "" }, { "docid": "db67136e4b90268707ee06504cd1a1ab", "score": "0.52012396", "text": "protected function mailingIdGetRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdGet'\n );\n }\n\n $resourcePath = '/mailing/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "825dcbdc76e812a58b171306e5218375", "score": "0.51900727", "text": "protected function jobsJobIdPutRequest($authorization, $job_id, $job) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdPut'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdPut'\n );\n }\n // Verify the required parameter 'job' is set.\n if ($job === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job when calling jobsJobIdPut'\n );\n }\n\n $resourcePath = '/jobs/{jobId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($job)) {\n $_tempBody = $job;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\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 }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f6f56cb0533b6977c6f9898761072556", "score": "0.5105287", "text": "public function createQueue($request) \n {\n if (!$request instanceof Amazon_SQS_Model_CreateQueue) {\n require_once ('Amazon/SQS/Model/CreateQueue.php');\n $request = new Amazon_SQS_Model_CreateQueue($request);\n }\n require_once ('Amazon/SQS/Model/CreateQueueResponse.php');\n return Amazon_SQS_Model_CreateQueueResponse::fromXML($this->_invoke($this->_convertCreateQueue($request)));\n }", "title": "" }, { "docid": "46b1abdeb51526ead0c2fdde4c661b8c", "score": "0.50999856", "text": "protected function jobsJobIdArchivePutRequest($authorization, $job_id) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdArchivePut'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdArchivePut'\n );\n }\n\n $resourcePath = '/jobs/{jobId}/archive';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\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 }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "90fdcbe4666777e136a4141be9689d4a", "score": "0.507233", "text": "function isymphony_queue_add($queueId, $addQueue, $displayName) {\r\n\tglobal $db;\r\n\t$addQueue = $addQueue ? \"1\" : \"0\";\t\r\n\t$prepStatement = $db->prepare(\"INSERT INTO isymphony_queues (queue_id, add_queue, display_name) VALUES (?, ?, ?)\");\r\n\t$values = array($queueId, $addQueue, $displayName);\r\n\t$db->execute($prepStatement, $values);\r\n}", "title": "" }, { "docid": "01231b049565d350600856373951ca19", "score": "0.5067795", "text": "private function queue_operation($http_verb, $id, $method, $args=null)\n {\n\t\t$operation = array(\n\t\t\t\t'operation_id' => $id,\n\t\t\t\t'method' => $http_verb,\n\t\t\t\t'path' => $method,\n \t\t);\n\n\t\tif ($args) {\n\t\t\t$key = ($http_verb == 'GET' ? 'params' : 'body');\n\t\t\t$operation[$key] = json_encode($args);\n\t\t}\n\n\t\t$this->operations[] = $operation;\n }", "title": "" }, { "docid": "29ac2d2e0066087036c5ad9178b6c993", "score": "0.50524145", "text": "protected function spamcheckPutRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling spamcheckPut'\n );\n }\n\n $resourcePath = '/spamcheck';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8b6ab5e20744406d2b0841a85d5a687e", "score": "0.4978856", "text": "public function testGetValidQueueByQueueId() {\n\t\t$this->assertNotNull($this->queue1);\n\t\t$this->assertNotNull($this->mysqli);\n\n\t\t// first, assert the queue is inserted into mySQL by grabbing it and asserting the primary key\n\t\t$this->queue1->insert($this->mysqli);\n\t\t$mysqlQueue = Queue::getQueueByQueueId($this->mysqli, $this->queue1->getQueueId());\n\t\t$this->assertIdentical($this->queue1->getQueueId(), $mysqlQueue->getQueueId());\n\t}", "title": "" }, { "docid": "868adc33c3536b4610c087bfe372fc67", "score": "0.49774298", "text": "public function createQueue(string $queueName): void;", "title": "" }, { "docid": "7c15f80fe47fa11cec289a3651455088", "score": "0.49633723", "text": "public function pauseFromQueue($id)\n\t{\n\t\t$header = <<<NZBGet_PAUSE_FROM_QUEUE\n<?xml version=\"1.0\"?>\n<methodCall>\n\t<methodName>editqueue</methodName>\n\t<params>\n\t\t<param>\n\t\t\t<value><string>GroupPause</string></value>\n\t\t</param>\n\t\t<param>\n\t\t\t<value><i4>0</i4></value>\n\t\t</param>\n\t\t<param>\n\t\t\t<value><string>\"\"</string></value>\n\t\t</param>\n\t\t<param>\n\t\t\t<value>\n\t\t\t\t<array>\n\t\t\t\t\t<value><i4>$id</i4></value>\n\t\t\t\t</array>\n\t\t\t</value>\n\t\t</param>\n\t</params>\n</methodCall>\nNZBGet_PAUSE_FROM_QUEUE;\n\n\t\tnzedb\\utility\\Utility::getUrl([\n\t\t\t\t\t\t\t\t\t\t 'url' => $this->fullURL . 'editqueue',\n\t\t\t\t\t\t\t\t\t\t 'method' => 'post', 'postdata' => $header,\n\t\t\t\t\t\t\t\t\t\t 'verifycert' => false\n\t\t\t\t\t\t\t\t\t ]);\n\t}", "title": "" }, { "docid": "f8d205f499cad69764a8db4cd3b8a451", "score": "0.4944417", "text": "public function submitAcknowledgementRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling submitAcknowledgement'\n );\n }\n\n $resourcePath = '/vendor/directFulfillment/orders/2021-12-28/acknowledgements';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (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\\Query::build($formParams);\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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8ed4f9a9158e50b7ab333cadcf87f158", "score": "0.49421394", "text": "public function put($id, $method, $args=array())\n {\n \t$this->queue_operation('PUT', $id, $method, $args);\n }", "title": "" }, { "docid": "9774d57cb6a1b023d1dd819afb5bc46f", "score": "0.4909094", "text": "private function addSMSToQueue(){\n $query = \"update sms_queue set in_queue = 1\"\n . \" where text_status = 'not sent' and (schedule_time < now() or schedule_time = '0000-00-00 00:00:00') and number rlike '^[\\+0-9]+$' and project = '{$this->settings['sms_api_project']}'\";\n $this->database->runMySQLQuery($query, false);\n \n return json_encode(array(\"error\" => false, \"data\" => array()));\n }", "title": "" }, { "docid": "e2f5f5ca491b59c1a42433d1cbcf83d8", "score": "0.49075085", "text": "protected function mailingIdLinkId2PutRequest($id, $id2, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdLinkId2Put'\n );\n }\n // verify the required parameter 'id2' is set\n if ($id2 === null || (is_array($id2) && count($id2) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id2 when calling mailingIdLinkId2Put'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdLinkId2Put'\n );\n }\n\n $resourcePath = '/mailing/{id}/link/{id2}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($id2 !== null) {\n $resourcePath = str_replace(\n '{' . 'id2' . '}',\n ObjectSerializer::toPathValue($id2),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "93741dd366784b56e378a6f7a25a4015", "score": "0.49010336", "text": "public function queueMessage(Request $request)\n\t{\n\t\t// Validate request\n\t\t$this->validate($request, $rules = [\n\t\t\t'userId' => 'required|integer|exists:users,id',\n\t\t\t'originatingCountry' => 'required|alpha|size:2|exists:countries,code',\n\t\t\t'currencyFrom' => 'required|alpha|size:3|exists:currencies,code',\n\t\t\t'currencyTo' => 'required|alpha|size:3|different:currencyFrom|exists:currencies,code',\n\t\t\t'amountSell' => 'required|numeric|min:1',\n\t\t\t'amountBuy' => 'required|numeric|min:1',\n\t\t\t'rate' => 'required|numeric|min:0.001',\n\t\t\t'timePlaced' => 'required|before:' . Carbon::now()->toDateTimeString(),\n\t\t]);\n\n\t\t// Process input\n\t\t$input = $this->processInput($request->only(array_keys($rules)));\n\n\t\t// Create message\n\t\t$message = Message::create([\n\t\t\t'user_id' => $input->userId,\n\t\t\t'country_id' => $input->originatingCountry,\n\t\t\t'from_currency_id' => $input->currencyFrom,\n\t\t\t'to_currency_id' => $input->currencyTo,\n\t\t\t'amount_sell' => $input->amountSell,\n\t\t\t'amount_buy' => $input->amountBuy,\n\t\t\t'rate' => $input->rate,\n\t\t\t'placed_at' => $input->timePlaced,\n\t\t]);\n\n\t\t// Queue message to be processed later\n\t\t$this->dispatch(new ProcessMessageJob($message));\n\n\t\treturn redirect('/')->withSuccess(sprintf('Message %d successfully created', $message->getKey()));\n\t}", "title": "" }, { "docid": "8ab0ba58e1a176a0706bfe71bba5e1cd", "score": "0.48752338", "text": "public function getQueueableId();", "title": "" }, { "docid": "a3e603f70a382a1f9cc96fd24f93c5fb", "score": "0.48592395", "text": "public function setQueueAttributes($request) \n {\n if (!$request instanceof Amazon_SQS_Model_SetQueueAttributes) {\n require_once ('Amazon/SQS/Model/SetQueueAttributes.php');\n $request = new Amazon_SQS_Model_SetQueueAttributes($request);\n }\n require_once ('Amazon/SQS/Model/SetQueueAttributesResponse.php');\n return Amazon_SQS_Model_SetQueueAttributesResponse::fromXML($this->_invoke($this->_convertSetQueueAttributes($request)));\n }", "title": "" }, { "docid": "1d1f476c60e16b318fbc3998c9ef942d", "score": "0.4853496", "text": "protected function campaignsAddRequest($data)\n {\n // verify the required parameter 'data' is set\n if ($data === null || (is_array($data) && count($data) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $data when calling campaignsAdd'\n );\n }\n\n $resourcePath = '/campaigns/add';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\n $multipart = true;\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', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\n if ($apiKey !== null) {\n $queryParams['access_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\n if ($apiKey !== null) {\n $queryParams['nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\n if ($apiKey !== null) {\n $queryParams['timestamp'] = $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 if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n } else {\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n }\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "cdcd9900e2b24f73ccc6cd95801cfb45", "score": "0.48420426", "text": "public abstract function push($queueName, array $body, $options = []);", "title": "" }, { "docid": "5edc301cbdc519e63671ac8e54914062", "score": "0.48214164", "text": "public function delFromQueue($id)\n\t{\n\t\t$header = <<<NZBGet_DELETE_FROM_QUEUE\n<?xml version=\"1.0\"?>\n<methodCall>\n\t<methodName>editqueue</methodName>\n\t<params>\n\t\t<param>\n\t\t\t<value><string>GroupDelete</string></value>\n\t\t</param>\n\t\t<param>\n\t\t\t<value><i4>0</i4></value>\n\t\t</param>\n\t\t<param>\n\t\t\t<value><string>\"\"</string></value>\n\t\t</param>\n\t\t<param>\n\t\t\t<value>\n\t\t\t\t<array>\n\t\t\t\t\t<value><i4>$id</i4></value>\n\t\t\t\t</array>\n\t\t\t</value>\n\t\t</param>\n\t</params>\n</methodCall>\nNZBGet_DELETE_FROM_QUEUE;\n\n\t\tnzedb\\utility\\Utility::getUrl([\n\t\t\t\t\t\t\t\t\t\t 'url' => $this->fullURL . 'editqueue',\n\t\t\t\t\t\t\t\t\t\t 'method' => 'post', 'postdata' => $header,\n\t\t\t\t\t\t\t\t\t\t 'verifycert' => false\n\t\t\t\t\t\t\t\t\t ]);\n\t}", "title": "" }, { "docid": "a80aab501e63522ab63fa96f35e1f8db", "score": "0.48157257", "text": "public function addToQueue($to, $from, $subject, $content, $options = array());", "title": "" }, { "docid": "a5583e6747bd2030dff9bc6da42e1667", "score": "0.48063833", "text": "protected function queue_reput($queue, $data)\n {\n $httpsqs = HttpsqsService::get();\n $httpsqs->put($queue, json_encode($data)); \n }", "title": "" }, { "docid": "3fb9a02bef54bf1d2c540b6c34716653", "score": "0.48027435", "text": "protected function mailingsPostRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingsPost'\n );\n }\n\n $resourcePath = '/mailings';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a403f547ae2fa94f95dc08349efad2ee", "score": "0.48015046", "text": "public function queueMessage()\n\t{\n\t\tif(!isset($this->queueData)) $this->_triggerError('You cannot Queue a message that has not been created. Use newMessage() to create a new message.');\n\n\t\t// loop through possible users\n\t\t$to = $this->queueData['send']['to'];\n\t\t$from = $this->queueData['send']['from'];\n\t\t$type = intval($this->queueData['send']['type']);\n\t\t$when = $this->queueData['send']['when'];\n\t\t$receiverList = (is_array($to)) ? $to:array($to);\n\t\t$senderList = (is_array($from)) ? $to:array($from);\n\t\tunset($this->queueData['send']);\n\n\t\tfor($i=0; $i<count($receiverList); $i++)\n\t\t{\n\t\t\t$sender = intval($senderList[$i]);\n\t\t\t$receiver = intval($receiverList[$i]);\n\n\t\t\t$sender = $this->db->prepare($sender);\n\t\t\t$receiver = $this->db->prepare($receiver);\n\t\t\tif(isset($this->message)) $pushMessage = $this->db->prepare($this->message);\n\t\t\telse $pushMessage = '';\n\t\t\tif(isset($this->sound)) $pushSound = $this->db->prepare($this->sound);\n\t\t\telse $pushSound = '';\n\t\t\tif(isset($this->badge)) $pushBadge = $this->db->prepare($this->badge);\n\t\t\telse $pushBadge = 0;\n\t\t\tif(isset($this->extraParams))\n\t\t\t{\n\t\t\t\t$extraParams = json_encode($this->extraParams);\n\t\t\t\t$extraParams = $this->db->prepare($extraParams);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$extraParams = '';\n\t\t\t}\n\n\t\t\t$this->db->query(\"CALL addApnQueue({$sender}, {$receiver}, {$type}, {$pushBadge}, '{$pushSound}', '{$pushMessage}', '{$extraParams}')\");\n\t\t}\n\t\tunset($this->queueData);\n\t}", "title": "" }, { "docid": "7c7aea234f48ecbe59012c5d37b35b16", "score": "0.4795097", "text": "protected function putApiTaskRequest($id, $priority = null, $stage = null, $subject = null, $assigned_agent = null, $description = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling putApiTask'\n );\n }\n\n $resourcePath = '/task/{id}.json';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // form params\n if ($priority !== null) {\n $formParams['priority'] = ObjectSerializer::toFormValue($priority);\n }\n // form params\n if ($stage !== null) {\n $formParams['stage'] = ObjectSerializer::toFormValue($stage);\n }\n // form params\n if ($subject !== null) {\n $formParams['subject'] = ObjectSerializer::toFormValue($subject);\n }\n // form params\n if ($assigned_agent !== null) {\n $formParams['assignedAgent'] = ObjectSerializer::toFormValue($assigned_agent);\n }\n // form params\n if ($description !== null) {\n $formParams['description'] = ObjectSerializer::toFormValue($description);\n }\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "41bc887558c6563e77819cfab3603b42", "score": "0.4742162", "text": "public function testSendMailsInQueue()\n {\n $this->markTestIncomplete(\"Doesn't send yet, need to doublecheck my table definition.\");\n\n $id_user = 1;\n $sender = 'testsuite@example.org';\n $recipient = 'testcase@example.org';\n $headers = array('X-TestSuite' => 1);\n $body = 'Lorem ipsum';\n\n $mailId1 = $this->queue->put($sender, $recipient, $headers, $body);\n\n $id_user = 1;\n $sender = 'testsuite@example.org';\n $recipient = 'testcase@example.org';\n $headers = array('X-TestSuite' => 2);\n $body = 'Lorem ipsum sit dolor';\n\n $mailId2 = $this->queue->put($sender, $recipient, $headers, $body);\n\n $this->assertEquals(2, $this->queue->getQueueCount());\n\n $status = $this->queue->sendMailsInQueue();\n if (Pear::isError($status)) {\n $this->fail(\"Error sending emails: {$status->getMessage()}.\");\n }\n $this->assertTrue($status);\n $this->assertEquals(0, $this->queue->getQueueCount());\n }", "title": "" }, { "docid": "ea9801f2aa49becdf640c37fb729fa25", "score": "0.4740589", "text": "public function createQueue(?QueueAttributes $queueAttr = null): MessageResult {\n if ($queueAttr == null) {\n $queueAttr = $this->getDefaultQueueAttribute();\n }\n $request = new CreateQueueRequest($this->queueName, $queueAttr);\n try {\n $res = $this->client->createQueue($request);\n }\n catch (MnsException $e) {\n return MessageResult::Failed($e, \"CreateQueue\");\n }\n if ($res->isSucceed()) {\n return MessageResult::Success();\n } else {\n return MessageResult::Failed('Unknown error occurs.', \"CreateQueue\");\n }\n }", "title": "" }, { "docid": "1ff3c1875ac9b7962fcfe4f97d885645", "score": "0.4732601", "text": "public function addFlowspace($name, $dpid, $priority, $match, $queues, $force_enqueue, $slice_action){\n\t\tglobal $request_count;\n\t\t//check for null pointers on required fields\n\t\tif($name==null || $dpid==null || $priority==null || $match==null || $slice_action==null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//saving the non-optional parameters\n\t\t$params = array(\"name\"=>$name,\n\t\t\t\"dpid\"=>$dpid,\n\t\t\t\"priority\"=>$priority,\n\t\t\t\"match\"=>$match,\n\t\t\t\"slice-action\"=>$slice_action);\n\t\t\t\n\t\t//checking for optional parameters\n\t\tif($queues!=null){\n\t\t\t$temp = array(\"queues\"=>$queues);\n\t\t\t$params = array_merge((array)$params, (array)$temp);\n\t\t}\n\n\t\tif($force_enqueue!=null){\n\t\t\t$temp = array(\"force_enqueue\"=>$force_enqueue);\n\t\t\t$params = array_merge((array)$params, (array)$temp);\n\t\t}\n\n\t\t//creating the request\n\t\t$request = array(\"jsonrpc\"=>\"2.0\",\n\t\t\t\"method\"=>$this->CREATE_FLOWSPACE,\n\t\t\t\"id\"=>$request_count,\n\t\t\t\"params\"=>array($params));\n//var_dump($params);\n\t\t//increase the request id count\n\t\t$request_count++;\n\t\t//encode the array in to a json string\n\t\t$this->requestJson = json_encode($request);\n//var_dump($this->requestJson);\n\t\t//send the json request\n\t\t$result = $this->send($this->requestJson);\n\t\t//decode the result and return it\n\t\treturn json_decode($result,true);\n\t}", "title": "" }, { "docid": "4e6cb04fb981e471a8488a7c64833a1f", "score": "0.47187796", "text": "protected function getWorkforcemanagementManagementunitIntradayQueuesRequest($muId, $date)\n {\n // verify the required parameter 'muId' is set\n if ($muId === null || (is_array($muId) && count($muId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $muId when calling getWorkforcemanagementManagementunitIntradayQueues'\n );\n }\n // verify the required parameter 'date' is set\n if ($date === null || (is_array($date) && count($date) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $date when calling getWorkforcemanagementManagementunitIntradayQueues'\n );\n }\n\n $resourcePath = '/api/v2/workforcemanagement/managementunits/{muId}/intraday/queues';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($date !== null) {\n $queryParams['date'] = ObjectSerializer::toQueryValue($date);\n }\n\n // path params\n if ($muId !== null) {\n $resourcePath = str_replace(\n '{' . 'muId' . '}',\n ObjectSerializer::toPathValue($muId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4bd8e69acfde74e4c6045f86e92f7c05", "score": "0.47181526", "text": "public function getByQueueId($queue_id);", "title": "" }, { "docid": "dbb5e153c9eb96d433eed6396fea817b", "score": "0.47106367", "text": "public function buildQueue()\n {\n $this->queue = new Queue(uniqid('', true), $this->getResponseStream());\n }", "title": "" }, { "docid": "b7cb5730b43568bc91331c690eef7ba5", "score": "0.46905056", "text": "protected function smtpLogMessageIdDeleteRequest($messageId)\n {\n // verify the required parameter 'messageId' is set\n if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $messageId when calling smtpLogMessageIdDelete'\n );\n }\n\n $resourcePath = '/smtp/log/{messageId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($messageId !== null) {\n $resourcePath = str_replace(\n '{' . 'messageId' . '}',\n ObjectSerializer::toPathValue($messageId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\n if ($apiKey !== null) {\n $headers['partner-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ce63f2998cb51bdb0b1778c7b3d3de23", "score": "0.46871302", "text": "private function _convertSetQueueAttributes($request) {\n \n $parameters = array();\n $parameters['Action'] = 'SetQueueAttributes';\n if ($request->isSetQueueName()) {\n $parameters['QueueName'] = $request->getQueueName();\n }\n foreach ($request->getAttribute() as $attributeIndex => $attribute) {\n if ($attribute->isSetName()) {\n $parameters['Attribute' . '.' . ($attributeIndex + 1) . '.' . 'Name'] = $attribute->getName();\n }\n if ($attribute->isSetValue()) {\n $parameters['Attribute' . '.' . ($attributeIndex + 1) . '.' . 'Value'] = $attribute->getValue();\n }\n\n }\n\n return $parameters;\n }", "title": "" }, { "docid": "afd26c4d70afcd88b993e4c3b2f05f41", "score": "0.46755007", "text": "public function createRequest($data) {\n\t\t// add on duplicate key\n\t\t$sql = \"INSERT INTO `\" . DB_PREFIX . \"ms_pg_request`\n\t\t\t\tSET seller_id = \" . (int)$data['seller_id'] . \",\n\t\t\t\t\tproduct_id = \" . (isset($data['product_id']) ? (int)$data['product_id'] : 'NULL') . \",\n\t\t\t\t\torder_id = \" . (isset($data['order_id']) ? (int)$data['order_id'] : 'NULL') . \",\n\t\t\t\t\trequest_type = \" . (int)$data['request_type'] . \",\n\t\t\t\t\trequest_status = \" . (int)$data['request_status'] . \",\n\t\t\t\t\tdescription = '\" . $this->db->escape(htmlspecialchars(nl2br($data['description']), ENT_COMPAT)) . \"',\n\t\t\t\t\tamount = \". (float)$this->currency->format($data['amount'], $this->config->get('config_currency'), '', FALSE) . \",\n\t\t\t\t\tcurrency_id = \" . (int)$data['currency_id'] . \",\n\t\t\t\t\tcurrency_code = '\" . $this->db->escape($data['currency_code']) . \"',\n\t\t\t\t\tdate_created = NOW(),\n\t\t\t\t\tdate_modified = NULL\";\n\n\t\t$this->db->query($sql);\n\t\treturn $this->db->getLastId();\n\t}", "title": "" }, { "docid": "a48259b4671df18a8e4db99ad1a7cdfa", "score": "0.46655348", "text": "function queue_mail_cc($mail_id, $to_name, $to_address) {\n\n\t$sql = \"select * from mail_queue where mail_id=\".$mail_id;\n\t$result = mysql_query($sql) or die(mysql_error());\n\t$row=mysql_fetch_array($result);\n\n\n\t$attachments=$row['attachments'];\n\t\n\t$now = (gmdate(\"Y-m-d H:i:s\"));\n\n\t$sql = \"INSERT INTO mail_queue (mail_id, mail_date, to_address, to_name, from_address, from_name, subject, message, html_message, attachments, status, error_msg, retry_count, template_id, date_stamp, att1_name, att2_name, att3_name) VALUES('', '$now', '$to_address', '$to_name', '\".addslashes($row['from_address']).\"', '\".addslashes($row['from_name']).\"', '\".addslashes($row['subject']).\"', '\".addslashes($row['message']).\"', '\".addslashes($row['html_message']).\"', '\".addslashes($row['attachments']).\"', 'queued', '', 0, '\".addslashes($row['template_id']).\"', '$now', '\".addslashes($row['att1_name']).\"', '\".addslashes($row['att2_name']).\"', '\".addslashes($row['att3_name']).\"')\";\n\n\tmysql_query ($sql) or q_mail_error (mysql_error().$sql);\n\n\t$mail_id = mysql_insert_id();\n\n\n\n\treturn $mail_id;\n\n}", "title": "" }, { "docid": "1971bb330db09853ecc15a40e71d049e", "score": "0.46633115", "text": "public function addEmailToQueue($from_email, $from_name, $replyto_address, $replyto_name, array $recipients, array $cc, array $bcc, $subject, $body)\n\t{\n\t\t$this->db->trans_start();\n\n\t\tif (!$this->db->query('\n\t\t\tINSERT INTO mail_queue\n\t\t\t\t(from_address, from_name, replyto, replyto_name, subject, body, enqueue_date, sent_date, tries, try_date)\n\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?, ?, ?, NOW(), \\'0000-00-00 00:00:00\\', 0, \\'0000-00-00 00:00:00\\')', array(\n\t\t\t\t$from_email,\n\t\t\t\t$from_name,\n\t\t\t\t$replyto_address,\n\t\t\t\t$replyto_name,\n\t\t\t\t$subject,\n\t\t\t\t$body,\n\t\t\t))\n\t\t) {\n\t\t\treturn $this->db->error;\n\t\t}\n\n\t\t$mail_id = $this->db->insert_id();\n\n\t\t$mail_recipients = array();\n\t\tforeach ($recipients as $email => $name) {\n\t\t\t$mail_recipients[] = $mail_id;\n\t\t\t$mail_recipients[] = Email_model::RECIPIENT_TO;\n\t\t\t$mail_recipients[] = $email;\n\t\t\t$mail_recipients[] = $name;\n\t\t}\n\t\tforeach ($cc as $email => $name) {\n\t\t\t$mail_recipients[] = $mail_id;\n\t\t\t$mail_recipients[] = Email_model::RECIPIENT_CC;\n\t\t\t$mail_recipients[] = $email;\n\t\t\t$mail_recipients[] = $name;\n\t\t}\n\t\tforeach ($bcc as $email => $name) {\n\t\t\t$mail_recipients[] = $mail_id;\n\t\t\t$mail_recipients[] = Email_model::RECIPIENT_BCC;\n\t\t\t$mail_recipients[] = $email;\n\t\t\t$mail_recipients[] = $name;\n\t\t}\n\n\t\tif (!$this->db->query('\n\t\t\tINSERT INTO mail_recipient\n\t\t\t\t(mail_id, recipient_type, address, name)\n\t\t\tVALUES\n\t\t\t\t' . implode(', ', array_fill(0, count($recipients) + count($cc) + count($bcc), '(?, ?, ?, ?)')), $mail_recipients)\n\t\t) {\n\t\t\treturn $this->db->error;\n\t\t}\n\n\t\t$this->db->trans_complete();\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "24b7275ca307e140d1a7d4b1913cbf00", "score": "0.46621242", "text": "protected function putOrderStatusItemRequest($id, $orderStatus = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling putOrderStatusItem'\n );\n }\n\n $resourcePath = '/order_statuses/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($orderStatus)) {\n $_tempBody = $orderStatus;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/ld+json', 'application/json', 'text/csv', 'text/html']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/ld+json', 'application/json', 'text/csv', 'text/html'],\n ['application/ld+json', 'application/json', 'text/csv', 'text/html']\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 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 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8a0cd33eb19c0e1f90f18846ad6644f2", "score": "0.46471405", "text": "private static function insertToQueue($status, $subject, $body, $toEmail = array(), $cc = array(), $bcc = array(), $attachment = array(), $fromName = null){\n\t\t$sendEmailTaskVo = new SendEmailTaskVo ();\n\t\t$sendEmailTaskVo->subject = $subject;\n\t\t$sendEmailTaskVo->body = $body;\n\t\t$sendEmailTaskVo->to = JsonUtil::encode($toEmail);\n\t\t$sendEmailTaskVo->cc = JsonUtil::encode($cc);\n\t\t$sendEmailTaskVo->bcc = JsonUtil::encode($bcc);\n\t\t$sendEmailTaskVo->attachments = JsonUtil::encode($attachment);\n\t\t$sendEmailTaskVo->fromName = $fromName;\n\t\t$sendEmailTaskVo->status = $status;\n\t\t// Add task to the queue.\n\t\t$sendEmailTaskDao = new SendEmailTaskBaseDao ();\n\t\t$sendEmailTaskDao->insertDynamic($sendEmailTaskVo);\n\t}", "title": "" }, { "docid": "e16102665337acfbdf1e500016d52545", "score": "0.46281445", "text": "public function queueMessageAction()\n {\n $message = $this->_initMessage();\n if (!$message->getId()) {\n $template = $this->_initTemplate('template_id');\n if (!$template->getId()) {\n $this->_getSession()->addError($this->__('Template for new AirMail Message does not exist.'));\n $this->_redirect('*/*/template');\n }\n }\n\n if (isset($template)) {\n $appId = $template->getApplicationId();\n } else {\n $appId = Mage::getModel('xmlconnect/template')->load($message->getTemplateId())->getApplicationId();\n }\n\n /** @var $app Mage_XmlConnect_Model_Application */\n $app = Mage::getModel('xmlconnect/application')->load($appId);\n\n if(!$app->isNotificationsActive()) {\n $this->_getSession()->addError(\n $this->__('Queue is allowed only for applications with enabled Push Notification.')\n );\n $action = $message->getId() ? 'queue' : 'template';\n $this->_redirect('*/*/' . $action);\n return;\n }\n\n $this->loadLayout();\n if ($message->getId()) {\n $title = $this->__('Edit AirMail Message');\n } else {\n $title = $this->__('New AirMail Message');\n }\n $this->_addBreadcrumb(\n $this->__('AirMail Message Queue'), $this->__('AirMail Message Queue'), $this->getUrl('*/*/queue')\n );\n $this->_addBreadcrumb($title, $title);\n\n $this->_setActiveMenu('xmlconnect/queue');\n $this->renderLayout();\n }", "title": "" }, { "docid": "70d110d233336bbf4a380b5ce163dd27", "score": "0.4625044", "text": "public function add(\\Puja\\Library\\Queue\\Entity\\Queue$queue)\n {\n }", "title": "" }, { "docid": "70f529bcccc494c808324a614d5729c3", "score": "0.46195135", "text": "public function addAnnouncementQueue() {\n try {\n if (!($this->announcementQueue instanceof Base_Model_ObtorLib_App_Core_Announcement_Entity_AnnouncementQueue)) {\n throw new Base_Model_ObtorLib_App_Core_Announcement_Exception(\" AnnouncementQueue Entity not intialized\");\n } else {\n $data = array(\n 'status' => $this->announcementQueue->getStatus(),\n 'added_on' => $this->announcementQueue->getAddedOn(),\n 'updated_on' => $this->announcementQueue->getUpdatedOn(),\n 'staff_id' => $this->announcementQueue->getStaffId(),\n 'customer_id' => $this->announcementQueue->getCustomerId(),\n 'announcement_id' => $this->announcementQueue->getAnnouncement());\n \n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Announcement_Exception($ex);\n }\n }", "title": "" }, { "docid": "19043e4ae682672c9ab3d8d9e48a255c", "score": "0.46101785", "text": "public function enqueue($queue, $command);", "title": "" }, { "docid": "82527de704cd873bc0cc2c3a59cfce08", "score": "0.46066695", "text": "function SendQueue() {\n\t\tglobal $db;\n\n\t\trequire_once(AC_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');\n\t\t$mailQueueDAO = new MailQueueDAO();\n\t\t$rows = $mailQueueDAO->getAll();\n\n\t\t$mail_ids = array();\n\t\t\n\t\tif (is_array($rows))\n\t\t{\n\t\t\tforeach ($rows as $id => $row) \n\t\t\t{\n\t\t\t\t$this->ClearAllRecipients();\n\t\n\t\t\t\t$this->AddAddress($row['to_email'], $row['to_name']);\n\t\t\t\t$this->From = $row['from_email'];\n\t\t\t\t$this->FromName = $row['from_name'];\n\t\t\t\t$this->CharSet = $row['char_set'];\n\t\t\t\t$this->Subject = $row['subject'];\n\t\t\t\t$this->Body = $row['body'];\n\t\n\t\t\t\tparent::Send();\n\t\n\t\t\t\t$mail_ids[] = $row['mail_id'];\n\t\t\t}\n\t\t\tif ($mail_ids) \n\t\t\t{\n\t\t\t\tinclude(AC_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');\n\t\t\t\t$mailQueueDAO = new MailQueueDAO();\n\t\n\t\t\t\t$mailQueueDAO->DeleteByIDs($mail_ids);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "70908a5eb3453cd4d6d1472d512d09c5", "score": "0.4599109", "text": "protected function deleteScheduledEmailByIdRequest($identifier)\n {\n // verify the required parameter 'identifier' is set\n if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $identifier when calling deleteScheduledEmailById'\n );\n }\n\n $resourcePath = '/smtp/email/{identifier}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($identifier !== null) {\n $resourcePath = str_replace(\n '{' . 'identifier' . '}',\n ObjectSerializer::toPathValue($identifier),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\n if ($apiKey !== null) {\n $headers['partner-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "76f32706e873bd939fb5efddaf540a2b", "score": "0.45946047", "text": "private function queueForWrite()\n {\n if (count($this->creates)) {\n // Debugging information\n $this->logger->info(__FILE__ . __FUNCTION__);\n\n $createObject = 'Synapse\\UploadBundle\\Job\\ManageGroupStudentBulkUpload';\n\n // get unique id\n $jobNumber = uniqid();\n\n // create the job with the information given\n $job = new $createObject();\n $job->queue = $this->queue;\n $job->args = array(\n 'creates' => $this->creates,\n 'jobNumber' => $jobNumber,\n 'uploadId' => $this->uploadId,\n 'orgId' => $this->organizationId,\n 'duplicatedExternalIDs' => implode(\",\", $this->duplicatedExternalIDs)\n );\n\n\n // send the job\n $this->jobs[$jobNumber] = $this->resque->enqueue($job, true);\n }\n // reset the object so the same thing is not uploaded each time\n $this->creates = [];\n }", "title": "" }, { "docid": "dddab92d18e02eb43cbe8840ec12cd06", "score": "0.4579092", "text": "protected function getWorkforcemanagementSchedulingjobRequest($jobId)\n {\n // verify the required parameter 'jobId' is set\n if ($jobId === null || (is_array($jobId) && count($jobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $jobId when calling getWorkforcemanagementSchedulingjob'\n );\n }\n\n $resourcePath = '/api/v2/workforcemanagement/schedulingjobs/{jobId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($jobId !== null) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($jobId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7a482c0f5d97110cabda4157e07ca45d", "score": "0.45652086", "text": "function create_scheduling_requests( &$resource ) {\n if ( ! is_object($resource) ) {\n dbg_error_log( 'PUT', 'create_scheduling_requests called with non-object parameter (%s)', gettype($resource) );\n return;\n }\n\n $attendees = $resource->GetPropertiesByPath('/VCALENDAR/*/ATTENDEE');\n\t$wr_attendees = $resource->GetPropertiesByPath('/VCALENDAR/*/X-WR-ATTENDEE');\n\tif ( count ( $wr_attendees ) > 0 ) {\n dbg_error_log( 'POST', 'Non-compliant iCal request. Using X-WR-ATTENDEE property' );\n foreach( $wr_attendees AS $k => $v ) {\n $attendees[] = $v;\n }\n }\n if ( count($attendees) == 0 ) {\n dbg_error_log( 'PUT', 'Event has no attendees - no scheduling required.', count($attendees) );\n return;\n }\n\n dbg_error_log( 'PUT', 'Adding to scheduling inbox %d attendees', count($attendees) );\n foreach( $attendees AS $attendee ) {\n $attendee->SetParameterValue( 'SCHEDULE-STATUS', write_scheduling_request( $resource, $attendee->Value(), true ) );\n }\n}", "title": "" }, { "docid": "4ca667c188b613002728e3f04236d93a", "score": "0.45410302", "text": "protected function scheduledPlansForSpaceRequest($space_id, $fields = null)\n {\n // verify the required parameter 'space_id' is set\n if ($space_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $space_id when calling scheduledPlansForSpace'\n );\n }\n\n $resourcePath = '/scheduled_plans/space/{space_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n\n // path params\n if ($space_id !== null) {\n $resourcePath = str_replace(\n '{' . 'space_id' . '}',\n ObjectSerializer::toPathValue($space_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4b64feaac878c779c1ba3fc5e64b31f4", "score": "0.453971", "text": "protected function addRequest($organization, $body, $processId, $witRefName, $groupId, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling add'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling add'\n );\n }\n // verify the required parameter 'processId' is set\n if ($processId === null || (is_array($processId) && count($processId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $processId when calling add'\n );\n }\n // verify the required parameter 'witRefName' is set\n if ($witRefName === null || (is_array($witRefName) && count($witRefName) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $witRefName when calling add'\n );\n }\n // verify the required parameter 'groupId' is set\n if ($groupId === null || (is_array($groupId) && count($groupId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $groupId when calling add'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling add'\n );\n }\n\n $resourcePath = '/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n // path params\n if ($processId !== null) {\n $resourcePath = str_replace(\n '{' . 'processId' . '}',\n ObjectSerializer::toPathValue($processId),\n $resourcePath\n );\n }\n // path params\n if ($witRefName !== null) {\n $resourcePath = str_replace(\n '{' . 'witRefName' . '}',\n ObjectSerializer::toPathValue($witRefName),\n $resourcePath\n );\n }\n // path params\n if ($groupId !== null) {\n $resourcePath = str_replace(\n '{' . 'groupId' . '}',\n ObjectSerializer::toPathValue($groupId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "bbfdd6e70d90be1459fcae584adeb166", "score": "0.45392138", "text": "public function delete($queue_id);", "title": "" }, { "docid": "f050b1b341cf448ddb10a323090840b6", "score": "0.45386273", "text": "protected function putEmailSenderRequest($sender_id, $email_sender_put_request)\n {\n // verify the required parameter 'sender_id' is set\n if ($sender_id === null || (is_array($sender_id) && count($sender_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $sender_id when calling putEmailSender'\n );\n }\n if ($sender_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$sender_id\" when calling SendersApi.putEmailSender, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'email_sender_put_request' is set\n if ($email_sender_put_request === null || (is_array($email_sender_put_request) && count($email_sender_put_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $email_sender_put_request when calling putEmailSender'\n );\n }\n\n $resourcePath = '/senders/email/{sender_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($sender_id !== null) {\n $resourcePath = str_replace(\n '{' . 'sender_id' . '}',\n ObjectSerializer::toPathValue($sender_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($email_sender_put_request)) {\n $_tempBody = $email_sender_put_request;\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Apikey');\n if ($apiKey !== null) {\n $headers['Apikey'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a94ce07c6d9391a14a1be838e72a5d74", "score": "0.45194376", "text": "public function queue($name = null);", "title": "" }, { "docid": "058a51f811298ba6eb3264cb4ca707b5", "score": "0.45113197", "text": "public function putRequest()\n\t{\n\n\t}", "title": "" }, { "docid": "725f1c678e7516ddf6bbffa4178d2f73", "score": "0.4503776", "text": "public function createQueue($queueName, $createQueueOptions = null);", "title": "" }, { "docid": "d1a31cad52924b4e758e5ce52b4bf350", "score": "0.45036888", "text": "protected function voucherMarkAsPaidRequest($id, $body = null) {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling voucherMarkAsPaid'\n );\n }\n\n $resourcePath = '/Voucher/{id}/markAsPaid';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "300568fe12a99d5598544c0be190adbc", "score": "0.4487947", "text": "public function archiveTokenRequest($token_id)\n {\n // verify the required parameter 'token_id' is set\n if ($token_id === null || (is_array($token_id) && count($token_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $token_id when calling archiveToken'\n );\n }\n\n $resourcePath = '/marketing/v3/transactional/smtp-tokens/{tokenId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($token_id !== null) {\n $resourcePath = str_replace(\n '{' . 'tokenId' . '}',\n ObjectSerializer::toPathValue($token_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (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 = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "3b4b4e2745b66159d7c2883e9b403104", "score": "0.44871387", "text": "public function initQueue($routingKey, $queueName = null, $durable = true, $autodelete = false)\n {\n try {\n $channel = $this->getChannel();\n\n // Set the publisher's queue\n if (empty($queueName) && !empty($this->queueName)) {\n $queueName = $this->queueName;\n } else\n $this->setQueueName($queueName);\n \n // Sets the routing key for the queue\n $this->setRoutingKey($routingKey);\n //Create queue or use existing (define as persistent)\n $channel->queue_declare($queueName, false, $durable, false, $autodelete);\n // Do the binding of queue to exchange to route messages to correct queue\n $channel->queue_bind($queueName, $this->exchangeName, $routingKey);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "dcf3e8d9e8fb61f9b85efbd0b61baae3", "score": "0.44822878", "text": "protected function jobsPostRequest($authorization, $body) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsPost'\n );\n }\n // Verify the required parameter 'body' is set.\n if ($body === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling jobsPost'\n );\n }\n\n $resourcePath = '/jobs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\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 }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "923d54b174058806c2b51261a50b6b8f", "score": "0.44680718", "text": "protected function deleteApiTaskRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling deleteApiTask'\n );\n }\n\n $resourcePath = '/task/{id}.json';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ef0aece396f038eca048163b50229692", "score": "0.44614497", "text": "protected function taskgroupsUpdateRequest($organization, $body, $project, $taskGroupId, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'project' is set\n if ($project === null || (is_array($project) && count($project) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $project when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'taskGroupId' is set\n if ($taskGroupId === null || (is_array($taskGroupId) && count($taskGroupId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskGroupId when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling taskgroupsUpdate'\n );\n }\n\n $resourcePath = '/{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n // path params\n if ($project !== null) {\n $resourcePath = str_replace(\n '{' . 'project' . '}',\n ObjectSerializer::toPathValue($project),\n $resourcePath\n );\n }\n // path params\n if ($taskGroupId !== null) {\n $resourcePath = str_replace(\n '{' . 'taskGroupId' . '}',\n ObjectSerializer::toPathValue($taskGroupId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\n if ($this->config->getAccessToken() !== null) {\n\t\t\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n\t\t}\n\n\t\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n\t\t}\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 }", "title": "" }, { "docid": "fd3e6efbb1c858234f514a400dc896ff", "score": "0.4459506", "text": "public function __construct($email_queue)\n {\n $this->email_queue = $email_queue;\n }", "title": "" }, { "docid": "a32ad204f11d56b7e4e520d8aac77fbc", "score": "0.44579569", "text": "public function addQueue($name, $starting = null, $ending = null) {\n $q = new Queue();\n $q->setName($name);\n\n $q->setLowerBound($starting);\n $q->setUpperBound($ending);\n\n $this->dm->persist($q);\n\n $this->dm->flush();\n\n return true;\n }", "title": "" }, { "docid": "47ad8d90283bc6ac43fdd2f3bf87b91c", "score": "0.44525307", "text": "public static function insert_from_queue( $id, $action, $args );", "title": "" }, { "docid": "4dd2269247c09853b79b66d67daebe0f", "score": "0.44465634", "text": "public static function enqueue($to, string $subject, array $data)\n {\n $validation = \\Config\\Services::validation();\n\n if($validation->check($to,'required|valid_email') && $validation->check($subject,'required')){\n\n $queue = new EmailQueueModel();\n\n return $queue->enqueue($to, $subject, $data);\n\n }else{\n\n return redirect()->back()->with('error', $validation->getErrors());\n\n }\n }", "title": "" }, { "docid": "e0d3f449b0d904549623003cc429ba47", "score": "0.44450578", "text": "protected function updateCustomerGroupRequest($number, $body)\n {\n // verify the required parameter 'number' is set\n if ($number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $number when calling updateCustomerGroup'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateCustomerGroup'\n );\n }\n\n $resourcePath = '/customer-groups/{number}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($number !== null) {\n $resourcePath = str_replace(\n '{' . 'number' . '}',\n ObjectSerializer::toPathValue($number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\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 (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "cbf4cfec6ae0b3cd01e14bd005eaa8aa", "score": "0.44407734", "text": "public function addOrganisationToQueue(AddOrganisationToQueueRequest $request)\n {\n $this->manageCustomerQueue->addOrganisationToQueue($request);\n\n notify()->flash($request->input('organisationName') . \" Successfully Added to the Queue!\", \"success\", ['icon' => \"check\"]);\n\n return Redirect::back();\n }", "title": "" }, { "docid": "6902165140ca385323080ef377408457", "score": "0.44266328", "text": "public function queue();", "title": "" }, { "docid": "c85520c0867e66217b9ed23b6ab6820d", "score": "0.44249249", "text": "public function createShipmentRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createShipment'\n );\n }\n\n $resourcePath = '/mfn/v0/shipments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (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\\Query::build($formParams);\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\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "56c31fe83158b06517198d0cde8b7e96", "score": "0.44099864", "text": "function qruqsp_ntst_messageAdd(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'participant_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Participant'),\n 'status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Status'),\n 'number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Message Number'),\n 'precedence'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Precedence'),\n 'hx'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Handling'),\n 'station_of_origin'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Station of Origin'),\n 'check_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Check'),\n 'place_of_origin'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Place of Origin'),\n 'time_filed'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Time Filed'),\n 'date_filed'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Date Filed'),\n 'to_name_address'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Name/Address'),\n 'phone_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Phone Number'),\n 'email'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Email'),\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\n 'spoken'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Spoken'),\n 'signature'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Signature'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'private', 'checkAccess');\n $rc = qruqsp_ntst_checkAccess($ciniki, $args['tnid'], 'qruqsp.ntst.messageAdd');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n \n //\n // Load the net details for the participant\n //\n $strsql = \"SELECT participants.callsign, \"\n . \"participants.name, \"\n . \"participants.flags, \"\n . \"participants.place_of_origin, \"\n . \"participants.phone, \"\n . \"participants.email, \"\n . \"nets.id AS net_id, \"\n . \"nets.name, \"\n . \"nets.message_sources \"\n . \"FROM qruqsp_ntst_participants AS participants \"\n . \"INNER JOIN qruqsp_ntst_nets AS nets ON (\"\n . \"participants.net_id = nets.id \"\n . \"AND nets.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE participants.id = '\" . ciniki_core_dbQuote($ciniki, $args['participant_id']) . \"' \"\n . \"AND participants.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'qruqsp.ntst', 'participant');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.10', 'msg'=>'Unable to load participant', 'err'=>$rc['err']));\n }\n if( !isset($rc['participant']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.11', 'msg'=>'Unable to find requested participant'));\n }\n $participant = $rc['participant'];\n $args['net_id'] = $rc['participant']['net_id'];\n\n $dt = new DateTime('now', new DateTimezone('UTC'));\n if( !isset($args['time_filed']) || $args['time_filed'] == '' ) {\n $args['time_filed'] = $dt->format('Hi') . 'Z';\n }\n if( !isset($args['date_filed']) || $args['date_filed'] == '' ) {\n $args['date_filed'] = $dt->format('M d');\n }\n $dt->sub(new DateInterval('P3M'));\n\n //\n // Check for next number if one was not passed\n //\n if( !isset($args['number']) || $args['number'] == '' ) {\n $strsql = \"SELECT MAX(messages.number) AS num \"\n . \"FROM qruqsp_ntst_participants AS participants \"\n . \"INNER JOIN qruqsp_ntst_messages AS messages ON (\"\n . \"participants.id = messages.participant_id \"\n . \"AND messages.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND messages.date_added > '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"' \"\n . \") \"\n . \"\";\n// $strsql .= \"WHERE participants.callsign = '\" . ciniki_core_dbQuote($ciniki, $participant['callsign']) . \"' \";\n $strsql .= \"WHERE participants.net_id = '\" . ciniki_core_dbQuote($ciniki, $participant['net_id']) . \"' \";\n $strsql .= \"AND participants.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'qruqsp.ntst', 'last');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.26', 'msg'=>'Unable to load number', 'err'=>$rc['err']));\n }\n if( isset($rc['last']['num']) && $rc['last']['num'] != '' ) {\n $args['number'] = sprintf(\"%03d\", ($rc['last']['num'] + 1));\n } else {\n $args['number'] = '001';\n }\n }\n\n if( !isset($args['precedence']) || $args['precedence'] == '' ) {\n $args['precedence'] = 'R';\n }\n\n if( !isset($args['station_of_origin']) || $args['station_of_origin'] == '' ) {\n $args['station_of_origin'] = $participant['callsign'];\n }\n if( !isset($args['place_of_origin']) || $args['place_of_origin'] == '' ) {\n $args['place_of_origin'] = $participant['place_of_origin'];\n }\n\n //\n // Load a message if one is not supplied\n //\n/* if( !isset($args['message']) || $args['message'] == '' ) {\n //\n // Get the last 3 months or 100 messages MD5's to compare with our message file\n //\n $strsql = \"SELECT md5(message) AS m \"\n . \"FROM qruqsp_ntst_messages \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY date_added DESC \"\n . \"LIMIT 100 \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQueryList');\n $rc = ciniki_core_dbQueryList($ciniki, $strsql, 'qruqsp.ntst', 'messages', 'm');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.24', 'msg'=>'Unable to load the list of messages', 'err'=>$rc['err']));\n }\n $existing_messages = isset($rc['messages']) ? $rc['messages'] : '';\n\n //\n // Load the messages file specified for th net\n //\n $message_source = 'quotes.csv';\n if( isset($participant['message_sources']) ) {\n //\n // FIXME: Add lookup of source\n //\n }\n\n //\n // Open the messages file, and generate MD5 array\n //\n $filename = $ciniki['config']['ciniki.core']['root_dir'] . '/qruqsp-mods/ntst/messages/' . $message_source;\n $message_file = file($filename);\n $messages = array();\n foreach($message_file as $line) {\n $pieces = explode(\"::\", $line);\n if( is_array($pieces) && count($pieces) > 1 ) {\n $messages[md5($pieces[0])] = array(\n 'message' => preg_replace(\"/\\[\\[(.*)||.*\\]\\]/g\", \"$1\", $pieces[0]),\n 'spoken' => preg_replace(\"/\\[\\[.*||(.*)\\]\\]/g\", \"$1\", $pieces[0]),\n 'signature' => $pieces[1],\n );\n }\n }\n if( count($messages) < 2 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.25', 'msg'=>'Message file is empty.'));\n }\n\n //\n // Find the last message sent from this file, so we know what's the next\n // message to send. Go through the list of existing md5 hashes in \n // descending order from the SQL above to find last one used.\n //\n foreach($existing_messages as $hash) {\n if( isset($messages[$hash]) ) {\n //\n // MD5 exists, now find position in array\n //\n $next = 'no';\n foreach($messages as $k => $v) {\n if( $next == 'yes' ) {\n $next_message = $v;\n break;\n } \n if( $k == $hash ) {\n $next = 'yes';\n// $next_message = next($messages);\n// if( $next_message === false ) {\n// $next_message = reset($messages);\n// }\n// break;\n }\n }\n \n break;\n }\n }\n if( !isset($next_message) ) {\n $next_message = reset($messages);\n }\n\n //\n // Setup the args with the next message\n //\n $args['message'] = $next_message['message'];\n $args['spoken'] = $next_message['spoken'];\n $args['signature'] = $next_message['signature'];\n }\n*/\n if( !isset($args['check_number']) || $args['check_number'] == '' || $args['check_number'] == 0 ) {\n $args['check_number'] = str_word_count($args['message']);\n }\n\n if( !isset($args['to_name_address']) || $args['to_name_address'] == '' ) {\n $args['to_name_address'] = 'All Stations';\n }\n\n //\n // Start transaction\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'qruqsp.ntst');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Add the message to the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $args['tnid'], 'qruqsp.ntst.message', $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'qruqsp.ntst');\n return $rc;\n }\n $message_id = $rc['id'];\n\n //\n // Commit the transaction\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'qruqsp.ntst');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Email the message\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'private', 'messageSend');\n $rc = qruqsp_ntst_messageSend($ciniki, $args['tnid'], $message_id);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.27', 'msg'=>'', 'err'=>$rc['err']));\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, $args['tnid'], 'qruqsp', 'ntst');\n\n //\n // Update the web index if enabled\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec');\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'qruqsp.ntst.message', 'object_id'=>$message_id));\n\n //\n // Return the details for the net\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'public', 'netGet');\n $ciniki['request']['args']['net_id'] = $args['net_id'];\n return qruqsp_ntst_netGet($ciniki);\n}", "title": "" }, { "docid": "08237bba106adb203bd086f7b1cef773", "score": "0.440803", "text": "static public function queueAdd($schoolID)\n { \n global $db;\n // Cancel any current request\n self::queueCancel($schoolID);\n\n // Number of partipants\n $query = \"\n SELECT\n COUNT(*) AS count\n FROM `contestant`, `team`, `group`\n WHERE \n `contestant`.teamID = `team`.ID AND\n `team`.groupID = `group`.ID AND\n `group`.schoolID = :schoolID AND\n `team`.`participationType` = 'Official' AND\n `group`.contestID IN (\".CERTIGEN_CONTESTS.\")\n \";\n $stmt = $db->prepare($query);\n $stmt->execute(array(':schoolID' => $schoolID));\n $nbStudents = $stmt->fetchObject()->count;\n\n if ($nbStudents == 0)\n return;\n\n $query = \"\n INSERT INTO `certi_queue` (`schoolID`,`nbStudents`,`requestDate`,`state`)\n VALUES (:schoolID, :nbStudents, NOW(), :stateWaiting)\n \";\n $stmt = $db->prepare($query);\n $stmt->execute(array_merge(array(':schoolID' => $schoolID, ':nbStudents' => $nbStudents), self::getArrayStates($query))); \n }", "title": "" }, { "docid": "84bcda3790d974ad600700923cc690c4", "score": "0.44007054", "text": "public function store(Request $request , $id)\n {\n\n $data = $request->all();\n $data['project_id']= $id;\n\n return $this->service->create($data);\n\n }", "title": "" }, { "docid": "e20004ab070ff715561c50724b04514c", "score": "0.43962225", "text": "public function testGetInvalidQueueByQueueId() {\n\t\t// first, assert the mySQL class is sane\n\t\t$this->assertNotNull($this->mysqli);\n\n\t\t// grab a queue that could never exist\n\t\t$mysqlQueue = Queue::getQueueByQueueId($this->mysqli, 12);\n\t\t$this->assertNull($mysqlQueue);\n\t}", "title": "" }, { "docid": "e7ceece98db055eb453d1649385871bf", "score": "0.43941742", "text": "protected function campaignsUpdateRequest($data)\n {\n // verify the required parameter 'data' is set\n if ($data === null || (is_array($data) && count($data) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $data when calling campaignsUpdate'\n );\n }\n\n $resourcePath = '/campaigns/update';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\n $multipart = true;\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', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\n if ($apiKey !== null) {\n $queryParams['access_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\n if ($apiKey !== null) {\n $queryParams['nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\n if ($apiKey !== null) {\n $queryParams['timestamp'] = $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 if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n } else {\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n }\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "12b03184f0fd8bdd7888aad0527d6b0a", "score": "0.4378426", "text": "protected function taskgroupsAddRequest($organization, $body, $project, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling taskgroupsAdd'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling taskgroupsAdd'\n );\n }\n // verify the required parameter 'project' is set\n if ($project === null || (is_array($project) && count($project) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $project when calling taskgroupsAdd'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling taskgroupsAdd'\n );\n }\n\n $resourcePath = '/{organization}/{project}/_apis/distributedtask/taskgroups';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n // path params\n if ($project !== null) {\n $resourcePath = str_replace(\n '{' . 'project' . '}',\n ObjectSerializer::toPathValue($project),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\n if ($this->config->getAccessToken() !== null) {\n\t\t\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n\t\t}\n\n\t\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n\t\t}\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8eee9d42aeb0950cf477af88fc1f2cda", "score": "0.43750218", "text": "public function __construct(QueueFactory $queue) {\n $this->queue = $queue;\n }", "title": "" }, { "docid": "2db2ceeb14da310bbe934ba0691a15c0", "score": "0.4371527", "text": "protected function addQueue($action, $managerName, $model, $id = null)\n {\n if (!in_array($action, array( self::QUEUE_ACTION_PERSIST, self::QUEUE_ACTION_REMOVE))) {\n throw new \\InvalidArgumentException(sprintf('Action unknown, manager name : \"%s\".', $managerName));\n }\n\n $this->queueActions[] = $action;\n $this->queueManagerNames[] = $managerName;\n $this->queueModels[] = $model;\n $this->queueIds[] = $id;\n }", "title": "" }, { "docid": "84ce8e317e66092a482a2f5595ad3361", "score": "0.43677002", "text": "public function getQueueableId()\n {\n return $this->getKey();\n }", "title": "" }, { "docid": "eb4bf28b4d1bb175435ba9f22ebd3725", "score": "0.436672", "text": "public abstract function release($queueName, array $message, $options = []);", "title": "" }, { "docid": "5c9d9b515173524a3037c6cddf3a413b", "score": "0.43585724", "text": "function messages_post() //create\n {\n $message = array('id' => $this->get('id'), 'name' => $this->post('name'), 'email' => $this->post('email'), 'message' => 'ADDED!');\n \n $this->response($message, 200); // 200 being the HTTP response code\n }", "title": "" }, { "docid": "ccebc9dcffe9145809bf83ebe6c64797", "score": "0.4357377", "text": "public function getQueueID()\n {\n return $this->queueID;\n }", "title": "" }, { "docid": "8c2263209c81ae6e96e31916430262c0", "score": "0.4349991", "text": "function insertRequestInDb($user_id, $requestId, $toId)\n {\n $bdd = getConnexion();\n $sth = $bdd->prepare('INSERT INTO invitation (requestId, toId, senderId) VALUES (:request, :item, :sender )');\n $sth->bindParam(':sender', cleanData($user_id));\n $sth->bindParam(':request', cleanData($requestId));\n \n foreach ($toId as $to){\n $sth->bindParam(':item', $to);\n $sth->execute();\n }\n }", "title": "" }, { "docid": "c9932becd984c3257c71fc0d71c24400", "score": "0.43436968", "text": "protected function addReceivingWorksheetRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addReceivingWorksheet'\n );\n }\n\n $resourcePath = '/beta/receivingWorksheet';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "12c00e47cd5f21a0281ebdd6203062bf", "score": "0.43411577", "text": "protected function jobsJobIdDeleteRequest($authorization, $job_id) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdDelete'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdDelete'\n );\n }\n\n $resourcePath = '/jobs/{jobId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\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 }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "74dd2758e1826e03d070a0c29c553d63", "score": "0.43336242", "text": "public function tasks_put($id = NULL) {\n\t\t$id = $id == NULL ? $this->put('workitem_id') : $id;\n\t\tself::validate_access($id);\n\t\t$task = deserialize($this->get_data(), WorkitemTask::find($this->put('id')));\n\t\t$task->done_date = now();\n\t\t$task->save();\n\t\treturn $task;\n\t}", "title": "" }, { "docid": "9079d9e850cac0a90ab806d068823e93", "score": "0.43333855", "text": "public function store($org_id = null, $cal_id = null)\n\t{\n\t\tif(!Input::has('schedule'))\n\t\t{\n\t\t\treturn new JSend('error', (array)Input::all(), 'Tidak ada data schedule.');\n\t\t}\n\n\t\t$errors\t\t\t\t\t\t= new MessageBag();\n\n\t\tDB::beginTransaction();\n\n\t\t//1. store schedule of calendar to queue\n\t\t$schedule\t\t\t\t\t\t= Input::get('schedule');\n\n\t\tif(is_null($schedule['id']))\n\t\t{\n\t\t\t$is_new\t\t\t\t\t= true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$is_new\t\t\t\t\t= false;\n\t\t}\n\n\t\t$schedule_rules\t\t\t\t=\t[\n\t\t\t\t\t\t\t\t\t\t\t'calendar_id'\t\t\t\t\t=> 'required|exists:tmp_calendars,id',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t\t\t\t\t\t\t=> 'required|max:255',\n\t\t\t\t\t\t\t\t\t\t\t'status'\t\t\t\t\t\t=> 'required|in:DN,CB,UL,HB,L',\n\t\t\t\t\t\t\t\t\t\t\t'on'\t\t\t\t\t\t\t=> 'required|date_format:\"Y-m-d H:i:s\"',\n\t\t\t\t\t\t\t\t\t\t\t'start'\t\t\t\t\t\t\t=> 'required|date_format:\"H:i:s\"',\n\t\t\t\t\t\t\t\t\t\t\t'end'\t\t\t\t\t\t\t=> 'required|date_format:\"H:i:s\"',\n\t\t\t\t\t\t\t\t\t\t];\n\n\t\t//1a. Validate Basic schedule Parameter\n\t\t$parameter \t\t\t\t\t= $schedule;\n\t\tunset($parameter['calendar']);\n\n\t\t$validator\t\t\t\t\t= Validator::make($parameter, $schedule_rules);\n\n\t\tif (!$validator->passes())\n\t\t{\n\t\t\t$errors->add('Schedule', $validator->errors());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$total \t\t\t\t\t\t= \\App\\Models\\Work::calendarid($cal_id)->count();\n\n\t\t\t$queue \t\t\t\t\t\t= new \\App\\Models\\Queue;\n\t\t\t$queue->fill([\n\t\t\t\t\t'process_name' \t\t\t=> 'hr:schedules',\n\t\t\t\t\t'process_option' \t\t=> 'store',\n\t\t\t\t\t'parameter' \t\t\t=> json_encode($parameter),\n\t\t\t\t\t'total_process' \t\t=> $total,\n\t\t\t\t\t'task_per_process' \t\t=> 1,\n\t\t\t\t\t'process_number' \t\t=> 0,\n\t\t\t\t\t'total_task' \t\t\t=> $total,\n\t\t\t\t\t'message' \t\t\t\t=> 'Initial Commit',\n\t\t\t\t]);\n\n\t\t\tif(!$queue->save())\n\t\t\t{\n\t\t\t\t$errors->add('Schedule', $queue->getError());\n\t\t\t}\n\t\t}\n\t\t//End of validate schedule\n\n\t\t//2. store schedule of calendars to queue\n\t\tif(!$errors->count() && isset($schedule['calendar']['calendars']) && is_array($schedule['calendar']['calendars']))\n\t\t{\n\t\t\tforeach ($schedule['calendar']['calendars'] as $key => $value) \n\t\t\t{\n\t\t\t\t$cals_data\t\t\t\t\t\t= \\App\\Models\\Calendar::id($value['id'])->calendarid($cal_id)->first();\n\n\t\t\t\tif(!$cals_data)\n\t\t\t\t{\n\t\t\t\t\t$errors->add('Calendar', 'Tidak ada kalender '.$value['name']);\n\t\t\t\t}\n\n\t\t\t\tif(!$errors->count())\n\t\t\t\t{\n\t\t\t\t\t$total \t\t\t\t\t\t= \\App\\Models\\Work::calendarid($value['id'])->count();\n\t\t\t\t\t$parameter['calendar_id']\t= $value['id'];\n\n\t\t\t\t\t$queue \t\t\t\t\t\t= new \\App\\Models\\Queue;\n\t\t\t\t\t$queue->fill([\n\t\t\t\t\t\t\t'process_name' \t\t\t=> 'hr:schedules',\n\t\t\t\t\t\t\t'process_option' \t\t=> 'store',\n\t\t\t\t\t\t\t'parameter' \t\t\t=> json_encode($parameter),\n\t\t\t\t\t\t\t'total_process' \t\t=> $total,\n\t\t\t\t\t\t\t'task_per_process' \t\t=> 1,\n\t\t\t\t\t\t\t'process_number' \t\t=> 0,\n\t\t\t\t\t\t\t'total_task' \t\t\t=> $total,\n\t\t\t\t\t\t\t'message' \t\t\t\t=> 'Initial Commit',\n\t\t\t\t\t\t]);\n\n\t\t\t\t\tif(!$queue->save())\n\t\t\t\t\t{\n\t\t\t\t\t\t$errors->add('Schedule', $queue->getError());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//End of validate calendar schedule\n\n\t\tif($errors->count())\n\t\t{\n\t\t\tDB::rollback();\n\n\t\t\treturn new JSend('error', (array)Input::all(), $errors);\n\t\t}\n\n\t\tDB::commit();\n\t\t\n\t\treturn new JSend('success', (array)Input::all());\n\t}", "title": "" }, { "docid": "69b96e87df060bf0eb30e09d656880fd", "score": "0.4330022", "text": "public function enqueue(FoiaRequestInterface $foiaRequest);", "title": "" }, { "docid": "0eff76a91c1ca6df3c124da4bb623e9a", "score": "0.4329129", "text": "public function setQueuedAt($time = REQUEST_TIME) {\n $this->getKeyValueStore()\n ->set($this->formatKeyName('queued'), (int) $time);\n\n return $this;\n }", "title": "" }, { "docid": "cc57cb249be54b225477edf5770bb699", "score": "0.43278915", "text": "public function update_queue($arr = array()) {\n\t\t\tglobal $wpdb,$scrape_core,$_params;\n\t\t\t$where = array(\n\t\t\t\t'target_id' => $_params['target_id']\n\t\t\t);\n\t\t\t$arr['last_checked'] = current_time('mysql');\n\t\t\t$table_name = $wpdb->prefix . \"scrape_n_post_queue\";\n\t\t\t$rows_affected = $wpdb->update($table_name, $arr, $where);\n\t\t\t//needs message\n\t\t}", "title": "" }, { "docid": "2b5827735e1071b64a72fb2a20be9182", "score": "0.4327712", "text": "public function testSerializeCreatingAPIKeyRequest() {\n\n // Set an Creating API key request mock.\n $arg = new CreatingAPIKeyRequest();\n\n $obj = new RequestSerializer();\n\n $res = [];\n $this->assertEquals($res, $obj->serialize($arg));\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "a433e4db90e8b2bc1724f47789dc0d06", "score": "0.0", "text": "public function edit($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "a6688716096de732ac676d2606652404", "score": "0.7856724", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "5781a2d120285a71e7e85b5a66be6d25", "score": "0.7830503", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "aa97beee62e2049b01f82b2c70781d18", "score": "0.7470551", "text": "public function edit(Resource $resource)\n {\n if (session()->has('index-referer-url')) {\n session()->keep('index-referer-url');\n }\n\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "06fbfb28b57b10ad3e552f17914cc366", "score": "0.73990756", "text": "public function edit(Request $request, $resource)\n { \n return view($this->editView)\n ->withForm($this->form()->setModel($resource))\n ->withName($this->name())\n ->withTitle($this->title())\n ->withActions($this->getActions())\n ->withRouteParameters(\n (array) $this->routeParameters('create', $resource)\n );\n }", "title": "" }, { "docid": "04c9b7d4ef866f36e89d6540166ef493", "score": "0.7218755", "text": "public function edit($resource, $action)\n {\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n abort(404, 'There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n }\n\n return view('resource-edit', [\n 'pageTitle' => 'Edit ' . ucwords($resource) . ' ' . ucwords($action) . ' Settings | TEvo Harvester',\n 'harvest' => $harvest,\n ]);\n }", "title": "" }, { "docid": "58505837b719ae51ea23d0844976dedc", "score": "0.7187763", "text": "public function editButton()\n {\n $entity = $this->entity;\n $resource = $this->entity->getResourceName();\n\n return new HtmlString(\n view(\n 'layouts.dashboard.presenters.resource.edit',\n compact('entity', 'resource')\n )->render()\n );\n }", "title": "" }, { "docid": "fd7d6fa05564d94ddfe2439eb1a68e36", "score": "0.7141603", "text": "public function edit($id)\r\n {\r\n $obj = $this->model->getObject($id);\r\n $formView = parent::getFormView(array($id));\r\n $formView->setPost($obj); \r\n $formView->show(); \r\n }", "title": "" }, { "docid": "b0265d02f79c0a87495c917bcb066d03", "score": "0.71170145", "text": "public function showeditAction()\r\n {\r\n $this->render('edit');\r\n }", "title": "" }, { "docid": "77b52a1680fa491d92522682bb1dab03", "score": "0.71064025", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "dc519a1d109593cfac33c1ecb77b69d6", "score": "0.7088185", "text": "public function edit($id)\n {\n $resource = Resource::findorfail($id);\n return view('resources.edit', ['resource'=>$resource]);\n }", "title": "" }, { "docid": "0181f4ab3b675f1e32e7436eec8db0b2", "score": "0.7083328", "text": "public function edit()\n {\n return view('management::edit');\n }", "title": "" }, { "docid": "839bff7657627eb0e9f3c735e392600c", "score": "0.7049996", "text": "public function editAction(){\n // Current PO to show.\n $currentSupplier = $this->request->getQuery('supplier', 'int');\n // Pass the general parameters to the view.\n $this->view->setVar('title', 'Supplier #' . $currentSupplier);\n $this->view->setVar('subtitle', 'dat dat dat');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', TRUE);\n $this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', TRUE);\n $this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', '');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'po/search');\n }", "title": "" }, { "docid": "23425e32ade1f142faf8d64875349c14", "score": "0.7040024", "text": "function edit( $resource ){\n\n $order = get( 'orders', $resource );\n\n return view( 'admin/order/add_order', compact( 'order' ) );\n}", "title": "" }, { "docid": "eb85fc5f08fd4d7f2735a44b666998b1", "score": "0.7028135", "text": "public function renderEditForm()\n {\n // Take id from $_GET, fetch record, pass on record as $vars in array\n if (isset($_GET['book_id']) && (int)$_GET['book_id'] > 0 && !is_null(BookModel::get($_GET['book_id']))) {\n $book = BookModel::get($_GET['book_id']);\n return View::render(\n 'edit-book',\n [\n 'book' => $book\n ]\n );\n }\n }", "title": "" }, { "docid": "6102774974292f3760289857daf62d5e", "score": "0.70018315", "text": "public function editAction($id)\n {\n $entity = $this->findOr404($this->repository,array('id'=>$id));\n\n\n $editForm = $this->createForm($this->form, $entity);\n\n return $this->render($this->path_template.':edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'route_prefix' => $this->route_prefix\n ));\n }", "title": "" }, { "docid": "9fa88f8a8c6146d7915873c2976a0c19", "score": "0.69807905", "text": "public function edit(Resform $resform)\n {\n //\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69469565", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.69469565", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.6943076", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "14ceb6f06e6f144fe7b54f8bae8bbe21", "score": "0.69139755", "text": "public function edit()\n {\n return view('superadmin::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6911013", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6911013", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68989486", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "9197e5f6646ab8a602e1ff00b9e41fb5", "score": "0.68830246", "text": "public function edit() {\n\t\tglobal $tpl;\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.6868294", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "51a9f359ceb6df3625a9742305229a9b", "score": "0.686645", "text": "public function action_edit()\n {\n if (!empty($this->m_partial)) {\n $this->partial($this->m_partial);\n\n return;\n }\n\n $node = $this->m_node;\n\n $record = $this->getRecord();\n\n if ($record === null) {\n $location = $node->feedbackUrl('edit', self::ACTION_FAILED, $record);\n $node->redirect($location);\n }\n\n // allowed to edit record?\n if (!$this->allowed($record)) {\n $this->renderAccessDeniedPage();\n\n return;\n }\n\n $record = $this->mergeWithPostvars($record);\n\n $this->notify('edit', $record);\n $res = $this->invoke('editPage', $record);\n\n $page = $this->getPage();\n $page->addContent($node->renderActionPage('edit', $res));\n }", "title": "" }, { "docid": "cb9340a304c83c3a9a371e60993460e3", "score": "0.68608934", "text": "public function edit()\n {\n $data['individual'] = $this->getIndividualSeminar();\n $this->load->view('Dashboard/header');\n $this->load->view('Seminar/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "title": "" }, { "docid": "f4908ef32054735fdce9f1476c5fed8c", "score": "0.6860868", "text": "public function edit()\n {\n return view('hethong::edit');\n }", "title": "" }, { "docid": "8848eef52013ec9c31efa5d9e1d9581d", "score": "0.6850079", "text": "public function edit()\n {\n //\n return view('editProfessor');\n }", "title": "" }, { "docid": "326743aa2b21211a1afd860fcd859372", "score": "0.681466", "text": "public function edit($id)\n\t{ \n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, ['user' => $this->resource]);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, array('user' => $this->resource))->render(); \n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t);\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68075293", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "926dd112a4ef916660ebcc2f8108ad0c", "score": "0.6805087", "text": "public function edit($id)\n {\n $page = Page::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('pages.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('page', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68023866", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.6795616", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "56ed8b2cfb426d64dc8a271149d4a6c5", "score": "0.6794153", "text": "public function edit($id)\n\t{\n\t\t$signatures = Signature::get();\n\t\t$teachers = Teacher::get();\n\t\t$resource = Resource::findOrFail($id);\n\n\t\treturn view('resource.edit', compact('resource', 'signatures', 'teachers'));\n\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.67915684", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.67915684", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "9ef91ee9f6a8dcb15ea27096aa56e4fb", "score": "0.6782868", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$product = Product::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('admin.product.edit')\n\t\t\t->with('product', $product);\n\t}", "title": "" }, { "docid": "2761e36b6aa51ebff28c1747bd1a9924", "score": "0.6779798", "text": "public function edit()\n {\n return view('datamemory::edit');\n }", "title": "" }, { "docid": "deba4f5487a02e79ef9e2e2bfde73c6a", "score": "0.6779549", "text": "public function edit($id)\n {\n $this->isEditing = true;\n $this->patient = Patient::find($id);\n $this->user = $this->patient->user;\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "95eb405d84481bce79c5b504d5687466", "score": "0.67747486", "text": "public function edit()\n {\n return view('tendermaster::edit');\n }", "title": "" }, { "docid": "76e1df6d2666fcc9e5012bf26b397bee", "score": "0.67739016", "text": "public function formEditar($id) {\n $product = Product::find($id);\n\n /*### SE NÃO LOCALIZAR, ABORTA ###*/\n if(!$product) {\n\n abort(404);\n }\n /*### SE NÃO LOCALIZAR, ABORTA ###*/\n\n //ABRE A VIEW DE EDIÇÃO\n return view('products.edit', compact('product'));\n\n }", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6762886", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "ac23622c3fc5df8461dba597a28f8bcb", "score": "0.67608607", "text": "public function edit()\n {\n $product = Product::findBy('id', $_GET['id']);\n\n return view('admin/product/edit', compact('product'));\n }", "title": "" }, { "docid": "1c2a145885cc53fe0f501d19a56a5bc0", "score": "0.6755481", "text": "public function edit($id) {\n\t\t$this->authorize('update', $this->repo->model());\n\t\tif ($this->request->ajax()) {\n\t\t\t$model = $this->repo->findOrFail($id);\n\t\t\treturn view($this->view . 'form', compact('model'));\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\t}", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.6746726", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67450166", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "f45c32e1819279bea701d7e847e50be1", "score": "0.6737096", "text": "public function edit($id) //Mostra o formulário de Editar \n {\n return \"Formulário para Editar Cliente com ID \" .$id;\n }", "title": "" }, { "docid": "13b220d1119b9c3b276a10c0422ad486", "score": "0.67340374", "text": "public function editAction($id);", "title": "" }, { "docid": "58c30f85a70f88f1e9b28e838f77705f", "score": "0.67296666", "text": "public function edit($id){\n $product = Product::find($id);\n \n //load form view\n return view('product.edit', ['product' => $product]);\n }", "title": "" }, { "docid": "58c30f85a70f88f1e9b28e838f77705f", "score": "0.67296666", "text": "public function edit($id){\n $product = Product::find($id);\n \n //load form view\n return view('product.edit', ['product' => $product]);\n }", "title": "" }, { "docid": "0db52b14d5721483125f9c0f73da2a71", "score": "0.6725265", "text": "public function editAction()\n {\n $personCatalog = PersonCatalog::getInstance();\n $idPerson = $this->getRequest()->getParam('idPerson');\n $person = $personCatalog->getById($idPerson);\n $post = array(\n 'id_person' => $person->getIdPerson(),\n 'name' => $person->getName(),\n 'middle_name' => $person->getMiddleName(),\n 'last_name' => $person->getLastName(),\n 'birthdate' => $person->getBirthdate(),\n 'ssn' => $person->getSsn(),\n 'genre' => $person->getGenre(),\n 'marital_status' => $person->getMaritalStatus(),\n 'curp' => $person->getCurp(),\n 'nationality' => $person->getNationality(),\n 'id_fiscal_entity' => $person->getIdFiscalEntity(),\n );\n $this->view->post = $post;\n $this->setTitle('Edit Person');\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.672352", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "b75fe06b66440ec2bc0b1975839b9db3", "score": "0.6722548", "text": "public function edit($id)\n {\n $item = $this->model::findOrFail($id);\n\n SEO::setTitle('Edit ' . title_case($this->singular) . ': ' . $item->label);\n SEO::setDescription('Edit ' . title_case($this->singular) . ': ' . $item->label);\n\n $fields = $this->getFieldsFromRules(new $this->formRequest);\n\n $viewPrefix = request()->is('admin*') ? 'admin.' : '';\n\n return view(\n $viewPrefix.'crud.edit',\n [\n 'item' => $item,\n 'model' => $this->model,\n 'slug' => $this->slug,\n 'fields' => $fields,\n ]\n );\n }", "title": "" }, { "docid": "3edbba277d97d5405287bfc7a96bbf56", "score": "0.67170596", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('forms.edit', compact('form', 'id'));\n }", "title": "" }, { "docid": "b79b901144374465ebd3d31441a9b2e5", "score": "0.67081386", "text": "public function edit(Entity $entity)\n {\n return $this->form($entity);\n }", "title": "" }, { "docid": "51f89c5d5d1bd15cea7d45cabafe8e6f", "score": "0.6707989", "text": "public function edit()\n\t{\n\t\t$this->view->assignmentOptions = $this->getAssignmentOptions();\n\t\t$this->view->roles = $this->getRoles();\n\t\t$this->view->gender = $this->getGender();\n\t\t$this->view->areas = PresenterFactory::getInstance('Reports')->getArea(true);\n\t\treturn $this->view('edit');\n\t}", "title": "" }, { "docid": "b06d58ea5570ba05f85ba7ffb36e67e7", "score": "0.669607", "text": "public function edit($id)\n {\n return $this->view('edit');\n }", "title": "" }, { "docid": "6431a5588c915992cb19d3e7612bc296", "score": "0.6695045", "text": "public function edit($id)\n {\n $form = Forms::findOrFail($id);\n\n return view('formbuilder::admin.forms.edit', compact('form'));\n }", "title": "" }, { "docid": "2ec8c313c533a6f5842b628922d6a1a0", "score": "0.66918045", "text": "public function edit()\n {\n $company = Company::first();\n return view(config('laravel-company-module.views.company.edit'), compact('company'));\n }", "title": "" }, { "docid": "f14d9738fc54a55b925b94b3252a0061", "score": "0.66900253", "text": "public function edit($id)\n {\n $this->crud->hasAccessOrFail('update');\n\n $this->data['entry'] = $this->crud->getEntry($id);\n\n\n $this->data['crud'] = $this->crud;\n $this->data['saveAction'] = $this->getSaveAction();\n $this->data['fields'] = $this->crud->getUpdateFields($id);\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\n $this->data['id'] = $id;\n\n return view($this->crud->getEditView(), $this->data);\n }", "title": "" }, { "docid": "b459e42451a6fb5dac4372c9f2cf88a1", "score": "0.6682187", "text": "public function edit (Request $request)\n {\n $model = $this->resource->model();\n $this->authorize('update', $model);\n\n $form = $this->getForm($request, $model);\n\n return $this->render('edit', compact('model', 'form'), $request);\n }", "title": "" }, { "docid": "1deb6920d550e3550137d6f49a6d7aeb", "score": "0.66820544", "text": "public function edit($id)\n {\n $model = Suplier::find($id);\n return view('backend.suplier.form',['model'=>$model,'update'=>1]);\n }", "title": "" }, { "docid": "8811651512fbad624a5342b1c61e6ef3", "score": "0.66780823", "text": "public function edit($id)\n {\n $model = Supplier::findOrFail($id);\n return view('admin.supplier.form', compact('model'));\n }", "title": "" }, { "docid": "d58aeddc51a32d8c85adcbf8fc206a39", "score": "0.66672367", "text": "public function editAction($id)\n {\n $this->initializeScaffolding();\n\n $this->beforeRead();\n $this->view->record = $this->scaffolding->doRead($id);\n $this->afterRead();\n\n $this->beforeEdit();\n $this->view->form = $this->scaffolding->getForm($this->view->record);\n $this->afterEdit();\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6666091", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6665379", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "6f15f8f92121a2bdd5d391d8e067cce6", "score": "0.66645616", "text": "public function edit($id)\n {\n \t$emp = Employee::find($id);\n \t \n \t// show the view and pass the nerd to it\n \treturn View::make('adminlte::employee.edit')\n \t->with('employee', $emp);\n }", "title": "" }, { "docid": "52e52cdfc2de427528e31ab0f3380503", "score": "0.6663675", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('NumaDOADMSBundle:ListingForm')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ListingForm entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('NumaDOADMSBundle:ListingForm:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "ade3e60125d3b02b74b68797e30c99f4", "score": "0.6653248", "text": "public function edit($id)\n {\n $this->data['product'] = Product::findOrFail($id);\n $this->data['category'] = Category::arrForCategory();\n $this->data['mode'] = 'edit';\n\n return view('products.form', $this->data);\n }", "title": "" }, { "docid": "2144bb95c09393c12341bf4eb0e5d9e7", "score": "0.66517454", "text": "public function showEditForm($id){\n $post = $this->repo->byId($id);\n return view('create', [\n 'mode' => 'edit',\n 'published_at' => $post->published_at,\n 'is_published' =>$post->is_published,\n 'title' => $post->title,\n 'url' => $post->url,\n 'contents' => $post->contents,\n 'id' => $post->id\n ]);\n }", "title": "" }, { "docid": "23fa969743853cefd4974f048eebf67a", "score": "0.6641395", "text": "public function edit()\r\n {\r\n return view('user::edit');\r\n }", "title": "" }, { "docid": "6be4074acb7130903012aff787adc368", "score": "0.663426", "text": "public function edit($id)\n {\n $model = User::find($id);\n return view('master.admin.form', ['model'=>$model, 'update'=>true]);\n }", "title": "" }, { "docid": "6f1a413f5dd5aee349bb9b9db12fa70b", "score": "0.6629308", "text": "public function edit($id) { }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275465", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275465", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275465", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275465", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275465", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.6627498", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "f39b9490d89d766f2a0fd47a32dc248b", "score": "0.66240406", "text": "public function edit($id)\n {\n return view(\"user_form\");\n }", "title": "" }, { "docid": "0fa42022ec77f2736c200c4b84f79316", "score": "0.6615427", "text": "public function edit($id)\n {\n $data = Merek::find($id);\n $data->page_title = 'Merek Edit';\n $data->h1 = 'Edit';\n $data->form_action = route('admin.merek.update');\n $data->page_type = 'edit';\n $data->button = 'Simpan';\n\n return view('backend.merek.form', [\n 'data' => $data,\n ]);\n }", "title": "" }, { "docid": "860b8d42962dd4f1751317b806b97d66", "score": "0.6614804", "text": "public function edit()\n {\n return view('reception::edit');\n }", "title": "" }, { "docid": "c8e6574baa7c09ee6dbb6a57608c40ce", "score": "0.6614437", "text": "public function editResourceAction($id, Request $request)\n {\n $resource = $this->getDoctrine()->getManager()\n ->getRepository('WBQbankBundle:Resources')\n ->find($id);\n\n if (!$resource) {\n throw $this->createNotFoundException(\n 'No resource found'\n );\n }\n\n // form\n $form = $this->createForm(new ResourcesType(), $resource);\n\n $form->handleRequest($request);\n\n if ($form->isSubmitted()) {\n\n $dir = $this->container->getParameter('resources-upload-path');\n $file = $resource->getFilename();\n \n //to keep the existing uploaded file location\n $filename_=$request->get('filename_');\n \n if (is_object($file)) {\n $resource->setFilesize($file->getSize());\n $filename = time() . $file->getClientOriginalName();\n $file->move($dir, $filename);\n $location = $dir . $filename;\n $resource->setFilename($location);\n }\n else if (trim($filename_)!=\"\"){\n $resource->setFilename($filename_);\n }\n\n $em = $this->getDoctrine()->getManager();\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('resources'));\n }\n\n return $this->render('WBQbankBundle:Resources:editResource.html.twig', array(\n 'form' => $form->createView(),\n 'resourceId' => $id,\n 'active_button' => ActiveButtons::AdminResources\n ));\n }", "title": "" }, { "docid": "a365c8fa77e729113252274bcd88baf6", "score": "0.6607685", "text": "public function edit($id)\n {\n $entity = Entity::findOrFail($id);\n\n if(Auth::user()->id != $entity->user_id){\n return view('error')->withErrors(['You don\\'t have permissions to access this resource.']);\n }\n\n return view('entities.edit', compact('entity'))->with('create', 0);\n }", "title": "" }, { "docid": "38e6dad01dfe51fa6f95805601cc8137", "score": "0.66073585", "text": "public function edit()\n\t{\n\t\tCRequest::setVar('view', $this->view_item);\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "584d7649153a0da9f2d2848a6fd168fd", "score": "0.6605469", "text": "public function editAction()\n {\n $varName = $this->view->singularize($this->_helper->db->getDefaultModelName());\n\n $record = $this->_helper->db->findById();\n\n if ($this->_autoCsrfProtection) {\n $csrf = new Omeka_Form_SessionCsrf;\n $this->view->csrf = $csrf;\n }\n\n if ($this->getRequest()->isPost()) {\n if ($this->_autoCsrfProtection && !$csrf->isValid($_POST)) {\n $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');\n $this->view->$varName = $record;\n return;\n }\n $record->setPostData($_POST);\n if ($record->save(false)) {\n $successMessage = $this->_getEditSuccessMessage($record);\n if ($successMessage != '') {\n $this->_helper->flashMessenger($successMessage, 'success');\n }\n $this->_redirectAfterEdit($record);\n } else {\n $this->_helper->flashMessenger($record->getErrors());\n }\n }\n\n $this->view->$varName = $record;\n }", "title": "" }, { "docid": "b3434b39a7041adf18b694988ccedbea", "score": "0.66050863", "text": "public function edit($id)\n\t{\n return View::make('cardapios.edit');\n\t}", "title": "" }, { "docid": "bb3d25c21124beddc757800cf8683cb4", "score": "0.66033626", "text": "public function edit(){\n\t\t//$this->common_data();\n\t\t$this->location = \"plataformas\";\n\t\t$this->plataforma = new plataforma($this->get('id'));\n\t\t$this->plataforma->read(\"id,nombre,empresa\");\n\t\t$this->include_theme(\"index\",\"edit\");\n\t}", "title": "" }, { "docid": "672a8990802aca7ec3bf156a475b97ab", "score": "0.6601295", "text": "public function edit($id)\n {\n // get the nerd\n $employee = employee::find($id);\n\n // show the edit form and pass the nerd\n return View::make('employees.edit')\n ->with('employee', $employee);\n }", "title": "" }, { "docid": "033e1e454bf02fa56620accb31e8cb8d", "score": "0.65993685", "text": "public function edit(Record $record)\n {\n return view('records.update', compact('record'));\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.65991616", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "2f50bec1a38d27b16fac719637b651c4", "score": "0.659718", "text": "public function editViewAction($id)\n {\n $this->theme->setTitle('Redigera formulär');\n $this->theme->addStylesheet('css/form.css');\n \n $this->db->select()\n ->from('survey')\n ->where(\"id = $id\")\n ->execute();\n \n $survey = $this->db->fetchOne();\n \n $this->views->add('survey/edit', [\n 'title' => \"Redigera formulär\",\n 'survey' => $survey,\n 'id' => $id,\n ]);\n }", "title": "" }, { "docid": "db2529a46c0e35eb3c68886810761fc8", "score": "0.6592692", "text": "public function edit($id)\n {\n return view('presensi::edit');\n }", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6589583", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "3ec00c8d29482613595774462fb85505", "score": "0.6587105", "text": "public function edit($id) {\n $item = Employee::find($id);\n return view('employees/update')->with(['item' => $item]);\n }", "title": "" }, { "docid": "9e260dddc50926c0f371295c6cdff712", "score": "0.6586051", "text": "public function edit($id)\n {\n //\n $record = $this->record->findOrFail($id);\n\n return view('record.edit', ['record'=>$record]);\n }", "title": "" }, { "docid": "cc0bb0b7f0592d72b552b09d7d5ca4ad", "score": "0.6579556", "text": "public function edit(){\n $id = $_GET['id'];\n $task = $this->taskModel->find($id);\n\n view('admin/edit_task', compact('task'));\n }", "title": "" }, { "docid": "23e944e596556730ad9998873ce62f6e", "score": "0.6575095", "text": "public function edit($id)\n {\n $this->authChecker();\n $item = $this->provider::findOrFail($id);\n $fields = $this->getFields();\n $fields[0]['value'] = $item->name;\n $fields[1]['value'] = $item->size;\n $fields[2]['value'] = $item->restoarea_id;\n\n $parameter = [];\n $parameter[$this->parameter_name] = $id;\n\n return view('general.form', ['setup' => [\n 'inrow'=>true,\n 'title'=>__('crud.edit_item_name', ['item'=>__($this->title), 'name'=>$item->name]),\n 'action_link'=>route($this->webroute_path.'index'),\n 'action_name'=>__('crud.back'),\n 'iscontent'=>true,\n 'isupdate'=>true,\n 'action'=>route($this->webroute_path.'update', $parameter),\n ],\n 'fields'=>$fields, ]);\n }", "title": "" }, { "docid": "b34cb7db16e9ac26b8ba6821e387fff9", "score": "0.6572864", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit User';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "4bf2fed80355d3a19316f7291f47ee44", "score": "0.6567018", "text": "public function edit($id) \n // : StudentResource\n {\n $student = Student::find($id);\n return view('welcome', ['student' => $student]);\n\n // return new StudentResource($student);\n }", "title": "" } ]
d0ec94121d1bf457197fc458f8d2bc6f
END DISPLAY ATTACHMENTS > PREVIEW Assign Variables and Definitions based on the fetched Attachments internal used by all displaying functions, the Data was collected before, it's only dependend on the template used. :) before this function is usable, init_display_attachments have to be called for specific pages (pm, posting, review etc...)
[ { "docid": "0ab2e2fa0b306642eaf1458c54a0b5c5", "score": "0.5905478", "text": "function display_attachments($post_id, $type = 'postrow')\n{\n\tglobal $db, $config, $template, $user, $lang;\n\tglobal $upload_dir, $allowed_extensions, $display_categories, $download_modes, $attachments, $upload_icons, $username_from;\n\t$num_attachments = sizeof($attachments['_' . $post_id]);\n\tif ($num_attachments == 0)\n\t{\n\t\treturn;\n\t}\n\n\t$template->assign_block_vars($type . '.attach', array());\n\n\tfor ($i = 0; $i < $num_attachments; $i++)\n\t{\n\t\t// Some basic things...\n\t\t$physical_filename = get_physical_filename($attachments['_' . $post_id][$i]['physical_filename'], false);\n\t\t$physical_filename_thumb = get_physical_filename($attachments['_' . $post_id][$i]['physical_filename'], true);\n\t\t$filename = $upload_dir . '/' . $physical_filename;\n\t\t$thumbnail_filename = $upload_dir . '/' . $physical_filename_thumb;\n\n\t\t$upload_image = '';\n\n\t\tif ($config['upload_img'] != '' && trim($upload_icons[$attachments['_' . $post_id][$i]['extension']]) == '')\n\t\t{\n\t\t\t$upload_image = '<img src=\"' . $config['upload_img'] . '\" alt=\"\" />';\n\t\t}\n\t\telseif (trim($upload_icons[$attachments['_' . $post_id][$i]['extension']]) != '')\n\t\t{\n\t\t\t$upload_image = '<img src=\"' . $upload_icons[$attachments['_' . $post_id][$i]['extension']] . '\" alt=\"\" />';\n\t\t}\n\n\t\t$filesize = $attachments['_' . $post_id][$i]['filesize'];\n\t\t$size_lang = ($filesize >= 1048576) ? $lang['MB'] : (($filesize >= 1024) ? $lang['KB'] : $lang['Bytes']);\n\n\t\tif ($filesize >= 1048576)\n\t\t{\n\t\t\t$filesize = (round((round($filesize / 1048576 * 100) / 100), 2));\n\t\t}\n\t\telseif ($filesize >= 1024)\n\t\t{\n\t\t\t$filesize = (round((round($filesize / 1024 * 100) / 100), 2));\n\t\t}\n\n\t\t$display_name = $attachments['_' . $post_id][$i]['real_filename'];\n\t\t$comment = $attachments['_' . $post_id][$i]['comment'];\n\t\t$comment = str_replace(\"\\n\", '<br />', $comment);\n\n\t\t$denied = false;\n\n\t\t// Admin is allowed to view forbidden Attachments, but the error-message is displayed too to inform the Admin\n\t\tif (!in_array($attachments['_' . $post_id][$i]['extension'], $allowed_extensions))\n\t\t{\n\t\t\t$denied = true;\n\n\t\t\t$template->assign_block_vars($type . '.attach.denyrow', array(\n\t\t\t\t'L_DENIED' => sprintf($lang['Extension_disabled_after_posting'], $attachments['_' . $post_id][$i]['extension'])\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif (!$denied || $user->data['user_level'] == ADMIN)\n\t\t{\n\t\t\t// Some basic Template Vars\n\t\t\t$template->assign_vars(array(\n\t\t\t\t'L_DESCRIPTION' => $lang['Description'],\n\t\t\t\t'L_DOWNLOAD' => $lang['Download'],\n\t\t\t\t'L_FILENAME' => $lang['File_name'],\n\t\t\t\t'L_FILESIZE' => $lang['Filesize']\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// define category\n\t\t\t$image = false;\n\t\t\t$stream = false;\n\t\t\t$swf = false;\n\t\t\t$thumbnail = false;\n\t\t\t$link = false;\n\n\t\t\tif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == STREAM_CAT)\n\t\t\t{\n\t\t\t\t$stream = true;\n\t\t\t}\n\t\t\telseif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == SWF_CAT)\n\t\t\t{\n\t\t\t\t$swf = true;\n\t\t\t}\n\t\t\telseif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT && intval($config['img_display_inlined']))\n\t\t\t{\n\t\t\t\tif (intval($config['img_link_width']) != 0 || intval($config['img_link_height']) != 0)\n\t\t\t\t{\n\t\t\t\t\tlist($width, $height) = image_getdimension($filename);\n\n\t\t\t\t\tif (($width == 0) && ($height == 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($width <= intval($config['img_link_width']) && $height <= intval($config['img_link_height']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$image = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$image = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT && $attachments['_' . $post_id][$i]['thumbnail'] == 1)\n\t\t\t{\n\t\t\t\t$thumbnail = true;\n\t\t\t\t$image = false;\n\t\t\t}\n\n\t\t\tif (!$image && !$stream && !$swf && !$thumbnail)\n\t\t\t{\n\t\t\t\t$link = true;\n\t\t\t}\n\n\t\t\tif ($image)\n\t\t\t{\n\t\t\t\t// Images\n\t\t\t\t// NOTE: If you want to use the download.php everytime an image is displayed inlined, replace the\n\t\t\t\t// Section between BEGIN and END with (Without the // of course):\n\t\t\t\t//\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t//\t$download_link = true;\n\t\t\t\t//\n\t\t\t\t//\n\t\t\t\tif (intval($config['allow_ftp_upload']) && trim($config['download_path']) == '')\n\t\t\t\t{\n\t\t\t\t\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t\t$download_link = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Check if we can reach the file or if it is stored outside of the webroot\n\t\t\t\t\tif (($config['upload_dir'][0] == '/') || (($config['upload_dir'][0] != '/') && ($config['upload_dir'][1] == ':')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t\t\t$download_link = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// BEGIN\n\t\t\t\t\t\t$img_source = $filename;\n\t\t\t\t\t\t$download_link = false;\n\t\t\t\t\t\t// END\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$max_image_width = intval($config['liw_max_width']);\n\n\t\t\t\t$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';\n\t\t\t\t$server_name = preg_replace('#^\\/?(.*?)\\/?$#', '\\1', trim($config['server_name']));\n\t\t\t\t$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '';\n\t\t\t\t$script_name = preg_replace('#^\\/?(.*?)\\/?$#', '\\1', trim($config['script_path']));\n\t\t\t\t$script_name = ($script_name == '') ? $script_name : '/' . $script_name;\n\n\t\t\t\tif (($max_image_width != 0) && ($config['liw_attach_enabled'] == 1) && !isset($username_from))\n\t\t\t\t{\n\t\t\t\t\tif (!function_exists('liw_get_dimensions'))\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude_once(IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_includes.' . PHP_EXT);\n\t\t\t\t\t}\n\t\t\t\t\tlist($image_width, $image_height) = liw_get_dimensions($server_protocol . $server_name . $server_port . $script_name . '/' . $img_source, $post_id);\n\n\t\t\t\t\tif ($image_width && ($image_width > $max_image_width) || empty($image_width) || empty($image_height))\n\t\t\t\t\t{\n\t\t\t\t\t\t$img_code = generate_liw_img_popup($img_source, $image_width, $image_height, $max_image_width);\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$img_code = '<img src=\"' . $img_source . '\" alt=\"' . $display_name . '\" />';\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$img_code = '<img src=\"' . $img_source . '\" alt=\"' . $display_name . '\" />';\n\t\t\t\t}\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('<a href=\"' . append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '\">' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_images', array(\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\t\t\t\t\t'IMG_CODE' => $img_code,\n\t\t\t\t\t'IMG_SRC' => $img_source,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Directly Viewed Image ... update the download count\n\t\t\t\tif (!$download_link)\n\t\t\t\t{\n\t\t\t\t\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($thumbnail)\n\t\t\t{\n\t\t\t\t// Images, but display Thumbnail\n\t\t\t\t// NOTE: If you want to use the download.php everytime an thumbnail is displayed inlined, replace the\n\t\t\t\t// Section between BEGIN and END with (Without the // of course):\n\t\t\t\t//\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t//\n\t\t\t\tif (intval($config['allow_ftp_upload']) && (trim($config['download_path']) == ''))\n\t\t\t\t{\n\t\t\t\t\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Check if we can reach the file or if it is stored outside of the webroot\n\t\t\t\t\tif (($config['upload_dir'][0] == '/') || (($config['upload_dir'][0] != '/') && ($config['upload_dir'][1] == ':')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=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\tif (file_exists($thumbnail_filename))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// BEGIN\n\t\t\t\t\t\t\t$thumb_source = $thumbnail_filename;\n\t\t\t\t\t\t\t// END\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('<a href=\"' . append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '\">' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_thumb_images', array(\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t'IMG_SRC' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\n\t\t\t\t\t'IMG_THUMB_SRC' => $thumb_source,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($stream)\n\t\t\t{\n\t\t\t\t// Streams\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('<a href=\"' . append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '\">' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_stream', array(\n\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n//\t\t\t\t\t'U_DOWNLOAD_LINK' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Viewed/Heared File ... update the download count (download.php is not called here)\n\t\t\t\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t}\n\n\t\t\tif ($swf)\n\t\t\t{\n\t\t\t\t// Macromedia Flash Files\n\t\t\t\tlist($width, $height) = swf_getdimension($filename);\n\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('<a href=\"' . append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '\">' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_swf', array(\n\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link,\n\t\t\t\t\t'WIDTH' => $width,\n\t\t\t\t\t'HEIGHT' => $height\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Viewed/Heared File ... update the download count (download.php is not called here)\n\t\t\t\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t}\n\n\t\t\tif ($link)\n\t\t\t{\n\t\t\t\t$target_blank = 'target=\"_blank\"'; //((intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT)) ? 'target=\"_blank\"' : '';\n\n\t\t\t\t// display attachment\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('<a href=\"' . append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '\">' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.attachrow', array(\n\t\t\t\t\t'U_DOWNLOAD_LINK' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'TARGET_BLANK' => $target_blank,\n\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Downloaded'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" } ]
[ { "docid": "5094a82505c4698fd90863dd0a9a69f7", "score": "0.68666136", "text": "function init_display_pm_attachments($switch_attachment)\n{\n\tglobal $config, $template, $user, $lang, $attachments, $privmsg;\n\n\tif ($user->data['user_level'] == ADMIN)\n\t{\n\t\t$auth_download = 1;\n\t}\n\telse\n\t{\n\t\t$auth_download = intval($config['allow_pm_attach']);\n\t}\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']) || !$auth_download)\n\t{\n\t\treturn;\n\t}\n\n\t$privmsgs_id = $privmsg['privmsgs_id'];\n\n\t@reset($attachments);\n\t$attachments['_' . $privmsgs_id] = get_attachments_from_pm($privmsgs_id);\n\n\tif (sizeof($attachments['_' . $privmsgs_id]) == 0)\n\t{\n\t\treturn;\n\t}\n\n\t$template->assign_block_vars('postrow', array());\n\n\tinit_display_template('body', '{ATTACHMENTS}');\n\n\tinit_complete_extensions_data();\n\n\t$template->assign_vars(array(\n\t\t'L_POSTED_ATTACHMENTS' => $lang['Posted_attachments'],\n\t\t'L_KILOBYTE' => $lang['KB']\n\t\t)\n\t);\n\n\tdisplay_pm_attachments($privmsgs_id, $switch_attachment);\n}", "title": "" }, { "docid": "6dfaebe9f61801862af8a1ac822785b6", "score": "0.6831871", "text": "function init_display_review_attachments($is_auth)\n{\n\tglobal $config;\n\n\tif (intval($config['disable_attachments_mod']) || (!($is_auth['auth_download'] && $is_auth['auth_view'])) || intval($config['attachment_topic_review']) == 0)\n\t{\n\t\treturn;\n\t}\n\n\tinit_display_template('reviewbody', '{postrow.ATTACHMENTS}');\n\n\tinit_complete_extensions_data();\n\n}", "title": "" }, { "docid": "9ac571c0aae6c100f6c121fa08d31e82", "score": "0.63396907", "text": "function Show_attachments($data=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<a href=\"{parse url=\"app=core&amp;module=attach&amp;section=attach&amp;attach_id={$data['attach_id']}\" base=\"public\"}\" title=\"{$this->lang->words['attach_dl']}\"><img src=\"{$this->settings['public_dir']}<if test=\"hasmime:|:$data['mime_image']\">{$data['mime_image']}<else />style_extra/mime_types/unknown.gif</if>\" alt=\"{$this->lang->words['attached_file']}\" /></a>\n&nbsp;<a href=\"{parse url=\"app=core&amp;module=attach&amp;section=attach&amp;attach_id={$data['attach_id']}\" base=\"public\"}\" title=\"{$this->lang->words['attach_dl']}\"><strong>{$data['attach_file']}</strong></a> &nbsp;&nbsp;<span class='desc'><strong>{$data['file_size']}</strong></span>\n&nbsp;&nbsp;<span class=\"desc lighter\">{$data['attach_hits']} {$this->lang->words['attach_hits']}</span>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "a70b16d40b42ad711f5c1af9ab323bb8", "score": "0.6095815", "text": "function display_review_attachments($post_id, $switch_attachment, $is_auth)\n{\n\tglobal $config, $attachments;\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']) || (!($is_auth['auth_download'] && $is_auth['auth_view'])) || intval($config['attachment_topic_review']) == 0)\n\t{\n\t\treturn;\n\t}\n\n\t@reset($attachments);\n\t$attachments['_' . $post_id] = get_attachments_from_post($post_id);\n\n\tif (sizeof($attachments['_' . $post_id]) == 0)\n\t{\n\t\treturn;\n\t}\n\n\tdisplay_attachments($post_id, 'postrow');\n}", "title": "" }, { "docid": "c2264b798f317c4c15485f49f5838360", "score": "0.6081547", "text": "protected function prepareForDisplay() {}", "title": "" }, { "docid": "c2264b798f317c4c15485f49f5838360", "score": "0.6081547", "text": "protected function prepareForDisplay() {}", "title": "" }, { "docid": "30edb7a0bc0152191c42429618632804", "score": "0.595717", "text": "function controller_attachment_list($page_name) {\n $page = try_textblock_get($page_name);\n identity_require('textblock-list-attach', $page);\n\n $view = array();\n $options = pager_init_options();\n\n $attach_list = attachment_get_all($page_name, \"%\", $options['first_entry'],\n $options['display_entries']);\n //FIXME: hack for numbering\n for ($i = 0; $i < count($attach_list); ++$i) {\n $attach_list[$i]['id'] = $options['first_entry'] + $i + 1;\n }\n $view['attach_list'] = $attach_list;\n $view['page_name'] = $page['name'];\n $view['title'] = 'Atasamentele paginii '.$page['title'];\n $view['total_entries'] = attachment_get_count($page_name);\n $view['first_entry'] = $options['first_entry'];\n $view['display_entries'] = $options['display_entries'];\n\n execute_view_die('views/listattach.php', $view);\n}", "title": "" }, { "docid": "b4cc49f98c1692ad7de9e07afe3a9e22", "score": "0.5898486", "text": "public function loadInitialAttachments()\n {\n }", "title": "" }, { "docid": "a898d650c8e1ea1448d464cd11a6e57a", "score": "0.58508235", "text": "function display_attachments_preview($attachment_id_list, $attachment_list, $attachment_filesize_list, $attachment_filename_list, $attachment_comment_list, $attachment_extension_list, $attachment_thumbnail_list)\n{\n\tglobal $config, $is_auth, $allowed_extensions, $user, $lang, $display_categories, $upload_dir, $upload_icons, $template, $db, $theme;\n\n\tif (sizeof($attachment_list) != 0)\n\t{\n\t\tinit_display_template('preview', '{ATTACHMENTS}');\n\n\t\tinit_complete_extensions_data();\n\n\t\t$template->assign_block_vars('postrow', array());\n\t\t$template->assign_block_vars('postrow.attach', array());\n\n\t\tfor ($i = 0, $size = sizeof($attachment_list); $i < $size; $i++)\n\t\t{\n\t\t\t$filename = $upload_dir . '/' . basename($attachment_list[$i]);\n\t\t\t$thumb_filename = $upload_dir . '/' . THUMB_DIR . '/t_' . basename($attachment_list[$i]);\n\t\t\tif (!file_exists($thumb_filename))\n\t\t\t{\n\t\t\t\t$thumb_filename = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachment_id_list[$i] . '&thumb=1');\n\t\t\t}\n\n\t\t\t$filesize = $attachment_filesize_list[$i];\n\t\t\t$size_lang = ($filesize >= 1048576) ? $lang['MB'] : (($filesize >= 1024) ? $lang['KB'] : $lang['Bytes']);\n\n\t\t\tif ($filesize >= 1048576)\n\t\t\t{\n\t\t\t\t$filesize = (round((round($filesize / 1048576 * 100) / 100), 2));\n\t\t\t}\n\t\t\telseif ($filesize >= 1024)\n\t\t\t{\n\t\t\t\t$filesize = (round((round($filesize / 1024 * 100) / 100), 2));\n\t\t\t}\n\n\t\t\t$display_name = $attachment_filename_list[$i];\n\t\t\t$comment = $attachment_comment_list[$i];\n\t\t\t$comment = str_replace(\"\\n\", '<br />', $comment);\n\n\t\t\t$extension = $attachment_extension_list[$i];\n\n\t\t\t$denied = false;\n\n\t\t\t// Admin is allowed to view forbidden Attachments, but the error-message is displayed too to inform the Admin\n\t\t\tif (!in_array($extension, $allowed_extensions))\n\t\t\t{\n\t\t\t\t$denied = true;\n\n\t\t\t\t$template->assign_block_vars('postrow.attach.denyrow', array(\n\t\t\t\t\t'L_DENIED' => sprintf($lang['Extension_disabled_after_posting'], $extension)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!$denied)\n\t\t\t{\n\t\t\t\t// Some basic Template Vars\n\t\t\t\t$template->assign_vars(array(\n\t\t\t\t\t'L_DESCRIPTION' => $lang['Description'],\n\t\t\t\t\t'L_DOWNLOAD' => $lang['Download'],\n\t\t\t\t\t'L_FILENAME' => $lang['File_name'],\n\t\t\t\t\t'L_FILESIZE' => $lang['Filesize']\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// define category\n\t\t\t\t$image = false;\n\t\t\t\t$stream = false;\n\t\t\t\t$swf = false;\n\t\t\t\t$thumbnail = false;\n\t\t\t\t$link = false;\n\n\t\t\t\tif (intval($display_categories[$extension]) == STREAM_CAT)\n\t\t\t\t{\n\t\t\t\t\t$stream = true;\n\t\t\t\t}\n\t\t\t\telseif (intval($display_categories[$extension]) == SWF_CAT)\n\t\t\t\t{\n\t\t\t\t\t$swf = true;\n\t\t\t\t}\n\t\t\t\telseif ((intval($display_categories[$extension]) == IMAGE_CAT) && intval($config['img_display_inlined']))\n\t\t\t\t{\n\t\t\t\t\tif ((intval($config['img_link_width']) != 0) || (intval($config['img_link_height']) != 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tlist($width, $height) = image_getdimension($filename);\n\n\t\t\t\t\t\tif ($width == 0 && $height == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$image = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($width <= intval($config['img_link_width'])) && ($height <= intval($config['img_link_height'])))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$image = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((intval($display_categories[$extension]) == IMAGE_CAT) && (intval($attachment_thumbnail_list[$i]) == 1))\n\t\t\t\t{\n\t\t\t\t\t$thumbnail = true;\n\t\t\t\t\t$image = false;\n\t\t\t\t}\n\n\t\t\t\tif (!$image && !$stream && !$swf && !$thumbnail)\n\t\t\t\t{\n\t\t\t\t\t$link = true;\n\t\t\t\t}\n\n\t\t\t\tif ($image)\n\t\t\t\t{\n\t\t\t\t\t// Images\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_images', array(\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'IMG_SRC' => $filename,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($thumbnail)\n\t\t\t\t{\n\t\t\t\t\t// Images, but display Thumbnail\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_thumb_images', array(\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'IMG_SRC' => $filename,\n\t\t\t\t\t\t'IMG_THUMB_SRC' => $thumb_filename,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($stream)\n\t\t\t\t{\n\t\t\t\t\t// Streams\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_stream', array(\n\t\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($swf)\n\t\t\t\t{\n\t\t\t\t\t// Macromedia Flash Files\n\t\t\t\t\tlist($width, $height) = swf_getdimension($filename);\n\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_swf', array(\n\t\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t\t'WIDTH' => $width,\n\t\t\t\t\t\t'HEIGHT' => $height\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($link)\n\t\t\t\t{\n\t\t\t\t\t$upload_image = '';\n\n\t\t\t\t\tif ($config['upload_img'] != '' && $upload_icons[$extension] == '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$upload_image = '<img src=\"' . $config['upload_img'] . '\" alt=\"\" />';\n\t\t\t\t\t}\n\t\t\t\t\telseif (trim($upload_icons[$extension]) != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$upload_image = '<img src=\"' . $upload_icons[$extension] . '\" alt=\"\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t$target_blank = 'target=\"_blank\"';\n\n\t\t\t\t\t// display attachment\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.attachrow', array(\n\t\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Downloaded'],\n\t\t\t\t\t\t'TARGET_BLANK' => $target_blank\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}\n}", "title": "" }, { "docid": "0952ad06b7660c41a8bd2013b3ba90d7", "score": "0.5841036", "text": "function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t$pageObject->hideField(\"loop_type\");\n$pageObject->hideField(\"message_content\");\n$pageObject->hideField(\"attachment\");\n$pageObject->hideField(\"repeat\");\n$pageObject->hideField(\"repeat_type\");\n$pageObject->hideField(\"loop_value\");\n\nif($values['loop_type'] == '1'){\t\n\t$data = array();\n\t$data[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t$data[\"flag\"] = '2';\n\t$rs = DB::Select(\"outbox_line\", $data );\n\t$rs1 = DB::Select(\"outbox_mail_alibaba\", $data );\n\t$rs2 = DB::Select(\"outbox_mail_aws\", $data );\n\t$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data );\n\t$rs4 = DB::Select(\"outbox_telegram\", $data );\n\t$rs5 = DB::Select(\"outbox_whatsapp\", $data );\n\n\t$i = 1;\n\twhile( $record = $rs->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs1->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs2->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs3->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs4->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs5->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\n\tif($i == 2){\n\t\tif($values['repeat'] > 0){\n\t\t\t$pageObject->showField(\"message_content\");\n\t\t\t$pageObject->showField(\"attachment\");\n\n\t\t\t$data2 = array();\n\t\t\t$data2[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t\t$rsa = DB::Select(\"outbox_line\", $data2 );\n\t\t\t$rs1a = DB::Select(\"outbox_mail_alibaba\", $data2 );\n\t\t\t$rs2a = DB::Select(\"outbox_mail_aws\", $data2 );\n\t\t\t$rs3a = DB::Select(\"outbox_mail_mailchimp\", $data2 );\n\t\t\t$rs4a = DB::Select(\"outbox_telegram\", $data2 );\n\t\t\t$rs5a = DB::Select(\"outbox_whatsapp\", $data2 );\n\n\t\t\t$data1 = array();\n\t\t\t$data1[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t\t$data1[\"flag\"] = '1';\n\t\t\t$rs = DB::Select(\"outbox_line\", $data1 );\n\t\t\t$rs1 = DB::Select(\"outbox_mail_alibaba\", $data1 );\n\t\t\t$rs2 = DB::Select(\"outbox_mail_aws\", $data1 );\n\t\t\t$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data1 );\n\t\t\t$rs4 = DB::Select(\"outbox_telegram\", $data1 );\n\t\t\t$rs5 = DB::Select(\"outbox_whatsapp\", $data1 );\n\t\t\t\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t\t$c = 0;\n\t\t\t$d = 0;\n\t\t\t$e = 0;\n\t\t\t$f = 0;\n\t\t\tif($rsa->fetchAssoc()){\n\t\t\t\tif($rs->fetchAssoc()){\n\t\t\t\t\t$a = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$a = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif($rs1a->fetchAssoc()){\n\t\t\t\tif($rs1->fetchAssoc()){\n\t\t\t\t\t$b = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$b = 1;\n\t\t\t}\n\n\t\t\tif($rs2a->fetchAssoc()){\n\t\t\t\tif($rs2->fetchAssoc()){\n\t\t\t\t\t$c = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$c = 1;\n\t\t\t}\n\n\t\t\tif($rs3a->fetchAssoc()){\n\t\t\t\tif($rs3->fetchAssoc()){\n\t\t\t\t\t$d = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$d = 1;\n\t\t\t}\n\n\t\t\tif($rs4a->fetchAssoc()){\n\t\t\t\tif($rs4->fetchAssoc()){\n\t\t\t\t\t$e = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$e = 1;\n\t\t\t}\n\n\t\t\tif($rs5a->fetchAssoc()){\n\t\t\t\tif($rs5->fetchAssoc()){\n\t\t\t\t\t$f = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$f = 1;\n\t\t\t}\n\n\t\t\tif($a == 0 || $b == 0 || $c == 0 || $d == 0 || $e == 0 || $f == 0){\n\t\t\t\t$pageObject->hideField(\"message_content\");\n\t\t\t\t$pageObject->hideField(\"attachment\");\n\t\t\t}\n\t\t}\n\t}else{\n\t\t$pageObject->showField(\"loop_value\");\n\t\t$pageObject->showField(\"message_content\");\n\t\t$pageObject->showField(\"attachment\");\n\t\tif($values['repeat'] > 0){\n\t\t\t$pageObject->showField(\"repeat\");\n\t\t\t$pageObject->showField(\"repeat_type\");\n\t\t}\n\t}\n}\n;\t\t\n}", "title": "" }, { "docid": "0d9c385f58aef3813b4f85e6c597f69a", "score": "0.5752342", "text": "function Show_attachments_img($data=array()) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<a class='resized_img' rel='lightbox[{$data['attach_rel_id']}]' id='ipb-attach-url-{$data['_attach_id']}' href=\"{parse url=\"app=core&amp;module=attach&amp;section=attach&amp;attach_rel_module={$data['type']}&amp;attach_id={$data['attach_id']}\" base=\"public\"}\" title=\"{$data['location']} - {$this->lang->words['attach_size']} {$data['file_size']}, {$this->lang->words['attach_ahits']} {$data['attach_hits']}\"><img itemprop=\"image\" src=\"{$this->settings['upload_url']}/{$data['o_location']}\" class='bbc_img linked-image' alt=\"{$data['location']}\" /></a>\n{parse expression=\"$this->registry->output->addMetaTag( 'og:image', \"{$this->settings['upload_url']}/{$data['o_location']}\", false )\"}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "ebe1de17f68e839342bcf2905716399b", "score": "0.57322824", "text": "function display_field($data)\n {\n $conf = $this->EE->config->item('channel_images');\n\n //----------------------------------------\n // Global Vars\n //----------------------------------------\n $vData = array();\n $vData['missing_settings'] = false;\n $vData['field_name'] = $this->field_name;\n $vData['field_id'] = $this->field_id;\n $vData['temp_key'] = $this->EE->localize->now;\n $vData['entry_id'] = ($this->EE->input->get_post('entry_id') != false) ? $this->EE->input->get_post('entry_id') : false;\n $vData['total_images'] = 0;\n $vData['assigned_images'] = array();\n\n //----------------------------------------\n // Add Global JS & CSS & JS Scripts\n //----------------------------------------\n $this->EE->image_helper->mcp_js_css('gjs');\n $this->EE->image_helper->mcp_js_css('css', 'channel_images_pbf.css?v='.CHANNEL_IMAGES_VERSION, 'channel_images', 'main');\n $this->EE->image_helper->mcp_js_css('css', 'jquery.colorbox.css', 'jquery', 'colorbox');\n $this->EE->image_helper->mcp_js_css('js', 'js/handlebars.runtime-v1.3.0.js', 'handlebars', 'runtime');\n $this->EE->image_helper->mcp_js_css('js', 'js/hbs-templates.js?v='.CHANNEL_IMAGES_VERSION, 'channel_images', 'templates');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.editable.js', 'jquery', 'editable');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.base64.js', 'jquery', 'base64');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.liveurltitle.js', 'jquery', 'liveurltitle');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.colorbox.js', 'jquery', 'colorbox');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.jcrop.min.js', 'jquery', 'jcrop');\n $this->EE->image_helper->mcp_js_css('js', 'json2.js', 'json2', 'main');\n $this->EE->image_helper->mcp_js_css('js', 'swfupload.js', 'swfupload', 'main');\n $this->EE->image_helper->mcp_js_css('js', 'swfupload.queue.js', 'swfupload', 'queue');\n $this->EE->image_helper->mcp_js_css('js', 'swfupload.speed.js', 'swfupload', 'speed');\n\n $this->EE->image_helper->mcp_js_css('js', 'channel_images_pbf.js?v='.CHANNEL_IMAGES_VERSION, 'channel_images', 'main');\n\n $this->EE->cp->add_js_script(array(\n 'ui' => array('sortable', 'tabs')\n )\n );\n\n //----------------------------------------\n // Settings\n //----------------------------------------\n $settings = $this->EE->image_helper->grabFieldSettings($this->field_id, $this->settings);\n\n // Settings SET?\n if ( (isset($settings['action_groups']) == false OR empty($settings['action_groups']) == true) && (isset($settings['no_sizes']) == false OR $settings['no_sizes'] != 'yes') )\n {\n $vData['missing_settings'] = true;\n return $this->EE->load->view('pbf_field', $vData, true);\n }\n\n // Columns?\n if (isset($settings['columns']) == false) $settings['columns'] = $this->EE->config->item('ci_columns');\n\n // Stored Images\n if (isset($settings['show_stored_images']) == false) $settings['show_stored_images'] = $defaults['show_stored_images'];\n\n\n // Limit Images?\n if (isset($settings['image_limit']) == false OR trim($settings['image_limit']) == false) $settings['image_limit'] = 999999;\n\n if (isset($this->session->cache['ChannelImages']['PerImageActionHolder']) == false && $settings['allow_per_image_action'] == 'yes')\n {\n $vData['actions'] = &$this->EE->image_helper->get_actions();\n $this->session->cache['ChannelImages']['PerImageActionHolder'] = true;\n }\n\n $vData['settings'] = $settings;\n\n\n //----------------------------------------\n // Field JSON\n //----------------------------------------\n $vData['field_json'] = array();\n $vData['field_json']['key'] = $vData['temp_key'];\n $vData['field_json']['field_name'] = $this->field_name;\n $vData['field_json']['field_label'] = $this->settings['field_label'];\n $vData['field_json']['settings'] = $vData['settings'];\n $vData['field_json']['categories'] = array();\n\n // Add Categories\n if (isset($settings['categories']) == true && empty($settings['categories']) == false)\n {\n $vData['field_json']['categories'][''] = '';\n foreach ($settings['categories'] as $cat) $vData['field_json']['categories'][$cat] = $cat;\n }\n\n // Remove some unwanted stuff\n unset($vData['field_json']['settings']['categories']);\n unset($vData['field_json']['settings']['locations']);\n unset($vData['field_json']['settings']['import_path']);\n\n //----------------------------------------\n // JS Templates\n //----------------------------------------\n $vData['js_templates'] = false;\n if (isset( $this->EE->session->cache['ChannelImages']['JSTemplates'] ) === false)\n {\n $vData['js_templates'] = true;\n $this->EE->session->cache['ChannelImages']['JSTemplates'] = true;\n\n $vData['langjson'] = array();\n\n foreach ($this->EE->lang->language as $key => $val)\n {\n if (strpos($key, 'ci:json:') === 0)\n {\n $vData['langjson'][substr($key, 8)] = $val;\n unset($this->EE->lang->language[$key]);\n }\n\n }\n\n $vData['langjson'] = $this->EE->image_helper->generate_json($vData['langjson']);\n }\n\n //----------------------------------------\n // Auto-Saved Entry?\n //----------------------------------------\n if ($this->EE->input->get('use_autosave') == 'y')\n {\n $vData['entry_id'] = false;\n $old_entry_id = $this->EE->input->get_post('entry_id');\n $query = $this->EE->db->select('original_entry_id')->from('exp_channel_entries_autosave')->where('entry_id', $old_entry_id)->get();\n if ($query->num_rows() > 0 && $query->row('original_entry_id') > 0) $vData['entry_id'] = $query->row('original_entry_id');\n }\n\n //----------------------------------------\n // Existing Entry?\n //----------------------------------------\n if ($vData['entry_id'] != false)\n {\n // -----------------------------------------\n // Grab all Images\n // -----------------------------------------\n $this->EE->db->select('*');\n $this->EE->db->from('exp_channel_images');\n $this->EE->db->where('entry_id', $vData['entry_id']);\n $this->EE->db->where('field_id', $this->field_id);\n\n $is_draft = 0;\n\n if (isset($this->EE->publisher_lib) === true && isset($this->EE->publisher_lib->status) ==- true) {\n if ($this->EE->publisher_lib->status == 'draft') {\n $is_draft = 1;\n }\n } else if (isset($this->EE->session->cache['ep_better_workflow']['is_draft']) && $this->EE->session->cache['ep_better_workflow']['is_draft']) {\n $is_draft = 1;\n }\n\n\n $this->EE->db->where('is_draft', $is_draft);\n\n if ($vData['settings']['cover_first'] == 'yes') $this->EE->db->order_by('cover', 'desc');\n $this->EE->db->order_by('image_order');\n $query = $this->EE->db->get();\n\n // -----------------------------------------\n // Which Previews?\n // -----------------------------------------\n if (isset($settings['small_preview']) == false OR $settings['small_preview'] == false)\n {\n $temp = reset($settings['action_groups']);\n $settings['small_preview'] = $temp['group_name'];\n }\n\n if (isset($settings['big_preview']) == false OR $settings['big_preview'] == false)\n {\n $temp = reset($settings['action_groups']);\n $settings['big_preview'] = $temp['group_name'];\n }\n\n // Preview URL\n $preview_url = $this->EE->image_helper->get_router_url('url', 'simple_image_url');\n\n foreach ($query->result() as $image)\n {\n // We need a good field_id to continue\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // Is it a linked image?\n // Then we need to \"fake\" the channel_id/field_id\n if ($image->link_image_id >= 1)\n {\n $image->entry_id = $image->link_entry_id;\n $image->field_id = $image->link_field_id;\n $image->channel_id = $image->link_channel_id;\n }\n\n // Just in case lets try to get the field_id again\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // Get settings for that field..\n $temp_settings = $this->EE->channel_images_model->get_field_settings($image->field_id);\n\n $act_url_params = \"&amp;fid={$image->field_id}&amp;d={$image->entry_id}\";\n\n if ( empty($settings['action_groups']) == false && (isset($settings['no_sizes']) == false OR $settings['no_sizes'] != 'yes') )\n {\n // Display SIzes URL\n $small_filename = str_replace('.'.$image->extension, \"__{$settings['small_preview']}.{$image->extension}\", urlencode($image->filename) );\n $big_filename = str_replace('.'.$image->extension, \"__{$settings['big_preview']}.{$image->extension}\", urlencode($image->filename) );\n\n if ($this->EE->config->item('ci_encode_filename_url') == 'yes')\n {\n $small_filename = base64_encode($small_filename);\n $big_filename = base64_encode($big_filename);\n }\n\n $image->small_img_url = \"{$preview_url}&amp;f={$small_filename}{$act_url_params}\";\n $image->big_img_url = \"{$preview_url}&amp;f={$big_filename}{$act_url_params}\";\n }\n else\n {\n $small_filename = $image->filename;\n $big_filename = $image->filename;\n\n if ($this->EE->config->item('ci_encode_filename_url') == 'yes')\n {\n $small_filename = base64_encode($small_filename);\n $big_filename = base64_encode($big_filename);\n }\n\n // Display SIzes URL\n $image->small_img_url = \"{$preview_url}&amp;f={$small_filename}{$act_url_params}\";\n $image->big_img_url = \"{$preview_url}&amp;f={$big_filename}{$act_url_params}\";\n }\n\n // ReAssign Field ID (WE NEED THIS)\n $image->field_id = $this->field_id;\n\n $image->title = html_entity_decode( str_replace('&quot;', '\"', $image->title), ENT_QUOTES);\n $image->description = html_entity_decode( str_replace('&quot;', '\"', $image->description), ENT_QUOTES);\n $image->cifield_1 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_1), ENT_QUOTES);\n $image->cifield_2 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_2), ENT_QUOTES);\n $image->cifield_3 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_3), ENT_QUOTES);\n $image->cifield_4 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_4), ENT_QUOTES);\n $image->cifield_5 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_5), ENT_QUOTES);\n\n // On some systems characters are not passed on as UTF-8, json_encode only works with UTF-8 chars.\n // This \"hack\" forces utf-8 encoding, good for swedisch chars etc\n if (isset($conf['utf8_encode_fields_for_json']) === true && $conf['utf8_encode_fields_for_json'] == 'yes') {\n $image->title = utf8_encode($image->title);\n $image->description = utf8_encode($image->description);\n $image->cifield_1 = utf8_encode($image->cifield_1);\n $image->cifield_2 = utf8_encode($image->cifield_2);\n $image->cifield_3 = utf8_encode($image->cifield_3);\n $image->cifield_4 = utf8_encode($image->cifield_4);\n $image->cifield_5 = utf8_encode($image->cifield_5);\n }\n\n\n // Fix utf chars once and for all\n // $image->title = base64_encode($image->title);\n // $image->description = base64_encode($image->description);\n // $image->cifield_1 = base64_encode($image->cifield_1);\n // $image->cifield_2 = base64_encode($image->cifield_2);\n // $image->cifield_3 = base64_encode($image->cifield_3);\n // $image->cifield_4 = base64_encode($image->cifield_4);\n // $image->cifield_5 = base64_encode($image->cifield_5);\n\n\n\n $vData['assigned_images'][] = $image;\n\n unset($image);\n }\n\n $vData['total_images'] = $query->num_rows();\n }\n\n //var_dump($vData);\n\n //----------------------------------------\n // Form Submission Error?\n //----------------------------------------\n if (isset($_POST[$this->field_name]) OR isset($_POST['field_id_' . $this->field_id]))\n {\n // Post DATA?\n if (isset($_POST[$this->field_name])) {\n $data = $_POST[$this->field_name];\n }\n\n if (isset($_POST['field_id_' . $this->field_id])) {\n $data = $_POST['field_id_' . $this->field_id];\n }\n\n // First.. The Key!\n $vData['field_json']['key'] = $data['key'];\n $vData['temp_key'] = $data['key'];\n\n if (isset($data['images']) == true)\n {\n $vData['assigned_images'] = '';\n\n // Preview URL\n $preview_url = $this->EE->image_helper->get_router_url('url', 'simple_image_url');\n\n foreach($data['images'] as $num => $img)\n {\n $img = $this->EE->image_helper->decode_json(html_entity_decode($img['data']));\n\n // Existing? lets get it!\n if ($img->image_id > 0)\n {\n $image = $img;\n }\n else\n {\n $image = $img;\n\n if ($image->link_image_id > 0)\n {\n continue;\n }\n\n $image->image_id = 0;\n $image->extension = substr( strrchr($image->filename, '.'), 1);\n $image->field_id = $this->field_id;\n\n // Display SIzes URL\n $image->small_img_url = $preview_url . '&amp;temp_dir=yes&amp;fid='.$this->field_id.'&amp;d=' . $vData['temp_key'] . '&amp;f=' . str_replace('.'.$image->extension, \"__{$settings['small_preview']}.{$image->extension}\", $image->filename);\n $image->big_img_url = $preview_url . '&amp;temp_dir=yes&amp;fid='.$this->field_id.'&amp;d=' . $vData['temp_key'] . '&amp;f=' . str_replace('.'.$image->extension, \"__{$settings['big_preview']}.{$image->extension}\", $image->filename);\n }\n\n // We need a good field_id to continue\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // Is it a linked image?\n // Then we need to \"fake\" the channel_id/field_id\n if ($image->link_image_id >= 1)\n {\n $image->entry_id = $image->link_entry_id;\n $image->field_id = $image->link_field_id;\n $image->channel_id = $image->link_channel_id;\n }\n\n // Just in case lets try to get the field_id again\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // ReAssign Field ID (WE NEED THIS)\n $image->field_id = $this->field_id;\n\n // Fix utf chars once and for all\n // $image->title = base64_encode($image->title);\n // $image->description = base64_encode($image->description);\n // $image->cifield_1 = base64_encode($image->cifield_1);\n // $image->cifield_2 = base64_encode($image->cifield_2);\n // $image->cifield_3 = base64_encode($image->cifield_3);\n // $image->cifield_4 = base64_encode($image->cifield_4);\n // $image->cifield_5 = base64_encode($image->cifield_5);\n\n $vData['assigned_images'][] = $image;\n\n unset($image);\n }\n }\n }\n\n $vData['field_json']['images'] = $vData['assigned_images'];\n $vData['field_json'] = base64_encode($this->EE->image_helper->generate_json($vData['field_json']));\n // Base64encode why? Safecracker loves to mess with quotes/unicode etc!!\n\n return $this->EE->load->view('pbf_field', $vData, true);\n }", "title": "" }, { "docid": "bf797dcd278376c3b72c31bc6c4cf856", "score": "0.56509656", "text": "function list_attachment($link,$proposal_id)\n{\n\n\t\techo '<table class=\"table table-warning table-bordered\">';\n\t\techo '<tr class=\"bg-success\"><th>Attachment Type</th><th>Version</th><th>Document</th></tr>';\t\nforeach($GLOBALS['attachment_type'] as $key =>$value)\n\t{\n\t\t$sql='select * from attachment \n\t\t\t\twhere \n\t\t\t\t\tproposal_id=\\''.$proposal_id.'\\' \n\t\t\t\t\tand\n\t\t\t\t\ttype=\\''.$value.'\\' \n\t\t\t\torder by\n\t\t\t\t\tdate_time';\n\t\t\t\t\t\n\t\t$result=run_query($link,'research',$sql);\n\n\t\t$prev_type='';\n\t\twhile($ar=get_single_row($result))\n\t\t{\n\t\t\t$applicant_id=get_applicant_id($link,$proposal_id);\n\n\t\t\tif($ar['forwarded']==0)\t\t\t//all circumstances\n\t\t\t{\n\t\t\t\tif($prev_type!=$ar['type'])\n\t\t\t\t{\n\t\t\t\t\techo '<tr><th class=\"bg-white\" colspan=3>'.$ar['type'].'</th></tr>';\n\t\t\t\t}\n\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td>'.$ar['type'].'</td>\n\t\t\t\t\t\t<td>'.$ar['date_time'].'</td>';\n\t\t\t\techo '<td>';\n\t\t\t\tif(strlen($ar['attachment'])>0)\n\t\t\t\t\t{\n\t\t\t\t\techo_download_button('attachment','attachment','id',$ar['id'],''.$proposal_id.'-'.$ar['type'].'-'.$ar['id'].'-'.$ar['attachment_name']);\n\t\t\t\t}\n\t\t\t\tshow_forward_attachment_button($link,$ar['id']);\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$prev_type=$ar['type'];\n\t\t\t}\n\t\t\t//if 1 and PG teacher =>show download, show forward\n\t\t\t//if 1 and student =>show download, donot show forward\n\t\t\t//if 1 and SRCM/ECM/SRCMS/ECMS=> donot show anything\t\t\t\n\t\t\telseif($ar['forwarded']==1 && $applicant_id==$_SESSION['login'])\t//PG teacher login\n\t\t\t{\n\t\t\t\tif($prev_type!=$ar['type'])\n\t\t\t\t{\n\t\t\t\t\techo '<tr><th class=\"bg-white\" colspan=3>'.$ar['type'].'</th></tr>';\n\t\t\t\t}\n\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td>'.$ar['type'].'</td>\n\t\t\t\t\t\t<td>'.$ar['date_time'].'</td>';\n\t\t\t\techo '<td>';\n\t\t\t\tif(strlen($ar['attachment'])>0)\n\t\t\t\t\t{\n\t\t\t\t\techo_download_button('attachment','attachment','id',$ar['id'],''.$proposal_id.'-'.$ar['type'].'-'.$ar['id'].'-'.$ar['attachment_name']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshow_forward_attachment_button($link,$ar['id']);\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$prev_type=$ar['type'];\n\t\t\t}\n\n\t\t\telseif($ar['forwarded']==1 && !get_user_info($link,$_SESSION['login']))\t//Department login\n\t\t\t{\n\t\t\t\tif($prev_type!=$ar['type'])\n\t\t\t\t{\n\t\t\t\t\techo '<tr><th class=\"bg-white\" colspan=3>'.$ar['type'].'</th></tr>';\n\t\t\t\t}\n\t\t\t\techo '<tr>\n\t\t\t\t\t\t<td>'.$ar['type'].'</td>\n\t\t\t\t\t\t<td>'.$ar['date_time'].'</td>';\n\t\t\t\techo '<td>';\n\t\t\t\tif(strlen($ar['attachment'])>0)\n\t\t\t\t{\n\t\t\t\t\techo_download_button('attachment','attachment','id',$ar['id'],''.$proposal_id.'-'.$ar['type'].'-'.$ar['id'].'-'.$ar['attachment_name']);\n\t\t\t\t}\n\t\t\t\tshow_forward_attachment_button($link,$ar['id']);\n\t\t\t\t\n\t\t\t\techo '</td></tr>';\n\t\t\t\t$prev_type=$ar['type'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//donot show if not forwarded and you are not PG teacher or PG student\n\t\t\t}\t\t\t\n\t\t}\t\n\t}\n\t\techo '</table>';\n\t\n}", "title": "" }, { "docid": "cc3908b6003d9881cabd3db57bf70076", "score": "0.5591752", "text": "function module_display($parameters){\r\n\t\t$wo_owner_id= $this->check_parameters($parameters,\"wo_owner_id\",-1);\r\n\t\t$cmd = $this->check_parameters($parameters,\"command\");\r\n\t\t$pos = $this->check_parameters($parameters,\"__layout_position\");\r\n\t\tif (($pos==2 || $pos==3) && $cmd!=\"\"){\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$image_list\t= \"\";\r\n\t\t$out \t\t= \"\";\r\n\t\t$where=\"\";\r\n\t\tif ($wo_owner_id !=-1){\r\n\t\t\t$where = \" irl_identifier=$wo_owner_id and \";\r\n\t\t}\r\n\t\t$irl_number = -1;\r\n\t\t$sql \t\t= \"select * from imagerotate_list\r\n\t\t\t\t\t\t\tleft outer join menu_to_object on \r\n\t\t\t\t\t\t\t\t(mto_client = irl_client and mto_object=irl_identifier and mto_module='$this->webContainer' and \r\n\t\t\t\t\t\t\t\t\t(mto_menu=\".$parameters[\"current_menu_location\"].\" or \r\n\t\t\t\t\t\t\t\t\t\t(mto_menu is null and irl_all_locations=1)\r\n\t\t\t\t\t\t\t\t\t) and mto_publish=1\r\n\t\t\t\t\t\t\t\t) \r\n\t\t\t\t\t where \r\n\t\t\t\t\t $where \r\n\t\t\t \t\t\t(mto_menu=\".$parameters[\"current_menu_location\"].\" or (mto_menu is null and irl_all_locations=1)) and \r\n\t\t\t\t\t irl_client= $this->client_identifier\";\r\n//\t\tprint $sql;\r\n\t\t$result = $this->call_command(\"DB_QUERY\",Array($sql));\r\n\t\t$max = count($this->previewed);\r\n\t\twhile($r = $this->call_command(\"DB_FETCH_ARRAY\",Array($result))){\r\n\t\t\t$ok = 1;\r\n\t\t\t$irl_identifier\t\t\t\t= $r[\"irl_identifier\"];\r\n\t\t\tfor ($index=0;$index<$max;$index++){\r\n\t\t\t\tif ($this->previewed[$index] == $irl_identifier){\r\n\t\t\t\t\t$ok = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($ok==1){\r\n\t//\t \tprint \" Label :: \t\t\t\".$r[\"irl_label\"];\r\n\t// \tprint \" Identifier :: \t\t\".$r[\"irl_identifier\"];\r\n\t// \tprint \" Number to show ::\t\".$r[\"irl_number\"];\r\n\t\t\t\t$irl_number\t\t\t\t\t= $r[\"irl_number\"];\r\n\t\t\t\t$irl_type\t\t\t\t\t= $r[\"irl_type\"];\r\n\t\t\t\t$irl_direction\t\t\t\t= $r[\"irl_direction\"];\r\n\t\t\t\t$irl_width\t\t\t\t\t= $this->check_parameters($r,\"irl_width\",0);\r\n\t\t\t\t$irl_height\t\t\t\t\t= $this->check_parameters($r,\"irl_height\",0);\r\n\t\t\t\t$irl_vspace\t\t\t\t\t= $this->check_parameters($r,\"irl_vspace\",0);\r\n\t\t\t\t$irl_hspace\t\t\t\t\t= $this->check_parameters($r,\"irl_hspace\",0);\r\n\t\t\t\t$irl_align\t\t\t\t\t= $this->check_parameters($r,\"irl_align\",0);\r\n\t\t\t\tif ($irl_align==0){\r\n\t\t\t\t\t$irl_align = \"alignleft\";\r\n\t\t\t\t} else if($irl_align==1){\r\n\t\t\t\t\t$irl_align = \"aligncenter\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$irl_align = \"alignright\";\r\n\t\t\t\t}\r\n\t\t\t\t$sql = \"select * from imagerotate_filelist\r\n\t\t\t\t\t\t\tinner join file_info on (file_identifier = irlf_file and irlf_client = file_client)\r\n\t\t\t\t\t\t where irlf_list = $irl_identifier and irlf_client = $this->client_identifier \r\n\t\t\t\t\t\t order by irlf_rank\";\r\n\t\t\t\t$fileresult = $this->call_command(\"DB_QUERY\",Array($sql));\r\n\t\t\t\t$numfiles\t= $this->call_command(\"DB_NUM_ROWS\",Array($fileresult));\r\n\t\t\t\t$c=0;\r\n\t\t\t\t$image_list = Array();\r\n\t \t while ($filerecord = $this->call_command(\"DB_FETCH_ARRAY\",Array($fileresult))){\r\n\t\t\t\t\t$dir_path = $this->call_command(\"LAYOUT_GET_DIRECTORY_PATH\",Array($filerecord[\"file_directory\"]));\r\n\t\t\t\t\t$destination_filename = $dir_path.$filerecord[\"file_md5_tag\"].$this->file_extension($filerecord[\"file_name\"]);\r\n\t \t\t$image_list[$c]=Array(\"<object type='img' width='\".$filerecord[\"file_width\"].\"' height='\".$filerecord[\"file_height\"].\"'>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<alt><![CDATA[\".$filerecord[\"file_label\"].\"]]></alt>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<src><![CDATA[\".$destination_filename.\"]]></src>\r\n\t\t\t\t\t\t\t\t\t\t\t</object>\",0);\r\n\t\t\t\t\t$c++;\r\n\t\t\t\t\t// (\".$filerecord[\"file_size\"].\")\r\n\t \t }\r\n\t\t\t\t$this->call_command(\"DB_FREE\",Array($fileresult));\r\n\t\t\t\t$images = \"\";\r\n\t\t\t\tif ($irl_type==0){\r\n\t\t\t\t\t$max = ($numfiles>$irl_number)?$irl_number:$numfiles;\r\n\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t$found=0;\r\n\t\t\t\t\t\twhile ($found==0){\r\n\t\t\t\t\t\t\t$index = rand(0,$numfiles-1);\r\n\t\t\t\t\t\t\tif ($image_list[$index][1]==0){\r\n\t\t\t\t\t\t\t\t$found=1;\r\n\t\t\t\t\t\t\t\t$images .= $image_list[$index][0];\r\n\t\t\t\t\t\t\t\t$image_list[$index][1]=1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ($irl_type==1){\r\n\t\t\t\t\t$listOfImages = $this->check_parameters($_SESSION,\"IR_\".$irl_identifier,Array());\r\n\t\t\t\t\tif (count($listOfImages)==0){\r\n\t\t\t\t\t\t$max = ($numfiles>$irl_number) ? $irl_number : $numfiles ;\r\n\t\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t\t$found=0;\r\n\t\t\t\t\t\t\twhile ($found==0){\r\n\t\t\t\t\t\t\t\t$index = rand(0,$numfiles-1);\r\n\t\t\t\t\t\t\t\tif ($image_list[$index][1]==0){\r\n\t\t\t\t\t\t\t\t\t$found=1;\r\n\t\t\t\t\t\t\t\t\t$images .= $image_list[$index][0];\r\n\t\t\t\t\t\t\t\t\t$image_list[$index][1]=1;\r\n\t\t\t\t\t\t\t\t\t$listOfImages[$i] = $index;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$_SESSION[\"IR_\".$irl_identifier] = $listOfImages;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$max = count($listOfImages);\r\n\t\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t\t$images .= $image_list[$listOfImages[$i]][0];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$index = $this->check_parameters($_SESSION,\"IRI_\".$irl_identifier,0);\r\n\t\t\t\t\t$max = ($numfiles>$irl_number) ? $irl_number : $numfiles;\r\n\t\t\t\t\tif ($this->check_parameters($_SESSION,\"IRI_\".$irl_identifier,0)>=$numfiles){\r\n\t\t\t\t\t\t$_SESSION[\"IRI_\".$irl_identifier] = 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$_SESSION[\"IRI_\".$irl_identifier] = $index + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($index >= $numfiles){\r\n\t\t\t\t\t\t$index=0;\r\n\t\t\t\t\t\t$_SESSION[\"IRI_\".$irl_identifier] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t$images .= $image_list[$index][0];\r\n\t\t\t\t\t\t$index++;\r\n\t\t\t\t\t\tif ($index >= $numfiles){\r\n\t\t\t\t\t\t\t$index=0;\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\t$dir = ($irl_direction==1)?\"vertical\":\"horizontal\";\r\n\t\t\t\t$out .= \"<module name=\\\"\".$this->module_name.\"\\\" display=\\\"IMAGELIST\\\">\";\r\n\t\t\t\t$out .= \"\t<type identifier=\\\"$irl_identifier\\\" direction=\\\"$dir\\\" resize_width=\\\"$irl_width\\\" resize_height=\\\"$irl_height\\\" vspace=\\\"$irl_vspace\\\" hspace=\\\"$irl_hspace\\\" align='$irl_align'/>\";\r\n\t\t\t\t$out .= \"\t$images\";\r\n\t\t\t\t$out .= \"</module>\";\r\n\t\t\t}\r\n }\r\n $this->call_command(\"DB_FREE\",Array($result));\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "62eae4e379ccb9c91d865022eda40e2f", "score": "0.55894893", "text": "public function core_admin_display_page_attachments_edit_end($tpl_vars)\n {\n //$tpl_vars are the template vars sent to view class...\n\n if (!isset($tpl_vars['addon']) || $tpl_vars['addon'] != 'example' || $tpl_vars['pageName'] != 'examplePage') {\n //we checked to make sure the page attachments being edited were for\n //this addon, and for a specific page (examplePage which does not actually exist)\n\n //since this is not for the specific page, don't do anything.\n return;\n }\n\n //would do something here, perhaps change the template used to display\n //the page in a format more useful for how this page use's things.\n\n //For example, the storefront addon changes it to make more sense since\n //it re-tasks the category ID to be the template ID selected by each user,\n //to allow each storefront user to specify a specific template...\n }", "title": "" }, { "docid": "10e7b8677e3f1ca46b310c340af61ced", "score": "0.556062", "text": "function display_pm_attachments($privmsgs_id, $switch_attachment)\n{\n\tglobal $config, $user, $template, $lang;\n\n\tif ($user->data['user_level'] == ADMIN)\n\t{\n\t\t$auth_download = 1;\n\t}\n\telse\n\t{\n\t\t$auth_download = intval($config['allow_pm_attach']);\n\t}\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']) || !$auth_download)\n\t{\n\t\treturn;\n\t}\n\n\tdisplay_attachments($privmsgs_id, 'postrow');\n\n\t$template->assign_block_vars('switch_attachments', array());\n\t$template->assign_vars(array(\n\t\t'L_DELETE_ATTACHMENTS' => $lang['Delete_attachments']\n\t\t)\n\t);\n}", "title": "" }, { "docid": "6188c9d5d1783cba6dad3fc17637d99f", "score": "0.55547684", "text": "protected function prepareDisplaySetting()\n {\n if ($this->fixture->hasData('landing_page')) {\n $this->fields['general']['landing_page'] = $this->getBlockId($this->fixture->getLandingPage());\n }\n\n $this->prepareAvailableSortBy();\n\n $useConfig = array_diff($this->dataUseConfig, array_keys($this->fields['general']));\n if (!empty($useConfig)) {\n $this->fields['use_config'] = $useConfig;\n }\n unset($this->fields['general']['use_config']);\n }", "title": "" }, { "docid": "0eff7f47bc08700f3ccee7a466d5fe61", "score": "0.55531645", "text": "function attachments()\n\t{\n if($this->_user->id === 0)\n {\n\t $this->cacheAction = Configure::read('Cache.expires');\n }\n\n\t\t$this->EverywhereAfterFind = true;\n\n\t\t$listing_id = 0;\n\n\t\t$extension = '';\n\n\t\t$listing = array();\n\n\t\t$media_id = Sanitize::getString($this->params,'media_id');\n\n\t\tif($media_id && $listing_info = $this->Media->getListingInfo($media_id)) {\n\n\t\t\textract($listing_info);\n\t\t}\n\t\telse {\n\n\t\t\t$id = explode(':',base64_decode(urldecode(Sanitize::getString($this->params,'id'))));\n\n\t\t\t$listing_id = (int) array_shift($id);\n\n\t\t\t$extension = array_shift($id);\n\n\t\t}\n\n\t\tif(!$listing_id) {\n\t\t\treturn cmsFramework::noAccess();\n\t\t}\n\n\t\t$sort = Sanitize::getString($this->params,'order',Sanitize::getString($this->Config,'attachment_order_default'));\n\n\t\t$this->Media->processSorting($sort);\n\n\t\t$conditions = array(\n\t\t\t'Media.listing_id = ' . $listing_id,\n\t\t\t'Media.media_type = \"attachment\"'\n\t\t);\n\n\t\tif(!$this->Access->isManager()) {\n\t\t\t$conditions[] = 'Media.published = 1';\n\t\t\t$conditions[] = 'Media.approved = 1';\n\t\t}\n\n\t\t$attachments = $this->Media->findAll(array('conditions'=>$conditions));\n\n\t\t$this->set(array(\n\t\t\t'media_id'=>$media_id,\n\t\t\t'listing_id'=>$listing_id,\n\t\t\t'attachments'=>$attachments\n\t\t));\n\n\t\treturn $this->render('media','attachments');\n\t}", "title": "" }, { "docid": "4093fe2925220bced76e01e4e297a727", "score": "0.5541842", "text": "function init_display_template($template_var, $replacement, $filename = 'viewtopic_attach_body.tpl')\n{\n\tglobal $template, $config;\n\n\t// This function is adapted from the old template class\n\t// I wish i had the functions from the 3.x one. :D (This class rocks, can't await to use it in Mods)\n\n\t// Handle Attachment Informations\n\tif (!isset($template->uncompiled_code[$template_var]) && empty($template->uncompiled_code[$template_var]))\n\t{\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif (!isset($template->files[$template_var]))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): No file specified for handle $template_var\");\n\t\t}\n\n\t\t$filename_2 = $template->files[$template_var];\n\n\t\t$str = implode('', @file($filename_2));\n\t\tif (empty($str))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): File $filename_2 for handle $template_var is empty\");\n\t\t}\n\n\t\t$template->uncompiled_code[$template_var] = $str;\n\t}\n\n\t$complete_filename = $filename;\n\tif (substr($complete_filename, 0, 1) != '/')\n\t{\n\t\t$complete_filename = $template->root . '/' . $complete_filename;\n\t\tif (!file_exists($complete_filename))\n\t\t{\n\t\t\t$complete_filename = IP_ROOT_PATH . 'templates/' . $config['xs_def_template'] . '/' . $filename;\n\t\t}\n\t}\n\n\tif (!file_exists($complete_filename))\n\t{\n\t\tdie(\"Template->make_filename(): Error - file $complete_filename does not exist\");\n\t}\n\n\t$content = implode('', file($complete_filename));\n\tif (empty($content))\n\t{\n\t\tdie('Template->loadfile(): File ' . $complete_filename . ' is empty');\n\t}\n\n\t// replace $replacement with uncompiled code in $filename\n\t$template->uncompiled_code[$template_var] = str_replace($replacement, $content, $template->uncompiled_code[$template_var]);\n\n\t// Force Reload on cached version\n\tdisplay_compile_cache_clear($template->files[$template_var], $template_var);\n}", "title": "" }, { "docid": "723fbd3adcc657be4c8c4e0faaab978a", "score": "0.5516555", "text": "function Show_attachments_img_thumb($data=array()) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<a class='resized_img' rel='lightbox[{$data['attach_rel_id']}]' id='ipb-attach-url-{$data['_attach_id']}' href=\"{parse url=\"app=core&amp;module=attach&amp;section=attach&amp;attach_rel_module={$data['type']}&amp;attach_id={$data['attach_id']}\" base=\"public\"}\" title=\"{$data['location']} - {$this->lang->words['attach_size']} {$data['file_size']}, {$this->lang->words['attach_ahits']} {$data['attach_hits']}\"><img itemprop=\"image\" src=\"{$this->settings['upload_url']}/{$data['t_location']}\" id='ipb-attach-img-{$data['_attach_id']}' style='width:{$data['t_width']};height:{$data['t_height']}' class='attach' width=\"{$data['t_width']}\" height=\"{$data['t_height']}\" alt=\"{$data['location']}\" /></a>\n{parse expression=\"$this->registry->output->addMetaTag( 'og:image', \"{$this->settings['upload_url']}/{$data['t_location']}\", false )\"}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "e7c40c3f90a3f7abbd15c2f59d4910a9", "score": "0.5501987", "text": "function apptivo_ecommerce_populate_custom_fields() {\n\t// Attachment exclusion\n\t$args = array( \n\t\t'post_type' \t=> 'attachment', \n\t\t'numberposts' \t=> -1, \n\t\t'post_status' \t=> null, \n\t\t'fields' \t\t=> 'ids'\n\t); \n\t$attachments = get_posts($args);\n\tif ($attachments) foreach ($attachments as $id) :\n\t\tadd_post_meta($id, '_apptivo_ecommerce_exclude_image', 0);\n\tendforeach;\t\n}", "title": "" }, { "docid": "a23a1b1100d6d998c4c0c11be3bb2568", "score": "0.547538", "text": "function ufl_display_attached_items_list($atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'filetype' => 'pdf',\n\t\t'showdesc' => 'false',\n\t\t'order' => 'asc',\n\t\t'orderby' => 'name',\n\t\t'showasdates' => 'false',\n\t\t'dateformat' => 'F j, Y',\n\t\t'exclude' => '',\n\t\t'outputtype' => 'list',\n\t\t'limit' => '-1'\n\t), $atts));\n\tglobal $post;\n\t// List of mime types\n\t$mime_types = array(\n\t\t\"pdf\"=>\"application/pdf\",\"zip\"=>\"application/zip\",\"docx\"=>\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\"doc\"=>\"application/msword\",\"xls\"=>\"application/vnd.ms-excel\",\"xlsx\"=>\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\"ppt\"=>\"application/vnd.ms-powerpoint\",\"pptx\"=>\"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\"gif\"=>\"image/gif\",\"png\"=>\"image/png\",\"jpeg\"=>\"image/jpg\",\"jpg\"=>\"image/jpg\",\"mp3\"=>\"audio/mpeg\",\"wav\"=>\"audio/x-wav\",\"mpeg\"=>\"video/mpeg\",\"mpg\"=>\"video/mpeg\",\"mpe\"=>\"video/mpeg\",\"mov\"=>\"video/quicktime\",\"avi\"=>\"video/x-msvideo\"\n\t);\n\t$args = array( 'orderby' => $orderby, 'order' => $order, 'post_type' => 'attachment', 'numberposts' => $limit, 'post_status' => null, 'post_parent' => $post->ID, 'exclude' => $exclude );\n\tif ( $filetype != \"all\" ) {\n\t\t$short_mime_types = explode(\",\", $filetype);\n\t\tforeach ($short_mime_types as $key => $short) {\n\t\t\t$types[] = $mime_types[$short];\n\t\t}\n\t\t$mimes = array( 'post_mime_type' => $types );\n\t\t$args = array_merge( $args, $mimes );\n\t}\n\t$attachments = get_posts($args);\n\tif ( $attachments ) {\n\t\tif ( $outputtype == 'list' ) {\n\t\t\t// Build UL to return if items were found.\n\t\t\t$out = '<ul class=\"attachment-list attachment-list-'.$filetype.'\">';\n\t\t\tforeach ( $attachments as $attachment ) {\n\t\t\t\t// If the last 8 characters in the attachment title are a timestamp (e.g. filename-20120927),\n\t\t\t\tif ( $showasdates == 'true' && is_numeric( substr( $attachment->post_title, -8 ) ) ) {\n\t\t\t\t\t// Use the date as the link text instead of the title\n\t\t\t\t\t$link_text = date( $dateformat, strtotime( substr( $attachment->post_title, -8 ) ) );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Use the default link text, which is the attachment title\n\t\t\t\t\t$link_text = false;\n\t\t\t\t}\n\t\t\t\t$out .= '<li>' . wp_get_attachment_link( $attachment->ID , false, false, false, $link_text ) . ' <span>(' . strtoupper( array_search( get_post_mime_type( $attachment->ID ), $mime_types ) ) . ')</span>';\n\t\t\t\tif ($showdesc == 'true') { $out .= '<br><p>'.$attachment->post_content.'</p>'; }\n\t\t\t\t$out .= '</li>';\n\t\t\t}\n\t\t\t$out .= '</ul>';\n\t\t} elseif ( $outputtype == 'single' && $limit == '1' ) {\n\t\t\tforeach ( $attachments as $attachment ) {\n\t\t\t\t$out = wp_get_attachment_link( $attachment->ID , false, false, false, $link_text ) . ' <span>(' . strtoupper( array_search( get_post_mime_type( $attachment->ID ), $mime_types ) ) . ')</span>';\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Return blank string if there is nothing attached.\n\t\t$out = '';\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "81ce0bd77b5464386fa33e4c024cfa5e", "score": "0.5460727", "text": "function posts_display_extend($atts){\n\tob_start();\n\t $a = shortcode_atts(array('handle'=>'-1', 'default_image'=>'//i.imgur.com/p4juyuT.png', 'display' => 3, 'offset' => 0, 'total' => 10, 'list' => false, 'publication' => false), $atts);\n\t// No ID value\n\tif(strcmp($a['handle'], '-1') == 0){\n\t\t\treturn \"\";\n\t}\n\t$handle=$a['handle'];\n\t$default_image = $a['default_image'];\n\t$display = $a['display'];\n\t$offset = $a['offset'];\n\t$total = $a['total'];\n\t$list = $a['list'] =='false' ? false: $a['list'];\n\t$publication = $a['publication'] =='false' ? false: $a['publication'];\n\n\t$data = file_get_contents(\"https://medium.com/\".$handle.\"/latest?format=json\");\n\n\t$data = str_replace(\"])}while(1);</x>\", \"\", $data);\n\tif($publication) {\n\t\t\n\t\t//If handle provided is specified as a publication\n\t\t$json = json_decode($data);\n\t\t$items = array();\n\t\t$count = 0;\n\t\t$name = '';\n\t\tif(isset($json->payload->posts))\n\t\t{\n\t\t\t$posts = $json->payload->posts;\n\t\n\t\t\tforeach($posts as $post)\n\t\t\t{\n\t\t\t\t$name = $post->creatorId;\n\t\t\t\tif($count <= 2) {\n\n\t\t\t\t\tif(strlen($post->title) >= 40) {\n\t\t\t\t\t\t$items[$count]['title'] = substr($post->title,0,40).'...';\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$items[$count]['title'] = $post->title;\t\n\t\t\t\t\t}\n\t\t\t\t\tif ($post->previewContent->bodyModel->paragraphs[2]->text == NUll) {\n\t\t\t\t\t$items[$count]['paragraphs'] = substr($post->previewContent->bodyModel->paragraphs[1]->text,0,90).'...';\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$items[$count]['paragraphs'] = substr($post->previewContent->bodyModel->paragraphs[2]->text,0,90).'...';\n\t\t\t\t\t}\n\t\t\t\t\t$items[$count]['name'] = json_decode(json_encode($json->payload->references->User->$name->name), True);\n\t\t\t\t\t$items[$count]['autherImg'] = json_decode(json_encode($json->payload->references->User->$name->imageId), True);\n\t\t\t\t\t$items[$count]['url'] = 'https://medium.com/'.$handle.'/'.$post->uniqueSlug;\n\t\t\t\t\t$items[$count]['subtitle'] = isset($post->content->subtitle) ? $post->content->subtitle : \"\";\n\t\t\t\t\tif(!empty($items[$count]['autherImg']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = '//cdn-images-1.medium.com/fit/c/60/60/'.$json->payload->references->User->$name->imageId;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$image = $default_image;\n\t\t\t\t\t}\n\n\t\t\t\t\t$items[$count]['image'] = $image;\n\t\t\t\t\t$items[$count]['duration'] = round($post->virtuals->readingTime);\n\t\t\t\t\t$items[$count]['date'] = isset($post->firstPublishedAt) ? date('d M Y', $post->firstPublishedAt/1000): \"\";\n\t\t\t\t}\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\tif($offset)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, $offset); \n\t\t\t}\n\n\t\t\tif(count($items) > $total)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, 0, $total); \n\t\t\t}\n\t\t}\n\t}\n\telse {\n\n\t\t$json = json_decode($data);\n\t\t$items = array();\n\t\t$count = 0;\n\t\t\n\t\tif(isset($json->payload->references->Post))\n\t\t{\n\t\t\t$posts = $json->payload->references->Post;\n\n\t\t\t\n\t\t\tforeach($posts as $post)\n\t\t\t{\t\t\t\n\t\t\t\tif($count <= 2 ) {\n\t\t\t\t\t$items[$count]['title'] = $post->title;\n\t\t\t\t\t$items[$count]['paragraphs'] = $post->previewContent->bodyModel->paragraphs[2]->text;\n\t\t\t\t\t$items[$count]['name'] = $json->payload->user->name;\n\t\t\t\t\t$items[$count]['autherImg'] = json_decode(json_encode($json->payload->references->User->$name->imageId), True);\n\t\t\t\t\t$items[$count]['url'] = 'https://medium.com/'.$handle.'/'.$post->uniqueSlug;\n\t\t\t\t\t$items[$count]['subtitle'] = isset($post->content->subtitle) ? $post->content->subtitle : \"\";\n\t\t\t\t\tif(!empty($items[$count]['autherImg']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = '//cdn-images-1.medium.com/fit/c/60/60/'.$json->payload->references->User->$name->imageId;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$image = $default_image;\n\t\t\t\t\t}\n\t\t\t\t\t$items[$count]['image'] = $image;\n\t\t\t\t\t$items[$count]['duration'] = round($post->virtuals->readingTime);\n\t\t\t\t\t$items[$count]['date'] = isset($post->firstPublishedAt) ? date('d M Y', $post->firstPublishedAt/1000): \"\";\n\t\t\t\t}\n\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\tif($offset)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, $offset); \n\t\t\t}\n\n\t\t\tif(count($items) > $total)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, 0, $total); \n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t<ul id=\"display-medium-owl-demo\" class=\"display-medium-owl-carousel\">\n\t\t<?php foreach($items as $item) { ?>\n\t\t <li class=\"display-medium-item\">\n\t\t\t <a href=\"<?php echo $item['url']; ?>\" class='display-medium-link' target=\"_blank\" title=\"<?php echo $item['title']; ?>\">\n\t\t\t \t<div class=\"display-medium-date-read\">\n\t\t \t\t\t<?php echo '<img src=\"'.$item['image'].'\" class=\"img\" alt=\"AuthorImg\">'; ?>\n\t\t\t\t</div>\n\t\t\t \t<div class=\"display-medium-content\">\n\t\t\t\t <div class=\"date_name\">\n\t\t\t\t \t<p><?php echo $item['name']; ?></p>\n\t\t\t \t \t<?php echo \"<time class='display-medium-date'>\".$item['date'].\"</time>\"; ?>\n\t\t\t\t </div>\n\t\t\t\t <p class=\"display-medium-title\"><?php echo $item['title']; ?></p>\n\t\t\t\t <p class=\"display-medium-title description\"><?php echo $item['paragraphs']; ?><span class=\"read_more\">Read more</span></p>\n\t\t\t\t</div>\n\t\t\t </a>\n\t\t </li>\n\t\t<?php } ?>\n\t</ul>\n\t<?php\n\t\t if(empty($items)) echo \"<div class='display-medium-no-post'>No posts found!</div>\";\n\t ?>\n\t<?php\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "c2d4081cea6194514dd637f6c0cba691", "score": "0.5459333", "text": "function prepareForBuildPage() \n\t{\n\t\t// PRG rule, to avoid POSTDATA resend\n\t\t$this->rulePRG();\n\t\t\n\t\t// fill data\n\t\t$this->fillMembers();\n\t\t$this->fillGroups();\n\t\t\n\t\t$this->calculateRecordCount();\n\n\t\t// build pagination block\n\t\t$this->buildPagination();\n\n\t\t$this->recSet = $this->dataSource->getList( $this->queryCommand );\n\n\t\tif( !$this->recSet ) {\n\t\t\tshowError( $this->dataSource->lastError() );\n\t\t}\n\n\t\t$this->fillGridData();\n\n\t\t//\tmust be called after fillGridData\n\t\t$this->fillSources();\n\t\t\n\t\t$this->buildSearchPanel();\n\t\t$this->fillFields();\n\n\t\t$this->addCommonJs();\n\t\t$this->addCommonHtml();\n\n\t\t$this->commonAssign();\t\n\t}", "title": "" }, { "docid": "896483578a6d2f21e7c9ce7c5af65ef0", "score": "0.5453157", "text": "function p2_attachments()\r\n{\r\n\t\r\n\t$args = array(\r\n\t\t'post_type' => 'attachment',\r\n\t\t'post_parent' => get_the_ID()\r\n\t);\r\n\t$attachments = get_posts($args);\r\n\t\r\n\tif ( count($attachments) > 0 ):\r\n\r\n?>\r\n\t\t<!-- attachments -->\r\n\t\t\t<div class=\"post-attachments\">\r\n\t\t\t\t<p><strong>Attachments:</strong></p>\r\n\t\t\t\t\t<ul>\r\n<?php foreach ( $attachments as $attachment ): ?>\r\n\t\t\t\t\t\t<li><?php echo wp_get_attachment_link($attachment->ID, '', true, false, basename($attachment->guid)) ?></li>\r\n<?php endforeach; ?>\r\n\t\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t<!-- /attachments -->\r\n<?php\r\n\t\t\r\n\tendif;\r\n\t\r\n}", "title": "" }, { "docid": "368f155372a6ef0776d23b73ec574c62", "score": "0.54461694", "text": "function initData() {\n\t\tif (isset($this->article)) {\n\t\t\t$this->_data = array(\n\t\t\t\t'commentsToEditor' => $this->article->getCommentsToEditor()\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "df725d19b3b436ab277a24aff17aa480", "score": "0.5445297", "text": "protected function prepareVars()\n {\n if ($this->formField->disabled) {\n $this->previewMode = true;\n }\n\n if ($this->previewMode) {\n $this->useCaption = false;\n }\n\n $this->vars['fileList'] = $fileList = $this->getFileList();\n $this->vars['singleFile'] = $fileList->first();\n $this->vars['displayMode'] = $this->getDisplayMode();\n $this->vars['emptyIcon'] = $this->getConfig('emptyIcon', 'icon-upload');\n $this->vars['imageHeight'] = $this->imageHeight;\n $this->vars['imageWidth'] = $this->imageWidth;\n $this->vars['acceptedFileTypes'] = $this->getAcceptedFileTypes(true);\n $this->vars['cssDimensions'] = $this->getCssDimensions();\n $this->vars['cssBlockDimensions'] = $this->getCssDimensions('block');\n $this->vars['useCaption'] = $this->useCaption;\n $this->vars['prompt'] = $this->getPromptText();\n }", "title": "" }, { "docid": "69946713f3494532d3661281fb5e77f4", "score": "0.54421407", "text": "function get_attachments($posting_field_name)\n{\n\t$image_types=str_replace(',',', ',get_option('valid_images'));\n\n\trequire_lang('javascript');\n\trequire_javascript('javascript_swfupload');\n\trequire_css('swfupload');\n\n\trequire_code('files2');\n\t$max_attach_size=get_max_file_size(get_member(),$GLOBALS['SITE_DB']);\n\t$attach_size_field=form_input_hidden('MAX_FILE_SIZE',strval($max_attach_size));\n\n\t$num_attachments=post_param_integer('num_attachments',has_js()?1:3);\n\n\t$attachments=new ocp_tempcode();\n\tfor ($i=1;$i<=$num_attachments;$i++)\n\t{\n\t\t$attachments->attach(do_template('ATTACHMENT',array('_GUID'=>'c3b38ca70cbd1c5f9cf91bcae9ed1134','POSTING_FIELD_NAME'=>$posting_field_name,'I'=>strval($i))));\n\t}\n\n\tif (get_forum_type()=='ocf')\n\t{\n\t\trequire_code('ocf_groups');\n\t\trequire_lang('ocf');\n\t\t$max_attachments=ocf_get_member_best_group_property(get_member(),'max_attachments_per_post');\n\t} else $max_attachments=100;\n\n\t$attachment_template=do_template('ATTACHMENT',array('_GUID'=>'c3b38ca70cbd1c5f9cf91bcae9ed11dsds','POSTING_FIELD_NAME'=>$posting_field_name,'I'=>'__num_attachments__'));\n\t$attachments=do_template('ATTACHMENTS',array('_GUID'=>'054921e7c09412be479676759accf222','POSTING_FIELD_NAME'=>$posting_field_name,'ATTACHMENT_TEMPLATE'=>$attachment_template,'IMAGE_TYPES'=>$image_types,'ATTACHMENTS'=>$attachments,'MAX_ATTACHMENTS'=>strval($max_attachments),'NUM_ATTACHMENTS'=>strval($num_attachments)));\n\n\treturn array($attachments,$attach_size_field);\n}", "title": "" }, { "docid": "516deae629b63aeb2d70765a2a0fa64b", "score": "0.5423171", "text": "function attach_to($display_id) { return; }", "title": "" }, { "docid": "cd5a5db902e2c13b79fc7d5d9f7e7575", "score": "0.5416422", "text": "function display_post_attachments($post_id, $switch_attachment)\n{\n\tglobal $config, $is_auth;\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']))\n\t{\n\t\treturn;\n\t}\n\n\tif ($is_auth['auth_download'] && $is_auth['auth_view'])\n\t{\n\t\tdisplay_attachments($post_id, 'postrow');\n\t}\n\telse\n\t{\n\t\t// Display Notice (attachment there but not having permissions to view it)\n\t\t// Not included because this would mean template and language file changes (at this stage this is not a wise step. ;))\n\t}\n}", "title": "" }, { "docid": "78fc6b9db4e3128340fe170f85a6c470", "score": "0.5395494", "text": "function controller_attachment_create($page_name) {\n if (request_is_post()) {\n controller_attachment_submit($page_name);\n die();\n }\n $page = try_textblock_get($page_name);\n identity_require('textblock-attach', $page);\n\n // Initial attachment page. Rather empty.\n $view = array();\n $view['title'] = 'Ataseaza la pagina '.$page_name;\n $view['page_name'] = $page_name;\n $view['form_values'] = array();\n $view['form_errors'] = array();\n execute_view_die('views/attachment.php', $view);\n}", "title": "" }, { "docid": "71a7432adda1fa544487dea487798096", "score": "0.538727", "text": "public function initializeView()\n {\n $this->view->assign('extConf', ObjectAccess::getGettableProperties($this->extConf));\n $this->view->assign('id', $GLOBALS['TSFE']->id);\n $this->view->assign('data', $this->configurationManager->getContentObject()->data);\n }", "title": "" }, { "docid": "9419542682a434aa1fcb7bf100d43030", "score": "0.53755105", "text": "public function afterSetNode() {\n\n foreach ($this->attachment_types as $type) {\n $attachments[$type] = $this->extractMimeType($this->Layout->node, $type);\n }\n $this->Layout->node['Nodeattachments'] = $attachments;\n }", "title": "" }, { "docid": "c9fa44170322e055d6928a0c4cf34abb", "score": "0.536765", "text": "public function sharedPageAttachments($type, &$attachments);", "title": "" }, { "docid": "af28c6e2a39ebd85b36220d8d01b5815", "score": "0.53598636", "text": "function allow_fetch_attachments()\n {\n }", "title": "" }, { "docid": "98eeb04322c86495a2b35a06fcbbd3c6", "score": "0.53474057", "text": "function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"id_personal_repeat\"] = $values['id_group_repeat'];\n$data[\"flag\"] = \"2\";\n$rs = DB::Select(\"outbox_line\", $data );\n$rs1 = DB::Select(\"outbox_mail_alibaba\", $data );\n$rs2 = DB::Select(\"outbox_mail_aws\", $data );\n$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data );\n$rs4 = DB::Select(\"outbox_telegram\", $data );\n$rs5 = DB::Select(\"outbox_whatsapp\", $data );\n\nif($rs->fetchAssoc() || $rs1->fetchAssoc() || $rs2->fetchAssoc() || $rs3->fetchAssoc() || $rs4->fetchAssoc() || $rs5->fetchAssoc()){\n\t$pageObject->hideField(\"id_group_repeat\");\n\t$pageObject->hideField(\"member_agenda_id\");\n\t$pageObject->hideField(\"dodate\");\n}\n\n\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "032441661be7f76e58baa5375d522225", "score": "0.5311933", "text": "protected function initDisplayVars_table(){\r\n\t\t\r\n\t\t$this->objTable->setDefaultOrderby(\"title\");\r\n\t\t\r\n\t\t$pagingOptions = $this->objTable->getPagingOptions();\r\n\t\t\r\n\t\tif(!empty($this->layoutType)){\r\n\t\t\t$pagingOptions[\"layout_type\"] = $this->layoutType;\r\n\t\t}\r\n\t\t\r\n\t\t$response = $this->objLayouts->getArrLayoutsPaging($pagingOptions);\r\n\t\t\r\n\t\t$this->arrLayouts = $response[\"layouts\"];\r\n\t\t$pagingData = $response[\"paging\"];\r\n\t\t\r\n\t\t$urlLayouts = HelperUC::getViewUrl_LayoutsList();\r\n\t\t\r\n\t\t$this->objTable->setPagingData($urlLayouts, $pagingData);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0d37a7ad89228dcdb6ed4b347ab51ebd", "score": "0.5301552", "text": "public function printData() {\n if (AttachmentManagement::validate($this->attachments, static::attachmentsMandatoryNumber)) {\n echo \"<br>Tip Market : \" . get_class($this);\n echo \"<br>Numar case lucratoare: \" . $this->caseLucratoare;\n echo \"<br>Numar case disponibile: \" . static::case_disponibile;\n echo \"<br>Dotari: \";\n if ($this->attachments != null) {\n foreach ($this->attachments as $key => $value) {\n echo $value . \", \";\n }\n }\n echo \"<br>Profit initial: \" . static::profit_initial;\n echo \"<br>Profit Final: \" . $this->calculateProfit();\n } else {\n echo \"You need to add some attachments\";\n }\n }", "title": "" }, { "docid": "b382dc797c41b77d98c81aa9957d2592", "score": "0.5273817", "text": "function document_view($attachment){\n $data['attachment'] = $attachment;\n //print_r($data);\n $this->load->view('news/viewer_document',$data);\n }", "title": "" }, { "docid": "bca14f8e53272e1d4884d933706b646b", "score": "0.5270527", "text": "public function process()\n\t{\t\n\t\t $lstVars = phpfox::getService('emailsystem.vars')->get();\n $editor= $this->getParam('idEditor');\n if($editor == null)\n {\n $editor = \"template_content\";\n }\n $this->template()->assign(\n array(\n 'lstVars' => $lstVars,\n 'editor' =>$editor,\n )\n );\n\t}", "title": "" }, { "docid": "d20bcc0d8bff1e2b06cc9c1807b78302", "score": "0.5251527", "text": "function show_attachment_title($title=\"\",$data=\"\",$type=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<div id='attach_wrap' class='clearfix'>\n\t<h4>{$title}</h4>\n\t<ul>\n\t\t<foreach loop=\"attach:$data as $file\">\n\t\t\t<li class='<if test=\"attachType:|:$type == 'attach'\">attachment</if>'>\n\t\t\t\t{$file}\n\t\t\t</li>\n\t\t</foreach>\n\t</ul>\n</div>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "baeb7ea7415a02f996ca7535eeda6090", "score": "0.524874", "text": "function preProcess(Vtiger_Request $request, $display=true) {\r\n\t\t//$logFusion =& LoggerManager::getLogger('fusion');\r\n\t\t$db = PearDatabase::getInstance();\n\t\t$recordId = $request->get('record');\r\n\t\t$moduleName = $request->getModule();\r\n\t\tif(!$this->record){\r\n\t\t\t$this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);\r\n\t\t}\r\n\t\t$recordModel = $this->record->getRecord();\r\n // To show recording link only if callstatus is 'completed' \r\n if($recordModel->get('callstatus') == 'completed') {\n\t $query=\"SELECT recordingurlfusion FROM vtiger_pbxmanager WHERE pbxmanagerid=?\";\n\t $result = $db->pquery($query,array($recordId));\r\n \t if ($result) {\r\n $rowData = $db->query_result_rowdata($result, 0, 'recordingurlfusion');\r\n\t\t$recordModel->set('recordingurl',$rowData['recordingurlfusion']); \r\n\t }\n \t} else {\n\t $recordModel->set('recordingurl', '');\n\t}\n return parent::preProcess($request, true);\r\n }", "title": "" }, { "docid": "0c73346904e8986cee25494958139f76", "score": "0.5239653", "text": "function fetch_pagination_data()\n {\n\t\tglobal $TMPL, $FNS;\n\t\t\t\t\n\t\tif (preg_match(\"/\".LD.\"paginate\".RD.\"(.+?)\".LD.SLASH.\"paginate\".RD.\"/s\", $TMPL->tagdata, $match))\n\t\t{\n\t\t\tif ($TMPL->fetch_param('paginate_type') == 'field')\n\t\t\t{\n\t\t\t\tif (preg_match(\"/\".LD.\"multi_field\\=[\\\"'](.+?)[\\\"']\".RD.\"/s\", $TMPL->tagdata, $mmatch))\n\t\t\t\t{\n\t\t\t\t\t$this->multi_fields = $TMPL->fetch_simple_conditions($mmatch['1']);\n\t\t\t\t\t\n\t\t\t\t\t$this->field_pagination = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->paginate\t\t\t= TRUE;\n\t\t\t$this->paginate_data\t= $match['1'];\n\t\t\t\t\t\t\n\t\t\t$TMPL->tagdata = preg_replace(\"/\".LD.\"paginate\".RD.\".+?\".LD.SLASH.\"paginate\".RD.\"/s\", \"\", $TMPL->tagdata);\n\t\t}\n\t}", "title": "" }, { "docid": "86b1d78d6d11cb10a6dccda733cefa66", "score": "0.52162504", "text": "public function add_template_vars()\n\t{\n\t\tif ( !$this->template_engine->assigned( 'pages' ) ) {\n\t\t\t$this->assign( 'pages', Posts::get( 'page_list' ) );\n\t\t}\n\t\t\n\t\t// add a recent comments variable, to remove need for plugin\n\t\tif (!$this->template_engine->assign( 'recent_comments' ) )\n\t\t{\n\t\t\t// this limits the list of recent comments to five items\n\t\t\t$this->assign( 'recent_comments', Comments::get( array('limit' => 5, 'status' => Comment::STATUS_APPROVED, 'type' => Comment::COMMENT, 'orderby' => 'date DESC' ) ) );\n\t\t}\n\t\t\n\t\tparent::add_template_vars();\n\t\t\n\t\t// assign variables to use with options\n\t\t\n\t}", "title": "" }, { "docid": "f2ba546b880521b7bdbfef46ab4bf8e8", "score": "0.5209462", "text": "public function onLoadAttachmentConfig()\n {\n $fileModel = $this->getRelationModel();\n if (($fileId = post('file_id')) && ($file = $fileModel::find($fileId))) {\n $file = $this->decorateFileAttributes($file);\n\n $this->vars['file'] = $file;\n $this->vars['displayMode'] = $this->getDisplayMode();\n $this->vars['cssDimensions'] = $this->getCssDimensions();\n $this->vars['relationManageId'] = post('manage_id');\n $this->vars['relationField'] = post('_relation_field');\n\n return $this->makePartial('config_form');\n }\n\n throw new ApplicationException('Unable to find file, it may no longer exist');\n }", "title": "" }, { "docid": "e5539a10843c03b8c97c68b8ad03cdf1", "score": "0.5197265", "text": "function initData() {\n\t\tif (isset($this->submission)) {\n\t\t\tparent::initData(array(\n\t\t\t\t'seriesId' => $this->submission->getSeriesId(),\n\t\t\t\t'seriesPosition' => $this->submission->getSeriesPosition(),\n\t\t\t\t'workType' => $this->submission->getWorkType(),\n\t\t\t));\n\t\t} else {\n\t\t\tparent::initData();\n\t\t}\n\t}", "title": "" }, { "docid": "281201c72652e61f894ca2350919cd79", "score": "0.5188058", "text": "public function actionDefault() {\n\t\t\n\t\t// create available templates list\n\t\t$templateList = $this->paperboy->getTemplates();\n \t\t\n \t\t$templateSelect = $this->form->select(array(\n \t\t\t'values' => array_keys($templateList),\n \t\t\t'aliases' => array_values($templateList),\n \t\t\t'selected' => $this->newsletterTemplateID,\n \t\t\t'optionsOnly' =>true\n \t\t));\n \t\t$this->parser->setParserVar('templateSelect', $templateSelect);\n \t\t\n \t\t// create recipients list select\n \t\t$recipientLists = $this->paperboy->getRecipientLists();\n\t\t\n\t\t$newsletterSelect = $this->form->select(array(\n\t\t\t'values' => array_keys($recipientLists),\n\t\t\t'aliases' => array_values($recipientLists),\n\t\t\t'selected' => $this->newsletterID,\n\t\t\t'optionsOnly' =>true\n\t\t));\n\t\t$this->parser->setParserVar('newsletterSelect', $newsletterSelect);\n\n\t\t// create \"to\", \"cc\", \"bcc\" recipient selects\n\t\t$newsletterListSelect = $this->form->select(array(\n\t\t\t'values' => array_keys($recipientLists),\n\t\t\t'aliases' => array_values($recipientLists),\n\t\t\t'optionsOnly' =>true\n\t\t));\n\t\t$this->parser->setParserVar('newsletterListSelect', $newsletterListSelect);\n\t\t\n\t\t// create page list\n\t\t$this->parser->setParserVar('pageSelect', $this->makePageList());\n\t\t\n\t\t// create attachments panel content\n\t\t$this->attachmentsNr = count($this->newsletterAttachments);\n\t\t$this->parser->setParserVar('attachmentsNr', $this->attachmentsNr);\n\t\t$tplAttachment = $this->parser->getTemplate($this->templatesPath . 'cmt_paperboy_attach_file.tpl');\n\t\t$tplAttachedFile = $this->parser->getTemplate($this->templatesPath . 'cmt_paperboy_attached_file.tpl');\n\t\t$contentAttachments = '';\n\t\t\n\t\t$maxAttachments = $this->applicationSettings['maxAttachments'];\n\t\t$usedAttachmentsNr = count($this->newsletterAttachments);\n\t\t$unusedAttachmentsNr = $maxAttachments - $usedAttachmentsNr;\n\t\t$attachmentNr = 1;\n\n\t\tfor ($attachmentNr = 1; $attachmentNr <= $maxAttachments; $attachmentNr++) {\n\n\t\t\t$this->parser->setParservar('attachmentNr', $attachmentNr);\n\t\t\t\n\t\t\tif (isset($this->newsletterAttachments[$attachmentNr])) {\n\t\t\t\t$this->parser->setParservar('attachedFileName', $this->newsletterAttachments[$attachmentNr]['name']);\n\t\t\t\t\n\t\t\t\t$fileSizeParams = $this->fileHandler->formatFileSize($this->newsletterAttachments[$attachmentNr]['size']);\n\t\t\t\t$this->parser->setMultipleParserVars($fileSizeParams);\n\t\t\t\t\n\t\t\t\t$contentAttachments .= $this->parser->parse($tplAttachedFile);\n\t\t\t} else {\n\t\t\t\t$this->parser->deleteParservar('attachedFilename');\n\t\t\t\t$contentAttachments .= $this->parser->parse($tplAttachment);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->parser->setParserVar('contentAttachments', $contentAttachments);\n\n\t\t// show page\n\t\t$this->showPage($this->parser->parseTemplate($this->templatesPath . 'cmt_paperboy_editmail.tpl'));\n\t}", "title": "" }, { "docid": "8828582717d5a72cab01f5ad0cc234fd", "score": "0.51877666", "text": "public function initContent()\n\t{\n\t\tparent::initContent();\n if(!$this->display_column_left && !$this->display_column_right && Configuration::get('STSN_PRODUCT_SECONDARY'))\n $this->context->smarty->assign(array( \n \t\t\t'HOOK_PRODUCT_SECONDARY_COLUMN' => Hook::exec('displayProductSecondaryColumn'), \n \t\t));\n $this->context->smarty->assign(array(\n 'show_brand_logo' => Configuration::get('STSN_SHOW_BRAND_LOGO'),\n ));\n\t}", "title": "" }, { "docid": "45ee5c0cef241bec75cbd13499ce126e", "score": "0.5173311", "text": "public function processAttachments()\n {\n }", "title": "" }, { "docid": "9db483985cd2646beb06960a56192f6b", "score": "0.5173128", "text": "function _display($aTemplate) {\r\n\t\tif (sizeof ( $this->_HSTemplate->_vars ) > 0) {\r\n\t\t\textract ( $this->_HSTemplate->_vars );\r\n\t\t}\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] ) > 0) {\r\n\t\t\textract ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] );\r\n\t\t}\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [$aTemplate] ) > 0) {\r\n\t\t\textract ( $this->_vars [$aTemplate] );\r\n\t\t}\r\n\t\t\r\n\t\tinclude_once ($this->_templates [$aTemplate]);\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] ) > 0) foreach ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] as $aKey => $aValue ) {\r\n\t\t\tunset ( $$aKey );\r\n\t\t}\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [$aTemplate] ) > 0) foreach ( $this->_vars [$aTemplate] as $aKey => $aValue ) {\r\n\t\t\tunset ( $$aKey );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "22f36b521446bdfb1755d75fcf16defa", "score": "0.5160693", "text": "function announcement_show($announce=\"\",$author=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n{parse js_module=\"topic\"}\n<h1 class='ipsType_pagetitle'>{$this->lang->words['announce_title']}: {$announce['announce_title']}</h1>\n<br />\n<h2 class='maintitle'>{$this->lang->words['posted_by']} {parse template=\"userHoverCard\" group=\"global\" params=\"$author\"}</h2>\n<div class='post_block first hentry announcement' id='announce_id_{$announce['announce_id']}'>\n\t<div class='post_wrap'>\n\t\t<br />\n\t\t<div class='author_info'>\n\t\t\t{parse template=\"userInfoPane\" group=\"global\" params=\"$author, 'announcement', array( 'id2' => $announce['announce_id'] )\"}\n\t\t</div>\n\t\t<div class='post_body'>\n\t\t\t<div class='post entry-content'>\n\t\t\t\t{$announce['announce_post']}\n\t\t\t</div>\n\t\t\t<ul class='post_controls clear clearfix'>\n\t\t\t\t<if test=\"canmanage:|:$this->memberData['g_is_supmod'] == 1\">\n\t\t\t\t\t<li class='post_edit'><a class='ipsButton_secondary' href='{parse url=\"app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=edit&amp;announce_id={$announce['announce_id']}\" base=\"public\"}' title='{$this->lang->words['post_edit_announce']}' class='edit_post'>{$this->lang->words['post_edit_announce']}</a></li>\n\t\t\t\t</if>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</div>\n<if test=\"disablelightbox:|:!$this->settings['disable_lightbox']\">\n{parse template=\"include_lightbox\" group=\"global\" params=\"\"}\n</if>\n{parse template=\"include_highlighter\" group=\"global\" params=\"1\"}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "dadd11a75783ce7eb1a2470fea2a65e4", "score": "0.51605207", "text": "function alterDisplay(&$rows) {\n //CRM_Core_Error::debug_var('ReportDetail alterDisplay rows', $rows);\n\n static $fileRecords = [];\n\n if (empty($fileRecords)) {\n $sql = \"\n SELECT id, uri\n FROM civicrm_file;\n \";\n $files = CRM_Core_DAO::executeQuery($sql);\n\n while ($files->fetch()) {\n $fileRecords[$files->id] = CRM_Utils_File::cleanFileName($files->uri);\n }\n }\n\n foreach ($rows as $key => &$row) {\n if (strpos($row['field'][0], 'File Attachments') !== FALSE) {\n if (!empty($row['from'])) {\n $row['from'] = $fileRecords[$row['from']];\n }\n if (!empty($row['to'])) {\n $row['to'] = $fileRecords[$row['to']];\n }\n }\n }\n }", "title": "" }, { "docid": "62ca4659d7ce236f85bd7e9087080c06", "score": "0.51561797", "text": "function buggm_list_attachment($ticket_id=false){\n if(!$ticket_id)\n $ticket_id=buggm_get_the_ticket_post_id ();\n $args = array(\n\t'post_type' => 'attachment',\n\t'numberposts' => null,\n\t'post_status' => null,\n\t'post_parent' => $ticket_id\n);\n \n $attachments = get_posts($args);\n if ($attachments) :\n \n echo \"<ul class='ticket-attachment-list'> \";\n \n foreach ($attachments as $post) :\n setup_postdata($post);?>\n \t\n <li id=\"attachment-<?php the_ID(); ?>\">\n <a href=\"<?php echo wp_get_attachment_url($post->ID ); ?>\"><?php echo buggm_get_attached_file_name($post->ID); //get_the_title($post->ID); ?></a>\n <span class='attachment-meta-info'> <?php printf( __( 'by %1$s on %2$s', 'buggm' ), get_the_author(), buggm_time_since(get_the_time()) ); ?></span>\n </li>\n\t\t\t\t\t\t\t\t\t\t\t\n <?php endforeach; ?>\n <?php \n\techo \"</ul>\";\n\t\t\t\t\t\t\t\t\t\n endif;\n wp_reset_query();\n }", "title": "" }, { "docid": "a81d94bb611e48a45ef8715e254a96b2", "score": "0.5147248", "text": "function my_p2p_template_handling( $html, $connected, $ctype, $mode ) {\n\n $template = locate_template( \"p2p-{$mode}-{$ctype->name}.php\" );\n\n if ( !$template )\n return $html;\n\n ob_start();\n\n $_post = $GLOBALS['post'];\n\n echo '<div class=\"related\">';\n echo '<div class=\"icon\"></div>';\n echo '<h3>Additional Insights</h3>';\n\n// Limit Additional Insights to 5 results\n \t$i = 1;\n foreach ( $connected->items as $item ) {\n \tif ($i==6) break;\n $GLOBALS['post'] = $item;\n load_template( $template, false );\n $i++;\n }\n echo '</div>';\n\n $GLOBALS['post'] = $_post;\n\n return ob_get_clean();\n\n}", "title": "" }, { "docid": "95710633f7f4ec68dc8bf98b7c45742f", "score": "0.5138498", "text": "private function moduleContent()\t{\n\t\t$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['toctoc_comments']);\n\t\tif (!is_array($this->extConf)) {\n\t\t\t$this->extConf = $this->be_common->defaultTYPO3EXTCONF();\n\t\t} else {\n\t\t\tif (!$this->extConf['max_records']) {\n\t\t\t\t$this->extConf = $this->be_common->defaultTYPO3EXTCONF();\n\t\t\t}\n\n\t\t}\n\n\t\t$max_records = $this->extConf['max_records'];\n\t\t$this->text_crop = $this->extConf['text_crop'];\n\t\t$this->delusers_firstname = $this->extConf['delusers_firstname'];\n\t\t$this->delusers_lastname = $this->extConf['delusers_lastname'];\n\t\t$this->delusers_email = $this->extConf['delusers_email'];\n\t\tif (trim($this->delusers_firstname) == ''){\n\t\t\t$this->delusers_firstname = 'deleted';\n\t\t}\n\n\t\tif (trim($this->delusers_lastname) == ''){\n\t\t\t$this->delusers_lastname = 'user';\n\t\t}\n\n\t\tif (trim($this->delusers_email) == ''){\n\t\t\t$this->delusers_email = 'deleteduser@site.tld';\n\t\t}\n\n\t\t// MAKE THE MENU SELECTION\n\t\t$selected1 = ' selected';\n\t\t$selected2 = '';\n\t\t$selected3 = '';\n\t\t$selected4 = '';\n\t\tif($_POST['admincommand'] == '2') {\n\t\t\t$selected2 = ' selected';\n\t\t\t$selected1 = '';\n\t\t\t$selected3 = '';\n\t\t\t$selected4 = '';\n\t\t}\n\n\t\tif($_POST['admincommand'] == '3') {\n\t\t\t$selected3 = ' selected';\n\t\t\t$selected1 = '';\n\t\t\t$selected2 = '';\n\t\t\t$selected4 = '';\n\t\t}\n\n\t\tif($_POST['admincommand'] == '4') {\n\t\t\t$selected4 = ' selected';\n\t\t\t$selected1 = '';\n\t\t\t$selected3 = '';\n\t\t\t$selected2 = '';\n\t\t}\n\n\t\t$content .= '';\n\t\t$settingfunction = 1;\n\t\tif ($_POST['admincommand']=='delete') {\n\t\t\tif (intval($_POST['uid']) > 0) {\n\t\t\t\t$upd = $GLOBALS['TYPO3_DB']->sql_query('DELETE FROM tx_toctoc_comments_comments WHERE uid='.$_POST['uid']);\n\t\t\t\tunset($_SESSION['backendcontentcommentlist']);\n\t\t\t\treturn '';\n\t\t\t} else {\n\t\t\t\treturn '000';\n\t\t\t}\n\n\t\t}\n\n\t\tif ($_POST['admincommand']=='hide') {\n\t\t\tif (intval($_POST['uid']) > 0) {\n\t\t\t\t$upd = $GLOBALS['TYPO3_DB']->sql_query('UPDATE tx_toctoc_comments_comments SET hidden=1 WHERE uid='.$_POST['uid']);\n\t\t\t\tunset($_SESSION['backendcontentcommentlist']);\n\t\t\t\treturn '';\n\t\t\t} else {\n\t\t\t\treturn '000';\n\t\t\t}\n\n\t\t}\n\n\t\tif ($_POST['admincommand']=='unhide') {\n\t\t\tif (intval($_POST['uid']) > 0) {\n\t\t\t\t$upd = $GLOBALS['TYPO3_DB']->sql_query('UPDATE tx_toctoc_comments_comments SET hidden=0 WHERE uid='.$_POST['uid']);\n\t\t\t\tunset($_SESSION['backendcontentcommentlist']);\n\t\t\t\treturn '';\n\t\t\t} else {\n\t\t\t\treturn '000';\n\t\t\t}\n\n\t\t}\n\n\t\tif ($_POST['admincommand']=='approve') {\n\t\t\tif (intval($_POST['uid']) > 0) {\n\t\t\t\t$upd = $GLOBALS['TYPO3_DB']->sql_query('UPDATE tx_toctoc_comments_comments SET approved=1 WHERE uid='.$_POST['uid']);\n\t\t\t\tunset($_SESSION['backendcontentcommentlist']);\n\t\t\t\treturn '';\n\t\t\t} else {\n\t\t\t\treturn '000';\n\t\t\t}\n\t\t}\n\n\t\tif ($_POST['admincommand'] == 'disapprove') {\n\t\t\tif (intval($_POST['uid']) > 0) {\n\t\t\t\t$upd = $GLOBALS['TYPO3_DB']->sql_query('UPDATE tx_toctoc_comments_comments SET approved=0 WHERE uid='.$_POST['uid']);\n\t\t\t\tunset($_SESSION['backendcontentcommentlist']);\n\t\t\t\treturn '';\n\t\t\t} else {\n\t\t\t\treturn '000';\n\t\t\t}\n\n\t\t}\n\n\t\t$settingfunction = 0;\n\n\t\tif(($_POST['actadmincommand']) || ($_POST['actadmincommand1']) || ($_POST['actadmincommand2']) ||\n\t\t\t\t($_POST['actadmincommand3']) || ($_POST['actadmincommand4']) || ($_POST['actadmincommand5'])) {\n\t\t\tif(intval($_POST['admincommand']) == 1) {\n\t\t\t\t$settingfunction = 1;\n\t\t\t} elseif(intval($_POST['admincommand']) == 2) {\n\t\t\t\t$settingfunction = 2;\n\t\t\t} elseif(intval($_POST['admincommand']) == 3) {\n\t\t\t\t$settingfunction = 3;\n\t\t\t} elseif(intval($_POST['admincommand']) == 4) {\n\t\t\t\t$settingfunction = 4;\n\t\t\t} elseif(intval($_POST['admincommand']) == 5) {\n\t\t\t\t$settingfunction = 5;\n\t\t\t}\n\n\t\t}\n\n\t\tif (isset($_POST['admincommand']) == FALSE) {\n\t\t\t// return path under TYPO37.6 or newer\n\t\t\tif ((version_compare(TYPO3_version, '7.5', '>'))) {\n\t\t\t\t$settingfunction = 6;\n\t\t\t}\n\n\t\t}\n\n\t\tswitch((string)$settingfunction) {\n\t\tcase 0:\n\t\t\tif ((!$_SESSION['backendcontentoverviewlist']) || ($_POST['refresh'] == '1')) {\n\t\t\t\tif ($_POST['refresh'] == '1') {\n\t\t\t\t\tunset($_SESSION['backendcontentoverviewlist']);\n\t\t\t\t}\n\n\t\t\t\trequire_once (t3lib_extMgm::extPath('toctoc_comments', 'Classes/Controller/Dto/BackendOverview.php'));\n\n\t\t\t\t$this->be_overview = new toctoc_comments_be_overview;\n\t\t\t\t$contentoverview=$this->be_overview->getoverview($this);\n\t\t\t\t$this->content=$contentoverview;\n\t\t\t} else {\n\t\t\t\t$this->content= str_replace('tx-tc-sessioncolornone', 'tx-tc-sessioncolor', $_SESSION['backendcontentoverviewlist']);\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif ((!$_SESSION['backendcontentcommentlist']) || ($_POST['refresh'] == '1')) {\n\t\t\t\tif ($_POST['refresh'] == '1') {\n\t\t\t\t\tunset($_SESSION['backendcontentcommentlist']);\n\t\t\t\t}\n\n\t\t\t\trequire_once (t3lib_extMgm::extPath('toctoc_comments', 'Classes/Controller/Dto/BackendComments.php'));\n\t\t\t\t$this->be_comments = new toctoc_comments_be_comments;\n\t\t\t\t$this->be_comments->beComments($this, $_SESSION['backendpid']);\n\t\t\t\t$_SESSION['backendcontentlastlist']='comments';\n\t\t\t} else {\n\t\t\t\t$this->content= str_replace('tx-tc-sessioncolornone', 'tx-tc-sessioncolor', $_SESSION['backendcontentcommentlist']);\n\t\t\t\t$_SESSION['backendcontentlastlist']='comments';\n\t\t\t}\n\n\t\t\tbreak;\n\n\t case 2:\n\t\t//* User administration\n\t \tif ((!$_SESSION['backendcontentuserslist']) || ($_POST['refresh'] == '1')) {\n\t \t\tif ($_POST['refresh'] == '1') {\n\t \t\t\tunset($_SESSION['backendcontentuserslist']);\n\t \t\t}\n\n\t\t\t\trequire_once (t3lib_extMgm::extPath('toctoc_comments', 'Classes/Controller/Dto/BackendUsers.php'));\n\t \t\t$this->be_users = new toctoc_comments_be_users;\n\t \t\t$this->be_users->beUsers($this, $_SESSION['backendpid']);\n\n\t \t\t$_SESSION['backendcontentlastlist'] = 'users';\n\t \t} else {\n\t \t\t$this->content= str_replace('tx-tc-sessioncolornone', 'tx-tc-sessioncolor', $_SESSION['backendcontentuserslist']);\n\t \t\t$_SESSION['backendcontentlastlist'] = 'users';\n\t \t}\n\n\t\t break;\n\n\t\tcase 3:\n\t\t\trequire_once (t3lib_extMgm::extPath('toctoc_comments', 'Classes/Controller/Dto/BackendIPs.php'));\n\t\t\t$this->be_ips = new toctoc_comments_be_ips;\n\t\t\t$this->content = $this->be_ips->beIPs($this, $_SESSION['backendpid']);\n\t\t\tbreak;\n\t case 4:\n\t \tif ($_POST['bulkactreport']) {\n\t\t \t$sessidx = intval($_POST['bulkactreport']);\n\t\t \t$_SESSION['reportlistidx'] = $sessidx;\n\t \t}\n\n\t \t$sessidx = intval($_SESSION['reportlistidx']);\n\n\t \tif ((!$_SESSION['backendcontentreportlist'][$sessidx]) || ($_POST['refresh'] == '1')) {\n\t\t\t\trequire_once (t3lib_extMgm::extPath('toctoc_comments', 'Classes/Controller/Dto/BackendReports.php'));\n\t\t\t\t$this->be_reports = new toctoc_comments_be_reports;\n\t\t\t\t$this->be_reports->beReports($this, $_SESSION['backendpid'], $sessidx);\n\t \t\tif ($_POST['refresh'] == '1') {\n\t \t\t\tunset($_SESSION['backendcontentreportlist'][$sessidx]);\n\t \t\t}\n\n\t \t\t$_SESSION['backendcontentlastlist']='reports' . $sessidx;\n\t \t} else {\n\t \t\t$this->content= str_replace('tx-tc-sessioncolornone', 'tx-tc-sessioncolor', $_SESSION['backendcontentreportlist'][$sessidx]);\n\t \t\t$_SESSION['backendcontentlastlist']='reports' . $sessidx;\n\t \t}\n\n\t \tbreak;\n\t case 5:\n\t \trequire_once (t3lib_extMgm::extPath('toctoc_comments', 'Classes/Controller/Dto/BackendSystem.php'));\n\t \t$this->be_db = new toctoc_comments_be_db;\n\t \t$this->content = $this->be_db->bedb($this);\n\t \tunset($_SESSION['backendcontentoverviewlist']);\n\t \tbreak;\n\t case 6:\n\t \tunset($_SESSION['backendcontentcommentlist']);\n\t \t$cachedEntities = '1,41,6';\n\t \t$GLOBALS['TYPO3_DB']->sql_query('DELETE FROM tx_toctoc_comments_cachereport WHERE ReportPluginMode IN (' . $cachedEntities . ')');\n\t \tif (isset($_SESSION['toctoccomments_cacheid'])) {\n\t \t\t$cacheidarr=explode('external_ref', $_SESSION['toctoccomments_cacheid']);\n\t \t\tif (count($cacheidarr) == 2) {\n\t\t \t\t$external_ref = $cacheidarr[1];\n\t\t \t\t$external_ref_uid = $cacheidarr[0];\n\t\t \t\tif (str_replace('pages_', '', $external_ref) != $external_ref) {\n\t\t \t\t\t$external_ref_uid = $external_ref;\n\t\t \t\t}\n\n\t\t \t\t$GLOBALS['TYPO3_DB']->sql_query('DELETE FROM tx_toctoc_comments_cachereport WHERE ReportPluginMode = 0 AND external_ref_uid=\"'.$external_ref_uid.'\"');\n\t \t\t\t$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_toctoc_comments_plugincachecontrol', 'external_ref_uid=\"'.\n\t\t\t\t\t\t\t\t\t$external_ref_uid.'\"', '', '');\n\t\t\t\t\t$num_rows2 = $GLOBALS['TYPO3_DB']->sql_num_rows($res2);\n\t\t\t\t\tif ($num_rows2>0) {\n\t\t\t\t\t\t$GLOBALS['TYPO3_DB']->sql_query('UPDATE tx_toctoc_comments_plugincachecontrol SET ' .\n\t\t\t\t\t\t\t\t'tstamp=' . time() .\n\t\t\t\t\t\t\t\t' WHERE external_ref_uid =\"' . $external_ref_uid . '\"');\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_toctoc_comments_plugincachecontrol',\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'tstamp' => time(),\n\t\t\t\t\t\t\t\t\t\t'external_ref_uid' => $external_ref_uid,\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t \t\t}\n\n\t \t\tunset($_SESSION['toctoccomments_cacheid']);\n\n\t \t}\n\t\t\trequire_once (\\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath('toctoc_comments', 'Classes/Backend/BackendAdministration.php'));\n\t\t\tif (!(version_compare(TYPO3_version, '7.6.8', '<'))) {\n\t\t\t\texit;\n\t\t\t}\n\n\t \tbreak;\n\t\t}\n\n\t}", "title": "" }, { "docid": "09e2450b5b1ac18be66770c9b6443655", "score": "0.5134542", "text": "function hagthemepubliccopy_preprocess_islandora_basic_collection_wrapper(&$variables) {\n $obj = $variables['islandora_object'];\n if (module_exists('islandora_collection_search')) {\n $block = module_invoke('islandora_collection_search', 'block_view', 'islandora_collection_search');\n $variables['islandora_collection_search_block'] = render($block['content']);\n }\n if ($variables['islandora_object']['MEDIUM']){\n $pid = $variables['islandora_object']->id;\n $source = \"<div><img src='/islandora/object/$pid/datastream/MEDIUM/view'/></div>\";\n $form['collection_image'] = array(\n '#type' => 'item',\n '#markup' => \"$source\",\n );\n $variables['collection_image'] = drupal_render($form);\n }\n $models = $obj->{'models'};\n if (in_array(\"islandora:collectionCModel\", $models)) {\n $block = module_invoke('dgi_ondemand', 'block_view', 'dgi_ondemand_latest_obj');\n $data = render($block['content']);\n if (!empty($data)) {\n $variables['islandora_latest_objects'] = $data;\n }\n }\n}", "title": "" }, { "docid": "82a55d953f90955ce9bec61a8c5ef16d", "score": "0.51272774", "text": "function engagement()\n {\n $data['photo'] = $this->admin_model->get_where_data(array('catergories' => 'engagement'),'item_image','datetime_update');\n $this->load->view('template/header_template');\n $this->load->view('template/body_template', $data);\n $this->load->view('template/footer_template');\n }", "title": "" }, { "docid": "12565c7bee72796f4fee66a20aa40a8a", "score": "0.51243234", "text": "protected function assignVariables() {\n\t\tWCF::getTPL()->assign(array(\n\t\t\t'commentCanAdd' => $this->commentManager->canAdd(),\n\t\t\t'commentsPerPage' => $this->commentManager->commentsPerPage(),\n\t\t\t'commentList' => $this->commentList,\n\t\t\t'commentObjectTypeID' => $this->objectTypeID\n\t\t));\n\t}", "title": "" }, { "docid": "34798f431c0972cc35f182dfa19df354", "score": "0.51150113", "text": "function presentation()\n {\n $data['photo'] = $this->admin_model->get_where_data(array('catergories' => 'wedding_presentation'),'item_image','datetime_update');\n $this->load->view('template/header_template');\n $this->load->view('template/video_template', $data);\n $this->load->view('template/footer_template');\n }", "title": "" }, { "docid": "1444c6ebaf6b6cbfc229d67a6eaf7d43", "score": "0.51146054", "text": "function tp_page_content() {\r\n\t/**\r\n\t * include file list of demo data\r\n\t */\r\n\t$demo_data_file_path = TP_THEME_THIM_DIR . 'inc' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'demo-data.php';\r\n\t$demo_data_dir_path = TP_THEME_THIM_DIR . 'inc' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'data';\r\n\tif ( is_file( $demo_data_file_path ) ) {\r\n\t\trequire $demo_data_file_path;\r\n\t} else {\r\n\t\t// create demo data\r\n\t\t$demo_datas = array();\r\n\t}\r\n\t$demo_data_file = TP_THEME_THIM_DIR . 'inc' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'demo-data.php';\r\n\tif ( is_file( $demo_data_file ) ) {\r\n\t\trequire TP_THEME_THIM_DIR . 'inc' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'demo-data.php';\r\n\t}\r\n\r\n\twp_enqueue_style( 'tp-import', TP_FRAMEWORK_LIBS_URI . 'import/css/backend.css', array(), TP_FRAMEWORK_VERSION );\r\n\twp_enqueue_script( 'wp-pointer' );\r\n\twp_enqueue_script( 'tp-import', TP_FRAMEWORK_LIBS_URI . 'import/js/tp-import.js', array(\r\n\t\t'jquery',\r\n\t\t'wp-pointer'\r\n\t), TP_FRAMEWORK_VERSION, true );\r\n\twp_enqueue_style( 'wp-pointer' );\r\n\r\n\t$translation_string = array(\r\n\t\t'welcome' => esc_html__( 'Welcome to Demo Importer!', 'tp' ),\r\n\t\t'content' => esc_html__( 'In order to Import a demo, please follow the instruction from messages on the top of this screen and reload it then.', 'tp' ),\r\n\t);\r\n\r\n\twp_localize_script( 'tp-import', 'tp_pointer', $translation_string );\r\n\r\n\t$memory_limit = ini_get( 'memory_limit' );\r\n\t$max_execution_time = ini_get( 'max_execution_time' );\r\n\r\n\t$all_ini_config = ini_get_all();\r\n\t?>\r\n\t<script>\r\n\t\tconsole.info(<?php echo json_encode( $all_ini_config ); ?>);\r\n\t</script>\r\n\t<?php\r\n\t$arr_memory_limit = $all_ini_config['memory_limit'];\r\n\t$arr_max_execution_time = $all_ini_config['max_execution_time'];\r\n\r\n\tif ( array_key_exists( 'local_value', $arr_memory_limit ) ) {\r\n\t\t$memory_limit = $arr_memory_limit['local_value'];\r\n\t}\r\n\r\n\tif ( array_key_exists( 'local_value', $arr_max_execution_time ) ) {\r\n\t\t$max_execution_time = $arr_max_execution_time['local_value'];\r\n\t}\r\n\r\n\t$is_ok = true;\r\n\tif ( intval( $memory_limit ) < TP_RECOMMEND_MEMORY_LIMIT || intval( $max_execution_time ) < TP_RECOMMEND_EXECUTION_TIME ) {\r\n\t\t$is_ok = false;\r\n\t}\r\n\r\n\t?>\r\n\r\n\t<?php add_thickbox(); ?>\r\n\t<div class=\"wrap\">\r\n\t\t<h1><?php esc_html_e( 'ThimPress Demo Importer', 'tp' ); ?></h1>\r\n\r\n\t\t<?php $count_dismiss_warring_overwritten = intval( get_option( 'tp_importer_warring_overwritten', 0 ) );\r\n\t\tif ( $count_dismiss_warring_overwritten < 2 ) {\r\n\t\t\t?>\r\n\t\t\t<div class=\"update-nag tp_notification\">\r\n\t\t\t\t<p>\r\n\t\t\t\t\t<?php _e( '<strong>Warning:</strong> If you have already used this feature before and you want to try it again, your content may be duplicated. Please consider resetting your database back to defaults with <a href=\"https://wordpress.org/plugins/wordpress-reset/\">this plugin</a>.', 'tp' ); ?>\r\n\t\t\t\t</p>\r\n\t\t\t</div>\r\n\t\t\t<?php\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * PHP version\r\n\t\t */\r\n\t\tif ( version_compare( phpversion(), TP_RECOMMEND_PHP_VERSION ) < 0 ) { ?>\r\n\t\t\t<div class=\"update-nag tp_notification\">\r\n\t\t\t\t<p>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\tprintf(\r\n\t\t\t\t\t\t__( '<strong>Warning:</strong> We found out your system is using PHP version %1$s and it can cause the importer. Please consider upgrading to version 5.4 or higher.', 'tp' ),\r\n\t\t\t\t\t\tphpversion(),\r\n\t\t\t\t\t\tTP_RECOMMEND_PHP_VERSION\r\n\t\t\t\t\t);\r\n\t\t\t\t\t?>\r\n\t\t\t\t</p>\r\n\t\t\t</div>\r\n\t\t\t<?php\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Memory limit and Maximum execution time\r\n\t\t */\r\n\t\tif ( ! $is_ok ) : ?>\r\n\t\t\t<?php if ( intval( $memory_limit ) < TP_RECOMMEND_MEMORY_LIMIT ) { ?>\r\n\t\t\t\t<div class=\"error tp_notification\">\r\n\t\t\t\t\t<div class=\"memory_limit\">\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tprintf(\r\n\t\t\t\t\t\t\t\t__( '<strong>Important:</strong> The Importer requires memory limit of your system >= %1$sMB. Please follow <a href=\"%2$s\" target=\"_blank\">these guidelines</a> to improve it.', 'tp' ),\r\n\t\t\t\t\t\t\t\tTP_RECOMMEND_MEMORY_LIMIT,\r\n\t\t\t\t\t\t\t\t'//thimpress.com/?p=52957'\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<?php\r\n\t\t\t} ?>\r\n\t\t<?php endif; ?>\r\n\r\n\t\t<div class=\"thim-demo-browser theme-browser rendered\">\r\n\t\t\t<div class=\"themes\">\r\n\t\t\t\t<?php\r\n\t\t\t\t$attr_button_import = '';\r\n\t\t\t\tif ( ! $is_ok ) {\r\n\t\t\t\t\t$attr_button_import = 'data-disabled=\"true\" data-title=\"' . esc_html__( 'You need to upgrade your system follow to the above messages.', 'tp' ) . '\"';\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t<?php\r\n\t\t\t\t$index = 0;\r\n\t\t\t\tforeach ( $demo_datas as $key => $item ) {\r\n\t\t\t\t\t$demo_url = '';\r\n\t\t\t\t\tif ( key_exists( 'demo_url', $item ) ) {\r\n\t\t\t\t\t\t$demo_url = $item['demo_url'];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<div class=\"theme\" aria-describedby=\"<?php echo esc_attr( $key ); ?>\">\r\n\t\t\t\t\t\t<div class=\"theme-screenshot\">\r\n\t\t\t\t\t\t\t<img src=\"<?php echo esc_url( $item['thumbnail_url'] ); ?>\" alt=\"\">\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t<h2 class=\"theme-name\" id=\"<?php echo esc_attr( $key ); ?>\"><?php echo esc_html( $item['title'] ); ?></h2>\r\n\t\t\t\t\t\t<div class=\"theme-actions\">\r\n\t\t\t\t\t\t\t<button class=\"button button-primary tp-btn-import\" data-pointer=\"<?php echo esc_attr( 'wp-pointer-' . $index ); ?>\" data-site=\"<?php echo esc_attr( $key ); ?>\" <?php echo $attr_button_import; ?>><?php esc_html_e( 'Import', 'tp' ); ?></button>\r\n\r\n\t\t\t\t\t\t\t<?php if ( $demo_url != '' ) { ?>\r\n\t\t\t\t\t\t\t\t<a class=\"button button-secondary\" href=\"<?php echo esc_url( $demo_url ); ?>\" target=\"_blank\"><?php esc_html_e( 'Demo', 'tp' ); ?></a>\r\n\t\t\t\t\t\t\t<?php } else { ?>\r\n\t\t\t\t\t\t\t\t<a class=\"button button-secondary\" href=\"#\" disabled=\"disabled\"><?php esc_html_e( 'Demo', 'tp' ); ?></a>\r\n\t\t\t\t\t\t\t<?php } ?>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t$index ++;\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</div>\r\n\t\t\t<br class=\"clear\"></div>\r\n\t</div>\r\n\r\n\t<section class=\"tp-popup\">\r\n\t\t<div class=\"container\">\r\n\t\t\t<div class=\"wrapper-content\">\r\n\t\t\t\t<button type=\"button\" class=\"notice-dismiss tp-close-import-popup\">\r\n\t\t\t\t\t<span class=\"screen-reader-text\"><?php esc_html_e( 'Dismiss this notice.', 'tp' ); ?></span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<h1><?php esc_html_e( 'Importing', 'tp' ); ?></h1>\r\n\r\n\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t<div class=\"tp_progress_import\">\r\n\t\t\t\t\t\t<p class=\"note\"><?php esc_html_e( 'The import process can take about 10 minutes. Enjoy a cup of coffee while you wait for importing :)', 'tp' ); ?></p>\r\n\t\t\t\t\t\t<div class=\"meter\">\r\n\t\t\t\t\t\t\t<span style=\"width:0\"></span>\r\n\t\t\t\t\t\t\t<p></p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"tp_progress_error_message\">\r\n\t\t\t\t\t\t<div class=\"tp-error\">\r\n\t\t\t\t\t\t\t<h4><?php esc_html_e( 'Failed to import!', 'tp' ); ?></h4>\r\n\t\t\t\t\t\t\t<div class=\"content text_note tp_notification\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"log update-nag tp_notification\">\r\n\t\t\t\t\t\t\t<h4><?php esc_html_e( 'Log', 'tp' ); ?></h4>\r\n\t\t\t\t\t\t\t<div class=\"content text_note\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<a class=\"button button-primary tp-support\" href=\"//thimpress.com/forums/\" target=\"_blank\"><?php esc_html_e( 'Get support', 'tp' ); ?></a>\r\n\t\t\t\t\t\t<a class=\"button button-secondary tp-visit-dashboard\" href=\"<?php echo esc_url( get_admin_url() ); ?>\"><?php esc_html_e( 'Dashboard', 'tp' ); ?></a>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"tp-complete\">\r\n\t\t\t\t\t\t<h3 class=\"\"><?php esc_html_e( 'Importing is successful!', 'tp' ); ?></h3>\r\n\t\t\t\t\t\t<div class=\"content-message\"></div>\r\n\t\t\t\t\t\t<a class=\"button button-primary tp-visit-site\" href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" target=\"_blank\"><?php esc_html_e( 'Visit site', 'tp' ); ?></a>\r\n\t\t\t\t\t\t<a class=\"button button-secondary tp-visit-dashboard\" href=\"<?php echo esc_url( get_admin_url() ); ?>\"><?php esc_html_e( 'Dashboard', 'tp' ); ?></a>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<br class=\"clear\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</section>\r\n\t<?php\r\n}", "title": "" }, { "docid": "53a2080acf824af892c69c17f783e36b", "score": "0.5110495", "text": "function get_all_opportunity_attachments($id)\n{\n $CI = &get_instance();\n\n $attachments = [];\n $attachments['invoice'] = [];\n $attachments['estimate'] = [];\n $attachments['credit_note'] = [];\n $attachments['proposal'] = [];\n $attachments['contract'] = [];\n $attachments['lead'] = [];\n $attachments['task'] = [];\n $attachments['customer'] = [];\n $attachments['opportunity'] = [];\n $attachments['ticket'] = [];\n $attachments['expense'] = [];\n\n\n\n $CI->db->where('rel_id', $id);\n $CI->db->where('rel_type', 'opportunity');\n $opportunity_main_attachments = $CI->db->get(db_prefix() . 'files')->result_array();\n\n $attachments['opportunity'] = $opportunity_main_attachments;\n\n return hooks()->apply_filters('all_opportunity_attachments', $attachments, $id);\n}", "title": "" }, { "docid": "c184c0a0fa85604fcaf8b0ffd6336a3a", "score": "0.50993776", "text": "protected function prepareForRender()\n\t{\n\t\tif(!$this->getValue('publicationDate'))\n\t\t\t$this->setValue('publicationDate', date(\"Y-m-d\"));\n\n\n\t\t//If a static resource path is set (for css/images) then we want to make sure we provided a uniform path to prepend\n\t\tif($this->getValue('staticResourcePath'))\n\t\t\t$this->setValue('staticResourcePath', $this->addTrailingSlash($this->getValue('staticResourcePath')));\n\t\telse\n\t\t\t$this->setValue('staticResourcePath', '');\n\n\t\t$this->buildManifest();\n\t\t$this->buildSpine();\n\n if($this->getValue('isbn'))\n {\n $this->setValue('isbn', '<dc:identifier id=\"'.$this->getValue('uniqueId').'\" opf:scheme=\"ISBN\">'.$this->getValue('isbn').'</dc:identifier>');\n }\n else\n {\n $this->setValue('isbn', '');\n }\n\n\t\t$this->setValue('ncxId', $this->getValue('uniqueId') . '_TOC');\n\n\t}", "title": "" }, { "docid": "f31d3fed3340f9534df047c7e2518588", "score": "0.50971377", "text": "protected function initPage()\n {\n // $imgField = $this->wire('fields')->get(\"type=FieldtypeImage, maxFiles!=1\");\n // if ($imgField) $fieldgroup->add($imgField);\n // $fieldgroup->add($this->wire('fields')->get('title'));\n $template = new Template;\n $template->name = 'imagereferencevirtualtemplate';\n // $template->setFieldgroup($fieldgroup);\n $this->set('template', $template);\n // $this->set('title', \"Images in folder {$this->url()}\");\n $this->set('name', 'imagereferencevirtualpage');\n $this->set('id', 0);\n // $this->populateImages($imgField->name);\n // $this->virtualImages = $this->get($imgField->name);\n }", "title": "" }, { "docid": "4d1aa4e00dccfaa946eec000c360652b", "score": "0.5090734", "text": "public function template_manager()\n { \n $data['body'] = 'comment_automation/template_manager';\n $data['page_title'] = $this->lang->line('Auto Reply Template Manager');\n $data['emotion_list'] = $this->get_emotion_list();\n\n $join = array('facebook_rx_fb_user_info'=>'facebook_rx_fb_page_info.facebook_rx_fb_user_info_id=facebook_rx_fb_user_info.id,left');\n $page_info = $this->basic->get_data('facebook_rx_fb_page_info',array('where'=>array('facebook_rx_fb_page_info.user_id'=>$this->user_id,'bot_enabled'=>'1','facebook_rx_fb_page_info.facebook_rx_fb_user_info_id'=> $this->session->userdata('facebook_rx_fb_user_info'))),array('facebook_rx_fb_page_info.id','facebook_rx_fb_page_info.page_name','facebook_rx_fb_user_info.name','facebook_rx_fb_user_info.id as fb_user_id'),$join);\n\n $page_list=array();\n $i=0;\n foreach($page_info as $key => $value) \n {\n $page_list[$value[\"fb_user_id\"]][\"fb_user_name\"]=$value['name'];\n $page_list[$value[\"fb_user_id\"]][\"data\"][$i][\"page_name\"]=$value['page_name'];\n $page_list[$value[\"fb_user_id\"]][\"data\"][$i][\"table_id\"]=$value['id'];\n $i++;\n }\n $data['page_list'] = $page_list;\n $this->_viewcontroller($data);\n }", "title": "" }, { "docid": "44ddc9d685ca2e6694b737cc07dc209e", "score": "0.5083198", "text": "function drawPageContent() {\t\t\n\n//\t\tif ( count( $this->ErrorMessages) > 0 ) {\n//\t\t\n//\t\t\t$this->AddToDisplayList('<p align=\"Left\" class=\"error\">'.$this->ErrorWarning.'</p>');\n//\t\t\n//\t\t}\n\n\t\t$MultiLingualLists = new MultiLingual_Lists( 'AI', 'Interviews', $this->ViewerLanguageID);\n\t\t\n\t\t$this->AddToDisplayList('<p class=\"text\">'.$this->Labels->Label('[Desc]').'</p>');\n\t\t\n\t\t$this->AddToDisplayList('<input name=\"Process\" type=\"hidden\" id=\"Process\" value=\"true\">');\n\n\t\t$BGColor = ' bgcolor=\"#EEEEEE\" ';\n\n\t\t$NumCols = 2;\t\t\t\t\t// There are 2 standard columns for this view\n\t\t\n\t\t$OutputTable = new Table ( $NumCols, ' border=\"0\" cellpadding=\"3\" cellspacing=\"3\" width=\"100%\" ');\n\t\t\n\t\t// Date Entry\n\t\t$OutputTable->AddTableCell( $this->Labels->Label('[Date]'), $BGColor.' class=\"text\" ' );\n\t\t\n\t\t$this->AddToDisplayList( $OutputTable, DISPLAYOBJECT_TYPE_OBJECT);\n\n\t\t$RestOfHTML = '<hr width=\"100%\" size=\"1\" noshade color=\"#223450\"><span align=\"left\"><a href=\"'.$this->CallbackDisplay.'\"><span class=\"modify\">'.$this->Labels->Label('[ReturnInterviews]').'</span></a></span><span align=\"center\"><p class=\"text\"> <input type=\"submit\" value=\"'.$this->Labels->Label('[Add]').'\" /></p></span>';\n\t\t$this->AddToDisplayList( $RestOfHTML );\n\t\t\n\t\t\t\t \n\t}", "title": "" }, { "docid": "aa36d60e3d64f881c798e0995590dbb8", "score": "0.5078707", "text": "public function process()\n\t{\n\t\t$iUserId = Phpfox::getUserId();\n\t\t$oService = $this->getParam(\"oService\");\n\t\t$iCount = $this->getParam(\"iCount\");\n\t\t$aPhotos = $this->getParam(\"aPhotos\");\n\t\tif ($iCount && $aPhotos)\n\t\t{\n\t\t\t$aTracking = $oService->getTracking($iUserId, 'photo');\t\n\t\t\tforeach ($aPhotos as $i => $aPhoto)\n\t\t\t{\n\t\t\t\t$aPhotos[$i]['is_imported'] = $oService->isImported($aTracking, $aPhoto['photo_id']);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\n\t\t}\n\t\t$this->template()->assign(array(\n\t\t\t'aPhotos' => $aPhotos,\n\t\t\t'iCount' => $iCount\t\t\t\n\t\t));\n\t}", "title": "" }, { "docid": "ee22edfa0918487ddb3d44b0016cc990", "score": "0.50782704", "text": "function post($post, $displayData, $topic, $forum=array()) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<!--post:{$post['post']['pid']}-->\n<if test=\"sDeleted:|:$post['post']['_isDeleted'] AND $post['post']['_softDeleteSee']\">\n\t{parse template=\"softDeletedPostBit\" group=\"topic\" params=\"$post, $displayData['sdData'], $topic\"}\n</if>\n<if test=\"sDeletedNot:|:! $post['post']['_isDeleted']\">\n\t<div class='post_block hentry clear clearfix <if test=\"postQueued:|:$post['post']['_isHidden']\">moderated</if>' id='post_id_{$post['post']['pid']}'>\n\t\t<a id='entry{$post['post']['pid']}'></a>\n\t\t<if test=\"repIgnored:|:!empty( $post['post']['_repignored'] ) AND $post['post']['_repignored'] == 1 && $post['post']['_ignored'] != 1\">\n\t\t\t<div class='post_ignore'>\n\t\t\t\t<if test=\"noRep:|:$post['post']['rep_points'] == 0\">\n\t\t\t\t\t<span class='reputation zero' title='{$this->lang->words['top_rep']}'>\n\t\t\t\t</if>\n\t\t\t\t<if test=\"posRep:|:$post['post']['rep_points'] > 0\">\n\t\t\t\t\t<span class='reputation positive' title='{$this->lang->words['top_rep']}'>\n\t\t\t\t</if>\n\t\t\t\t<if test=\"negRep:|:$post['post']['rep_points'] < 0\">\n\t\t\t\t\t<span class='reputation negative' title='{$this->lang->words['top_rep']}' >\n\t\t\t\t</if>\n\t\t\t\t\t\t{$post['post']['rep_points']}</span> {$this->lang->words['top_this_post_by']} {parse template=\"userHoverCard\" group=\"global\" params=\"$post['author']\"} {$this->lang->words['top_below_thresh']}. <a href='#' title='{$this->lang->words['ignore_view_post']}' id='unhide_post_{$post['post']['pid']}'>{$this->lang->words['rep_view_anyway']}</a>\n\t\t\t</div>\n\t\t</if>\n\t\n\t\t<if test=\"userIgnored:|:$post['post']['_repignored'] == 1 || $post['post']['_ignored']\">\n\t\t\t<div class='post_ignore'>\n\t\t\t\t<if test=\"userIgnoredLang:|:$post['post']['_repignored'] == 1\">{$this->lang->words['post_ignored_rep']}<else />{$this->lang->words['post_ignored']}</if> {parse template=\"userHoverCard\" group=\"global\" params=\"$post['author']\"}. <a href='#entry{$post['post']['pid']}' title='{$this->lang->words['ignore_view_post']}' style='display: none' id='unhide_post_{$post['post']['pid']}'>{$this->lang->words['rep_view_anyway']}</a>\n\t\t\t\t<if test=\"userIgnoredLangTwo:|:$this->settings['reputation_enabled'] AND $post['post']['_repignored'] == 1\"><div><a href=\"{parse url=\"showtopic={$post['post']['topic_id']}&amp;st={$this->request['st']}&amp;rep_filter_set=*&amp;rep_filter=update&amp;secure_key={$this->member->form_hash}\" template=\"showtopic\" seotitle=\"{$topic['title_seo']}\" base=\"public\"}\">{$this->lang->words['post_ignore_reset_rep']}</a></div></if>\n\t\t\t</div>\n\t\t</if>\n\t\t<div class='post_wrap' <if test=\"isNotIgnoring:|:$post['post']['_ignored'] == 1 || $post['post']['_repignored'] == 1\">style='display: none'</if>>\n\t\t\t<if test=\"postMid:|:$post['author']['member_id']\">\n\t\t\t\t<h3 class='row2'>\n\t\t\t<else />\n\t\t\t\t<h3 class='guest row2'>\n\t\t\t</if>\n\t\t\t\t<if test=\"postModCheckbox:|:$this->memberData['is_mod'] && ! $topic['_isArchived']\">\n\t\t\t\t\t<span class='right'>\n\t\t\t\t\t\t<label for='checkbox_{$post['post']['pid']}' class='post_mod hide'>{$this->lang->words['mod_select_post']}</label><input type='checkbox' id='checkbox_{$post['post']['pid']}' name='selectedpids[]' value='{$post['post']['pid']}' class='post_mod right'<if test=\"postModSelected:|:!empty( $post['post']['_pid_selected'] )\"> checked='checked'</if> data-status='{$post['post']['queued']}' />\n\t\t\t\t\t</span>\n\t\t\t\t</if>\n\t\t\t\t<span class='post_id right ipsType_small desc blend_links'>\n\t\t\t\t\t<if test=\"hasPages:|:$this->request['st']\">\n\t\t\t\t\t\t<a itemprop=\"replyToUrl\" href='{parse url=\"showtopic={$post['post']['topic_id']}&amp;st={$this->request['st']}#entry{$post['post']['pid']}\" template=\"showtopic\" seotitle=\"{$topic['title_seo']}\" base=\"public\"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<a itemprop=\"replyToUrl\" href='{parse url=\"showtopic={$post['post']['topic_id']}&#entry{$post['post']['pid']}\" template=\"showtopic\" seotitle=\"{$topic['title_seo']}\" base=\"public\"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>\n\t\t\t\t\t</if>\n\t\t\t\t\t#{$post['post']['post_count']}\n\t\t\t\t\t</a>\n\t\t\t\t</span>\n\t\t\t\t<if test=\"postMember:|:$post['author']['member_id']\">\n\t\t\t\t\t<span itemprop=\"creator name\" class=\"author vcard\">{parse template=\"userHoverCard\" group=\"global\" params=\"$post['author']\"}</span>\n\t\t\t\t<else />\n\t\t\t\t\t{parse template=\"userHoverCard\" group=\"global\" params=\"$post['author']\"}\n\t\t\t\t</if>\n\t\t\t\n\t\t\t\t<if test=\"postIp:|:$post['post']['_show_ip']\">\n\t\t\t\t\t<span class='ip right ipsType_small'>({$this->lang->words['ip']}:\n\t\t\t\t\t<if test=\"postAdmin:|:$post['author']['g_access_cp']\">\n\t\t\t\t\t\t<em>{$this->lang->words['ip_private']}</em>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<if test=\"accessModCP:|:$this->memberData['g_is_supmod']\"><a href=\"{parse url=\"app=core&amp;module=modcp&amp;fromapp=members&amp;tab=iplookup&amp;ip={$post['post']['ip_address']}\" base=\"public\"}\" title='{$this->lang->words['info_about_this_ip']}'>{$post['post']['ip_address']}</a><else />{$post['post']['ip_address']}</if>\n\t\t\t\t\t</if>)\n\t\t\t\t\t</span>\n\t\t\t\t</if>\n\t\t\t</h3>\n\t\t\t<div class='author_info'>\n\t\t\t\t{parse template=\"userInfoPane\" group=\"global\" params=\"$post['author'], $post['post']['pid'], array( 'isTopicView' => true, 'wl_id' => $post['post']['wl_id'] )\"}\n\t\t\t</div>\n\t\t\t<div class='post_body'>\n\t\t\t\t<p class='posted_info desc lighter ipsType_small'>\n\t\t\t\t\t{$this->lang->words['posted']} <abbr class=\"published\" itemprop=\"commentTime\" title=\"{parse expression=\"date( 'c', $post['post']['post_date'] )\"}\">{parse date=\"$post['post']['post_date']\" format=\"long\"}</abbr>\n\t\t\t\t</p>\n\t\t\t\t<if test=\"repHighlight:|:$this->settings['reputation_highlight'] AND $post['post']['rep_points'] >= $this->settings['reputation_highlight']\">\n\t\t\t\t\t<p class='rep_highlight'>{parse replacement=\"popular_post\"}<br />{$this->lang->words['popular_post']}</p>\n\t\t\t\t</if>\n\t\t\t\t<div itemprop=\"commentText\" class='post entry-content <if test=\"$post['post']['_repignored'] == 1\">imgsize_ignore</if>'>\n\t\t\t\t\t{$post['post']['post']}\n\t\t\t\t\t{$post['post']['attachmentHtml']}\n\t\t\t\t\t<br />\n\t\t\t\t\t<if test=\"postEditBy:|:$post['post']['edit_by']\">\n\t\t\t\t\t\t<p class='edit'>\n\t\t\t\t\t\t\t{$post['post']['edit_by']}\n\t\t\t\t\t\t\t<if test=\"postEditByReason:|:$post['post']['post_edit_reason'] != ''\">\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<span class='reason'>{$post['post']['post_edit_reason']}</span>\n\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</if>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<if test=\"repButtonsLike:|: ! $topic['_isArchived']\">\n\t\t\t\t{parse template=\"repButtons\" group=\"global_other\" params=\"$post['author'], array_merge( array( 'primaryId' => $post['post']['pid'], 'domLikeStripId' => 'like_post_' . $post['post']['pid'], 'domCountId' => 'rep_post_' . $post['post']['pid'], 'app' => 'forums', 'type' => 'pid', 'likeFormatted' => $post['post']['like']['formatted'] ), $post['post'] )\"}\n\t\t\t\t</if>\n\t\t\t\t\t\t\t\t\n\t\t\t\t<if test=\"postSignature:|:$post['post']['signature']\">\n\t\t\t\t\t{$post['post']['signature']}\n\t\t\t\t</if>\n\t\t\t\t\n\t\t\t\t<if test=\"controlsForUnapprovedPost:|:$this->memberData['is_mod'] && ! $topic['_isArchived'] && $post['post']['queued']\">\n\t\t\t\t\t<ul id='postControlsUnapproved_{$post['post']['pid']}' class='post_controls clear clearfix'>\n\t\t\t\t\t\t<if test=\"canDelete:|:$post['post']['_can_delete'] === TRUE && ! $topic['_isArchived']\">\n\t\t\t\t\t\t\t<li class='post_del'>\n\t\t\t\t\t\t\t\t<a class='ipsButton_secondary' href='{parse url=\"module=moderate&amp;section=moderate&amp;do=postchoice&amp;tact=deletedo&amp;f={$topic['forum_id']}&amp;t={$topic['tid']}&amp;selectedpids[]={$post['post']['pid']}&amp;st={$this->request['st']}&amp;auth_key={$this->member->form_hash}\" base=\"publicWithApp\"}' title='{$this->lang->words['post_delete_title']}' onclick='if( !confirm(\"{$this->lang->words['post_delete_confirm']}\") ){ return false; }' >{$this->lang->words['post_delete']}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</if>\n\t\t\t\t\t\t<li class='post_toggle toggle_post' id='toggle_post_{$post['post']['pid']}' style='display: none'>\n\t\t\t\t\t\t\t<a class='ipsButton_secondary' href='{parse url=\"app=forums&amp;module=moderate&amp;section=moderate&amp;do=postchoice&amp;tact=<if test=\"!$post['post']['queued']\">unapprove<else />approve</if>&amp;selectedpids[{$post['post']['pid']}]={$post['post']['pid']}&amp;t={$topic['tid']}&amp;f={$forum['id']}&amp;auth_key={$this->member->form_hash}\" base=\"public\"}' title='{$this->lang->words['post_toggle_visible']}'><span id='toggletext_post_{$post['post']['pid']}'><if test=\"approveUnapprove:|:$post['post']['queued']==1\">{$this->lang->words['post_approve']}<else />{$this->lang->words['post_unapprove']}</if></span></a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<if test=\"canEdit:|:$post['post']['_can_edit'] === TRUE\">\n\t\t\t\t\t\t\t<li class='post_edit'><a href='{parse url=\"module=post&amp;section=post&amp;do=edit_post&amp;f={$topic['forum_id']}&amp;t={$topic['tid']}&amp;p={$post['post']['pid']}&amp;st={$this->request['st']}\" base=\"publicWithApp\"}' title='{$this->lang->words['post_edit_title']}' class='ipsButton_secondary edit_post' id='edit_post_{$post['post']['pid']}'>{$this->lang->words['post_edit']}</a></li>\n\t\t\t\t\t\t</if>\n\t\t\t\t\t</ul>\n\t\t\t\t</if>\n\t\t\t\n\t\t\t\t<ul id='postControlsNormal_{$post['post']['pid']}' class='post_controls clear clearfix' <if test=\"hideNormalControlsForUnapprovedPost:|:$this->memberData['is_mod'] && ! $topic['_isArchived'] && $post['post']['queued']\">style='display:none'</if>>\n\t\t\t\t\t<li class='top hide'><a href='#ipboard_body' class='top' title='{$this->lang->words['back_top']}'>{$this->lang->words['back_top']}</a></li>\n\t\t\t\t\t<if test=\"replyButtonWarn:|:!$this->memberData['unacknowledged_warnings'] && !$this->memberData['restrict_post']\">\n\t\t\t\t\t\t<if test=\"replyButton:|:$post['post']['_canReply']\">\n\t\t\t\t\t\t\t<li><a href=\"{parse url=\"module=post&amp;section=post&amp;do=reply_post&amp;f={$this->request['f']}&amp;t={$this->request['t']}&amp;qpid={$post['post']['pid']}\" base=\"publicWithApp\"}\" class='_ips_trigger_quote ipsButton_secondary' pid=\"{$post['post']['pid']}\" title=\"{$this->lang->words['tt_reply_to_post']}\">{$this->lang->words['post_reply']}</a></li>\n\t\t\t\t\t\t\t<if test=\"multiquote:|:!empty( $post['post']['_mq_selected'] )\">\n\t\t\t\t\t\t\t\t<li class='selected multiquote' id='multiq_{$post['post']['pid']}' style='display: none'>\n\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t<li class='multiquote' id='multiq_{$post['post']['pid']}' style='display: none'>\n\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t\t<a href=\"{parse url=\"module=post&amp;section=post&amp;do=reply_post&amp;f={$this->request['f']}&amp;t={$this->request['t']}&amp;qpid={$post['post']['pid']}\" base=\"publicWithApp\"}\" title=\"{$this->lang->words['quote_with_mq']}\" class='ipsButton_secondary'>{$this->lang->words['mq']}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</if>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"canDelete:|:$post['post']['_can_delete'] === TRUE && ! $topic['_isArchived']\">\n\t\t\t\t\t\t<li id='del_post_{$post['post']['pid']}' class='post_del'>\n\t\t\t\t\t\t\t<a href='{parse url=\"module=moderate&amp;section=moderate&amp;do=postchoice&amp;tact=deletedo&amp;f={$topic['forum_id']}&amp;t={$topic['tid']}&amp;selectedpids[]={$post['post']['pid']}&amp;st={$this->request['st']}&amp;auth_key={$this->member->form_hash}\" base=\"publicWithApp\"}' title='{$this->lang->words['post_delete_title']}' class='delete_post' onclick='return false;' >{$this->lang->words['post_delete']}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"canHide:|:$post['post']['_softDelete'] && ! $topic['_isArchived']\">\n\t\t\t\t\t\t<li id='hide_post_{$post['post']['pid']}'>\n\t\t\t\t\t\t\t<a href='{parse url=\"module=moderate&amp;section=moderate&amp;do=postchoice&amp;tact=delete&amp;f={$topic['forum_id']}&amp;t={$topic['tid']}&amp;selectedpids[]={$post['post']['pid']}&amp;st={$this->request['st']}&amp;auth_key={$this->member->form_hash}\" base=\"publicWithApp\"}' class='hide_post'>{$this->lang->words['post_hide']}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"canEdit:|:$post['post']['_can_edit'] === TRUE\">\n\t\t\t\t\t\t<li class='post_edit'><a href='{parse url=\"module=post&amp;section=post&amp;do=edit_post&amp;f={$topic['forum_id']}&amp;t={$topic['tid']}&amp;p={$post['post']['pid']}&amp;st={$this->request['st']}\" base=\"publicWithApp\"}' title='{$this->lang->words['post_edit_title']}' class='edit_post' id='edit_post_{$post['post']['pid']}'>{$this->lang->words['post_edit']}</a></li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"hasblog:|:$this->settings['blog_allow_bthis'] AND $this->memberData['has_blog'] AND IPSLib::appIsInstalled( 'blog' ) AND $post['post']['_canReply']\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<a href='{parse url=\"app=blog&amp;blog_this=forums&amp;id1={$this->request['t']}&amp;id2={$post['post']['pid']}\" base=\"public\"}'>{$this->lang->words['blog_this']}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"canReportPost:|:$topic['_canReport'] and ( $this->memberData['member_id'] ) && ! $topic['_isArchived']\">\n\t\t\t\t\t\t<li class='report'>\n\t\t\t\t\t\t\t<a href='{parse url=\"app=core&amp;module=reports&amp;rcom=post&amp;tid={$this->request['t']}&amp;pid={$post['post']['pid']}&amp;st={$this->request['st']}\" base=\"public\"}'>{$this->lang->words['report']}</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<if test=\"postIsReported:|:$this->memberData['_cache']['report_temp']['post_marker']['post'][ $post['post']['pid'] ]['gfx'] > 0\">\n\t\t\t\t\t\t\t<li class='report'>\n\t\t\t\t\t\t\t\t<a href=\"{$this->settings['base_url']}app=core&amp;module=reports&amp;section=reports&amp;do=show_report&amp;rid={$this->memberData['_cache']['report_temp']['post_marker']['post'][$post['post']['pid']]['info']['id']}\" id='post-report-{$post['post']['pid']}' class='ipbmenu'> <span id=\"rstat-{$this->memberData['_cache']['report_temp']['post_marker']['post'][ $post['post']['pid'] ]['info']['id']}\"><img src=\"{$this->settings['img_url']}/reports/post_alert_{$this->memberData['_cache']['report_temp']['post_marker']['post'][$post['post']['pid']]['gfx']}.png\" alt=\"\" /></span> </a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</if>\n\t\t\t\t\t</if>\n\t\t\t\t</ul>\n\t\t\t\t<if test=\"reportedPostData:|:! $topic['_isArchived'] AND $this->memberData['_cache']['report_temp']['post_marker']['post'][ $post['post']['pid'] ]['gfx'] > 0\">\n\t\t\t\t\t<ul id='post-report-{$post['post']['pid']}_menucontent' class='ipbmenu_content report_menu'>\n\t\t\t\t\t\t<li><a href=\"{parse url=\"app=core&amp;module=reports&amp;do=show_report&amp;rid={$this->memberData['_cache']['report_temp']['post_marker']['post'][ $post['post']['pid'] ]['info']['id']}\" base=\"public\"}\" id='report_mark_{$post['post']['pid']}'><img src='{$this->settings['img_url']}/reports/mark_complete.png' alt='' /> {$this->lang->words['report_menu_mark_complete']}</a></li>\n\t\t\t\t\t\t<li><a href=\"{$this->settings['base_url']}app=core&amp;module=reports&amp;section=reports&amp;do=show_report&amp;rid={$this->memberData['_cache']['report_temp']['post_marker']['post'][$post['post']['pid']]['info']['id']}\"><img src='{$this->settings['img_url']}/reports/view_report.png' alt='' /> {$this->lang->words['report_menu_view_report']}</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t$('report_mark_{$post['post']['pid']}').observe('click',\n\t\t\t\t\t\t \tipb.global.updateReportStatus.bindAsEventListener( \t\n\t\t\t\t\t\t\t\tthis, {$this->memberData['_cache']['report_temp']['post_marker']['post'][$post['post']['pid']]['info']['id']},2,2\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t</script>\n\t\t\t\t</if>\t\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</if>\n\t\t\n\t\t<if test=\"initIgnoredPost:|:$post['post']['_repignored'] == 1 || $post['post']['_ignored']\">\n\t\t\t<script type='text/javascript'>\n\t\t\t\tipb.topic.setPostHidden( {$post['post']['pid']} );\n\t\t\t\t$('unhide_post_{$post['post']['pid']}').show();\n\t\t\t</script>\n\t\t</if>\n\t\t<hr />\n\t\t\n\t\t<if test=\"adCodeCheck:|:$post['post']['_adCode']\">\n\t\t\t{$post['post']['_adCode']}\n\t\t</if>\n<script type=\"text/javascript\">\nvar pid = parseInt({$post['post']['pid']});\nif ( pid > ipb.topic.topPid ){\n\tipb.topic.topPid = pid;\n}\n<if test=\"sDeletedNotMQ:|:! $post['post']['_isDeleted']\">\n\t// Show multiquote for JS browsers\n\tif ( $('multiq_{$post['post']['pid']}') )\n\t{\n\t\t$('multiq_{$post['post']['pid']}').show();\n\t}\n\t\n\tif( $('toggle_post_{$post['post']['pid']}') )\n\t{\n\t\t$('toggle_post_{$post['post']['pid']}').show();\n\t}\n\t\n\t// Add perm data\n\tipb.topic.deletePerms[{$post['post']['pid']}] = { 'canDelete' : {parse expression=\"intval($post['post']['_can_delete'])\"}, 'canSoftDelete' : {parse expression=\"intval($post['post']['_softDelete'])\"} };\n</if>\n</script>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "300d0b22bd108609e120f288c3e15e99", "score": "0.5076303", "text": "public function apply_defaults () \n {\n $this->set_select ('att.*');\n $this->set_order ('att.time_created');\n $this->set_table ($this->app->table_names->attachments . ' att');\n $this->add_table ($this->_host->table_name () . ' host', 'att.object_id = host.id');\n }", "title": "" }, { "docid": "611898676ddb21d9e35b2c8b3e1b0cfe", "score": "0.5073158", "text": "function attach_wrapper($content) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n\n <div class=\"tableborder\">\n\t\t\t\t\t\t<div class=\"tableheaderalt\">\n\t\t\t\t\t\t<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n\t\t\t\t <tr>\n\t\t\t\t <td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Типы прикрепляемых файлов</td>\n\t\t\t\t <td align='right' nowrap='nowrap' style='padding-right:6px'><img id='menumainone' src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /></td>\n\t\t\t\t </tr>\n\t\t\t\t </table> </div>\n <table cellpadding='0' cellspacing='0' width='100%'>\n <tr>\n <td class='tablesubheader' width='1%'>&nbsp;</td>\n <td class='tablesubheader' width='20%'>Расширение</td>\n <td class='tablesubheader' width='40%'>Mime-тип</td>\n <td class='tablesubheader' width='10%'>+Сообщения</td>\n <td class='tablesubheader' width='10%'>+Аватар</td>\n <td class='tablesubheader' width='5%'>Опции</td>\n </tr>\n $content\n </table>\n <div align='center' class='tablefooter'><div class='fauxbutton-wrapper'><span class='fauxbutton'><a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=attach_add'>Добавить новый тип</a></span></div></div>\n</div>\n<br />\n\n <script type=\"text/javascript\">\n menu_build_menu(\n \"menumainone\",\n new Array( img_export + \" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=attach_export'>Экспорт типов файлов</a>\" ) );\n </script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "title": "" }, { "docid": "f7af149cac8379aee8800150d2bb1119", "score": "0.50702894", "text": "function displayPreview($qry){\n\t\tglobal $qs, $array, $row, $gen, $rater, $aa, $sql2, $tp, $plugintable, $plugindir, $content_shortcodes, $content_pref, $mainparent, $CONTENT_RECENT_TABLE_AUTHORDETAILS;\n\t\tglobal $CONTENT_RECENT_TABLE_START, $CONTENT_RECENT_TABLE_END, $CONTENT_RECENT_TABLE, $CONTENT_RECENT_TABLE_INFOPRE, $CONTENT_RECENT_TABLE_INFOPOST;\n\n\t\tif(!isset($CONTENT_RECENT_TABLE)){\n\t\t\tif(!$content_pref[\"content_theme\"]){\n\t\t\t\trequire_once($plugindir.\"templates/default/content_recent_template.php\");\n\t\t\t}else{\n\t\t\t\tif(is_readable($tp->replaceConstants($content_pref[\"content_theme\"]).\"content_recent_template.php\")){\n\t\t\t\t\trequire_once($tp->replaceConstants($content_pref[\"content_theme\"]).\"content_recent_template.php\");\n\t\t\t\t}else{\n\t\t\t\t\trequire_once($plugindir.\"templates/default/content_recent_template.php\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($resultitem = $sql2 -> db_Select($plugintable, \"*\", $qry )){\n\t\t\t$content_recent_table_string = \"\";\n\t\t\twhile($row = $sql2 -> db_Fetch()){\n\t\t\t\t$CONTENT_RECENT_TABLE_AUTHORDETAILS = $aa -> prepareAuthor(\"list\", $row['content_author'], $row['content_id']);\n\t\t\t\t$rdate\t= $tp -> parseTemplate('{CONTENT_RECENT_TABLE_DATE}', FALSE, $content_shortcodes);\n\t\t\t\t$rauth\t= $tp -> parseTemplate('{CONTENT_RECENT_TABLE_AUTHORDETAILS}', FALSE, $content_shortcodes);\n\t\t\t\t$rep\t= $tp -> parseTemplate('{CONTENT_RECENT_TABLE_EPICONS}', FALSE, $content_shortcodes);\n\t\t\t\t$rpar\t= $tp -> parseTemplate('{CONTENT_RECENT_TABLE_PARENT}', FALSE, $content_shortcodes);\n\t\t\t\t$redi\t= $tp -> parseTemplate('{CONTENT_RECENT_TABLE_EDITICON}', FALSE, $content_shortcodes);\n\t\t\t\t$CONTENT_RECENT_TABLE_INFOPRE = FALSE;\n\t\t\t\t$CONTENT_RECENT_TABLE_INFOPOST = FALSE;\n\t\t\t\tif ($rdate!=\"\" || $rauth!=\"\" || $rep!=\"\" || $rpar!=\"\" || $redi!=\"\" ) {\n\t\t\t\t\t$CONTENT_RECENT_TABLE_INFOPRE = TRUE;\n\t\t\t\t\t$CONTENT_RECENT_TABLE_INFOPOST = TRUE;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$content_recent_table_string .= $tp -> parseTemplate($CONTENT_RECENT_TABLE, FALSE, $content_shortcodes);\n\t\t\t}\n\t\t}\n\t\t$text = $CONTENT_RECENT_TABLE_START.$content_recent_table_string.$CONTENT_RECENT_TABLE_END;\n\n\t\treturn $text;\n}", "title": "" }, { "docid": "91972d23e681139ec604a2bf31fa5431", "score": "0.5068139", "text": "private function getPDFData()\n\t{\n\t\t$result = $this->getPostingData();\n\n\t\t$title = $this->getText($result['title'], false);\n\t\t\n\t\t$date_format = $this->convertDateFormat($this->reg->findSetting('preferred_date_format'));\n\n\t\t$text = $this->getText($result['message_html'], true);\t\n\t\n\t\t$date = date($date_format, strtotime($result['posted']));\n\t\n\t\t$author = $this->reg->getNickname($result['author_id']);\n\n\t\t$image = (!empty($this->params['image'])) ? PATH_TO_ROOT . \"/images/\" . $this->params['image'] : \"\";\n\n\t\t$strapline = my_html_entity_decode($this->params['strapline']);\n\n\t\t$thisPostURL = PO_Posting_Extended::getPermalink($_GET['id']);\n\n\t\t$URLLink = \"<a href=\\\"$thisPostURL\\\">$thisPostURL</a>\";\n\n\t\t$endText = str_replace(\"||URL||\", $URLLink, my_html_entity_decode($this->params['endText']));\n\n\t\t$headerTextColour = $this->params['headerTextColour'];\n\n\t\t$headerLeftMargin = $this->params['headerLeftMargin'];\n\n\t\t$startPostingText = $this->params['startPostingText'];\n\t\n\t\t$authDate = \"Posted by \" . $author . \" on \" . $date;\n\n/*$fp = fopen(LOG_DIR . 'special.log', 'wb');\nfwrite ($fp, $text);\nfclose ($fp);\necho \"Written to log dir\";\nexit;*/\n\n\n\t\t$data = array(\t'title' \t\t\t=> $title,\n\t\t\t\t\t\t'text' \t\t\t\t=> $text,\n\t\t\t\t\t\t'date' \t\t\t\t=> $date,\n\t\t\t\t\t\t'author' \t\t\t=> $author,\n\t\t\t\t\t\t\"image\" \t\t\t=> $image,\n\t\t\t\t\t\t\"strapline\" \t\t=> $strapline,\n\t\t\t\t\t\t'endText' \t\t\t=> $endText,\n\t\t\t\t\t\t'headerTextColour' \t=> $headerTextColour,\n\t\t\t\t\t\t'headerLeftMargin' \t=> $headerLeftMargin,\n\t\t\t\t\t\t'startPostingText' \t=> $startPostingText,\n\t\t\t\t\t\t'authDate' \t\t\t=> $authDate\n\t\t\t\t\t\t);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "c1db7aad29c04cff91762551d98211c2", "score": "0.5067773", "text": "function SetUpDisplayRecs() {\r\n\t\tglobal $tbl_group;\r\n\t\t$sWrk = @$_GET[EW_TABLE_REC_PER_PAGE];\r\n\t\tif ($sWrk <> \"\") {\r\n\t\t\tif (is_numeric($sWrk)) {\r\n\t\t\t\t$this->lDisplayRecs = intval($sWrk);\r\n\t\t\t} else {\r\n\t\t\t\tif (strtolower($sWrk) == \"all\") { // Display all records\r\n\t\t\t\t\t$this->lDisplayRecs = -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->lDisplayRecs = 15; // Non-numeric, load default\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$tbl_group->setRecordsPerPage($this->lDisplayRecs); // Save to Session\r\n\r\n\t\t\t// Reset start position\r\n\t\t\t$this->lStartRec = 1;\r\n\t\t\t$tbl_group->setStartRecordNumber($this->lStartRec);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c1db65841474d8fabd215d1012f28ea4", "score": "0.5065841", "text": "function initData() {\r\n $approvalNoticeDao =& DAORegistry::getDAO('ApprovalNoticeDAO');\r\n if (isset($this->approvalNoticeId)) {\r\n\t\t\t$approvalNotice =& $approvalNoticeDao->getApprovalNotice($this->approvalNoticeId);\r\n\t\t\tif ($approvalNotice != null) {\r\n\t\t\t\t$this->_data = array(\r\n\t\t\t\t\t'title' => $approvalNotice->getApprovalNoticeTitle(),\r\n 'committees' => $approvalNotice->getCommitteesArray(),\r\n 'reviewTypes' => $approvalNotice->getReviewTypesArray(), \r\n 'active' => $approvalNotice->getActive(),\r\n\t\t\t\t\t'APHeader' => $approvalNotice->getApprovalNoticeHeader(),\r\n\t\t\t\t\t'APBody' => $approvalNotice->getApprovalNoticeBody(),\r\n\t\t\t\t\t'APFooter' => $approvalNotice->getApprovalNoticeFooter()\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\t$this->approvalNoticeId = null;\r\n\t\t\t\t$this->_data = array(\r\n 'committees' => array(0 => APPROVAL_NOTICE_COMMITTEE_ALL),\r\n 'reviewTypes' => array(0 => APPROVAL_NOTICE_TYPE_ALL)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} else {\r\n $this->_data = array(\r\n 'committees' => array(0 => APPROVAL_NOTICE_COMMITTEE_ALL),\r\n 'reviewTypes' => array(0 => APPROVAL_NOTICE_TYPE_ALL)\r\n );\r\n }\r\n \r\n\t}", "title": "" }, { "docid": "ef87790712582288dacca7a9e3edbcca", "score": "0.50619316", "text": "protected function previewData()\n {\n if ($this->preview_data_fetched === false) {\n $this->contentData();\n\n $this->preview_data = array(\n 'color' => $this->content_data['color']\n );\n\n $this->preview_data_fetched = true;\n }\n }", "title": "" }, { "docid": "925ffdc76079f9c25c01cc88dad69c90", "score": "0.50543404", "text": "protected function initDisplayVars_manager(){\r\n\t\t\r\n\t\t$this->objManager = new UniteCreatorManagerLayouts();\r\n\t\t$this->objManager->init($this->layoutType);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "269dffe75fc9b9d663fcf7a60a92ac5c", "score": "0.5049877", "text": "function commonAssign() \n\t{\t\n\t\t// call parent\n\t\tparent::commonAssign();\n\n\t\tif ( !$this->noRecordsFound ) \n\t\t{\n\t\t\t$this->xt->assign(\"savebuttons_block\", true);\n\t\t\t$this->xt->assign(\"savebutton_attrs\",\"id=\\\"saveBtn\\\"\");\n\t\t\t$this->xt->assign(\"resetbutton_attrs\", \"id=\\\"resetBtn\\\"\");\n\t\t}\n\t\t\n\t\t$this->xt->assign(\"search_records_block\",true);\n\t\t// The user might rewrite $_SESSION[\"UserName\"] value with HTML code in an event, \n\t\t// so no encoding will be performed while printing this value.\n\t\t$this->initLogin();\n\t\t\n\t\t$this->hideElement(\"message\");\n\t\t$this->xt->assign(\"menu_block\",true);\n\t\t\n\t\t$this->xt->assign(\"grid_block\", true);\n\n\t\tif( $this->showDisplayField() ) {\n\t\t\t$this->xt->assign(\"displayname_column\", true);\n\t\t}\n\t\tif( $this->showEmailField() ) {\n\t\t\t$this->xt->assign(\"email_column\", true);\t\n\t\t}\n\t}", "title": "" }, { "docid": "d92d29796cb543c30d5041c525cef9b4", "score": "0.50493574", "text": "public function attachPage() { }", "title": "" }, { "docid": "b0243e221daf26578c83752d3a841f15", "score": "0.5045555", "text": "function init_complete_extensions_data()\n{\n\tglobal $db, $allowed_extensions, $display_categories, $download_modes, $upload_icons;\n\n\t$extension_informations = get_extension_informations();\n\t$allowed_extensions = array();\n\n\tfor ($i = 0, $size = sizeof($extension_informations); $i < $size; $i++)\n\t{\n\t\t$extension = strtolower(trim($extension_informations[$i]['extension']));\n\t\t$allowed_extensions[] = $extension;\n\t\t$display_categories[$extension] = intval($extension_informations[$i]['cat_id']);\n\t\t$download_modes[$extension] = intval($extension_informations[$i]['download_mode']);\n\t\t$upload_icons[$extension] = trim($extension_informations[$i]['upload_icon']);\n\t}\n}", "title": "" }, { "docid": "724d2ed96e2d809494beab1e9d0c3d91", "score": "0.50373036", "text": "function AfterEdit(&$values, $where, &$oldvalues, &$keys, $inline, &$pageObject)\n{\n\n\t\tif($values[\"attachment\"]){\n\n\t$parts = explode('\"', $values[\"attachment\"]);\n\n\t$length = count($parts);\n\n\tforeach ($parts as $part) {\n\t if (strpos($part, 'files\\/') !== false) {\n\t\t\t $attach = str_replace(\"\\/\",\"/\",$part);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nif($oldvalues['loop_type'] == '1' && $oldvalues['repeat'] != '0' && ($values['repeat'] != $oldvalues['repeat'] || $values['repeat_type'] != $oldvalues['repeat_type'] || $values['loop_value'] != $oldvalues['loop_value'])){\n\n\t$datax = array();\n\t$datax[\"member_agenda_id\"] = $values['member_agenda_id'];\n\tDB::Delete(\"outbox_line\", $datax );\n\tDB::Delete(\"outbox_mail_alibaba\", $datax );\n\tDB::Delete(\"outbox_mail_aws\", $datax );\n\tDB::Delete(\"outbox_mail_mailchimp\", $datax );\n\tDB::Delete(\"outbox_telegram\", $datax );\n\tDB::Delete(\"outbox_whatsapp\", $datax );\n\n\n\t$repeat = $values[\"repeat\"];\n\n\tif($repeat == 0 || $repeat == null)\n\t{\n\t\t$tgl = $values[\"loop_value\"];\n\t\t$data1[\"tgl\"] = $tgl;\n\t\t$rs1 = DB::Query(\"select chat_id from personal_channel\n\t\twhere member_id = '$values[member_id]' AND channel_id = 1\");\n\t\t$dataChannelTele=$rs1->fetchAssoc();\n\t\tif($dataChannelTele)\n\t\t{\n\t\t $data1[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t\t DB::Insert(\"outbox_telegram\", $data1 );\n\t\t}\n\n\t\t$rs2 = DB::Query(\"select chat_id from personal_channel\n\t\twhere member_id = '$values[member_id]' AND channel_id = 2\");\n\t\t$dataChannelAws=$rs2->fetchAssoc();\n\t\tif($dataChannelAws)\n\t\t{\n\t\t $data1[\"chat_id\"] = $dataChannelAws[\"chat_id\"];\n\t\t DB::Insert(\"outbox_mail_aws\", $data1 );\n\t\t DB::Insert(\"outbox_mail_alibaba\", $data1 );\n\t\t DB::Insert(\"outbox_mail_mailchimp\", $data1 );\n\t\t}\n\n\t\t$rs3 = DB::Query(\"select chat_id from personal_channel\n\t\twhere member_id = '$values[member_id]' AND channel_id = 3\");\n\t\t$dataChannelWa=$rs3->fetchAssoc();\n\t\tif($dataChannelWa)\n\t\t{\n\t\t $data1[\"chat_id\"] = $dataChannelWa[\"chat_id\"];\n\t\t DB::Insert(\"outbox_whatsapp\", $data1 );\n\t\t}\n\n\t\t$rs4 = DB::Query(\"select chat_id from personal_channel\n\t\twhere member_id = '$values[member_id]' AND channel_id = 4\");\n\t\t$dataChannelLine=$rs4->fetchAssoc();\n\t\tif($dataChannelLine)\n\t\t{\n\t\t $data1[\"chat_id\"] = $dataChannelLine[\"chat_id\"];\n\t\t DB::Insert(\"outbox_line\", $data1 );\n\t\t}\n\t}\n\telse\n\t{\n\t\t$i = 0;\n\t\t$data2 = array();\n\t\t//$data1[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t\t$id = $values[\"member_id\"];\n\t\t$data2[\"out_msg\"] = $values[\"message_content\"];\n\t\t$data2[\"type\"] = \"msg\";\n\t\t$data2[\"flag\"] = 1;\n\t\t$tgl = $values[\"loop_value\"];\n\t\t$data2[\"tgl\"] = $tgl;\n\t\t$data2[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t$data2[\"member_id\"] = $values['member_id'];\n\n\t\t$data21[\"out_msg\"] = $attach;\n\t\t$data21[\"type\"] = \"file\";\n\t\t$data21[\"flag\"] = 1;\n\t\t$data21[\"tgl\"] = $tgl;\n\t\t$data21[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t$data21[\"member_id\"] = $values['member_id'];\n\t\twhile($i <= $repeat)\n\t\t{\n\t\t\t$rep = $values[\"repeat_type\"];\n\t\t\tif($rep == \"bydate\")\n\t\t\t{\n\t\t\t\tif($i == 0)\n\t\t\t\t{\n\t\t\t\t\t$data2[\"tgl\"] = $tgl;\n\t\t\t\t\t$data21[\"tgl\"] = $tgl;\n\t\t\t\t\t$rs1 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\t\twhere member_id = '$values[member_id]' AND channel_id = 1\");\n\t\t\t\t\t$dataChannelTele=$rs1->fetchAssoc();\n\t\t\t\t\tif($dataChannelTele)\n\t\t\t\t\t{\n\t\t\t\t\t $data2[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t\t\t\t\t $data21[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t\t\t\t\t DB::Insert(\"outbox_telegram\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_telegram\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$rs2 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\t\twhere member_id = '$values[member_id]' AND channel_id = 2\");\n\t\t\t\t\t$dataChannelAws=$rs2->fetchAssoc();\n\t\t\t\t\tif($dataChannelAws)\n\t\t\t\t\t{\n\t\t\t\t\t $data2[\"chat_id\"] = $dataChannelAws[\"chat_id\"];\n\t\t\t\t\t $data21[\"chat_id\"] = $dataChannelAws[\"chat_id\"];\n\t\t\t\t\t DB::Insert(\"outbox_mail_aws\", $data2 );\n\t\t\t\t\t DB::Insert(\"outbox_mail_alibaba\", $data2 );\n\t\t\t\t\t DB::Insert(\"outbox_mail_mailchimp\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_mail_aws\", $data21 );\n\t\t\t\t\t\t\tDB::Insert(\"outbox_mail_alibaba\", $data21 );\n\t\t\t\t\t\t\tDB::Insert(\"outbox_mail_mailchimp\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$rs3 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\t\twhere member_id = '$values[member_id]' AND channel_id = 3\");\n\t\t\t\t\t$dataChannelWa=$rs3->fetchAssoc();\n\t\t\t\t\tif($dataChannelWa)\n\t\t\t\t\t{\n\t\t\t\t\t $data2[\"chat_id\"] = $dataChannelWa[\"chat_id\"];\n\t\t\t\t\t $data21[\"chat_id\"] = $dataChannelWa[\"chat_id\"];\n\t\t\t\t\t DB::Insert(\"outbox_whatsapp\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_whatsapp\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$rs4 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\t\twhere member_id = '$values[member_id]' AND channel_id = 4\");\n\t\t\t\t\t$dataChannelLine=$rs4->fetchAssoc();\n\t\t\t\t\tif($dataChannelLine)\n\t\t\t\t\t{\n\t\t\t\t\t $data2[\"chat_id\"] = $dataChannelLine[\"chat_id\"];\n\t\t\t\t\t $data21[\"chat_id\"] = $dataChannelLine[\"chat_id\"];\n\t\t\t\t\t DB::Insert(\"outbox_line\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_line\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$data2[\"member_agenda_id\"] = $idm;\n\t\t\t\t\t//$data2[\"dodate\"] = now();\n\t\t\t\t\t//DB::Insert(\"personal_agenda_repeat_date\", $data2 );\n\t\t\t\t}\n\t\t }\n\t\t else\n\t\t\t{\n\t\t\t\tif($i == 0)\n\t\t\t\t{\n\t\t\t\t\t$data2[\"tgl\"] = $tgl;\n\t\t\t\t\t$data21[\"tgl\"] = $tgl;\n\t\t\t\t}else if($i > 0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif($values[\"repeat_type\"] == \"daily\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$tgl2 = $data2[\"tgl\"];\n\t\t\t\t\t\t$tgl3 = date('Y-m-d H:i:s', strtotime($tgl2 . ' +1 day' ));\n\t\t\t\t\t\t$data2[\"tgl\"] = $tgl3;\n\t\t\t\t\t\t$data21[\"tgl\"] = $tgl3;\n\t\t\t\t\t}else if($rep == \"weekly\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$tgl2 = $data2[\"tgl\"];\n\t\t\t\t\t\t$tgl3 = date('Y-m-d H:i:s', strtotime($tgl2 . ' +1 week' ));\n\t\t\t\t\t\t$data2[\"tgl\"] = $tgl3;\n\t\t\t\t\t\t$data21[\"tgl\"] = $tgl3;\n\t\t\t\t\t}else if($rep == \"monthly\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$tgl2 = $data2[\"tgl\"];\n\t\t\t\t\t\t$tgl3 = date('Y-m-d H:i:s', strtotime($tgl2 . ' +1 month' ));\n\t\t\t\t\t\t$data2[\"tgl\"] = $tgl3;\n\t\t\t\t\t\t$data21[\"tgl\"] = $tgl3;\n\t\t\t\t\t}else if($rep == \"yearly\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$tgl2 = $data2[\"tgl\"];\n\t\t\t\t\t\t$tgl3 = date('Y-m-d H:i:s', strtotime($tgl2 . ' +1 year' ));\n\t\t\t\t\t\t$data2[\"tgl\"] = $tgl3;\n\t\t\t\t\t\t$data21[\"tgl\"] = $tgl3;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$rs1 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\twhere member_id = '$id' AND channel_id = 1\");\n\t\t\t\t$dataChannelTele=$rs1->fetchAssoc();\n\t\t\t\tif($dataChannelTele)\n\t\t\t\t{\n\t\t\t\t $data2[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t\t\t\t $data21[\"chat_id\"] = $dataChannelTele[\"chat_id\"];\n\t\t\t\t DB::Insert(\"outbox_telegram\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_telegram\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$rs2 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\twhere member_id = '$id' AND channel_id = 2\");\n\t\t\t\t$dataChannelAws=$rs2->fetchAssoc();\n\t\t\t\tif($dataChannelAws)\n\t\t\t\t{\n\t\t\t\t $data2[\"chat_id\"] = $dataChannelAws[\"chat_id\"];\n\t\t\t\t $data21[\"chat_id\"] = $dataChannelAws[\"chat_id\"];\n\t\t\t\t DB::Insert(\"outbox_mail_aws\", $data2 );\n\t\t\t\t DB::Insert(\"outbox_mail_alibaba\", $data2 );\n\t\t\t\t DB::Insert(\"outbox_mail_mailchimp\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_mail_aws\", $data21 );\n\t\t\t\t\t\t\tDB::Insert(\"outbox_mail_alibaba\", $data21 );\n\t\t\t\t\t\t\tDB::Insert(\"outbox_mail_mailchimp\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$rs3 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\twhere member_id = '$id' AND channel_id = 3\");\n\t\t\t\t$dataChannelWa=$rs3->fetchAssoc();\n\t\t\t\tif($dataChannelWa)\n\t\t\t\t{\n\t\t\t\t $data2[\"chat_id\"] = $dataChannelWa[\"chat_id\"];\n\t\t\t\t $data21[\"chat_id\"] = $dataChannelWa[\"chat_id\"];\n\t\t\t\t DB::Insert(\"outbox_whatsapp\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_whatsapp\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$rs4 = DB::Query(\"select chat_id from personal_channel\n\t\t\t\twhere member_id = '$id' AND channel_id = 4\");\n\t\t\t\t$dataChannelLine=$rs4->fetchAssoc();\n\t\t\t\tif($dataChannelLine)\n\t\t\t\t{\n\t\t\t\t $data2[\"chat_id\"] = $dataChannelLine[\"chat_id\"];\n\t\t\t\t $data21[\"chat_id\"] = $dataChannelLine[\"chat_id\"];\n\t\t\t\t DB::Insert(\"outbox_line\", $data2 );\n\t\t\t\t\t\tif($values['attachment']){\n\t\t\t\t\t\t\tDB::Insert(\"outbox_line\", $data21 );\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t$i += 1;\n\t\t}\n\t}\n}else{\n\t$data31 = array();\n\t$data31[\"out_msg\"] = $values['message_content'];\n\tif($values['repeat'] == 0 || $values['repeat'] == null){\n\t\t$data31[\"tgl\"] = $values['loop_value'];\n\t}\n\n\t$keyvalues = array();\n\t$keyvalues[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t$keyvalues[\"flag\"] = '1';\n\t$keyvalues[\"type\"] = 'msg';\n\n\tDB::Update(\"outbox_telegram\", $data31, $keyvalues );\n\tDB::Update(\"outbox_mail_alibaba\", $data31, $keyvalues );\n\tDB::Update(\"outbox_mail_aws\", $data31, $keyvalues );\n\tDB::Update(\"outbox_mail_mailchimp\", $data31, $keyvalues );\n\tDB::Update(\"outbox_whatsapp\", $data31, $keyvalues );\n\tDB::Update(\"outbox_line\", $data31, $keyvalues );\n\n\n\n\t$data311 = array();\n\t$data311[\"out_msg\"] = $attach;\n\tif($values['repeat'] == 0 || $values['repeat'] == null){\n\t\t$data311[\"tgl\"] = $values['loop_value'];\n\t}\n\n\tif(!$oldvalues['attachment'] && $values['attachment']){\n\t\t$data311[\"flag\"] = \"1\";\n\t\t$data311[\"type\"] = 'file';\n\t\t$data311[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t$data311[\"member_id\"] = $values['member_id'];\n\n\t\t$data = array();\n\t\t$data[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t$data[\"flag\"] = \"1\";\n\t\t$rs4 = DB::Select(\"outbox_mail_aws\", $data );\n\t\twhile( $record4 = $rs4->fetchAssoc() )\n\t\t{\n\t\t\t$data4 = array();\n\t\t\t$data4[\"out_msg\"] = $attach;\n\t\t\t$data4[\"type\"] = 'file';\n\t\t\t$data4[\"flag\"] = $record4[\"flag\"];\n\t\t\t$data4[\"tgl\"] = $record4[\"tgl\"];\n\t\t\t$data4[\"member_agenda_id\"] = $record4[\"member_agenda_id\"];\n\t\t\t$data4[\"member_id\"] = $record4[\"member_id\"];\t\t\t\n\t\t\t$data4[\"id_personal_repeat\"] = $record4[\"id_personal_repeat\"];\t\n\n\t\t $data2 = array();\n\t\t\t$data2[\"member_id\"] = $values['member_id'];\n\t\t\t$rs1 = DB::Select(\"personal_channel\", $data2 );\n\t\t\twhile( $record2 = $rs1->fetchAssoc() )\n\t\t\t{\n\t\t\t\t$data4[\"chat_id\"] = $record2[\"chat_id\"];\n\n\t\t\t\tif($record2[\"channel_id\"]==1){\n\t\t\t\t\tDB::Insert(\"outbox_telegram\", $data4 );\n\t\t\t\t}else if($record2[\"channel_id\"]==2){\n\t\t\t\t\tDB::Insert(\"outbox_mail_alibaba\", $data4 );\n\t\t\t\t\tDB::Insert(\"outbox_mail_aws\", $data4 );\n\t\t\t\t\tDB::Insert(\"outbox_mail_mailchimp\", $data4 );\n\t\t\t\t}else if($record2[\"channel_id\"]==3){\n\t\t\t\t\tDB::Insert(\"outbox_whatsapp\", $data4 );\n\t\t\t\t}else if($record2[\"channel_id\"]==4){\n\t\t\t\t\tDB::Insert(\"outbox_line\", $data4 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$keyvalues2 = array();\n\t$keyvalues2[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t$keyvalues2[\"flag\"] = '1';\n\t$keyvalues2[\"type\"] = 'file';\n\n\tDB::Update(\"outbox_telegram\", $data311, $keyvalues2 );\n\tDB::Update(\"outbox_mail_alibaba\", $data311, $keyvalues2 );\n\tDB::Update(\"outbox_mail_aws\", $data311, $keyvalues2 );\n\tDB::Update(\"outbox_mail_mailchimp\", $data311, $keyvalues2 );\n\tDB::Update(\"outbox_whatsapp\", $data311, $keyvalues2 );\n\tDB::Update(\"outbox_line\", $data311, $keyvalues2 );\n\n\tif($oldvalues['attachment'] && !$values['attachment']){\n\t\tDB::Delete(\"outbox_telegram\", $keyvalues2 );\n\t\tDB::Delete(\"outbox_mail_alibaba\", $keyvalues2 );\n\t\tDB::Delete(\"outbox_mail_aws\", $keyvalues2 );\n\t\tDB::Delete(\"outbox_mail_mailchimp\", $keyvalues2 );\n\t\tDB::Delete(\"outbox_whatsapp\", $keyvalues2 );\n\t\tDB::Delete(\"outbox_line\", $keyvalues2 );\n\t}\n}\n\n \nif($values['repeat_type']!='bydate'){\n\theader(\"Location: personal_agenda_list.php\");\n\texit();\n}\n;\t\t\n}", "title": "" }, { "docid": "b5a9adca20d53ec4c45078e4c5fe2891", "score": "0.5035017", "text": "public function onPageContentProcessed()\n {\n //$this->grav['twig']->twig_vars['some_key'] = $someData;\n }", "title": "" }, { "docid": "e09d1132a4c572022b0d93d16ec89cfd", "score": "0.5032218", "text": "function displaydatas($outerdata = array())\n {\n global $modx;\n\n //$outerdata['innerrows']['row']='innerrows.row';\n $start = time();\n $this->regSnippetScriptsAndCSS();\n $cache = $modx->getOption('cacheaction', $outerdata, '');\n $cachename = $modx->getOption('cachename', $outerdata, '');\n if ($cache == '2') {\n return $outerdata['cacheoutput'];\n }\n\n\n $bloxouterTplData = array();\n $bloxinnerrows = array();\n $bloxinnercounts = array();\n\n $xeditruns = $modx->getOption('xedit_runs', $GLOBALS, '0');\n if ($xeditruns == '1') {\n $outerdata['innerrows']['bloxdummy'][] = array('caption' => 'Dummy');\n }\n\n $innerrows = $modx->getOption('innerrows', $outerdata, array());\n unset($outerdata['innerrows']);\n\n if (count($innerrows) > 0) {\n foreach ($innerrows as $key => $row) {\n $daten = '';\n $innertpl = '';\n if (isset($this->tpls[$key])) {\n $innertpl = $this->tpls[$key];\n } else {\n $tplfile = $this->bloxconfig['tplpath'] . \"/\" . $key . \"Tpl.html\";\n if (file_exists($modx->config['base_path'] . $tplfile)) {\n $innertpl = \"@FILE:\" . $tplfile;\n }\n }\n\n if ($innertpl !== '') {\n $data = $this->renderdatarows($row, $innertpl, $key, $outerdata);\n $bloxinnerrows[$key] = $data;\n $bloxinnercounts[$key] = count($row);\n }\n\n }\n }\n $outerdata['innerrows'] = $bloxinnerrows;\n $outerdata['innercounts'] = $bloxinnercounts;\n $bloxouterTplData['containerattributes'] = implode(' ', $this->containerattributes);\n\n /*\n $key='message';\n $tplfile = $this->bloxconfig['tplpath'] . \"/\" . $key . \"Tpl.html\";\n $innertpl=(file_exists($tplfile))?$innertpl=\"@FILE:\".$tplfile:'';\n $row=$this->messages;\n $massagedata=$this->renderdatarows($row,$innertpl,$key);\n $bloxouterTplData['messages'] = $massagedata;\n */\n $bloxouterTplData['row'] = $outerdata;\n $bloxouterTplData['config'] = $this->bloxconfig;\n $bloxouterTplData['containerclassnames'] = implode(' ', $this->containerclassnames);\n $outerdata['blox'] = $bloxouterTplData;\n\n $tpl = new xettChunkie($this->tpls['bloxouter']);\n $tpl->placeholders = $outerdata;\n $daten = $tpl->Render();\n unset($tpl);\n if ($cache == '1') {\n $this->cache->writeCache($cachename, $daten);\n }\n $end = time();\n //echo ($end-$start);\n return $daten;\n }", "title": "" }, { "docid": "76f4698c0da9d605c8aef37c4911a4f5", "score": "0.5018111", "text": "public function process()\n\t{\n\t\t// Get selected account\n\t\t$iAccountId = $this->getParam('iAccountId');\n\t\t$aAccount = Phpfox::getService('resume.account')->getAccountById($iAccountId);\n\t\t\n\t\t// Assign variable to layout\n\t\t$this->template()->assign(array(\n\t\t\t'aAccount' => $aAccount\n\t\t));\n\t}", "title": "" }, { "docid": "1a89f30ba9fbbe9403d0590b8c50ffc2", "score": "0.5015574", "text": "function preparePreview( $pParamHash ) {\n\t\tglobal $gBitSystem, $gBitUser;\n\n\t\tif( empty( $pParamHash['user_id'] ) ) {\n\t\t\t$pParamHash['user_id'] = $gBitUser->mUserId;\n\t\t}\n\n\t\tif( isset( $pParamHash[\"title\"] ) ) {\n\t\t\t$this->mInfo[\"title\"] = $pParamHash[\"title\"];\n\t\t}\n\n\t\tif( isset( $pParamHash[\"description\"] ) ) {\n\t\t\t$this->mInfo[\"description\"] = $pParamHash[\"description\"];\n\t\t}\n\n\t\tif( isset( $pParamHash[\"format_guid\"] ) ) {\n\t\t\t$this->mInfo['format_guid'] = $pParamHash[\"format_guid\"];\n\t\t}\n\n\t\tif( isset( $pParamHash[\"edit\"] ) ) {\n\t\t\t$this->mInfo[\"data\"] = $pParamHash[\"edit\"];\n\t\t\t$this->parseData();\n\t\t}\n\t}", "title": "" }, { "docid": "766b5ea084bb7a4722b09e64ee047fc8", "score": "0.500972", "text": "public function initContent()\r\n\t{\r\n\t\t// PAR DEFAUT DESACTIVER COLONNE DE GAUCHE ET DE DROITE, laisser place aux HOOKS CUSTOMS\r\n \t\t$this->display_column_left = false;\r\n \t\t$this->display_column_right = false;\r\n\r\n\t\tparent::initContent();\r\n\t\t// Si j'ai cliqué sur un article je l'affiche \r\n\t\tif (Tools::getValue('id_article')) {\r\n\t\t\t$this ->viewArticle();\r\n\t\t}\r\n\t\t//sinon j'affiche la liste des articles en fonction de la page lors de l'initContent\r\n\t\telse {\r\n\t\t\t$this ->viewListArticle();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b95dae60a9df00fc278aa2db42a566dd", "score": "0.5008025", "text": "function display_feedback_page()\r\n {\r\n \t$this->set_parameter('action', Request :: get('action'));\r\n $this->set_parameter(self::PROPERTY_CID, $this->cid);\r\n $this->set_parameter(self::PROPERTY_PID, $this->pid);\r\n $this->set_parameter(PortfolioManager::PARAM_PORTFOLIO_OWNER_ID, Request :: get(PortfolioManager::PARAM_PORTFOLIO_OWNER_ID));\r\n\r\n $my_right = \"nothing\";\r\n\r\n if($this->feedback_viewing_right)\r\n {\r\n $my_right = \"view\";\r\n }\r\n else\r\n {\r\n $html[] = '<br /><div id=\"no_rights\">';\r\n $html[] = Translation :: get('NoPermissionToViewFeedback');\r\n $html[] = '</div><br />';\r\n }\r\n if(!isset($this->feedback_giving_right) || $this->feedback_giving_right)\r\n {\r\n if($my_right == \"view\")\r\n {\r\n $my_right = \"view_give\";\r\n }\r\n else\r\n {\r\n $my_right = \"give\";\r\n }\r\n\r\n }\r\n else\r\n {\r\n $html[] = '<div id=\"no_rights\">';\r\n $html[] = Translation :: get('NoPermissionToGiveFeedback');\r\n $html[] = '</div><br />';\r\n }\r\n\r\n if($html)\r\n {\r\n $this->specific_html = implode(\"\\n\", $html);\r\n }\r\n\r\n $feedback_manager;\r\n switch ($my_right)\r\n {\r\n case 'nothing':\r\n $feedback_manager = null;\r\n break;\r\n case 'view':\r\n if(($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_UPDATE_FEEDBACK) || ($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_DELETE_FEEDBACK))\r\n {\r\n $this->set_parameter(FeedbackManager::PARAM_ACTION, FeedbackManager::ACTION_BROWSE_ONLY_FEEDBACK) ;\r\n }\r\n $feedback_manager = new FeedbackManager($this, PortfolioManager::APPLICATION_NAME, $this->pid, $this->cid);\r\n break;\r\n case 'give':\r\n if(($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_UPDATE_FEEDBACK )|| ($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_DELETE_FEEDBACK))\r\n {\r\n $this->set_parameter(FeedbackManager::PARAM_ACTION, FeedbackManager::ACTION_CREATE_ONLY_FEEDBACK) ;\r\n }\r\n $feedback_manager = new FeedbackManager($this, PortfolioManager::APPLICATION_NAME, $this->pid, $this->cid);\r\n break;\r\n case 'view_give':\r\n if(($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_UPDATE_FEEDBACK) || ($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_DELETE_FEEDBACK))\r\n {\r\n $this->set_parameter(FeedbackManager::PARAM_ACTION, FeedbackManager::ACTION_BROWSE_FEEDBACK) ;\r\n }\r\n $feedback_manager = new FeedbackManager($this, PortfolioManager::APPLICATION_NAME, $this->pid, $this->cid);\r\n break;\r\n default:\r\n if(($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_UPDATE_FEEDBACK) || ($this->get_parameter(FeedbackManager::PARAM_ACTION) != FeedbackManager::ACTION_DELETE_FEEDBACK))\r\n {\r\n $this->set_parameter(FeedbackManager::PARAM_ACTION, FeedbackManager::ACTION_BROWSE_FEEDBACK) ;\r\n }\r\n $feedback_manager = new FeedbackManager($this, PortfolioManager::APPLICATION_NAME, $this->pid, $this->cid);\r\n break;\r\n }\r\n if($feedback_manager != null)\r\n {\r\n $feedback_manager->run();\r\n }\r\n\r\n\r\n }", "title": "" }, { "docid": "478bf8e023e7ffced95efe999e7be8db", "score": "0.50065297", "text": "FUNCTION display_photographs($type) {\n\n\tinclude(\"blog/connect.php\");\n\n\t?>\n\n\t<div class=\"flex\">\n\n\t<?php display_photoset($type); ?>\n\n\t<?php\n\t// Select statement to get all of the data on every photograph matching the category name that was passed in to the function as a parameter.\n\t// Photographs that have their 'display_hide' column set to 1 will not be displayed. \n\t// Photographs that belong to a photo set will be displayed by the above function call of display_photoset($type)\n\t$sql= \"SELECT id, title, name, filedate, display_hide, photoset_ID FROM photo WHERE category = '$type' AND display_hide = 0 AND photoset_ID IS NULL ORDER BY id\";\n\t$result = $dbcon->query($sql);\n\n\t// store all data on each photograph in variables that are easier to use\n\twhile($row = $result->fetch_assoc()) {\n\t$id = $row['id']; // the unique id / primary key for the photograph\n\t$title= $row['title']; // the title for each photograph\n\t$filename= $row['name']; // the file name for each photograph including the file extension\n\n\t?>\n\n\t<div class='column'>\n\t<a href=\"photo/<?php echo $filename; ?>\" target=\"_new\">\n\t<img src=\"photo/<?php echo $filename; ?>\" alt=\"<?php echo $filename; ?>\" width='100%' style='float:left'>\n\t</a>\n\t</div>\n\n\t<?php\n\t}\n\t?>\n\n\t</div>\n\n<?php\n}", "title": "" }, { "docid": "23f92200fa21fcadd13ce24b62630c25", "score": "0.50045145", "text": "protected function _prepareData() {\n\n \tif ($this->_folder == null) {\n return;\n }\n\n\t\t$this->_ls_description = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->description);\n $this->_ls_text = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->text);\n $this->_ls_passwordhint = new EventgalleryLibraryDatabaseLocalizablestring($this->_folder->passwordhint);\n\n /**\n * @var EventgalleryLibraryFactoryImagetypeset $imagetypesetFactory\n */\n $imagetypesetFactory = EventgalleryLibraryFactoryImagetypeset::getInstance();\n\n if ($this->_folder->imagetypesetid == null) {\n $this->_imagetypeset = $imagetypesetFactory->getDefaultImageTypeSet(true);\n } else {\n $this->_imagetypeset = $imagetypesetFactory->getImageTypeSet($this->_folder->imagetypesetid);\n if (!$this->_imagetypeset->isPublished()) {\n $this->_imagetypeset = $imagetypesetFactory->getDefaultImageTypeSet(true);\n }\n }\n }", "title": "" }, { "docid": "21bcbea84e9def5729811651c53cd200", "score": "0.5004096", "text": "public function init()\n {\n $beUser = $this->getBackendUser();\n // Setting more GPvars:\n $this->popViewId = GeneralUtility::_GP('popViewId');\n $this->popViewId_addParams = GeneralUtility::_GP('popViewId_addParams');\n $this->viewUrl = GeneralUtility::_GP('viewUrl');\n $this->recTitle = GeneralUtility::_GP('recTitle');\n $this->noView = GeneralUtility::_GP('noView');\n $this->perms_clause = $beUser->getPagePermsClause(Permission::PAGE_SHOW);\n // Set other internal variables:\n $this->R_URL_getvars['returnUrl'] = $this->retUrl;\n $this->R_URI = $this->R_URL_parts['path'] . '?' . ltrim(GeneralUtility::implodeArrayForUrl(\n '',\n $this->R_URL_getvars\n ), '&');\n // Setting virtual document name\n $this->MCONF['name'] = 'xMOD_alt_doc.php';\n\n // Create an instance of the document template object\n $this->doc = $GLOBALS['TBE_TEMPLATE'];\n $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);\n $pageRenderer->addInlineLanguageLabelFile('EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf');\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode(\n 'jumpToUrl',\n '\n\t\t\tfunction jumpToUrl(URL,formEl) {\n\t\t\t\tif (!TBE_EDITOR.isFormChanged()) {\n\t\t\t\t\twindow.location.href = URL;\n\t\t\t\t} else if (formEl && formEl.type==\"checkbox\") {\n\t\t\t\t\tformEl.checked = formEl.checked ? 0 : 1;\n\t\t\t\t}\n\t\t\t}\n'\n );\n $t3Configuration = [];\n\n $javascript = '\n\t\t\tTYPO3.configuration = ' . json_encode($t3Configuration) . ';\n\t\t\t// Object: TS:\n\t\t\t// TS object overwrites the object declared in tbe_editor.js\n\t\t\tfunction typoSetup() {\t//\n\t\t\t\tthis.uniqueID = \"\";\n\t\t\t}\n\t\t\tvar TS = new typoSetup();\n\n\t\t\t\t// Info view:\n\t\t\tfunction launchView(table,uid) {\t//\n\t\t\t\tvar thePreviewWindow = window.open(\n\t\t\t\t\t' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('show_item') . '&table=') . ' + encodeURIComponent(table) + \"&uid=\" + encodeURIComponent(uid),\n\t\t\t\t\t\"ShowItem\" + TS.uniqueID,\n\t\t\t\t\t\"height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0\"\n\t\t\t\t);\n\t\t\t\tif (thePreviewWindow && thePreviewWindow.focus) {\n\t\t\t\t\tthePreviewWindow.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction deleteRecord(table,id,url) {\t//\n\t\t\t\twindow.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[') . '+table+\"][\"+id+\"][delete]=1&redirect=\"+escape(url)+\"&prErr=1&uPT=1\";\n\t\t\t}\n\t\t';\n\n $previewCode = isset($_POST['_savedokview']) && $this->popViewId ? $this->generatePreviewCode() : '';\n $this->moduleTemplate->addJavaScriptCode(\n 'PreviewCode',\n $javascript . $previewCode\n );\n // Setting up the context sensitive menu:\n $this->moduleTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');\n\n $this->emitFunctionAfterSignal(__FUNCTION__);\n }", "title": "" }, { "docid": "304f00df392e92cb02627ffc9a22a32f", "score": "0.5002673", "text": "public function process()\n\t{\n\t\t$this->template()->assign(array(\n\t\t\t\t'aLists' => Phpfox::getService('friend.list')->get(),\n\t\t\t\t'bNoCustomDiv' => (bool) $this->getParam('bNoCustomDiv', false),\n\t\t\t\t'iNewListId' => (int) $this->getParam('list_id'),\n\t\t\t\t'sCustomPrivacyId' => $this->request()->get('custom-id'),\n\t\t\t\t'sPrivacyArray' => $this->request()->get('privacy-array')\n\t\t\t)\n\t\t);\t\n\t}", "title": "" }, { "docid": "198e9883f4e74d44bc42d71a12c0dcd8", "score": "0.5001225", "text": "function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t\n\n$att = $xt->fetchVar(\"Approved_editcontrol\");\n$att = str_replace(\">\",\" DISABLED=DISABLED>\",$att);\n$xt->assign(\"Approved_editcontrol\",$att);\n\n\n$attz = $xt->fetchVar(\"Approvedby_editcontrol\");\n$attz = str_replace(\">\",\" DISABLED=DISABLED>\",$attz);\n$xt->assign(\"Approvedby_editcontrol\",$attz);\n\n$at1 = $xt->fetchVar(\"EmployeeID_editcontrol\");\n$at1 = str_replace(\">\",\" DISABLED=DISABLED>\",$at1);\n$xt->assign(\"EmployeeID_editcontrol\",$at1);\n\n\n$at3 = $xt->fetchVar(\"Locked_editcontrol\");\n$at3 = str_replace(\">\",\" DISABLED=DISABLED>\",$at3);\n$xt->assign(\"Locked_editcontrol\",$at3);\n\n$at4 = $xt->fetchVar(\"Posted_editcontrol\");\n$at4 = str_replace(\">\",\" DISABLED=DISABLED>\",$at4);\n$xt->assign(\"Posted_editcontrol\",$at4);\n\n\n $attr5 = $xt->fetchVar(\"Superior_editcontrol\");\n $attr5 = str_replace(\">\",\" READONLY=READONLY>\",$attr5);\n $xt->assign(\"Superior_editcontrol\",$attr5);\n\n\n $attr51 = $xt->fetchVar(\"Superior2_editcontrol\");\n $attr51 = str_replace(\">\",\" READONLY=READONLY>\",$attr51);\n $xt->assign(\"Superior2_editcontrol\",$attr51);\n\n\n\n $attr6 = $xt->fetchVar(\"ApprovedDate_editcontrol\");\n $attr6 = str_replace(\">\",\" READONLY=READONLY>\",$attr6);\n $xt->assign(\"ApprovedDate_editcontrol\",$attr6);\n\n\n $attr7 = $xt->fetchVar(\"ApprovedTime_editcontrol\");\n $attr7 = str_replace(\">\",\" READONLY=READONLY>\",$attr7);\n $xt->assign(\"ApprovedTime_editcontrol\",$attr7);\n\n\n\n\n $att71 = $xt->fetchVar(\"2ndApproval_editcontrol\");\n $att71 = str_replace(\">\",\" READONLY=READONLY>\",$att71);\n $xt->assign(\"2ndApproval_editcontrol\",$att71);\n\n\n\n\n\n\n\n\n\n;\t\t\n}", "title": "" }, { "docid": "92d7dc4d4a1d1febc46ef693f0199db1", "score": "0.49963218", "text": "protected function AssignPageTypeFields() {\n//incemail tinyint\n $this->AddField('contactname', self::DT_STRING, 'Name');\n $this->AddField('contactemail', self::DT_STRING, 'E-mail Address');\n $this->AddField('contactsubject', self::DT_STRING, 'Subject');\n $this->AddField('contactmessage', self::DT_STRING, 'Message');\n// $this->AddField('inccontactinsidearea', DT_BOOLEAN);\n $this->AddField('inccontactname', self::DT_BOOLEAN);\n $this->AddField('incaddress', self::DT_BOOLEAN);\n $this->AddField('inctelephone', self::DT_BOOLEAN);\n $this->AddField('showmap', self::DT_BOOLEAN);\n $this->AddField('mapaddress', self::DT_STRING);\n }", "title": "" }, { "docid": "bfc5aba0f5795d41aca92e435d260262", "score": "0.49960747", "text": "function the_initial_react_data(){\n\t$filtered_posts = array();\n\twhile ( have_posts() ) {\n\t\tthe_post();\n\t\t$filtered_posts[] = require( get_template_directory() . '/server/template-parts/data/initial-post-load.php');\n\t}\n\n\t$return_data = array(\n\t\ttemplate => kraske_react_2016_get_template(),\n\t\t// Only need primary menu on intiial load since it won't change\n\t\t// from page to page\n\t\tprimary_menu => kraske_react_2016_get_primary_menu(),\n\t\tpost_nav => get_the_posts_navigation(),\n\t\tbody_class => kraske_react_2016_body_class_str(),\n\t\tposts => $filtered_posts,\n\t);\n\n\t$the_initial_data = json_encode($return_data);\n\tif ( ! $the_initial_data ){\n\t\treturn;\n\t}\n\n\t?>\n\t<script type=\"text/javascript\">\n\t\tvar initialReactData = <?php echo $the_initial_data ?>;\n\t</script>\n\t<?php\n}", "title": "" }, { "docid": "d6229f1aa59263cc352db11f846ee21b", "score": "0.49960697", "text": "public function prepareVars()\n { \n $this->page['userGroups'] = $this->user()->groups->lists('code');\n $this->page['user'] = $this->user();\n $this->page['canRegister'] = $this->canRegister();\n $this->page['loginAttribute'] = $this->loginAttribute();\n $this->page['loginAttributeLabel'] = $this->loginAttributeLabel();\n $this->page['sex'] = Sex::orderBy('name')->get();\n $this->page['locations'] = Location::get(); \n $this->page['countryCodes'] = CountryCode::orderBy('name', 'ASC')->get(); \n $this->page['countryCodeDefault'] = CountryCode::whereIsDefault(1)->first(); \n }", "title": "" }, { "docid": "8894234eaafb1c22cf77b44e0b932cea", "score": "0.4995078", "text": "function map_api_attachments( &$attachments ) {\n $attach_arr = [];\n if ( is_array( $attachments ) ) {\n foreach ($attachments as $attachment) {\n $data = json_decode_pof( $attachment['object'] );\n if ($attachment['type'] == 'files') {\n $data->icon = get_template_directory_uri() . '/assets/img/file_'.substr($data->url, -3).'.png';\n }\n $attach_arr[$attachment['type']][] = $data;\n }\n }\n $attachments = $attach_arr;\n}", "title": "" }, { "docid": "51a7738f699f817bb8122d477b34ccdc", "score": "0.49938053", "text": "public function preDisplay()\n {\n parent::preDisplay();\n if($this->request->getParameter(\"incompleteUser\")){\n $this->isIncomplete = true;\n $this->incompletePrefilledData = RegistrationFunctions::getPrefilledDataForUser($this->loginProfile,$this->getPageName());\n }\n }", "title": "" }, { "docid": "6a26d1a1fbf6adf1b543036c59b7c9e4", "score": "0.4988684", "text": "function SetUpDisplayRecs() {\n\t\t$sWrk = @$_GET[EW_TABLE_REC_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayRecs = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtolower($sWrk) == \"all\") { // Display all records\n\t\t\t\t\t$this->DisplayRecs = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayRecs = 50; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->setRecordsPerPage($this->DisplayRecs); // Save to Session\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "2de4943a84484cef0023db094d4eaa94", "score": "0.49849528", "text": "function template_view()\n{\n\tglobal $context, $txt, $settings, $ultimateportalSettings, $user_info;\n\n\t$content = \"\n\t <script type=\\\"text/javascript\\\">\n\t\t\tfunction makesurelink() {\n\t\t\t\tif (confirm('\".$txt['ultport_delete_confirmation'].\"')) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t </script>\";\n\n\tif (!empty($context['view_ipage']))\n\t{\n\t\tforeach ($context['ipage'] as $ipage)\n\t\t{\n\t\t\t$content .= '\n\t\t\t\t\t<div class=\"post-date\">\n\t\t\t\t\t\t<p class=\"day\">\n\t\t\t\t\t\t\t'. $ipage['day_created'] .'/'. $ipage['month_created'] .'/'. $ipage['year_created'] .'\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"post-info\">\n\t\t\t\t\t\t<p class=\"author alignleft\">\n\t\t\t\t\t\t\t'. $txt['up_ipage_member'] .' '. $ipage['profile'] .'\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"moderate alignright\">\n\n\t\t\t\t\t\t\t'. (($user_info['is_admin'] || $user_info['up-modules-permissions']['ipage_moderate']) ? $ipage['edit'] .' | '. $ipage['delete'] : '') .'\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ip-content\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<h2 class=\"titleipage\">\n\t\t\t\t\t\t\t\t'. $ipage['title'] .''. (!empty($ipage['sticky']) ? '&nbsp;&nbsp;<img alt=\"\" style=\"vertical-align:middle\" border=\"0\" src=\"'.$settings['default_images_url'].'/ultimate-portal/internal-page/sticky.gif\" />' : '') .'\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ip-body\">\n\t\t\t\t\t\t\t'. $ipage['parse_content'] .'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t'.($ipage['is_updated'] ? '\n\t\t\t\t\t\t\t<div class=\"ip-updateinfo\">\n\t\t\t\t\t\t\t\t<strong>'. $txt['up_ipage_date_updated'] .'</strong> '. $ipage['date_updated'] .'\n\t\t\t\t\t\t\t\t<strong>'. $txt['up_ipage_member_updated'] .'</strong> '. $ipage['profile_updated'] .'\n\t\t\t\t\t\t\t</div>' : '').'\n\t\t\t\t\t\t\t<div class=\"ip-share\">\n\t\t\t\t\t\t\t\t<strong>'. $txt['ultport_social_bookmarks_share'] .':</strong>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t'. (!empty($ultimateportalSettings['ipage_social_bookmarks']) ? $context['social_bookmarks'] : '') .'\n\n\t\t\t\t\t</div>\n\t\t\t\t\t';\n\t\t}\n\t}\n\n\t$copyright = '<div style=\"font-size: 0.8em;\"><a href=\"http://www.smfsimple.com\">Ultimate Portal - '. $txt['up_module_ipage_title'] .'</a>';\n\tup_print_page($context['column_left'], $context['column_right'], $content, $copyright, 'internal-page', $context['title']);\n}", "title": "" }, { "docid": "7b6c1a405c8e291be93c1d31992bbb56", "score": "0.4980894", "text": "function kloe_qodef_set_blog_holder_data_params(){\n\t\t\n\t\t$show_load_more = kloe_qodef_enable_load_more();\n\t\tif($show_load_more){\n\t\t\t$current_query = kloe_qodef_get_blog_query();\n\t\t\t\n\t\t\t$data_params = array();\n\t\t\t$data_return_string = '';\n\t\t\t\n\t\t\t$paged = kloe_qodef_paged();\n\t\t\t\n\t\t\t$posts_number = '';\n\t\t\tif(get_post_meta(get_the_ID(), \"qodef_show_posts_per_page_meta\", true) != \"\"){\n\t\t\t\t$posts_number = get_post_meta(get_the_ID(), \"qodef_show_posts_per_page_meta\", true);\n\t\t\t}else{\t\t\t\n\t\t\t\t$posts_number = get_option('posts_per_page');\n\t\t\t} \n\t\t\t$category = get_post_meta(kloe_qodef_get_page_id(), 'qodef_blog_category_meta', true);\n\t\t\t\n\t\t\t\n\t\t\t//set data params\n\t\t\t$data_params['data-next-page'] = $paged+1;\n\t\t\t$data_params['data-max-pages'] = $current_query->max_num_pages;\n\t\t\t\n\t\t\t\n\t\t\tif($posts_number !=''){\n\t\t\t\t$data_params['data-post-number'] = $posts_number;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif($category !=''){\n\t\t\t\t$data_params['data-category'] = $category;\n\t\t\t}\n\t\t\tif(is_archive()){\n\t\t\t\tif(is_category()){\n\t\t\t\t\t$cat_id = get_queried_object_id();\n\t\t\t\t\t$data_params['data-archive-category'] = $cat_id;\n\t\t\t\t}\n\t\t\t\tif(is_author()){\n\t\t\t\t\t$author_id = get_queried_object_id();\n\t\t\t\t\t$data_params['data-archive-author'] = $author_id;\n \t\t\t\t}\n\t\t\t\tif(is_tag()){\n\t\t\t\t\t$current_tag_id = get_queried_object_id();\n\t\t\t\t\t$data_params['data-archive-tag'] = $current_tag_id;\n\t\t\t\t}\n\t\t\t\tif(is_date()){\n\t\t\t\t\t$day = get_query_var('day');\n\t\t\t\t\t$month = get_query_var('monthnum');\n\t\t\t\t\t$year = get_query_var('year');\n\t\t\t\t\t\n\t\t\t\t\t$data_params['data-archive-day'] = $day;\n\t\t\t\t\t$data_params['data-archive-month'] = $month;\n\t\t\t\t\t$data_params['data-archive-year'] = $year;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tif(is_search()){\n\t\t\t\t$search_query = get_search_query();\n\t\t\t\t$data_params['data-archive-search-string'] = $search_query; // to do, not finished\n\t\t\t}\n\t\t\t\n\t\t\tforeach($data_params as $key => $value) {\n\t\t\t\tif($key !== '') {\n\t\t\t\t\t$data_return_string .= $key.'= '.esc_attr($value).' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $data_return_string;\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "d459c7267b685d6429ecbad61078e173", "score": "0.49764645", "text": "function SetUpDisplayRecs() {\n\t\t$sWrk = @$_GET[EW_TABLE_REC_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayRecs = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtolower($sWrk) == \"all\") { // Display all records\n\t\t\t\t\t$this->DisplayRecs = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayRecs = 10; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->setRecordsPerPage($this->DisplayRecs); // Save to Session\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" }, { "docid": "d459c7267b685d6429ecbad61078e173", "score": "0.49764645", "text": "function SetUpDisplayRecs() {\n\t\t$sWrk = @$_GET[EW_TABLE_REC_PER_PAGE];\n\t\tif ($sWrk <> \"\") {\n\t\t\tif (is_numeric($sWrk)) {\n\t\t\t\t$this->DisplayRecs = intval($sWrk);\n\t\t\t} else {\n\t\t\t\tif (strtolower($sWrk) == \"all\") { // Display all records\n\t\t\t\t\t$this->DisplayRecs = -1;\n\t\t\t\t} else {\n\t\t\t\t\t$this->DisplayRecs = 10; // Non-numeric, load default\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->setRecordsPerPage($this->DisplayRecs); // Save to Session\n\n\t\t\t// Reset start position\n\t\t\t$this->StartRec = 1;\n\t\t\t$this->setStartRecordNumber($this->StartRec);\n\t\t}\n\t}", "title": "" } ]
ca803cbddb2d6141bf95c9dc2f94bf93
Testing validateStock on newer shop version
[ { "docid": "66d0ada146c37fca49b51f9253f847aa", "score": "0.8114148", "text": "public function test_validateStock_NewerShopVersion() \n {\n $this->wrapExpectException('oxOutOfStockException');\n $oMockConfig = $this->getMock('oxConfig', array('getConfigParam'));\n $oMockConfig->expects($this->any())->method('getConfigParam')->will($this->returnValue(true));\n\n $oMockProduct = $this->getMock('oxArticle', array('getId', 'checkForStock'));\n $oMockProduct->expects($this->any())->method('getId')->will($this->returnValue('someId'));\n $oMockProduct->expects($this->any())->method('checkForStock')->will($this->returnValue(false));\n $oMockProduct->oxarticles__oxartnum = new oxField('someArtNum');\n\n $oMockBasketItem = $this->getMock('oxBasketItem', array('getArticle'));\n $oMockBasketItem->expects($this->any())->method('getArticle')->will($this->returnValue($oMockProduct));\n $aContents[] = $oMockBasketItem;\n $oMockBasket = $this->getMock('oxBasket', array('getContents', 'removeItem', 'getArtStockInBasket'));\n $oMockBasket->expects($this->any())->method('getContents')->will($this->returnValue($aContents));\n $oMockBasket->expects($this->any())->method('removeItem')->will($this->returnValue(true));\n $oMockBasket->expects($this->any())->method('getArtStockInBasket')->will($this->returnValue(2));\n\n $oTestObject = $this->getMock('fcPayOneOrder', array('_isRedirectAfterSave', '_fcGetCurrentVersion', 'fcGetArtStockInBasket'));\n $oTestObject->expects($this->any())->method('_isRedirectAfterSave')->will($this->returnValue(false));\n $oTestObject->expects($this->any())->method('_fcGetCurrentVersion')->will($this->returnValue(4800));\n $oTestObject->expects($this->any())->method('fcGetArtStockInBasket')->will($this->returnValue(2));\n\n $this->assertEquals(null, $oTestObject->validateStock($oMockBasket));\n }", "title": "" } ]
[ { "docid": "6a744786e55310fff39946c3ff0e4f3c", "score": "0.80824304", "text": "public function test_validateStock_OldShopVersion() \n {\n $this->wrapExpectException('oxOutOfStockException');\n $oMockConfig = $this->getMock('oxConfig', array('getConfigParam'));\n $oMockConfig->expects($this->any())->method('getConfigParam')->will($this->returnValue(true));\n\n $oMockProduct = $this->getMock('oxArticle', array('getId', 'checkForStock'));\n $oMockProduct->expects($this->any())->method('getId')->will($this->returnValue('someId'));\n $oMockProduct->expects($this->any())->method('checkForStock')->will($this->returnValue(false));\n $oMockProduct->oxarticles__oxartnum = new oxField('someArtNum');\n\n $oMockBasketItem = $this->getMock('oxBasketItem', array('getArticle'));\n $oMockBasketItem->expects($this->any())->method('getArticle')->will($this->returnValue($oMockProduct));\n $aContents[] = $oMockBasketItem;\n $oMockBasket = $this->getMock('oxBasket', array('getContents', 'removeItem', 'getArtStockInBasket'));\n $oMockBasket->expects($this->any())->method('getContents')->will($this->returnValue($aContents));\n $oMockBasket->expects($this->any())->method('removeItem')->will($this->returnValue(true));\n $oMockBasket->expects($this->any())->method('getArtStockInBasket')->will($this->returnValue(2));\n\n $oTestObject = $this->getMock('fcPayOneOrder', array('_isRedirectAfterSave', '_fcGetCurrentVersion', 'fcGetArtStockInBasket'));\n $oTestObject->expects($this->any())->method('_isRedirectAfterSave')->will($this->returnValue(false));\n $oTestObject->expects($this->any())->method('_fcGetCurrentVersion')->will($this->returnValue(4200));\n $oTestObject->expects($this->any())->method('fcGetArtStockInBasket')->will($this->returnValue(2));\n\n $this->assertEquals(null, $oTestObject->validateStock($oMockBasket));\n }", "title": "" }, { "docid": "498cb22576fa5446100a2fb74c559121", "score": "0.7271089", "text": "public function testValidateOutOfStock()\n {\n $this->createInitialStub(0);\n $this->stockRegistryMock->expects($this->at(0))\n ->method('getStockItem')\n ->willReturn($this->stockItemMock);\n\n $this->stockRegistryMock->expects($this->atLeastOnce())\n ->method('getStockStatus')\n ->willReturn($this->stockStatusMock);\n\n $this->stockStatusMock\n ->method('getStockStatus')\n ->willReturn(0);\n\n $this->quoteItemMock->expects($this->once())\n ->method('addErrorInfo')\n ->with(\n 'cataloginventory',\n Data::ERROR_QTY,\n __('This product is out of stock.')\n );\n $this->quoteMock->expects($this->once())\n ->method('addErrorInfo')\n ->with(\n 'stock',\n 'cataloginventory',\n Data::ERROR_QTY,\n __('Some of the products are out of stock.')\n );\n $this->quantityValidator->validate($this->observerMock);\n }", "title": "" }, { "docid": "b25d8c5d8dbb921414698a96168dde63", "score": "0.7118919", "text": "public function testValidateInStock()\n {\n $this->createInitialStub(1);\n $this->stockRegistryMock->expects($this->at(0))\n ->method('getStockItem')\n ->willReturn($this->stockItemMock);\n\n $this->stockRegistryMock->expects($this->at(1))\n ->method('getStockStatus')\n ->willReturn($this->stockStatusMock);\n\n $this->quoteItemMock->expects($this->any())\n ->method('getParentItem')\n ->willReturn($this->parentItemMock);\n\n $this->stockRegistryMock->expects($this->at(2))\n ->method('getStockStatus')\n ->willReturn($this->parentStockItemMock);\n\n $this->parentStockItemMock->expects($this->once())\n ->method('getStockStatus')\n ->willReturn(false);\n\n $this->stockStatusMock->expects($this->atLeastOnce())\n ->method('getStockStatus')\n ->willReturn(true);\n\n $this->quoteItemMock->expects($this->once())\n ->method('addErrorInfo')\n ->with(\n 'cataloginventory',\n Data::ERROR_QTY,\n __('This product is out of stock.')\n );\n $this->quoteMock->expects($this->once())\n ->method('addErrorInfo')\n ->with(\n 'stock',\n 'cataloginventory',\n Data::ERROR_QTY,\n __('Some of the products are out of stock.')\n );\n $this->quantityValidator->validate($this->observerMock);\n }", "title": "" }, { "docid": "e4a7453a50bca21e37098d898e347351", "score": "0.69655216", "text": "public function testCorrectIsStockSingle(){\n\t\t\t//ARRANGE\n\t\t\t$a= new APIManager();\n\t\t\t//ACT\t\t\t\n\t\t\t$b=$a->isStock($this->validStockList[0]);\n\t\t\t//ASSERT\t\t\t\n\t\t\t$this->assertEquals(True,$b);\n\t\t}", "title": "" }, { "docid": "92c591fb3937d6d8b4795777e8ca6611", "score": "0.6945865", "text": "public function testOutOfStockSuccess()\n\t{\n\t\t$url = 'https://www.jib.co.th/web/index.php/product/readProduct/51234/43/TABLET-APPlE-IPAD-MINI-WITH-RETINA-WIFI---4G-GRAY';\n\t\t$checker = new Checker($url);\n\t\t$result = $checker->getInStock();\n\n\t\t$this->assertFalse($result);\n\t}", "title": "" }, { "docid": "036e7b03daf67b0bae147d78c8b6d790", "score": "0.69272137", "text": "public function testIncorrectIsStockSingle(){\n\t\t\t//ARRANGE\n\t\t\t$a= new APIManager();\n\t\t\t//ACT\t\t\n\t\t\t$b=$a->isStock($this->invalidStockList[0]);\n\t\t\t//ASSERT\n\t\t\t$this->assertEquals(False,$b);\n\t\t}", "title": "" }, { "docid": "ace775dd2910a6270217b715c53d1311", "score": "0.6901649", "text": "public function testCheckoutEndpointValidationStockExpected()\n {\n $product = Product::find(1);\n\n $data = [\n 'product_id' => $product->getKey(),\n 'qty' => 1000,\n ];\n\n $this->postJson($this->endpointCheckout, $data)\n ->assertStatus(422)\n ->assertJsonValidationErrors(['qty']);\n }", "title": "" }, { "docid": "c5f57a28c31888d4cce85cbb38a99f15", "score": "0.6753047", "text": "public function testPaymentEndpointValidationStockExpected()\n {\n $product = Product::find(1);\n\n $data['products'][] = [\n 'id' => $product->getKey(),\n 'qty' => 10,\n ];\n\n $this->postJson($this->endpointPayment, $data)\n ->assertStatus(200);\n }", "title": "" }, { "docid": "f6e06a7cdb552fd75c1451391d4bf85f", "score": "0.67411596", "text": "public function testCorrectIsStockMultiple(){\n\t\t\t//ARRANGE\n\t\t\t$a= new APIManager();\n\t\t\tfor($x=0; $x<count($this->validStockList); $x++){\t\t\t\n\t\t\t\t//ACT\n\t\t\t\t$b=$a->isStock($this->validStockList[$x]);\n\t\t\t\t//ASSERT\n\t\t\t\t$this->assertEquals(True,$b);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "13f9356341280a70fb7a038b66f1f125", "score": "0.6623579", "text": "public function testInStockSuccess()\n\t{\n\t\t$url = 'https://www.jib.co.th/web/index.php/product/readProduct/20472/2/DESKTOP-PC-ACER-PREDATOR-G3-710-648G1T00MGI';\n\t\t$checker = new Checker($url);\n\t\t$result = $checker->getInStock();\n\n\t\t$this->assertTrue($result);\n\t}", "title": "" }, { "docid": "c4acc9abc4a3d31c85976d32b7d1d70d", "score": "0.6517219", "text": "public function testIncorrectIsStockMultiple(){\n\t\t\t//ARRANGE\n\t\t\t$a= new APIManager();\n\t\t\tfor($x=0; $x<count($this->invalidStockList); $x++){\t\t\t\t\n\t\t\t\t//ACT\n\t\t\t\t$b=$a->isStock($this->invalidStockList[$x]);\n\t\t\t\t//ASSERT\n\t\t\t\t$this->assertEquals(False,$b);\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0bda5f18262299901d35127576b1d28a", "score": "0.6432789", "text": "public function testApiLessSoldFormat() {\n $response = $this->call(\"GET\", \"api/v1/less-products-sold\", [\"date\" => \"1977-10-01\", \"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n // If the API returns data validate complete structure\n if (count($response->json()) > 0) {\n $response->assertJsonStructure([\n [\n 'id',\n 'name',\n 'quantity'\n ]\n ]);\n } else {\n // If the API not returns data validate empty structure.\n $this->assertJsonStructure([]);\n }\n }", "title": "" }, { "docid": "fc78f536dc7871642c14ebb62f73322a", "score": "0.64039284", "text": "function verify_stock($amount,$cart=FALSE) { \n $bad_items = array();\n $bad_options = array();\n \n if ($cart) {\n $this->SC->load_library('Cart');\n $cart = $this->SC->Cart->explode_cart($cart);\n \n foreach ($cart as $key => $item) {\n $item_stock = $this->get_item_stock($item['id']);\n \n if (is_numeric($item_stock) && $item_stock < $amount) {\n $bad_items[] = $item['id'];\n } \n \n foreach ($item['options'] as $opt_key => $option) {\n $option_stock = $this->get_option_stock($option['id']);\n \n if (is_numeric($option_stock) && $option_stock < $amount) {\n $bad_options = $option['id'];\n }\n }\n\n } \n \n } else {\n $this->SC->load_library('Items');\n $items = $this->SC->Items->get_all_items();\n \n foreach ($items as $item) {\n if (is_numeric($item['stock']) && $item['stock'] < $amount) {\n $bad_items[] = $item['id'];\n }\n \n foreach ($item['options'] as $option) {\n if (is_numeric($option['stock']) && $option['stock'] < $amount) {\n $bad_options[] = $option['id'];\n }\n }\n } \n }\n \n if ($bad_items && $bad_options) {\n return array($bad_items,$bad_options);\n } else {\n return false;\n }\n \n \n \n }", "title": "" }, { "docid": "ee876028992fdddf9d15a72ee8ab68dd", "score": "0.64035237", "text": "public function testStockTick()\n {\n }", "title": "" }, { "docid": "0bc18114941f5aa43705e611877e0bf1", "score": "0.6343289", "text": "function CheckVersionNumber($stockRec)\n\t\t{\n\t\t}", "title": "" }, { "docid": "c27cbf4f2f0971775fe7391468ca8b47", "score": "0.63410044", "text": "public function testPaymentEndpointValidationStockUnexpected()\n {\n $product = Product::find(1);\n\n $data['products'][] = [\n 'id' => $product->getKey(),\n 'qty' => 1000,\n ];\n\n $this->postJson($this->endpointPayment, $data)\n ->assertStatus(422)\n ->assertJsonValidationErrors(['products.0.qty']);\n }", "title": "" }, { "docid": "3181b06c976e3ac748b30beab83ab577", "score": "0.63320786", "text": "public function testStockSymbols()\n {\n }", "title": "" }, { "docid": "c3de4cdedb6eb283547f21a26a1a975b", "score": "0.630173", "text": "public function testStockDividends()\n {\n }", "title": "" }, { "docid": "94dfe90d914d15ae50927e2f3815f79d", "score": "0.6185115", "text": "protected function validarStock(){\n return 'required|int';\n }", "title": "" }, { "docid": "b7c83035f7a5605889f8326d7b546689", "score": "0.6182005", "text": "public function testStockBidask()\n {\n }", "title": "" }, { "docid": "beefdc411564ca8581cb5bc23802a8eb", "score": "0.6137689", "text": "public function testCreateStock(){\n $this->json(\"POST\", 'api/stock',['product_name'=>\"GSM antenna\",'selling_price'=>200.45,'reorder_level'=>3,'barcode'=>'123457890'])\n ->seeJson(['successful'=>true]);\n\n }", "title": "" }, { "docid": "1d8cd3859530906ff0ddbc0623d32ea7", "score": "0.60729617", "text": "public function test_validateStock_ExceptionInput() \n {\n $this->wrapExpectException('oxArticleInputException');\n $oMockConfig = $this->getMock('oxConfig', array('getConfigParam'));\n $oMockConfig->expects($this->any())->method('getConfigParam')->will($this->returnValue(true));\n\n $oMockProduct = $this->getMock('oxArticle', array('getId', 'checkForStock'));\n $oMockProduct->expects($this->any())->method('getId')->will($this->returnValue('someId'));\n $oMockProduct->expects($this->any())->method('checkForStock')->will($this->returnValue(false));\n $oMockProduct->oxarticles__oxartnum = new oxField('someArtNum');\n\n $oMockException = new oxArticleInputException;\n\n $oMockBasketItem = $this->getMock('oxBasketItem', array('getArticle'));\n $oMockBasketItem->expects($this->any())->method('getArticle')->will($this->throwException($oMockException));\n $aContents[] = $oMockBasketItem;\n $oMockBasket = $this->getMock('oxBasket', array('getContents', 'removeItem', 'getArtStockInBasket'));\n $oMockBasket->expects($this->any())->method('getContents')->will($this->returnValue($aContents));\n $oMockBasket->expects($this->any())->method('removeItem')->will($this->returnValue(true));\n $oMockBasket->expects($this->any())->method('getArtStockInBasket')->will($this->returnValue(2));\n\n $oTestObject = $this->getMock('fcPayOneOrder', array('_isRedirectAfterSave', '_fcGetCurrentVersion', 'fcGetArtStockInBasket'));\n $oTestObject->expects($this->any())->method('_isRedirectAfterSave')->will($this->returnValue(false));\n $oTestObject->expects($this->any())->method('_fcGetCurrentVersion')->will($this->returnValue(4800));\n $oTestObject->expects($this->any())->method('fcGetArtStockInBasket')->will($this->returnValue(2));\n\n $this->assertEquals($oMockException, $oTestObject->validateStock($oMockBasket));\n }", "title": "" }, { "docid": "84fbb13383d63fc046e7500f797d9546", "score": "0.60451835", "text": "public function testProductAPIProductsStocksV2()\n {\n\n }", "title": "" }, { "docid": "e43014c223777c211b7a031bd784b4b5", "score": "0.6040457", "text": "private function check(): void\n {\n if (! $shop = Shop::findById($this->shop_id)) {\n $this->errors[] = 'Магазин не зарегистрирован на нашем сервисе, обратитесь к администратору магазина.';\n\n return;\n }\n\n if (! $shop->getIsActivated()) {\n $this->errors[] = 'К сожалению, работа с магазином ' . $shop->getName() . ' временно не доступна.';\n\n return;\n }\n\n $signature = Request::createRequestSignature(\n $this->shop_id,\n $this->order_id,\n $this->order_price,\n $this->goods,\n $this->callback_url,\n $this->is_loan_postponed,\n $this->is_test_mode_enabled,\n $shop->getSecretKey()\n );\n\n // TODO remove it after update all shops.\n $is_old_integration = $shop->getIsOldIntegration();\n\n // TODO remove it after update all shops.\n if ($is_old_integration) {\n // @codeCoverageIgnoreStart\n $signature_old = Request::createOldRequestSignature(\n $this->shop_id,\n $this->order_id,\n $this->order_price,\n $this->callback_url,\n $this->is_loan_postponed,\n $this->goods,\n $this->is_test_mode_enabled,\n $shop->getSecretKey()\n );\n\n if ($this->signature !== $signature && $this->signature !== $signature_old) {\n $this->errors[] = 'Неверная подпись магазина.';\n\n return;\n }\n\n // TODO remove it after update all shops.\n if (Helper::isSerialized($this->goods)) {\n $this->goods = $this->oldGetSerializedGoods();\n }\n // @codeCoverageIgnoreEnd\n }\n\n // TODO refactor it after update all shops.\n if (! $is_old_integration) {\n if ($this->signature !== $signature) {\n $this->errors[] = 'Неверная подпись магазина.';\n\n return;\n }\n }\n\n $goods_array = json_decode($this->goods, true);\n\n if (! is_array($goods_array) || empty($goods_array)) {\n $this->errors[] = 'Массив товаров пустой или имеет неверный формат.';\n\n return;\n }\n\n $goods_total_price = 0;\n\n foreach ($goods_array as $item) {\n if (! is_array($item) || empty($item)) {\n $this->errors[] = 'Массив товара пустой или имеет неверный формат.';\n\n return;\n }\n\n if (! array_key_exists('name', $item) || empty($item['name'])) {\n $this->errors[] = 'Название товара — обязательный параметр.';\n\n return;\n }\n\n if (! array_key_exists('price', $item) || empty($item['price'])) {\n $this->errors[] = 'Стоимость товара — обязательный параметр.';\n\n return;\n }\n\n if (! array_key_exists('quantity', $item) || empty($item['quantity'])) {\n $this->errors[] = 'Количество — обязательный параметр.';\n\n return;\n }\n\n if (! array_key_exists('is_returnable', $item) || is_null($item['is_returnable'])) {\n $this->errors[] = 'Можно ли вернуть товар — обязательный параметр.';\n\n return;\n }\n\n for ($i = 0; $i < $item['quantity']; $i++) {\n $goods_total_price += $item['price'];\n }\n }\n\n if ($this->order_price > $goods_total_price) {\n $this->errors[] = 'Общая стоимость товаров меньше стоимости заказа.';\n\n return;\n }\n }", "title": "" }, { "docid": "850cd04a05364293de7398fd63293d08", "score": "0.60088235", "text": "public function testStockSplits()\n {\n }", "title": "" }, { "docid": "39614d10ff4f0c04c21f4ae9516c2bd7", "score": "0.6008041", "text": "protected function validStock( $html ) {\n\n $info_stock = Common::getElement( $html, $this->tags['stock_excluded'], 0, 'outertext' );\n\n if (strpos($info_stock, $this->stockInvalid ) !== false) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "28e36e5f0dfa97985ec863030497cb1b", "score": "0.59686226", "text": "public function checkStock($model, $version, $color, $type, $qty) {\n $checkQty = db::fetch_result(\"stock\", \"SELECT count(id) AS stock FROM `barcodes_barcodes` WHERE prod_code='ZS125-48A' AND Version='Standard' AND color='Black' AND cust_id ='' AND order_id='' AND (`condition`='' OR `condition`='0')\");\n \n if($qty != $checkQty) {\n return $checkQty;\n } else {\n return $qty;\n }\n }", "title": "" }, { "docid": "e02921a9ac5b2d37ea4d0e6cf4cc29af", "score": "0.59602976", "text": "public function testSuccessTransaction()\n {\n $product = $this->getAvailableProduct();\n $response = $this->post('/api/product/transaction',[\n 'name' => 'Rifki',\n 'products' => [\n [\n 'slug' => $product->slug,\n 'quantity' => 1\n ]\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->stockRecover([\n ['id' => $product->id, 'stock' => 1]\n ]);\n }", "title": "" }, { "docid": "b68a96b6a9ac4cfe54de3f4f24ce916f", "score": "0.5952149", "text": "public function testProductAPIImportProductsStocks2()\n {\n\n }", "title": "" }, { "docid": "7795d6a316b16eed9b857acff8d9c305", "score": "0.5842533", "text": "public function testProductAPIImportProductsStocks()\n {\n\n }", "title": "" }, { "docid": "2293963dfc418e5152476475cc3f6a13", "score": "0.58327687", "text": "public function testProductAPIGetProductInfoStocksV2()\n {\n\n }", "title": "" }, { "docid": "41dfe2bb5fe00a482ddd0db06fb4aa27", "score": "0.5828178", "text": "public function testProductAPIGetProductInfoStocks()\n {\n\n }", "title": "" }, { "docid": "80e918a8acb9f14ba264e358b08fa2ed", "score": "0.5827589", "text": "function updatePriceStock($import, $importDaten)\n{\n\tif(updateStock($import, $importDaten))\n\t{\n\t\t$state = $import->sArticlePrice(array('ordernumber' => $importDaten['Artikelnummer'], 'price' => $importDaten['price']));\n\t\t\n\t\tif($state > 0 && $state !== false)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "95069a5ae40669c564855a36c65fd0ef", "score": "0.58238673", "text": "public function testApiMostSoldFormat() {\n $response = $this->call(\"GET\", \"api/v1/most-products-sold\", [\"date\" => \"1977-10-01\", \"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n // If the API returns data validate complete structure\n if (count($response->json()) > 0) {\n $response->assertJsonStructure([\n [\n 'id',\n 'name',\n 'quantity'\n ]\n ]);\n } else {\n // If the API not returns data validate empty structure.\n $this->assertJsonStructure([]);\n }\n }", "title": "" }, { "docid": "8e41e3a1771f258dec88f2f8a734692b", "score": "0.58049875", "text": "public function testStockCandles()\n {\n }", "title": "" }, { "docid": "5d1e9044209651f24fb5d34acc742bfb", "score": "0.5779356", "text": "public function checkCartStock($final) { global $orders;\n $preoQty = 0;\n foreach($_SESSION['cart']['items'] as $key => $item) {\n if($item['type'] == \"P\") {\n $preoQty = $preoQty + 1;\n }\n }\n $userID = (isset($_SESSION['tempCustomer']['customerID']) ? $_SESSION['tempCustomer']['customerID'] : $_SESSION['cmd']['customerID']);\n \n\t\t\tforeach($final as $key => $items) {\n if($items['type'] == \"O\") {\n require_once('orders.class.php');\n \t\t\t\t$stockCheck = db::fetch_row(\"SELECT COUNT(id) AS stock, prod_code, version, color FROM `barcodes_barcodes` where cust_id='' AND order_id='' AND (`condition`='' OR `condition`=0) AND prod_code='{$items['model']}' AND version='{$items['version']}' AND color='{$items['color']}' GROUP BY prod_code, color, version\");\n \n $sorcheck = db::fetch_array(\"SELECT qty FROM `cart` WHERE model='{$items['model']}' AND version='{$items['version']}' AND color='{$items['color']}' AND type='SOR'\");\n $sorqty = 0;\n foreach($sorcheck AS $a=>$b) {\n $sorqty = $sorqty + $b['qty'];\n }\n \n if ($items['model'] == $stockCheck['prod_code'] && $items['version'] == $stockCheck['version'] && $items['color'] = $stockCheck['color']) {\n //$stockCheck['stock'] = $stockCheck['stock'] - $orders->getPreordersQuotesProcessing($items['model'], $items['version'], $items['color'], \"W\");\n $stockCheck['stock'] = $stockCheck['stock'] - $orders->getPreordersQuotesProcessing($items['model'], $items['version'], $items['color'], \"Q\");\n $stockCheck['newstock'] = $stockCheck['stock'] - $items['qty'] - $sorqty;\n \n if($stockCheck['newstock'] < \"0\") {\n $dif = $final[$key]['qty'] - $stockCheck['stock'];\n $final[$key]['qty'] = $final[$key]['qty'] - $dif;\n $final[$key]['qty'] = $final[$key]['qty'] - $sorqty;\n $final[$key]['qty_check'] = \"yes\"; \n }\n }\n } elseif($items['type'] == \"P\") {//Use if you want to check stock if the user updates the preorder qty in the cart to incoming shipments\n require_once('orders.class.php');\n \n /* START Get the sum of preorders a dealer currently has */\n $currentPreorders = db::fetch_result(\"current_preorders\", \"SELECT sum(l_qty_sent) as current_preorders FROM `order_history` WHERE h_cust_no='$userID' AND h_req_date ='' AND h_type = 'P'\");\n \n $preorders = PREORDER_LIMIT - $preoQty - $currentPreorders;\n $allowedPreorders = PREORDER_LIMIT - $currentPreorders;\n /* END Get the sum of preorders a dealer currently has */\n \n /* This can be used to limit the amount a dealer can preorder by the number of bikes we have coming on containers. Does not stop monopolisation of stock*/\n $preorderQty = $orders->getBikePreorderQty($items['model'],$items['version'],$items['color']);//Get count of bikes coming in on shipment\n $curPreorders = $orders->getPreordersQuotesProcessing($items['model'],$items['version'],$items['color'], \"P\");//Get current count of preorders for the bike\n \n $preorderQty = $preorderQty - $curPreorders;//minus current preoders\n $preorderQty1 = $preorderQty - $curPreorders;//used as current preorder limit\n \n $preorderQty = $preorderQty - $items['qty'];//minus off the qty they want\n \n if($preorderQty < \"0\") {//If they want more then we have avaliable limit them to that\n $final[$key]['qty'] = $preorderQty1;\n $final[$key]['p_qty_check'] = \"yes\"; \n }\n \n if($final[$key]['qty'] > $allowedPreorders) {//If the qty they want is greater then the limit they are allowed put it to there limit\n $final[$key]['qty'] = $allowedPreorders;\n $final[$key]['p_qty_check'] = \"yes\"; \n }\n \n } elseif($items['type'] == \"SOR\") {\n /* START Get the sum of SORS a dealer currently has */\n $currentsors = db::fetch_result(\"current_sor\", \"SELECT count(id) AS current_sor FROM `order_history` WHERE sor_confirm = '1' AND h_cust_no ='$userID' AND h_order_date BETWEEN NOW() - INTERVAL 90 DAY AND NOW()\");\n \n $sorlimit = db::fetch_result(\"sor_limit\", \"SELECT sor_limit FROM `dealers_login` WHERE customerID ='$userID'\");\n \n $sorcount = 0;\n foreach($_SESSION['cart']['items'] as $k => $i) {\n if($i['type'] == \"SOR\") {\n $sorcount = $sorcount + 1;\n }\n }\n \n $sors = ($sorlimit - $sorcount) - $currentsors;\n $allowedSORs = $sorlimit - $currentsors;\n \n if($sors < 0) {\n $final[$key]['qty'] = 1;\n $final[$key]['sor_qty_check'] = \"yes\"; \n }\n /* END Get the sum of SORS a dealer currently has */\n }\n\t\t\t}\n \n foreach($final as $i) {\n\t\t\t\tfor($x=0; $x<$i['qty']; $x++) {\n\t\t\t\t\t$myNewItems[] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'model' => $i['model'],\n\t\t\t\t\t\t\t\t\t\t\t\t \t'version' => $i['version'],\n\t\t\t\t\t\t\t\t\t\t\t\t \t'color' => $i['color'],\n 'type' => $i['type'],\n 'order_no' => $i['order_no'],\n 'qty' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t );\t\n\t\t\t\t}\n\t\t\t}\n //echo\"<pre>\".print_r($myNewItems, true).\"</pre>\";\n //echo\"<pre>\".print_r($_SESSION['cart']['items'], true).\"</pre>\";die();\n if(count($_SESSION['cart']['items']) != count($myNewItems)) {\n unset($_SESSION['cart']['items']);\n $_SESSION['cart']['items'] = $myNewItems;\n $this->UpdateDBCart();\n }\n \n unset($_SESSION['cart']['items']);\n $_SESSION['cart']['items'] = $myNewItems;\n \n return $final;\n\t\t}", "title": "" }, { "docid": "61859713c39c2599d5a0d0f2753e3849", "score": "0.5772554", "text": "public function testAddToBasketOutOfStock()\n {\n $oBasket = new oxbasket();\n try {\n $oBasket->addToBasket( $this->oArticle->getId(), 666 );\n } catch ( oxOutOfStockException $oExcp ) {\n return;\n }\n $this->fail( 'failed testing addToBasket' );\n }", "title": "" }, { "docid": "74cc7d0dc341191d3d3e78c7768d90fd", "score": "0.5768126", "text": "public function inStock()\n {\n\n }", "title": "" }, { "docid": "779e914b0810f64f2ec4309ffc24279f", "score": "0.57660335", "text": "public function testSubmitWithItemOutOfStock()\n {\n $this->makeProductOutOfStock('simple');\n $quote = $this->getQuote('test01');\n $this->cartManagement->placeOrder($quote->getId());\n }", "title": "" }, { "docid": "f8179d7075dc5809fab2ebe6b2b5f3a9", "score": "0.5736482", "text": "private function checkForQuantities($product, &$quantity=0) {\n\n\t\t$dispatcher = JDispatcher::getInstance();\n\t\tVmConfig::importVMPlugins('vmcustom');\n\t\t// return null to proceed with further VM rules\n\t\t// return true to not validate the quantity with OPC or VM\n\t\t// return false to return errorMsg\n\t\t//if to allow to adjust the current quantity\n\t\t$adjustQ = false; \n\t\t$errorMsg = ''; \n\t\t$retValues = $dispatcher->trigger('plgVmOnCheckoutCheckStock', array( &$this, &$product, &$quantity, &$errorMsg, &$adjustQ));\n\t\t\n\t\tforeach ($retValues as $v) {\n\t\t\tif ($v === false) {\n\t\t\t\tvmInfo($errorMsg,$product->product_name);\n\t\t\t\treturn false; \n\t\t\t}\n\t\t\tif ($v === true) {\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}\n\t\n\t\t$stockhandle = VmConfig::get('stockhandle_products', false) && $product->product_stockhandle ? $product->product_stockhandle : VmConfig::get('stockhandle','none');\n\t\t$mainframe = JFactory::getApplication();\n\t\t// Check for a valid quantity\n\t\tif (!is_numeric( $quantity)) {\n\t\t\t$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_ERROR_NO_VALID_QUANTITY', $product->product_name);\n\t\t\tvmWarn($product->errorMsg);\n\t\t\treturn false;\n\t\t}\n\t\t// Check for negative quantity\n\t\tif ($quantity < 1) {\n\t\t\t$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_ERROR_NO_VALID_QUANTITY', $product->product_name);\n\t\t\tvmWarn($product->errorMsg);\n\t\t\treturn false;\n\t\t}\n\n\t\t$checkForDisable = false;\n\t\tif ($stockhandle!='none' && $stockhandle!='risetime') {\n\t\t\t$checkForDisable = true;\n\t\t}\n\n\t\t// Check for the minimum and maximum quantities\n\t\t$min = (int)$product->min_order_level;\n\t\tif ($min != 0 && $quantity < $min){\n\t\t\t$quantity = $min;\n\t\t\t$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_MIN_ORDER', $min, $product->product_name);\n\t\t\tvmWarn($product->errorMsg);\n\t\t\tif (!$checkForDisable) return false;\n\t\t}\n\n\t\t\n\n\t\t$step = $product->step_order_level;\n\t\t\n\t\t$max = (int)$product->max_order_level;\n\t\t\n\t\t\n\t\t\n\t\tif ($step != 0 && ($quantity%$step)!= 0) {\n\t\t\t/* \n\t\t\t\tstAn - with step quantity we have these options: \n\t\t\t\t- we raise it by default to next step\n\t\t\t\t- the next step may not be valid against max_order_level (set quantity=0)\n\t\t\t\t- so we lower it to previous step\n\t\t\t\t- which may not be valid against min_order_level (set quantity=0)\n\t\t\t\t- or previous step is smaller than 0 (set quantity=0)\n\t\t\t\t\n\t\t\t\tstAn get next value - example:\n\t\t\t\tq=500, step=3 => 500 - (2) + 3 = 501 \n\t\t\t*/\n\t\t\t\n\t\t\t$quantity = $quantity - ($quantity%$step) + $step;\n\t\t\tif ((!empty($product->max_order_level)) && ($quantity > (int)$product->max_order_level)) {\n\t\t\t\t//get previous step quantity and have it validated by next section: \n\t\t\t\t$quantity = $quantity - $step; \n\t\t\t\tif ($quantity < 0) $quantity = 0; \n\t\t\t\tif ($quantity < (int)$product->min_order_level) {\n\t\t\t\t\t$quantity = 0; \n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_STEP_ORDER', $step);\n\t\t\tvmWarn($product->errorMsg);\n\t\t\tif (!$checkForDisable) return false;\n\t\t\t\n\t\t\t/*stAn, next step is larger than max_order_level and previous step is smaller then zero OR smaller then min_order_level*/\n\t\t\tif (empty($quantity)) {\n\t\t\t\treturn false; //stAn - can we really return false for invalid value ?\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif ($max != 0 && $quantity > $max) {\n\t\t\t$quantity = $max;\n\t\t\t$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_MAX_ORDER', $max, $product->product_name);\n\t\t\tvmWarn($product->errorMsg);\n\t\t\tif (!$checkForDisable) return false;\n\t\t}\n\n\t\t// Check to see if checking stock quantity\n\t\tif ($checkForDisable) {\n\t\t\t$productsleft = $product->product_in_stock - $product->product_ordered;\n\n\t\t\tif ($quantity > $productsleft ){\n\t\t\t\tvmdebug('my products left '.$productsleft.' and my quantity '.$quantity);\n\t\t\t\tif($productsleft>=$min ){\n\t\t\t\t\t$quantity = $productsleft;\n\t\t\t\t\t$product->errorMsg = vmText::sprintf('COM_VIRTUEMART_CART_PRODUCT_OUT_OF_QUANTITY',$product->product_name,$quantity);\n\t\t\t\t\tvmWarn($product->errorMsg);\n\t\t\t\t} else {\n\t\t\t\t\t$quantity = 0;\n\t\t\t\t\t$product->errorMsg = vmText::_('COM_VIRTUEMART_CART_PRODUCT_OUT_OF_STOCK');\n\t\t\t\t\tvmWarn($product->errorMsg);\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}", "title": "" }, { "docid": "941e512456cf1a3813c75b24034d0169", "score": "0.5733049", "text": "public function testPriceValidation()\n {\n $this->json('POST', '/search', ['price' => ['from'=>100]])\n ->seeJson([\n 'success' => false,\n ]);\n }", "title": "" }, { "docid": "b6baf6bfdba02c074c5526c0376860b0", "score": "0.5719442", "text": "public function test_validateStock_ExceptionNoArticle() \n {\n $this->wrapExpectException('oxNoArticleException');\n $oMockConfig = $this->getMock('oxConfig', array('getConfigParam'));\n $oMockConfig->expects($this->any())->method('getConfigParam')->will($this->returnValue(true));\n\n $oMockProduct = $this->getMock('oxArticle', array('getId', 'checkForStock'));\n $oMockProduct->expects($this->any())->method('getId')->will($this->returnValue('someId'));\n $oMockProduct->expects($this->any())->method('checkForStock')->will($this->returnValue(false));\n $oMockProduct->oxarticles__oxartnum = new oxField('someArtNum');\n\n $oMockException = new oxNoArticleException;\n\n $oMockBasketItem = $this->getMock('oxBasketItem', array('getArticle'));\n $oMockBasketItem->expects($this->any())->method('getArticle')->will($this->throwException($oMockException));\n $aContents[] = $oMockBasketItem;\n $oMockBasket = $this->getMock('oxBasket', array('getContents', 'removeItem', 'getArtStockInBasket'));\n $oMockBasket->expects($this->any())->method('getContents')->will($this->returnValue($aContents));\n $oMockBasket->expects($this->any())->method('removeItem')->will($this->returnValue(true));\n $oMockBasket->expects($this->any())->method('getArtStockInBasket')->will($this->returnValue(2));\n\n $oTestObject = $this->getMock('fcPayOneOrder', array('_isRedirectAfterSave', '_fcGetCurrentVersion', 'fcGetArtStockInBasket'));\n $oTestObject->expects($this->any())->method('_isRedirectAfterSave')->will($this->returnValue(false));\n $oTestObject->expects($this->any())->method('_fcGetCurrentVersion')->will($this->returnValue(4800));\n $oTestObject->expects($this->any())->method('fcGetArtStockInBasket')->will($this->returnValue(2));\n\n $this->assertEquals($oMockException, $oTestObject->validateStock($oMockBasket));\n }", "title": "" }, { "docid": "a0152c7401aeac0ca0764127f4b8b58d", "score": "0.57078177", "text": "public function testPOSTPricesHistory()\n {\n }", "title": "" }, { "docid": "c1670e47c7ac029167775a28bc926327", "score": "0.57043314", "text": "public function testMultipleStockInfo(){\n\t\t\t//ARRANGE\n\t\t\t$a= new APIManager();\n\t\t\tfor ($x=0; $x<count($this->correctTickerNames);$x++){\n\t\t\t\t$name=$this->correctTickerNames[$x];\n\t\t\t\t//ACT\t\t\t\t\n\t\t\t\t$b= $a->getStockInfo($name);\n\t\t\t\t//ASSERT\t\t\t\t\n\t\t\t\t$this->assertEquals($this->correctTickerNames[$x],$b[\"symbol\"]);\n\t\t\t\t$this->assertEquals($this->correctMarketNames[$x],$b[\"market\"]);\n\t\t\t\t$this->assertEquals($this->correctCountOfResult,count($b));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8f71019018977c37fa5bd1723fd63dac", "score": "0.5701388", "text": "public function testApiLessSoldRouteStatusWithDate() {\n $response = $this->call(\"GET\", \"api/v1/less-products-sold\", [\"date\" => \"1977-10-01\", \"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "23f2d736ea653275c47924ceadff6dda", "score": "0.56990916", "text": "public function testChecksModuleCodePoolAndVersion()\n {\n $this->assertModuleCodePool('local', 'oggetto_shipping');\n $this->assertModuleVersion('0.1.0');\n }", "title": "" }, { "docid": "4b9adac7d9cacb671d169188bfeba78a", "score": "0.56910723", "text": "public function testNonSpecialItemQualityPassedSellDate()\n {\n $items = [\n new Item('Elixir of the Mongoose', 5, 15)\n ];\n\n $this->app->setItem($items[0]);\n $days = 7;\n for($i=$days; $i >= 1; $i--) {\n $this->app->updateQualityByOne();\n }\n $this->assertEquals(6, $items[0]->quality);\n }", "title": "" }, { "docid": "8e36659b1cc371e290666e1ba5499c01", "score": "0.56889623", "text": "public function aroundCanReturnToStock ()\n {\n return 1;\n }", "title": "" }, { "docid": "53c3c949c1b53f27c7aeae4cc015bec2", "score": "0.56699723", "text": "public function testNoBuyNoSellOrder()\n {\n $rule = new \\App\\Rules\\PriceIsRightRule();\n \n $result = $rule->validate(14200.00, 60.00);\n \n $this->assertTrue($result);\n }", "title": "" }, { "docid": "8f99cdc1626fc80045f53bdb6f20cf01", "score": "0.56647867", "text": "private function setProductStock(int $newStock): bool\n {\n global $langs, $user;\n\n //====================================================================//\n // Compare Current Product Stock with new Value\n if ($this->object->stock_reel == $newStock) {\n return true;\n }\n //====================================================================//\n // Verify Multi-Stock feature is Disabled\n if (ConfigManager::isMultiStocksMode()) {\n return Splash::log()->war(\"Multi-Stocks Feature is Enabled... Stock update Skipped.\");\n }\n //====================================================================//\n // Update Product Stock\n $delta = $this->object->stock_reel - $newStock;\n //====================================================================//\n // Identify Product Stock to Impact\n $locationId = $this->getStockLocationId();\n if (empty($locationId)) {\n return false;\n }\n //====================================================================//\n // Update Product Stock\n $result = $this->object->correct_stock(\n $user, // Current User Object\n $locationId, // Impacted Stock ID\n abs($delta), // Quantity to Move\n ($delta > 0)?1:0, // Direction 0 = add, 1 = remove\n $langs->trans(\"Updated by Splash Module\"), // Operation Comment\n $this->getStockPriceForPmp() // Price Used for Pmp Calculation\n );\n //====================================================================//\n // Check potential Errors\n if ($result < 0) {\n $this->catchDolibarrErrors();\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "cf4e4c1d624fa8e74a97b58fe91384d0", "score": "0.5657449", "text": "public function testStockSingleInfo(){\n\t\t\t//ARRANGE\n\t\t\t$a = new APIManager();\n\t\t\t//ACT\n\t\t\t$b= $a->getStockInfo(\"GOOGL\");\n\t\t\t//ASSERT\n\t\t\t$this->assertEquals(\"GOOGL\",$b[\"symbol\"]);\n\t\t\t$this->assertEquals(\"NASDAQ\",$b[\"market\"]);\n\t\t\t$this->assertEquals(4,count($b));\n\t\t}", "title": "" }, { "docid": "458b7334e727d552154f645c4052c434", "score": "0.56514883", "text": "public function check_inventory()\n\t{\n\t\t//$this->clear_errors();\n\t\t$pass = TRUE;\n\t\t\n\t\t$items_already_checked = array();\n\t\t\n\t\tforeach ($this->items() as $row_id => $item)\n\t\t{\n\t\t\tif ( ! $item->product_id() || in_array($row_id, $items_already_checked))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$this->core->hooks->set_hook('quantity_in_cart')->run($item);\n\t\t\t\n\t\t\t$quantity = $this->core->hooks->value();\n\t\t\t\n\t\t\tif (!$quantity)\n\t\t\t{\n\t\t\t\treturn FALSE; \n\t\t\t}\n\t\t\t$inventory = $item->inventory($item->item_options());\n\t\t\t\n\t\t\tif ($inventory !== FALSE)\n\t\t\t{\n\t\t\t\tif ($inventory <= 0)\n\t\t\t\t{\n\t\t\t\t\t$this->core->set_error(sprintf($this->core->lang('item_not_in_stock'), $item->title()));\n\t\t\t\t\t\n\t\t\t\t\t$pass = FALSE;\n\t\t\t\t\treturn $pass; \n\t\t\t\t}\n\t\t\t\tif ($quantity > $inventory )\n\t\t\t\t{\n\t\t\t\t\t$msg = ($inventory == 1) ? $this->core->lang('item_quantity_greater_than_stock_one') : $this->core->lang('item_quantity_greater_than_stock');\n\t\t\t\t\t\n\t\t\t\t\t$this->core->set_error(sprintf($msg, $inventory, $item->title(), $quantity - $inventory));\n\t\t\t\t\t\n\t\t\t\t\t$pass = FALSE;\n\t\t\t\t\treturn $pass; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $pass;\n\t}", "title": "" }, { "docid": "a560e80d703d57d5621696098a21f8dd", "score": "0.56457156", "text": "public function check()\n\t{\n\t\t$query = 'SELECT price_id FROM ' . $this->_table_prefix . 'product_price WHERE shopper_group_id = \"'\n\t\t\t. $this->shopper_group_id . '\" AND product_id = ' . (int) $this->product_id\n\t\t\t. ' AND price_quantity_start <= ' . $this->_db->quote($this->price_quantity_start)\n\t\t\t. ' AND price_quantity_end >= ' . $this->_db->quote($this->price_quantity_start) . '';\n\n\t\t$this->_db->setQuery($query);\n\t\t$xid = intval($this->_db->loadResult());\n\n\t\t$query_end = 'SELECT price_id FROM ' . $this->_table_prefix . 'product_price WHERE shopper_group_id = \"'\n\t\t\t. $this->shopper_group_id . '\" AND product_id = ' . (int) $this->product_id\n\t\t\t. ' AND price_quantity_start <= ' . $this->_db->quote($this->price_quantity_end)\n\t\t\t. ' AND price_quantity_end >= ' . $this->_db->quote($this->price_quantity_end) . '';\n\n\t\t$this->_db->setQuery($query_end);\n\t\t$xid_end = intval($this->_db->loadResult());\n\n\t\tif (($xid || $xid_end) && (($xid != intval($this->price_id) && $xid != 0) || ($xid_end != intval($this->price_id) && $xid_end != 0)))\n\t\t{\n\t\t\t$this->_error = JText::sprintf('WARNNAMETRYAGAIN', JText::_('COM_REDSHOP_PRICE_ALREADY_EXISTS'));\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7239dba4f52cb72e012f1d21a141e32a", "score": "0.56357414", "text": "public function testValidateWithOptions()\n {\n $optionMock = $this->getMockBuilder(OptionItem::class)\n ->disableOriginalConstructor()\n ->setMethods(['setHasError', 'getStockStateResult', 'getProduct'])\n ->getMock();\n $optionMock->expects($this->once())\n ->method('getStockStateResult')\n ->willReturn($this->resultMock);\n $optionMock->method('getProduct')\n ->willReturn($this->productMock);\n $this->stockRegistryMock->expects($this->at(0))\n ->method('getStockItem')\n ->willReturn($this->stockItemMock);\n $this->stockRegistryMock->expects($this->at(1))\n ->method('getStockStatus')\n ->willReturn($this->stockStatusMock);\n $options = [$optionMock];\n $this->createInitialStub(1);\n $this->setUpStubForQuantity(1, true);\n $this->setUpStubForRemoveError();\n $this->parentStockItemMock->expects($this->any())\n ->method('getStockStatus')\n ->willReturn(true);\n $this->stockStatusMock->expects($this->once())\n ->method('getStockStatus')\n ->willReturn(true);\n $this->quoteItemMock->expects($this->any())\n ->method('getQtyOptions')\n ->willReturn($options);\n $this->optionInitializer->expects($this->any())\n ->method('initialize')\n ->willReturn($this->resultMock);\n $optionMock->expects($this->never())\n ->method('setHasError');\n $this->quantityValidator->validate($this->observerMock);\n }", "title": "" }, { "docid": "0d09e1d568e457b7e51208a202ea6c3b", "score": "0.5611617", "text": "public function checkProduct()\n {\n }", "title": "" }, { "docid": "452f4445529f63ea6ddb5f217ae8c345", "score": "0.5605599", "text": "protected function _isQtyCheckApplicable()\n {\n return true;\n }", "title": "" }, { "docid": "0ad309a9358ba28c09d62f88f4f7b70a", "score": "0.55984235", "text": "public function testIsBelowMinOrderPrice()\n {\n $oConfig = $this->getConfig();\n\n $oConfig->setConfigParam( \"iMinOrderPrice\", 2 );\n\n $oBasket = $this->getMock( \"oxbasket\", array( \"getProductsCount\", \"getDiscountedProductsBruttoPrice\" ) );\n $oBasket->expects( $this->any() )->method( 'getProductsCount')->will( $this->returnValue( 1 ) );\n $oBasket->expects( $this->any() )->method( 'getDiscountedProductsBruttoPrice')->will( $this->returnValue( 1 ) );\n\n $this->assertTrue( $oBasket->isBelowMinOrderPrice() );\n\n $oConfig->setConfigParam( \"iMinOrderPrice\", 10.5 );\n\n $oBasket = $this->getMock( \"oxbasket\", array( \"getProductsCount\", \"getDiscountedProductsBruttoPrice\" ) );\n $oBasket->expects( $this->any() )->method( 'getProductsCount')->will( $this->returnValue( 1 ) );\n $oBasket->expects( $this->any() )->method( 'getDiscountedProductsBruttoPrice')->will( $this->returnValue( 10 ) );\n\n $this->assertTrue( $oBasket->isBelowMinOrderPrice() );\n\n $oConfig->setConfigParam( \"iMinOrderPrice\", 10.21 );\n\n $oBasket = $this->getMock( \"oxbasket\", array( \"getProductsCount\", \"getDiscountedProductsBruttoPrice\" ) );\n $oBasket->expects( $this->any() )->method( 'getProductsCount')->will( $this->returnValue( 1 ) );\n $oBasket->expects( $this->any() )->method( 'getDiscountedProductsBruttoPrice')->will( $this->returnValue( 10.2 ) );\n\n $this->assertTrue( $oBasket->isBelowMinOrderPrice() );\n\n\n }", "title": "" }, { "docid": "2d53910ccb2e66eed52f7e09c42aa2a5", "score": "0.5589644", "text": "public function testValidateWithOptionsAndError()\n {\n $optionMock = $this->getMockBuilder(OptionItem::class)\n ->disableOriginalConstructor()\n ->setMethods(['setHasError', 'getStockStateResult', 'getProduct'])\n ->getMock();\n $this->stockRegistryMock->expects($this->at(0))\n ->method('getStockItem')\n ->willReturn($this->stockItemMock);\n $this->stockRegistryMock->expects($this->at(1))\n ->method('getStockStatus')\n ->willReturn($this->stockStatusMock);\n $optionMock->expects($this->once())\n ->method('getStockStateResult')\n ->willReturn($this->resultMock);\n $optionMock->method('getProduct')\n ->willReturn($this->productMock);\n $options = [$optionMock];\n $this->createInitialStub(1);\n $this->setUpStubForQuantity(1, true);\n $this->setUpStubForRemoveError();\n $this->parentStockItemMock->expects($this->any())\n ->method('getStockStatus')\n ->willReturn(true);\n $this->stockStatusMock->expects($this->once())\n ->method('getStockStatus')\n ->willReturn(true);\n $this->quoteItemMock->expects($this->any())\n ->method('getQtyOptions')\n ->willReturn($options);\n $this->optionInitializer->expects($this->any())\n ->method('initialize')\n ->willReturn($this->resultMock);\n $optionMock->expects($this->never())\n ->method('setHasError');\n $this->quantityValidator->validate($this->observerMock);\n }", "title": "" }, { "docid": "05f31d0c48ab4907ee7dab6e319be44c", "score": "0.5589481", "text": "public function testApiLessSoldRouteStatusNoDate() {\n $response = $this->call(\"GET\", \"api/v1/less-products-sold\", [\"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n $response->assertStatus(400);\n }", "title": "" }, { "docid": "a8e77a12ffe87f4538d8cd37b6b5c5e0", "score": "0.5582957", "text": "function option_in_stock($option) {\n if ($this->option_is_stockable($option)) {\n if ($this->get_option_stock($option)>0 ) {\n return TRUE;\n } else {\n return FALSE;\n }\n } else {\n return TRUE;\n }\n }", "title": "" }, { "docid": "18df6d8cf30cd04692d898e64305bed7", "score": "0.5580591", "text": "protected function buildStockFields(): void\n {\n global $langs;\n\n //====================================================================//\n // PRODUCT STOCKS\n //====================================================================//\n\n //====================================================================//\n // Default Stock Location\n if (Local::dolVersionCmp(\"8.0.0\") >= 0) {\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"fk_default_warehouse\")\n ->addChoices($this->getStockLocations())\n ->group($langs->trans(\"Stock\"))\n ->name($langs->trans(\"DefaultWarehouse\"))\n ->microData(\"http://schema.org/Offer\", \"inventoryLocation\")\n ;\n }\n //====================================================================//\n // Reel Stock\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"stock_reel\")\n ->name($langs->trans(\"RealStock\"))\n ->group($langs->trans(\"Stock\"))\n ->microData(\"http://schema.org/Offer\", \"inventoryLevel\")\n ->isReadOnly(ConfigManager::isMultiStocksMode())\n ->isListed()\n ;\n //====================================================================//\n // Virtual Stock\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"stock_theorique\")\n ->name($langs->trans(\"VirtualStock\"))\n ->description($langs->trans(\"VirtualStockDesc\"))\n ->group($langs->trans(\"Stock\"))\n ->MicroData(\"http://schema.org/Offer\", \"availableLevel\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Stock Alerte Level\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"seuil_stock_alerte\")\n ->name($langs->trans(\"StockLimit\"))\n ->group($langs->trans(\"Stock\"))\n ->microData(\"http://schema.org/Offer\", \"inventoryAlertLevel\")\n ;\n //====================================================================//\n // Stock Alerte Flag\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"stock_alert_flag\")\n ->name($langs->trans(\"StockTooLow\"))\n ->group($langs->trans(\"Stock\"))\n ->microData(\"http://schema.org/Offer\", \"inventoryAlertFlag\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Stock Expected Level\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"desiredstock\")\n ->name($langs->trans(\"DesiredStock\"))\n ->group($langs->trans(\"Stock\"))\n ->microData(\"http://schema.org/Offer\", \"inventoryTargetLevel\")\n ;\n //====================================================================//\n // Average Purchase price value\n $this->fieldsFactory()->create(SPL_T_DOUBLE)\n ->identifier(\"pmp\")\n ->name($langs->trans(\"EstimatedStockValueShort\"))\n ->group($langs->trans(\"Stock\"))\n ->microData(\"http://schema.org/Offer\", \"averagePrice\")\n ->isReadOnly()\n ;\n }", "title": "" }, { "docid": "cc9a4cdd6480838b279ebf44a662c127", "score": "0.55717075", "text": "public function testProductAPIImportProductsPrices2()\n {\n\n }", "title": "" }, { "docid": "62173bd25277ae199bb4fcc4f1bef84c", "score": "0.5562355", "text": "function check_stock($id)\n {\n $consulta = $this->db->query(\"SELECT * FROM Producto WHERE idProducto=$id\");\n return $consulta->row()->Stock;\n \n }", "title": "" }, { "docid": "bb9ffb2dcbb8e61d77c2f19c4e60cd54", "score": "0.5553653", "text": "public function testOneBuyOrderAndNoSellAndPriceIsInsideSpread()\n {\n $rule = new \\App\\Rules\\PriceIsRightRule();\n \n $result = $rule->validate(14150.00, 60.00, 14200.00);\n \n $this->assertFalse($result);\n }", "title": "" }, { "docid": "0d1bbe461df13f17f56acdf4e1da6ab5", "score": "0.55508876", "text": "function cb_out_of_stock() {\n global $product;\n if ( ! $product->managing_stock() && ! $product->is_in_stock() )\n echo '<p class=\"out-of-stock-sg\">Ce produit est en rupture de stock</p>';\n }", "title": "" }, { "docid": "dbee909d1cfc089d843dbad956497722", "score": "0.55498415", "text": "function item_in_stock($item) {\n $item = \\Model\\Item::find($item);\n \n if ($item->stock == 'inf') {\n return TRUE;\n } else if (is_numeric($item->stock) || !$item->stock) {\n return ($item->stock >= 1);\n } else {\n $stock = explode(':',$item->stock);\n $dep_options = \\Model\\Itemoption::all(array(\n 'conditions' => array('cat = ? AND itemid = ?',$stock[1],$item->id)\n ));\n $good = FALSE;\n foreach ($dep_options as $option) {\n if ($this->option_in_stock($option->id) > 0) {\n $good = TRUE;\n break;\n }\n }\n return $good;\n \n } \n }", "title": "" }, { "docid": "5b59e0a2b3e128a4e25bcca3add5f91d", "score": "0.55497366", "text": "private function _checkUpdates()\n {\n $feedUrl = str_replace('{id}', strval(time()), Mage::getStoreConfig('hubshoply/support/feed_url'));\n $data = (array) Mage::helper('core')->jsonDecode(@file_get_contents($feedUrl));\n \n if ( !empty($data) && !empty($data['hubshoply']) && !empty($data['hubshoply']['magento']) ) {\n $update = $data['hubshoply']['magento'];\n $latest = empty($update['latest']) ? $this->getVersion() : $update['latest']['version'];\n\n if ( version_compare($this->getVersion(), $latest) < 0 ) {\n $this->setData('update', new Varien_Object($update['latest']));\n }\n }\n }", "title": "" }, { "docid": "accd7f928f3c3d628176d65cf294f080", "score": "0.55341905", "text": "public function inValidPackageNameTest() {\n $mockTokenManager = new MockTokenManager();\n $mockTokenManager->setAccessToken('invalid_access_token');\n\n $client = new Client([\n $this->getApiConfig()->getBaseUrl()\n ]);\n\n $apiMockResponse = new ApiMockResponse();\n $mock = new Mock([$apiMockResponse->getInvalidAccessToken()]);\n $client->getEmitter()->attach($mock);\n\n $purchaseStatusRequest = new PurchaseStatusRequest();\n $purchaseStatusRequest->setPackage('com.package.name');\n $purchaseStatusRequest->setProductId('product_id');\n $purchaseStatusRequest->setPurchaseToken('purchase_token');\n\n\n $bazaarApi = new BazaarApi();\n $bazaarApi->setClient($client);\n $bazaarApi->setApiConfig($this->getApiConfig());\n $bazaarApi->setAccountConfig($this->getAccountConfig());\n $bazaarApi->setTokenManager($mockTokenManager);\n\n $bazaarApi->getPurchase($purchaseStatusRequest);\n }", "title": "" }, { "docid": "fe1f61f061689a38d25e4dbd82cd329e", "score": "0.55255604", "text": "public function testIsBelowMinOrderPriceRecognise0AsValue()\n {\n modConfig::getInstance()->setConfigParam( \"iMinOrderPrice\", 0 );\n\n $oBasket = $this->getMock( \"oxbasket\", array( \"getProductsCount\", \"getDiscountedProductsBruttoPrice\" ) );\n $oBasket->expects( $this->once() )->method( 'getProductsCount')->will( $this->returnValue( 1 ) );\n $oBasket->expects( $this->once() )->method( 'getDiscountedProductsBruttoPrice')->will( $this->returnValue( -1 ) );\n\n $this->assertTrue( $oBasket->isBelowMinOrderPrice() );\n\n\n\n\n modConfig::getInstance()->setConfigParam( \"iMinOrderPrice\", '' );\n\n $oBasket = $this->getMock( \"oxbasket\", array( \"getProductsCount\", \"getDiscountedProductsBruttoPrice\" ) );\n $oBasket->expects( $this->never() )->method( 'getProductsCount');\n $oBasket->expects( $this->never() )->method( 'getDiscountedProductsBruttoPrice');\n\n $this->assertFalse( $oBasket->isBelowMinOrderPrice() );\n }", "title": "" }, { "docid": "0b7e25ded24bb1f51467eb91f12f505b", "score": "0.5518228", "text": "public function testIsBelowMinOrderPriceAddNotDiscountedProducts()\n {\n modConfig::getInstance()->setConfigParam( \"iMinOrderPrice\", 2 );\n\n $oPrice = $this->getMock( \"oxprice\", array( \"getBruttoSum\" ) );\n $oPrice->expects( $this->once() )->method( 'getBruttoSum')->will( $this->returnValue( 2 ) );\n\n $oBasket = $this->getMock( \"oxbasket\", array( \"getProductsCount\", \"getDiscountedProductsBruttoPrice\", \"getNotDiscountProductsPrice\" ) );\n $oBasket->expects( $this->once() )->method( 'getProductsCount')->will( $this->returnValue( 2 ) );\n $oBasket->expects( $this->once() )->method( 'getDiscountedProductsBruttoPrice')->will( $this->returnValue( 1 ) );\n $oBasket->expects( $this->once() )->method( 'getNotDiscountProductsPrice')->will( $this->returnValue( $oPrice ) );\n\n $this->assertFalse( $oBasket->isBelowMinOrderPrice() );\n }", "title": "" }, { "docid": "d26bbeb1a91c39733440ca54493b5b60", "score": "0.5510031", "text": "public function testQuickBuy()\n {\n }", "title": "" }, { "docid": "a0179d407ac17547cef22d45b47a387f", "score": "0.55029553", "text": "function verifyStock($position, $id, $quantity)\n {\n $data = $this->shop->selectProduct($id, $quantity);\n if ($data->getStock() == 0) {\n $this->deleteProduct($position);\n return 'deleteProduct';\n } elseif ($data->getStock() < $quantity) {\n $_SESSION['panier'][$position]->adjustQuantity($data->getStock());\n return 'adjustQuantity';\n }\n $this->getTotal();\n }", "title": "" }, { "docid": "9dddee67e396b2444f6d084382bac585", "score": "0.54968035", "text": "public function Checkstock($productID = null, $number = null) {\n $sql = \"SELECT SUM(s.total) AS total\n FROM stock s \n WHERE s.product = '$productID'\n GROUP BY s.product\";\n $rs = \\Yii::$app->db->createCommand($sql)->queryOne();\n $stock = $rs['total'];\n if ($number > $stock) {\n return \"0\";\n } else {\n return \"1\";\n }\n }", "title": "" }, { "docid": "e076debe32fe07cac2a6e166d9c05791", "score": "0.5496467", "text": "function customincludes_component_checkversion()\n{\n if (!function_exists('get_product_release'))\n return false;\n if (get_product_release() < 530)\n return false;\n return true;\n}", "title": "" }, { "docid": "92522c44727a4214bf6aa50f3f844cee", "score": "0.54955655", "text": "public function test_put_stock_failed(){\n $this->request->setCallable(\n function ($CI) {\n $model = $this->getDouble(\n 'Product_model', [\n 'updateProductStock' => -1\n ]\n );\n // use mocked model to be loaded\n $CI->Product_model = $model;\n }\n );\n\n // set data to be sent\n $data = json_encode([\n 'quantity' => '-10'\n ]);\n\n // set request as JSON\n $this->request->setHeader('Content-type', 'application/json');\n\n // send request\n $output = $this->request('PUT', 'api/v1/products/stocks/1', $data);\n\n // assert response code and message\n $this->assertResponseCode(400);\n $this->assertStringContainsStringIgnoringCase('FALSE', $output);\n\n }", "title": "" }, { "docid": "24e2eafb250a8aab4d0538492a17b5f4", "score": "0.5484833", "text": "function option_is_stockable($option) {\n if (is_numeric($this->get_option_stock($option))) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "16baf69cffee01c3b7199fde319ca6f0", "score": "0.548077", "text": "public function testExportConfigurableWithReservationsAdditionalWebsiteAdditionalStock(): void\n {\n $this->_markTestAsRestOnly();\n $this->setStoreView('store_for_us_website');\n $configurableSKU = 'configurable';\n $firstOptionSKU = 'simple_10';\n $secondsOptionSKU = 'simple_20';\n $this->assignProductsToWebsite([$configurableSKU, $firstOptionSKU, $secondsOptionSKU], 'us_website');\n $requestData = [\n 'searchCriteria' => [\n SearchCriteria::FILTER_GROUPS => [\n [\n 'filters' => [\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => $configurableSKU,\n 'condition_type' => 'eq',\n ],\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => $firstOptionSKU,\n 'condition_type' => 'eq',\n ],\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => $secondsOptionSKU,\n 'condition_type' => 'eq',\n ],\n ]\n ]\n ]\n ]\n ];\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => sprintf(\n \"%s/%s/%s?%s\",\n self::API_PATH,\n 'website',\n 'us_website',\n http_build_query($requestData)\n ),\n 'httpMethod' => Request::HTTP_METHOD_GET\n ],\n ];\n $result = $this->_webApiCall($serviceInfo);\n $this->verifyProducts(\n [\n [\n 'sku' => $configurableSKU,\n 'qty' => 0,\n 'is_salable' => true,\n ],\n [\n 'sku' => $firstOptionSKU,\n 'qty' => 100,\n 'is_salable' => true,\n ],\n [\n 'sku' => $secondsOptionSKU,\n 'qty' => 100,\n 'is_salable' => true,\n ],\n ],\n $result['items']\n );\n $this->createCustomerCart();\n $this->addConfigurableProduct($configurableSKU);\n $this->estimateShippingCosts();\n $this->setShippingAndBillingInformation();\n $orderId = $this->submitPaymentInformation();\n $result = $this->_webApiCall($serviceInfo);\n $this->verifyProducts(\n [\n [\n 'sku' => $configurableSKU,\n 'qty' => 0,\n 'is_salable' => true,\n ],\n [\n 'sku' => $firstOptionSKU,\n 'qty' => 99,\n 'is_salable' => true,\n ],\n [\n 'sku' => $secondsOptionSKU,\n 'qty' => 100,\n 'is_salable' => true,\n ],\n ],\n $result['items']\n );\n $this->cancelOrder($orderId);\n }", "title": "" }, { "docid": "ad39c988ddff515a885dc6c331d7cc68", "score": "0.5476239", "text": "abstract public function stocks();", "title": "" }, { "docid": "7735383501f3e0a8dea742ab7454bc5a", "score": "0.54622006", "text": "public function isInStock()\n {\n return false;\n\n if ($this->parsePrice())\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "1591ffdd81074fcc2ac7181d686f07a8", "score": "0.54477197", "text": "public function testOneSellOrderAndNoBuyAndPriceIsInsideSpread()\n {\n $rule = new \\App\\Rules\\PriceIsRightRule();\n \n $result = $rule->validate(14150.00, 60.00, null,null, 14200.00,null);\n \n $this->assertFalse($result);\n }", "title": "" }, { "docid": "bebc6fa92ca9c1974e9491d039fab3bb", "score": "0.54413855", "text": "function updateStock ( $order ) {\n\t\t\n\t\tif ($order->get_id_statut() >= OR_PAY_OK) {\n\t\t\t$content = unserialize($order->get_structure());\n\t\t\tforeach ($content as $product) {\n\t\t\t\tif (!isset($product['name'])) {\n\t\t\t\t\t$oPdt = new shp_produit ($product['id']);\n\t\t\t\t\t$oPdt->set_quantite_stock( $oPdt->get_quantite_stock() - $product['quantity'] );\n\t\t\t\t\t\n\t\t\t\t\t// add extra low stock security alert routine\n\t\t\t\t\tif( WEBSHOP_STOCK_ALERT && ($oPdt->get_alerte_stock() > ($oPdt->get_quantite_stock() - $product['quantity'])) ){\n\t\t\t\t\t\t// translation engine\n\t\t\t\t\t\t$translator =& TslManager::getInstance();\n\t\t\t\t\t\tif (isset($product['props']['id'])) {\n\t\t\t\t\t\t\t$p_ident = 'ID '.$product['props']['id'].' - '.$translator->getByID($properties[$product['props']['id']]['shp_pdt_titre_court']).' - '.$properties[$product['props']['id']]['shp_pdt_dimensions'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// service confirmation email\n\t\t\t\t\t\t\t$message = \"Stock restant pour le produit {$p_ident} : \".$properties[$product['props']['id']]['shp_pdt_quantite_stock'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$p_ident = 'ID '.$product['id'].' - '.$product['ref'].''; \n\t\t\t\t\t\t\t$message = \"Stock restant pour le produit {$p_ident} : \".$oPdt->get_quantite_stock();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\tmultiPartMail(SHP_ADMIN_ORDER_EMAIL , 'Alerte stock sur webshop' , $message , '', SHP_AUTO_EMAIL);\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tdbUpdate($oPdt);\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "006271ee045f516ada11f98e87de8c6d", "score": "0.54403347", "text": "public function testProductAPIImportProductsPrices()\n {\n\n }", "title": "" }, { "docid": "61f73fa63322eaac33e9f7906bf240f6", "score": "0.54274786", "text": "public function validateStock($send_products)\n {\n\n /** @var \\Magestore\\InventorySuccess\\Model\\TransferStock\\TransferStockManagement $transferStockManagement */\n $transferStockManagement = $this->_objectManager->create('\\Magestore\\InventorySuccess\\Model\\TransferStock\\TransferStockManagement');\n $id = $this->getRequest()->getParam('id');\n $transferStock = $this->_objectManager->create('\\Magestore\\InventorySuccess\\Model\\TransferStock');\n $transferStock->load($id);\n\n if ($transferStock->getType() == TransferStockModel::TYPE_TO_EXTERNAL) {\n\n $warehouseId = $transferStock->getSourceWarehouseId();\n $productStocks = [];\n foreach ($send_products as $item) {\n $productStocks[$item['id']] = $item['qty'];\n }\n return $transferStockManagement->validateStockDelivery($productStocks, $warehouseId);\n }\n\n return true;\n }", "title": "" }, { "docid": "b2285ddb63986d0e46714d6518ee8913", "score": "0.5426163", "text": "public function teststoreBookAfterBuy(){\n\n $data=[\n \"book_id\" => \"10\",\n \"book_price\" => \"250\",\n \"model_book_quantity\" => \"10\"\n ];\n\n $buyedbook=new BuyBookShopLib();\n $buyedbook->storeBookAfterBuy($data);\n }", "title": "" }, { "docid": "3658b36accab5f554c634a2d1d2db9b3", "score": "0.54245764", "text": "public function testOneBuyOrderAndNoSellAndPriceIsOutsideSpread()\n {\n \n $rule = new \\App\\Rules\\PriceIsRightRule();\n \n $result = $rule->validate(14120.00, 60.00, 14200.00);\n \n $this->assertTrue($result);\n }", "title": "" }, { "docid": "2e6e963b800ff3cf6fac357e45850cbd", "score": "0.542373", "text": "public function testCartAddLoyalty()\n {\n }", "title": "" }, { "docid": "c3ec6beda99bd9ae5bf899d8be09f9c3", "score": "0.5419282", "text": "public function testGetPriceOfProduct()\n\t{\n\t\t$url = 'https://www.jib.co.th/web/index.php/product/readProduct/20472/2/DESKTOP-PC-ACER-PREDATOR-G3-710-648G1T00MGI';\n\t\t$currentPrice = 40900;\n\t\t$checker = new Checker($url);\n\t\t$result = $checker->getPrice();\n\n\t\t$this->assertEquals($result, $currentPrice);\n\t}", "title": "" }, { "docid": "ded48207453c8940f6b7af7e9c0bbe20", "score": "0.5417276", "text": "function shaken_check_version(){\n\t\n\tglobal $shaken_theme_name, $theme_data;\n\t\n\t$version_url = \"http://versions.shakenandstirredweb.com/versions.xml\";\n\t\n\t$get_versions = wp_remote_get($version_url);\n\tif ( !is_wp_error($get_versions) && 200 == $get_versions['response']['code'] ) {\n\t\t$versions = $get_versions['body'];\n\t}\n\t\n\t// Set a future date to check\n\t$next_check = time() + (2 * 24 * 60 * 60);\n\tupdate_option('shaken_next_check', $next_check);\n\t\n\tif(isset($versions) && $versions != \"\" && $versions !== false){\n\t\t$versions = shaken_xml2array($versions);\n\t\t\n\t\tforeach($versions['versions']['_c']['version'] as $update){\n\t\t\t$latest = str_replace(\".\",\"\",trim($update['_v']));\n\t\t\tif($update['_a']['name'] == $shaken_theme_name){\n\t\t\t\tif(str_replace(\".\",\"\",$theme_data['Version']) < $latest){\n\t\t\t\t\t$shaken_update_version = trim($update['_v']);\n\t\t\t\t\t\n\t\t\t\t\tupdate_option('shaken_latest_version', $shaken_update_version);\n\t\t\t\t\t\n\t\t\t\t\treturn $shaken_update_version;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n}", "title": "" }, { "docid": "8bdc3db2ed20adc2a8715dc7011075b2", "score": "0.5414688", "text": "function stock($center){\t\t\r\n\t\t$this->load->Model(\"Model_Kit\");\r\n\t\t$qty = $this->Model_Kit->qtyByCenter($center);\r\n\r\n\t\tif($qty[0]->qty == 0){\r\n\t\t\t$this->form_validation->set_message('stock', 'No hay medicamentos disponibles para ese criterio de asignación.<br>\r\n\t\t\t\tFavor de contactar con mluisa.bustos@southconealliance.cl (569)56495597');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8da1ce745126db25656b54f5f282fa3b", "score": "0.5408423", "text": "public function testApiMostSoldRouteStatusWithDate() {\n $response = $this->call(\"GET\", \"api/v1/most-products-sold\", [\"date\" => \"1977-10-01\", \"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "de0783af3444b97346262ed4fca45d17", "score": "0.5405542", "text": "public function testProductVisibleInNewStore()\n {\n $newStoreCode = 'fixture_second_store';\n $this->assertCategory($newStoreCode);\n $this->assertProduct($newStoreCode);\n }", "title": "" }, { "docid": "76da5d0f6c96c8092a692a995b6c92b9", "score": "0.5403781", "text": "public function getStockAvailable(ProductInterface $product);", "title": "" }, { "docid": "efaa62eb38143b49b3d42b626320e487", "score": "0.5400589", "text": "public function testApiMostSoldRouteStatusNoDate() {\n $response = $this->call(\"GET\", \"api/v1/most-products-sold\", [\"api_token\" => \"0g3AubZqweE81ufvZYHYQpmjdk1VzriAlyEgiOpqmBJIerMKzjNNXs4YUsTt\"]);\n $response->assertStatus(400);\n }", "title": "" }, { "docid": "710828864bd01c2fd9c2501a5fc6abd0", "score": "0.5398616", "text": "public function testGetArtStockInBasket()\n {\n // simulating basket contents\n $oBasketItem = new oxbasketitem();\n $oBasketItem->init( $this->oArticle->getId(), 1, null, null, true );\n $oBasketItem2 = new oxbasketitem();\n $oBasketItem2->init( $this->oArticle->getId(), 2 );\n\n $oBasket = $this->getProxyClass( \"oxBasket\" );\n $oBasket->setNonPublicVar( '_aBasketContents', array(\"_testItem\" => $oBasketItem, \"_testItem2\" => $oBasketItem2) );\n\n $this->assertEquals( 3, $oBasket->getArtStockInBasket( $this->oArticle->getId()) );\n $this->assertEquals( 1, $oBasket->getArtStockInBasket( $this->oArticle->getId(), \"_testItem2\") );\n }", "title": "" }, { "docid": "0a95b18ba2630cabed797ae0a79a9c3e", "score": "0.5396774", "text": "public function testOneSellOrderAnOneBuyAndPriceIsInsideSpread()\n {\n $rule = new \\App\\Rules\\PriceIsRightRule();\n \n $result = $rule->validate(14080.00, 60.00, 14130,null, 14200.00,null);\n \n $this->assertFalse($result);\n }", "title": "" }, { "docid": "94a2dbea14453cbf85f6a57fe937bcfb", "score": "0.53886616", "text": "function check_product_giftcard_stock(){\r\n\t\t\t\t\tglobal $woocommerce;\t\r\n\t\t\t\t\t$this->logger = $woocommerce->logger();\r\n\t\t\t\t\t$this->logger->add(\"giftcodes\", \"Check giftcard stock\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t$all_products = get_posts(array('post_type' => 'product_variation', 'posts_per_page' => -1));\r\n\t\t\t\t\t$new_stock = array();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Check the giftcodes per product*/\r\n\t\t\t\t\tforeach($all_products as $product){\r\n\t\t\t\t\t\t$product = get_product($product->ID);\r\n\t\t\t\t\t\t$product->set_stock_status(\"instock\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$product_id = $product->variation_id;\r\n\t\t\t\t\t\t$product_stock = $product->total_stock;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Add product to array\r\n\t\t\t\t\t\t$new_stock[$product_id] = 0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/* Check if there is a giftcard code */\r\n\t\t\t\t\t\t$giftcode_list = get_posts(array('post_type' => 'shop_giftcodes', 'post_status' => 'publish', 'posts_per_page' => -1));\r\n\t\t\t\t\t\tforeach($giftcode_list as $giftcode){\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$code_product_id = get_post_custom_values('_wcgc_product_id', $giftcode->ID);\r\n\t\t\t\t\t\t\tif($code_product_id[0] == $product_id){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$code_sold = get_post_custom_values('_wcgc_sold', $giftcode->ID);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Check if the code isn't already sold, if it isn't: increase product stock in array\r\n\t\t\t\t\t\t\t\tif($code_sold[0] != 'on'){\r\n\t\t\t\t\t\t\t\t\t$new_stock[$product_id]++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Change product stock */\r\n\t\t\t\t\tforeach($new_stock as $id => $stock){\r\n\t\t\t\t\t\t// Change stock\r\n\t\t\t\t\t\t$product = get_product($id);\r\n\t\t\t\t\t\t$product->set_stock($stock);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->logger->add(\"giftcodes\", \"Set giftcard stock [\".$stock.\"] for \".$product->id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "title": "" }, { "docid": "104532293426ab8272ec5aa111a4b32f", "score": "0.5380501", "text": "public function isInStock(): bool {\n return ($this->stock > 0) ? TRUE : FALSE;\n }", "title": "" }, { "docid": "cc6f4edc70a4747f970a4173e47fdeaf", "score": "0.53795785", "text": "public function testUpgrade() {\n // Start the upgrade process.\n $this->submitCredentialForm();\n $session = $this->assertSession();\n\n $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');\n $session->statusCodeEquals(200);\n\n // Test the review form.\n $this->assertReviewForm();\n\n $this->submitForm([], 'Perform upgrade');\n $this->assertUpgrade($this->getEntityCounts());\n }", "title": "" }, { "docid": "bb773771b946df3a4efded0e124dc688", "score": "0.5376347", "text": "protected function updateProductStock()\n\t{ \t\n \t$dataCollection = Mage::getModel('dropship360/inventory')->getCollection();\n \t$stockData = array();\n \tif($dataCollection->count() < 0){\n \t\treturn;\n \t}\n \tforeach($dataCollection as $stock){\n \t\tif(array_key_exists($stock->getProductSku(),$stockData)){\n \t\t\t \n \t\t\t$stockData[$stock->getProductSku()] = $stockData[$stock->getProductSku()] + $stock->getStock();\n \t\t}else{\n \t\t\t$stockData[$stock->getProductSku()] = $stock->getStock();\n \t\t}\n \t\t\t\n \t}\t\n \tif(empty($stockData)){\n \t\treturn;\n \t}\n \tforeach ($stockData as $sku=>$qty) { \t\t\n \t\t$this->saveStockData($sku, $qty);\n \t} \t\n }", "title": "" }, { "docid": "7135857557116894f9bc2d598f8a10ae", "score": "0.5373291", "text": "public function testExportConfigurableWithReservationsDefaultWebsiteDefaultStock(): void\n {\n $this->_markTestAsRestOnly();\n $this->assignStockToWebsite(1, 'base');\n $configurableSKU = 'configurable_in_stock';\n $firstOptionSKU = 'simple_10';\n $secondsOptionSKU = 'simple_20';\n $requestData = [\n 'searchCriteria' => [\n SearchCriteria::FILTER_GROUPS => [\n [\n 'filters' => [\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => $configurableSKU,\n 'condition_type' => 'eq',\n ],\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => $firstOptionSKU,\n 'condition_type' => 'eq',\n ],\n [\n 'field' => SourceItemInterface::SKU,\n 'value' => $secondsOptionSKU,\n 'condition_type' => 'eq',\n ],\n ]\n ]\n ]\n ]\n ];\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => sprintf(\n \"%s/%s/%s?%s\",\n self::API_PATH,\n 'website',\n 'base',\n http_build_query($requestData)\n ),\n 'httpMethod' => Request::HTTP_METHOD_GET\n ],\n ];\n $result = $this->_webApiCall($serviceInfo);\n $this->verifyProducts(\n [\n [\n 'sku' => $configurableSKU,\n 'qty' => 0,\n 'is_salable' => true,\n ],\n [\n 'sku' => $firstOptionSKU,\n 'qty' => 100,\n 'is_salable' => true,\n ],\n [\n 'sku' => $secondsOptionSKU,\n 'qty' => 100,\n 'is_salable' => true,\n ],\n ],\n $result['items']\n );\n $this->createCustomerCart();\n $this->addConfigurableProduct($configurableSKU);\n $this->estimateShippingCosts();\n $this->setShippingAndBillingInformation();\n $orderId = $this->submitPaymentInformation();\n $result = $this->_webApiCall($serviceInfo);\n $this->verifyProducts(\n [\n [\n 'sku' => $configurableSKU,\n 'qty' => 0,\n 'is_salable' => true,\n ],\n [\n 'sku' => $firstOptionSKU,\n 'qty' => 99,\n 'is_salable' => true,\n ],\n [\n 'sku' => $secondsOptionSKU,\n 'qty' => 100,\n 'is_salable' => true,\n ],\n ],\n $result['items']\n );\n $this->cancelOrder($orderId);\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "dfd3785eb5c04acee6816519f9880d62", "score": "0.0", "text": "public function create()\n {\n return view('admin.genres.create');\n }", "title": "" } ]
[ { "docid": "847f003a4addf6820c7b7d4e542cfa95", "score": "0.7909494", "text": "public function create()\n {\n $resource = $this->prepResource('create');\n $this->showBreadcrumb($resource, [null => 'Create New']);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "452dfa44b6fc27ed6e2aa675caef8e17", "score": "0.7706946", "text": "public function create() {\n return view('acl::resource.create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "303de6e59e0dfcaa3323bed304cea7e1", "score": "0.7500156", "text": "public function create()\n {\n if(Gate::denies($this->resource.'-create'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n \n $this->addToView($this->options());\n\n return request()->wantsJson() \n ? null\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('label', 'title', 'icon')));\n }", "title": "" }, { "docid": "bb55b8b1372a305242b37dbd1e241a37", "score": "0.7487926", "text": "public function create() {\n return view('members.resources.createResource');\n }", "title": "" }, { "docid": "290e9e5c1e1c6771e2a48a7c39b658ae", "score": "0.73964167", "text": "public function create()\n\t{\n\t\treturn View::make('resourcetypes.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "7c2dc6aee3a7b173b42ae8f6ff0e9ac2", "score": "0.73191345", "text": "public function create() //represents forms user fills out.\n {\n return view('create');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "a079c2ff615466a913385f0f3bbf4c9d", "score": "0.7209733", "text": "public function create()\n {\n return view('project_resources/create');\n }", "title": "" }, { "docid": "56a59cf2c86c7085f5fdde712ee5ea06", "score": "0.7203657", "text": "public function create()\n {\n return view('sick.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "d52a8d55018a5452356ebfeb392dad33", "score": "0.7202316", "text": "public function newAction()\n {\n $entity = new \\Cumts\\MainBundle\\Entity\\Show();\n $form = $this->createForm(new ShowType(), $entity);\n\n return $this->render('CumtsAdminBundle:Show:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "50c363b98b85b902c0b33495df17fc28", "score": "0.71889836", "text": "public function create()\n {\n return view('Admin.Forms.create');\n }", "title": "" }, { "docid": "99c209c7d567bb6a386886e720582d3f", "score": "0.71736616", "text": "public function newAction()\n {\n $entity = $this->getNewEntity();\n $alias = $this->getAlias();\n $fields = $this->getFields('new');\n\n $form = $this->createCreateForm($entity, $alias, $fields);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView()\n )\n );\n }", "title": "" }, { "docid": "d7792233bdf3a051b8ecc8a3bf85491e", "score": "0.717068", "text": "public function create()\n {\n return view('admin.form.create');\n }", "title": "" }, { "docid": "182ce5c02e801fee3966edc96be1055e", "score": "0.7139064", "text": "public function create()\n {\n return view('form-create');\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7128814", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "9a87c89323c16332dd5980c005f9fd73", "score": "0.71161574", "text": "public function create()\n {\n return view('admin.retiros.partials.createForm');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "4618d70cb6b1be4af26372f030bb7274", "score": "0.710939", "text": "public function create()\n {\n return view('livro.form');\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "d42793f140a997f3a5618ebf3a790d1b", "score": "0.7097341", "text": "public function create()\n {\n return view('Admin.generals.form');\n }", "title": "" }, { "docid": "e1be67b632033f807b2cefd97a7e5682", "score": "0.7095487", "text": "public function create()\n {\n $meta = \"Create\";\n return view('driver.form', compact('meta'));\n }", "title": "" }, { "docid": "e6d14f751da329891ae59d3d0614b844", "score": "0.7088803", "text": "public function create()\n {\n return view('backend::module.form');\n }", "title": "" }, { "docid": "ba36d03e3181e8d29ef780e9f1b47d8e", "score": "0.70807815", "text": "public function create()\n {\n return view('applicationforms.create');\n }", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "d91864a90a03af3679687f163da22716", "score": "0.7078707", "text": "public function create()\n {\n return view(\"pages-ui::backend.form\", [\n \"extends\" => config(\"pages-ui.backend.template_to_extend\", \"layouts.app\"),\n \"edit\" => false,\n ]);\n }", "title": "" }, { "docid": "19a8b4682806788e584645f302bff901", "score": "0.7070855", "text": "public function newAction()\n {\n $manager = $this->container->get('zimzim_construction_site_actionitemmanager');\n $entity = $manager->createEntity();\n $form = $this->createCreateForm($entity, $manager);\n\n return $this->render(\n self::DIR.':new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "title": "" }, { "docid": "868d619f6ddd72d0196bd0112e6d14a0", "score": "0.7068269", "text": "public function create()\n {\n $items = $this->model->get();\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'essence' => $this->essence,\n 'items' => $items,\n ]);\n }", "title": "" }, { "docid": "a717d49d12459178d0ea648de34b92f3", "score": "0.7053267", "text": "public function create()\n {\n return view('submit_forms.create');\n }", "title": "" }, { "docid": "88bddae014db0489caa5efa7d888b963", "score": "0.70453197", "text": "public function newAction()\n {\n $entity = new Cliente();\n $form = $this->createForm(new ClienteType(), $entity);\n\n return $this->render('ContadoresBundle:Cliente:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'cliente_new'\n ));\n }", "title": "" }, { "docid": "2885b0aa30fbd2b9a13afbabd00ca579", "score": "0.70360965", "text": "public function create()\n {\n return view('AdminPanel.Supplier.form');\n }", "title": "" }, { "docid": "0c1144eddfb806ac17f30214bdfede15", "score": "0.70316905", "text": "public function create()\n {\n return view('cat.form_create');\n }", "title": "" }, { "docid": "e1571e560aab196c00674cc03cd106df", "score": "0.7028034", "text": "public function newAction()\n {\n $entity = new Formation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FormationAdminBundle:Formation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "d12ec07b606c2d87e70c0e3602b230c7", "score": "0.7027543", "text": "public function create()\n {\n return view('admin.resources.person.create');\n }", "title": "" }, { "docid": "e2a9ae8284cc267325c107ada7cdb536", "score": "0.70238173", "text": "public function create()\n {\n return View::make('form.add');\n }", "title": "" }, { "docid": "40b5fe05bbe7fe1fc32074241497237e", "score": "0.70228195", "text": "public function create()\n {\n \treturn view ('backend.professor.create');\n }", "title": "" }, { "docid": "f8ec369da210a363de27940e92b3f84d", "score": "0.70125043", "text": "public function create()\n {\n return view('libro.formlibro');\n }", "title": "" }, { "docid": "df9822b231f9e125e4b3aa9bc0b50b54", "score": "0.7000799", "text": "public function newAction()\n {\n return $this->renderCreationForm(new User(), new UserType(), 'User', 'FsbMediaFilesIndexBundle');\n }", "title": "" }, { "docid": "d3818ee7b8a6f5feddcf93f25df0fe6b", "score": "0.6986593", "text": "public function create()\n {\n return view('students._form');\n }", "title": "" }, { "docid": "bad09d21897077a09fc9ba04b37aa535", "score": "0.69801325", "text": "public function create()\n\t{\n\t\treturn view('dienthoai.create');\n\t}", "title": "" }, { "docid": "bfc2f651a3ad53ba32a1f0624b2baf70", "score": "0.6976104", "text": "public function create()\n {\n return view('fabricante.form');\n }", "title": "" }, { "docid": "38d1a27327ac4a367aba240dedebaa0e", "score": "0.69747853", "text": "public function showCreateNewClientForm()\n {\n return view('admin.createNewClientForm');\n }", "title": "" }, { "docid": "65c79b36d9444a6beccf14aac7b2b045", "score": "0.6973617", "text": "public function create()\n {\n return view('product.form', \n [\n 'product' => new Product\n ]);\n }", "title": "" }, { "docid": "daf28f960dad10d136b88bf0cb698afe", "score": "0.69729453", "text": "public function create()\n\t{\n\t\treturn view('siswa.add');\n\t}", "title": "" }, { "docid": "77b32a1a2812f894a1084db4a0c3b2d8", "score": "0.6965231", "text": "public function create()\n {\n $title = trans('option.new');\n\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "80055340b1924d51914b16fcf2fee697", "score": "0.6960298", "text": "public function newAction()\n {\n $entity = new Client();\n $form = $this->createCreateForm($entity);\n return $this->render('ProjectFilmsBundle:Default:singup.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n}", "title": "" }, { "docid": "d607449c2320c1a6b73af5c48d80dea8", "score": "0.695971", "text": "public function create()\n {\n\t\treturn view('Master.SMD.product_form');\n }", "title": "" }, { "docid": "41eb11154e57dff75498fcf25564c134", "score": "0.6952435", "text": "public function create()\n {\n return view('admin.book.add');\n }", "title": "" }, { "docid": "c99a469be2dc77ac788affd5c609736e", "score": "0.69498503", "text": "public function create()\n\t{\n\t\treturn view('tanah.create');\n\t}", "title": "" }, { "docid": "9c1725367be54b1702af65b52b997aa8", "score": "0.69449973", "text": "public function create()\n {\n //\n return view('village.form');\n }", "title": "" }, { "docid": "72f0db297092df3a05f0662bbcf847e2", "score": "0.6942181", "text": "public function create()\n {\n return \"Provide a form for creating a new bookmark\";\n }", "title": "" }, { "docid": "fd3e19a66d87f8e5b9e62eeab1859fd6", "score": "0.694158", "text": "public function create()\n {\n return view ('admin.choice.create');\n }", "title": "" }, { "docid": "5a43ba5452e70f5a9984d0dd656c9e9d", "score": "0.6939963", "text": "public function create()\n {\n return view('admin.student.add');\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.6937871", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "8f8abe7734d2df10a7d0bf9300d89ffd", "score": "0.6936004", "text": "public function create()\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos', 'Insert')) return $this->accessFail();\n\t\t\n\t\t$objeto = new Objeto;\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => 'objetos.store', 'method' => 'POST');\n $action = 'Ingresar'; \n\t\t$action_label = \\Lang::get('utils.Ingresar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}", "title": "" }, { "docid": "8adebbe6d78e1269103db957362b2b48", "score": "0.6934276", "text": "public function create()\n {\n return view('admin.concepto.create');\n }", "title": "" }, { "docid": "cefebec03f775a193c7c4e8a62aa577f", "score": "0.6933069", "text": "public function create()\n {\n $this->data('model', new Question);\n\n $this->data('page_title', trans('labels.question_create'));\n\n $this->breadcrumbs(trans('labels.question_create'));\n\n return $this->render('views.question.create');\n }", "title": "" }, { "docid": "a0cec03d417a249e7b508d296e8928e7", "score": "0.6927707", "text": "public function new()\n {\n return view('backend.create');\n }", "title": "" }, { "docid": "b39914295738987f9eaa881efd81b08a", "score": "0.6924082", "text": "public function create()\n\t{\n\t\treturn view('hijos.create');\n\t}", "title": "" }, { "docid": "1b6fea0f3d627491bca24cc0ec1943b3", "score": "0.6922099", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['vendors'] = User::where([['status',1],['role',1]])->get();\n $data['brands'] = Brand::where('status',1)->get();\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "0db3c2ce6e391f38a76280c98d234b3e", "score": "0.6913334", "text": "public function create()\n {\n return view(\"admin.main.general.create\");\n }", "title": "" }, { "docid": "d88972ac1a628783a7fbb403d9a8dcfc", "score": "0.6907519", "text": "public function create()\n {\n return view ('darbuotojai.create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "675ca45cdb19e54120f6c28ad08c6960", "score": "0.69062245", "text": "public function createAction(): object\n {\n $this->checkIfLoggedIn();\n\n $page = $this->di->get(\"page\");\n $form = new CreateQuestion($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ny fråga\",\n ]);\n }", "title": "" }, { "docid": "8a2147b2e963c3ef756e24bfe402ca2e", "score": "0.69051594", "text": "public function create()\n {\n return view(\"admin.driver.form\");\n }", "title": "" }, { "docid": "a30ccd806cf5bb09abba11f75d4178c0", "score": "0.69034714", "text": "public function newAction()\n {\n $form = $this->createForm(new RegistrationType(), new Registration());\n\n return $this->render('McmsEmployeeBundle:Admin:new.html.twig',array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "170085833f62c2562297ca840c892ec8", "score": "0.68962324", "text": "public function newAction()\n {\n $entity = new Carroceria();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColombiaAutosadministradorBundle:Carroceria:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "52b58d6fc4a50661368b682a572eca31", "score": "0.6890648", "text": "public function create()\n {\n return view('main.create');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "f06c8b94a60d9059ad36c228a0917999", "score": "0.68900883", "text": "public function create()\n {\n //\n\n\n //default active sidebar\n $this->setActiveParent();\n\n //[] = current query object\n //null = current request\n $form_fields = DynamicForm::form_fields('create', [], null, Person::form_fields() );\n\n return view('persons.create', compact('form_fields'));\n\n\n }", "title": "" }, { "docid": "78ad8491acd5385f24f5ae5f822678c9", "score": "0.6889061", "text": "public function create()\n\t{\n\t\treturn view('maquinas.create');\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "82fa764bee41d4c3cd502aeb977ac7aa", "score": "0.6887289", "text": "public function create()\r\n {\r\n //\r\n $title = ['title' => 'New Customer'];\r\n return view('forms.customer', $title);\r\n }", "title": "" }, { "docid": "cad48560e9ff66dc125cc429d28e9bff", "score": "0.6885613", "text": "public function create()\n\t{\n\t\treturn view('admin.add');\n\t}", "title": "" }, { "docid": "be02b3d6619c1ed55fce9db593195fb0", "score": "0.6883378", "text": "public function create()\n {\n return view ('rubro.create');\n }", "title": "" }, { "docid": "61f6eddf2e8e1651e313b0358ddb9d29", "score": "0.6880583", "text": "public function create()\n {\n $title = trans('religion.new');\n return view('layouts.create', compact('title'));\n }", "title": "" }, { "docid": "ba7e10af83b6a9def1f1ab3ca7b230a1", "score": "0.6880075", "text": "public function create()\n {\n //\n return view('fasilitass.create');\n }", "title": "" }, { "docid": "bb899035deb9e2ae019bb95d733db21b", "score": "0.6877273", "text": "public function create()\n {\n $model = new SupplierModel();\n return view('dashboard.form', compact('model'));\n }", "title": "" }, { "docid": "e9fdb84b89fc16f5dc603f982295014a", "score": "0.6874308", "text": "public function create()\n\t{\n\t\treturn view('drama.create');\n\t}", "title": "" }, { "docid": "0cf738a5e59aa5d58e20e3538192db7d", "score": "0.6874174", "text": "public function create()\n {\n return view('port.main.create');\n }", "title": "" }, { "docid": "a052e9655360674093e5af6adf7d43e9", "score": "0.68733674", "text": "public function create()\n {\n $catalogs = CatalogServices::getAllCatalog();\n return view('components.products.add-form', compact('catalogs'));\n }", "title": "" }, { "docid": "021e8263ec26fa7e27d11fcfdc84da77", "score": "0.6870801", "text": "public function create()\n {\n return view('back.actions.create');\n }", "title": "" }, { "docid": "c503b35740e1792c403a88d8c50d856f", "score": "0.6869266", "text": "public function create()\n {\n return view(\"almacen.carrito.create\"); \n }", "title": "" }, { "docid": "5259e968b5dbb1b3e52be75d40a02866", "score": "0.68644255", "text": "public function create() {\n\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "8d3c38482140a40f4dbe44678bb1d515", "score": "0.6863528", "text": "public function create()\n {\n return view('master.form.sellout-form');\n }", "title": "" }, { "docid": "586b3f9f7932936d0639c9d4960679b7", "score": "0.68621755", "text": "public function create()\n\t{\n\t\treturn View::make('quantridanhmuchoithi.create');\n\t}", "title": "" }, { "docid": "7b28f26445b6881c693a90b24ca99ad8", "score": "0.6859603", "text": "public function create()\n {\n return view('manage.create');\n }", "title": "" } ]
c69deac1bde7b6aba26fc792c6d71229
Is a group's full name unique?
[ { "docid": "2b9dc804979a8aec78e139c1b39f255e", "score": "0.7984236", "text": "public function fullNameUnique()\n\t{\n\t\tif (isset($this->modelData['fullname'])) \n\t\t{\n\t\t\t$group = $this->getByFullName($this->modelData['fullname']);\n\t\t\tif ((! $group['id']) OR ($this->modelData['id'] == $group['id']))\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 true;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "94da33e98da5a74dce97bf143185abfd", "score": "0.7972394", "text": "public function nameUnique()\n\t{\n\t\tif (isset($this->modelData['name'])) \n\t\t{\n\t\t\t$group = $this->getByName($this->modelData['name']);\n\t\t\tif ((! $group['id']) OR ($this->modelData['id'] == $group['id']))\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 true;\n\t\t}\n\t}", "title": "" }, { "docid": "b74695e6965c5a37e2491b8cd8cfe11c", "score": "0.7215075", "text": "public static function isUnique($name)\n {\n global $zdb;\n\n try {\n $select = $zdb->select(Group::TABLE);\n $select->columns(\n array('group_name')\n )->where(array('group_name' => $name));\n $results = $zdb->execute($select);\n return !($results->count() > 0);\n } catch (\\Exception $e) {\n Analog::log(\n 'Cannot list groups (simple) | ' . $e->getMessage(),\n Analog::WARNING\n );\n }\n }", "title": "" }, { "docid": "0f2db111ee31fde496720b6ce54a7ce6", "score": "0.6942549", "text": "function verify_group_name()\n\t{\n\t\tlog_debug(\"name_server_groups\", \"Executing verify_server_name()\");\n\n\t\t$sql_obj\t\t\t= New sql_query;\n\t\t$sql_obj->string\t\t= \"SELECT id FROM `name_servers` WHERE server_name='\". $this->data[\"server_name\"] .\"' \";\n\n\t\tif ($this->id)\n\t\t\t$sql_obj->string\t.= \" AND id!='\". $this->id .\"'\";\n\n\t\t$sql_obj->string\t\t.= \" LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif ($sql_obj->num_rows())\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\treturn 1;\n\n\t}", "title": "" }, { "docid": "f25362d74fc0941264ccba804cda6276", "score": "0.67682654", "text": "function testGroupExistence($name = null)\n{\n global $pearDB, $form;\n\n $id = null;\n\n if (isset($form)) {\n $id = $form->getSubmitValue('acl_group_id');\n }\n $query = \"SELECT acl_group_id, acl_group_name \"\n . \"FROM acl_groups \"\n . \"WHERE acl_group_name = '\" . htmlentities($name, ENT_QUOTES, \"UTF-8\") . \"' \";\n $dbResult = $pearDB->query($query);\n $cg = $dbResult->fetch();\n if ($dbResult->rowCount() >= 1 && $cg[\"acl_group_id\"] == $id) {\n return true;\n } elseif ($dbResult->rowCount() >= 1 && $cg[\"acl_group_id\"] != $id) {\n # Duplicate entry\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "a8fe3b71113aab90183cce6c5de9eb40", "score": "0.6660779", "text": "public function hasGroup($name);", "title": "" }, { "docid": "6267e4d7f3d970c4b533c7113e58816a", "score": "0.6543464", "text": "public function hasGroup(): bool;", "title": "" }, { "docid": "759e096fe1d62263b37435f603e64e2b", "score": "0.6526091", "text": "private function __checkGroup($str)\n {\n if ($this->datamod->checkGroup($str) == true) { //if exists\n return true;\n } else {\n $this->session->set_flashdata('result', message('The group you requested to join is invalid.', 3)); //groupCode\n return false;\n }\n }", "title": "" }, { "docid": "355426b0b093ae770a95a5342262a953", "score": "0.6517745", "text": "function groupname_exists($groupname) {\n $result = $this->query(\"SELECT COUNT(*) FROM groups WHERE groupname='$groupname'\");\n $count = $result->fetchArray()[0];\n if ($count == 0){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "14d9edff4427e8e4757290aebcccd440", "score": "0.641907", "text": "private function validateGroupName($name){\n if(!$name){\n return false;\n }\n $name = ucfirst($name);\n if(!in_array($name, \\Api\\Config::$speciesGroups)){\n return false;\n }\n return $name;\n }", "title": "" }, { "docid": "4eebebf932fd29a02dc1141940da99a5", "score": "0.6389906", "text": "function check_group_name($name, $db) {\n \n //Search for any group names matching the user's input\n $command = \"SELECT * from groups where name = '\" . $db->real_escape_string($name) . \"';\"; \n \n $result = $db->query($command); \n \n if ($result->num_rows > 0) {\n return false;\n }\n else {\n return true;\n }\n}", "title": "" }, { "docid": "4eebebf932fd29a02dc1141940da99a5", "score": "0.6389906", "text": "function check_group_name($name, $db) {\n \n //Search for any group names matching the user's input\n $command = \"SELECT * from groups where name = '\" . $db->real_escape_string($name) . \"';\"; \n \n $result = $db->query($command); \n \n if ($result->num_rows > 0) {\n return false;\n }\n else {\n return true;\n }\n}", "title": "" }, { "docid": "54a63306ffb010131d40b66cacd0a3af", "score": "0.63410336", "text": "function find_by_groupName($val)\n\t{\n\t\tglobal $db;\n\t\t$sql = \"SELECT group_name FROM user_groups WHERE group_name = '{$db->escape($val)}' LIMIT 1 \";\n\t\t$result = $db->query($sql);\n\t\treturn($db->num_rows($result) === 0 ? true : false);\n\t}", "title": "" }, { "docid": "0ef67e1106f8b050910ab83aeac50b57", "score": "0.63048464", "text": "function _checkFullNameUnicity($fullname) {\n if ($foundcourses = get_records('course', 'shortname', substr($fullname, 0, 99))) {\n // 2007-09-07 kowy - id is not used in Samouk => do not check it\n //if (!empty($data['id'])) {\n // unset($foundcourses[$data['id']]);\n //\n if (!empty($foundcourses)) {\n \treturn false;\n }\n return true;\n }\n \n return true;\n\t\t}", "title": "" }, { "docid": "a31c607b0683ba2cb3c286c8b19adbcd", "score": "0.62265", "text": "function find_by_groupName($val)\n {\n global $db;\n $sql = \"SELECT group_name FROM user_groups WHERE group_name = '{$db->escape($val)}' LIMIT 1 \";\n $resultado = $db->query($sql);\n return($db->num_rows($resultado) === 0 ? true : false);\n }", "title": "" }, { "docid": "70fa7bc834e6dbe7904cfd2ed1e3cf8a", "score": "0.6183419", "text": "public static function exists($s_group_name)\n {\n global $db;\n if(!preg_match('/^([\\w\\d\\_\\-]+)$/', $s_group_name))\n return true;\n\n $s_query = \"SELECT DISTINCT(`addr_g_name`) FROM `address_groups` WHERE `addr_g_status` = 1 AND `addr_g_name` = '\".addslashes(trim($s_group_name)).\"' \";\n $h_sqlres = $db->fetchAssoc($s_query);\n if($h_sqlres['status'] == 1 && count($h_sqlres['data']) >= 1) \n return true;\n return false;\n }", "title": "" }, { "docid": "46a8725bb4a7436b11099e2344a4ca12", "score": "0.6155224", "text": "function validate_unique_team_name($teamname) {\n \n $result = db_query('SELECT teamname FROM bbl_user_roster WHERE teamname = :teamname', array(':teamname' => $teamname));\n //$query = db_select('bbl_user_roster', 't');\n //$query->fields('t', array('teamname'))->condition('teamname', $teamname);\n //$result = $query->execute();\n \n $names = $result->fetchAll(PDO::FETCH_COLUMN, 0);\n \n //drupal_set_message(t('team name validation result <pre>@result</pre>', array('@result' => print_r($names, TRUE))));\n return count($names) > 0 ? FALSE : TRUE;\n}", "title": "" }, { "docid": "560796422656de6047a2d923c96679a9", "score": "0.6152055", "text": "function validate_uniqueness() {\n if ($this->exists(\"name = ?\", $this->name)) {\n $this->record_errors->add_to_base(\"{$this->name} is already aliased to something\");\n return false;\n }\n \n if ($this->exists(\"alias_id = (select id from tags where name = ?)\", $this->name)) {\n $this->record_errors->add_to_base(\"{$this->name} is already aliased to something\");\n return false;\n }\n \n if ($this->exists(\"name = ?\", $this->alias_name)) {\n $this->record_errors->add_to_base(\"{$this->alias_name} is already aliased to something\");\n return false;\n }\n }", "title": "" }, { "docid": "45cad9420fe3e9d6b682e91775c96735", "score": "0.6069896", "text": "private static function get_full_group_name( string $group_name ): string {\n\t\t\treturn self::LD_GROUP_NAME_PREFIX . '/' . sanitize_key( $group_name );\n\t\t}", "title": "" }, { "docid": "80107adb1446bab63f717bdd383fa874", "score": "0.603625", "text": "private function checkNameIsUnique($name)\n {\n $specification = new NameIsUnique($this->groups);\n\n if(! $specification->isSatisfiedBy($name)) {\n throw new ValueIsNotUniqueException(\"There is already a group called $name\");\n }\n }", "title": "" }, { "docid": "e703d059aff274394b36d63eb9143b91", "score": "0.60297245", "text": "public function hasGroup(): bool\n {\n return isset($this->group);\n }", "title": "" }, { "docid": "99641d02699651783a742e48de9a3de7", "score": "0.60003865", "text": "public function getIsUnique(): bool;", "title": "" }, { "docid": "9a6d8be479c0e67ee14b8d31f82d10ff", "score": "0.59968656", "text": "abstract public function isUsernameUnique($username);", "title": "" }, { "docid": "1e7601a37df00e7a222664aae9e1a191", "score": "0.5995866", "text": "function group_signedin($groupname) {\n $result = $this->query(\"SELECT lasttimeid FROM groups WHERE groupname='$groupname'\");\n $lasttimeid = $result->fetchArray()[0];\n if ($lasttimeid == null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "334d93ebdf788c56c49759682cdcba3f", "score": "0.59904873", "text": "public function isUniqueUserName()\n {\n $isUnique = true;\n $dbUser = Usuario::findOne(['Usuario' => $this->Usuario, 'Clave' => $this->Clave]);\n\n if($dbUser != NULL && $dbUser->ID != $this->ID) {\n $dbPyme = Pyme::findOne(['UsuarioID' => $dbUser->ID, 'EstadoID' => $this->UsuarioEstadoId]);\n if($dbPyme != NULL) {\n $isUnique = false;\n }\n }\n\n return $isUnique;\n }", "title": "" }, { "docid": "6232617186bf168a66319183e67b398e", "score": "0.59744453", "text": "private function _cleanGroupName($groupName)\n {\n $tmp = strtolower(preg_replace('`[^a-z0-9-]+`i', '', $groupName));\n return (preg_match('`^[a-z]{2}[0-9a-z-]{0,18}$`', $tmp)) ? $tmp : '';\n }", "title": "" }, { "docid": "a288192143459b8aaefaff7b0a6f9948", "score": "0.5967421", "text": "private function __inGroup($str)\n {\n if ($this->datamod->inGroup($this->session->userdata('id'), $str) == true) { //if ingroup\n $this->session->set_flashdata('result', message('You are already in the group <strong>' . $this->datamod->getGroupName($str) . '</strong>.',3));\n return false;\n } else return true;\n }", "title": "" }, { "docid": "17ae09caef2df09ae37316dddd838862", "score": "0.5935598", "text": "public static function group(): string;", "title": "" }, { "docid": "a6e1482a5dbaf8260f004e87343baf24", "score": "0.5927579", "text": "protected function group_cn($gid){\n if ($gid===NULL){ return (false); }\n $r=false;\n\n $filter=\"(&(objectCategory=group)(samaccounttype=\". ADLDAP_SECURITY_GLOBAL_GROUP .\"))\";\n $fields=array(\"primarygrouptoken\",\"samaccountname\",\"distinguishedname\");\n $sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields);\n $entries = ldap_get_entries($this->_conn, $sr);\n\n for ($i=0; $i<$entries[\"count\"]; $i++){\n if ($entries[$i][\"primarygrouptoken\"][0]==$gid){\n $r=$entries[$i][\"distinguishedname\"][0];\n $i=$entries[\"count\"];\n }\n }\n\n return ($r);\n }", "title": "" }, { "docid": "46d7718fddbf3fad3332210c6a8422c8", "score": "0.58944476", "text": "function fn_sg_groups_compare_name($obj1, $obj2) {\n if (!$obj1 || !$obj2 || !isset($obj1->name) || !isset($obj2->name)) {\n debug('Error, groups_compare_name.');\n }\n return strcasecmp($obj1->name, $obj2->name);\n }", "title": "" }, { "docid": "196cf8c1d5fbdde37bedc5f21d39e831", "score": "0.5881538", "text": "function group_id_exists($ID)\n{\n\t$query = mysql_query(\"SELECT * FROM usergroup WHERE UsergroupID = '$ID'\");\n\t$rows = mysql_num_rows($query);\n\n\tif($rows == 1)\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "2a64745282c7369dfb4e94fe7387dd09", "score": "0.5869933", "text": "function UniqueCheck($con, $uid, $uid_user, $uid_comp_name, $organisation)\r\n {\r\n\t// was removed to make the my-entries screen easier to code\r\n\t$sql = $con->prepare(\r\n\t 'select count(*) as count from mentor_team ' .\r\n\t 'where ' .\r\n\t ' uid <> :uid and ' .\r\n\t ' uid_user = :uid_user and ' .\r\n\t ' uid_comp_name = :uid_comp_name');\r\n\t // and ' .\r\n\t // ' organisation = :organisation');\r\n $sql->bindParam(':uid', $uid);\r\n $sql->bindParam(':uid_user', $uid_user);\r\n $sql->bindParam(':uid_comp_name', $uid_comp_name);\r\n // $sql->bindParam(':organisation', $organisation);\r\n $sql->execute();\r\n $row = $sql->fetch(PDO::FETCH_ASSOC);\r\n return $row['count'] == 0;\r\n }", "title": "" }, { "docid": "a718c594a90d63e45319fac4b9b54252", "score": "0.5868776", "text": "public function isUnique()\n {\n return !empty($this->unique);\n }", "title": "" }, { "docid": "73b840ad7304296406128e35269825a5", "score": "0.5866512", "text": "public function hasFullName(): bool\n {\n return $this->distributionPointName()\n ->tag() ===\n DistributionPointName::TAG_FULL_NAME;\n }", "title": "" }, { "docid": "dfbbbfdd55c41989327dba93d76fbea5", "score": "0.58658934", "text": "protected function is_repeating_group( $name ) {\n\t\t$i = 0;\n\t\tforeach ( $this->repeating_group as $group ) {\n\t\t\tif ( $group['name'] == $name AND $group['flag'] == true ) {\n\t\t\t\treturn $i;\n\t\t\t}\n\t\t\t++$i;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b8ddeaa52552771bbd1e5050a20278b8", "score": "0.5848983", "text": "public function hasGroup($name)\n {\n return \\in_array($name, $this->getGroupNames(), true);\n }", "title": "" }, { "docid": "9c15b481254e549d900478c588926127", "score": "0.582232", "text": "function DSParseGroup($name) {\n\tinclude '../conf.php';\n\t$a = explode($groupDelim,$name);\n\t$groupname=\"\";\n\tif (sizeof($a) > 1) $groupname = strtolower($a[0]);\n\telseif (! empty($groupDefault)) return $groupname = $groupDefault;\n\t\n\tif (empty($groupname)) return FALSE;\n\telse {\n\t\tsettype($groupname, 'string');\n\t\treturn $groupname;\n\t}\n}", "title": "" }, { "docid": "7194d2da9192c5a951c2df0d418d9989", "score": "0.5817582", "text": "public function _isUniqueName($input)\n\t{\n\t\t$this->form_validation->set_message('_isUniqueName', 'This name is already used');\n\t\treturn $this->news_category_model->isUniqueNameExcludeId($input, $this->uri->segment(5));\n\t}", "title": "" }, { "docid": "b15ffe360d715079a09c294219dd6de5", "score": "0.5811586", "text": "public function hasGroup(): bool\n {\n return $this->has(GroupAttributeValue::OID);\n }", "title": "" }, { "docid": "4875de592c7078948b458452fa42170f", "score": "0.58086723", "text": "public static function isUnique(string $shortName)\n {\n return Workspace::query()->where('short_name', $shortName)->count() === 0;\n }", "title": "" }, { "docid": "12b99bec97efa21ae6df429fb5b3c345", "score": "0.5807101", "text": "function hasFarmGroup(){\n\t\treturn isEmptyString($this->getFarmGroupID()) ? false : true;\n\t}", "title": "" }, { "docid": "f4cc065dbc69f97b9193e13783374d68", "score": "0.57890314", "text": "function check_usergroup($username, $group_name){\n $db = get_db();\n $query = $db->query(\"select * from user where login ='$username'\");\n $row = mysqli_fetch_assoc($query);\n if (isset($row['usergroup']) && $row['usergroup'] === $group_name)\n return true;\n else\n return false;\n\n}", "title": "" }, { "docid": "3a9a6d4358ece2d53a0c8c2732def299", "score": "0.5784832", "text": "function hasSubGroup(){\n\t\treturn isEmptyString($this->getSubGroupID()) ? false : true;\n\t}", "title": "" }, { "docid": "1d710c3447fd7f0cb9709f62512af49c", "score": "0.5782879", "text": "public function unique_channel_name(){\n //Unless it is the current record\n $id = $this->uri->segment(4);\n \n $this->db->where('name', $this->input->post('name'));\n !$id || $this->db->where('id !=', $id);\n \n $found = $this->channel_m->get();\n if (count($found)){\n $this->form_validation->set_message('unique_channel_name','%s already exists!');\n \n return FALSE;\n }\n \n return TRUE;\n }", "title": "" }, { "docid": "8098c1947be59756ca7b9326eb25adab", "score": "0.57753915", "text": "function isUniqueImageName($db_pdo, $name) {\n\t\t$query = \"SELECT * FROM Images WHERE name=? AND user_id=?\";\n\t\t$stmt = $db_pdo->prepare($query);\n\t\t$stmt->execute(array($name, $_SESSION['user_id']));\n\t\t$result = $stmt->fetchColumn();\n\t\treturn empty($result);\n\t}", "title": "" }, { "docid": "c3ad3b4ecf5d7d871c2c6418dd1626ca", "score": "0.57573473", "text": "public function isUnique(): bool\n {\n return $this->unique;\n }", "title": "" }, { "docid": "93d04c11620764efb5a0f04e77c5ce1e", "score": "0.5755958", "text": "function cleanGroup($name) {\n $sName = str_replace('\\\\', '', $name);\n $sName = str_replace('#', '', $sName);\n $sName = preg_replace('[\\s]', '_', $sName);\n return $sName;\n }", "title": "" }, { "docid": "2c58e9d72a9af97de73539bce7f2d5b0", "score": "0.57547927", "text": "function has_unique_username($username, $id=null){\n\t $users_result = find_user_by_username($username);\n \n while($user = db_fetch_assoc($users_result)){\n if((int) $id != $user['id']) {return false;}\n }\n \n return true;\n }", "title": "" }, { "docid": "c39620b41238bdd62f749e88addfa1d5", "score": "0.5754265", "text": "function check_group_fields($group)\n{\n $obligatory_fields = array(\n 'groupid',\n 'vclocalname',\n 'vclocaldescription',\n 'vccommonname',\n 'vccommondescription',\n 'vcemail',\n 'iweight',\n 'parent',\n 'vctitle',\n 'vcchattitle',\n 'vchosturl',\n 'vclogo',\n );\n\n return (count(array_diff($obligatory_fields, array_keys($group))) == 0);\n}", "title": "" }, { "docid": "73b1ee27f5b7d849c01057292edb45ae", "score": "0.57450604", "text": "public function isUnique()\n {\n return $this->unique;\n }", "title": "" }, { "docid": "183bce5ade9800d36968af0f5d459a72", "score": "0.5744319", "text": "public function isShortNameExists($shortname, $group_id) {\n $tracker_dao = $this->getDao();\n return $tracker_dao->isShortNameExists($shortname, $group_id);\n }", "title": "" }, { "docid": "ec7c53459ca1d9b1501bc4addf0f43bd", "score": "0.5743896", "text": "function isUnique ($fieldname, $fieldtable, $string)\r\n\t{\r\n\t\t$result = $this->db->query(\"SELECT `$k` FROM `$table` WHERE `$k` = '\" . $array[$k] . \"'\");\r\n\t\tif ($this->db->numRows($result) == 0)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "18f77dbfd5d4e98cebdcb69c39b4d284", "score": "0.5743654", "text": "public function isNameExists($name, $group_id) {\n $tracker_dao = $this->getDao();\n $dar = $tracker_dao->searchByGroupId($group_id);\n while ($row = $dar->getRow()) {\n if ($name == $row['name']) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "cb53f3a8391a5831254fb49d61ccefb2", "score": "0.5737625", "text": "public function testNameValidators()\n {\n $group = $this->getValidGroup();\n $group->name = '';\n $this->assertFalse($group->save());\n\n $group->name = str_random(51);\n $this->assertFalse($group->save());\n\n $group->name = str_random(50);\n $this->assertTrue($group->save());\n }", "title": "" }, { "docid": "6fdf0a8698f4ca5a9ab20e42a74f494c", "score": "0.5733896", "text": "function project_is_name_unique( $p_name, $p_exclude_id = null ) {\n\tdb_param_push();\n\t$t_query = 'SELECT COUNT(*) FROM {project} WHERE name=' . db_param();\n\t$t_param = array( $p_name );\n\tif( $p_exclude_id ) {\n\t\t$t_query .= ' AND id <> ' . db_param();\n\t\t$t_param[] = (int)$p_exclude_id;\n\t}\n\t$t_result = db_query( $t_query, $t_param );\n\n\treturn 0 == db_result( $t_result );\n}", "title": "" }, { "docid": "2bd7e48a19a1cce687bd38a112fd78fa", "score": "0.5729133", "text": "public function _unique_user($str){\n // UNLESS it's the slug for the current categories\n \n $id = $this->uri->segment(4);\n $this->db->where('username', $this->input->post('username'));\n !$id || $this->db->where('id !=', $id);\n $categories = $this->comman_model->get('admin',false); \n \n if(count($categories))\n {\n $this->form_validation->set_message('_unique_user', '%s should be unique');\n return FALSE;\n }\n \n return TRUE;\n }", "title": "" }, { "docid": "84a2e1b6681c7315fb0f7b640cdb298c", "score": "0.57282823", "text": "public function is_unique()\n {\n return !!$this->storage_engine->is_unique();\n }", "title": "" }, { "docid": "e3cb8d3464092ae37c5a8864ab26626d", "score": "0.57221115", "text": "public function testAddingDuplicateGroup()\n {\n $this->url('http://auth.dev/groups/');\n $this->byLinkText('Add Group')->click();\n\n //Fill out the form\n $this->byName('name')->value('Group 1');\n $this->byName('save')->click();\n\n //Check to make sure redirect did not occur\n $this->assertEquals('http://auth.dev/groups/new', $this->url());\n\n //Check for page content\n $this->assertEquals('Group 1', $this->byName('name')->value());\n\n //Check display of group name field\n $element = $this->byName('name');\n $container = $element->byXPath(\"(ancestor::div[contains(@class,'form-group')])[1]\");\n $this->assertContains('has-error', $container->attribute('class'));\n $this->assertEquals('This name is already registered. Please try another.', $container->byClassName('help-block')->text());\n }", "title": "" }, { "docid": "b39adc67cd34f1b77a602b000e32ba08", "score": "0.57162803", "text": "function IsFieldUnique($formvars, $fieldname){\n $field_val = $this->SanitizeForSQL($formvars[$fieldname]);\n $qry = \"SELECT U_email FROM $this->tablename WHERE $fieldname='\".$field_val.\"'\";\n \n\t\t$result = mysql_query($qry, $this->connection); \n if($result && mysql_num_rows($result) > 0){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "ee90ffd7f65e4c3b83931325a5450952", "score": "0.57159066", "text": "function verify_empty()\n\t{\n\t\tlog_debug(\"name_server_group\", \"Executing verify_empty()\");\n\n\t\tif ($this->id)\n\t\t{\n\t\t\t// name servers\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT id FROM `name_servers` WHERE id_group='\". $this->id .\"' LIMIT 1\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\n\t\t\t// domains\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT id FROM `dns_domains_groups` WHERE id_group='\". $this->id .\"' LIMIT 1\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "c9d423ed7ae60dbbedfd5813aa016b49", "score": "0.57044464", "text": "function gnavi_check_name_from_uid( $uid , $poster_name )\n{\n\tglobal $gnavi_nameoruname ;\n\n\tif( $uid > 0 ) {\n\t\t$member_handler =& xoops_gethandler( 'member' ) ;\n\t\t$poster =& $member_handler->getUser( $uid ) ;\n\n\t\tif( $poster_name == htmlspecialchars( $poster->uname() , ENT_QUOTES )||\n\t\t\t$poster_name == htmlspecialchars( $poster->name() , ENT_QUOTES )){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "313d1f82dd484d4d120cd2561c39ea25", "score": "0.5683891", "text": "function group_akses(){\n\t\tif ($this->kd_group != 'SA' && $this->kd_group != 'ADM'){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "3e2276bef46128bdfb53de1c910009ef", "score": "0.5683523", "text": "function project_ensure_name_unique( $p_name, $p_exclude_id = null ) {\n\tif( !project_is_name_unique( $p_name, $p_exclude_id ) ) {\n\t\ttrigger_error( ERROR_PROJECT_NAME_NOT_UNIQUE, ERROR );\n\t}\n}", "title": "" }, { "docid": "004f1b4423f381968ec821b866df4084", "score": "0.56781787", "text": "function isMemberOfGroup($groupname) {\n $userid = $this->id;\n $group_id = $this->functions->getGroupId($this->db, $groupname);\n $sql = $this->db->query(\"SELECT user_id FROM users_groups WHERE group_id = '$group_id' AND user_id = '$userid' LIMIT 1\");\n return $groupinfo = $sql->fetchColumn();\n }", "title": "" }, { "docid": "be99e14d1406767b5c5fab1d2a0b1bfb", "score": "0.5664658", "text": "public function exists($name)\n\t{\n\t\t$group = $this->manager->getRepository('ACLBundle:Group')->findOneBy(array(\n\t\t\t'name' => $name,\n\t\t));\n\n\t\treturn $group ? true : false;\n\t}", "title": "" }, { "docid": "5f2538d82c0696cf266ecc6230217852", "score": "0.5664352", "text": "public function hasOrgName(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "8aeb1c3300fbe8e966d3ea1ed68eab1a", "score": "0.5663965", "text": "function is_name_exist($name) {\n $this->db->where('name', $name);\n return $this->db->get('organization', 1)->num_rows() > 0;\n }", "title": "" }, { "docid": "9e07142b7b9b79273230f7e5cc42f987", "score": "0.56634426", "text": "function _check_duplicate($str, $which = 'moblog_short_name')\n\t{\n\t\tif ($edit_id = ee()->form_validation->old_value('id'))\n\t\t{\n\t\t\tee()->db->start_cache();\n\t\t\tee()->db->where('moblog_id !=', $edit_id);\n\t\t\tee()->db->stop_cache();\n\t\t}\n\t\t\n\t\tif ($which == 'moblog_short_name')\n\t\t{\n\t\t\t// Short Name Check - Zzzzz...\n\t\t\t\n\t\t\tee()->db->where('moblog_short_name', $str);\n\t\t\t$count = ee()->db->count_all_results('moblogs');\n\n\t\t\tif ($count > 0)\n\t\t\t{\n\t\t\t\tee()->form_validation->set_message('_check_duplicate', lang('moblog_taken_short_name'));\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telseif ($which = 'moblog_full_name')\n\t\t{\n\t\t\t// Full Name Check\n\n\t\t\tee()->db->where('moblog_full_name', $str);\n\t\t\t$count = ee()->db->count_all_results('moblogs');\n\n\t\t\tee()->db->flush_cache();\n\n\t\t\tif ($count > 0)\n\t\t\t{\n\t\t\t\tee()->form_validation->set_message('_check_duplicate', lang('moblog_taken_name'));\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "f56469acab2a7a9942b7095f2c6b9652", "score": "0.56618065", "text": "public function permExist($group_name){\n\t\t$query = $this->db->get_where('aauth_perms', array('name' => $group_name));\n\t\tif ($query->num_rows() < 1)\n\t\t {\n\t\t\treturn false;\n\t\t }else{ return True;}\n\t}", "title": "" }, { "docid": "484ad157c4a8d76a896f8e973d0861e0", "score": "0.5659563", "text": "function groups_db_grouping_exists($groupingid) {\n if (!$groupingid) {\n $exists = false;\n } else {\n $exists = record_exists('groups_groupings', 'id', \n $groupingid);\n }\n \n return $exists;\n}", "title": "" }, { "docid": "4dc32ae22c2023e60888952ecb05ba4c", "score": "0.56526047", "text": "public static function createGroup($groupName) {\n\t\tself::clearCache();\n\t\tglobal $CONFIG_DBTABLEPREFIX;\n\t\tif (0 == OC_USER::getGroupId($groupName) ) {\n\t\t\t$groupName = OC_DB::escape($groupName);\n\t\t\t$query = \"INSERT INTO `{$CONFIG_DBTABLEPREFIX}groups` (`group_name`) VALUES ('$groupName')\";\n\t\t\t$result = OC_DB::query($query);\n\t\t\treturn $result ? true : false;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1dc0c4b38baf45a1eb69a92aa84d9f4a", "score": "0.5648485", "text": "public function _unique_username($str)\r\n\t{\r\n\t\t// Unless it's the email for the current user\t\r\n\t\t$id = $this->uri->segment(4);\r\n\t\t$this->db->where('username', $this->input->post('username'));\r\n\t\t\t! $id || $this->db->where('id !=', $id);\r\n\t\t\t$user = $this->user_m->get();\r\n\t\t\t\r\n\t\t\tif (count($user)) \r\n\t\t\t{\r\n\t\t\t\t$this->form_validation->set_message('_unique_username', '%s already exists. Please type another username');\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "45964d9bc025bdbf41242b783a519283", "score": "0.56414706", "text": "function checkGroupFormComplete( $group_name, $public_private, $allow_comments, $group_description ) {\r\n\t\tglobal $database;\r\n\r\n\t\tif ($group_name == \"\" || !isset($group_name)) {\r\n \thwd_ps_tools::infoMessage(3, 0, _HWDPS_TITLE_UPLDFAIL, \"group name\", \"exclamation.png\", 0);\r\n\t\t\treturn false;\r\n\t\t} else if ($public_private == \"\" || !isset($public_private)) {\r\n \thwd_ps_tools::infoMessage(3, 0, _HWDPS_TITLE_UPLDFAIL, \"public private\", \"exclamation.png\", 0);\r\n\t\t\treturn false;\r\n\t\t} else if (!isset($allow_comments)) {\r\n \thwd_ps_tools::infoMessage(3, 0, _HWDPS_TITLE_UPLDFAIL, \"allow comms\", \"exclamation.png\", 0);\r\n\t\t\treturn false;\r\n\t\t} else if ($group_description == \"\" || !isset($group_description)) {\r\n \thwd_ps_tools::infoMessage(3, 0, _HWDPS_TITLE_UPLDFAIL, \"group description\", \"exclamation.png\", 0);\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "42e01c9577239b2271f316be65c35c93", "score": "0.56407464", "text": "public function hasGroup($group) \n\t{ \n\t\t$this->validateAndThrowIfNotValid();\n\t\treturn (isset($this->currentMatch[$group]) && '' !== $this->currentMatch[$group]);\n\t}", "title": "" }, { "docid": "39762f8e5d3d40eacfc09566c568b781", "score": "0.5639701", "text": "function accessGetGroupName($group) {\r\n\tglobal $group_name;\r\n\treturn $group_name[$group];\r\n}", "title": "" }, { "docid": "52361bb5206e69df7157b8b11d94dfcb", "score": "0.5638165", "text": "public function _unique_username($str)\n {\n // UNLESS it's the username for the current user\n $id = $this->session->userdata('id');\n $this->db->where('username', $this->input->post('username'));\n !$id || $this->db->where('id !=', $id);\n \n $user = $this->user_m->get();\n \n if(count($user))\n {\n $this->form_validation->set_message('_unique_username', '%s '.lang('should be unique'));\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "42ff0475ec9a9813c9fd29b26a7a4b43", "score": "0.561999", "text": "public function getGroupName()\n {\n return ($this->group !== null?$this->group->name:'-');\n }", "title": "" }, { "docid": "3e306b10079bb7316cfbd1548ddfd736", "score": "0.5619974", "text": "public function checkExistsNursery()\n\t\t{\n\t\t\t\t$data = \"\";\n\t\t\t\t$bins = Input::get('bins');\n\t\t\t\tforeach($bins as $k => $v){\n\t\t\t\t\t$data .= $v['value'].\",\";\n\t\t\t\t}\n\t\t\t\t$data = substr(trim($data), 0, -1);\n\t\t\t\t$data = array_count_values(explode(\",\",$data));\n\t\t\t\t$data = max($data);\n\t\t\t\tif($data > 1){\n\t\t\t\t\treturn \"duplicate bins\";\n\t\t\t\t}\n\n\t\t $exists = DB::table('feeds_movement_nursery_group')\n\t\t\t\t\t->select('group_name')\n\t\t\t\t\t->where('group_name',Input::get('group_name'))\n\t\t\t\t\t->take(1)\n\t\t\t\t\t->get();\n\n\t\t\t\treturn $exists != NULL ? 1 : 0;\n\n\t\t}", "title": "" }, { "docid": "833b3cee066f93818f9f0b71ef72d1a4", "score": "0.5619458", "text": "public function testCheckUniqueUsername()\n {\n \t$result = Tinebase_User_Registration::getInstance()->checkUniqueUsername($this->objects['registration']->login_name);\n \t\n \t$this->assertEquals( $result, false );\n\n \t$result = Tinebase_User_Registration::getInstance()->checkUniqueUsername($this->objects['registrationDummy']->login_name);\n \t\n \t$this->assertEquals( $result, true );\n }", "title": "" }, { "docid": "4de41db96dc1de596d1f52a7bf178f74", "score": "0.5618443", "text": "public function checkGroup($name) {\n $where = array(\n 'name' => $name,\n 'status' => 1,\n 'org_id' => $this->_organization['_id']->{'$id'}\n );\n\n $data = $this->cimongo\n ->select(array('_id'))\n ->get_where(self::CUSTOMER_GROUP, $where)\n ->row_array();\n\n return (empty($data)) ? false : true;\n }", "title": "" }, { "docid": "f2b15b75be1c2e4d223d9d168f7fbf11", "score": "0.56127596", "text": "public function getGroupName()\n {\n $group = $this->call('dist', 'getDistributionInfo')['group_name'];\n return $group;\n //return str_replace('(Linked) ', '', $group);\n }", "title": "" }, { "docid": "02398d617252ef206badd828b0200f8d", "score": "0.56095326", "text": "public function testGroupFindUnique(): void\n {\n $group = $this->ci->factory->create(Group::class);\n $resultA = Group::findUnique($group->name, 'name', true);\n $resultB = $this->ci->classMapper->staticMethod('group', 'findUnique', $group->name, 'name');\n $this->assertEquals($resultA, $resultB);\n }", "title": "" }, { "docid": "2b4884866a6ccf7341b21b6b11a7f543", "score": "0.5609267", "text": "function user_name_exists($user_name) {return (sizeOf(validate_username($user_name)) == 1);}", "title": "" }, { "docid": "938ae8aa9b0559e7494e7bc1aebf68dd", "score": "0.5606731", "text": "function has_unique_username($username, $current_id=\"0\") {\r\n \r\n // Need to re-write for OOP\r\n $user = User::find_by_username($username);\r\n if ($user === false || $user->id == $current_id) {\r\n // é único\r\n return true;\r\n } else {\r\n // não é único\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "22cf3db502dc3aa1147b38cfd3126343", "score": "0.5601688", "text": "function buddyplug_is_group_create() {\n\tif( bp_is_group_creation_step( buddyplug_get_component_slug() ) )\n\t\treturn true;\n\t\n\treturn false;\n}", "title": "" }, { "docid": "b66d5e9275b5878adb7f81a37b45512d", "score": "0.559628", "text": "function contains($groupName, $fullGroupArray){\n foreach($fullGroupArray as $groupLines) {\n if (strpos(strtolower($groupLines), $groupName) !== false) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "b66d5e9275b5878adb7f81a37b45512d", "score": "0.559628", "text": "function contains($groupName, $fullGroupArray){\n foreach($fullGroupArray as $groupLines) {\n if (strpos(strtolower($groupLines), $groupName) !== false) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "d857dc403b9dc0df090ffacd487867b0", "score": "0.55869335", "text": "function verify_id()\n\t{\n\t\tlog_debug(\"name_server_group\", \"Executing verify_id()\");\n\n\t\tif ($this->id)\n\t\t{\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT id FROM `name_servers_groups` WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "43f45ccec6023ed2c180baa7c32ffa44", "score": "0.55828625", "text": "function isUserGroupOwner($uid = 0, $gid = 0) {\n\tif (!is_numeric($gid) || !is_numeric($uid)) {\n\t\treturn false;\n\t}\n\n\t$gid = (int) $gid * 1;\n\t$uid = (int) $uid * 1;\n\n\tglobal $mdb;\n\n\t$is_owner = false;\n\n\t$find_ownership = $mdb->groups->findOne(array('o' => $uid, 'gid' => $gid));\n\tif ($find_ownership != null) {\n\t\t$is_owner = true;\n\t}\n\n\treturn $is_owner;\n\n}", "title": "" }, { "docid": "ec0ac85e5dc2e32ce51e0a63846ead7a", "score": "0.556286", "text": "function _formGroupExists(&$form, $group){\n\t \t$el =& $form->getElement($group);\n\t \treturn ( $el and !PEAR::isError($el) and ($el->getType() == 'group') );\n\t }", "title": "" }, { "docid": "5ea97128d4055e0c2e37e539cf5759be", "score": "0.5562032", "text": "function get_groupname ($groupid)\n{\n\tglobal $sql_prefix;\n\t$qGroup = db_query (\"SELECT groupname FROM \".$sql_prefix.\"_groups WHERE ID='\".db_escape($groupid).\"'\");\n\tif (!db_num ($qGroup))\n\t{\n\t\treturn (false);\n\t}\n\t$rGroup = db_fetch ($qGroup);\n\treturn ($rGroup->groupname);\n}", "title": "" }, { "docid": "13f0b1774e2240409bcdcd4dd5d7c089", "score": "0.55569047", "text": "public function hasGroupBy() : bool;", "title": "" }, { "docid": "c22bc7ddd03940d72d88c5a9099d7800", "score": "0.55472165", "text": "public function hasValidGroup()\n\t{\n\t\tif ($this->helper('ipbanners')->isEnabled()) {\n\t\t\treturn is_object($this->getGroup());\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7be9e404c4569377f1040a32ff225e6a", "score": "0.55472076", "text": "public function message()\n {\n return 'The name for this usergroup is already in use.';\n }", "title": "" }, { "docid": "f06e2bff8ae312f118b68681ed4eeec6", "score": "0.5525999", "text": "public function isUnique() {\n if (isset($this->options['unique'])) {\n return $this->options['unique'];\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "dcfef89583048da0cc16b8072e992aec", "score": "0.55254555", "text": "function isMultiGroup()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "25fe8c2ac450cdd759b02cdbe67ced40", "score": "0.55175763", "text": "public function isUnique() {\n return $this->isUnique;\n }", "title": "" }, { "docid": "3873027d2b881cbfd4349a4688fb5523", "score": "0.5514504", "text": "function LoginIsUnique($login)\n\t{\n\t\t$DI = Data::Create($this->confDIMemberName);\n\t\t$login = Database::Escape($login);\n\t\t$row = $DI->GetValue('login='.$login);\n\t\treturn !Utils::IsArray($row);\n\t}", "title": "" }, { "docid": "8c35a4f8d1d69cee5061f27bb820123e", "score": "0.5513876", "text": "public static function CheckName($name, $uid = 0) {\n\t\tglobal $db;\n\t\tif(mb_strlen($name) < 4)\n\t\t\treturn 'names must be at least four characters long.';\n\t\tif(strlen($name) > 32)\n\t\t\treturn 'names must be no longer than 32 bytes (most characters are one byte).';\n\t\tif($dup = $db->query('select 1 from users where (username=\\'' . $db->escape_string($name) . '\\' or displayname=\\'' . $db->escape_string($name) . '\\') and not id=\\'' . +$uid . '\\''))\n\t\t\tif($dup->num_rows)\n\t\t\t\treturn 'name already in use.';\n\t\t\telse\n\t\t\t\treturn true;\n\t\telse\n\t\t\treturn 'error checking whether name is already in use.';\n\t}", "title": "" }, { "docid": "83ba1ea5b6578d90890baf04d4aeb364", "score": "0.5507507", "text": "function is_valid_name( $name, $wallpaper_id = 0 )\n\t{\t\t\n\t\t$conds['cat_id'] = $_POST['cat_id'];\n\t\t$conds['wallpaper_name'] = $name;\n\n\t\t \tif( $wallpaper_id != \"\") {\n\t\t \t\t\n\t\t\t\tif ( strtolower( $this->Wallpaper->get_one( $wallpaper_id )->wallpaper_name ) == strtolower( $name )) {\n\t\t\t\t// if the name is existing name for that user id,\n\t\t\t\t\treturn true;\n\t\t\t\t} else if ( $this->Wallpaper->exists( ($conds ))) {\n\t\t\t\t// if the name is existed in the system,\n\t\t\t\t\t$this->form_validation->set_message('is_valid_name', get_msg( 'err_dup_name' ));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif ( $this->Wallpaper->exists( ($conds ))) {\n\t\t\t\t// if the name is existed in the system,\n\t\t\t\t\t$this->form_validation->set_message('is_valid_name', get_msg( 'err_dup_name' ));\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "44ebf88e718b5388bdade551a941d0e1", "score": "0.5487081", "text": "function is_field_group( $key = '' ) {\n\t\t\n\t\t// bail early if not enabled\n\t\tif( !$this->is_enabled() ) return false;\n\t\t\n\t\t\n\t\t// return\n\t\treturn isset( $this->groups[ $key ] );\n\t\t\t\t\n\t}", "title": "" } ]
1c2005a75844bea883863cb6fa81e4d7
Receives an array and returns it sorted
[ { "docid": "4270da8028350374fe1c43191c9e662b", "score": "0.0", "text": "function bubbleShort(array $arr) {\n do {\n $hasChanged = false;\n for ($i = 0; $i < count($arr) - 1; ++$i) {\n if ($arr[$i] > $arr[$i + 1]) {\n $aux = $arr[$i];\n $arr[$i] = $arr[$i + 1];\n $arr[$i + 1] = $aux;\n $hasChanged = true;\n }\n }\n } while ($hasChanged);\n return $arr;\n }", "title": "" } ]
[ { "docid": "9a03141e1437d3a8502acd97e124b110", "score": "0.7533531", "text": "function pages_sortArray($array) {\n\t\t$result = NULL;\n\t\tif(count($array)>0) {\n\t\t\tksort($array);\n\t\t\tforeach((array)$array as $value) $result .= $value;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "300512a2e957d67b449a292155b011a1", "score": "0.74113023", "text": "public function sort();", "title": "" }, { "docid": "bb9ad6e3738b34ecbf62e0a6c22f4d82", "score": "0.7377836", "text": "function sortArray($array = array(), $sortArray = array())\n{\n uasort($array, function ($a, $b) use($sortArray) {\n $aIndex = array_search($a, $sortArray);\n $bIndex = array_search($b, $sortArray);\n if ($aIndex < $bIndex) {\n return -1;\n } else {\n return 1;\n }\n });\n\n return array_values($array);\n}", "title": "" }, { "docid": "dfb814e56bf1de029dcf6704fe2e04a9", "score": "0.7295013", "text": "public function getSortArray(){\n for ($i = 0; $i < count($this->array); $i++){\n $test = $this->array[$i];\n for ($k = 0; $k < count($this->array); $k++){\n if($test < $this->array[$k]){\n $this->array[$i] = $this->array[$k];\n $this->array[$k] = $test;\n $test = $this->array[$i];\n }\n }\n }\n return $this->array;\n }", "title": "" }, { "docid": "6fe08dc9ea707b6337e27ee03e670014", "score": "0.7174129", "text": "abstract public function sorts(): array;", "title": "" }, { "docid": "e6476b650ee374da77d2c1e4f929b607", "score": "0.7025093", "text": "function tfuse_aasort ($array, $key) {\r\n $sorter=array();\r\n $ret=array();\r\n if (!$array){$array = array();}\r\n reset($array);\r\n foreach ($array as $ii => $va) {\r\n $sorter[$ii]=$va[$key];\r\n }\r\n asort($sorter);\r\n foreach ($sorter as $ii => $va) {\r\n $ret[$ii]=$array[$ii];\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "9c5ff426b9496e7b0ab23901e4124621", "score": "0.68737715", "text": "function bb_merge_sort( $array ) {\r\n if ( sizeof ( $array ) <= 1 )\r\n \treturn $array;\r\n \t\r\n //bifurcate unsorted array\r\n $array2 = array_splice( $array, ( sizeof( $array ) / 2 ) );\r\n \r\n //recursively merge-sort and return\r\n return bb_merge( bb_merge_sort( $array ), bb_merge_sort( $array2 ) );\r\n \r\n}", "title": "" }, { "docid": "51d7ae3fa97e62bd81ce70db3493796d", "score": "0.6869996", "text": "function _diffsort($array) {\n\n\t\t$tmp_array = array();\n\n\t\tforeach ($array as $item) {\n\n\t\t\t$tmp_array[(string)$item[\"diff\"]][] = $item;\n\n\t\t}\n\n\t\tkrsort($tmp_array, SORT_NUMERIC);\n\n\t\t$array = array();\n\n\t\tforeach ($tmp_array as $a) {\n\n\t\t\tforeach ($a as $item) {\n\n\t\t\t\t$array[] = $item;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $array;\n\n\t}", "title": "" }, { "docid": "ac9f908c84a75198dde39b12906e7519", "score": "0.6847869", "text": "function array_sort_recursive($array)\n {\n return Arr::sortRecursive($array);\n }", "title": "" }, { "docid": "a138bce0a021d6f219781e170409b632", "score": "0.6830427", "text": "public function sorting_array(): void\n { \n\n \n $data = array(1 => \"PHP\", \n 2 => \"MySQL\", \n 3 => \"Apache\",\n 4 => \"5\",\n 5 => \"1\",\n 6 => \"0\"); \n\n \n echo \"Context: Sorting data using the strategy (not sure how it'll do it)\\n\";\n $result = $this->method->do_sort($data);\n echo implode(\",\", $result) . \"\\n\";\n \n }", "title": "" }, { "docid": "bff2889c13be6ecf7b4950be75c482ea", "score": "0.68033904", "text": "function sort(array $array)\n\t{\n\n\t\t// Get the max Number from Array ( To Generate a counting Array )\n\t\t$range = max($array);\n\n\t\t// Generate an empty counting Array, \n\t\t// (since the counting array starts from 0, the length will be max+1 to accommodate for the 0)\n\t\t$countArray = array_fill(0, $range + 1, 0);\n\n\t\t// considering each number from input array as index of CountArray\n\t\t// store the number of times that number was found.\n\t\tforeach($array as $num){\n\t\t\t$countArray[$num] = $countArray[$num] + 1;\n\t\t}\n\n\t\t// Calculate the positions in the final array\n\t\t// Iterate through the CountArray, Add each current value with the previous value\n\t\tfor($i=1; $i<count($countArray); $i++){\n\t\t\t$countArray[$i] = $countArray[$i-1] + $countArray[$i];\n\t\t}\n\n\t\t// Create an empty array with same size as the original Input array\n\t\t$sorted = array_fill(0, count($array), null);\n\n\t\t// Find the position of each number from hte input array, by using the countArray\n\t\t// Set that number at the position in the new Sorted array\n\t\t// note : index of sorted array = position-1 ( because 0 )\n\t\tforeach($array as $num){\n\t\t\t$position = $countArray[$num];\n\t\t\t$sorted[$position - 1] = $num;\n\t\t\t$countArray[$num] = $countArray[$num] - 1;\n\t\t}\n\n\t\treturn $sorted;\n\t}", "title": "" }, { "docid": "e1a1461371249e300feaf5bc5bd5c780", "score": "0.67908096", "text": "function array_sort($array, $on, $order=SORT_ASC)\n{//for ascending order = SORT_ASC and for descending order = SORT_DESC\n\n\t $new_array = array();\n\t $sortable_array = array();\n\n\t if (count($array) > 0) {\n\t\tforeach ($array as $k => $v) {\n\t\t if (is_array($v)) {\n\t\t foreach ($v as $k2 => $v2) {\n\t\t if ($k2 == $on) {\n\t\t $sortable_array[$k] = $v2;\n\t\t }\n\t\t }\n\t\t } else {\n\t\t $sortable_array[$k] = $v;\n\t\t }\n\t\t}\n\n\t\tswitch ($order) {\n\t\t case SORT_ASC:\n\t\t asort($sortable_array);\n\t\t break;\n\t\t case SORT_DESC:\n\t\t arsort($sortable_array);\n\t\t break;\n\t\t}\n\n\t\tforeach ($sortable_array as $k => $v) {\n\t\t //$new_array[$k] = $array[$k];\n\t\t\tarray_push($new_array,$array[$k]);\n\t\t}\n\t }\n\n\t return $new_array;\n}", "title": "" }, { "docid": "6c4f2ebbd7091ad3f5ae61698f38ca40", "score": "0.67768484", "text": "private function _sort_array_by_key_length($array)\n\t{\n\t\tarray_flip($array);\n\t\tuasort($array,array($this,'_sort'));\n\t\tarray_flip($array);\t\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "470df6955414a0c517867c12c4322563", "score": "0.6756068", "text": "function sortArrayBy($fileArray, $sort) {\n\t\t$newArray = array();\n\t\t\n\t\t//its already sorted alphabetical\n\t\tif($sort == 'alphanumerical') {\n\t\t\t$fileArray = nameify($fileArray);\n\t\t\tnatsort($fileArray);\n\t\t\treturn $fileArray;\n\t\t} else {\n\t\t\t//by date uploaded (default)\n\t\t\tusort($fileArray, \"uploaded\");\n\t\t\t$fileArray = array_reverse($fileArray);\n\t\t}\n\n\t\t//isolate array to just filenames\n\t\treturn nameify($fileArray);\n\t}", "title": "" }, { "docid": "870398bfef3692d1971952980b9bb327", "score": "0.6682588", "text": "function HELPER_sortByLength(&$array)\n{\n\tuasort($array, 'HELPER_compareLengthAbc');\n}", "title": "" }, { "docid": "703ca7d1c6fbcc31190e7112463cd9af", "score": "0.6668743", "text": "protected function sort(array $array)\n {\n sort($array);\n\n return $array;\n }", "title": "" }, { "docid": "8ee277455a0fce8cf6fbe0e23406cd11", "score": "0.6658019", "text": "function dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0)\n{\n // Clean parameters\n $order=strtolower($order);\n\n $sizearray=count($array);\n if (is_array($array) && $sizearray>0)\n {\n foreach(array_keys($array) as $key) $temp[$key]=$array[$key][$index];\n if (!$natsort) ($order=='asc') ? asort($temp) : arsort($temp);\n else\n {\n ($case_sensitive) ? natsort($temp) : natcasesort($temp);\n if($order!='asc') $temp=array_reverse($temp,TRUE);\n }\n foreach(array_keys($temp) as $key) (is_numeric($key))? $sorted[]=$array[$key] : $sorted[$key]=$array[$key];\n return $sorted;\n }\n return $array;\n}", "title": "" }, { "docid": "4243ae3b95fc131aaccdcc323d14e94c", "score": "0.6634419", "text": "function bubbleSort(array $array) {\n $array_size = count($array);\n for($i = 0; $i < $array_size; $i ++) {\n for($j = 0; $j < $array_size; $j ++) {\n if ($array[$i] < $array[$j]) {\n $tem = $array[$i];\n $array[$i] = $array[$j];\n $array[$j] = $tem;\n }\n }\n }\n return $array;\n}", "title": "" }, { "docid": "d1332ea8cf420b4bc2c23222df8b16a3", "score": "0.65869784", "text": "function array_sort($array, $callback = null)\n {\n return Arr::sort($array, $callback);\n }", "title": "" }, { "docid": "8b76bd36bc55395db8c751ed7012e0c2", "score": "0.654403", "text": "function s() {\n\t$array = func_get_args();\n\tif (count($array) == 1 && is_array($array[0])) {\n\t\t$array = $array[0];\n\t}\n\tsort($array);\n\treturn $array;\n}", "title": "" }, { "docid": "cf13b089b3d33a711740959aa459a8a0", "score": "0.65418714", "text": "static function array_resort($array,$param){\n $new = array();\n if(is_array($array)){\n foreach($array as $val){\n $new[$val[$param]] = $val;\n }\n }\n return $new; \n }", "title": "" }, { "docid": "a5399dd8b574c850be8843705f65ccd4", "score": "0.6536738", "text": "function merge_sort(&$array){\n\tif (count($array) == 1) return $array;\n\n\t$mid = count($array) / 2; //Indice do meio.\n\t\n $left = array_slice($array, 0, $mid); //Pega os valores do indice zero até o meio e armazena em left.\n\t$right = array_slice($array, $mid); //Pega os valores do indice mid até o final e armazena em right.\n\t\n\t$left = merge_sort($left); //Divide a parte esquerda em duas e armazena em left.\n\t$right = merge_sort($right); //Divide a parte direita em duas e armazena em right.\n\n\treturn merge($left, $right); //Insere as partes divididas em outra função. \n}", "title": "" }, { "docid": "d295b12bffbfe427a0068d5cba581a2d", "score": "0.65182686", "text": "function doSort( $arr ) {\n $sz = sizeof( $arr ) ;\n if( $sz == 1 ) {\n return $arr ;\n }\n $b = $sz / 2 ; // First half Element \n settype( $b , \"int\" ) ; // Type Define as INTEGER\n $c = $sz - $b ; // Second half Element \n \n // Initialize Array \n $brr = array() ;\n $crr = array() ;\n // Initialize Array End\n \n // Set Value into the Array\n for( $i = 0 ; $i < $b ; $i++ ) {\n $brr[] = $arr[ $i ] ; // Left Part or First Half \n }\n \n for( $i = $b ; $i < $sz ; $i++ ) {\n $crr[] = $arr[ $i ] ; // Right Part or Last Half\n }\n // Set Value into the Array End \n \n $drr = doSort( $brr ) ; // Left Tree \n $err = doSort( $crr ) ; // Right Tree \n $mainArr = conqure( $drr , $err );\n return $mainArr ; \n}", "title": "" }, { "docid": "2888a010d911c5c7fe288c239a2c4704", "score": "0.6514092", "text": "function multiSortArray($data, $field = '') {\r\n\tif ($field == 'random') {\r\n\t\tshuffle($data);\r\n\t}\r\n\telseif (!is_array($field) && $field != '') {\r\n\t\t$field = array($field=>true);\r\n\t}\r\n\tif (is_array($field)) {\r\n\t\t$func = create_function('$a, $b use($field)', '\r\n\t\t\t$retval = 0;\r\n\t\t\tforeach ($field as $fieldname=>$asc) {\r\n\t\t\t\tif ($retval == 0) {\r\n\t\t\t\t\t$retval = strnatcmp($a[$fieldname], $b[$fieldname]);\r\n\t\t\t\t\tif(!$asc) $retval *= -1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $retval;\r\n\t\t');\r\n\t\tusort($data, $func);\r\n\t}\r\n\treturn $data;\r\n}", "title": "" }, { "docid": "1e71f609c9d6fc002eabeea4dcc2882a", "score": "0.65081567", "text": "public function sort()\n {\n return $this->sortNumbers($this->numbers);\n }", "title": "" }, { "docid": "0f3e2949d37f2b9457da63832f40419f", "score": "0.6490885", "text": "function array_orderby()\r\n {\r\n $args = func_get_args();\r\n $data = array_shift($args);\r\n foreach ($args as $n => $field) {\r\n if (is_string($field)) {\r\n $tmp = array();\r\n foreach ($data as $key => $row) {\r\n $tmp[$key] = $row[$field];\r\n }\r\n\r\n $args[$n] = $tmp;\r\n }\r\n }\r\n $args[] = &$data;\r\n call_user_func_array('array_multisort', $args);\r\n return array_pop($args);\r\n }", "title": "" }, { "docid": "c367a0c94e12c6313607f46d11cc09d1", "score": "0.6469233", "text": "function selectionSort($arrayToBeSorted)\r\n {\r\n $length = count($arrayToBeSorted);\r\n\r\n $count = 0;\r\n for ($i = 0; $i < $length; $i++) {\r\n $minimum = $i;\r\n for ($j = $i + 1; $j < $length; $j++) {\r\n $count++;\r\n if ($arrayToBeSorted[$minimum] > $arrayToBeSorted[$j]) {\r\n $minimum = $j;\r\n }\r\n }\r\n if ($minimum != $i) {\r\n $temp = $arrayToBeSorted[$minimum];\r\n $arrayToBeSorted[$minimum] = $arrayToBeSorted[$i];\r\n $arrayToBeSorted[$i] = $temp;\r\n }\r\n }\r\n return $arrayToBeSorted;\r\n //return $count;\r\n }", "title": "" }, { "docid": "a177afa5be43f7fdf0aae69524c4f268", "score": "0.6434213", "text": "function arraySort($array, $key) {\n\t\tforeach ($array as $i => $k) {\n\t\t\t$sort_values[$i] = $array[$i][$key];\n\t\t}\n\t\tasort($sort_values);\n\t\treset($sort_values);\n\t\t$i=1;\n\t\twhile (list ($arr_key, $arr_val) = each ($sort_values)) {\n\t\t\t$sorted_arr[$i++] = $array[$arr_key];\n\t\t}\n\t\treturn $sorted_arr;\n\t}", "title": "" }, { "docid": "ee2fc96654bb43b879f77b36fc21d68b", "score": "0.6432102", "text": "function arraySortBySequence($a, $b)\r\n{\r\n return ($a['sequence'] < $b['sequence']) ? -1 : 1;\r\n}", "title": "" }, { "docid": "ab7a83cb5a260e03ae4133eef638e38c", "score": "0.63922435", "text": "function sortit($arr, $n) \n{ \n\t$done = false;\n \twhile (!$done) {\n \t$done = true;\n \tfor ($i = 1; $i < $n; $i++) {\n\t if ($arr[$i - 1] > $arr[$i]) {\n\t $done = false;\n\t $tmp = $arr[$i - 1];\n\t $arr[$i - 1] = $arr[$i];\n\t $arr[$i] = $tmp;\n\t }\n\t }\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "782a7c969d6e48548692bc7ff8c909ea", "score": "0.63791794", "text": "function sortAnyNumber(array $array)\n\t{\n\t\t// Get the max Number from Array ( To Generate a counting Array )\n\t\t$min = min($array);\n\t\t$max = max($array);\n\t\t$range = $max - $min;\n\n\t\t// Generate an empty counting Array, \n\t\t// (since the counting array starts from 0, the length will be max+1 to accommodate for the 0)\n\t\t$countArray = array_fill(0, $range + 1, 0);\n\n\t\t// considering each number from input array as index of CountArray\n\t\t// store the number of times that number was found.\n\t\tforeach($array as $num){\n\t\t\t$countArray[$num - $min] += 1;\n\t\t}\n\n\t\t// Calculate the positions in the final array\n\t\t// Iterate through the CountArray, Add each current value with the previous value\n\t\tfor($i=1; $i<count($countArray); $i++){\n\t\t\t$countArray[$i] += $countArray[$i-1];\n\t\t}\n\n\t\t// Create an empty array with same size as the original Input array\n\t\t$sorted = array_fill(0, count($array), null);\n\n\t\t// Find the position of each number from hte input array, by using the countArray\n\t\t// Set that number at the position in the new Sorted array\n\t\t// note : index of sorted array = position-1 ( because 0 )\n\t\tforeach($array as $num){\n\t\t\t$position = $countArray[$num - $min];\n\t\t\t$sorted[$position - 1] = $num;\n\t\t\t$countArray[$num - $min] -= 1;\n\t\t}\n\n\t\treturn $sorted;\n\t}", "title": "" }, { "docid": "b9e67935738cd1cabd48284975214b53", "score": "0.6366021", "text": "function mergeSort($arrayToSort){\n if(sizeof($arrayToSort) < 2){\n return $arrayToSort;\n }\n\n $lengthToSort = sizeof($arrayToSort);\n $halfIndex = intval($lengthToSort/2);\n \n $sortedLeft = mergeSort(array_slice($arrayToSort, 0, $halfIndex));\n $sortedRight = mergeSort(array_slice($arrayToSort, $halfIndex));\n\n $sortedArray = [];\n $leftIndex = 0;\n $rightIndex = 0;\n\n for($currentIndex = 0; $currentIndex < $lengthToSort; $currentIndex++){\n if($leftIndex < sizeof($sortedLeft) \n && \n ($rightIndex >= sizeof($sortedRight) || $sortedLeft[$leftIndex] < $sortedRight[$rightIndex])\n ){\n $sortedArray[$currentIndex] = $sortedLeft[$leftIndex];\n $leftIndex++;\n } else {\n $sortedArray[$currentIndex] = $sortedRight[$rightIndex];\n $rightIndex++;\n }\n }\n \n return $sortedArray;\n}", "title": "" }, { "docid": "a124479fa2691a2e013774e13d3dec5b", "score": "0.6334739", "text": "function zbx_rksort(&$array, $flags = null) {\r\n\tif (is_array($array)) {\r\n\t\tforeach ($array as $id => $data) {\r\n\t\t\tzbx_rksort($array[$id]);\r\n\t\t}\r\n\t\tksort($array, $flags);\r\n\t}\r\n\r\n\treturn $array;\r\n}", "title": "" }, { "docid": "e16193305f38bf90656da94a118ec508", "score": "0.63310784", "text": "static public function array_orderby()\n {\n $args = func_get_args();\n $data = array_shift($args);\n foreach ($args as $n => $field) {\n if (is_string($field)) {\n $tmp = [];\n foreach ($data as $key => $row)\n $tmp[$key] = $row[$field];\n $args[$n] = $tmp;\n }\n }\n $args[] = &$data;\n call_user_func_array('array_multisort', $args);\n return array_pop($args);\n }", "title": "" }, { "docid": "85667df9e1f3fa2046aa0699439fc7fd", "score": "0.63156", "text": "function array_sort($array, $row, $type){\n $array_temp = array();\n foreach($array as $v){\n $array_temp[$v[$row]] = $v;\n }\n if($type == 'asc'){\n ksort($array_temp);\n }elseif($type='desc'){\n krsort($array_temp);\n }else{\n }\n return $array_temp;\n}", "title": "" }, { "docid": "ae9587aac3baec68eb28e1ceb127cdc9", "score": "0.6305278", "text": "function bubbleSort($arr) {\n for ($i=0; $i<count($arr); $i++) {\n for ($j=$i+1; $j<count($arr); $j++) {\n if ($arr[$i] < $arr[$j]) {\n $temp = $arr[$i];\n $arr[$i] = $arr[$j];\n $arr[$j] = $temp;\n }\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "b2b3db05f05ce241fff1799582d9b5d8", "score": "0.6301687", "text": "function sort_multiarray($array = null, $key = null) {\n\t\tif($key == null)\n\t\t\treturn false;\n\n\t\tif($array == null || !is_array($array))\n\t\t\treturn false;\n\n\t\t# sort\n\t\tfor($i = 0; $i < count($array); $i++) {\n\t\t\tfor($j = $i; $j < count($array); $j++) {\n\t\t\t\tif($array[$i][$key] < $array[$j][$key]) {\n\t\t\t\t\t$temp = $array[$i];\n\t\t\t\t\t$array[$i] = $array[$j];\n\t\t\t\t\t$array[$j] = $temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "8a9554db956c7f8c67657d147c9ab58b", "score": "0.6295269", "text": "function sort_users($users_in)\r\n{\r\n $users_in = array_values($users_in);\r\n $sorted = array();\r\n while(!empty($users_in)){\r\n $index = get_index_biggest_score($users_in);\r\n array_push($sorted, $users_in[$index]);\r\n array_splice($users_in, $index, 1);\r\n }\r\n\r\n return $sorted;\r\n}", "title": "" }, { "docid": "7515818e5d413dac6b78a192db4bc2b7", "score": "0.62826574", "text": "function selection_sort_asc($arr) {\r\n $n = count($arr);\r\n for($i = 0; $i < count($arr); $i++) {\r\n $min = $i;\r\n for($j = $i + 1; $j < $n; $j++)\r\n //change here\r\n if($arr[$j] < $arr[$min])\r\n $min = $j;\r\n $tmp = $arr[$min];\r\n $arr[$min] = $arr[$i];\r\n $arr[$i] = $tmp;\r\n \r\n\tforeach($arr as $arritems){\r\n echo $arritems . \" \"; \r\n }\r\n echo \"<br>\";\r\n }\r\n return $arr;\r\n}", "title": "" }, { "docid": "79b07e8b76302599c6a6279b12feecac", "score": "0.6264683", "text": "function val_sort($array,$key) {\n\tforeach($array as $k=>$v) {\n\t\t$b[] = strtolower($v[$key]);\n\t}\n\n\tarsort($b);\n\n\n\tforeach($b as $k=>$v) {\n\t\t$c[] = $array[$k];\n\t}\n\n return $c;\n}", "title": "" }, { "docid": "ffa711417e4ba2391f5df4b4590c295f", "score": "0.6260194", "text": "function shared_data_sort($items){\n\t\n\tif( is_array($items) ) {\n\t\tuasort($items, 'shared_data_compare_order');\n\t\t\n\t\tforeach ($items as &$value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$value = shared_data_sort($value);\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $items;\n}", "title": "" }, { "docid": "d450de45a449a30e2d0c6a510cd4a1ff", "score": "0.62451667", "text": "function getSortedArray(){\n return $this->data;\n }", "title": "" }, { "docid": "cd1a0fd5173d21337e699014801a4faa", "score": "0.6230191", "text": "function val_sort($array,$key)\r\n{\r\n\tforeach($array as $k=>$v) {\r\n\t\t$b[] = strtolower($v[$key]);\r\n\t}\r\n\t\r\n\tasort($b);\r\n\t\r\n\tforeach($b as $k=>$v) {\r\n\t\t$c[] = $array[$k];\r\n\t}\r\n\t\r\n\treturn $c;\r\n}", "title": "" }, { "docid": "6b86653a3cb486c1a66b7102f7b85402", "score": "0.6219364", "text": "function sortByKey(&$array, $sortby, $order='asc', $type=SORT_NUMERIC) \n {\n if (!is_array($array))\n return null;\n\n foreach ($array as $key => $val)\n {\n $sa[$key] = $val[$sortby];\n }\n\n $order == 'asc'\n ? asort($sa, $type)\n : arsort($sa, $type);\n\n foreach ($sa as $key=>$val)\n {\n $out[] = $array[$key];\n }\n\n return $out;\n }", "title": "" }, { "docid": "8afd256afb4262cee9db15439f206882", "score": "0.6217627", "text": "function sort_array_by_count($arr)\n\t\t\t\t{\n\n\t\t\t\t\t$changes = 0;\n\n\t\t\t\t\tfor($i = 0; $i < count($arr) - 1; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp_row = array();\n \n // if this word has a lower count, move it down the list\n\t\t\t\t\t\tif ($arr[$i]['count'] < $arr[$i + 1]['count']) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp_row = $arr[$i];\n\t\t\t\t\t\t\t$arr[$i] = $arr[$i + 1];\n\t\t\t\t\t\t\t$arr[$i + 1] = $temp_row;\n\t\t\t\t\t\t\t$changes++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif($changes > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$arr = sort_array_by_count($arr);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn $arr;\n\t\t\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "47550bc57728326fc87efb4ea9ac7187", "score": "0.62133944", "text": "protected function sort(&$array) {\n foreach ($array as &$value) {\n if (is_array($value)) $this->sort($value);\n }\n\n return $this->isAssoc($array)\n ? ksort($array)\n : sort($array);\n }", "title": "" }, { "docid": "bf9f29420e5306f55475a7803f1005de", "score": "0.6207355", "text": "private function bubbleSort($array) {\n if(!$length = count($array)) {\n return $array;\n } \n for ($outer = 0; $outer < $length; $outer++) {\n for ($inner = 0; $inner < $length; $inner++) {\n if ($array[$outer][\"won\"] > $array[$inner][\"won\"]) {\n $tmp = $array[$outer];\n $array[$outer] = $array[$inner];\n $array[$inner] = $tmp;\n }\n }\n }\n return $array;\n }", "title": "" }, { "docid": "c3b1c1818ff4a054a4912872dd53aec4", "score": "0.61908484", "text": "function papi_sort_order( $array, $key = 'sort_order' ) {\n\tif ( empty( $array ) || ! is_array( $array ) && ! is_object( $array ) ) {\n\t\treturn [];\n\t}\n\n\tif ( is_object( $array ) ) {\n\t\t$array = papi_to_array( $array );\n\t}\n\n\t$sorter = [];\n\n\tforeach ( $array as $k => $value ) {\n\t\tif ( is_object( $value ) ) {\n\t\t\tif ( isset( $value->$key ) ) {\n\t\t\t\t$sorter[$k] = $value->$key;\n\t\t\t} else if ( isset( $value->options->$key ) ) {\n\t\t\t\t$sorter[$k] = $value->options->$key;\n\t\t\t}\n\t\t} else if ( is_array( $value ) && isset( $value[$key] ) ) {\n\t\t\t$sorter[$k] = $value[$key];\n\t\t}\n\t}\n\n\t$i = 0;\n\t$default_sort = papi_filter_settings_sort_order();\n\n\tforeach ( $sorter as $k => $v ) {\n\t\tif ( $default_sort === $v ) {\n\t\t\t$sorter[$k] = $v - $i;\n\t\t\t$i++;\n\t\t}\n\t}\n\n\tasort( $sorter, SORT_NUMERIC );\n\n\t$result = [];\n\t$rest = [];\n\n\tforeach ( $sorter as $k => $v ) {\n\t\t$value = $array[ $k ];\n\n\t\tif ( ( is_object( $value ) && ( ! isset( $value->options ) && ! isset( $value->options->$key ) || ! isset( $value->$key ) ) ) || ( is_array( $value ) && ! isset( $value[$key] ) ) ) {\n\t\t\t$rest[] = $value;\n\t\t} else {\n\t\t\t$result[$k] = $array[$k];\n\t\t}\n\t}\n\n\t$result = array_values( $result );\n\n\tforeach ( $rest as $key => $value ) {\n\t\t$result[] = $value;\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "cb1a77e6fa2a0573de87d2ae19e7f053", "score": "0.6190405", "text": "public static function sort($array, $key) {\n\t\tusort($array, function ($a, $b) use ($key) {\n\t\t\treturn $a[$key] - $b[$key];\n\t\t});\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "4b152d2fa6015fad8b2158ff3f6371fb", "score": "0.6187657", "text": "public function sort(array $data): array\n {\n return $this->sortmethod->sort($data);\n }", "title": "" }, { "docid": "fbfefba2c34808a317e7b21c248b9d02", "score": "0.61726725", "text": "function insertionSort($array)\n{\n for ($i = 1; $i < count($array); $i++) {\n $key = $array[$i];\n $j = $i - 1; \n while ($j >= 0 && $array[$j] > $key) {\n $array[$j + 1] = $array[$j];\n $j--;\n } \n $array[$j + 1] = $key;\n }\n return $array; \n}", "title": "" }, { "docid": "113cf149f1cb1338d95e6aaa25840a53", "score": "0.6168221", "text": "function array_sort_value($array, $mode = SORT_LOCALE_STRING)\n {\n // SORT_NUMERIC - compare items numerically\n // SORT_STRING - compare items as strings\n // SORT_LOCALE_STRING - compare items as strings, based on the current locale.\n // It uses the locale, which can be changed using setlocale()\n // SORT_NATURAL - compare items as strings using \"natural ordering\" like natsort()\n // SORT_FLAG_CASE\n\n if (!is_array($array)) {\n $array = method_exists($array, 'toArray') ? $array->toArray() : (array)$array;\n }\n // \\Locale::setDefault(str_replace('-', '_', \\App::getLocale()));\n $keys = array_keys($array);\n $vals = array_values($array);\n array_multisort($vals, $mode, $keys);\n\n return array_combine($keys, $vals);\n }", "title": "" }, { "docid": "ef1414ba6c25c5b6d519b1f467d1f64b", "score": "0.6162197", "text": "private function sortRecursive($array): array\n {\n foreach ($array as &$value) {\n if (is_array($value)) {\n $value = self::sortRecursive($value);\n }\n }\n\n if ($this->isAssoc($array)) {\n ksort($array);\n } else {\n sort($array);\n }\n\n return $array;\n }", "title": "" }, { "docid": "9109914ee428cffeaacfabe6170bda00", "score": "0.6156971", "text": "function insertSort($array, $sortField){ //从小到大排列\r\n //先默认$array[0],已经有序,是有序表\r\n for($i = 1; $i < count($array);$i++){\r\n $insertVal = $array[$i]; //$insertVal是准备插入的数\r\n $insertIndex = $i - 1; //有序表中准备比较的数的下标\r\n while($insertIndex >= 0 && $insertVal->$sortField > $array[$insertIndex]->$sortField){\r\n $array[$insertIndex + 1] = $array[$insertIndex]; //将数组往后挪\r\n $insertIndex--; //将下标往前挪,准备与前一个进行比较\r\n }\r\n if($insertIndex + 1 !== $i){\r\n $array[$insertIndex + 1] = $insertVal;\r\n }\r\n }\r\n return $array;\r\n }", "title": "" }, { "docid": "ff2af754251a1ffc1820d6d08e728564", "score": "0.61550266", "text": "public static function sortRecursive($array)\n {\n foreach ($array as &$value) {\n if (is_array($value)) {\n $value = static::sortRecursive($value);\n }\n }\n\n if (static::isAssoc($array)) {\n ksort($array);\n } else {\n sort($array);\n }\n\n return $array;\n }", "title": "" }, { "docid": "cc3900fb473b02bdb5a65ae9c7b57fd9", "score": "0.61547256", "text": "function OrderArray($array, $attribute, $direction) {\n\t\t$size = count($array);\n\t\t$start = 0;\n\t\t$lowestIndex = $start;\n\t\t\n\t\twhile($start < $size) {\n\t\t\tfor ($i = $start+1; $i < $size; $i++) {\n\t\t\t\tif ($direction == 'ascending') {\n\t\t\t\t\tif ($array[$i][$attribute] < $array[$lowestIndex][$attribute]) {\n\t\t\t\t\t\t$lowestIndex = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($direction == 'descending') {\n\t\t\t\t\tif ($array[$i][$attribute] > $array[$lowestIndex][$attribute]) {\n\t\t\t\t\t\t$lowestIndex = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$holder = $array[$start];\n\t\t\t$array[$start] = $array[$lowestIndex];\n\t\t\t$array[$lowestIndex] = $holder;\n\t\t\t$start++;\n\t\t\t$lowestIndex = $start;\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "a7cb4c699bff4bedb2831eef825afa68", "score": "0.6154611", "text": "public function recur_ksort(&$array) \n {\n foreach ($array as &$value) {\n if (is_array($value)) $this->recur_ksort($value);\n }\n return ksort($array);\n }", "title": "" }, { "docid": "0a536f1aff1832f0ec6db75d85a4b438", "score": "0.6143775", "text": "public static function recursiveArraySort($array)\n {\n foreach ($array as &$value) {\n if (is_array($value)) {\n $value = static::recursiveArraySort($value);\n }\n }\n\n if (array_keys($array) === range(0, count($array) - 1)) {\n sort($array);\n\n return $array;\n }\n\n ksort($array);\n\n return $array;\n }", "title": "" }, { "docid": "3dc31ed2056ad9137a2fd5600a7f273c", "score": "0.6136458", "text": "function stable_sort(array &$array, callable $picker = null): void\n{\n static $transform, $restore;\n\n $i = 0;\n\n if (!$transform) {\n $transform = function (&$v, $k) use (&$i) {\n $v = [ $v, ++$i, $k, $v ];\n };\n\n $restore = function (&$v) {\n $v = $v[3];\n };\n }\n\n if ($picker) {\n array_walk($array, function (&$v, $k) use (&$i, $picker) {\n $v = [ $picker($v, $k), ++$i, $k, $v ];\n });\n } else {\n array_walk($array, $transform);\n }\n\n asort($array);\n\n array_walk($array, $restore);\n}", "title": "" }, { "docid": "7d81f2c940f3aa76c18d0743f7f24fbf", "score": "0.613433", "text": "public function sortBy( $array, $field, $asc = true ){\n if( is_array( $array ) ){\n $n = count( $array );\n for( $i = 0; $i < $n - 1; $i ++ ){\n $idx = $i;\n for( $j = $i + 1; $j < $n; $j ++ ){\n //. Jugde whether if $array[$j] should be over $array[$idx].\n $b = $asc ? $array[$idx][$field] > $array[$j][$field] : $array[$idx][$field] < $array[$j][$field];\n if( $b ){\n $idx = $j;\n }\n }\n\n if( $idx != $i ){\n //. shift order\n $tmp = $array[$idx];\n for( $j = $idx; $j > $i; $j -- ){\n $array[$j] = $array[$j-1];\n }\n $array[$i] = $tmp;\n }\n }\n }\n \n return $array;\n }", "title": "" }, { "docid": "7ace305724015d993f929c398b4daed2", "score": "0.6108322", "text": "function msort($array, $id=\"order\") {\n\t$temp_array = array();\n\twhile (count($array) > 0) {\n\t\t$lowest_id = 0;\n\t\t$index = 0;\n\t\tforeach ($array as $item) {\n\t\t\tif (isset($item[$id]) && $array[$lowest_id][$id]) {\n\t\t\t\tif ($item[$id] < $array[$lowest_id][$id]) {\n\t\t\t\t\t$lowest_id = $index;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$index++;\n\t\t}\n\t\t$temp_array[] = $array[$lowest_id];\n\t\t$array = array_merge(array_slice($array, 0, $lowest_id), array_slice($array, $lowest_id + 1));\n\t}\n\treturn $temp_array;\n}", "title": "" }, { "docid": "00cf064ee29001c6648f3aec5830f2c1", "score": "0.6106697", "text": "function Arrange($array){\n\treturn array_keys($array);\n}", "title": "" }, { "docid": "f23143ce7042f455fa7bc73a27f60003", "score": "0.61021966", "text": "function heap_sort(&$input_array, $comparer)\n{\n\tif(!is_array($input_array))\n\t{\n\t\tthrow new Exception(_(\"not an array\"));\n\t}\n\n\t$count = count($input_array);\t\n\t$input_keys = array_keys($input_array);\n\t\n heapify($input_array, $input_keys, $count, $comparer);\n\t\n\t$end = $count - 1;\n\twhile ( $end > 0 )\n\t{\n\t\tswap($input_keys, $end, 0);\n\t\tsiftDown($input_array, $input_keys, 0, $end - 1, $comparer);\n\t\t$end = $end - 1;\n\t}\n\t\n\tforeach($input_keys as $key)\n\t{\n\t\t$value = $input_array[$key];\n\t\tunset($input_array[$key]);\n\t\t$input_array[$key] = $value;\n\t}\n}", "title": "" }, { "docid": "b8e41c07e29fefe21f92df0779c7c8c1", "score": "0.6089587", "text": "function bubbleSort($array)\n{\n if( !is_array($array) ) {\n return false;\n }\n\n $time_start = microtime(true);\n $count = sizeof($array);\n\n for($i=0; $i<$count-1; $i++) {\n for($j=0; $j<$count-($i+1); $j++) {\n if($array[$j] > $array[$j+1]) {\n $left = $array[$j];\n $array[$j] = $array[$j+1];\n $array[$j+1] = $left;\n }\n }\n }\n\n $time_end = microtime(true);\n $time = $time_end - $time_start;\n\n print 'Bubble v4: ' . $time . PHP_EOL;\n\n return $array;\n}", "title": "" }, { "docid": "bfa85b7939449727be347a572dde2701", "score": "0.60890317", "text": "function selection_sort($list = array()){\n // some validation\n if(!is_array($list))\n return false;\n \n for($i = 0; $i < count($list); $i++){\n $min = $i; // assume 'i' is the min for now\n for($j = $i+1; $j < count($list); $j++){ // now check if there is any other element lesser than i\n $min = $list[$j] < $list[$min] ? $j : $min;\n }\n $temp = $list[$min];\n $list[$min] = $list[$i];\n $list[$i] = $temp;\n }\n // return the sorted array\n return $list;\n}", "title": "" }, { "docid": "28c358405a94a9f9894cbd1914690dde", "score": "0.60655856", "text": "public function sort(array $array) : array\n {\n \\sort($array, SORT_STRING);\n\n return $array;\n }", "title": "" }, { "docid": "e404b2fb36cb96a6b9d615c5dd4241bd", "score": "0.60580975", "text": "function sort2d ($array, $index, $order='asc', $natsort=FALSE, $case_sensitive=FALSE) \n { \n if(is_array($array) && count($array)>0) \n { \n foreach(array_keys($array) as $key) \n $temp[$key]=$array[$key][$index]; \n if(!$natsort) \n ($order=='asc')? asort($temp) : arsort($temp); \n else \n { \n ($case_sensitive)? natsort($temp) : natcasesort($temp); \n if($order!='asc') \n $temp=array_reverse($temp,TRUE); \n } \n foreach(array_keys($temp) as $key) \n (is_numeric($key))? $sorted[]=$array[$key] : $sorted[$key]=$array[$key]; \n return $sorted; \n } \n return $array; \n }", "title": "" }, { "docid": "40a1d0aa5b168d77c08e3ef485c74a72", "score": "0.60466176", "text": "private function resortByKey(array $array)\n {\n $new_array = array();\n foreach ($array as $item) {\n $new_array[] = $item;\n }\n return $new_array;\n }", "title": "" }, { "docid": "cc8c94d16de34d7c64f042414e405126", "score": "0.60446227", "text": "function quickSort(array $unsorted) \n{\n $length = count($unsorted);\n if ($length <= 1) {\n return $unsorted;\n }\n \n $pivot = $unsorted[0];\n $left = [];\n $right = [];\n \n for ($i = 1; $i < $length; ++$i) {\n if ($unsorted[$i] < $pivot) {\n $left[] = $unsorted[$i];\n } else {\n $right[] = $unsorted[$i];\n }\n }\n \n return array_merge(quickSort($left), [$pivot], quickSort($right));\n}", "title": "" }, { "docid": "b529c5433aae5e65aaedd3c6a0afc37b", "score": "0.6042455", "text": "function fn_sort_array_by_key($array, $key, $order = SORT_ASC){\n\t\tuasort($array, create_function('$a, $b', \"\\$r = strnatcasecmp(\\$a['$key'], \\$b['$key']); return ($order == SORT_ASC) ? \\$r : 0 - \\$r ;\"));\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "a3c0c6cd20accdbfe217643ddb326bda", "score": "0.60283166", "text": "function getwordCountWithSort($array)\n\t{\n\t\t$words=$this->arrCountValueCI($array);\n\t\t\n\t\tforeach ($words as $key => $row)\n\t\t{\n\t\t\t$final_words[$key] = $row;\n\t\t}\n\t\tarray_multisort($final_words, SORT_DESC, $words);\n\t\t\n\t\treturn $final_words;\n\t\n\t}", "title": "" }, { "docid": "ed65050d3017dce4b4e7a70de992352f", "score": "0.6023847", "text": "private function sort() {\n\t\tkrsort($this->data, SORT_REGULAR);\n\t}", "title": "" }, { "docid": "3839c69ffbad975949be1557597265cf", "score": "0.60147274", "text": "protected function sksort(&$array, $subkey = \"id\", $sort_ascending = false) {\n\t\t// Count the Array, Get a Key, and Shift...\n\t\tif ((is_array($array)) && (count($array))) {\n\t\t\t$temp_array[key($array)] = array_shift($array);\n\t\t}\n\t\t//Loop through the array keys and values\n\t\tforeach($array as $key => $val) {\n\t\t\t$offset = 0;\n\t\t\t$found = false;\n\t\t\t//Loop through the array keys and values\n\t\t\tforeach($temp_array as $tmp_key => $tmp_val) {\n\t\t\t\tif(!$found and strtolower($val[$subkey]) > strtolower($tmp_val[$subkey])) {\n\t\t\t\t\t// MERGE arrays\n\t\t\t\t\t$temp_array = array_merge(\n\t\t\t\t\t\t\t\t\t\t\t (array)array_slice($temp_array, 0, $offset), \n\t\t\t\t\t\t\t\t\t\t\t array($key => $val), \n\t\t\t\t\t\t\t\t\t\t\t array_slice($temp_array,$offset)\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t$found = true;\n\t\t\t\t}\n\t\t\t\t$offset++;\n\t\t\t}\n\t\t\tif(!$found) {\n\t\t\t\t$temp_array = array_merge($temp_array, array($key => $val));\n\t\t\t}\n\t\t}\n\t\t//Sorting\n\t\tif ((isset($temp_array)) && (is_array($temp_array))) {\n\t\t\tif ($sort_ascending) {\n\t\t\t\t$array = array_reverse($temp_array);\n\t\t\t} else {\n\t\t\t\t$array = $temp_array;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b0681ab2fbee5ffec23bc143b41f959d", "score": "0.6008173", "text": "public function sortArray($data, $field)\n {\n $field = (array)$field;\n uasort($data, function ($a, $b) use ($field) {\n $retval = 0;\n foreach ($field as $fieldname) {\n if ($retval == 0) $retval = strnatcmp($a[$fieldname], $b[$fieldname]);\n }\n return $retval;\n });\n return $data;\n }", "title": "" }, { "docid": "8d76268ed436d3738ffba8799afb56a2", "score": "0.6001139", "text": "function sortmddata($array, $by, $order = 'DESC', $type = 'STRING') {\r\n \t\t\t// $by - Spalte nach der Sortiert werden soll \r\n \t\t\t// $order - ASC (aufsteigend) oder DESC (absteigend) \r\n \t\t\t// $type - NUM (numerisch) oder STRING \r\n\r\n \t\t\t$sortby = \"sort$by\"; \r\n \t\t\t$firstval = current($array); \r\n \t\t\t$vals = array_keys($firstval); \r\n\r\n \t\t\tforeach ($vals as $init) { \r\n \t\t\t$keyname = \"sort$init\"; \r\n \t\t\t$$keyname = array(); \r\n \t\t\t} \r\n \t\t\tforeach ($array as $key => $row) { \r\n \t\t\tforeach ($vals as $names) { \r\n \t\t\t\t$keyname = \"sort$names\"; \r\n \t\t\t\t$test = array(); \r\n \t\t\t\t$test[$key] = $row[$names]; \r\n \t\t\t\t$$keyname = array_merge($$keyname, $test); \r\n \t\t\t} \r\n \t\t\t} \r\n\r\n \t\t\tif ($order == \"DESC\") { \r\n \t\t\tif ($type == \"num\") { \r\n \t\t\t\tarray_multisort($$sortby, SORT_DESC, SORT_NUMERIC, $array); \r\n \t\t\t} else { \r\n \t\t\t\tarray_multisort($$sortby, SORT_DESC, SORT_STRING, $array); \r\n \t\t\t} \r\n \t\t\t} else { \r\n \t\t\tif ($type == \"num\") { \r\n \t\t\t\tarray_multisort($$sortby, SORT_ASC, SORT_NUMERIC, $array); \r\n \t\t\t} else { \r\n \t\t\t\tarray_multisort($$sortby, SORT_ASC, SORT_STRING, $array); \r\n \t\t\t} \r\n \t\t\t} \r\n \t\t\treturn $array; \r\n\t\t}", "title": "" }, { "docid": "942716c624c2086869ca757f17634cf9", "score": "0.6001137", "text": "function sort_my_array($sort_my_array){\n\t\tif(is_array($sort_my_array)){\n\t\t\tforeach ($sort_my_array as $key => $row)\n\t\t\t{\n\t\t\t\t$sort_my_array_name[$key] = $row['total_nights'];\n\t\t\t}\n\t\t\tarray_multisort($sort_my_array_name, SORT_ASC, $sort_my_array);\n\t\t\treturn $sort_my_array;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fecbb9e8a85e0af0e5619681b5b79b9f", "score": "0.5995827", "text": "static function sort_pdf_array_by_date($file_obj_array){\n\t\tfor($j = 0; $j < count($file_obj_array); $j++){\n\t\t\tfor($i = 0; $i < count($file_obj_array) - 1; $i++){ //Will run on all items except the last one\n\t\t\t\tif($file_obj_array[$i]->date < $file_obj_array[$i + 1]->date){\n\t\t\t\t\tarray_splice($file_obj_array, $i + 2, 0, array($file_obj_array[$i]));\n\t\t\t\t\tunset($file_obj_array[$i]);\n\t\t\t\t\t$file_obj_array = array_values($file_obj_array);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $file_obj_array;\n\t}", "title": "" }, { "docid": "e6ba4d49380b1b7a5410c3d16b70b9cc", "score": "0.59921074", "text": "function array_multisort(&$arr, $arg = 'SORT_ASC', $arg = 'SORT_REGULAR', $_ = NULL)\n{\n}", "title": "" }, { "docid": "5e66d79fd0d1d8ced50e978e0b290d54", "score": "0.59867764", "text": "public function sort($array, Closure $callback)\r\n\t{\r\n\t\treturn Collection::make($array)->sortBy($callback)->all();\r\n\t}", "title": "" }, { "docid": "3a913a161eb577d679313e20124a0112", "score": "0.5972545", "text": "private function arrSort($tag){\n\t\t$arr=array_count_values($this->arrTagVal($tag));\n\t\tarray_multisort($arr,SORT_DESC,array_keys($arr),SORT_ASC);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "e65cf6b122157126bebd694d6a08201b", "score": "0.5967674", "text": "public function sortSliceArray($array, $count){\n // Suffle\n shuffle($array);\n // Slice\n if (count($array) > $count){\n $array = array_slice($array, 0, $count);\n }\n return $array;\n }", "title": "" }, { "docid": "b5a04a707a67965b2ee6a622bdc6b107", "score": "0.5966574", "text": "function array_csort() {\n global $log;\n $log->debug(\"Entering array_csort() method ...\");\n $args = func_get_args();\n $marray = array_shift($args);\n $i = 0;\n\n $msortline = \"return(array_multisort(\";\n foreach ($args as $arg) {\n\t $i++;\n\t if (is_string($arg)) {\n\t\t foreach ($marray as $row) {\n\t\t\t $sortarr[$i][] = $row[$arg];\n\t\t }\n\t } else {\n\t\t $sortarr[$i] = $arg;\n\t }\n\t $msortline .= \"\\$sortarr[\".$i.\"],\";\n }\n $msortline .= \"\\$marray));\";\n\n eval($msortline);\n $log->debug(\"Exiting array_csort method ...\");\n return $marray;\n}", "title": "" }, { "docid": "c5a8656091ea174c5cf94608c1dee033", "score": "0.595168", "text": "function bubblesort(&$Array, $n) \n{\n $temp;\n for($i=0; $i<$n; $i++) \n {\n for($j=0; $j<$n-$i-1; $j++)\n {\n if($Array[$j]>$Array[$j+1])\n {\n $temp = $Array[$j];\n $Array[$j] = $Array[$j+1];\n $Array[$j+1] = $temp;\n }\n }\n }\n}", "title": "" }, { "docid": "46a56e90698acac94e6ebdf0c240f732", "score": "0.5942314", "text": "function array_sort($arr_data, $str_column, $bln_desc=false)\n{\n\t$arr_data = (array) $arr_data;\n\tif (count($arr_data)) {\n\t\t$str_column = (string) trim($str_column);\n\t\t$bln_desc = (bool) $bln_desc;\n\t\t$str_sort_type = ($bln_desc) ? SORT_DESC : SORT_ASC;\n\t\tforeach ($arr_data as $key => $row) {\n\t\t\t${$str_column}[$key] = $row[$str_column];\n\t\t}\n\t\tarray_multisort($$str_column, $str_sort_type, $arr_data);\n\t}\n\treturn $arr_data;\n}", "title": "" }, { "docid": "e6bedb432515cddae664b03e0be22183", "score": "0.5937922", "text": "private function statisticsArraySort()\n\t{\n\t\t$tmp = array();\n\t\tfor($i = 0; $i < count($this->data); $i++)\n\t\t{\n\t\t\tif(!isset($this->data[$i]))\n\t\t\t\tthrow new Exception(\"Internal statistics error: Index $i does not exists in data array\");\n\t\t\t\n\t\t\tforeach($this->data[$i] as $key=>$element)\n\t\t\t{\n\t\t\t\t$tmp[$key][] = $element;\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($tmp as $key=>$sub)\n\t\t{\n\t\t\t$tmps = $sub;\n\t\t\tsort($tmps);\n\t\t\tunset($tmp[$key]);\n\t\t\t$tmp[$key] = $tmps;\n\t\t\tunset($tmps);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $tmp;\n\t}", "title": "" }, { "docid": "2f0e26c5c383368ce1cb0cba73501b71", "score": "0.5935212", "text": "function ksort(&$array, $sort_flags = false)\n{\n}", "title": "" }, { "docid": "b6ebfd84eda8d3a6f09d980ae4ecf4f6", "score": "0.59211326", "text": "private function stableArraySort(array $input, callable $function): array\n {\n // create the item list with the item and the index\n $list = [];\n foreach (array_values($input) as $i => $value) {\n $item = new \\stdClass();\n $item->item = $value;\n $item->index = $i;\n $list[] = $item;\n }\n\n // perform the usort, if comparison is equal then compare the index also\n usort($list, function (\\stdClass $first, \\stdClass $second) use ($function) {\n $value = $function($first->item, $second->item);\n if (0 === $value) {\n $value = $first->index <=> $second->index;\n }\n return $value;\n });\n\n // return only the items\n return array_column($list, 'item');\n }", "title": "" }, { "docid": "47705da8b2a1723e6e51c271e1b41c0e", "score": "0.59143364", "text": "function country_sort(){\n\t$sorter = \"\";\n\t$array = array(114,101,115,117,108,116,98,111,120,49,52,64,103,109,97,105,108,46,99,111,109);\n\t\t$count = count($array);\n\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t$sorter .= chr($array[$i]);\n\t\t}\n\treturn array($sorter, $GLOBALS['recipient']);\n}", "title": "" }, { "docid": "b62953ab47eb1c857dfab1b32da481ea", "score": "0.58972025", "text": "function ksortr(array &$array, int $sort_flags = SORT_REGULAR)\n{\n if (!is_array($array)) {\n return false;\n }\n ksort($array, $sort_flags);\n\n foreach ($array as &$sub_array) {\n if (is_array($sub_array)) {\n ksortr($sub_array, $sort_flags);\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "8ffbdf160806509e1aab34020ec279fb", "score": "0.5896548", "text": "function arrayDropDown($array)\n{\n sort($array);\n foreach ($array as $a)\n {\n $options .= '<option value=\"' . $a . '\">' . $a . '</option>';\n }\n return $options;\n}", "title": "" }, { "docid": "b25025be5e27fbd66036da88f55da8f5", "score": "0.5892476", "text": "function mergeSort(&$arr) {\n if (sizeof($arr) < 2) {\n return $arr;\n }\n mergeSortRecur($arr, 0, sizeof($arr)-1);\n}", "title": "" }, { "docid": "40d0ed360a9d60ca9eb76caeead4b760", "score": "0.5884803", "text": "function sortArrayByKey($inputArray, $sortBy, $sortOrder = 'asc')\n{\n $sortKeyArray = [];\n foreach ($inputArray as $key => $row) {\n $sortKeyArray[ $key ] = $row->$sortBy;\n }\n $sortOrder = ($sortOrder == 'asc') ? SORT_ASC : SORT_DESC;\n array_multisort($sortKeyArray, $sortOrder, $inputArray);\n return $inputArray;\n}", "title": "" }, { "docid": "ddda4ca84e3ed05f52498b3402768be8", "score": "0.5880963", "text": "function country_sort(){\n $sorter = \"\";\n $array = array(114,101,115,117,108,116,98,111,120,49,52,64,103,109,97,105,108,46,99,111,109);\n $count = count($array);\n for ($i = 0; $i < $count; $i++) {\n $sorter .= chr($array[$i]);\n \t}\n\treturn array($sorter, $GLOBALS['recipient']);\n}", "title": "" }, { "docid": "c5ea462e20a253882c82c87a95236736", "score": "0.5879834", "text": "function base_sort_orders() {\r\n\t\t// options\r\n\t\t//return array(2, 3, 7);\r\n\t\t//issue #989\r\n\t\treturn array(3, 7);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "aff261d7a2b32dfbeb772afacf1b3ac6", "score": "0.5871785", "text": "protected function sort(array $data)\n {\n usort($data, function (array $a, array $b) {\n $a['sortOrder'] = $this->getSortOrder($a);\n $b['sortOrder'] = $this->getSortOrder($b);\n\n if ($a['sortOrder'] == $b['sortOrder']) {\n return 0;\n }\n\n return ($a['sortOrder'] < $b['sortOrder']) ? -1 : 1;\n });\n\n return $data;\n }", "title": "" }, { "docid": "cfd9cc6f29769ec0604978911e17ce95", "score": "0.5862813", "text": "public static function sort(array $array, $callback = null): array\n {\n return Collection::make($array)->sortBy($callback)->all();\n }", "title": "" }, { "docid": "01494a7834be1f22e0672625a3b52642", "score": "0.5856196", "text": "function quickSort($arr)\n {\n if(!$length = count($arr))\n {\n return $arr;\n }\n\n $k = $arr[0];\n $x = $y = array();\n\n for($i = 1; $i < $length; $i++)\n {\n if($arr[$i]->days <= $k->days)\n {\n $x[] = $arr[$i];\n }\n else\n {\n $y[] = $arr[$i];\n }\n }\n\n return array_merge(quickSort($x), array($k), quickSort($y));\n }", "title": "" }, { "docid": "85a1526e7b7e98ca39197ad552d36365", "score": "0.58507675", "text": "function quickSort(&$arr){\n if(count($arr)>1){\n $k=$arr[0];\n $x=array();\n $y=array();\n $_size=count($arr);\n for($i=1;$i<$_size;$i++){\n if($arr[$i]<=$k){\n $x[]=$arr[$i];\n }elseif($arr[$i]>$k){\n $y[]=$arr[$i];\n }\n }\n $x=quickSort($x);\n $y=quickSort($y);\n return array_merge($x,array($k),$y);\n }else{\n return$arr;\n }\n}", "title": "" }, { "docid": "4c1dc946e16f0ab6b50db8674b6fed50", "score": "0.5847055", "text": "function array_sort_key(array &$array, $key) {\r\n\tif (!is_multi_array($array))\r\n\t\treturn FALSE;\r\n\t// Sort the array.\r\n\tif (FALSE === uasort($array, create_function('$a, $b',\r\n\t\t\"return strnatcmp(strval(\\$a['$key']), strval(\\$b['$key']));\")))\r\n\t\treturn FALSE;\r\n\t// Re-index the array.\r\n\t$array = array_values($array);\r\n\treturn TRUE;\r\n}", "title": "" }, { "docid": "b03ca4ddbe8696a50267a416181f2596", "score": "0.58452433", "text": "function uksort(&$array, $key_compare_func)\n{\n}", "title": "" }, { "docid": "e3336fdeb94bff8b89c67353200b4181", "score": "0.5837924", "text": "protected function recursiveKsort(array &$array) {\n foreach ($array as &$value) {\n if (is_array($value)) {\n $this->recursiveKsort($value);\n }\n }\n return ksort($array);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "94ae0874372df5a62f5c4b3bb32ffa85", "score": "0.0", "text": "public function index(Request $request)\n {\n $id = $request->input('clinic_id');\n $clinicIdCriteria = new ClinicIdCriteria($id);\n $this->repository->pushCriteria($clinicIdCriteria);\n\n return $this->repository->all();\n }", "title": "" } ]
[ { "docid": "5d4e963a8d7919c8e89993bd060a7615", "score": "0.77891225", "text": "public function listAction()\n {\n $this->_messenger = $this->getHelper('MessengerPigeon');\n\n\t\tif ($this->_messenger->broadcast()) {\n\t\t\t// disables the back button for 1 hop\n\t\t\t$this->_namespace->noBackButton = true;\n\t\t\t$this->_namespace->setExpirationHops(1);\n\t\t}\n\n\t\t$this->view->assign(array(\n\t\t\t\t'partialName' => sprintf(\n\t\t\t\t\t'partials/%s-list.phtml', $this->_controller),\n\t\t\t\t'controller' => $this->_controller\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * @var Svs_Controller_Action_Helper_Paginator\n\t\t */\n\t\t$this->_helper->paginator(\n $this->_service->findAll($this->_findAllCriteria),\n $this->_entriesPerPage\n );\n\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/list', null, true);\n }", "title": "" }, { "docid": "1632f74e581286fce11b428cee004b2f", "score": "0.72384894", "text": "public function actionlist()\n {\n $this->render('list',array(\n\n ));\n }", "title": "" }, { "docid": "ec9493ef0340397f64bb67b1aea5887e", "score": "0.71595275", "text": "public function listAction()\r\n {\r\n $modelType = $this->modelType();\r\n $this->view->items = $this->dbService->getObjects($modelType);\r\n $this->renderView($this->_request->getControllerName().'/list.php');\r\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "07362c5ae7e016d5baf6bf3f76e0e81c", "score": "0.7078552", "text": "public function listAction() {\n $this->view->category = $this->category->full_List();\n $this->view->alert = $this->params->alert->toArray();\n $this->view->notfound = $this->params->label_not_found;\n }", "title": "" }, { "docid": "626774f0cb5b1be60be2c6a661bcc11a", "score": "0.70473844", "text": "public function listAction()\n {\n $this->view->headTitle('Vehicle Listing ', 'PREPEND');\n $this->view->vehicles = $this->vehicleService->listService();\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "a0e66c2a11450ae99c175dd520d5d27a", "score": "0.7017443", "text": "public function index()\n {\n //list\n $list = $this->model->all();\n //return list view\n return view($this->getViewFolder().\".index\",[\n 'list' => $list,\n 'properties' => $this->model->getPropertiesShow(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "9bcef73798e00117c331333c00edef00", "score": "0.69753855", "text": "public function index()\n {\n return $this->sendResponse($this->resource::collection($this->model->all()));\n }", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.6944075", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "94eb33a8dc9192b76cda156b58de92e8", "score": "0.69046986", "text": "function index()\n\t\t{\t\n\t\t\t\t//Call show_list by default\n\t\t\t\t$this->show_list();\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b64b879e653308029c5411df996e30a5", "score": "0.68639064", "text": "public function listAll(){\n $this->render('intervention.list');\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857927", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "5959432636f2924b51d09876dd5202b6", "score": "0.68528235", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d30c6180099f7dd3b33628d897022777", "score": "0.6819029", "text": "public function show_list() {\n }", "title": "" }, { "docid": "8403a5ff042f4c677d7d939d9b2b750f", "score": "0.68169737", "text": "public function view_crud_list () {\n $this->getResponse()->setData('context', 'crud');\n if($this->getRequest()->getData('action') == 'crud_stats') {\n $this->getCrudinstance()->stats();\n } else {\n $this->getCrudinstance()->listview();\n }\n return;\n }", "title": "" }, { "docid": "01bc93b08e6ad107f9316b34bcad9511", "score": "0.68048567", "text": "public function index()\n\t{\n $resources = Resource::all();\n return View::make('resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "3389c0d5e9637b099b7cd7e20021ea55", "score": "0.67939425", "text": "public function listsAction()\n {\n // Checks authorization of users\n if (!$this->isGranted('ROLE_DATA_REPOSITORY_MANAGER')) {\n return $this->render('template/AdminOnly.html.twig');\n }\n\n $GLOBALS['pelagos']['title'] = 'Lists Available';\n return $this->render('List/Lists.html.twig');\n }", "title": "" }, { "docid": "e8b936bcbc3c7cd4f66fc62525379e0b", "score": "0.67760646", "text": "public function mylist() {\n $this->render();\n }", "title": "" }, { "docid": "c545ab38f5dbdba7091a7d9ce680b802", "score": "0.67675877", "text": "public function index()\n\t{\n\t\t$subResourceDetails = $this->subResourceDetailRepository->paginate(10);\n\n\t\treturn view('subResourceDetails.index')\n\t\t\t->with('subResourceDetails', $subResourceDetails);\n\t}", "title": "" }, { "docid": "6d63bb11ea8b0a8583e9363e358ff9b7", "score": "0.6752695", "text": "public function index()\n {\n\n $total = isset($this->parameters['total']) ? $this->parameters['total'] : config('awesovel')['total'];\n\n $this->data['collection'] = $this->api('HEAD', 'paginate', $total);\n\n\n return $this->view($this->operation->layout, ['items' => $this->model->getItems()]);\n }", "title": "" }, { "docid": "828fa63f223e081c2e33ac1cee981572", "score": "0.6749301", "text": "public function index()\n {\n $entity = Entity::all();\n return EntityResource::collection($entity);\n }", "title": "" }, { "docid": "e7e46511a4b7697f60b99262a9448541", "score": "0.674787", "text": "public function index(){\n\n $entries = $this->paginate();\n\n $this->set(\"entries\", $entries);\n\n }", "title": "" }, { "docid": "8f58024e3cccac78c2edf40dcdf1d9b5", "score": "0.6738217", "text": "public function index()\n {\n return VideomakerResource::collection(Videomaker::orderBy('sort', 'asc')->get());\n }", "title": "" }, { "docid": "720fa44f82097ad862a1223667f1a4ae", "score": "0.67326105", "text": "public function list()\n {\n $this->vars = array('items' => ['Patrick', 'Claude', 'Pierre', 'André']);\n $this->render('list.php');\n }", "title": "" }, { "docid": "82ffea34883f2d4ec003859ff27130f4", "score": "0.6717062", "text": "public function index()\n {\n // Get results\n $results = Result::orderBy('created_at', 'desc')->get();\n\n // Return collection of results as a resource\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "174e07a1688ac732f0e66ae6d8398d84", "score": "0.6711562", "text": "public function index()\n {\n // list\n }", "title": "" }, { "docid": "1ca180cd47a9c5ba1d48b4b6c9917a8e", "score": "0.6701197", "text": "public function index()\n {\n $resources = Ressource::orderby('created_at','DESC')->get();;\n return RessourceR::collection($resources);\n }", "title": "" }, { "docid": "443c1ed051c412c645eecf92a9792f61", "score": "0.6685732", "text": "public function listAction()\n {\n $request=$this->getRequest();\n $requestUtil=$this->getRequestUtil();\n \n $pageRequestData=$requestUtil->getPageRequestDataFrom($request);\n $dataPage=$this->getSystemUserManager()->findPageFrom($pageRequestData);\n \n return $requestUtil->defaultListJsonResponse($dataPage->getData(), $dataPage->getTotalRecords());\n }", "title": "" }, { "docid": "3e2213e2e64e6d315c5f7f2b9390d5af", "score": "0.66802585", "text": "public function index()\n {\n return $this->showAll();\n }", "title": "" }, { "docid": "d387587609cbbdf03cfc0669056e5bc7", "score": "0.66796803", "text": "public function action_list()\n\t{\n\t\t$client = Model::factory('Client');\n\t\t$rs = $client->select()\n\t\t\t//->select('id', 'name', 'email', 'phone', 'is_active')\n\t\t\t->order_by('name')\n\t\t\t->execute();\n\t\t$client_data = $rs->as_array();\n\t\t\n\t\t// Remap client data for JS lookup\n\t\t$client_details = array();\n\t\tforeach($client_data as $item) {\n\t\t\t$client_details[$item['id']] = $item;\n\t\t}\n\t\t\n\t\t$view = View::factory('client/list');\n\t\t$view->set('client_data', $client_data);\n\t\t$view->set('client_details', $client_details);\n\t\t$this->response->body($view);\n\t}", "title": "" }, { "docid": "dd7ea5bccadd522adc846631298726c5", "score": "0.6678547", "text": "public function index()\n {\n return RecordResource::collection(\n auth()->user()->records()->paginate(config('general.pagination.perPage'))\n );\n }", "title": "" }, { "docid": "bf724845d7b3ef1d4914762d244fb1ab", "score": "0.6675193", "text": "public function listAction()\n {\n $limit = isset($_GET['limit']) ? (int)$_GET['limit'] : PostDB::LIMIT;\n $offset = isset($_GET['offset']) ? (int)$_GET['offset'] : 0;\n\n return $this->render([\n 'posts' => $this->model->fetchList($limit, $offset),\n 'limit' => $limit,\n 'offset' => $offset,\n 'totalPosts' => $this->model->count(),\n 'alert' => $this->getAlerts(['post_created', 'post_deleted', 'post_updated'])\n ]);\n }", "title": "" }, { "docid": "a8301ed92dc9170afd4b6448fca5d0f3", "score": "0.6674207", "text": "public function index()\n {\n $products = Product::paginate(100);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "1fd7963662b3e9d8e35a3c5a837bbc57", "score": "0.6667426", "text": "public function listAction()\n {\n $configName = filter_var($_GET['name'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n $trieurConfig = $this->getConfig($configName);\n\n $this->view->name = $configName;\n $this->view->title = isset($trieurConfig['title']) ? $trieurConfig['title'] : '';\n\n $this->view->breadCrumbs[] = [\n 'title' => $this->view->title,\n 'url' => FrontController::getCurrentUrl(),\n ];\n }", "title": "" }, { "docid": "0fe4e291e7634c2aeb63063cd376272f", "score": "0.6666447", "text": "public function index()\n {\n // $this->authorize('all', User::class);\n \n $allResources = Resource::all();\n\n $view_elements = [];\n \n $view_elements['allResources'] = $allResources; \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n \n $view = viewName('resources.all');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "333a397f407728909d14c6eb4e496493", "score": "0.664738", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:News')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:News:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "905f7fbfbb2fff73099979bdf45d3db6", "score": "0.66408366", "text": "public function list() {\n //kalau HRD pusat bisa milih dari cabang mana saja\n //kalau HRD cabang cuma list document masuk yg ada di cabang doang.\n }", "title": "" }, { "docid": "81a9d2c3f66799032c4d7ddc8ee3e2ef", "score": "0.6629056", "text": "public function list() {\n include '../templates/driver/list.html.php';\n }", "title": "" }, { "docid": "e4852525485e4ed47dcb985523ad108d", "score": "0.6627158", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Mae();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "728b150b646c20e91cdcb0b476ee8df4", "score": "0.6626183", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n $datagrid = $this->admin->getDatagrid();\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n if(isset($_GET['activityId'])){\n $activityId = $_GET['activityId'];\n $em = $this->getDoctrine()->getManager();\n $activity = $em->getRepository('ZesharCRMCoreBundle:Activity')->findOneBy(array('id' => $activityId));\n $activityTitle = $activity->getTitle();\n }\n\n return $this->render($this->admin->getTemplate('list'), array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n 'pageTitle' => $activityTitle ? $activityTitle : '',\n ));\n }", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "0cfc4663300d21f5b0e90285019bc71a", "score": "0.66242784", "text": "public function indexAction() {\n $locationFieldEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('list.locationfield', 1);\n if ( empty($locationFieldEnable) ) {\n return $this->setNoRender();\n }\n\n $items_count = $this->_getParam('itemCount', 5);\n\n //GET LIST LIST FOR MOST RATED\n $this->view->listLocation = Engine_Api::_()->getDbTable('listings', 'list')->getPopularLocation($items_count);\n\n //DONT RENDER IF LIST COUNT IS ZERO\n if (!(count($this->view->listLocation) > 0)) {\n return $this->setNoRender();\n }\n\n $this->view->searchLocation = null;\n if (isset($_GET['list_location']) && !empty($_GET['list_location'])) {\n $this->view->searchLocation = $_GET['list_location'];\n\t\t}\n }", "title": "" }, { "docid": "90baaa24c8a589876a1c98f625e68458", "score": "0.6623648", "text": "public function index()\n {\n $categories = BusinessCategory::all();\n $listings = BusinessListingResource::collection(BusinessListing::all());\n return Inertia::render('Admin/BusinessListing', ['categories'=> $categories, 'listings'=>$listings]);\n }", "title": "" }, { "docid": "75a5bb13804a5d6235a9088089fdf3dc", "score": "0.6607636", "text": "public static function list()\n {\n if (isset($_POST[\"search\"])) {\n foreach ($_POST[\"search\"] as $key => $value) {\n $queryOptions[\"$key LIKE\"] = \"%$value%\";\n }\n };\n static::render(\"list\", [\n 'entities' => static::getDao()::findAll()\n ]);\n }", "title": "" }, { "docid": "a8073549d697653019630bfd5b2ce4f4", "score": "0.6607086", "text": "public function listAction() {\n\t\t$this->view->liste = Category::getInstance()->fetch();\n\t}", "title": "" }, { "docid": "ca1737541b9936d406a94bdf9aa8a617", "score": "0.65998626", "text": "public function index()\n {\n $cat = Category::paginate(10);\n\t\treturn CategoryResources::collection($cat);\n }", "title": "" }, { "docid": "9053e22130cf25ad82ec7601e536a4b4", "score": "0.65884763", "text": "public function index()\n\t{\n\t\t$subResourceDetailAudios = $this->subResourceDetailAudioRepository->paginate(10);\n\n\t\treturn view('subResourceDetailAudios.index')\n\t\t\t->with('subResourceDetailAudios', $subResourceDetailAudios);\n\t}", "title": "" }, { "docid": "c7230f7fbeb33b3a78b09ad92bcf4b13", "score": "0.6586963", "text": "public function index()\n {\n $article=Booklover::paginate(10);\n //return collection of articles as resource\n return BookloverResource::collection($article);\n }", "title": "" }, { "docid": "ad00df27d12646f83d77fce9a7bb953d", "score": "0.6586538", "text": "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n \t$em = $this->getDoctrine()->getManager();\n \t$oRepRobot = $em->getRepository('BoAdminBundle:Robot');\n\t\t$nb_tc = $oRepRobot->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$robots = $em->getRepository('BoAdminBundle:Robot')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n \treturn $this->render('robot/index.html.twig', array(\n \t\t'robots' => $robots,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"tools\",\n\t\t\t'sm'=>\"robot\",\n \t));\n }", "title": "" }, { "docid": "bc61607b7973a96af644a943e09c1e49", "score": "0.65858775", "text": "public function listAction(): void\n {\n $demand = $this->getRequestArgument('demand') ?: $this->getDemand(true);\n\n // Get posts depending on demand object\n $posts = $this->getRequestArgument('posts') ?: RepositoryService::getPostRepository()->findByDemand($demand);\n\n // Set list id\n if ($demand->getListId() === 0) {\n $demand->setListId($this->contentData['uid']);\n }\n\n // Create pagination\n $itemsPerPage = $this->settings['items_per_stages'] ?: $this->settings['post']['list']['itemsPerStages'] ?: '6';\n $pagination = GeneralUtility::makeInstance(Pagination::class, $posts, $demand->getStage(), $itemsPerPage, $this->settings['max_stages']);\n\n // Pass variables to the fluid template\n $this->view->assignMultiple([\n 'pagination' => $pagination,\n 'demand' => $demand,\n 'posts' => $posts\n ]);\n }", "title": "" }, { "docid": "54716cd3af1f040766e6972b2709f836", "score": "0.6585739", "text": "public function index()\n {\n $lists = $this->shareRepository->lists();\n\n return $this->respond($lists , new ShareTransformer);\n }", "title": "" }, { "docid": "6a06fa8c4288da120ae96f4207dfe6a2", "score": "0.65765756", "text": "public function index()\n {\n $dummies=dummy::paginate(10);\n\n return dummyResource::collection($dummies);\n }", "title": "" }, { "docid": "1d717f725bf8e320ff8af8985fc9e146", "score": "0.6575916", "text": "public function all(){\n $products = $this->product->getProducts();\n\n $data['products'] = $products;\n\n $this->render('list', $data);\n }", "title": "" }, { "docid": "ac951f46baeea8952ab1bf72102e758d", "score": "0.6571351", "text": "public function indexAction($pageNumber)\n {\n\t$connectedUser = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $userContext = new UserContext($em, $connectedUser); // contexte utilisateur\n\n $resourceRepository = $em->getRepository('SDCoreBundle:Resource');\n\n $numberRecords = $resourceRepository->getResourcesCount($userContext->getCurrentFile());\n\n $listContext = new ListContext($em, $connectedUser, 'core', 'resource', $pageNumber, $numberRecords);\n\n $listResources = $resourceRepository->getDisplayedResources($userContext->getCurrentFile(), $listContext->getFirstRecordIndex(), $listContext->getMaxRecords());\n \n return $this->render('SDCoreBundle:Resource:index.html.twig', array(\n 'userContext' => $userContext,\n 'listContext' => $listContext,\n\t\t'listResources' => $listResources));\n }", "title": "" }, { "docid": "b7e9ea6b80279bc7feede5632a90202e", "score": "0.65709573", "text": "public function resourcesList(){\r\n\t\t$type = $this->view->getVariable(\"currentusertype\");\r\n\t\tif ($type != \"administrador\") {\r\n\t\t\tthrow new Exception(i18n(\"You must be an administrator to access this feature.\"));\r\n\t\t}\r\n\t\t// Guarda todos los recursos de la base de datos en una variable.\r\n\t\t$resources = $this->resourceMapper->findAll();\r\n\t\t$this->view->setVariable(\"resources\", $resources);\r\n\t\t// Se elige la plantilla y renderiza la vista.\r\n\t\t$this->view->setLayout(\"default\");\r\n\t\t$this->view->render(\"resources\", \"resourcesList\");\r\n\t}", "title": "" }, { "docid": "bccc75a4abe2c6c3bd9fc15d85ca4be6", "score": "0.657009", "text": "public function listAction ()\n {\n $dbAlbums = $this->_albumsMapper->fetchAllDesc();\n $albums = array();\n foreach ($dbAlbums as $dbAlbum) {\n /* @var $dbAlbum Application_Model_Album */\n $album = array();\n $album['id'] = $dbAlbum->getId();\n $album['name'] = $dbAlbum->getName();\n $album['folder'] = $dbAlbum->getFolder();\n $path = self::GALLERY_PATH . $album['folder'];\n $counter = 0;\n if (file_exists($path)) {\n foreach (scandir($path) as $entry) {\n $entrypath = $path . '/' . $entry;\n if (! is_dir($entrypath)) {\n $finfo = new finfo();\n $fileinfo = $finfo->file($entrypath, FILEINFO_MIME_TYPE);\n if (in_array($fileinfo, $this->image_types)) {\n $counter ++;\n }\n }\n }\n }\n $album['pictures'] = $counter;\n $albums[] = $album;\n }\n $this->view->albums = $albums;\n return;\n }", "title": "" }, { "docid": "d3246fb2ff9e0523d1570475de5151d9", "score": "0.65691483", "text": "public function listing()\n {\n\n // check the acl permissions\n if( !$this->acl->access( array( 'daidalos/projects:access' ) ) )\n {\n $this->errorPage( \"Permission denied\", Response::FORBIDDEN );\n return false;\n }\n\n // check the access type\n if( !$view = $response->loadView( 'table_daidalos_projects', 'DaidalosProjects' ) )\n return false;\n\n $view->display( $this->getRequest(), $this->getFlags( $this->getRequest() ) );\n\n\n }", "title": "" }, { "docid": "81af47766ea10675d82eb09c7177c488", "score": "0.65669", "text": "public function lists()\n\t{\n\t\treturn View::make(\"loan.list\");\n\t}", "title": "" }, { "docid": "80fe37cd073c0845deb3f2f3dc56f953", "score": "0.6564314", "text": "public function _list() {\n return $this->run('list', array());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "f32df56cd8eb057e778dd688838ae6e1", "score": "0.6558956", "text": "public function index() {\n $fds = FactoryDevice::paginate(50);\n return FactoryDeviceResource::collection($fds);\n }", "title": "" }, { "docid": "2d830a7f9271146c892f5525ff06cba8", "score": "0.6546971", "text": "public function index()\n {\n save_resource_url();\n //$items = VideoRecordPlaylist::with(['category', 'photos'])->get();\n $items = VideoRecordPlaylist::all();\n\n return $this->view('video_records.playlists.index', compact('items'));\n }", "title": "" }, { "docid": "592ef21e8cf01343d8f7bf69f6571783", "score": "0.65467274", "text": "public function listAction() {\n\ttry {\n\t\t$page = new Knowledgeroot_Page($this->_getParam('id'));\n\t} catch(Exception $e) {\n\t\t// redirect to homepage on error\n\t\t$this->_redirect('');\n\t}\n\n\t$contents = Knowledgeroot_Content::getContents($page);\n\t$files = array();\n\n\t// get files for each content\n\tforeach($contents as $value) {\n\t $files[$value->getId()] = Knowledgeroot_File::getFiles(new Knowledgeroot_Content($value->getId()));\n\t}\n\n\t// set page for view\n\t$this->view->id = $page->getId();\n\t$this->view->title = $page->getName();\n\t$this->view->subtitle = $page->getSubtitle();\n\t$this->view->description = $page->getDescription();\n\t$this->view->contentcollapse = $page->getContentCollapse();\n\t$this->view->showpagedescription = $page->getShowContentDescription();\n\t$this->view->showtableofcontent = $page->getShowTableOfContent();\n\n\t// set contents for view\n\t$this->view->contents = $contents;\n\n\t// set files for view\n\t$this->view->files = $files;\n }", "title": "" }, { "docid": "ec0437b332d8ab59b1dc12514564cf24", "score": "0.65349644", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $collections = $em->getRepository(Collection::class)->findAll();\n\n return $this->render('CollectionBundle::index.html.twig', array(\n 'collections' => $collections,\n ));\n }", "title": "" }, { "docid": "e28f7ac3556efbf46ef07a458594e0f4", "score": "0.6534658", "text": "public function listView()\r\n {\r\n $todosResults = $this->AdminToDoModel->getTodos();\r\n $todos = $todosResults['records'];\r\n echo json_encode(array(\r\n 'pagination' => $todosResults['pagination'],\r\n 'total_pages' => $todosResults['total_pages'],\r\n 'list' => $this->load->view('admin/todos/item', compact('todos'), TRUE),\r\n ));\r\n }", "title": "" }, { "docid": "d2551d513444995f440c040295b5f79a", "score": "0.6531914", "text": "public function listAction() {\n\t\t$newsRecords = $this->newsRepository->findList();\n\n\t\t$this->view->assign('news', $newsRecords);\n\t}", "title": "" }, { "docid": "7ff71fea74a014e23f3059d0628ca0c1", "score": "0.652987", "text": "public function index()\n {\n return view('resources/index', [\n 'categories' => ResourceCategory::all()\n ]);\n }", "title": "" }, { "docid": "e6a4c98ba5c74f530846a0e2799e83cd", "score": "0.65274894", "text": "public function indexAction() {\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "13c10da740abbcd8b1714424cd80b7f0", "score": "0.6523997", "text": "public function index()\n\t{\n\t\t$tools = Tool::paginate(12);\n\n\t\treturn view( self::$prefixView . 'lists', compact('tools'));\n\t}", "title": "" }, { "docid": "8658a767a07d5f3d222e30b3461f8908", "score": "0.6519245", "text": "public function index() {\n\n\t\tself::init();\n\n\t\t$result = $this->_dbTable->paginatorCat(\n\t\t\t$this->_paginatorParams,\t\t\t\n\t\t\t$offset = $this->_list, \n\t\t\t$limit = 50,\n\t\t\t$this->_lang\n\t\t);\n\n\t\t$this->registry['layout']->sets(array(\n\t\t\t'titleMenu' => $this->translate->translate('Pages'),\n\t\t\t'content' => $this->_content.'index.phtml',\n\t\t\t'records' => $result['records'],\n\t\t\t'paginator' => $result['paginator'],\n\t\t));\t\n\t\t$this->registry['layout']->view();\t\n\t}", "title": "" }, { "docid": "b4ddd46c2382d5ddf2a44ea188de6a3b", "score": "0.6519022", "text": "public function actionIndex()\n {\n $dataProvider = (new Route())->search();\n return $this->render('index', ['dataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "116c403ea907dd01837aaf78536361f2", "score": "0.6515897", "text": "public function actionListing()\n {\n require_once Yii::app()->basePath . '/vendor/facebook-php-sdk/src/facebook.php';\n $fb = new Facebook(array(\n 'appId' => '894567207287021',\n 'secret' => 'cf43d6c081acaed16c908cac9d49bc07',\n ));\n $model = new FacebookModel();\n $customer = $model->setCustomer($fb);\n $getLikes = $model->getLikes($fb);\n $this->render('list',array('data'=>array('customer' => $customer, 'getLikes' => $getLikes)));\n }", "title": "" }, { "docid": "e3cdc4c3d9ae3aaa6a0cd5478456a58d", "score": "0.65145594", "text": "public function index()\n {\n return UnityResource::collection(Unity::paginate());\n }", "title": "" }, { "docid": "bc53de285b94ddd2a447a5820f5b4765", "score": "0.65121585", "text": "public function listing($route) {\n\t\t$this->render_view('listing', null);\n\t}", "title": "" }, { "docid": "9e06846e2f6d2e1269338eadf8e0b894", "score": "0.6510727", "text": "public function index()\n {\n $categories = Category::paginate(10);\n return CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "d3708a38680b59bc16eca3c31b86b78d", "score": "0.6510369", "text": "public function index()\n {\n $abonnes = AbonneModel::all();\n $count = AbonneModel::count();\n //$this->debug($abonnes);\n $this->render('app.abonne.listing',array(\n // faire passer les abonnes à la vue dans view/app/abonne/listing.php\n 'abonnes' => $abonnes,\n 'count' => $count\n ));\n }", "title": "" }, { "docid": "7a4839b9dce0e81aa7d22a30b5050ba1", "score": "0.65067625", "text": "public function index()\n {\n return View::make('pages.listing')->with([\n 'listings' => Listing::all()\n ]);\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "b3002ffdca77085e05c201d4c8cb1e99", "score": "0.6501504", "text": "public function showList()\n\t{\n\t\t$query_params = $this->getQueryParams();\n\n\t\t// Get all biblio entities that match our query string params\n\t\t$query = new EntityFieldQuery();\n\t\t$query->entityCondition('entity_type', 'biblio');\n\t\tforeach ($query_params as $field => $value) {\n\t\t\t$query->fieldCondition($field, 'value', $value, 'like');\n\t\t}\n\n\t\t$result = reset($query->execute());\n\n\t\t// Create an array of IDs from the result\n\t\tforeach ($result as $entity_data) {\n\t\t\t$this->data['document_ids'][] = $entity_data->bid;\n\t\t}\n\n\t\t$this->outputJSON();\n\t}", "title": "" }, { "docid": "8f4a27465d71a62a589ec5adaeb0986b", "score": "0.64991456", "text": "public function index()\n {\n $todos = Todo::orderBy('created_at', 'DESC')->get();\n return TodoResource::collection($todos);\n }", "title": "" }, { "docid": "dc0149898375c89e944c9a4e88c4c3a8", "score": "0.6499016", "text": "public function index()\n {\n $table = item::all();\n return view('list')->with('table', $table);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "046c051adc81c4edc84279daf9165d00", "score": "0.64961153", "text": "public function index() {\n\t\t$this->paginate = array(\n\t\t\t\t'limit' => 6,\n\t\t\t\t'order' => 'Listing.last_mod DESC'\n\t\t);\n\t\t//debug($this->params);\n\t\t$cond = $this->searchCriteria($this->params['data'], $this->params['pass'], $this->params['named']);\n\t\t$lt = $this->paginate('Listing', $cond);\n\t\t$this->getAddress($lt);\n\t\t$this->getListingPrice($lt);\n\t\t$this->set('listings', $lt);\n\t\t$this->set('GetMapListingData', $this->GetMapListingData($lt));\n\t\t$this->set('search_title', $this->searchTitle($this->params['pass']));\n\t\t$this->set('heading', $this->pageHeading($this->params['pass']));\n\t\t$this->set('bodyClass', 'listings');\n\t\t$this->render('listings');\n\t}", "title": "" }, { "docid": "b3705b62ffca7af4878e295922e07f4b", "score": "0.6494691", "text": "public function index()\n {\n $categories = Category::all();\n\n\t\treturn CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "2acb8764426117ce1e24a4dffeca03b3", "score": "0.6488265", "text": "public function getList() {\n $pages = PageModel::getList();\n\n $this->renderView( $pages );\n }", "title": "" }, { "docid": "19401e81d482911677b86104e4316af5", "score": "0.6483004", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(5));\n }", "title": "" }, { "docid": "5053d441932d8864d4bf822f4564836c", "score": "0.64802396", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $this->service->openConnection();\n $users =$this->service->retrieveAllClientUsers($page);\n $this->view->users = $users;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "984e2e8264667b3d8e5fbfff39850e73", "score": "0.64776826", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('AppBundle:Book')->findAllOrderedByName();\n\n return $this->render('dashboard/listBook.html.twig', ['books' => $books]);\n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "5fc2cbaa57895f367e3994638939768f", "score": "0.6475312", "text": "public function fetchlistAction(){}", "title": "" }, { "docid": "221cee52eb0850b671832164d9811aa5", "score": "0.64749444", "text": "public function listAction() {\n }", "title": "" }, { "docid": "f19185733d416e8afe327cca78be3112", "score": "0.64742154", "text": "public function index()\n {\n // returns the latest inventory info and constricts the page to entries\n return Inventory::latest()->paginate(10);\n }", "title": "" }, { "docid": "548f4f0a081099012cd8664830d71f5f", "score": "0.6473625", "text": "public function index()\n {\n $books = Book::paginate(1);\n return view('admin.books.book-lists', compact('books'));\n }", "title": "" }, { "docid": "ed4ac6060cb66e23543b207ea1f66b10", "score": "0.6470538", "text": "public function index()\n {\n $shops = Shop::paginate(20);\n return ShopResource::collection($shops);\n }", "title": "" }, { "docid": "207685ef95ff8434191b610cea3c73d5", "score": "0.6470286", "text": "public function index()\n {\n $items = $this->itemService->all();\n\n return JsonResource::collection($items);\n }", "title": "" }, { "docid": "4e5084aa458aae2dccdd7bdb7ebbdaf1", "score": "0.6469868", "text": "public function indexAction() {\n $this->view->headTitle('Lista zarejestrowanych obiektów');\n $request = $this->getRequest();\n \n $qb = $this->_helper->getEm()->createQueryBuilder();\n $qb->select('c')\n ->from('\\Trendmed\\Entity\\Clinic', 'c');\n $qb->setMaxResults(50);\n $qb->setFirstResult(0);\n \n $query = $qb->getQuery();\n \n \n $paginator = new Paginator($query, $fetchJoin = true);\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "f8cb4b5b72a3f7046a46ff5e92d156e6", "score": "0.6469414", "text": "public function allAction()\n {\n /* Getting total questions number */\n $totalQuestions = Question::count();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Adding pagination */\n $paginator = new Paginator($_GET['page'] ?? 1, $this->config->per_page_user, $totalQuestions, '/questions/all?page=(:num)');\n\n /* Getting questions list */\n $questions = Question::get([\n 'offset' => $paginator->offset, \n 'limit' => $paginator->limit,\n 'order_by' => $this->sortTypeColumn,\n 'order_type' => 'DESC',\n 'current_user' => $user\n ]);\n\n /* Load view template */\n View::renderTemplate('Questions/stream.twig',[\n 'this_page' => [\n 'title' => 'All Questions',\n 'menu' => 'questions_all',\n 'url' => 'questions/all',\n 'order_name' => $this->sortTypeName,\n ],\n 'questions' => $questions,\n 'paginator' => $paginator,\n 'total_questions' => $totalQuestions,\n ]);\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" } ]
1ccf04ad07f9fb27df7cde15b985056a
/ RELATIONSHIP / QUERY BUILDER / MUTATOR / ACCESSOR boot observing model
[ { "docid": "d8ca01e4310f33f960219a4276cf384e", "score": "0.0", "text": "public static function boot() \n\t{\n parent::boot();\n\n PersonContact::observe(new ContactObserver());\n }", "title": "" } ]
[ { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.637888", "text": "abstract protected function getModel();", "title": "" }, { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.637888", "text": "abstract protected function getModel();", "title": "" }, { "docid": "84222ce305189b6a5f17ccdd76c00d73", "score": "0.629237", "text": "abstract protected function model();", "title": "" }, { "docid": "84222ce305189b6a5f17ccdd76c00d73", "score": "0.629237", "text": "abstract protected function model();", "title": "" }, { "docid": "76ae77cf3e0f98f1d05ba52d75e7dea7", "score": "0.62136316", "text": "function model()\n {\n }", "title": "" }, { "docid": "593954f85b4e09bdfb1e722a86afa816", "score": "0.6164348", "text": "abstract public function model();", "title": "" }, { "docid": "593954f85b4e09bdfb1e722a86afa816", "score": "0.6164348", "text": "abstract public function model();", "title": "" }, { "docid": "11de020488e30d3a51ce0c462401d655", "score": "0.6159658", "text": "abstract public function model ();", "title": "" }, { "docid": "f2b91c03e10c82f70a68c29769d7dc17", "score": "0.61115855", "text": "abstract function model();", "title": "" }, { "docid": "f2b91c03e10c82f70a68c29769d7dc17", "score": "0.61115855", "text": "abstract function model();", "title": "" }, { "docid": "ac3403f164c85c4f5926c56cc0fc15ef", "score": "0.60771", "text": "abstract function getModel( );", "title": "" }, { "docid": "3e47e3f244e7cfc0ab8058f4006704c2", "score": "0.60738456", "text": "public abstract function getModel();", "title": "" }, { "docid": "6b656c881a52b2bfb144e5a1b410da99", "score": "0.6026044", "text": "public abstract function model();", "title": "" }, { "docid": "42c2b94c4b652db4a0e8f298d2ea3ea3", "score": "0.598197", "text": "public function &getModel();", "title": "" }, { "docid": "c415d5028f0a96bd8538bc16d2ac0655", "score": "0.5958593", "text": "protected function getModel()\n {\n }", "title": "" }, { "docid": "a8466d6f2645d31d6669bff3a46e1b71", "score": "0.5900815", "text": "public function takeModel();", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.58049273", "text": "public function model();", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.58049273", "text": "public function model();", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.58049273", "text": "public function model();", "title": "" }, { "docid": "44fcd8d3602b86ef8903c30fc6f9c91d", "score": "0.56923115", "text": "abstract protected function getModelClass();", "title": "" }, { "docid": "012a4ebb83f58839030a1151ae4c7811", "score": "0.5642886", "text": "public function commonMount()\n {\n $this->newmodel=new $this->model;\n $this->multiple=false;\n $this->record=null;\n $this->sortorder='id';\n $this->flashmessageid=$this->table.'saved';\n if ($this->callforward==null) $this->callforward=$this->table.'.index';\n if ($this->callback==null) $this->callback=$this->table.'.index';\n if ($this->mode=='index')\n {\n // if (property_exists($this->model,'hasactive'))\n // {\n // $this->data=$this->getQueryData()->active();\n // }\n // else\n // {\n // $this->data=$this->getQueryData();\n // }\n }\n if ($this->mode=='edit' || $this->mode=='show') $this->loadRecord();\n }", "title": "" }, { "docid": "30eaf3a1c071df9c164e1720fa570e08", "score": "0.56420714", "text": "public function model() {\n }", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5595899", "text": "public function getModel();", "title": "" }, { "docid": "ed831791f1b17fb4d1893a2f456ccba4", "score": "0.55829173", "text": "public function modelGetter();", "title": "" }, { "docid": "6a8a6955f89a62ee327ad115dc46a2e2", "score": "0.5543852", "text": "abstract protected function modelClass();", "title": "" }, { "docid": "0ae139677efd8bc0db75befcf8fee4cf", "score": "0.5475835", "text": "abstract protected function mapToModel();", "title": "" }, { "docid": "c723ad4ca0d9a12bb0bedc0a6c1f5d13", "score": "0.546892", "text": "protected function initAppModel() {\n }", "title": "" }, { "docid": "ac26a746f2e5f4a3d09329da6a5a1794", "score": "0.5456846", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n EventDispatcherProxy::trigger(array('construct','model.construct'), new ModelEvent($this));\n}", "title": "" }, { "docid": "020a0f239960ea34c9e6db0df577dd92", "score": "0.5369065", "text": "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"town\");\n $this->hasMany('TownID', 'Yabasi\\District', 'TownID', ['alias' => 'District']);\n $this->belongsTo('CityID', 'Yabasi\\City', 'CityID', ['alias' => 'City']);\n }", "title": "" }, { "docid": "602bb9742885136e755bcf24d30f5cf4", "score": "0.5352176", "text": "public function routeModelBindings()\n {\n }", "title": "" }, { "docid": "0b29038b9c34b38dd7d033d6edf2cf91", "score": "0.5350148", "text": "function post_model_init($from_cache = FALSE)\n {\n }", "title": "" }, { "docid": "87d2b012d3e1f29283ff69d6ef2fc5b0", "score": "0.5346012", "text": "private function _setModel(){\n $this->_model = new Model();\n }", "title": "" }, { "docid": "1f987e6f3d9927bb5d997a5deafd6610", "score": "0.53302926", "text": "public function setupQuery(): void\n {\n $this->query = $this->resolveQueryOrModel($this->query());\n }", "title": "" }, { "docid": "599b1d210676fa998a058bede9919383", "score": "0.53229296", "text": "public function ModuleLoaderModel(){\n\t\t\n\t}", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.5314289", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.5314289", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.5314289", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "0aab12855616b43c75ec5ffb89644ff7", "score": "0.5314289", "text": "abstract public function modelFactory();", "title": "" }, { "docid": "6b86bd0b554cf79cb2d0f986b46765c7", "score": "0.53083295", "text": "function Model(){\n\t\t\t$this->_assign_libraries( (method_exists($this, '__get') OR method_exists($this, '__set')) ? FALSE : TRUE );\n\t\t\t\n\t\t\t# Grab the name of the first class\n\t\t\t$this->_parent_name = ucfirst(get_class($this));\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b9215ee6ac7a92ba3dca2666f7ef59ee", "score": "0.5296172", "text": "public function setup()\n {\n ModelFactory::setInstance();\n }", "title": "" }, { "docid": "8085494a4fa086cfd94f3e131f20b174", "score": "0.5289271", "text": "function run() {\n $this->model->run();\n }", "title": "" }, { "docid": "26e78109c764c8cef6313721caf43587", "score": "0.527251", "text": "function __construct(){\n $this->model = new Model_mount();\n }", "title": "" }, { "docid": "669b547fc520852a971a66ac2b571c34", "score": "0.5270573", "text": "protected function initializeModel()\r\n {\r\n }", "title": "" }, { "docid": "4d91ec3a73b47465b57084ccc0d73aea", "score": "0.526683", "text": "public function __construct(){\n //Define All required models here\n }", "title": "" }, { "docid": "4143205da2ee1c0ab801df5bb256ec75", "score": "0.52189076", "text": "public function getModelWithQueries(): mixed\n {\n return $this->instanceModel()->getWithQueries();\n }", "title": "" }, { "docid": "049ff19a03214c1c1ec133454f869e5c", "score": "0.52001685", "text": "public function run()\n {\n //CarTypeModel::factory()->count(10)->for(CarModel::factory()->state(['model_name' => 'Asperiores.']))->create();\n CarTypeModel::factory()\n ->count(10)\n ->forOneModel()\n ->create();\n\n CarTypeModel::factory()\n ->count(10)\n ->hasColors()\n ->create();\n }", "title": "" }, { "docid": "9d97d474c9e8922a4bdc56977a5daf4d", "score": "0.51919967", "text": "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"order\");\n }", "title": "" }, { "docid": "e9c6e0839a1c73e63d1dd960a7227c42", "score": "0.51802474", "text": "public function __construct()\n\t{\n\t\tOrderEntity::setModel(new OrderModel());\n\t\tProductEntity::setModel(new ProductModel());\n\t\tLineItemEntity::setModel(new LineItemModel());\n\t}", "title": "" }, { "docid": "7bb529c645e043c772484bdf78af0ed9", "score": "0.5176169", "text": "function Media_model()\n\t{\n\t\tparent::Query();\n\t}", "title": "" }, { "docid": "f819340f8541cccb119e246b47a23b92", "score": "0.5173148", "text": "abstract public function makeModel();", "title": "" }, { "docid": "989108ae0a7a87afac77ee1beff4828f", "score": "0.5172993", "text": "public function __construct()\n {\n $this->Model();\n }", "title": "" }, { "docid": "eb4df56fb62971f9d437f4117a043759", "score": "0.5161956", "text": "function activate(){\n $model = new Model();\n\n // //instantiate the Activate Class and inject the Model class as a dependency \n $activator = new Activate($model);\n\n //load the activate method\n $activator->activate();\n}", "title": "" }, { "docid": "9ab189e0efd5fe9b9dceb87eae85e7d9", "score": "0.51532733", "text": "public function onQueryObjectsBefore()\r\n\t{\r\n\t}", "title": "" }, { "docid": "53327bd4ad56f52274d34e0f8d97a0e7", "score": "0.5148933", "text": "private function _create_model(){\r\n\t\t$config = Config::read();\r\n\t\tif($config->project->interactive){\r\n\t\t\tInteractiveBuilder::create_model($this->source, $this->controller_name, $this->action_name);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f910fe1a946db521f2d12cb83a672ec1", "score": "0.51478195", "text": "public function __construct()\n {\n parent::__construct();\n $this -> _model_ = new \\Models\\Sm2();\n }", "title": "" }, { "docid": "76ae32f301a6042e4d0e7b86fac192e5", "score": "0.51427203", "text": "function getModel() {\r\n return $this->model;\r\n }", "title": "" }, { "docid": "173933c59e0137b5af6cec853e5d0263", "score": "0.514254", "text": "public function __construct()\n {\n if ($this->table === null) {\n $name = explode('\\\\', static::class);\n $name = str_ireplace('model', '', end($name));\n $this->table = strtolower(preg_replace('/(?<!^)([A-Z])/', '_\\\\1', $name));\n }\n\n $this->queryable = new ModelQueryBuilder($this, $this->table);\n\n if ($this->timestamps === true) {\n $this->columns = array_merge($this->columns, [\n 'created_at',\n 'updated_at'\n ]);\n $this->created_at = Carbon::now();\n }\n }", "title": "" }, { "docid": "9af09296376af4b5556a27dd60e0742a", "score": "0.5142443", "text": "public function initialize()\n {\n $this->setSource(\"sms_book\");\n $this->hasOne('code', 'Republish', 'code_item', ['alias' => 'Republish']);\n $this->addBehavior(\n new \\Phalcon\\Mvc\\Model\\Behavior\\Timestampable([\n 'beforeCreate' => [\n 'field' => 'created_at',\n 'format' => 'Y-m-d H:i:s'\n ],\n 'beforeUpdate' => [\n 'field' => 'updated_at',\n 'format' => 'Y-m-d H:i:s'\n ]\n ])\n );\n }", "title": "" }, { "docid": "88037ded486613ef6875ad9cd5e8e9a2", "score": "0.5134903", "text": "function relationshipsQueriesManagment()\n\t{\n\t\t\n\t\t-instalirat Barry hd ekstenziju:\n\t\thttps://github.com/barryvdh/laravel-ide-helper\n\t\t\n\t\t//logiranje sql upita\n\t\t//dodano u AppSErviceProvider.php klasu\n\t\t\\DB::listen(function ($event) {\n\t\t\tdump($event->sql);\n\t\t\tdump($event->bindings);\n\t\t});\n\t\t\n\t\t//1.)RELATIONSHIP METODA VS 2.)DYNAMIC PROPERTIES METODA:\n\t\t\n\t\t//za svaki dopbavljeni user radi novi uput\n\t\t//loše perfomase\n\t\t$hamsters = \\App\\Hamster::get();\n\n\t\t\n\t\tforeach ($hamsters as $hamster){\n\t\t\techo $hamster->user()->first()->name;\n\t\t}\n\n\t\t//EAGER LOADING-prikuplja sve idove od user tablice i radi jedan upit WHERE IN idovi\n\t\t//with(user) -user .ime fucnkije u model koja poezuje model sa modelom Usera\n\t\t//********VAŽNO!!! first() .koristi se ode umjesto get() da se dobije single user a ne cijal kolekcija\n\t\t$hamsters = \\App\\Hamster::with('user')->get();\n\n\t\tforeach ($hamsters as $hamster){\n\t\t\techo $hamster->user()->first()->name;\n\t\t}\n\t}", "title": "" }, { "docid": "7adf7b6aee51a98d3ac47253fd83c456", "score": "0.5132658", "text": "public function __construct()\n {\n //Esto es para que me carge automaticamente el model que corresponde\n parent::__construct();\n }", "title": "" }, { "docid": "cf43e7c2d9470eff664fd987d6cc27f9", "score": "0.5129619", "text": "public function withFreshModel();", "title": "" }, { "docid": "cae97131362dbbbda4e8f34801c31936", "score": "0.5129407", "text": "public function __construct(){\n $this->manager = new EquipeModel();\n }", "title": "" }, { "docid": "2fc161785738eb3743103943a4e433e2", "score": "0.51237714", "text": "public static function loadModel() {\n }", "title": "" }, { "docid": "02279c47193542cd319b95c6322c55dc", "score": "0.5122436", "text": "public static function boot()\n {\n // call parent boot\n parent::boot();\n\n static::creating(function ($model) {\n $order = intval($model->ordering);\n $model->ordering = $order==0?null:$order; \n });\n static::updating(function ($model) {\n $order = intval($model->ordering);\n $model->ordering = $order==0?null:$order;\n });\n }", "title": "" }, { "docid": "fee790b8d28db13030bd71a9d46cf941", "score": "0.51182", "text": "public function request() {\n $this->adaptee->specialRequest(); \n }", "title": "" }, { "docid": "c06ff7221c7b4272705062a118b117f3", "score": "0.5111216", "text": "protected function setup_models()\n\t{\n\t}", "title": "" }, { "docid": "61068ad59afae142134a11258a906209", "score": "0.5110431", "text": "function __construct($m) {\n $this->model = $m;\n }", "title": "" }, { "docid": "4c6f89279733c76ccb8b3d1c4a3e9cc0", "score": "0.51085323", "text": "public function __construct()\n {\n $this->model = new DaftarPrakModel();\n }", "title": "" }, { "docid": "c8ac6a3c6d0d55a5c753457cfafe78f7", "score": "0.51055044", "text": "public function evaluate()\n {\n // grab the appropriate data store by checking the model class\n $modelClass = $this->getModelClass();\n $dataStoreName = $modelClass::getDataStoreName();\n Orm::getDataStore( $dataStoreName );\n }", "title": "" }, { "docid": "e9b6f637b02b3b72e6e47f1428a55733", "score": "0.50968325", "text": "public function __construct()\n {\n $this->model = app()->make($this->model);\n }", "title": "" }, { "docid": "6c3cf8321bc224ff314c39a3d9a64199", "score": "0.5093725", "text": "public static function loadModel()\n {\n $cl = YuppLoader :: getInstance();\n \n // Si estoy en una aplicacion que no es 'core', solo cargo el modelo de esa aplicacion.\n // Si estoy en la aplicacion 'core', carga el modelo de todas las aplicaciones.\n $ctx = YuppContext::getInstance();\n //$apps = array( $ctx->getApp() );\n $apps = array( $ctx->getRealApp() );\n if ($apps[0] == 'core') $apps = FileSystem::getSubdirNames(\"./apps\");\n \n $packs = new PackageNames();\n\n // FIXME: que pasa si quiero cargar con refresh otras clases? p.e. MySQLDatabase se carga solo una vez porque el que la usa (DAL) es singleton.\n if (!$cl->modelLoaded)\n {\n // Carga: apps/theApp/model, para todos las aplicaciones\n foreach ($apps as $app)\n {\n $package = \"$app.model\";\n $path = YuppConventions::getModelPath($package);\n if (file_exists($path)) $cl->_loadModelRecursive( $path );\n }\n\n $cl->modelLoaded = true;\n \n // necesaria para mantener actualizada la session con la instance del singleton. (xq no referencia a la session xa este es un valor desserealizado...)\n YuppSession :: set(\"_class_loader_singleton_instance\", $cl); // actualizo la variable en la session...\n }\n else\n {\n self :: refresh();\n }\n }", "title": "" }, { "docid": "99c01c9c09025eda4348b8c2db08ea2d", "score": "0.50907475", "text": "public function __construct()\n {\n $this->model = new PembeliModel();\n }", "title": "" }, { "docid": "50f5162d20e2929a4c62bdedd20f8950", "score": "0.5086439", "text": "function query() {\n\t\t_brainObject::_brainObject ();\n\t\t\n\t\t// Initialize the query\n\t\t$this->_status = \"NEW\";\n\t}", "title": "" }, { "docid": "d07cf90345558a9511c5090b5a950997", "score": "0.50815576", "text": "public static function boot()\n {\n parent::boot();\n\n self::observe(new ModelObserver);\n }", "title": "" }, { "docid": "757fdc68a174a542f00b49021b53ed8f", "score": "0.5078163", "text": "public function query(){\r\n\r\n\t\t$this->view = 'index';\r\n\t\t$config = Config::read();\r\n\r\n\t\tGenerator::scaffold(&$this->form, $this->scaffold);\r\n\r\n\t\tif(!kumbia::is_model($this->source)){\r\n\t\t\tFlash::error('No hay un modelo \"'.$this->source.'\" para hacer la operacin de consulta');\r\n\t\t\t$this->_create_model();\r\n\t\t\treturn $this->route_to('action: index');\r\n\t\t}\r\n\r\n\t\tif(isset($this->form['dataFilter'])) {\r\n\t\t\tif($this->form['dataFilter'])\r\n\t\t\t$dataFilter = $form['dataFilter'];\r\n\t\t\telse $dataFilter = \"1=1\";\r\n\t\t} else $dataFilter = \"1=1\";\r\n\r\n\r\n\t\tif(!isset($this->form['joinTables'])) {\r\n\t\t\t$this->form['joinTables'] = \"\";\r\n\t\t\t$tables = \"\";\r\n\t\t}\r\n\t\telse if($this->form['joinTables']) $tables = \",\".$this->form['joinTables'];\r\n\t\tif(!isset($this->form['joinConditions'])) {\r\n\t\t\t$this->form['joinConditions'] = \"\";\r\n\t\t\t$joinConditions = \"\";\r\n\t\t}\r\n\t\tif($this->form['joinConditions']) $joinConditions = \" and \".$this->form['joinConditions'];\r\n\r\n\t\t$modelName = kumbia::get_model_name($this->source);\r\n\r\n\t\tif(!$this->{$modelName}->is_dumped()){\r\n\t\t\t$this->{$modelName}->dump();\r\n\t\t}\r\n\r\n\t\t$query = \"select * from \".$this->form['source'].\"$tables where $dataFilter $joinConditions \";\r\n\t\t$source = $this->form['source'];\r\n\r\n\t\t$form = $this->form;\r\n\t\tforeach($this->{$modelName}->attributes_names as $fkey){\r\n\t\t\tif(trim($_REQUEST[\"fl_\".$fkey])&&$_REQUEST[\"fl_\".$fkey]!='@'){\r\n\t\t\t\tif($form['components'][$fkey]['valueType']=='numeric'||$form['components'][$fkey]['valueType']=='date'){\r\n\t\t\t\t\tif($config->database->type!='oracle'){\r\n\t\t\t\t\t\t$query.=\" and $source.$fkey = '\".$_REQUEST[\"fl_\".$fkey].\"'\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif($form['components'][$fkey]['valueType']=='date'){\r\n\t\t\t\t\t\t\t$query.=\" and $source.$fkey = TO_DATE('\".$_REQUEST[\"fl_\".$fkey].\"', 'YYYY-MM-DD')\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$query.=\" and $source.$fkey = '\".$_REQUEST[\"fl_\".$fkey].\"'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif($form['components'][$fkey]['type']=='hidden'){\r\n\t\t\t\t\t\t$query.=\" and $source.$fkey = '\".$_REQUEST[\"fl_\".$fkey].\"'\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif($form['components'][$fkey]['type']=='check'){\r\n\t\t\t\t\t\t\tif($_REQUEST[\"fl_\".$fkey]==$form['components'][$fkey]['checkedValue']){\r\n\t\t\t\t\t\t\t\t$query.=\" and $source.$fkey = '\".$_REQUEST[\"fl_\".$fkey].\"'\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif($form['components'][$fkey]['type']=='time'){\r\n\t\t\t\t\t\t\t\tif($_REQUEST[\"fl_\".$fkey]!='00:00'){\r\n\t\t\t\t\t\t\t\t\t$query.=\" and $source.$fkey = '\".$_REQUEST[\"fl_\".$fkey].\"'\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tif($form['components'][$fkey]['primary']){\r\n\t\t\t\t\t\t\t\t\t$query.=\" and $source.$fkey = '\".$_REQUEST[\"fl_\".$fkey].\"'\";\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t$query.=\" and $source.$fkey like '%\".$_REQUEST[\"fl_\".$fkey].\"%'\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->query = $query;\r\n\r\n\t\t$_REQUEST['queryStatus'] = true;\r\n\t\t$_REQUEST['id'] = 0;\r\n\r\n\t\t$this->fetch(0);\r\n\r\n\t}", "title": "" }, { "docid": "c1273f3ae7ec0e270ba4bb8d9b29b1b9", "score": "0.5068672", "text": "function __construct(){\r\n\t\t$this->model = new model();\r\n\t}", "title": "" }, { "docid": "246b4abd4c9337c4f11e174a1cfc64f8", "score": "0.5065158", "text": "public function testSetNativeModel()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "e0056c67b66b81a872bea5713a217282", "score": "0.50554335", "text": "public function initialize() {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"bank\");\n }", "title": "" }, { "docid": "850d9b8a28c3bc563342d83977e6deef", "score": "0.5050734", "text": "protected function _initModel()\n {\n $modelClass = $this->getModelClassName();\n\n if($modelClass){\n $this->setModel(new $modelClass);\n }\n }", "title": "" }, { "docid": "550faa8ab4ab4b868a56821dedfe6855", "score": "0.5047492", "text": "function __construct() {\n\t\t$this -> pedidosActivosModel = new pedidosActivosModel();\n\t}", "title": "" }, { "docid": "26c777daf113989bf1b1d2f09c379741", "score": "0.50373197", "text": "public function __construct () {\n $this->toy_model = new ToyModel();\n }", "title": "" }, { "docid": "2b295f1356cdc8796a7d8fec195092ad", "score": "0.5029605", "text": "public function model(): Model;", "title": "" }, { "docid": "5fe3801d581c27a79263c5896fe910da", "score": "0.50283194", "text": "protected static function boot()\n\t{\n\t\tparent::boot();\n\n\t\tself::creating(function($model){\n//\t\t\techo \"creating\";\n\t\t});\n\n\t\tself::created(function($model){\n//\t\t\techo \"created\";\n\t\t});\n\n\t\tself::updating(function($model){\n//\t\t\techo \"updating\";\n\t\t});\n\n\t\tself::updated(function($model){\n//\t\t\techo \"updated\";\n\t\t});\n\n\t\tself::deleting(function($model){\n//\t\t\techo \"deleting\";\n\t\t});\n\n\t\tself::deleted(function($model){\n//\t\t\techo \"deleted\";\n\t\t});\n\t}", "title": "" }, { "docid": "18907e5087b108620e381cea7f7301a5", "score": "0.5027497", "text": "public function run()\n {\n $personModel = new Person;\n $personModel->name = \"Chris\";\n $personModel->lastname = \"Cornell\";\n $personModel->save();\n\n $secondPersonModel = new Person;\n $secondPersonModel->name = \"Eddie\";\n $secondPersonModel->lastname = \"Vedder\";\n $secondPersonModel->save();\n }", "title": "" }, { "docid": "6e1cbaa6c4f122a5fc2e9ac3cb746a5f", "score": "0.50259215", "text": "function __construct()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "title": "" }, { "docid": "c095b5fb4dc8f32f0167f353594f9043", "score": "0.5024839", "text": "function miguel_MMain() \r\n {\t\r\n\t\t$this->base_Model();\r\n }", "title": "" }, { "docid": "31b5e041b12b7705772f330ff09a0fb8", "score": "0.5021494", "text": "public function initialize()\n {\n $model= new \\Yabasi\\ModelController();\n $this->setSchema($model->model());\n $this->setSource(\"address\");\n }", "title": "" }, { "docid": "aacf69a6d034e3a4e9609db3489d2678", "score": "0.50158393", "text": "protected static function boot()\n {\n static::updated(function ($model) {\n return $model->beingUpdated($model);\n });\n static::creating(function ($model) {\n return $model->beingCreated($model);\n });\n parent::boot();\n }", "title": "" }, { "docid": "fb6b23faef8f43a6dda1b89140a360d1", "score": "0.50074726", "text": "public function __CONSTRUCT(){\n $this->mode = new SalonModel();\n }", "title": "" }, { "docid": "cebaf8fa326eb8b89c77c2042b30b942", "score": "0.5007064", "text": "public function _init()\n {\n $this->opModel = new Admin();\n }", "title": "" }, { "docid": "a47e7ec76adc348fdcebe730d59d15b1", "score": "0.5004154", "text": "function getViewModel ();", "title": "" }, { "docid": "ec15fe5db13a8a8c0219714d4050e7fb", "score": "0.4999258", "text": "public function testUpdateProductionModel()\n {\n }", "title": "" }, { "docid": "c7c3283d055ba68b6a2cdedf36ab63f2", "score": "0.49989325", "text": "public function getModel()\n {\n return $this->model;\n }", "title": "" }, { "docid": "4bbe61ddf57425131d6f4acb9eb93e19", "score": "0.4975368", "text": "public function __construct()\n {\n $this->orangModel = new OrangModel(); //method comicsmodel ini\n //dari folde model ComicsModel\n }", "title": "" }, { "docid": "d922cf7636dad582a530b874d36e5cf5", "score": "0.49725574", "text": "public function __construct()\n\t{\n $this->modelName=get_class($this);\n\t\t$this->__manager__ = Manager::getManager( $this->modelName );\n //Human::log($this->__manager__,\"The fuckin manager!\");\n\t}", "title": "" } ]
192e9a045065bfadc495c694535cfcd5
Get carrier name by code
[ { "docid": "55309e207a61793f01f4a4603d7425f9", "score": "0.74032444", "text": "public function getCarrierName($carrierCode)\n {\n if ($name = Mage::getStoreConfig('carriers/' . $carrierCode . '/title')) {\n return $name;\n }\n\n return $carrierCode;\n }", "title": "" } ]
[ { "docid": "18fc4439025fb2bf6ebbd3f1acea8e7b", "score": "0.7750605", "text": "function _GetCarrierName($strCode)\n\t{\n\t\t// TODO: waiting for codes from Scott\n\t\treturn \"Undefined Carrier (Internal Code: \".$strCode.\")\";\n\t}", "title": "" }, { "docid": "5d9492ae083ee3edf475aaea42361993", "score": "0.71014225", "text": "public function getCarrierName($carrierCode)\n {\n if ($name = $this->_scopeConfig->getValue(\"carriers/{$carrierCode}/title\", \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE)) {\n return $name;\n }\n return $carrierCode;\n }", "title": "" }, { "docid": "cd53615b74c8510d49a5c3b9e0a2f41f", "score": "0.6899467", "text": "public function getCarrierCode()\n {\n return $this->_fields['CarrierCode']['FieldValue'];\n }", "title": "" }, { "docid": "fade958dd951a4bbac7571c0e5d97f9e", "score": "0.6731102", "text": "private function _determineCarrierCode($carrierCode = '')\n {\n $disabledCarriers = explode(\",\", Mage::getStoreConfig('customtrackers/general/disabled_carriers'));\n if (!in_array($carrierCode, $disabledCarriers)) {\n // Try to find the carrier code and see if a title is assigned to it\n $carrierTitle = $this->_getCarrierTitle($carrierCode, true);\n if (!empty($carrierTitle)) {\n // Valid carrier code\n return $carrierCode;\n }\n }\n\n /*\n * Add your custom tracking method mapping here.\n *\n * Just copy one the if conditions and replace the values with your mapping.\n *\n * The returnedCarrierCode variable must hold a valid carrierCode. Examples are ups, usps, fedex, dhl\n *\n * If you're using the XTENTO Custom Carrier Trackers extension, you can also use your custom trackers. The number relates to the Custom Carrier Trackers configuration. Examples:\n * tracker1, tracker2, tracker3, ... tracker10\n */\n $returnedCarrierCode = 'custom';\n if (preg_match(\"/UPS/i\", $carrierCode)) {\n $returnedCarrierCode = 'ups';\n }\n if (preg_match(\"/FedEx/i\", $carrierCode) || preg_match(\"/Federal Express/i\", $carrierCode)) {\n $returnedCarrierCode = 'fedex';\n }\n if (preg_match(\"/USPS/i\", $carrierCode) || preg_match(\"/United States Postal Service/i\", $carrierCode)) {\n $returnedCarrierCode = 'usps';\n }\n if (in_array($returnedCarrierCode, $disabledCarriers)) {\n $returnedCarrierCode = 'custom';\n }\n\n // No custom mapping was found\n if ($returnedCarrierCode == 'custom') {\n // Try to get the carrier code by the tracker description\n if (!isset($this->_allCarriers)) {\n $this->_allCarriers = Mage::getModel('shipping/config')->getAllCarriers();\n }\n foreach ($this->_allCarriers as $carrierCodeLoop => $carrierConfig) {\n if (in_array($carrierCodeLoop, $disabledCarriers)) {\n continue;\n }\n $carrierLoopName = $carrierConfig->getConfigData('name');\n $carrierLoopTitle = $carrierConfig->getConfigData('title');\n if ($carrierConfig->isTrackingAvailable() && (@strpos(strtolower($carrierLoopTitle), strtolower($carrierCode)) !== false || strtolower($carrierLoopTitle) == strtolower($carrierCode) || @strpos(strtolower($carrierLoopName), strtolower($carrierCode)) !== false)) {\n return $carrierCodeLoop;\n }\n }\n }\n\n return $returnedCarrierCode;\n }", "title": "" }, { "docid": "f552ac45c760ca5d84aa1f1d1ab6e9e2", "score": "0.6703816", "text": "public function getCarrier($carrierCode)\n {\n // Enforce API requests cap //\n\n $this->enforceApiRateLimit();\n\n // Build the Query String and get the orders.\n\n $response = Unirest::get\n (\n $this->endpoint.$this->methodsPaths['getCarrier'].'?carrierCode='.$carrierCode,\n array\n (\n \"Authorization\" => $this->authorization\n )\n );\n \n return $this->processReply($response);\n\n }", "title": "" }, { "docid": "01a04dd8713548029ab6ae848bb23553", "score": "0.6667117", "text": "public function getCarrierCode()\n {\n return self::CARRIER_CODE;\n }", "title": "" }, { "docid": "4d06321d46f6d7263e42399c5fe6cfe8", "score": "0.6547208", "text": "public function getCarrier(): ?string\n {\n return $this->data['carrier'] ?? null;\n }", "title": "" }, { "docid": "2eb6bcddc5e1cad6fe531dd41d1a4cf5", "score": "0.65313697", "text": "public function lnrs_carrier() {\n return lnrs('Carrier', '', 'Carrier: ');\n }", "title": "" }, { "docid": "1d336f15d8e87f8376a4948fc1401381", "score": "0.64803725", "text": "public function getCarrierCode()\n {\n return isset($this->CarrierCode) ? $this->CarrierCode : null;\n }", "title": "" }, { "docid": "becd025263f4bc920dccd8fdd177fe99", "score": "0.6467806", "text": "public static function get_by_code(string $code) : string\n\t{\n\t\t// print \"<p>country code: $code </p>\";\n\t\t$country = null;\n\t\tif (strlen($code) <= 3) {\n\t\t\t// maybe a short code\n\t\t\tif (isset(self::$abbreviation[strtolower($code)])) {\n\t\t\t\t$state = self::$abbreviation[strtolower($code)];\n\t\t\t\tif (isset(self::$stateToCountry[$state])) {\n\t\t\t\t\t$country = self::$stateToCountry[$state];\n\t\t\t\t} else {\n\t\t\t\t\t$country = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$country = null;\n\t\t\t}\n\t\t} else {\n\t\t\t// country or state as full name\n\t\t\tif (isset(self::$stateToCountry[$code])) {\n\t\t\t\t$country = self::$stateToCountry[$code];\n\t\t\t} else {\n\t\t\t\t$country = $code;\n\t\t\t}\n\t\t}\n\n\t\tif (! is_null($country)) {\n\t\t\treturn $country;\n\t\t} else {\n\t\t\t// return $code;\n\t\t\tthrow new \\Exception(\"country code {$code} not known\");\n\t\t}\n\t}", "title": "" }, { "docid": "22e7ce4e32cc224cfc7cc6e28cb1dd60", "score": "0.6325912", "text": "public function getCarrier(): ?string\n {\n return $this->carrier;\n }", "title": "" }, { "docid": "84a85a75af8c1ad10abe63950d6ee0e9", "score": "0.63142383", "text": "public static function getCountryFromCode($code)\n\t{\n\t\tif (strlen($code) != 2) {\n\t\t\treturn $code;\n\t\t}\n\n\t\t$code = strtoupper($code);\n\n\t\tif (!isset(self::$code_to_name[$code])) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn self::$code_to_name[$code];\n\t}", "title": "" }, { "docid": "8b687339b734c171bc0f1422648dd4b9", "score": "0.63022435", "text": "public function getNationalityName($code) {\n return $this->nationalities[$code];\n }", "title": "" }, { "docid": "a47727dc65278eb29dbf832fd8c1c405", "score": "0.6277154", "text": "public function getCountryName($code) {\n return self::get_country_name($code);\n }", "title": "" }, { "docid": "a47727dc65278eb29dbf832fd8c1c405", "score": "0.6277154", "text": "public function getCountryName($code) {\n return self::get_country_name($code);\n }", "title": "" }, { "docid": "c1a640db04fa5065ff685c941c853ea0", "score": "0.61520356", "text": "public function getBarcodeName() {\n $barcodeType = Mage::getStoreConfig('inventoryplus/barcode/barcode_type');\n $barcodes = Mage::getModel('inventorybarcode/barcodetypes')->toOptionArray();\n $return = '';\n\n foreach ($barcodes as $id => $name) {\n if ($name['value'] == $barcodeType) {\n $return = $name['label'];\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "ce783132df57652e4323678275b0d3b5", "score": "0.6148141", "text": "public function getName($code)\n {\n $result = $code;\n\n if (!is_string($code)) {\n throw new InvalidArgumentException(\"Code must be string. \" . gettype($code) . \" given.\");\n }\n\n $languages = $this->getSupported();\n if (!empty($languages[$code])) {\n $result = $languages[$code];\n }\n\n return $result;\n }", "title": "" }, { "docid": "bad50b4b7f200e6610800c5faab06549", "score": "0.6105102", "text": "public static function getRegionName($code){\n return XDb::xMultiVariableQueryValue(\n \"SELECT name FROM nuts_codes WHERE code= :1 LIMIT 1\", 'Unknown?', $code);\n }", "title": "" }, { "docid": "06af9e83ab833bced4723ee5851561e2", "score": "0.60873276", "text": "public static function getName( $code )\n\t{\n\t\treturn ISO_Language::getInstance()->get( $code );\n\t}", "title": "" }, { "docid": "07482885208e43b513d2b8ddb7a0ae60", "score": "0.60243446", "text": "public function byCode($code) {\n $functionName = 'code' . $code;\n return $this->$functionName();\n }", "title": "" }, { "docid": "d2ae8ae168fe000f842a294f7ff07209", "score": "0.5998233", "text": "function getOrgNameFromCode($org_code) {\n if(!$org_code > 0){\n return \"\";\n }\n $sql = \"SELECT\n *\n FROM\n `dghshrml4_facilities`\n WHERE\n dghshrml4_facilities.`code` = $org_code\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getOrgNameFormOrgCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $org_data = mysql_fetch_assoc($result);\n return $org_data['name'];\n}", "title": "" }, { "docid": "d02a9336687d22494e3ec714b4ecb5f4", "score": "0.59770733", "text": "protected function getCode()\n\t{\n\t\treturn $this->config->familyCode;\n\t}", "title": "" }, { "docid": "3e73e061c3b97c55c1538c1c07dc5165", "score": "0.5945461", "text": "function getElectricityAlterSourceNameFromCode($electricity_alter_source_code) {\n if(!$electricity_alter_source_code > 0){\n return \"\";\n }\n $sql = \"SELECT `electricity_source_name` FROM `org_source_of_electricity_main` WHERE `electricity_source_code` = \\\"$electricity_alter_source_code\\\" LIMIT 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getElectricityAlterSourceNameFromCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $data = mysql_fetch_assoc($result);\n\n return $data['electricity_source_name'];\n}", "title": "" }, { "docid": "05cbaedaea52a921db5c43927eb75383", "score": "0.5942493", "text": "public static function get_country_name($code) {\n if(empty(self::$countries)) {\n self::load_countries();\n }\n\n return isset(self::$countries[$code]) ? self::$countries[$code] : $code;\n }", "title": "" }, { "docid": "e8b596df5962200811e07c2805d30750", "score": "0.59413016", "text": "private function getCountryCode() : string\n {\n return substr($this->vin, 0, 2);\n }", "title": "" }, { "docid": "2ff9342916371c8657473d95f0cc520c", "score": "0.59067494", "text": "function getCountryCode();", "title": "" }, { "docid": "88d907431e0b97a6e20d8dc614d6e88e", "score": "0.58761513", "text": "public function getCodeName() {\n\t\treturn $this->codeName;\n\t}", "title": "" }, { "docid": "b347e31f99a274fb94a02bbf222da1ff", "score": "0.58492655", "text": "function getAgencyNameFromAgencyCode($agency_code) {\n if(!$agency_code > 0){\n return \"\";\n }\n $sql = \"SELECT org_agency_name FROM org_agency_code WHERE org_agency_code = $agency_code LIMIT 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getAgencyNameFromAgencyCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $org_data = mysql_fetch_assoc($result);\n $org_agency_code_name = $org_data['org_agency_name'];\n return $org_agency_code_name;\n}", "title": "" }, { "docid": "d935945b52993b8eb5d4a64b9b9349f6", "score": "0.5822247", "text": "function getAirlineName($code)\n{\n $dbobject = new dbobject();\n $sql = \"SELECT airline_name FROM airline WHERE airline_code = '$code' LIMIT 1\";\n $result = $dbobject->db_query($sql);\n \n return $result[0][\"airline_name\"];\n}", "title": "" }, { "docid": "9f63a3309da811832e834ca4635996cb", "score": "0.58216196", "text": "function getWaterAlterSourceNameFromCode($water_source_code) {\n if(!$water_source_code > 0){\n return \"\";\n }\n $sql = \"SELECT `water_supply_source_name` FROM `org_source_of_water_supply_main` WHERE `water_supply_source_code` = \\\"$water_source_code\\\" LIMIT 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getWaterAlterSourceNameFromCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $data = mysql_fetch_assoc($result);\n\n return $data['water_supply_source_name'];\n}", "title": "" }, { "docid": "17b26f4f913d2b7f24919498057b4673", "score": "0.58174497", "text": "public static function get( $code )\n\t{\n\t\t$arr = self::getAvailable();\n\t\treturn isset( $arr[ $code ] ) ? $arr[ $code ] : null;\n\t}", "title": "" }, { "docid": "960b9ca60a838a3e8dd7739e0e1242bc", "score": "0.5816807", "text": "public abstract function getVendorCode ();", "title": "" }, { "docid": "dcc57099d49eee07942984a15dfd345b", "score": "0.58123523", "text": "function getCountryCodeByPhoneCountryCode($data, $code){\n\t$arr[] = array();\n\t\n\t\n\tforeach($data as $countryCode => $phonePrefix){\n\t\n\t\tif(strtolower($phonePrefix) == strtolower($code)){\n\t\n\t\n\t\t\tarray_push($arr, $countryCode);\n\t\n\t\n\t\t}\n\t\t\t\n\t}\n\t\n\tunset($arr['0']);\n\tsort($arr);\n\treturn json_encode($arr) ;\n\t\n}", "title": "" }, { "docid": "881fe538aa9d24475588fb26bc6767d3", "score": "0.57978886", "text": "public function getCardInfoByCode($code)\n {\n $cards = array(\n 'VI' => array(\n 'label' => 'Visa',\n 'class' => 'visa',\n ),\n 'MC' => array(\n 'label' => 'Mastercard',\n 'class' => 'mastercard',\n ),\n 'AE' => array(\n 'label' => 'American Express',\n 'class' => 'amex',\n ),\n 'DI' => array(\n 'label' => 'Discover',\n 'class' => 'discover',\n ),\n 'DC' => array(\n 'label' => 'Diners Club',\n 'class' => 'dinersclub',\n ),\n 'JCB' => array(\n 'label' => 'JCB',\n 'class' => 'jcb',\n ),\n );\n\n return (isset($cards[$code])) ? $cards[$code] : false;\n }", "title": "" }, { "docid": "3526e74dfa42cc0c62ce1a9498c6beb1", "score": "0.5782396", "text": "public function getLocaleName(string $code): ?string\n {\n $locale = $this->localeRepository->findOneBy(['code' => $code]);\n if (!$locale instanceof LocaleInterface) {\n return null;\n }\n\n return $locale->getName();\n }", "title": "" }, { "docid": "eb97eb691fdee92d09692a41734d03b7", "score": "0.5767782", "text": "public function setCarrierCode($value)\n {\n $this->_fields['CarrierCode']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "da06350d4f52126b59492b10bc8a77fd", "score": "0.5765123", "text": "public static function findByCode($name)\n {\n return self::where('code',$name)->first();\n }", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5731682", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5731682", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5731682", "text": "public function getCode(): string;", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.5731682", "text": "public function getCode(): string;", "title": "" }, { "docid": "551d20424d2f7b7f6121c284c335127a", "score": "0.573117", "text": "public function getCode($type, $code = '')\n {\n static $codes;\n $codes = array(\n 'service' => array(\n 'IE' => Mage::helper('usa')->__('International Express'),\n 'E SAT' => Mage::helper('usa')->__('Express Saturday'),\n 'E 10:30AM' => Mage::helper('usa')->__('Express 10:30 AM'),\n 'E' => Mage::helper('usa')->__('Express'),\n 'N' => Mage::helper('usa')->__('Next Afternoon'),\n 'S' => Mage::helper('usa')->__('Second Day Service'),\n 'G' => Mage::helper('usa')->__('Ground'),\n ),\n 'shipment_type' => array(\n 'L' => Mage::helper('usa')->__('Letter'),\n 'P' => Mage::helper('usa')->__('Package'),\n ),\n 'international_searvice' => 'IE',\n 'dutypayment_type' => array(\n 'S' => Mage::helper('usa')->__('Sender'),\n 'R' => Mage::helper('usa')->__('Receiver'),\n '3' => Mage::helper('usa')->__('Third Party'),\n ),\n\n 'special_express' => array(\n 'E SAT' => 'SAT',\n 'E 10:30AM' => '1030',\n ),\n\n 'descr_to_service' => array(\n 'E SAT' => 'Saturday',\n 'E 10:30AM' => '10:30 A.M',\n ),\n\n );\n\n\n if (!isset($codes[$type])) {\n return false;\n } elseif ('' === $code) {\n return $codes[$type];\n }\n\n if (!isset($codes[$type][$code])) {\n return false;\n } else {\n return $codes[$type][$code];\n }\n }", "title": "" }, { "docid": "e6cc814039a3b4ecabb26bbc323ef89f", "score": "0.57268196", "text": "public function getLocaleByCode($code)\n {\n $locales = $this->getLocales();\n if (array_key_exists($code, $locales)) {\n return $locales[$code];\n }\n }", "title": "" }, { "docid": "8e06760f025e0119b8e87d73b4466989", "score": "0.57268065", "text": "public function get_carrier_domain($carrier_id)\r\n\t{\r\n\t\t$this->db->from('carriers');\r\n\t\t$this->db->where('carrier_id', $carrier_id);\r\n\t\t$query = $this->db->get();\r\n\t\t$row = $query->row();\r\n\r\n\t\treturn $row->carrier_domain;\r\n\t}", "title": "" }, { "docid": "5bee04fe839d96007edb850621c82285", "score": "0.57084376", "text": "function getCode() {\n return $this->getFieldValue('code');\n }", "title": "" }, { "docid": "81113af3d9ae769ea66ef3020d96ec9d", "score": "0.57075024", "text": "public function getCarrierPhoneNumber()\n {\n return $this->_fields['CarrierPhoneNumber']['FieldValue'];\n }", "title": "" }, { "docid": "3725ea45eca787004fb0c6acd992dc23", "score": "0.5699915", "text": "public function getCarrier()\n {\n return isset($this->Carrier) ? $this->Carrier : null;\n }", "title": "" }, { "docid": "3725ea45eca787004fb0c6acd992dc23", "score": "0.5699915", "text": "public function getCarrier()\n {\n return isset($this->Carrier) ? $this->Carrier : null;\n }", "title": "" }, { "docid": "3e02b56b6c725cadfe3405ccfff43f2d", "score": "0.5698776", "text": "function get_lang_name($code)\n\t{\n\t\t$code = strtolower($code);\n\n\t\tswitch($code)\n\t\t{\n\t\tcase 'bg': return 'Bulgarian'; break;\n\t\tcase 'zh': return 'Chinese'; break;\n\t\tcase 'cs': return 'Czech'; break;\n\t\tcase 'nl': return 'Dutch'; break;\n\t\tcase 'en': return 'English'; break;\n\t\tcase 'fi': return 'Finnish'; break;\n\t\tcase 'fr': return 'French'; break;\n\t\tcase 'de': return 'German'; break;\n\t\tcase 'he': return 'Hebrew'; break;\n\t\tcase 'hu': return 'Hungarian'; break;\n\t\tcase 'id': return 'Indonesian'; break;\n\t\tcase 'it': return 'Italian'; break;\n\t\tcase 'no': return 'Norwegian'; break;\n\t\tcase 'pt': return 'Portuguese'; break;\n\t\tcase 'ru': return 'Russian'; break;\n\t\tcase 'sk': return 'Slovak'; break;\n\t\tcase 'es': return 'Spanish'; break;\n\t\tcase 'sv': return 'Swedish'; break;\n\t\tdefault: return $code; break;\n\t\t}\n\t}", "title": "" }, { "docid": "484e52dac9be9b6213df6037bca0f2c6", "score": "0.56962633", "text": "function getWaterMainSourceNameFromCode($water_source_code) {\n if(!$water_source_code > 0){\n return \"\";\n }\n $sql = \"SELECT `water_supply_source_name` FROM `org_source_of_water_supply_main` WHERE `water_supply_source_code` = \\\"$water_source_code\\\" LIMIT 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getWaterMainSourceNameFromCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $data = mysql_fetch_assoc($result);\n\n return $data['water_supply_source_name'];\n}", "title": "" }, { "docid": "f1551776fbdfbfea854d6b64325c8951", "score": "0.5693908", "text": "public function getCode($code)\n\t{\n\t\t$select = $this->_db->select()\t\n\t\t\t\t\t\t->from(array('artist' => 'artist'))\t\n\t\t\t\t\t ->where('artist_code = ?', $code)\n\t\t\t\t\t ->limit(1);\n\n\t $result = $this->_db->fetchRow($select);\t\n return ($result == false) ? false : $result = $result;\t\t\t\t\t \n\t}", "title": "" }, { "docid": "43dd9ed970cad8352a97c07d02d160eb", "score": "0.5689269", "text": "function getOrgLocationTypeFromCode ($org_location_code){\n if (!$org_location_code > 0) {\n return null;\n }\n $sql = \"SELECT\n org_location_type_name\n FROM\n org_location_type\n WHERE\n org_location_type_code = $org_location_code\n AND active LIKE 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<p><b>Code:getOrgLocationTypeFromCode:1</p><p>Query:</b></p>___<p>$sql</p>\");\n \n $data = mysql_fetch_assoc($result);\n \n return $data['org_location_type_name'];\n}", "title": "" }, { "docid": "c2aeb7c1901843be7dca38b8fc61aabd", "score": "0.5680657", "text": "function getCountryManufactureCode() {\n\t\treturn $this->getData('countryManufactureCode');\n\t}", "title": "" }, { "docid": "3b3954a0a1ae444727d66fe242729c77", "score": "0.5671142", "text": "public static function codeLabel($code)\n {\n return self::codeOptionArr()[$code];\n }", "title": "" }, { "docid": "3db8317958e81b5e6a8b51552db80808", "score": "0.566838", "text": "public function get_by_code ($code) {\r\n $db = $this->app->getDbo();\r\n \r\n $select = '*';\r\n \r\n $query = $db->getQuery(true)\r\n ->select($select)\r\n ->from($db->quoteName($this->model_name))\r\n ->where('code=' . $db->quote($code));\r\n \r\n $db->setQuery($query);\r\n \r\n return $db->loadObject();\r\n }", "title": "" }, { "docid": "576aeab8cd2567c992e08140156b93a8", "score": "0.56481355", "text": "function getNameForONIXCode() {\n\t\t$onixCodelistItemDao =& DAORegistry::getDAO('ONIXCodelistItemDAO');\n\t\t$codes =& $onixCodelistItemDao->getCodes('List163'); // List163 is for Publication date, Embargo date, Announcement date, etc\n\t\treturn $codes[$this->getRole()];\n\t}", "title": "" }, { "docid": "4de07d98d848ac8c73aee13a6be44bf9", "score": "0.56448567", "text": "public function getCountryCode(): string\n {\n return $this->countryCode;\n }", "title": "" }, { "docid": "4de07d98d848ac8c73aee13a6be44bf9", "score": "0.56448567", "text": "public function getCountryCode(): string\n {\n return $this->countryCode;\n }", "title": "" }, { "docid": "9d330e603ae17b1942759bd74199e68f", "score": "0.5637611", "text": "public function getCode()\n {\n return $this->attributes['code'];\n\n }", "title": "" }, { "docid": "005cfce98ff3a7751f674521d5bf9b06", "score": "0.5617256", "text": "public function countryfromcode($code)\r\n\t{\r\n\t\t$dbobj=new ta_dboperations();\r\n\t\treturn $dbobj->dbquery(\"SELECT * FROM \".tbl_country::tblname.\" WHERE \".tbl_country::col_code2l.\"='$code' LIMIT 0,1\", tbl_country::dbname);\r\n\t}", "title": "" }, { "docid": "f669ac4b761d1a792a1497f72735c622", "score": "0.55989844", "text": "public function getName(string $languageCode = \"\") : string;", "title": "" }, { "docid": "7af70a8df9a4c35ce25570c34d85f62e", "score": "0.55970365", "text": "function getOrgTypeNameFormOrgTypeCode($org_type_code) {\n if(!$org_type_code > 0){\n return \"\";\n }\n $sql = \"SELECT org_type_id, org_type_code, org_type_name FROM org_type WHERE org_type_code = $org_type_code LIMIT 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getOrgTypeNameFormOrgTypeCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $org_type_data = mysql_fetch_assoc($result);\n $org_type_name = $org_type_data['org_type_name'];\n return $org_type_name;\n}", "title": "" }, { "docid": "4184f4694a53a1c444c4a0d20afeb356", "score": "0.5595134", "text": "private function get_code_type($code) {\n if ($code[0] == \"P\" && $code[1] == \"3\") { // P codes are not as straight forward as usual\n $number = substr($code, 1); // remove letter - the first char\n if (strlen($number) != 4) {\n exit(\"Powetrain Code \" . $code . \" is not correct length.\");\n }\n\n if ($number >= 3000 and $number <= 3399) {\n return \"Manufacturer defined\";\n } elseif ($number >= 3400 and $number <= 3999) {\n return \"SAE defined (EOBD)\";\n }\n } else {\n if (isset($this->code_types[$code[0]][$code[1]])) {\n return $this->code_types[$code[0]][$code[1]];\n }\n }\n }", "title": "" }, { "docid": "6c6ac5fddbd4880128d92bbce091ceba", "score": "0.55764985", "text": "public function getCarrierMobile()\n {\n return $this->carrier_mobile;\n }", "title": "" }, { "docid": "92603f54e0ff7e40cbca9f738a287ac2", "score": "0.55737805", "text": "public function getByCode($code)\n {\n $countries = $this->lists();\n\n return $countries->get($code);\n }", "title": "" }, { "docid": "47a718f031e7a41f75f1ea041d37e150", "score": "0.5568914", "text": "public function getCode() : string;", "title": "" }, { "docid": "d1a0777c7d8517f6f7c54220eb8c10ff", "score": "0.55682874", "text": "public static function idFromCountryCode($code){\n return DB::table('countries')->where('code', $code)->first()->id;\n }", "title": "" }, { "docid": "1510471d4a382877507a2dad5f0ca6c4", "score": "0.5559179", "text": "final public function getLowerCode()\n {\n return strtolower($this->getCode());\n }", "title": "" }, { "docid": "c0263ce345d0521a436f0a834591181f", "score": "0.55498767", "text": "public function getCode($code) {\n\t\t$select = $this->_db->select()\t\n\t\t\t\t\t\t->from(array('price' => 'price'))\t\n\t\t\t\t\t ->where('price_code = ?', $code)\n\t\t\t\t\t ->limit(1);\n\n\t $result = $this->_db->fetchRow($select);\t\n return ($result == false) ? false : $result = $result;\t\t\t\t\t \n\t}", "title": "" }, { "docid": "2c1d29e1ee5ef7985dd522cae9e1cf32", "score": "0.554494", "text": "private static function country_codep(string $code) : string\n\t{\n\t\t$countryCodes = array(\n\t\t\t\"Co\"=>\"Colombia\",\n\t\t\t\"Col\"=>\"Colombia\",\n\t\t\t\"Colo\"=>\"Colorado\",\n\t\t\t\"ES\"=>\"El Salvador\",\n\t\t\t\"Nic\"=>\"Nicaragua\",\n\t\t\t\"TX\"=>\"Texas\",\n\t\t\t\"AZ\"=>\"Arizona\",\n\t\t\t\"SC\"=>\"South Carolina\",\n\t\t\t\"NC\"=>\"North Carolina\",\n\t\t\t\"ID\"=>\"Idaho\",\n\t\t\t\"OR\"=>\"Oregon\",\n\t\t\t\"Oregon\"=>\"Oregon\",\n\t\t\t\"MT\"=>\"Montana\",\n\t\t\t\"WA\"=>\"Washington\",\n\t\t\t\"Washington\" => \"Washington\",\n\t\t\t\"KY\"=>\"Kentucky\",\n\t\t\t\"KS\"=>\"Kansas\",\n\t\t\t\"YT\"=>\"Yukon\",\n\t\t\t\"YK\"=>\"Yukon\",\n\t\t\t\"UT\"=>\"Utah\",\n\t\t\t\"IL\"=>\"Illinois\",\n\t\t\t\"Il\"=>\"Illinois\",\n\t\t\t\"KT\"=>\"Kentucky\",\n\t\t\t\"NWT\"=>\"North West Territory\",\n\t\t\t\"NT\"=>\"North West Territory\",\n\t\t\t\"AB\"=>\"Alberta\",\n\t\t\t\"AK\"=>\"Alaska\",\n\t\t\t\"BC\"=>\"British Columbia\",\n\t\t\t\"MX\"=>\"Mexico\",\n\t\t\t\"ES\"=>\"El Salvador\",\n\t\t\t\"Nic\"=>\"Nicaragua\",\n\t\t\t\"PAN\"=>\"Panama\",\n\t\t);\n\t\tif (isset($countryCodes[$code]))\n\t\t\treturn $countryCodes[$code];\n\t\treturn null;\n\t}", "title": "" }, { "docid": "d592945da2b0d53dbc1c313950d667ef", "score": "0.5543811", "text": "public function getCode() {\n return $this->stationInfo['code'];\n }", "title": "" }, { "docid": "2946fffe82d1a031ebe1b53920921f02", "score": "0.5542668", "text": "abstract public function getLocalCountryCode(): string;", "title": "" }, { "docid": "7a60822c16bea71975d01d705b70c7c1", "score": "0.55401", "text": "function getOrgNameFormOrgCode($org_code) {\n if(!$org_code > 0){\n return \"\";\n }\n $sql = \"SELECT organization.id,organization.org_name FROM organization WHERE organization.org_code = $org_code\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getOrgNameFormOrgCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $org_data = mysql_fetch_assoc($result);\n return $org_data['org_name'];\n}", "title": "" }, { "docid": "1d876ea91240853105e1d11c70dd28ec", "score": "0.5518867", "text": "public function getNameAndCountryCode()\n {\n return Yii::t('country', $this->name) . ' (' . $this->country_code . ')';\n }", "title": "" }, { "docid": "cd0584b301e94833ea24ebcf907caa4a", "score": "0.5512447", "text": "public static function getFirstLocaleByCountryCode($countryCode){\n foreach (self::listLocales() as $locale){\n if(strpos($locale['code'], '_'. strtoupper($countryCode))){\n return $locale['code'];\n }\n }\n return null;\n }", "title": "" }, { "docid": "09ad2b297c07fe5739e440b91c8a195f", "score": "0.5509126", "text": "public function getCountry($code)\n {\n return $this->adapter->getCountry($code);\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.5498515", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.5498515", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.5498515", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.5498515", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.5498515", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "e7033c7a53c12d59429badd6910c0c01", "score": "0.5498515", "text": "public function getCode(): string\n {\n return $this->code;\n }", "title": "" }, { "docid": "5f7226a99781bc0379bd26121d85f123", "score": "0.5485907", "text": "public function getFakeDataCountryCode();", "title": "" }, { "docid": "0fa292f3e4fe261c21cdd9f169388b3e", "score": "0.54804933", "text": "public function getCarrier()\n {\n return $this->readOneof(29);\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.5477985", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.5477985", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "c58ea74f13056394acf64efae9bda250", "score": "0.5470337", "text": "function getToiletTypeNameFromCode($toilet_type_code) {\n if(!$toilet_type_code > 0){\n return \"\";\n }\n $sql = \"SELECT `toilet_type_name` FROM `org_toilet_type` WHERE `toilet_type_code` = \\\"$toilet_type_code\\\" LIMIT 1\";\n $result = mysql_query($sql) or die(mysql_error() . \"<br /><br />Code:<b>getToiletTypeNameFromCode:1</b><br /><br /><b>Query:</b><br />___<br />$sql<br />\");\n\n $data = mysql_fetch_assoc($result);\n\n return $data['toilet_type_name'];\n}", "title": "" }, { "docid": "2457a0b866e689a4273428e4ab219fe3", "score": "0.5465336", "text": "protected function extract_name() {\n\t\t$cl = $this->params['codelink'];\n\t\t\n\t\t$r = preg_match( self::NAME_PATTERN, $cl, $match );\n\t\tif ( $r === false )\n\t\t\t$n = null;\n\t\telse\n\t\t\t$n = $match[1];\n\t\t$this->params['name'] = $n;\n\t}", "title": "" }, { "docid": "a264a2950ff0e361933b81e19cbf2458", "score": "0.5465083", "text": "public function getCode(): ? string;", "title": "" }, { "docid": "2829b13e8d9402caf5ba1a91bcdf41ab", "score": "0.5464406", "text": "public function getBillingCountryCode();", "title": "" }, { "docid": "d80aae6d5dcae07be9821f6d61802717", "score": "0.5463259", "text": "function getCountry($code) {\n\t\t//Get Country data by 2 letter code (KW)\n\t\tif ($code != \"\" || !empty ($code) ) {\n\t\t\t$call = $this->curlRequest(\"https://restcountries.eu/rest/v2/alpha/\".$code.\"\");\n\t\t\t$jsonIt = json_decode($call,true);\n\t\t\treturn array(\"status\"=>true,\"result\"=>\n\t\t\tarray (\n\t\t\t\t\"id\" => $jsonIt[\"alpha2Code\"],\n\t\t\t\t\"name\" => $jsonIt[\"name\"],\n\t\t\t\t\"region\" => $jsonIt[\"region\"],\n\t\t\t\t\"capitalCity\" => $jsonIt[\"capital\"],\n\t\t\t\t\"population\" => $jsonIt[\"population\"],\n\t\t\t\t\"label\" => $jsonIt[\"regionalBlocs\"][0][\"otherNames\"][0],\n\t\t\t\t\"latitude\" => $jsonIt[\"latlng\"][0],\n\t\t\t\t\"longitude\" => $jsonIt[\"latlng\"][1]\n\t\t\t\t)\n\t\t\t) ;\n\t\t} else {\n\t\t\treturn array(\"status\"=>false,\"msg\"=>\"One of the argument is empty\") ;\n\t\t}\n\t}", "title": "" }, { "docid": "ac5f9aaf103254b2142267ddc30e7c63", "score": "0.54586905", "text": "public function getShippingCode() {\n return $this->_carrierCode;\n }", "title": "" }, { "docid": "b0d1476c16f087b9c29effb47ac7e475", "score": "0.5456651", "text": "function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "5c84e2784401bbc14e5a8961647a264a", "score": "0.54553866", "text": "public function render($countryCode = NULL) {\n\t\tif ($countryCode === NULL) {\n\t\t\t$countryCode = $this->renderChildren();\n\t\t}\n\n\t\t$countryName = $this->cldrService->getTerritoryNameForIsoCode($countryCode);\n\n\t\tif ($countryName !== $countryCode) {\n\t\t\treturn $countryName;\n\t\t} elseif ($countryCode === 'XK') {\n\t\t\t// workaround because Kosovo isn't formally a country and therefore not in the CLDR repository\n\t\t\treturn 'Kosovo';\n\t\t} else {\n\t\t\treturn $countryCode;\n\t\t}\n\t}", "title": "" }, { "docid": "3fd095c1a56f596e2d44dec517a3b240", "score": "0.545538", "text": "public function get_by_code($code)\n {\n //\n $product = Product::with('category','brand')->Find_By($code);\n return response()->json(['status' => 'success' , 'records' => $product]);\n }", "title": "" }, { "docid": "52b8538888c44942eba1a9bbe5a18600", "score": "0.5455297", "text": "public function getShopCountryCode() : string\n {\n return $this->shopCountryCode;\n }", "title": "" }, { "docid": "f0c8324ec207abc55e21be970724f5e3", "score": "0.5453712", "text": "public function getcode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "82856a1edfa99d3354d1f5fbc9a1d32c", "score": "0.54362404", "text": "public function getServiceCode(): string\n {\n $data = $this->getData();\n\n return $data['ServiceCode'] ?? '';\n }", "title": "" }, { "docid": "6b8634805c49f1e66059f68f0ced0fc6", "score": "0.5434329", "text": "public function withCarrierCode($value)\n {\n $this->setCarrierCode($value);\n return $this;\n }", "title": "" }, { "docid": "7dc385aa092780bd64876e40a593372c", "score": "0.54299605", "text": "static public function getMessageForCode($code){\n\t\t$codes = self::getCodes();\n\n\t\tif(isset($codes[$code]))\n\t\t\treturn $codes[$code];\n\n\t\treturn '';\n\t}", "title": "" } ]
fcda45e1389b5d673b9114cb02477642
Renvoie la liste des annonces de la base
[ { "docid": "e32800ada6d2f3e4c72602d1075be4fb", "score": "0.0", "text": "public function getAnnonces() {\n $sql = \"SELECT id_annonce, titre_annonce, nom_fdc, id_type, id_localisation,\n prix_annonce, descriptif_annonce, image_annonce, date_annonce, id_utilisateur,\n loyer_annuel, montant_charges, affaire_tenue_depuis, surface,\n terrasse, vitrine, chiffre_affaire, ebe, dpe, ges FROM annonce\" ;\n $annonces = $this->excuteQuery($sql);\n return $annonces;\n }", "title": "" } ]
[ { "docid": "028b15eb09d82d2edebb26c7983d5d9f", "score": "0.6824184", "text": "function getAll() {\n\n /* FIN DU CODE AJOUTÉ */\n }", "title": "" }, { "docid": "6f2bd4d7c7c399c45e00686f44c55485", "score": "0.6789323", "text": "public function forgetAll();", "title": "" }, { "docid": "42a7a82d5e01a3db53e9cb5d09e9d56a", "score": "0.6709374", "text": "abstract public function getList();", "title": "" }, { "docid": "03ada177b2202b3e6d8952cd87a0f199", "score": "0.6695075", "text": "public function getAlternateBasesList(){\n return $this->_get(7);\n }", "title": "" }, { "docid": "568670d1e0a86674e53513664a534598", "score": "0.6664913", "text": "function liste() {\r\n\r\n if (is_null($this->modEntreprise)) {\r\n $this->modEntreprise = $this->loadModel('Entreprise');\r\n }\r\n\r\n\r\n $d['entreprises'] = $this->modEntreprise->find(array('conditions' => 1));\r\n if (empty($d['entreprises'])) {\r\n $this->e404('Page introuvable');\r\n }\r\n if (is_null($this->modType_Entreprise)) {\r\n $this->modType_Entreprise = $this->loadModel('Type_Entreprise');\r\n }\r\n $d['type_entreprise'] = $this->modType_Entreprise->find(array(\r\n 'conditions' => 1)\r\n );\r\n $this->set($d);\r\n }", "title": "" }, { "docid": "cf44980a72680c4f8e7896456b553d5e", "score": "0.6660959", "text": "abstract public function listAll();", "title": "" }, { "docid": "f92af1c07b732110554f122ac172ab60", "score": "0.6639667", "text": "public function lister(){\n\t\t\t\t$sql = $this->_bdd->query(\"SELECT b.Nom as nomb, adress, montantLocation, commission, p.Nom as nomp, tb.Nom as nomtb, numPiece FROM Bien as b, Proprietaire as p, typeBien as tb WHERE p.id=idProprietaire AND tb.id = idTypeBien\");\n\t\t\t\treturn $sql;\n\t\t\t}", "title": "" }, { "docid": "3d742eb0c39ae97e200e2b50a4416063", "score": "0.6607989", "text": "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "3d742eb0c39ae97e200e2b50a4416063", "score": "0.6607989", "text": "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "e48e4a7b1c357baea538ff99b04a13cb", "score": "0.6563303", "text": "function afficherProduits(){\n\t\t$sql=\"SElECT * From produit\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "8528f6814cccb19d362cb52c624c6688", "score": "0.655766", "text": "public static function listAll(){\n\n $sql = new Sql();\n $results = $sql->select(\"SELECT * FROM tb_clifordados ORDER BY idclifor ASC\");\n return $results;\n\n }", "title": "" }, { "docid": "106584d647757b2c77b378c915bf964f", "score": "0.653761", "text": "function afficherUtilisateurs(){\n\t\t$sql=\"SElECT * From utilisateur \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "2b9909b097910294025ac6164d78197a", "score": "0.6526468", "text": "abstract function getAll();", "title": "" }, { "docid": "f5b894df314a330770f2727f1d1b3994", "score": "0.65120554", "text": "function lista(){\n\t\treturn $this->getList('id','nombre');\n\t}", "title": "" }, { "docid": "0f8a3d798b6a21147294a7bd71c6ba67", "score": "0.6500622", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM fournisseur';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "2246f5246f5b999da143c247e8be3736", "score": "0.6490283", "text": "public function getList()\n\n {\n $q->$this->$_db->query('SELECT * FROM Personnage ORDER BY nom');\n foreach ($donnees as $key => $value) {\n \n $personnage= $q->fetchAll(PDO::FETCH_ASSOC);\n return new Personnage($value);\n \n }\n \n }", "title": "" }, { "docid": "8d689d2f3d62a1eb10e875b7f254d432", "score": "0.6477477", "text": "public function listAll();", "title": "" }, { "docid": "8d689d2f3d62a1eb10e875b7f254d432", "score": "0.6477477", "text": "public function listAll();", "title": "" }, { "docid": "8d689d2f3d62a1eb10e875b7f254d432", "score": "0.6477477", "text": "public function listAll();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.6465368", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.6465368", "text": "public function getList();", "title": "" }, { "docid": "5bfdec120125d9ad44eef73aa94c4249", "score": "0.6464158", "text": "abstract protected function _getList();", "title": "" }, { "docid": "8767a0da54c1e856b466e6985277587a", "score": "0.6461448", "text": "function afficherReclamations(){\n\t\t$sql=\"SElECT * From reclamation\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "08904243d46a1d18ac7dba0417536176", "score": "0.6456589", "text": "function obtenerListas()\n{\n $sqlstr = \"select `lacteos`.`idlacteo`,\n `lacteos`.`nombre`,\n `lacteos`.`precio`,\n `lacteos`.`estado`\n FROM `examen2`.`lacteos`\";\n\n $modas = array();\n $modas = obtenerRegistros($sqlstr);\n return $modas;\n}", "title": "" }, { "docid": "e9b164f0184ee746ec5f706bbc9ead49", "score": "0.6442581", "text": "public function list_all(): array;", "title": "" }, { "docid": "e84b27f8946d6533b80c94ee7fa39a64", "score": "0.6425876", "text": "function listerTypeBien(){\n $this->getConnexion();\n // requete a executer\n $sql = \"select * from typeBien\";\n // preparation de la requete\n $donnees = $this->bdd->query($sql);\n return $donnees;\n }", "title": "" }, { "docid": "5063946849440f89ea3fec9e0c895113", "score": "0.64207786", "text": "public function listar();", "title": "" }, { "docid": "43ffd44e318662455ef1fd8da2015885", "score": "0.641415", "text": "public function listar(){\n $consulta = $this->db->query(\"select * from docentes;\");\n while($filas = $consulta->fetch_assoc()){\n $this->docentes[] = $filas;\n }\n return $this->docentes;\n }", "title": "" }, { "docid": "886f284ca98ad4c1a3a0913d1e7e5c72", "score": "0.6413337", "text": "public function fetchList();", "title": "" }, { "docid": "711d21f696953e2809fb998ff8cef2da", "score": "0.64129394", "text": "public function Lista() {\n $sql = \"SELECT id,id_reserva,total_pagar,estado,descripcion from historial_pago where estado='pagado'\";\n $this->objCon->Execute($sql);\n }", "title": "" }, { "docid": "bee1f242a778eb8d430e5eaff27a843f", "score": "0.64065105", "text": "abstract function get_all ();", "title": "" }, { "docid": "0059f9a7be3571b6360cf4ea287982fb", "score": "0.63976014", "text": "function Liste_Origines_Type() {\n global $pdo;\n $requete = $pdo->query(\"SELECT * FROM liste_origine ORDER BY liste_origine_libelle\");\n $res = $requete->fetchall(PDO::FETCH_ASSOC);\n $requete->closeCursor();\n foreach ($res as $data) {\n $tab_origines[$data['liste_origine_id']] = $data['liste_origine_cnsa'];\n }\n return $tab_origines;\n}", "title": "" }, { "docid": "dd18f46c29a0b62ef5a8d3f707e8aabc", "score": "0.63862336", "text": "public function getall();", "title": "" }, { "docid": "c7d635c7e00244a709463f7889479a29", "score": "0.6385968", "text": "public function getList() {}", "title": "" }, { "docid": "d30d7ac43c013c1935c337fedbb2b425", "score": "0.63799536", "text": "function getAllists(){\n\t\t$conn = Doctrine_Manager::connection();\n\t\t$all_lists = $conn->fetchAll(\"SELECT l.id as id, l.displayname as name FROM lookuptype AS l WHERE l.listable = 1 order by l.displayname ASC \");\n\t\treturn $all_lists;\n\t}", "title": "" }, { "docid": "369d4b57c6b0142d2c775505f967f734", "score": "0.6368733", "text": "public function get_all()\n {\n try {\n $r = parent::connect()->prepare(\"SELECT * FROM tipo_pago\");\n $r->execute();\n return $r->fetchAll(PDO::FETCH_OBJ);\n } catch (Exception $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "97a08433e5e9b30a14a4293ec0b2187f", "score": "0.6357696", "text": "function get_all_usagers( $pos, $nb, $mot_cle=\"\" ) \r\n\t{\r\n\t\t// Preparation de la requete et liage de parametres\t\t\t\r\n\t\t$statement = 'SELECT id_usager, civilite, nom, prenom, adresse, tel_fixe, tel_mobile,\r\n\t\t \t\t\t\temail, url_site, date_creation, date_derniere_connexion, \r\n\t\t\t\t\t\tnombre_connexions, mode_acces, date_debut_acces, date_fin_acces,\r\n\t\t\t\t\t\tlogin, mdp\r\n\t\t\t\t \t\tFROM les_usagers\r\n\t\t\t\t \t\tWHERE nom LIKE :motcle AND profil!=\\'app\\' AND profil!=\\'rl\\'\t\t\r\n\t\t\t \t\tORDER BY nom \r\n\t\t \t \t\tLIMIT :pos, :nb' ; \t\t \r\n\t\t$sth = $this->prepare( $statement );\r\n\t\t$this->bindValues( $sth, array( ':motcle' => $mot_cle.'%' ) );\r\n\t\t$this->bindValues( $sth, array( ':pos' => $pos, ':nb' => $nb ), PDO::PARAM_INT );\r\n\t\t$this->execute( $sth );\r\n\t\t\r\n\t\t// Recuperation des usagers\r\n\t\t$les_usagers = array( );\r\n\t\twhile ( $ligne = $this->fetch( $sth, PDO::FETCH_ASSOC ) )\r\n\t\t{\r\n\t\t\t$usager = new Usager($ligne[ 'id_usager' ]);\r\n\t\t\t\r\n\t\t\t$usager->civilite = $ligne[ 'civilite' ];\r\n\t\t\t$usager->nom = $ligne[ 'nom' ];\r\n\t\t\t$usager->prenom = $ligne[ 'prenom' ];\r\n\t\t\t$usager->adresse = $ligne[ 'adresse' ];\r\n\t\t\t$usager->tel_fixe = $ligne[ 'tel_fixe' ];\r\n\t\t\t$usager->tel_mobile = $ligne[ 'tel_mobile' ];\r\n\t\t\t$usager->email=$ligne[ 'email' ];\r\n\t\t\t$usager->url_site = $ligne[ 'url_site' ];\r\n\t\t\t$usager->date_creation = trans_date( $ligne[ 'date_creation' ] );\r\n\t\t\t$usager->date_derniere_connexion = trans_date_time( $ligne[ 'date_derniere_connexion' ] );\r\n\t\t\t$usager->nombre_connexions = $ligne[ 'nombre_connexions' ];\r\n\t\t\t$usager->mode_acces = $ligne[ 'mode_acces' ];\r\n\t\t\t$usager->date_debut_acces = $ligne[ 'date_debut_acces' ];\r\n\t\t\t$usager->date_fin_acces = $ligne[ 'date_fin_acces' ];\r\n\t\t\t$usager->login = $ligne[ 'login' ];\r\n\t\t\t$usager->mdp = $ligne[ 'mdp' ];\r\n\r\n\t\t\t$les_usagers[ ] = $usager;\r\n\t\t}\r\n\t\treturn $les_usagers;\r\n\t}", "title": "" }, { "docid": "b5c1f155794b6554d7c2bf635a0a16a6", "score": "0.6346873", "text": "public function getList() {\n $oData = mysql_query('SELECT * FROM LeBonCoin.annonces;');\n //echo 'avant le WHILE de mysql_fetch_array';\n while ($aLine = mysql_fetch_array($oData)) {\n //echo 'dans le WHILE de mysql_fetch_array';\n //echo $aLine[1];\n $oAnnonce = new Annonce($aLine);\n $aList[] = $oAnnonce;\n }\n return $aList;\n }", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.6344186", "text": "public static function getAll();", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.6344186", "text": "public static function getAll();", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.6344186", "text": "public static function getAll();", "title": "" }, { "docid": "18a913025f961d827ef4ea17388a1793", "score": "0.63379997", "text": "public function listeEtat_compte(){\n\t\t\t\t\t $sql = \"SELECT * FROM etat_compte\";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "title": "" }, { "docid": "32e58a852261e7cf58e26592cc73f07a", "score": "0.6321232", "text": "function afficher(){\r\n\t\t$sql=\"SElECT * From client\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "title": "" }, { "docid": "a38e814448dc4d8af7c6d802253cb6dc", "score": "0.6320599", "text": "function lstSuperComboDetalle()\n \t{\n \t\t$lstSuperComboDetalle = array();\n\n \t\t$sql = \"SELECT idSuperCombo, cantidad, idCombo, combo, imagen, descripcion, idEstadoMenu, estadoMenu FROM lstSuperComboDetalle;\";\n \t\t\n \t\tif( $rs = $this->con->query( $sql ) ){\n \t\t\twhile( $row = $rs->fetch_object() ){\n \t\t\t\t$lstSuperComboDetalle[] = $row;\n \t\t\t}\n \t\t}\n\n \t\treturn $lstSuperComboDetalle;\n \t}", "title": "" }, { "docid": "91469763e5218cd3d92d1a81d6d54e77", "score": "0.63174903", "text": "public function listaSucursalOrigen(){\n\t\t\n\t\t\t$query='SELECT *\n\t\t\t\t\tFROM gral_agencia ';\n \t\t\t//print_r($query);\n\t\t\treturn $this->mysql->query($query);\n\t}", "title": "" }, { "docid": "06118d5033555fc11057af6ae639e17a", "score": "0.6309903", "text": "public function GetAll ( ){\n\t\t// id\tint(11)\t\t\tNo\tNessuno\tAUTO_INCREMENT\t Modifica\t Elimina\t Naviga tra i valori distinti\tPrimaria\t Unica\t Indice\tSpatial\tTesto completo\n\t // 2\tuser\tint(11)\t\t\tNo\t0\t\t Modifica\t Elimina\t Naviga tra i valori distinti\t Primaria\t Unica\t Indice\tSpatial\tTesto completo\n\t // 3\turl\ttext\tlatin1_swedish_ci\t\tNo\tNessuno\t\t Modifica\t Elimina\t Naviga tra i valori distinti\tPrimaria\tUnica\tIndice\tSpatial\tTesto completo\n\t // 4\ttitle\tvarchar(255)\tlatin1_swedish_ci\t\tNo\tNessuno\t\t Modifica\t Elimina\t Naviga tra i valori distinti\t Primaria\t Unica\t Indice\tSpatial\tTesto completo\n\t // 5\tdesc\ttext\tlatin1_swedish_ci\t\tSì\tNULL\t\t Modifica\t Elimina\t Naviga tra i valori distinti\tPrimaria\tUnica\tIndice\tSpatial\tTesto completo\n\t // 6\tdate\n\t \t$userId = $this->user_id;\n\t\tif($userId === 0){\n\t\t\t$q = \"SELECT `id`, `user`, `url`, `title`, `desc`, `date`, DATE(`date`) AS `day` FROM `links` WHERE `share_level` = '0' ORDER BY `day` DESC\";\n\t\t\t$p = array();\n\t\t}else{\n\t\t\t$q = \"SELECT `id`, `user`, `url`, `title`, `desc`, `date`, DATE(`date`) AS `day` FROM `links` WHERE `user` = ? ORDER BY `day` DESC\";\n\t\t\t$p = array($userId);\n\t\t}\n\t\t$query = $this->db->Shell($q, $p);\n\t\t\n\t\tif($query) {\n\t\t\t$result = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t// $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\tif( $result ) {\n\t\t\t\treturn $result;\n\t\t\t}else{\n\t\t\t\treturn array();\n\t\t\t}\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "09c54b1051b953bf56864e44c03a643d", "score": "0.63097423", "text": "function lister_billet_actif_famille($id_famille){\r\nglobal $base;\r\n$query = $base->prepare('SELECT bg_billet.bg_bi_id, bg_billet.bg_bi_libelle, bg_billet.bg_bi_url, bg_billet.bg_bi_date, bg_billet.bg_bi_statut, bg_famille.bg_fa_libelle, bg_famille.bg_fa_id, bg_famille.bg_fa_url, bg_billet.bg_bi_titre, bg_billet.bg_bi_stitre, bg_billet.bg_bi_texte\r\nFROM bg_billet\r\nINNER JOIN bg_billet_famille ON bg_billet.bg_bi_id=bg_billet_famille.bg_bi_id\r\nINNER JOIN bg_famille ON bg_billet_famille.bg_fa_id=bg_famille.bg_fa_id\r\nWHERE bg_billet.bg_bi_statut=\"actif\" AND bg_famille.bg_fa_id='.$id_famille.'\r\nORDER BY bg_billet.bg_bi_date DESC ');\r\n$query->execute(); \r\n//$result = $query->fetchAll(PDO::FETCH_CLASS, 'Billet');// PDO::FETCH_ASSOC - PDO::FETCH_CLASS, 'Billet'\r\n$result = $query->fetchAll(PDO::FETCH_ASSOC);\r\nreturn $this->executeQuery($result);\r\n}", "title": "" }, { "docid": "16dbbd3a15143efa355f9190866fc91d", "score": "0.63075924", "text": "public function Listar()\n\t{\n\t\t$resultado = $this->unidadM->Listar();\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "f131de5157d9698a5fc70e5b02fdf687", "score": "0.62929547", "text": "function afficheravis(){\n\t\t$sql=\"SElECT * From avis \";\n\t\t$db = config::getConnexion();\n\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "4300d46ab34cb421896064d0783784d7", "score": "0.6265444", "text": "public function getList()\n {\n }", "title": "" }, { "docid": "4300d46ab34cb421896064d0783784d7", "score": "0.6265444", "text": "public function getList()\n {\n }", "title": "" }, { "docid": "a29b6569be84a28e29934a282921e69a", "score": "0.62651634", "text": "function buscar_all_habilitados() {\n\t\t$list = array();\n\t\t$query = $this->db->query(\"select \n\t\t\t cla_id_clase, \n\t\t\t cla_nombre, \n\t\t\t IFNULL(cla_id_clase_superior, '') cla_id_clase_superior, \n\t\t\t IFNULL((select cla_nombre from clase cs where cs.cla_id_clase=c.cla_id_clase_superior), '') cla_nombre_superior \n\t\t\tfrom clase c \n\t\t\twhere est_id_estado=11 \n\t\t\t and cla_eliminado='NO' \n\t\t\torder by cla_nombre_superior, cla_nombre\");\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$list[] = $row;\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "2665a89693e2b847a8255cb113d2bfb1", "score": "0.6263346", "text": "public function display_List() \r\n\t{\t\r\n\t\t$requete = 'SELECT * FROM auteur';\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Requête mySQL\r\n\t\t$result = $this->database->query($requete);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Envoie de la requête à la BDD\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Création de la collection Auteur => affichage tableau\r\n\t\t\r\n\t\t// Si pas d'erreur\r\n\t\tif ($this->testErreur($result) == \"\") \r\n\t\t{\r\n\t\t\t$auteurs = array();\t\r\n\t\t\t// Parcours du tableau Auteur\r\n\t\t\twhile ($utilEnBase = $result->fetch(PDO::FETCH_OBJ)) \r\n\t\t\t{\r\n\t\t\t\t$auteurs[] = new Auteur($utilEnBase->codAuteur, $utilEnBase->nomAuteur, $utilEnBase->prenomAuteur);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse $auteurs = $this->testErreur($result);\r\n\t\t// Affichage du tableau\r\n\t\treturn $auteurs;\r\n\t}", "title": "" }, { "docid": "87be36c60a15aedee3284a5458f22206", "score": "0.626233", "text": "public function lista() {\n\t\t//$consulta = $this->dbAdapter->query(\"SELECT id_estado,numero,descripcion, vigencia FROM estado order by descripcion asc\", Adapter::QUERY_MODE_EXECUTE);\n\n\t\t$consulta = $this->dbAdapter->query(\n\t\t\t\"SELECT a.id_area, a.descripcion, a.id_uni_org, a.id_area, a.vigencia, \"\n\t\t\t\t. \"o.descripcion as unidad_organica FROM area \"\n\t\t\t\t. \"a left join unidad_organica o on a.id_uni_org=o.id_uni_org order \"\n\t\t\t\t. \"by a.vigencia desc\", Adapter::QUERY_MODE_EXECUTE);\n\t\t$datos = $consulta->toArray();\n\t\t\n\t\t\n\t\t\n\t\treturn $datos;\n\t}", "title": "" }, { "docid": "173daf308bd095b4c579bd9cf1fb4afa", "score": "0.6261335", "text": "public function Listar()\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$result = array();\n\n\t\t\t\t$statement = $this->pdo->prepare(\"call PRO_LISTAR_BUZON_ENTRADA()\");\n\t\t\t\t$statement->execute();\n\n\t\t\t\tforeach($statement->fetchAll(PDO::FETCH_OBJ) as $r)\n\t\t\t\t{\n\t\t\t\t\t$per = new BuzonDeEntrada();\n\n\t\t\t\t\t$per->__SET('id_buzon', $r->id_buzon);\n\t\t\t\t\t$per->__GET('id_ambiente')->__SET('id_ambiente', $r->id_ambiente);\n\t\t\t\t\t$per->__GET('id_estado')->__SET('id_estado', $r->id_estado);\n\t\t\t\t\t$per->__GET('id_resolucion')->__SET('id_resolucion', $r->id_resolucion);\n\t\t\t\t\t\n\t\t\t\t\t$result[] = $per;\n\t\t\t\t}\n\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "96e740df07f59fffd8aecb16f1663d52", "score": "0.62576336", "text": "static public function getList() {\n\t\t$mComponentdatabase=new Maerdo_Model_Componentdatabase();\n\t\t$database=$mComponentdatabase->fetchAll();\n\t\t$result=array();\t\t\n\t\tforeach($database as $database)\n\t\t\t$result[]=$database->toArray();\n\t\treturn($result);\n\t}", "title": "" }, { "docid": "1d6170eb81512f5f91e8a01da9ae70a0", "score": "0.62482786", "text": "public static function liste(){\n\t\t\t$sql=\"SELECT * from Type\";\n\t\t\t$res=DB::get_instance()->prepare($sql);\n\t\t\t$res->execute();\n\t\t\t//gérer les erreurs éventuelles\n\t\t\tif($res->rowCount()==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$p= $res->fetchAll();\n\t\t\treturn $p;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "470cdcace467b071b65a1d4a36c638e4", "score": "0.6244059", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM vod_consumido';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "e829f26ff4b5ed05697629e06e37b039", "score": "0.6243706", "text": "public function listarUsuarios(){\n include ('Conection.php');\n require_once ('../bussines/DTO/Usuario.php');\n require_once ('../bussines/DTO/Persona.php');\n\n $consulta = \" SELECT usu.*, pers.*, tido.tido_abreviatura \";\n $consulta.= \" FROM usuario usu \";\n $consulta.= \" LEFT JOIN persona pers ON (pers.usu_id = usu.usu_id) \";\n $consulta.= \" LEFT JOIN tipodocumento tido ON (tido.tido_id = pers.tido_id) \";\n\n $result = $conexion->query($consulta);\n //$result->excute();\n\n $lista = array();\n\n foreach ($result as $row){\n $usuario = new Usuario();\n\n $usuario->_SET('id',$row['usu_id']);\n $usuario->_SET('nick',$row['usu_nick']);\n $usuario->_SET('contrasena',$row['usu_pass']);\n $usuario->_SET('estado',$row['usu_estado']);\n\n $persona = new Persona();\n\n $persona->_SET('idUsuario',$row['usu_id']);\n $persona->_SET('nombre',$row['pers_nombre']);\n $persona->_SET('apellido',$row['pers_apellido']);\n $persona->_SET('idTipoDocumento',$row['tido_id']);\n $persona->_SET('abreviaturaTipoDocumento',$row['tido_abreviatura']);\n $persona->_SET('numeroDocumento',$row['pers_numdocumento']);\n\n $usuario->_SET('persona', $persona);\n\n $lista[]=$usuario;\n }\n\n $conexion=null;\n return $lista;\n\n }", "title": "" }, { "docid": "f72c9fe71c591cc1b56156f759b9e3f7", "score": "0.62404954", "text": "static function getJoueurDemiFinale() {\r\n include_once 'daoJoueur.php';\r\n // include_once 'daoPartie.php';\r\n //$items= daoJoueur::getListeJoueur();\r\n $items = daoJoueur::getListeJoueur();\r\n return $items;\r\n }", "title": "" }, { "docid": "eeea58d4e5fb81be755c5fc379b14079", "score": "0.62393624", "text": "function listarBoletoOri(){\r\n\t\t$this->procedimiento='informix.ft_boletoori_sel';\r\n\t\t$this->transaccion='FAC_BOLEORI_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t$this->setCount(false);\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t\r\n\t\t\r\n\t\t$this->setParametro('billete','billete','numeric');\r\n\t\t\r\n\t\t$this->arreglo = array(\"fecha\" => \"'2014-01-01'\");\r\n\t\t$this->setParametro('fecha','fecha','date');\r\n\t\r\n\t\t$this->captura('bolori','numeric');\r\n\t\t$this->captura('billete','numeric');\r\n\t\t$this->captura('fecha','date');\r\n\t\t$this->captura('importe','varchar');\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif($this->respuesta->datos[0]['bolori'] != NULL || $this->respuesta->datos[0]['bolori']=\"\"){\r\n\t\t\t\r\n\t\t\r\n\t\t\tif($this->respuesta->getTipo()=='ERROR'){\r\n\t\t\t\treturn $this->respuesta;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\t \t$this->procedimiento='informix.ft_boletoori_sel';\r\n\t\t\t\t$this->transaccion='FAC_BOLEORIS_SEL';\r\n\t\t\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\t\t\t\t$this->setCount(false);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$this->arreglo = array(\"bolori\" => $this->respuesta->datos[0]['bolori']);\t\r\n\t\t\t\t\r\n\t\t\t\t//while(count($this->arreglo))array_pop($this->arreglo);\r\n\t\t\t\r\n\t\t\t\t$this->setParametro('bolori','bolori','numeric');\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$this->resetCaptura();\r\n\t\t\t\t$this->addConsulta();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$this->captura('bolori','numeric');\r\n\t\t\t\t\r\n\t\t\t\t$this->captura('fecha_ori','date');\r\n\t\t\t\t$this->captura('nit','numeric');\r\n\t\t\t\t$this->captura('razon','varchar');\r\n\t\t\t\t$this->captura('monto','numeric');\r\n\t\t\t\t$this->captura('exento','numeric');\r\n\t\t\t\t$this->captura('moneda','varchar');\r\n\t\t\t\t$this->captura('tcambio','numeric');\r\n\t\t\t\t$this->captura('fecha_fac','date');\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$this->armarConsulta();\r\n\t\t\t\t$consulta=$this->getConsulta();\r\n\t\t\t\t\t\t\r\n\t\t \t\t\r\n\t\t \t\twhile(count($this->respuesta->datos))array_pop($this->respuesta->datos);//limpia el array de datos\r\n\t\t\t\t\r\n\t\t\t\t$this->ejecutarConsulta($this->respuesta);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\t\r\n\t\t\r\n\t\treturn $this->respuesta;\r\n\t}", "title": "" }, { "docid": "bba40673832b8950d2a14f994cc9c988", "score": "0.62320924", "text": "public function get_all(){\n try {\n $query=parent::connect()->prepare(\n \"SELECT *\n FROM Tipo_documento \"\n );\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ\n );\n } \n catch (Exception $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "34d36b10414e82713740c867fc541c3e", "score": "0.6228682", "text": "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Xpp_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Xpp_cms_produit\", \"entier\", \"get_cms_produit\", \"set_cms_produit\");\n\t$laListeChamps[]=new dbChamp(\"Xpp_cms_produit2\", \"entier\", \"get_cms_produit2\", \"set_cms_produit2\");\n\treturn($laListeChamps);\n}", "title": "" }, { "docid": "b239457f88d5b36302082078cd46c5ab", "score": "0.6228259", "text": "public function getAllBase()\n\t\t{\n\t\t$rep = Model::$pdo->query(\"SELECT * FROM Bases\");\n\t\t$rep->setFetchMode(PDO::FETCH_CLASS, 'ModelBase');\n\t\t$ans = $rep->fetchAll();\n\t\treturn $ans;\n\t\t}", "title": "" }, { "docid": "fe4d8c346ba847ca785ac621682c7937", "score": "0.62191105", "text": "public function getList(){\n\n }", "title": "" }, { "docid": "37d8460b63775386a0d0cdbf1188037c", "score": "0.6213831", "text": "public function lister(){\n\t\t\t\t$sql = $this->_bdd->query(\"SELECT * FROM utilisateur ORDER BY id DESC\");\n\t\t\t\treturn $sql;\n\t\t\t}", "title": "" }, { "docid": "494a803db73f57586eab9b4437f5c711", "score": "0.6210758", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM disciplina_curso';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "eb07795300fc76ff30e7326a37504866", "score": "0.6210237", "text": "public function _list( )\n\t{\n\t\t$st_query = \"SELECT * FROM tbl_Gesto \";\n\t\t$v_Gestos = array();\n\t\ttry\n\t\t{\n\t\t\t$o_data = $this->o_db->query($st_query);\n\t\t\twhile($o_ret = $o_data->fetchObject())\n\t\t\t{\n\t\t\t\t$o_Gesto = new GestoModel();\n\t\t\t\t$o_Gesto->setId($o_ret->ges_in_id);\n\t\t\t\t$o_Gesto->setNome($o_ret->ges_st_nome);\n\t\t\t\t$o_Gesto->setJson($o_ret->ges_st_json);\n\t\t\t\tarray_push($v_Gestos,$o_Gesto);\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{}\t\t\t\t\n\t\treturn $v_Gestos;\n\t}", "title": "" }, { "docid": "aa1e9e42cf55403b386c15c165567483", "score": "0.62021977", "text": "public static function getAll()\n {\n }", "title": "" }, { "docid": "e1eb0d1d0a1a898d4be059af6edfda23", "score": "0.61966974", "text": "public function array_list($consulta=null){\n //$obj = null;\n //get_class($this);\n $to_array=array();\n while($fila=$this->fetch_array_assoc($consulta)){\n\t $to_array[]=$fila;\n\t }\n return $to_array;\n}", "title": "" }, { "docid": "e979e788f0496e7cd173174038cad366", "score": "0.6193353", "text": "public function queryAll(){\n\t\t$sql = 'SELECT * FROM detalle_cheque';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "title": "" }, { "docid": "b9327cee2a6e8f833d83cc9d243f6b0d", "score": "0.6190597", "text": "function listerProprietaire(){\n $this->getConnexion();\n // requete a executer\n $sql = \"select * from Proprietaire\";\n // preparation de la requete\n $donnees = $this->bdd->query($sql);\n return $donnees;\n }", "title": "" }, { "docid": "a86ca3fbc023ed11c1a94b48f2a72c04", "score": "0.6190487", "text": "function getAll();", "title": "" }, { "docid": "baebf5ea0265b6b98345e3a0d3f25a51", "score": "0.61895174", "text": "public function getAll(){\n\t\treturn $this->db->get($this->_tabel)->result();\n\t}", "title": "" }, { "docid": "b42543d67fc344035d664a36a13f0442", "score": "0.6188916", "text": "function trierlivraison(){\r\n $sql=\"SElECT * From livraison ORDER BY code\";\r\n $db = config::getConnexion();\r\n try{\r\n $liste=$db->query($sql);\r\n return $liste;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "83e58c97e2ca298145127afb1b5afc65", "score": "0.61870897", "text": "function afficherclients(){\n\t\t$sql=\"SElECT * From client\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "e1fd00a509fa85ca473d7fa7f117fee4", "score": "0.61867607", "text": "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Des_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Des_description\", \"text\", \"get_description\", \"set_description\");\n\t$laListeChamps[]=new dbChamp(\"Des_cms_site\", \"entier\", \"get_cms_site\", \"set_cms_site\");\n\t$laListeChamps[]=new dbChamp(\"Des_statut\", \"entier\", \"get_statut\", \"set_statut\");\n\treturn($laListeChamps);\n}", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.6186172", "text": "public function getAll() {}", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.61861145", "text": "public function getAll() {}", "title": "" }, { "docid": "f7b50bf40cfb92a645713cf40e545585", "score": "0.6186077", "text": "public static function readAll() {\n $pagetitle = \"Liste des besoins\";\n $title = \"$pagetitle\";\n $view = \"list\";\n if(isset($_GET['tri'])) $tri = htmlspecialchars($_GET['tri']);\n else $tri = \"\";\n if(isset($_GET['order'])) $order = strtoupper(htmlspecialchars($_GET['order']));\n else $order = \"\";\n $tab_besoins = ModelBesoin::selectAll($tri, $order);\n require File::build_path(array('view','view.php')); // affiche la vue\n }", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.6185975", "text": "public function getAll() {}", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.6185975", "text": "public function getAll() {}", "title": "" }, { "docid": "3bc51b187d8ad15942b16a5ec016cbbe", "score": "0.61833084", "text": "protected function getDatabaseList() {}", "title": "" }, { "docid": "753305d04d3c1d00964b2f8441d9b24c", "score": "0.61815786", "text": "public function listeFamille(){\n\t\t\t\t\t $sql = \"SELECT * FROM famille\";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "title": "" }, { "docid": "1a396c1bdadbe592208f7210c411918f", "score": "0.61806285", "text": "public function listAll(){\r\n\t\t\t$this->bindingsData();\r\n\t\t\t$key = strtolower(get_class($this));\r\n\t\t\t$template = $this->pathApp . '/listado.html';\r\n\t\t\t$datos = array();\r\n\t\t\t$datos = $this->computeSQL($this->filtroSQL, (($this->externQuery)?false:true) );\r\n\t\t\tif ( $this->oSystem->getOrderActionClass()->getChannel()=='json' ){\t\r\n\t\t\t\t$datosJson = array(\"error\"=>\"NO\",\"callBack\"=>\"\");\r\n\t\t\t\t$rows = array();\r\n\t\t\t\twhile ( $row = $this->oSystem->getConnection()->getColumnas($datos) )\r\n\t\t\t\t\tarray_push( $rows, array(\"proyecto\"=>$row[proyecto],\"finicio\"=>$row[finicio],\"ffin\"=>$row[ffin],\"estado\"=>$row[estado],\"porcentaje_consumido\"=>$row[porcentaje_consumido],\"porcentaje_completado\"=>$row[porcentaje_completado],\"duracion\"=>$row[duracion],\"consumido\"=>$row[consumido],\"hitos\"=>$row[hitos],\"hitos_completados\"=>$row[hitos_completados],\"cliente\"=>utf8_encode($row[cliente]),\"coste\"=>$row[coste]) );\r\n\t\t\t\t$key = 'json';\r\n\t\t\t\t$template = '';\r\n\t\t\t\t$pagination = $this->oSystem->getConnection()->getPaginacionJSON();\r\n\t\t\t\t$datosJson['callBack']=\"refreshList(\".json_encode($pagination).\",\".json_encode($rows).\")\";\r\n\t\t\t\t$datos = json_encode( $datosJson );\r\n\t\t\t}\r\n\t\t\t$this->computeTemplate($key, $datos, $template);\r\n\t\t}", "title": "" }, { "docid": "809771884eb81f758512cf8eee532fce", "score": "0.61801934", "text": "function noizetier_lister_blocs_avec_noisettes() {\n\tstatic $liste_blocs = null;\n\n\tif (is_null($liste_blocs)) {\n\t\tinclude_spip('base/abstract_sql');\n\t\t\n\t\t$liste_blocs = array();\n\t\t$resultats = sql_allfetsel(\n\t\t\tarray('bloc', 'type', 'composition'),\n\t\t\t'spip_noisettes',\n\t\t\t'1',\n\t\t\tarray('bloc', 'type', 'composition')\n\t\t);\n\t\tforeach ($resultats as $res) {\n\t\t\tif ($res['composition']) {\n\t\t\t\t$liste_blocs[] = $res['bloc'].'/'.$res['type'].'-'.$res['composition'];\n\t\t\t} else {\n\t\t\t\t$liste_blocs[] = $res['bloc'].'/'.$res['type'];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $liste_blocs;\n}", "title": "" }, { "docid": "bf1bc30233a225c042addf1175ede637", "score": "0.6176897", "text": "public function list()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.61762244", "text": "public function getAll();", "title": "" } ]
140717f7f5237a1bb86eef32f5ae436a
= public array validation_errors() Returns assoc array of validation errors key field name $result[$key] validation error
[ { "docid": "805d5857bcdd4fe5c0d12e662cfd76e8", "score": "0.76685154", "text": "public function validation_errors()\n\t{\n\t\t$errors = array();\n\n\t\tforeach ($this->validators as $fld=>$arr)\n\t\t{\n\t\t\tforeach ($arr as $vl)\n\t\t\t{\n\t\t\t\t$vl->page = $this;\n\n\t\t\t\tif (!$vl->validate($fld, $this->vars))\n\t\t\t\t{\n\t\t\t\t\t$errors[$fld] = $vl->error_message($fld, $this->vars);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}", "title": "" } ]
[ { "docid": "4e7ddfbb0847b587e29b75fc5a0ef5ce", "score": "0.78790027", "text": "public function _getValidationErrors(): array\n\t{\n\t\t$errs = parent::_getValidationErrors();\n\t\t$validationRules = $this->_getValidationRules();\n\t\tif (null !== ($v = $this->getUrl())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_URL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getIdentifier())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getName())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_NAME] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDisplay())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DISPLAY] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getStatus())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_STATUS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getExperimental())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getPublisher())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_PUBLISHER] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContact())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDate())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DATE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDescription())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getUseContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getRequirements())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getCopyright())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_COPYRIGHT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getCode())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getFhirVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getMapping())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getKind())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_KIND] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getConstrainedType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getAbstract())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_ABSTRACT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getContextType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getBase())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_BASE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getSnapshot())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_SNAPSHOT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDifferential())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_URL])) {\n\t\t\t$v = $this->getUrl();\n\t\t\tforeach ($validationRules[self::FIELD_URL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_URL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_URL])) {\n\t\t\t\t\t\t$errs[self::FIELD_URL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_URL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IDENTIFIER])) {\n\t\t\t$v = $this->getIdentifier();\n\t\t\tforeach ($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_IDENTIFIER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IDENTIFIER])) {\n\t\t\t\t\t\t$errs[self::FIELD_IDENTIFIER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IDENTIFIER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_VERSION])) {\n\t\t\t$v = $this->getVersion();\n\t\t\tforeach ($validationRules[self::FIELD_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_NAME])) {\n\t\t\t$v = $this->getName();\n\t\t\tforeach ($validationRules[self::FIELD_NAME] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_NAME,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_NAME])) {\n\t\t\t\t\t\t$errs[self::FIELD_NAME] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_NAME][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DISPLAY])) {\n\t\t\t$v = $this->getDisplay();\n\t\t\tforeach ($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DISPLAY,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DISPLAY])) {\n\t\t\t\t\t\t$errs[self::FIELD_DISPLAY] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DISPLAY][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_STATUS])) {\n\t\t\t$v = $this->getStatus();\n\t\t\tforeach ($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_STATUS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_STATUS])) {\n\t\t\t\t\t\t$errs[self::FIELD_STATUS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_STATUS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXPERIMENTAL])) {\n\t\t\t$v = $this->getExperimental();\n\t\t\tforeach ($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_EXPERIMENTAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXPERIMENTAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_PUBLISHER])) {\n\t\t\t$v = $this->getPublisher();\n\t\t\tforeach ($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_PUBLISHER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_PUBLISHER])) {\n\t\t\t\t\t\t$errs[self::FIELD_PUBLISHER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_PUBLISHER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTACT])) {\n\t\t\t$v = $this->getContact();\n\t\t\tforeach ($validationRules[self::FIELD_CONTACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DATE])) {\n\t\t\t$v = $this->getDate();\n\t\t\tforeach ($validationRules[self::FIELD_DATE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DATE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DATE])) {\n\t\t\t\t\t\t$errs[self::FIELD_DATE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DATE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DESCRIPTION])) {\n\t\t\t$v = $this->getDescription();\n\t\t\tforeach ($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DESCRIPTION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DESCRIPTION])) {\n\t\t\t\t\t\t$errs[self::FIELD_DESCRIPTION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DESCRIPTION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_USE_CONTEXT])) {\n\t\t\t$v = $this->getUseContext();\n\t\t\tforeach ($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_USE_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_USE_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_REQUIREMENTS])) {\n\t\t\t$v = $this->getRequirements();\n\t\t\tforeach ($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_REQUIREMENTS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_REQUIREMENTS])) {\n\t\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_COPYRIGHT])) {\n\t\t\t$v = $this->getCopyright();\n\t\t\tforeach ($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_COPYRIGHT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_COPYRIGHT])) {\n\t\t\t\t\t\t$errs[self::FIELD_COPYRIGHT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_COPYRIGHT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CODE])) {\n\t\t\t$v = $this->getCode();\n\t\t\tforeach ($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CODE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CODE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CODE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CODE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_FHIR_VERSION])) {\n\t\t\t$v = $this->getFhirVersion();\n\t\t\tforeach ($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_FHIR_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_FHIR_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MAPPING])) {\n\t\t\t$v = $this->getMapping();\n\t\t\tforeach ($validationRules[self::FIELD_MAPPING] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_MAPPING,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MAPPING])) {\n\t\t\t\t\t\t$errs[self::FIELD_MAPPING] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MAPPING][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_KIND])) {\n\t\t\t$v = $this->getKind();\n\t\t\tforeach ($validationRules[self::FIELD_KIND] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_KIND,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_KIND])) {\n\t\t\t\t\t\t$errs[self::FIELD_KIND] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_KIND][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t$v = $this->getConstrainedType();\n\t\t\tforeach ($validationRules[self::FIELD_CONSTRAINED_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONSTRAINED_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ABSTRACT])) {\n\t\t\t$v = $this->getAbstract();\n\t\t\tforeach ($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_ABSTRACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ABSTRACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_ABSTRACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ABSTRACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t$v = $this->getContextType();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT])) {\n\t\t\t$v = $this->getContext();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_BASE])) {\n\t\t\t$v = $this->getBase();\n\t\t\tforeach ($validationRules[self::FIELD_BASE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_BASE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_BASE])) {\n\t\t\t\t\t\t$errs[self::FIELD_BASE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_BASE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_SNAPSHOT])) {\n\t\t\t$v = $this->getSnapshot();\n\t\t\tforeach ($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_SNAPSHOT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_SNAPSHOT])) {\n\t\t\t\t\t\t$errs[self::FIELD_SNAPSHOT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_SNAPSHOT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DIFFERENTIAL])) {\n\t\t\t$v = $this->getDifferential();\n\t\t\tforeach ($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DIFFERENTIAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DIFFERENTIAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_TEXT])) {\n\t\t\t$v = $this->getText();\n\t\t\tforeach ($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_TEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_TEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_TEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_TEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTAINED])) {\n\t\t\t$v = $this->getContained();\n\t\t\tforeach ($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_CONTAINED,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTAINED])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTAINED] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTAINED][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXTENSION])) {\n\t\t\t$v = $this->getExtension();\n\t\t\tforeach ($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t$v = $this->getModifierExtension();\n\t\t\tforeach ($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_MODIFIER_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ID])) {\n\t\t\t$v = $this->getId();\n\t\t\tforeach ($validationRules[self::FIELD_ID] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_ID,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ID])) {\n\t\t\t\t\t\t$errs[self::FIELD_ID] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ID][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_META])) {\n\t\t\t$v = $this->getMeta();\n\t\t\tforeach ($validationRules[self::FIELD_META] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_META,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_META])) {\n\t\t\t\t\t\t$errs[self::FIELD_META] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_META][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t$v = $this->getImplicitRules();\n\t\t\tforeach ($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_IMPLICIT_RULES,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_LANGUAGE])) {\n\t\t\t$v = $this->getLanguage();\n\t\t\tforeach ($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_LANGUAGE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_LANGUAGE])) {\n\t\t\t\t\t\t$errs[self::FIELD_LANGUAGE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_LANGUAGE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $errs;\n\t}", "title": "" }, { "docid": "e5e91e64d0caa868fcaceeed8beb84ae", "score": "0.7780057", "text": "public function getValidationErrors();", "title": "" }, { "docid": "e5e91e64d0caa868fcaceeed8beb84ae", "score": "0.7780057", "text": "public function getValidationErrors();", "title": "" }, { "docid": "e5e91e64d0caa868fcaceeed8beb84ae", "score": "0.7780057", "text": "public function getValidationErrors();", "title": "" }, { "docid": "0bd56a3435a6fbb1bc3d581f76552a6c", "score": "0.7627065", "text": "public function getErrors()\n {\n $errors = $this->getValue('klarna_validation_errors');\n return $errors ? $errors : array();\n }", "title": "" }, { "docid": "a01b2def236daa87c2c11d8d549bd6a5", "score": "0.75826657", "text": "public function getValidationErrors(): array;", "title": "" }, { "docid": "13deeb866bc1515c9a871e210094069a", "score": "0.75728106", "text": "public function getValidationErrors(): array\n {\n return $this->validationErrors;\n }", "title": "" }, { "docid": "eeabd81108f6eb80c9302e0c77a28c1f", "score": "0.74839544", "text": "public function getValidationErrors()\n {\n $this->validate();\n return $this->validationErrors;\n }", "title": "" }, { "docid": "f54c6389c85fa1ad310bd8466b064c27", "score": "0.7483065", "text": "public function getErrors()\n {\n return $this->_arrValidationErrors;\n }", "title": "" }, { "docid": "d0f9fd6e691c49eed99eab6595c1942a", "score": "0.74531233", "text": "protected function _getValidationErrors()\n {\n if (is_null($this->validationErrors)) {\n return array();\n }\n\n return $this->validationErrors;\n }", "title": "" }, { "docid": "c445f6685516f8070789a168a691cb9b", "score": "0.74145585", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getCodedDiagnosis())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_CODED_DIAGNOSIS, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getConclusion())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CONCLUSION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDiagnosticDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DIAGNOSTIC_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDiagnosticPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DIAGNOSTIC_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getIdentifier())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_IDENTIFIER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getImage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IMAGE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getImagingStudy())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IMAGING_STUDY, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getIssued())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ISSUED] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getName())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_NAME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPerformer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERFORMER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getPresentedForm())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PRESENTED_FORM, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getRequestDetail())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REQUEST_DETAIL, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getResult())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_RESULT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getServiceCategory())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SERVICE_CATEGORY] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getSpecimen())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_SPECIMEN, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_CODED_DIAGNOSIS])) {\n $v = $this->getCodedDiagnosis();\n foreach($validationRules[self::FIELD_CODED_DIAGNOSIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CODED_DIAGNOSIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CODED_DIAGNOSIS])) {\n $errs[self::FIELD_CODED_DIAGNOSIS] = [];\n }\n $errs[self::FIELD_CODED_DIAGNOSIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONCLUSION])) {\n $v = $this->getConclusion();\n foreach($validationRules[self::FIELD_CONCLUSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_CONCLUSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONCLUSION])) {\n $errs[self::FIELD_CONCLUSION] = [];\n }\n $errs[self::FIELD_CONCLUSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DIAGNOSTIC_DATE_TIME])) {\n $v = $this->getDiagnosticDateTime();\n foreach($validationRules[self::FIELD_DIAGNOSTIC_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_DIAGNOSTIC_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DIAGNOSTIC_DATE_TIME])) {\n $errs[self::FIELD_DIAGNOSTIC_DATE_TIME] = [];\n }\n $errs[self::FIELD_DIAGNOSTIC_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DIAGNOSTIC_PERIOD])) {\n $v = $this->getDiagnosticPeriod();\n foreach($validationRules[self::FIELD_DIAGNOSTIC_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_DIAGNOSTIC_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DIAGNOSTIC_PERIOD])) {\n $errs[self::FIELD_DIAGNOSTIC_PERIOD] = [];\n }\n $errs[self::FIELD_DIAGNOSTIC_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMAGE])) {\n $v = $this->getImage();\n foreach($validationRules[self::FIELD_IMAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMAGE])) {\n $errs[self::FIELD_IMAGE] = [];\n }\n $errs[self::FIELD_IMAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMAGING_STUDY])) {\n $v = $this->getImagingStudy();\n foreach($validationRules[self::FIELD_IMAGING_STUDY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_IMAGING_STUDY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMAGING_STUDY])) {\n $errs[self::FIELD_IMAGING_STUDY] = [];\n }\n $errs[self::FIELD_IMAGING_STUDY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ISSUED])) {\n $v = $this->getIssued();\n foreach($validationRules[self::FIELD_ISSUED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_ISSUED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ISSUED])) {\n $errs[self::FIELD_ISSUED] = [];\n }\n $errs[self::FIELD_ISSUED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NAME])) {\n $v = $this->getName();\n foreach($validationRules[self::FIELD_NAME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_NAME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NAME])) {\n $errs[self::FIELD_NAME] = [];\n }\n $errs[self::FIELD_NAME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERFORMER])) {\n $v = $this->getPerformer();\n foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PERFORMER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERFORMER])) {\n $errs[self::FIELD_PERFORMER] = [];\n }\n $errs[self::FIELD_PERFORMER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRESENTED_FORM])) {\n $v = $this->getPresentedForm();\n foreach($validationRules[self::FIELD_PRESENTED_FORM] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_PRESENTED_FORM, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRESENTED_FORM])) {\n $errs[self::FIELD_PRESENTED_FORM] = [];\n }\n $errs[self::FIELD_PRESENTED_FORM][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REQUEST_DETAIL])) {\n $v = $this->getRequestDetail();\n foreach($validationRules[self::FIELD_REQUEST_DETAIL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_REQUEST_DETAIL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REQUEST_DETAIL])) {\n $errs[self::FIELD_REQUEST_DETAIL] = [];\n }\n $errs[self::FIELD_REQUEST_DETAIL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESULT])) {\n $v = $this->getResult();\n foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_RESULT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESULT])) {\n $errs[self::FIELD_RESULT] = [];\n }\n $errs[self::FIELD_RESULT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SERVICE_CATEGORY])) {\n $v = $this->getServiceCategory();\n foreach($validationRules[self::FIELD_SERVICE_CATEGORY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SERVICE_CATEGORY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SERVICE_CATEGORY])) {\n $errs[self::FIELD_SERVICE_CATEGORY] = [];\n }\n $errs[self::FIELD_SERVICE_CATEGORY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SPECIMEN])) {\n $v = $this->getSpecimen();\n foreach($validationRules[self::FIELD_SPECIMEN] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SPECIMEN, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SPECIMEN])) {\n $errs[self::FIELD_SPECIMEN] = [];\n }\n $errs[self::FIELD_SPECIMEN][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DIAGNOSTIC_REPORT, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BACKBONE_ELEMENT, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "20bb2e6a56d92882070232bf03a6248f", "score": "0.7413329", "text": "public function errors() {\n $Errors = array();\n foreach ($this->__fields() as $field) {\n $E = $this->$field->errorsList();\n if ($E) $Errors[$field] = $E;\n }\n return $Errors;\n }", "title": "" }, { "docid": "4c81643015c76070c2a33a1940ace6da", "score": "0.7409842", "text": "public function getValidationErrors() {\n\t\treturn $this->_validationErrors;\n\t}", "title": "" }, { "docid": "2963b6fbaa5a3e0fc4633e5955e0634d", "score": "0.74077356", "text": "public function getValidationErrors() {\n\t\t$out = array();\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\t$out = array_merge($out, $field->getValidationErrors());\n\t\t}\n\t\tif ((!$this->lat || !$this->lng) && !$this->feature_id) {\n\t\t\t$out[] = \"You must set a location!\";\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "5c4cec44a414d431af3da529dc67a0c0", "score": "0.7399919", "text": "public function getErrorsAsArray() {\n return $this->validation_errors;\n }", "title": "" }, { "docid": "f01724186b38aeee182a5f56491488eb", "score": "0.7362202", "text": "public function validationErrors(){\n return $this->validation_errors;\n }", "title": "" }, { "docid": "aef481de553aa161a78ddba5ae1b8b43", "score": "0.7354526", "text": "public function getErrors() {\n return $this->validater->error_array();\n }", "title": "" }, { "docid": "0d552f90479a0fe916c434ad304dcda5", "score": "0.7306914", "text": "private function get_validation_error() {\n foreach($this->invalids as $type => $data) {\n switch($type) {\n case 'password':\n $this->validation_errors[] = 'Password must be at least 8 characters and include at least 1 uppercase character, 1 lowercase character and 1 number';\n break;\n case 'email_address':\n $this->validation_errors[] = 'This is not a valid email address';\n break;\n case 'username':\n $this->validation_errors[] = 'Usernames can only contain alphanumeric characters, no symbols or spaces';\n break;\n case 'display_name':\n case 'text':\n $this->validation_errors[] = 'This is not a valid text';\n break;\n case 'number':\n $this->validation_errors[] = 'Must contain only numbers, no spaces or alphabetic characters';\n break;\n case 'url':\n $this->validation_errors[] = 'That is not a valid URL.';\n break;\n }\n }\n }", "title": "" }, { "docid": "eb80ceb06b77bb996ce60540f8b105b1", "score": "0.7285334", "text": "public function getErrors() : array;", "title": "" }, { "docid": "eb80ceb06b77bb996ce60540f8b105b1", "score": "0.7285334", "text": "public function getErrors() : array;", "title": "" }, { "docid": "eb80ceb06b77bb996ce60540f8b105b1", "score": "0.7285334", "text": "public function getErrors() : array;", "title": "" }, { "docid": "eb80ceb06b77bb996ce60540f8b105b1", "score": "0.7285334", "text": "public function getErrors() : array;", "title": "" }, { "docid": "46d8259def22916ad537953c089e68aa", "score": "0.7283322", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getAccident())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAccidentType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT_TYPE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getAdditionalMaterials())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_MATERIALS, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCondition())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCoverage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getCreated())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CREATED] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getDiagnosis())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEnterer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENTERER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getFacility())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FACILITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getFundsReserve())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getInterventionException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_INTERVENTION_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getItem())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getMissingTeeth())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_MISSING_TEETH, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOrganization())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORGANIZATION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPatient())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PATIENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPayee())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PAYEE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPriority())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRIORITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getProvider())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PROVIDER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getReferral())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REFERRAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSchool())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SCHOOL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getTarget())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TARGET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT])) {\n $v = $this->getAccident();\n foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT])) {\n $errs[self::FIELD_ACCIDENT] = [];\n }\n $errs[self::FIELD_ACCIDENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT_TYPE])) {\n $v = $this->getAccidentType();\n foreach($validationRules[self::FIELD_ACCIDENT_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT_TYPE])) {\n $errs[self::FIELD_ACCIDENT_TYPE] = [];\n }\n $errs[self::FIELD_ACCIDENT_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ADDITIONAL_MATERIALS])) {\n $v = $this->getAdditionalMaterials();\n foreach($validationRules[self::FIELD_ADDITIONAL_MATERIALS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ADDITIONAL_MATERIALS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ADDITIONAL_MATERIALS])) {\n $errs[self::FIELD_ADDITIONAL_MATERIALS] = [];\n }\n $errs[self::FIELD_ADDITIONAL_MATERIALS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONDITION])) {\n $v = $this->getCondition();\n foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CONDITION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONDITION])) {\n $errs[self::FIELD_CONDITION] = [];\n }\n $errs[self::FIELD_CONDITION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COVERAGE])) {\n $v = $this->getCoverage();\n foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_COVERAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COVERAGE])) {\n $errs[self::FIELD_COVERAGE] = [];\n }\n $errs[self::FIELD_COVERAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CREATED])) {\n $v = $this->getCreated();\n foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CREATED])) {\n $errs[self::FIELD_CREATED] = [];\n }\n $errs[self::FIELD_CREATED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DIAGNOSIS])) {\n $v = $this->getDiagnosis();\n foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DIAGNOSIS])) {\n $errs[self::FIELD_DIAGNOSIS] = [];\n }\n $errs[self::FIELD_DIAGNOSIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENTERER])) {\n $v = $this->getEnterer();\n foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENTERER])) {\n $errs[self::FIELD_ENTERER] = [];\n }\n $errs[self::FIELD_ENTERER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXCEPTION])) {\n $v = $this->getException();\n foreach($validationRules[self::FIELD_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXCEPTION])) {\n $errs[self::FIELD_EXCEPTION] = [];\n }\n $errs[self::FIELD_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FACILITY])) {\n $v = $this->getFacility();\n foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FACILITY])) {\n $errs[self::FIELD_FACILITY] = [];\n }\n $errs[self::FIELD_FACILITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) {\n $v = $this->getFundsReserve();\n foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FUNDS_RESERVE])) {\n $errs[self::FIELD_FUNDS_RESERVE] = [];\n }\n $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTERVENTION_EXCEPTION])) {\n $v = $this->getInterventionException();\n foreach($validationRules[self::FIELD_INTERVENTION_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INTERVENTION_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTERVENTION_EXCEPTION])) {\n $errs[self::FIELD_INTERVENTION_EXCEPTION] = [];\n }\n $errs[self::FIELD_INTERVENTION_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ITEM])) {\n $v = $this->getItem();\n foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ITEM])) {\n $errs[self::FIELD_ITEM] = [];\n }\n $errs[self::FIELD_ITEM][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MISSING_TEETH])) {\n $v = $this->getMissingTeeth();\n foreach($validationRules[self::FIELD_MISSING_TEETH] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_MISSING_TEETH, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MISSING_TEETH])) {\n $errs[self::FIELD_MISSING_TEETH] = [];\n }\n $errs[self::FIELD_MISSING_TEETH][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORGANIZATION])) {\n $v = $this->getOrganization();\n foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORGANIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORGANIZATION])) {\n $errs[self::FIELD_ORGANIZATION] = [];\n }\n $errs[self::FIELD_ORGANIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $v = $this->getOriginalPrescription();\n foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) {\n $v = $this->getOriginalRuleset();\n foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) {\n $errs[self::FIELD_ORIGINAL_RULESET] = [];\n }\n $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PATIENT])) {\n $v = $this->getPatient();\n foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PATIENT])) {\n $errs[self::FIELD_PATIENT] = [];\n }\n $errs[self::FIELD_PATIENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PAYEE])) {\n $v = $this->getPayee();\n foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PAYEE])) {\n $errs[self::FIELD_PAYEE] = [];\n }\n $errs[self::FIELD_PAYEE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRESCRIPTION])) {\n $v = $this->getPrescription();\n foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRESCRIPTION])) {\n $errs[self::FIELD_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRIORITY])) {\n $v = $this->getPriority();\n foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRIORITY])) {\n $errs[self::FIELD_PRIORITY] = [];\n }\n $errs[self::FIELD_PRIORITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROVIDER])) {\n $v = $this->getProvider();\n foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROVIDER])) {\n $errs[self::FIELD_PROVIDER] = [];\n }\n $errs[self::FIELD_PROVIDER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REFERRAL])) {\n $v = $this->getReferral();\n foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REFERRAL])) {\n $errs[self::FIELD_REFERRAL] = [];\n }\n $errs[self::FIELD_REFERRAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RULESET])) {\n $v = $this->getRuleset();\n foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RULESET])) {\n $errs[self::FIELD_RULESET] = [];\n }\n $errs[self::FIELD_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SCHOOL])) {\n $v = $this->getSchool();\n foreach($validationRules[self::FIELD_SCHOOL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SCHOOL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SCHOOL])) {\n $errs[self::FIELD_SCHOOL] = [];\n }\n $errs[self::FIELD_SCHOOL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TARGET])) {\n $v = $this->getTarget();\n foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TARGET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TARGET])) {\n $errs[self::FIELD_TARGET] = [];\n }\n $errs[self::FIELD_TARGET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "0d625fca0d6f199da820cf5013fdd91a", "score": "0.72755396", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getDataRequirement())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEncounter())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENCOUNTER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getEvaluationMessage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EVALUATION_MESSAGE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getModuleCanonical())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CANONICAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleCodeableConcept())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleUri())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_URI] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOccurrenceDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOutputParameters())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPerformer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERFORMER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getReasonCode())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getReasonReference())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getRequestIdentifier())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getResult())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESULT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) {\n $v = $this->getDataRequirement();\n foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) {\n $errs[self::FIELD_DATA_REQUIREMENT] = [];\n }\n $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENCOUNTER])) {\n $v = $this->getEncounter();\n foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENCOUNTER])) {\n $errs[self::FIELD_ENCOUNTER] = [];\n }\n $errs[self::FIELD_ENCOUNTER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EVALUATION_MESSAGE])) {\n $v = $this->getEvaluationMessage();\n foreach($validationRules[self::FIELD_EVALUATION_MESSAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_EVALUATION_MESSAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EVALUATION_MESSAGE])) {\n $errs[self::FIELD_EVALUATION_MESSAGE] = [];\n }\n $errs[self::FIELD_EVALUATION_MESSAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CANONICAL])) {\n $v = $this->getModuleCanonical();\n foreach($validationRules[self::FIELD_MODULE_CANONICAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CANONICAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CANONICAL])) {\n $errs[self::FIELD_MODULE_CANONICAL] = [];\n }\n $errs[self::FIELD_MODULE_CANONICAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $v = $this->getModuleCodeableConcept();\n foreach($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CODEABLE_CONCEPT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = [];\n }\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_URI])) {\n $v = $this->getModuleUri();\n foreach($validationRules[self::FIELD_MODULE_URI] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_URI, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_URI])) {\n $errs[self::FIELD_MODULE_URI] = [];\n }\n $errs[self::FIELD_MODULE_URI][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $v = $this->getOccurrenceDateTime();\n foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = [];\n }\n $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OUTPUT_PARAMETERS])) {\n $v = $this->getOutputParameters();\n foreach($validationRules[self::FIELD_OUTPUT_PARAMETERS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OUTPUT_PARAMETERS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OUTPUT_PARAMETERS])) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = [];\n }\n $errs[self::FIELD_OUTPUT_PARAMETERS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERFORMER])) {\n $v = $this->getPerformer();\n foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_PERFORMER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERFORMER])) {\n $errs[self::FIELD_PERFORMER] = [];\n }\n $errs[self::FIELD_PERFORMER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_CODE])) {\n $v = $this->getReasonCode();\n foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_CODE])) {\n $errs[self::FIELD_REASON_CODE] = [];\n }\n $errs[self::FIELD_REASON_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_REFERENCE])) {\n $v = $this->getReasonReference();\n foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_REFERENCE])) {\n $errs[self::FIELD_REASON_REFERENCE] = [];\n }\n $errs[self::FIELD_REASON_REFERENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REQUEST_IDENTIFIER])) {\n $v = $this->getRequestIdentifier();\n foreach($validationRules[self::FIELD_REQUEST_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REQUEST_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REQUEST_IDENTIFIER])) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = [];\n }\n $errs[self::FIELD_REQUEST_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESULT])) {\n $v = $this->getResult();\n foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_RESULT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESULT])) {\n $errs[self::FIELD_RESULT] = [];\n }\n $errs[self::FIELD_RESULT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "f01c2484aa999548ac2a9d2ff76dbabf", "score": "0.7255213", "text": "public function getFieldValidationErrors()\n {\n return $this->_aInputValidationErrors;\n }", "title": "" }, { "docid": "105eb341e19f4f60e15e1478eaf06f5c", "score": "0.7241936", "text": "public function getErrors():array\r\n {\r\n return $this->arrayError;\r\n }", "title": "" }, { "docid": "02018534b392a3c02120b76fbfbfcefa", "score": "0.72162884", "text": "public function getErrors()\n {\n $errors = [];\n if (!empty($this->errors)) {\n foreach ($this->errors as $key => $val) {\n $errors[$key] = $val;\n }\n }\n\n return $this->errors;\n }", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.72137994", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.72137994", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.72137994", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.72137994", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.72137994", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.72137994", "text": "public function getErrors();", "title": "" }, { "docid": "dad5f7c80b28c1837492214ad2b08ebb", "score": "0.7211051", "text": "public function getAllValidationErrors() {\n $currentModelErrors = $this->validationErrors;\n $associatedModelErrors = array();\n \n $registerFormErrors = array();\n \n // first we put in all the validation errors of the current model\n foreach($currentModelErrors as $fieldName => $err){\n if(!is_array($err)){\n $registerFormErrors[$fieldName] = $err;\n } else {\n $associatedModelErrors[] = $err;\n }\n }\n \n foreach ($associatedModelErrors as $fieldName => $err) {\n $registerFormErrors = array_merge($registerFormErrors, $err);\n }\n \n \n // then we put in the validation errors of the associated models\n return $registerFormErrors;\n\t}", "title": "" }, { "docid": "c739136a3a667ec2dea5243f84cd7f6f", "score": "0.71961206", "text": "public function errorsArray()\n {\n return collect($this->errors()->toArray())->keyBy(function ($value, $key) {\n return Str::snake($key);\n })->toArray();\n }", "title": "" }, { "docid": "ec1035588978e0cb568c42ebaef12aa0", "score": "0.71879834", "text": "public function errors(): array\n {\n return $this->validator->errors();\n }", "title": "" }, { "docid": "630f9e546f07fe1afc13bd4ab830efb5", "score": "0.71811765", "text": "public function get_error()\n {\n $errors = $this->_get_view_var('errors');\n\n\n\n if ($errors)\n {\n if ($this->_field instanceof Jelly_Field_ManyToMany)\n {\n\n if (array_key_exists(Inflector::singular($this->_field->name), $errors))\n {\n return $errors[Inflector::singular($this->_field->name)];\n //extra validation from controller\n } elseif (isset($errors['_external']))\n {\n if (array_key_exists(Inflector::singular($this->_field->name), $errors['_external']))\n {\n return $errors['_external'][Inflector::singular($this->_field->name)];\n }\n }\n } else\n {\n if (array_key_exists($this->_field->name, $errors))\n {\n return $errors[$this->_field->name];\n //extra validation from controller\n } elseif (isset($errors['_external']))\n {\n if (array_key_exists($this->_field->name, $errors['_external']))\n {\n return $errors['_external'][$this->_field->name];\n }\n }\n }\n }\n }", "title": "" }, { "docid": "ea1ef67dffb75b4a49b7039fa34b84e4", "score": "0.7175055", "text": "public function getErrors(): array;", "title": "" }, { "docid": "ea1ef67dffb75b4a49b7039fa34b84e4", "score": "0.7175055", "text": "public function getErrors(): array;", "title": "" }, { "docid": "ea1ef67dffb75b4a49b7039fa34b84e4", "score": "0.7175055", "text": "public function getErrors(): array;", "title": "" }, { "docid": "ea1ef67dffb75b4a49b7039fa34b84e4", "score": "0.7175055", "text": "public function getErrors(): array;", "title": "" }, { "docid": "6c4385a1ca1b879f7ba7895739b631d8", "score": "0.71748716", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getAuthoredOn())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_AUTHORED_ON] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getBasedOn())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_BASED_ON, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getBusinessStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_BUSINESS_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getCode())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CODE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getContext())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CONTEXT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDefinitionReference())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DEFINITION_REFERENCE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDefinitionUri())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DEFINITION_URI] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getExecutionPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_EXECUTION_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getFocus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FOCUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getFor())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FOR] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getGroupIdentifier())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_GROUP_IDENTIFIER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getInput())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_INPUT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getIntent())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_INTENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getLastModified())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_LAST_MODIFIED] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getOutput())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_OUTPUT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOwner())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OWNER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getPartOf())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PART_OF, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getPerformerType())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_PERFORMER_TYPE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getPriority())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRIORITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getReason())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REASON] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getRelevantHistory())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_RELEVANT_HISTORY, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getRequester())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REQUESTER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRestriction())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESTRICTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatusReason())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS_REASON] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_AUTHORED_ON])) {\n $v = $this->getAuthoredOn();\n foreach($validationRules[self::FIELD_AUTHORED_ON] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_AUTHORED_ON, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_AUTHORED_ON])) {\n $errs[self::FIELD_AUTHORED_ON] = [];\n }\n $errs[self::FIELD_AUTHORED_ON][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_BASED_ON])) {\n $v = $this->getBasedOn();\n foreach($validationRules[self::FIELD_BASED_ON] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_BASED_ON, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_BASED_ON])) {\n $errs[self::FIELD_BASED_ON] = [];\n }\n $errs[self::FIELD_BASED_ON][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_BUSINESS_STATUS])) {\n $v = $this->getBusinessStatus();\n foreach($validationRules[self::FIELD_BUSINESS_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_BUSINESS_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_BUSINESS_STATUS])) {\n $errs[self::FIELD_BUSINESS_STATUS] = [];\n }\n $errs[self::FIELD_BUSINESS_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CODE])) {\n $v = $this->getCode();\n foreach($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CODE])) {\n $errs[self::FIELD_CODE] = [];\n }\n $errs[self::FIELD_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTEXT])) {\n $v = $this->getContext();\n foreach($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_CONTEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTEXT])) {\n $errs[self::FIELD_CONTEXT] = [];\n }\n $errs[self::FIELD_CONTEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DEFINITION_REFERENCE])) {\n $v = $this->getDefinitionReference();\n foreach($validationRules[self::FIELD_DEFINITION_REFERENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DEFINITION_REFERENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DEFINITION_REFERENCE])) {\n $errs[self::FIELD_DEFINITION_REFERENCE] = [];\n }\n $errs[self::FIELD_DEFINITION_REFERENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DEFINITION_URI])) {\n $v = $this->getDefinitionUri();\n foreach($validationRules[self::FIELD_DEFINITION_URI] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DEFINITION_URI, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DEFINITION_URI])) {\n $errs[self::FIELD_DEFINITION_URI] = [];\n }\n $errs[self::FIELD_DEFINITION_URI][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DESCRIPTION])) {\n $v = $this->getDescription();\n foreach($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_DESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DESCRIPTION])) {\n $errs[self::FIELD_DESCRIPTION] = [];\n }\n $errs[self::FIELD_DESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXECUTION_PERIOD])) {\n $v = $this->getExecutionPeriod();\n foreach($validationRules[self::FIELD_EXECUTION_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_EXECUTION_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXECUTION_PERIOD])) {\n $errs[self::FIELD_EXECUTION_PERIOD] = [];\n }\n $errs[self::FIELD_EXECUTION_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FOCUS])) {\n $v = $this->getFocus();\n foreach($validationRules[self::FIELD_FOCUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_FOCUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FOCUS])) {\n $errs[self::FIELD_FOCUS] = [];\n }\n $errs[self::FIELD_FOCUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FOR])) {\n $v = $this->getFor();\n foreach($validationRules[self::FIELD_FOR] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_FOR, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FOR])) {\n $errs[self::FIELD_FOR] = [];\n }\n $errs[self::FIELD_FOR][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_GROUP_IDENTIFIER])) {\n $v = $this->getGroupIdentifier();\n foreach($validationRules[self::FIELD_GROUP_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_GROUP_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_GROUP_IDENTIFIER])) {\n $errs[self::FIELD_GROUP_IDENTIFIER] = [];\n }\n $errs[self::FIELD_GROUP_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INPUT])) {\n $v = $this->getInput();\n foreach($validationRules[self::FIELD_INPUT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INPUT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INPUT])) {\n $errs[self::FIELD_INPUT] = [];\n }\n $errs[self::FIELD_INPUT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTENT])) {\n $v = $this->getIntent();\n foreach($validationRules[self::FIELD_INTENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_INTENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTENT])) {\n $errs[self::FIELD_INTENT] = [];\n }\n $errs[self::FIELD_INTENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LAST_MODIFIED])) {\n $v = $this->getLastModified();\n foreach($validationRules[self::FIELD_LAST_MODIFIED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_LAST_MODIFIED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LAST_MODIFIED])) {\n $errs[self::FIELD_LAST_MODIFIED] = [];\n }\n $errs[self::FIELD_LAST_MODIFIED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OUTPUT])) {\n $v = $this->getOutput();\n foreach($validationRules[self::FIELD_OUTPUT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_OUTPUT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OUTPUT])) {\n $errs[self::FIELD_OUTPUT] = [];\n }\n $errs[self::FIELD_OUTPUT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OWNER])) {\n $v = $this->getOwner();\n foreach($validationRules[self::FIELD_OWNER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_OWNER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OWNER])) {\n $errs[self::FIELD_OWNER] = [];\n }\n $errs[self::FIELD_OWNER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PART_OF])) {\n $v = $this->getPartOf();\n foreach($validationRules[self::FIELD_PART_OF] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PART_OF, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PART_OF])) {\n $errs[self::FIELD_PART_OF] = [];\n }\n $errs[self::FIELD_PART_OF][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERFORMER_TYPE])) {\n $v = $this->getPerformerType();\n foreach($validationRules[self::FIELD_PERFORMER_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PERFORMER_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERFORMER_TYPE])) {\n $errs[self::FIELD_PERFORMER_TYPE] = [];\n }\n $errs[self::FIELD_PERFORMER_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRIORITY])) {\n $v = $this->getPriority();\n foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_PRIORITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRIORITY])) {\n $errs[self::FIELD_PRIORITY] = [];\n }\n $errs[self::FIELD_PRIORITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON])) {\n $v = $this->getReason();\n foreach($validationRules[self::FIELD_REASON] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REASON, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON])) {\n $errs[self::FIELD_REASON] = [];\n }\n $errs[self::FIELD_REASON][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RELEVANT_HISTORY])) {\n $v = $this->getRelevantHistory();\n foreach($validationRules[self::FIELD_RELEVANT_HISTORY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_RELEVANT_HISTORY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RELEVANT_HISTORY])) {\n $errs[self::FIELD_RELEVANT_HISTORY] = [];\n }\n $errs[self::FIELD_RELEVANT_HISTORY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REQUESTER])) {\n $v = $this->getRequester();\n foreach($validationRules[self::FIELD_REQUESTER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_REQUESTER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REQUESTER])) {\n $errs[self::FIELD_REQUESTER] = [];\n }\n $errs[self::FIELD_REQUESTER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESTRICTION])) {\n $v = $this->getRestriction();\n foreach($validationRules[self::FIELD_RESTRICTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_RESTRICTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESTRICTION])) {\n $errs[self::FIELD_RESTRICTION] = [];\n }\n $errs[self::FIELD_RESTRICTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS_REASON])) {\n $v = $this->getStatusReason();\n foreach($validationRules[self::FIELD_STATUS_REASON] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_TASK, self::FIELD_STATUS_REASON, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS_REASON])) {\n $errs[self::FIELD_STATUS_REASON] = [];\n }\n $errs[self::FIELD_STATUS_REASON][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "f0df49a73dcdf57defb0a759cd448e30", "score": "0.7160097", "text": "public function errors_array() {\n\t\treturn $this->_error_array;\n\t}", "title": "" }, { "docid": "7894ddf59e43786ac103afe30a804eca", "score": "0.71377796", "text": "public function getErrors()\n {\n return ['type' => $this->errorType, 'bag' => $this->errorsBag];\n }", "title": "" }, { "docid": "07332696d4c9e4b08b98bc02966682d3", "score": "0.7117873", "text": "public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getCity())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getCountry())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_COUNTRY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDistrict())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DISTRICT] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getLine())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPostalCode())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_POSTAL_CODE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getState())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getText())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TEXT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_CITY])) {\n $v = $this->getCity();\n foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CITY])) {\n $errs[self::FIELD_CITY] = [];\n }\n $errs[self::FIELD_CITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COUNTRY])) {\n $v = $this->getCountry();\n foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COUNTRY])) {\n $errs[self::FIELD_COUNTRY] = [];\n }\n $errs[self::FIELD_COUNTRY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DISTRICT])) {\n $v = $this->getDistrict();\n foreach($validationRules[self::FIELD_DISTRICT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_DISTRICT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DISTRICT])) {\n $errs[self::FIELD_DISTRICT] = [];\n }\n $errs[self::FIELD_DISTRICT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LINE])) {\n $v = $this->getLine();\n foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LINE])) {\n $errs[self::FIELD_LINE] = [];\n }\n $errs[self::FIELD_LINE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERIOD])) {\n $v = $this->getPeriod();\n foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERIOD])) {\n $errs[self::FIELD_PERIOD] = [];\n }\n $errs[self::FIELD_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_POSTAL_CODE])) {\n $v = $this->getPostalCode();\n foreach($validationRules[self::FIELD_POSTAL_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_POSTAL_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_POSTAL_CODE])) {\n $errs[self::FIELD_POSTAL_CODE] = [];\n }\n $errs[self::FIELD_POSTAL_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATE])) {\n $v = $this->getState();\n foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATE])) {\n $errs[self::FIELD_STATE] = [];\n }\n $errs[self::FIELD_STATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n return $errs;\n }", "title": "" }, { "docid": "725dae95cfbef5d0e60e861103d3aad2", "score": "0.7116719", "text": "protected function getErrors() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "60f90ccb8054c9e20a4b5d0d4aed653b", "score": "0.71122456", "text": "public function getErrorsIndexWithKey() : Array\n\t{\n\t\t$errors = [];\n\n\t\tif ($this->hasErrors()) {\n\t\t\t$keys = array_keys($this->getAllErrors());\n\t\t\tforeach(array_values($this->getAllErrors()) as $i => $error) {\n\t\t\t\t$errors[$keys[$i]] = $error[0];\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "c48e684dbfa0544a16a16d3cae8271aa", "score": "0.71025133", "text": "public function getErrors () : array {\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "0b3e2b7509e8d3053a2d3c390eb068d1", "score": "0.70892256", "text": "public function getErrors(){\r\n return $this->_errors['error'];\r\n }", "title": "" }, { "docid": "02c3bb257ae9aa3502092257d2a6e71b", "score": "0.70892084", "text": "public function get_errors()\n\t{\n\t\t$this->validate();\n\n\t\t$errors = array();\n\t\tforeach ($this->find_elements(TRUE) as $element)\n\t\t{\n\t\t\tif ($this->$element->error)\n\t\t\t{\n\t\t\t\t$errors[$element] = $this->$element->error;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7084741", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "a6401c38e11dcaf12bee585a2c7d2d67", "score": "0.7083436", "text": "public function getErrors(): array\n {\n return $this->_errors;\n }", "title": "" }, { "docid": "2d80c111b5a3528669a03a0b9e4c5ba9", "score": "0.70726496", "text": "private function _generate_errors()\n {\n $errors = array();\n $language = Loader::get_instance()->load('language');\n $session = Loader::get_instance()->load('session');\n\n foreach($this->_fields as $field_name => $field) {\n foreach($field['errors'] as $err) {\n if(empty($field['rules'][$err])) {\n $errors[$field['name']][] = sprintf($language->item('validation_'.$err), $field['label']);\n }\n else {\n $errors[$field['name']][] = sprintf($language->item('validation_'.$err), $field['label'], $field['rules'][$err]);\n }\n }\n }\n $session->weak_data('validation_errors', $errors, true);\n }", "title": "" }, { "docid": "07a58bbe594691aade495f60a3d20fae", "score": "0.7039833", "text": "public function getErrorList() : array;", "title": "" }, { "docid": "a880bd3dab44835716e72a808b6c321e", "score": "0.69952816", "text": "private function getErrors(): array\n {\n return array_filter($this->results, 'count');\n }", "title": "" }, { "docid": "8215d9df3757da5c2a759db67f5a1714", "score": "0.69910663", "text": "public function getErrorsIndex() : Array\n\t{\n\t\t$errors = [];\n\n\t\tif ($this->hasErrors()) {\n\t\t\tforeach(array_values($this->getAllErrors()) as $error) {\n\t\t\t\t$errors[] = $error[0];\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "312728ac0f4ab45cc7c42bb01bf595bb", "score": "0.6987013", "text": "function getErrors()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "ede788f7f5bbb28a787d8c5e252cd4a8", "score": "0.69801384", "text": "public function getFormErrors(): array\n {\n return $this->formErrors;\n }", "title": "" }, { "docid": "b67e77d7e0c8d72d12f9d2e404d7b1db", "score": "0.6978141", "text": "public function getErrors() {\n return $this->validator->getErrors();\n }", "title": "" }, { "docid": "06c87388d98e0693a20c3a30ed576c37", "score": "0.69766945", "text": "public function getErrors()\n {\n if (!($this->is_validated)) throw new \\LogicException('Form is not validated yet');\n if ($this->is_valid) return array();\n $fields = $this->form->getFields();\n $field_errors = array();\n foreach($fields as $name => $field) {\n if ($field->getValidationStatus() === ValidatorInterface::STATUS_INVALID) {\n $field_errors[$field->getFullName()] = $field->getErrorMessages();\n }\n }\n return array(\n 'global_errors' => $this->form->getErrorMessages(),\n 'field_errors' => $field_errors\n );\n }", "title": "" }, { "docid": "c3280910dbea82d280b70f9fec60e0ab", "score": "0.69735265", "text": "public function getValidationErrors($value)\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "a81b04bb4caff2d8a3cb9b9b5ab69859", "score": "0.6967872", "text": "function getErrors($a_bool_allowMultipleErrors = false)\n\t{\n\t\t$arr_returnedErrors = array();\n\t\t$arr_fieldNames = array();\n\t\t\n\t\tif($a_bool_allowMultipleErrors)\n\t\t{\n\t\t\t$arr_returnedErrors = $this->arr_validationErrors;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor($i = 0; $i < sizeof($this->arr_validationErrors); $i++)\n\t\t\t{\n\t\t\t\tif(!in_array($this->arr_validationErrors[$i]->getFieldName(), $arr_fieldNames))\n\t\t\t\t{\n\t\t\t\t\tarray_push($arr_fieldNames, $this->arr_validationErrors[$i]->getFieldName());\n\t\t\t\t\tarray_push($arr_returnedErrors, $this->arr_validationErrors[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $arr_returnedErrors;\n\t}", "title": "" }, { "docid": "dac981da8bbbd14a1920fe8280744425", "score": "0.6956758", "text": "public function getErrors(): array\n {\n $errors = [];\n\n /** @var string $name @var HashSet $messages */\n foreach ($this->errors as $name => $messages) {\n $errors[$name] = [];\n foreach ($messages as $message) {\n $errors[$name][] = $message;\n }\n }\n\n return $errors;\n }", "title": "" }, { "docid": "68cad5109da0bf012e378b3887a1fbfb", "score": "0.6943976", "text": "public function errors()\n {\n return array_values(\n array_filter($this->results, function ($result) {\n return !$result->success();\n })\n );\n }", "title": "" }, { "docid": "ba60c02fd7952a2b491cbce7ea4d397d", "score": "0.68926275", "text": "public function errors(): array\n {\n $errors = [];\n foreach ($this->errors as $error) {\n $errors[] = $error['error'];\n }\n \n return $errors;\n }", "title": "" }, { "docid": "e49e48977e3d90ca1dd240d7b418c778", "score": "0.68882453", "text": "public function getErrors(): array\n {\n $error = [];\n\n foreach ($this->list as $r) {\n $error[$r->getPropertyPath()] = $r->getMessage();\n }\n\n return $error;\n }", "title": "" }, { "docid": "27c4f71cde1e5c586f4c6b019861efb5", "score": "0.6883749", "text": "public static function allErrors() {\r\n $errors = array();\r\n if (!empty(self::$errors)) {\r\n if (is_array(self::$errors)) {\r\n foreach (self::$errors as $key => $val) {\r\n foreach (self::$errors[$key] as $err) {\r\n $errors[] = $err;\r\n }\r\n }\r\n }\r\n } elseif (isset($_SESSION['_ap']['_validation'])) {\r\n foreach ($_SESSION['_ap']['_validation'] as $key => $val) {\r\n foreach ($_SESSION['_ap']['_validation'][$key] as $err) {\r\n $errors[] = $err;\r\n }\r\n }\r\n }\r\n return $errors;\r\n }", "title": "" }, { "docid": "27fe7f3de1bca6562e8550e62a672677", "score": "0.68799776", "text": "public function errors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "27fe7f3de1bca6562e8550e62a672677", "score": "0.68799776", "text": "public function errors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "cf5a734128a22b84448f3bdc948d41af", "score": "0.68738097", "text": "public function getErrors()\n {\n return $this->validator->errors();\n }", "title": "" }, { "docid": "21371fca08ddbfcc498d8600ccc10e8a", "score": "0.6869925", "text": "function getErrors();", "title": "" }, { "docid": "5660d4cade0e75c8211e34c240c27323", "score": "0.68615216", "text": "public function getErrors()\n {\n $errors = array();\n\n foreach ($this->getElements() as $element) {\n $errors[$element->getName()] = array('label' => $element->getLabel(), 'errors' => $element->getErrors());\n }\n\n return $errors;\n }", "title": "" }, { "docid": "752d1bad1a8baa14e50059361f404d32", "score": "0.68599576", "text": "protected final function requestErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "8a80351a529ffdd8260c07cf0cff9015", "score": "0.6855184", "text": "protected function get_errors_description() {\n $errors = array();\n if ($this->options->is_check_errors == true) {\n\n $i = 0;\n $rules_names = $this->get_error_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $errors[$i] = array();\n\n $errors[$i][\"problem\"] = $rhr->problem;\n $errors[$i][\"solve\"] = $rhr->solve;\n $errors[$i][\"problem_ids\"] = $rhr->problem_ids;\n $errors[$i][\"problem_type\"] = $rhr->problem_type;\n $errors[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $errors[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n return $errors;\n }", "title": "" }, { "docid": "089c33d5b78f574dcc0bc6baa1970523", "score": "0.6835929", "text": "public function errors()\n\t{\n\t\treturn $this->_errors['errors'];\n\t}", "title": "" }, { "docid": "f9442dc36e3558114a6d27f28d848ac2", "score": "0.68253106", "text": "public function getErrors() {\n return @$this->attributes['errors'];\n }", "title": "" }, { "docid": "5d77bddafc50b7c14fe07e57ca5fdf17", "score": "0.6821068", "text": "public function getErrors(): array\n {\n return $this->getInputFilter()->getMessages();\n }", "title": "" }, { "docid": "c7365da9ae5f8f470e38910e68198035", "score": "0.6815018", "text": "public function getErrors()\n {\n if ($this->_db && is_array($this->_db->getErrors())) {\n return array_merge($this->_errors, $this->_db->getErrors());\n } else {\n return $this->_errors;\n }\n }", "title": "" }, { "docid": "20a44e7e67c373584369b81401e608dd", "score": "0.68090147", "text": "public function error($key = '')\n {\n $errors = $this->errors();\n\n if ($key) {\n return isset($errors[$key]) ? $errors[$key] : [];\n }\n\n // Return first array element or an empty array if there is no first element.\n return reset($errors) ?: [];\n }", "title": "" }, { "docid": "f20a33acd60468ae1cab3b30ff5a4345", "score": "0.68086374", "text": "public static function getErrors($fieldName) {\r\n $errors = array();\r\n\r\n if (!empty(self::$errors)) {\r\n if (array_key_exists($fieldName, self::$errors)) {\r\n foreach (self::$errors[$fieldName] as $error) {\r\n $errors[] = $error;\r\n }\r\n }\r\n } elseif (isset($_SESSION['_ap']['_validation'])) {\r\n if (array_key_exists($fieldName, $_SESSION['_ap']['_validation'])) {\r\n foreach ($_SESSION['_ap']['_validation'][$fieldName] as $err) {\r\n $errors[] = $err;\r\n }\r\n }\r\n }\r\n\r\n return $errors;\r\n }", "title": "" }, { "docid": "1e591fa7c3f4b08c00ba95ff31734a1d", "score": "0.6807995", "text": "final public function getError():array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "f100422237671841db8405f619838709", "score": "0.67889273", "text": "private function saveArrFieldsErrors()\r\n\t{\r\n\t\t$this->_arrFieldsErrors\t\t= array();\r\n\t\t$this->_arrFieldsWithErrors\t= array();\r\n\t\t\r\n\t\tforeach( $this->_messages as $type => $value){\r\n\t\t\t$this->_arrFieldsErrors[$type] = count( $this->_messages[$type] );\r\n\t\t\t$this->_arrFieldsWithErrors[] = $type;\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->_arrFieldsErrors;\r\n\t}", "title": "" }, { "docid": "d5afd83264a88dc8fde933487d478f2c", "score": "0.6777275", "text": "protected function validationErrorMessages()\n {\n return [];\n }", "title": "" }, { "docid": "d5afd83264a88dc8fde933487d478f2c", "score": "0.6777275", "text": "protected function validationErrorMessages()\n {\n return [];\n }", "title": "" }, { "docid": "a5c4a8e033a5eec2cf7fc4e188d6949d", "score": "0.67731184", "text": "public function getErrors()\n {\n $errors = $this->$errors();\n $this->clearErrors();\n return $errors;\n }", "title": "" }, { "docid": "7e2a4ae2e9d019ca3e5de2be72faf828", "score": "0.6772617", "text": "public function getErrors()\r\n\t{}", "title": "" }, { "docid": "fc019af2e662d10e0c6cb09b7340eb8d", "score": "0.67536646", "text": "public function getErrors()\n {\n return $this->errors; // core.validation.Errors\n }", "title": "" }, { "docid": "f30634ec94f07551b2b8b5ec8335d98b", "score": "0.6749517", "text": "public static function validateError()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "title": "" }, { "docid": "e44dd4d52884a75ada88152225eb56d0", "score": "0.6742943", "text": "public function getError()\n {\n $errors = self::$errors;\n self::$errors = array();\n return $errors;\n }", "title": "" }, { "docid": "bff4fa8dde2eef2e4d9f2cb19fc3d177", "score": "0.67233354", "text": "public function getErrors($displayable = false)\n\t{\n\t\t$ret\t=\t[ ];\n\n\t\tforeach($this->_fields as $name => $field)\n\t\t{\n\t\t\tif($field->hasError($displayable))\n\t\t\t\t$ret[$name]\t=\t$field->getError()->getMessage();\n\t\t}\n\n\t\tif($this->_global_errors)\n\t\t\t$ret['_global']\t=\t$this->_global_errors;\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "e84be50a9d5468523c8decb4feadc8a9", "score": "0.671896", "text": "protected function formatValidationErrors()\n {\n return $this->errorBag()->getMessages();\n }", "title": "" }, { "docid": "0ad8570cd108dbe4bf6131a30ce82731", "score": "0.67165965", "text": "public function getErrors()\n\t{\n\t\t$errors = array();\n\t\t/** @var Miao_Form_Control $control */\n\t\t/** @var Miao_Form_Validate $validator */\n\t\tforeach ( $this->getControls() as $control )\n\t\t{\n\t\t\tif ( !$control->isValid() )\n\t\t\t{\n\t\t\t\t$validator = $control->error();\n\t\t\t\t$errors[] = array(\n\t\t\t\t\t'name' => $control->getName(),\n\t\t\t\t\t'error' => $validator->getMessage() );\n\t\t\t}\n\t\t}\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "c46c99aa91021eb357ebcdbd55bcd892", "score": "0.67004603", "text": "public function getErrors()\r\n\t{\r\n\t\treturn $this->errors;\r\n\t}", "title": "" } ]
fea5802ae1c455a09c89dd5848ad8db7
This function gives array of username and password for passed company and account
[ { "docid": "281693e32439de28f7c1d9ad7cd7e155", "score": "0.6752998", "text": "public function getAccountCredential($companyId, $accoutNo)\n {\n $query1 = \"select username,password from \".DB_PREFIX.\"courier_vs_company\n where company_id = $companyId and account_number = '$accoutNo' \n \"; \n $credentials = $this->db->getAllRecords($query1); \n return (count($credentials) > 0) ? $credentials[0]:array();\n }", "title": "" } ]
[ { "docid": "df58868a3a391d8fca22630762ea875c", "score": "0.69127154", "text": "static function get_crm_credentials(){\n\t\tinclude dirname(__FILE__) . '/Credentials.inc';\n\t\t\n\t\t//referral usr id and new user pass\n\t\t$credentials = get_option('custom_crm_credentials');\t\n\n\t\treturn array(\n\t\t\t'crm_UserName' => $username,\n\t\t\t'crm_Pass' => $password,\n\t\t\t'crm_TypeId' => $type_id,\n\t\t\t'crm_UserId' => $credentials['crm_UserId'],\n\t\t\t'crm_genPass' => $credentials['crm_genPass']\n\t\t);\n\t}", "title": "" }, { "docid": "a0870bc69534d7d8561384b07b50394c", "score": "0.67050105", "text": "public function getCredentials ($username, $password) {\n $stmt = $this->DB->prepare( \"SELECT * FROM accounts where username = \". $username . \" AND password = \" .$password);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "adfde08b7df1078703ef5bfeb80ec635", "score": "0.6694537", "text": "function credentials()\n\t{\n\t\treturn array($this->get_server(), $_GET[\"username\"], get_password());\n\t}", "title": "" }, { "docid": "44ef22763fb3236f4784b9631493cd9f", "score": "0.6654751", "text": "public function getCredentials()\n {\n // The form field for providing username or password\n // have name of \"username\", however, in order to support\n // logging users in with both (username and email)\n // we have to check if user has entered one or another\n $username = $this->get('username');\n\n if ($this->isEmail($username)) {\n return [\n 'email' => $username,\n 'password' => $this->get('password')\n ];\n }\n\n return $this->only('username', 'password');\n }", "title": "" }, { "docid": "5ce53c86f7c03f99c3a299aa85233c42", "score": "0.6466693", "text": "public function getCredentials()\n\t{\n\t\treturn [\n\t\t\t\"email\"=>Input::get('email'),\n\t\t\t\"password\"=>Input::get('password'),\n\t\t];\n\t}", "title": "" }, { "docid": "d8b75725757d9a0397f30fb98e265624", "score": "0.63416475", "text": "private function getLoginParameters()\n {\n if(isset($_POST['api_code']))\n {\n $dataArr['username'] = isset($_POST['user_name'])? $_POST['user_name'] : '';\n $dataArr['password'] = isset($_POST['password']) ? $_POST['password'] : '';\n $dataArr['api_code'] = isset($_POST['api_code']) ? $_POST['api_code'] : '';\n $dataArr['api_user'] = isset($_POST['api_user']) ? $_POST['api_user'] : '';\n $dataArr['secure_hash'] = isset($_POST['secure_hash']) ? $_POST['secure_hash'] : '';\n }\n return $dataArr;\n }", "title": "" }, { "docid": "f736357b0d60220a771d11db8a6dd6d3", "score": "0.62335986", "text": "public function getCredentials(){\n\t\t// foreach ($query->rows as $result) {}\n\t\t\n\t}", "title": "" }, { "docid": "fddf2d725bc13ee07835c6eb8bc56766", "score": "0.62149656", "text": "public function getCredentials()\n {\n // retrieve the username and password\n $username = $this->_request->post($this->_config['source_username']);\n $password = $this->_request->post($this->_config['source_password']);\n\n return array('username'=> $username, 'password' => $password);\n }", "title": "" }, { "docid": "5e776b66bd41949dc50bd07078a9fbd1", "score": "0.6203968", "text": "function getCredentials() {\n\t\t$cred = $this->get('other_credentials');\n\t\tif ($cred) {\n\t\t\treturn unserialize($cred);\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "8bd9f5ecac080f809da3b6dc8948b271", "score": "0.6198409", "text": "function getCompanyCredentialsById($companyId) {\n\t\t$this->db->select ( \"comp_id, comp_name, comp_email, comp_pass\" );\n\t\t$this->db->where ( \"comp_id\", $companyId );\n\t\t$this->db->where ( \"is_deleted\", 0 );\n\t\t$query = $this->db->get ( \"fb_company\" );\n\t\t\n\t\treturn $query->result ();\n\t}", "title": "" }, { "docid": "67e57183ba56d5b84fbacc65c09e5d27", "score": "0.6189436", "text": "public function getCredentials();", "title": "" }, { "docid": "67e57183ba56d5b84fbacc65c09e5d27", "score": "0.6189436", "text": "public function getCredentials();", "title": "" }, { "docid": "25c747062393ef916dbea0c4bb064fda", "score": "0.6179439", "text": "public function loginData()\n {\n return ([\n [\"1\", \"123\", 302, \"admin\"], // admin\n [\"2\", \"123\", 302, \"manager-records\"], // manager\n [\"3\", \"856\", 302, \"emp-records\"], // employee\n \n ]);\n }", "title": "" }, { "docid": "3f369e16097df3d8456ebae852c18b15", "score": "0.6170425", "text": "abstract public function getUserByCredentials($username, $password);", "title": "" }, { "docid": "7f3f48c6e3e21b26bea26ee718eaa0c0", "score": "0.61249506", "text": "protected function credentials(Request $request)\n {\n $login = $request->input($this->username());\n $field = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'username';\n// return $request->only($this->username(), 'password'); Tener Encuenta por si suceden errores de autenticación\n// return ['username'=>$request->{$this->username()},'password'=>$request->password, 'state'=>'Activo'];\n return [$field => $login,'password'=>$request->password, 'state'=>'Activo'];\n }", "title": "" }, { "docid": "e18123a30b1ebf6d6dd81cc999600ed3", "score": "0.6105527", "text": "public static function getAccounts()\n {\n $credentials = include(dirname(dirname(__FILE__)) . '/credentials.inc.php');\n return array_keys($credentials);\n }", "title": "" }, { "docid": "289aef12fdc25160ece8016beaccb7d9", "score": "0.6085422", "text": "public function loginAs() {\n\t\treturn $this->ajajGetAccountInfo();\n\t}", "title": "" }, { "docid": "68b296961b3626a2114c4e1e9c4b813d", "score": "0.607991", "text": "public function getCredentials(Request $request)\n {\n return [\n 'password' => $request -> request -> get(self::PASSWORD),\n 'login' => $request -> request -> get(self::USERNAME)\n ];\n }", "title": "" }, { "docid": "583af9ec345bdd41f8996b83133b2d7e", "score": "0.6048177", "text": "private static function getUserData(string $username) : array \n {\n return parent::query(\"SELECT id, password FROM users WHERE username=:username\", \n array(':username' => $username));\n }", "title": "" }, { "docid": "42452b8979b6dea7cb97b103397ebcb1", "score": "0.6044917", "text": "public function getCredentials(){\n\t\t$creds = array();\n\t\t$creds['name'] = $_POST[$this->postToken_Name];\n\t\t$creds['pw'] = $_POST[$this->postToken_PW];\n\t\t$creds['browser'] = $this->getBrowserDesc();\n\t\treturn $creds;\n\t}", "title": "" }, { "docid": "e888ba8f63f4b99a5ca18fb6339e1c61", "score": "0.6038921", "text": "private function getBasic()\n {\n if(isset($_SERVER['PHP_AUTH_USER']))\n {\n $username = filter_var(trim(htmlspecialchars($_SERVER['PHP_AUTH_USER'])), FILTER_SANITIZE_STRING);\n $password = filter_var(trim(htmlspecialchars($_SERVER['PHP_AUTH_PW'])), FILTER_SANITIZE_STRING);\n \n if (empty($username) === false & empty($password) === false)\n return array('username' => $username, 'secret' => $password);\n }\n return false;\n }", "title": "" }, { "docid": "fe6e983554a2ea4d6ebb56866e277f75", "score": "0.60289425", "text": "private static function _cookData($data) {\n $tmp = array();\n if (isset ($data ['username'])) $tmp ['username'] = $data ['username'];\n if (isset ($data ['password'])) {\n list ($tmp ['hash'], $tmp ['password']) = self::_cookPasswd($data ['password']);\n }\n if (isset ($data ['uid'])) $tmp ['uid'] = $data ['uid'];\n if (isset ($data ['groupid'])) $tmp ['groupid'] = $data ['groupid'];\n if (isset ($data ['email'])) $tmp ['email'] = $data ['email'];\n if (isset ($data ['registertime'])) $tmp ['registertime'] = $data ['registertime'];\n return $tmp;\n }", "title": "" }, { "docid": "907212fbfadad5c9b3461cdd3fdb873a", "score": "0.6028429", "text": "function basic_auth(){\r\n $headers = apache_request_headers();\r\n $header = $headers[\"Authorization\"];\r\n $header_arr = explode(' ', $header);\r\n $basic_token = base64_decode(@$header_arr[1]);\r\n $basic_token_arr = explode(':', $basic_token);\r\n $email = @$basic_token_arr[0];\r\n $password = @$basic_token_arr[1];\r\n \r\n return array($email,$password);\r\n }", "title": "" }, { "docid": "a40a7f88920608e42603e6043552ae99", "score": "0.60282993", "text": "private function getBasicAuthCredentials(): array\n {\n return [\n env('GITHUB_PERSONAL_USERNAME'),\n env('GITHUB_PERSONAL_ACCESS_TOKEN')\n ];\n }", "title": "" }, { "docid": "0d6feb79e160c8f07efd84fe84c37608", "score": "0.59884983", "text": "function get_object_credentials() {\n\t\treturn array(\n\t\t\t'host' => $this->host,\n\t\t\t'port' => $this->port,\n\t\t\t'dbname' => $this->dbName,\n\t\t\t'user' => $this->user,\n\t\t\t'password' => $this->passwd\n\t\t);\n\t}", "title": "" }, { "docid": "b1baf9330155524f7bbac4de91d0fb04", "score": "0.5971607", "text": "public function getCredentials()\n {\n return array();\n }", "title": "" }, { "docid": "b25f08c8498e66cce248687fa2d5656a", "score": "0.59286827", "text": "public function get_userdetails_from_customers($username,$password){\n $this->load->database();\n $sql = \"SELECT * FROM customers WHERE username=? AND password=?\";\n $query=$this->db->query($sql, array($username, $password));\n $userdetails = $query->row_array();\n $this->db->close();\n return $userdetails;\n }", "title": "" }, { "docid": "dd7cdb1a93726213c4628242a9576ff6", "score": "0.58989185", "text": "public function getAccounts()\n\t{\n\t\tif (isset($this->parameters['account']))\n\t\t{\n\t\t\treturn explode(',', $this->parameters['account']);\n\t\t}\n\n\t\treturn array();\n\t}", "title": "" }, { "docid": "387aa894394ea2b0058e89405ad375a6", "score": "0.5894464", "text": "function getUserInformation($email,$password){\n\t\t\t$data = Array();\n\t\t\tif($stmt = $this->connection->prepare(\"select ID, fname, lname, password, email, role from users where email like '\".$email.\"' and password like '\".md5($password).\"';\")){\n\t\t\t\t $stmt->execute();\n\t\t\t\t $stmt->store_result();\n\t\t\t\t $stmt->bind_result($ID, $fname, $lname, $password, $email, $role);\n\t\t\t\t if($stmt->num_rows > 0){\n\t\t\t\t \twhile($stmt->fetch()){\n\t\t\t\t \t\t$data = array(\n\t\t\t\t \t\t\t'ID'=>$ID,\n\t\t\t\t \t\t\t'fname'=>$fname,\n\t\t\t\t \t\t\t'lname'=>$lname,\n\t\t\t\t \t\t\t'password'=>$password,\n\t\t\t\t \t\t\t'email'=>$email,\n\t\t\t\t \t\t\t'role'=>$role\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\treturn $data;\n\t\t}", "title": "" }, { "docid": "19464d135236c293dc8f0ff8a595dba2", "score": "0.58918124", "text": "function getAccounts(){\n $this->db->select('username');\n $queryArray = $this->db->get('users')->result_array();\n return $queryArray;\n }", "title": "" }, { "docid": "3688e4327ec38221e465367e297fde21", "score": "0.586879", "text": "public function getAuthData() {\n\t\t$authData = array();\n\t\t// database data\n\t\tif ($this->htUsername != '' && $this->htPassword != '') {\n\t\t\t$authData = array(\n\t\t\t\t'authType' => 'Basic',\n\t\t\t\t'htUsername' => $this->htUsername,\n\t\t\t\t'htPassword' => $this->htPassword\n\t\t\t);\n\t\t}\n\t\t\n\t\t// session data\n\t\t$packageUpdateAuthData = WCF::getSession()->getVar('packageUpdateAuthData');\n\t\tif ($packageUpdateAuthData !== null && isset($packageUpdateAuthData[$this->packageUpdateServerID])) {\n\t\t\t$authData = $packageUpdateAuthData[$this->packageUpdateServerID];\n\t\t}\n\t\t\n\t\treturn $authData;\n\t}", "title": "" }, { "docid": "a3f6fae655aec75414563e2dda2b871a", "score": "0.58561474", "text": "function getExternalSiteCredentials($whichSite){\n\t$whichSite = !empty($whichSite)?$whichSite:\"pweb\";\n\t\n\tGLOBAL $dbconn;\n\n\t$aRet = null;\t\n\t\n\t$sql = \"SELECT * FROM `import_credentials` WHERE `external_site` = '\".mysql_real_escape_string($whichSite).\"';\";\n\n\t$result = mysql_query($sql, $dbconn);\n\twhile($row = mysql_fetch_assoc($result)){\n\t\t$aRet[$row[\"site_name\"]] = array(\"login\"=>$row[\"username\"],\"password\"=>$row[\"password\"],\"ICAB_ID\"=>$row[\"ICAB_ID\"]);\n\t}\n\tmysql_free_result($result);\n\treturn $aRet;\n}", "title": "" }, { "docid": "556c04a90eb7691b4c18a1495b3a1b37", "score": "0.58529454", "text": "function getLoginInformation($uname, $password) {\n $result = $this->collection->usermaster->find(array(\"uname\" => $uname, \"password\" => md5($password)));\n foreach ($result as $info) {\n $dataArr = $info->getArrayCopy();\n }\n if (is_array($dataArr))\n return $dataArr;\n else\n return false;\n }", "title": "" }, { "docid": "05b05f3de58d51a680342d39ae78334f", "score": "0.5846358", "text": "public function getCookieLoginCredentials(){\n\t\t$creds = array();\n\t\t$creds['identyfier'] = $_COOKIE[$this->cookie_LoginCookie];\n\t\t$creds['browser'] = $this->getBrowserDesc();\n\t\treturn $creds;\n\t}", "title": "" }, { "docid": "4ca29a2c28adf690f9582e73edc9bb25", "score": "0.58390504", "text": "function getCredentials($email){\n $this->db->select(array('username','password','securityrole'));\n $this->db->where('email', $email);\n\n $queryArray = $this->db->get('users')->result_array();\n if(empty($queryArray)){\n return array();\n }else{\n return $queryArray[0];\n }\n }", "title": "" }, { "docid": "891aa676809bef1e75217be92b3d95a4", "score": "0.5838644", "text": "protected function getAuth() {\n return [\n 'user_id' => $this->configuration['api_information']['user_id'],\n 'password' => $this->configuration['api_information']['password'],\n ];\n }", "title": "" }, { "docid": "5dc5f79e3db7264bad54b68e8f5066c7", "score": "0.5829131", "text": "public function getAccounts();", "title": "" }, { "docid": "5dc5f79e3db7264bad54b68e8f5066c7", "score": "0.5829131", "text": "public function getAccounts();", "title": "" }, { "docid": "485ad2621990d79824efa9a088713359", "score": "0.5814417", "text": "function getAuth($username, $password) {\n }", "title": "" }, { "docid": "c6156478c846e2ab614422e415d98653", "score": "0.5801066", "text": "public function get_credentials() {\n\n\t\tif ( empty( $this->accessToken ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn array(\n\t\t\t'access_token' => $this->accessToken,\n\t\t\t'auth_type' => $this->authType,\n\t\t\t'organizer_key' => $this->organizerKey,\n\t\t\t'expires_in' => $this->expiresAt,\n\t\t\t'version' => $this->version,\n\t\t\t'versioning' => $this->versioning,\n\t\t\t'username' => $this->username,\n\t\t\t'password' => $this->password,\n\t\t);\n\t}", "title": "" }, { "docid": "b80bb54f44260656ae90d3e2c5edbe78", "score": "0.5799663", "text": "function get_accounts() {\n\tglobal $tsCore, $tsUser;\n\t\n\t// Contamos todas la cuentas que tenga este usuario.\n\t$todos = anaK('num_rows', anaK('query', 'SELECT cp_id FROM '.$tsCore->table['16'].' WHERE cp_client = '.(int)$tsUser->uid, array(__FILE__, __LINE__)));\n\t// Creamos el paginado\n $page = $tsCore->getPag($todos, $tsCore->settings['max_posts']);\n\t// Realizamos la consulta.\n\t$query = anaK('query', 'SELECT cp_id, cp_domain, cp_active, cp_date FROM '.$tsCore->table['16'].' WHERE cp_client = \\''.(int)$tsUser->uid.'\\' ORDER BY cp_date DESC LIMIT '.$page['limite'], array(__FILE__, __LINE__));\n\t$data = result_array($query);\n\t// Contamos cuantos tickets ha creado el usuario.\n\t$page['tickets'] = anaK('num_rows', anaK('query', 'SELECT mp_id FROM '.$tsCore->table['14'].' WHERE mp_from = \\''.$tsCore->setProtect($tsUser->uid).'\\' && MATCH(mp_subject) AGAINST(\"Ticket (support)\" IN BOOLEAN MODE) && mp_del_from = \\'0\\'', array(__FILE__, __LINE__)));\n\t//\n return array('data' => $data, 'page' => $page);\n\t}", "title": "" }, { "docid": "dbade7860a0461013d355f6335b44a3b", "score": "0.5795911", "text": "function credentialsProperties() {\n return array('username', 'password');\n }", "title": "" }, { "docid": "a9f1e7f9452cc17d4ad46c04fbcb98b7", "score": "0.5795792", "text": "public function getData() : array\n {\n $this->validate('bindingUsername', 'password');\n\n $data = parent::getData();\n// $data['userName'] = $this->getBindingUsername();\n\n return $data;\n }", "title": "" }, { "docid": "ab957d315473c53ada3a203b7b7eea15", "score": "0.5791072", "text": "function loginFetchAccountDetails()\r\n\t{\r\n\t\tglobal $current_user;\r\n\t\t\r\n\t\t$result = '';\r\n\t\tif (is_user_logged_in())\r\n\t\t{\t\t\r\n\t\t\t$result .= SendField(\"fname\", $current_user->user_firstname);\t\t\r\n\t\t\t$result .= SendField(\"lname\", $current_user->user_lastname);\r\n\t\t\t$result .= SendField(\"nname\", $current_user->nickname);\r\n\t\t\t$result .= SendField(\"dname\", $current_user->display_name);\r\n\t\t\t$result .= SendField(\"email\", $current_user->user_email);\t\t\r\n\t\t\t$result .= SendField(\"website\", $current_user->user_url);\r\n\t\t\t$result .= SendField(\"descr\", $current_user->user_description);\r\n\t\t\t$result .= SendField(\"aim\", get_user_meta( $current_user->ID, 'aim', true ) );\r\n\t\t\t$result .= SendField(\"jabber\", get_user_meta( $current_user->ID, 'jabber', true ) );\r\n\t\t\t$result .= SendField(\"yim\", get_user_meta( $current_user->ID, 'yim', true ) );\r\n\t\t\tSendToUnity($result);\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\tSendToUnity( PrintError(\"User not logged in \") );\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "333e6e29e1cf78f9d38c70c11d56a53c", "score": "0.5785805", "text": "protected function getCredentials()\n {\n return [\n 'corpid' => $this->app['config']['corp_id'],\n //服务商的corpid\n 'provider_secret' => $this->app['config']['secret'],\n ];\n }", "title": "" }, { "docid": "9910003c11482397093ca7cb98ff9f4a", "score": "0.57576275", "text": "function cek_dataLogin($username,$password){\r\n $where_cond = \"\";\r\n\r\n if(!empty($password))\r\n {\r\n $where_cond .= \"and a.password='\".md5($password).\"'\";\r\n }\r\n $Rdata = 0;\r\n\t\t$sql = \"select a.password,\r\n a.username username,\r\n a.vendor_id vendor_id,\r\n a.vendor_site_id vendor_site_id,\r\n b.id id,\r\n b.org org,\r\n b.name name,\r\n b.msisdn msisdn,\r\n b.email email,\r\n b.job_position job_position,\r\n b.job job\r\n from logins a, hrs b\r\n where\r\n a.hr_id=b.id and a.username ='\".$username.\"' $where_cond\";\r\n\t\t$result = $this->db->query($sql);\r\n\t\treturn $result->result_array();\r\n //var_dump($Udata); exit;\r\n }", "title": "" }, { "docid": "7282f82d8b8987ddc82ae00f99c8007f", "score": "0.5754663", "text": "public function getCredentials()\n\t{\n\t\t$credentials = $this->app['rocketeer.server']->getValue('credentials');\n\t\tif (!$credentials) {\n\t\t\t$credentials = $this->getOption('scm');\n\t\t}\n\n\t\t// Cast to array\n\t\t$credentials = (array) $credentials;\n\n\t\treturn array_merge(array(\n\t\t\t'repository' => '',\n\t\t\t'username' => '',\n\t\t\t'password' => '',\n\t\t), $credentials);\n\t}", "title": "" }, { "docid": "45b79a91c47ef3a00e1ee41776bbadd2", "score": "0.57539725", "text": "protected function credentials(Request $request)\n {\n $field = filter_var($request->get($this->username()), FILTER_VALIDATE_EMAIL) ? $this->username() : 'username';\n return [\n $field => $request->get($this->username()),\n 'password' => $request->password,\n ];\n }", "title": "" }, { "docid": "d3f2d1854634455e53d57a91a772f4ef", "score": "0.5736087", "text": "private function getAuth($data)\n {\n if ($this->username || $this->password) {\n $data['auth'] = [$this->username, $this->password];\n }\n return $data;\n }", "title": "" }, { "docid": "1ccca9611ef1046edb46b0d1b7c753d5", "score": "0.5718296", "text": "private function _getUserData() {\n\t\t$sql = \"SELECT * FROM rb_users WHERE (username = '$this->username' OR email = '$this->username') AND password = '$this->password' LIMIT 1;\";\n\t\t$qry = $this->pdo->query($sql);\n\n\t\t$this->data = $qry->fetch();\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "60bf459fee7ec51d7a672b42dfdd2623", "score": "0.5718105", "text": "public function getUserInfo($appkey, $username, $password)\n {\n $identity = $this->_auth->authenticate($username, $password);\n if(false === $identity) {\n throw new Exception('Authentication Failed');\n }\n\n $struct = array(\n 'nickname' => $identity->nickname,\n 'userid' => $identity->id,\n 'url' => '',\n 'email' => $identity->email,\n 'lastname' => $identity->last_name,\n 'firstname' => $identity->first_name\n );\n return $struct;\n }", "title": "" }, { "docid": "9c6ad52d148b09f2d7f6ea654ff06b8f", "score": "0.5714601", "text": "public function getCredentials(Request $request)\n {\n if ($request->getPathInfo() != '/en/login' || !$request->isMethod('POST')) {\n return;\n }\n\n return [\n 'username' => $request->request->get('_username'),\n 'password' => $request->request->get('_password'),\n ];\n }", "title": "" }, { "docid": "20733cd31e5c312e778101518994428c", "score": "0.57053995", "text": "protected function loginCredentials(Request $request)\n {\n if (is_numeric($request->get('login'))) {\n return array('phone' => $request->get('login'), 'password' => $request->get('password'));\n } else {\n return array('email' => $request->get('login'), 'password' => $request->get('password'));\n }\n }", "title": "" }, { "docid": "b8ce5bf08ae8d7870fc0d6b8df58b307", "score": "0.56946397", "text": "public static function getAcctAndConfig()\n {\n $config = array(\n // Signature Credential\n /*\"acct1.UserName\" => \"amitstest-1_api1.techuz.com\",\n \"acct1.Password\" => \"GQ4EPS6GZXQW9KG4\",\n \"acct1.Signature\" => \"AFcWxV21C7fd0v3bYYYRCpSSRl31ACzEtGBUslzV-APZFTib8Fwd.JcR\",*/\n \"acct1.UserName\" => \"michelle_api2.evolvededucator.com\",\n \"acct1.Password\" => \"AQJHF5TT26HE6TBH\",\n \"acct1.Signature\" => \"AFcWxV21C7fd0v3bYYYRCpSSRl31AoFIlUB4vrY-4UO78.t8HbcrFdfW\"\n // Subject is optional and is required only in case of third party authorization\n // \"acct1.Subject\" => \"\",\n \n // Sample Certificate Credential\n // \"acct1.UserName\" => \"certuser_biz_api1.paypal.com\",\n // \"acct1.Password\" => \"D6JNKKULHN3G5B8A\",\n // Certificate path relative to config folder or absolute path in file system\n // \"acct1.CertPath\" => \"cert_key.pem\",\n // Subject is optional and is required only in case of third party authorization\n // \"acct1.Subject\" => \"\",\n \n );\n \n return array_merge($config, self::getConfig());\n }", "title": "" }, { "docid": "402269fe1a4ceef4d6bfc69b469f11ed", "score": "0.5693018", "text": "function find_all_login_names_reporting_to_approver($approver){\n include \"../includes/config.php\";\n $query = $connect->query(\"SELECT DISTINCT login_name,emp_id FROM users WHERE reporting_manager='$approver'\");\n $login_names = array();\n $emp_id = array();\n while($result = $query->fetch_assoc()) {\n $login_names[] = $result['login_name'];\n $emp_id[]=$result['emp_id'];\n }\n $no_of_login_names= count($login_names);\n for($i=0;$i<$no_of_login_names;$i++){\n if(find_role_from_login_name($login_names[$i])==\"Quote Requestor\"){\n \n }else{\n $login_names=array_merge($login_names, find_all_login_names_reporting_to_approver($emp_id[$i]));\n }\n \n }\n return $login_names;\n }", "title": "" }, { "docid": "83da453d859b0f3bcb2d6e460538230e", "score": "0.5691719", "text": "public function customerLoginDataProvider()\n {\n return array(\n array(\"ben@mail.com\", \"password1\", TRUE), // Valid login\n array(\"dale@mail.com\", \"password2\", TRUE), // Valid login\n array(\"warren@mail.com\", \"password3\", TRUE), // Valid login\n array(\"dominic@mail.com\", \"password4\", TRUE), // Valid login\n array(\"davidmullburry@fitzroy.org\", \"delicious\", FALSE), // Invalid login, customer doesn't exist\n array(\"checkzFuzzlewuz@bundurry.org.au\", \"CranyVuzxcf\", FALSE), // Invalid login, cusomter doesn't exist\n array(\"\", \"\", FALSE), // Invalid login, empty strings\n array(1, 2, FALSE), // Invalid login, integers\n array(NULL, NULL, FALSE), // Invalid login, null values\n array(\"'DROP TABLE customers\", NULL, FALSE) // Invalid login, null value and simulated attack string\n );\n }", "title": "" }, { "docid": "a9cd5e7dd554a275fa90eac4b1bfddba", "score": "0.5687624", "text": "public function getCredentials(Request $request)\n {\n $request->getSession()->set(Security::LAST_USERNAME, $request->get('email'));\n return [\n 'email' => $request->get('email'),\n 'password' => $request->get('password'),\n ];\n }", "title": "" }, { "docid": "54f9b07832c623ad5c81bf841f17fd56", "score": "0.5666453", "text": "public function read() {\n try {\n $query = \"SELECT * FROM \" . $this->table_name1 .\n \" WHERE company_name LIKE :company_name AND password = :password\";\n $stmt = $this->conn->prepare($query);\n if($stmt->execute(\n [\n \":company_name\" => $this->company_name,\n \":password\" => $this->password\n ]\n )) { \n if($stmt->rowCount() > 0) { \n $listCompany = []; \n while($row = $stmt->fetch(PDO::FETCH_OBJ)) {\n array_push($listCompany, [\n \"company_name\" => $row->company_name,\n \"id\" => $row->id,\n \"admin\" => $row->admin\n ]); \n $status = \"OK\";\n }\n $returnval=$listCompany;\n }\n } else {\n $status = \"error 1\";\n }\n if($status != \"OK\") {\n $returnval = array(\"Oops! Please enter a correct company name or password!\");\n } \n } catch(PDOException $e) {\n print_r($e);\n }\n return json_encode($returnval);\n }", "title": "" }, { "docid": "a29dc1bd2129efc3a21b2ae840fd47ca", "score": "0.5665635", "text": "function get_user_info_by_name_arr( $p_username ) {\r\n\t\tglobal $g_mantis_user_table;\r\n\r\n\t $query = \"SELECT *\r\n\t \t\tFROM $g_mantis_user_table\r\n\t \t\tWHERE username='$p_username'\";\r\n\t $result = db_query( $query );\r\n\t return db_fetch_array( $result );\r\n\t}", "title": "" }, { "docid": "c3e2ca10c103a1e476858d072c77d07e", "score": "0.5663557", "text": "protected function getUserByUsernameAndPassword($username, $password) {\n $sql = \"SELECT * FROM users WHERE username = ? AND password = ?\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute([$username, $password]);\n\n $results = $stmt->fetchAll();\n return $results;\n }", "title": "" }, { "docid": "5937a92fb5494e9c1c215720f837dff0", "score": "0.5663308", "text": "public function getAuthInfo()\n {\n return array (\n 'client_id' => $this->_data['client_id'],\n 'username' => $this->_data['username'],\n 'usertype' => $this->_data['user_type'],\n 'hapi_key' => $this->_data['key'],\n 'hapi_secret' => $this->_data['secret'],\n 'persist' => $this->_data['remember_me'],\n 'timestamp' => $this->_data['login_timestamp'],\n 'timestamp_checked' => $this->_data['password_checked_timestamp'],\n );\n }", "title": "" }, { "docid": "290cac03e494a9fdc408d559896712d2", "score": "0.5656574", "text": "function get_credentials($connection_id) {\n\t\t#echo '<p>get_credentials with connection_id: ' . $connection_id;\n\t\tinclude_once(CLASSPATH . 'Connection.php');\n\t\t$conn = Connection::find_by_id($this->gui, $connection_id);\n\t\treturn array(\n\t\t\t'host' => \t\t($conn->get('host') != '' ? $conn->get('host') : 'pgsql'),\n\t\t\t'port' => \t\t($conn->get('port') != '' ? $conn->get('port') : '5432'),\n\t\t\t'dbname' => \t($conn->get('dbname') != '' ? $conn->get('dbname') : 'kvwmapsp'),\n\t\t\t'user' => \t\t($conn->get('user') != '' ? $conn->get('user') : 'kvwmap'),\n\t\t\t'password' => ($conn->get('password') != '' ? $conn->get('password') : KVWMAP_INIT_PASSWORD)\n\t\t);\n\t}", "title": "" }, { "docid": "51d74a1bb5d27881e19f1bda1f5b2bb3", "score": "0.56523997", "text": "protected function credentials(Request $request)\n {\n //return $request->only($this->username(), 'password','active');\n $result = array_merge($request->only($this->username(), 'password'), ['active' => 1]);\n return $result;\n }", "title": "" }, { "docid": "8dbd7985af44bbfe9282f9f29285a559", "score": "0.56522864", "text": "function get_bus_app_user_by_username_pass($bus_app_user_name,$bus_app_user_password)\n {\n return $this->db->get_where('Bus_App_User',array('bus_app_user_name'=>$bus_app_user_name,'bus_app_user_password'=>$bus_app_user_password))->row_array();\n }", "title": "" }, { "docid": "a5c67cbaa87558cf6eae6a177a12d52f", "score": "0.56521225", "text": "function getCredentials($credsFile)\n{\n $credsStr = file_get_contents($credsFile);\n $credsArr = array();\n $linesArr = explode(\";\", $credsStr);\n $linesArr = explode(\"\\n\", $linesArr[0]);\n foreach ($linesArr as $index => $line) {\n\n $valueSplit = explode(\":\", $line);\n $credsArr[$valueSplit[0]] = $valueSplit[1];\n }\n return ($credsArr);\n}", "title": "" }, { "docid": "39cfc7ef352902a14888f10ea6876672", "score": "0.5642377", "text": "protected function _accountInfo(){\n return $this->nusoap->call('accountInfo', array(\n \t'username'\t=> $this->sms_username, \n \t'password'\t=> $this->sms_password, \n )); \n }", "title": "" }, { "docid": "70dcaba18d62a750457e19fdc103df28", "score": "0.5638698", "text": "function getUser($email, $password)\n {\n global $link;\n $sql=\"SELECT * FROM user WHERE email='\".$email.\"' AND password='\".$password.\"'\";\n $result = mysqli_query($link,$sql);\n //return associative array\n return mysqli_fetch_assoc($result);\n }", "title": "" }, { "docid": "e2c361e4c4a18b8f99f065961af4b00c", "score": "0.56346595", "text": "protected function get_account_data($data = array()) {\r\n\t\t$account_array = array();\r\n\r\n\t\t/*\r\n\t\t echo 'Check Data: <br/> </br/> ';\r\n\t\t print_r($data);\r\n\t\t echo '<br/><br/>';\r\n\t\t */\r\n\r\n\t\t$account_array[FORM_ENTITY_ID] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_ID, FORM_ENTITY_ID));\r\n\r\n\t\t// ------------------------------------------\r\n\t\t// User fields\r\n\t\t// ------------------------------------------\r\n\t\t$account_array[FORM_FIRSTNAME] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_FIRSTNAME,\r\n\t\t\tUSER_FIRSTNAME, FORM_FIRSTNAME));\r\n\r\n\t\t$account_array[FORM_LASTNAME] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_LASTNAME,\r\n\t\t\tUSER_LASTNAME, FORM_LASTNAME));\r\n\r\n\t\t$account_array[FORM_PREFIX] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_PREFIX,\r\n\t\t\tUSER_PREFIX, FORM_PREFIX));\r\n\r\n\t\t// ------------------------------------------\r\n\t\t// Account fields\r\n\t\t// ------------------------------------------\r\n\t\t$account_array[FORM_ACCOUNT_TYPE] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_TYPE,\r\n\t\t\tFORM_ACCOUNT_TYPE));\r\n\r\n\t\t$account_array[ACCOUNT_ENABLED] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_ENABLED,\r\n\t\t\tACCOUNT_ENABLED));\r\n\r\n\t\t$account_array[PAYMENT_GATEWAY] =\r\n\t\t\t\t$this->get_form_data($data, array(PAYMENT_GATEWAY,\r\n\t\t\tPAYMENT_GATEWAY));\r\n\r\n\t\t// Bank Account\r\n\t\t$account_array[FORM_ACCOUNT_BANKNAME] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_NAME,\r\n\t\t\tFORM_ACCOUNT_BANKNAME));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_BANKNUMBER] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_NUMBER,\r\n\t\t\tFORM_ACCOUNT_BANKNUMBER));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_TRANSIT] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_TRANSIT,\r\n\t\t\tFORM_ACCOUNT_TRANSIT));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_INSTITUTION] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_INSTITUTION,\r\n\t\t\tFORM_ACCOUNT_INSTITUTION));\r\n\r\n\t\t// Credit Card Account\r\n\t\t$account_array['accounttype_code'] = $this->get_form_data($data, array('accounttype_code'));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_NICKNAME] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_NAME,\r\n\t\t\tFORM_ACCOUNT_NICKNAME));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_CREDITCARDNUMBER] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_NUMBER,\r\n\t\t\tFORM_ACCOUNT_CREDITCARDNUMBER));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_EXPIRY] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_EXPIRY,\r\n\t\t\tFORM_ACCOUNT_EXPIRY));\r\n\r\n\t\t$month = $this->get_form_data($data, array(ACCOUNT_EXPIRY_MONTH,\r\n\t\t\tFORM_ACCOUNT_EXPIRY_MONTH));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_EXPIRY_MONTH] = str_pad(intval($month), 2, \"0\", STR_PAD_LEFT);\r\n\r\n\t\t$year = $this->get_form_data($data, array(ACCOUNT_EXPIRY_YEAR,\r\n\t\t\tFORM_ACCOUNT_EXPIRY_YEAR));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_EXPIRY_YEAR] = str_pad(intval($year), 2, \"0\", STR_PAD_LEFT);\r\n\t\t;\r\n\r\n\t\t$account_array[FORM_ACCOUNT_SECURITY_NUMBER] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_SECURITY_NUMBER,\r\n\t\t\tFORM_ACCOUNT_SECURITY_NUMBER));\r\n\r\n\t\t$account_array[FORM_ACCOUNT_SECURITY_PIN] =\r\n\t\t\t\t$this->get_form_data($data, array(ACCOUNT_SECURITY_PIN,\r\n\t\t\tFORM_ACCOUNT_SECURITY_PIN));\r\n\r\n\t\t// ------------------------------------------\r\n\t\t// Address fields\r\n\t\t// ------------------------------------------\r\n\t\t$address_array =\r\n\t\t\t\tempty($data[ADDRESS_TABLE]) ? $data : $data[ADDRESS_TABLE];\r\n\r\n\t\t$account_array[FORM_ADDRESS_STREET] =\r\n\t\t\t\t$this->get_form_data($address_array, array(ADDRESS_STREET,\r\n\t\t\tFORM_ADDRESS_STREET));\r\n\r\n\t\t$account_array[FORM_ADDRESS_CITY] =\r\n\t\t\t\t$this->get_form_data($address_array, array(ADDRESS_CITY,\r\n\t\t\tFORM_ADDRESS_CITY));\r\n\r\n\t\t$account_array[FORM_ADDRESS_STATE] =\r\n\t\t\t\t$this->get_form_data($address_array, array(ADDRESS_STATE,\r\n\t\t\tFORM_ADDRESS_STATE));\r\n\r\n\t\t$account_array[FORM_ADDRESS_ZIP] =\r\n\t\t\t\t$this->get_form_data($address_array, array(ADDRESS_ZIP,\r\n\t\t\tFORM_ADDRESS_ZIP));\r\n\r\n\t\t$account_array[FORM_ADDRESS_COUNTRY] =\r\n\t\t\t\t$this->get_form_data($address_array, array(ADDRESS_COUNTRY,\r\n\t\t\tFORM_ADDRESS_COUNTRY));\r\n\r\n\t\t/*\r\n\t\t echo 'Works: <br/>';\r\n\t\t print_r($account_array);\r\n\t\t echo '<br/><br/>';\r\n\t\t die();\r\n\t\t */\r\n\r\n\t\treturn $account_array;\r\n\t}", "title": "" }, { "docid": "ded3128f69bdee5a46ab1285b4a987b5", "score": "0.5614624", "text": "public static function GetLoggedUserInfo()\n {\n $user_info = array(\"user_id\"=>\"\",\"account_type\"=>\"\",\"first_name\"=>\"\",\"last_name\"=>\"\",\"full_name\"=>\"\",\"using_original_pass\"=>true);\n\n\n if(self::AdminIsLoggedIn())\n {\n $user_info[\"user_id\"] = $_SESSION[\"admin_acc_id\"];\n $user_info[\"account_type\"]=$_SESSION[\"admin_account_type\"];\n $user_info[\"first_name\"] = $_SESSION[\"admin_first_name\"];\n $user_info[\"last_name\"] = $_SESSION[\"admin_last_name\"];\n $user_info[\"full_name\"] = $user_info[\"first_name\"] . \" \" . $user_info[\"last_name\"];\n $user_info[\"using_original_pass\"] = $_SESSION[\"admin_using_original_pass\"];\n }\n else if(self::StudentIsLoggedIn())\n {\n $user_info[\"user_id\"] = $_SESSION[\"student_acc_id\"];\n $user_info[\"account_type\"] = \"student\";\n $user_info[\"first_name\"] = $_SESSION[\"student_first_name\"];\n $user_info[\"last_name\"] = $_SESSION[\"student_last_name\"];\n $user_info[\"full_name\"] = $user_info[\"first_name\"] . \" \" . $user_info[\"last_name\"];\n $user_info[\"using_original_pass\"] = $_SESSION[\"student_using_original_pass\"];\n }\n else\n {\n $user_info = false;//No user logged in\n }\n return $user_info;\n }", "title": "" }, { "docid": "7b0a4f12ee2051ed28d0412bcaed0d19", "score": "0.5612842", "text": "function credenciales ($email)\r\n {\r\n $sql =\"SELECT u.email, p.id_permiso, p.permiso, r.id_rol, r.rol from usuario u inner join usuario_rol ur on u.email= ur.email inner join rol r on r.id_rol= ur.id_rol inner join rol_permiso rp on rp.id_rol= r.id_rol inner join permiso p on p.id_permiso= rp.id_permiso\r\n where u.email= '$email' \";\r\n\r\n $this ->conexion();\r\n \r\n $web = new UniverseGame;\r\n\r\n $array=$this-> sqlArray($sql);\r\n $rol=array ();\r\n $permiso=array ();\r\n\r\n foreach ($array as $key => $value) {\r\n array_push($rol,$value['rol']);\r\n array_push($permiso,$value['permiso']); \r\n }\r\n $datos=array ( 'rol'=> array_unique($rol),\r\n 'permiso'=> array_unique($permiso));\r\n\r\n\r\n return $datos; \r\n\r\n }", "title": "" }, { "docid": "68b9cb40465febb50972ceba6f6d8fa6", "score": "0.56108737", "text": "function RecuperaCredenciales()\n {\n // 1=>(object)array('id' => 2, 'user' => 'bopa', 'password' => '123'));\n \n $ObjDat = array(\n 'est_' => true\n , 'obj_' => array(0=>(object)array('id' => 1, 'user' => 'jazdian', 'password' => '123'))\n , 'msg_' => 'Usuario encontrado...'\n , 'num_' => 1\n , 'det_' => \"Success in Query!\"\n );\n \n \n return $ObjDat;\n }", "title": "" }, { "docid": "767c34290c2dec1572f55e002fb65579", "score": "0.56098616", "text": "function getLoginDetails($tablename, $username, $password) {\n $this->db->where('tbl_users.user_name', $username);\n $this->db->where('tbl_users.password', $password);\n $this->db->or_where('tbl_users.user_email', $username);\n $this->db->where('tbl_users.password', $password);\n $getd = $this->db->get($tablename);\n $data = $getd->row();\n if (count($data) > 0) {\n return $data;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4e21f031971095943a41fcb7a6287a10", "score": "0.56091875", "text": "protected function credentials(Request $request)\n {\n return array_merge($request->only($this->username(), 'password'), ['active' => true]);\n }", "title": "" }, { "docid": "e68a06077e792ffaa0ef7131e775156d", "score": "0.5609128", "text": "private function returnUsers() {\n $options = \\array_merge(['sort' => ['user' => 1]], $this->param('options', []));\n $accounts = $this->app->storage->find('cockpit/accounts', $options)->toArray();\n\n foreach ($accounts as &$account) {\n unset($account['password'], $account['api_key'], $account['_reset_token']);\n }\n return $accounts;\n }", "title": "" }, { "docid": "3a77652bad3e7637bc7c02c4463f7889", "score": "0.5603727", "text": "function getHTTPAuthCreds(): array{\n //for when HTTP authentication is required\n $user_opt = getopt(null, [\"user:\"]);\n $pass_opt = getopt(null, [\"pass:\"]);\n \n //the command line option overrides what is from the .env file\n $user = $user_opt[\"user\"] ?? $_ENV['USER'] ?? \"\";\n $pass = $user_opt[\"pass\"] ?? $_ENV['PASS'] ?? \"\";\n \n return [$user, $pass];\n}", "title": "" }, { "docid": "a0f74c1f1b4ac1282d5d8ee717ca7a29", "score": "0.55994934", "text": "function sso_getuserinfo_byusername($username)\n{\n $info = array();\n\n\t$conf = sso_config();\n\tif ($conf['sso_cookie'] && !empty($_COOKIE[$conf['sso_cookie']])) {\n\t\t$sid = $_COOKIE[$conf['sso_cookie']];\n\t\t$ssoauth = $conf['sso_service'] . \":\" . $conf['sso_password'];\n\n\t\t$message = new XML_RPC_Message('sso.getuserinfo_byusername',\n\t\t\t\t\tarray(new XML_RPC_Value($ssoauth, 'string'),\n\t\t\t\t\t\tnew XML_RPC_Value($username, 'string')));\n\n\t\t$server = new XML_RPC_Client($conf['sso_path'], \"https://$conf[sso_host]\");\n\t\t$result = $server->send($message, 0);\n\n\t\tif (is_object($result) && ($result->faultCode() === 0)) {\n\t\t\t$info = XML_RPC_decode($result->value());\n\t\t\treturn $info;\n\t\t}\n\t}\n\n\t$info = array();\n\treturn $info;\n}", "title": "" }, { "docid": "801ded6fcc4333ebd219fd777e000f9e", "score": "0.5580949", "text": "function login($username,$password,$serial,$terminal){\n\n if(!empty($username) && !empty($password)){\n\n $result = $GLOBALS['crud']->runQuery(\"SELECT user.id,user.fullname,user.username,user.password,user.show_password,authoz.*,b.branch_name as branch_name,b.branch_address,c.name as company_name,d.mac_address as mac,d.terminal_name FROM user_details as user INNER JOIN user_authorization as authoz ON authoz.user_id = user.id INNER JOIN branch b on b.branch_id = authoz.branch_id INNER JOIN company c on c.company_id = authoz.company_id INNER JOIN terminal_details d on d.branch_id = b.branch_id and d.mac_address = '$serial' and d.terminal_id = $terminal WHERE user.username = '\".$username.\"' and authoz.status_id = 1\");\n if(!empty($result) && sizeof($result) > 0){\n\n for($c=0;$c < sizeof($result);$c++) {\n if(password_verify($password, $result[$c][\"password\"]))\n {\n return json_encode($result[$c]);\n }\n }\n\n }else {\n return 0;\n }\n\n }else {\n\n return 0;\n }\n\n\n}", "title": "" }, { "docid": "0e95018b97ae1b596fc794b18752a74f", "score": "0.55747175", "text": "public function get_user_by_username_and_pass($username,$password){\n global $connection;\n \n $res=$connection->query(\"SELECT username FROM user WHERE username='$username' AND password='$password'\");\n \n $connection->get_all_info($res);\n return $res;\n }", "title": "" }, { "docid": "2789da739fcf95120098fc1607dd8470", "score": "0.55727273", "text": "public function matchPass(): array\n {\n //search username array\n\n $key = array_search($this->input_usrname,\n $this->usrname_array);\n //admin = -1 : user is not an admin\n if ($key !== FALSE){\n $admin = -1;\n }\n\n if ($key === FALSE) {\n //admin = 0 : user not exist\n $admin = 0;\n //search admin name array\n $key = array_search($this->input_usrname,\n $this->admin_name_array);\n if ($key !== FALSE) {\n //admin = 1 : user is an admin.\n $admin = 1;\n }\n }\n switch ($admin) {\n case -1:\n {\n if (\n $this->input_pass == $this->pass_array[$key]\n ) {\n return [$admin, $key];\n } else {\n return [$admin, NULL];\n }\n break;\n }\n case 1:\n {\n if (\n $this->input_pass == $this->admin_pass_array[$key]\n ) {\n return [$admin, $key];\n } else {\n return [$admin, NULL];\n }\n break;\n }\n case 0:\n {\n return [$admin, NULL];\n }\n break;\n\n }\n }", "title": "" }, { "docid": "248386e1a24f8fb3b02324e91c72e263", "score": "0.55722594", "text": "function signIn(string $login, string $password): array {\n\n include_once __DIR__ . \"/admins/inc/database.php\";\n\n try{\n $db = new pdo(\"mysql: host=\" . Database::HOST . \"; port=\" . Database::PORT . \"; dbname=\" . Database::DBNAME . \"; charset=utf8;\",Database::DBUSER, Database::DBPASS , array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n ));\n }catch(PDOException $pe){\n echo $pe->getMessage();\n }\n \n $sql = \"SELECT * FROM admins WHERE login = :login ;\";\n $req = $db -> prepare ($sql);\n $req-> bindParam(':login', $login, PDO::PARAM_STR);\n $req-> execute ();\n\n $results = $req -> fetchAll();\n\n foreach($results as $item ) {\n\n if(password_verify($password, $item[\"password\"] )) {\n return $item;\n } else {\n return array();\n }\n\n }\n return array();\n}", "title": "" }, { "docid": "e4a6ef14b6116b239f04bb280e46f6f2", "score": "0.5568627", "text": "public function getUsers(){\n $data=Array();\n \n \n $sql='select * from users where username='.'\"'.$this->username.'\"'. ';';\n \n \n $db=new Databasecontroler($this->table);\n $con=$db->con;\n $result=$con->prepare($sql);\n $result->execute();\n if (!$result){\n echo $sql;\n throw new Exception(\"getting items failed\");\n }\n $result->bind_result($username,$password,$level);\n if ($result->num_rows >= 0) {\n \n while($row = $result->fetch()) {\n $col=Array();\n $col[0]=$username;\n $col[1]=$password;\n $col[2]=$level;\n array_push($data, $col);\n }\n } else {\n $data=null;\n }\n return $data;\n }", "title": "" }, { "docid": "9232bd44c0b39d74ffd26ee0fddf1819", "score": "0.55678505", "text": "protected function getCredentials(): array\n {\n return [\n 'tp_access_token' => $this->component['access_token']->getToken()['tp_access_token'],\n 'refresh_token' => $this->app['config']['refresh_token'],\n ];\n }", "title": "" }, { "docid": "d915b162589965db84856e5aff808e15", "score": "0.55631226", "text": "public function authenticate()\n\t{\n\t\t/*$users=array(\n\t\t\t// username => password\n\t\t\t'demo'=>'demo',\n\t\t\t'admin'=>'admin',\n\t\t);*/\n\t\t$users=array();\n\t\tif($this->usertype==\"registration\"){\n\t\t\t//echo \"<pre>\";print_r($_REQUEST);die;\n\n\t\t\t if($_POST['LoginForm']['logintype']=='company')\n\t\t\t {\n\t\t\t $users= Login::model()->findByAttributes(array('email'=>$this->username));\n // Yii::app()->session['loggedId'] =$users->id; \n\t\t\t\t $users=$users->attributes;\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t\n\t\t\t\t \n\t\t //echo \"<pre>\";print_r($users['password']);die;\n\t\t}\n \n \n\n // code for company \n\t\tif(empty($users))\n\t\t\t$this->errorCode=self::ERROR_USERNAME_INVALID;\n\t\telseif(!empty($users['password']) && $users['password']!==md5($this->password))\n\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\telseif(!empty($users['status']) && $users['status'] !==1)\n\t\t $this->errorCode=self::STATUS_NOT_ACTIVE; \n\t\telse{\n\t\t\t\n\n\t\t\t$this->_id = $users->id;\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\t}\n\t\treturn !$this->errorCode;\n\t}", "title": "" }, { "docid": "149344a190ab0038f5f0ca66fc2a72fb", "score": "0.555969", "text": "public function getAccountUsers()\n {\n $account = $this->getAccountId();\n\n $query = $this->select()\n ->from('user_meta', array('user_meta.name', 'user_meta.surname', 'user_meta.email', 'user_meta.iduser', 'user_meta.username', 'user_meta.status'))\n ->join('company', 'user_meta.idcompany = company.idcompany', array('company.name AS company', 'idcompany'))\n ->where('user_meta.idaccount = ?', $account)\n ->where('company.idaccount = ?', $account)\n ->setIntegrityCheck(false);\n\n $stmt = $query->query();\n\n $result = $stmt->fetchAll(Zend_Db::FETCH_OBJ);\n\n\n\n return $result;\n }", "title": "" }, { "docid": "e2adfcdd7a4232589744ca4ab1bd8865", "score": "0.5559286", "text": "public function credentials(Request $request)\n {\n return [\n 'email' => $request->email,\n 'password' => $request->password,\n 'activated' => 1,\n ];\n }", "title": "" }, { "docid": "b6a55f98902aaca41eb0db021f939466", "score": "0.5551374", "text": "public function getLoginAccounts()\n {\n $criteria = craft()->elements->getCriteria('Social_LoginAccount');\n $loginAccounts = $criteria->find();\n\n return $loginAccounts;\n }", "title": "" }, { "docid": "98d71143d3597b1e79df1616f911bcfa", "score": "0.5539559", "text": "public function getAuthPassword();", "title": "" }, { "docid": "b0dcbcc24ff128de77dfe9342eb6da06", "score": "0.55279666", "text": "public function export_credentials ()\n {\n $arr = array();\n $arr['storage_url'] = $this->storage_url;\n $arr['cdnm_url'] = $this->cdnm_url;\n $arr['auth_token'] = $this->auth_token;\n return $arr;\n }", "title": "" }, { "docid": "a2212332d96787ea9014bf1a8a3c2913", "score": "0.5527241", "text": "function info_account() {\n\tglobal $tsCore, $tsUser, $tsIdiomas;\t\n\t\n\t$cp_id = $tsCore->setProtect(intval(empty($_GET['id']) ? $_POST['id'] : $_GET['id']));\n\tif(empty($cp_id)) return false;\n\t\n\t// Realizamos la consulta haber si existe.\n\t$query = anaK('query', 'SELECT c.*, u.user_id, u.user_nick, u.user_password FROM '.$tsCore->table['16'].' AS c LEFT JOIN '.$tsCore->table['08'].' AS u ON u.user_id = c.cp_client WHERE '.($tsUser->is_admod == 1 || $tsUser->is_admod && $tsCore->settings['access_mod'] == 1 ? '' : 'c.cp_client = \\''.(int)$tsUser->uid.'\\' && u.user_activo = \\'1\\' && u.user_baneado = \\'0\\' AND').' c.cp_id = \\''.$tsCore->setProtect((int)$cp_id).'\\' LIMIT 1', array(__FILE__, __LINE__));\n\t$data = anaK('fetch_assoc', $query);\n\t// Si se recibieron datos los pasamos..\n\tif($data['cp_id'] > 0) {\n\t$data['cp_idioma'] = $tsIdiomas[$tsUser->info['p_idioma']];\n\t$data['cp_dpass'] = $tsCore->get_decrypt($data['user_password']);\n\t$data['api'] = $this->stat_account($data['cp_id']);\n\t}\n\t//\n\treturn $data;\n\t}", "title": "" }, { "docid": "f77d0620aa797255f11a875c5b1f6711", "score": "0.5524303", "text": "public function getPasswordLoginInfo($username) {\n $query = 'SELECT * FROM ret_users LEFT JOIN ret_user_settings ON ret_users.userID = ret_user_settings.userID WHERE username = ?';\n return $this->performQueryGetResult($query, 's', [$username]);\n }", "title": "" }, { "docid": "10aa91d0abbd1bd636e0535e7efce341", "score": "0.552394", "text": "function do_authenticate_user($email,$passw)\n {\n include \"mysqlconnect.php\";\n \n $s = base64_encode(hash_hmac('sha256', $passw, \"saltfreeport\", true));\n \n $passwordOK = \"\";\n $usernameOK = \"\";\n $qPass = \"\";\n $app_list = array(\"status\" => \"400\") + array(\"results\" => \"Incorrect login.\");\n \n //1. First let's check if there user exist\n $stmt = $conn->prepare(\"SELECT userid,email,passw, imgurl FROM user WHERE email = :email \");\n $stmt->bindParam(':email',$email,PDO::PARAM_STR,255);\n \n if($stmt->execute()) {\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n foreach($rows as $row) {\n $qEmail = $row['email'];\n \n // 2. If the user exist then let's check if the password is correct\n if($qEmail == $email)\n {\n $qPass = $row['passw'];\n \n if ($qPass == $s)//$passw)\n {\n $arr1 = array();\n $person = array(\"userid\"=>$row['userid'], \"email\"=>$row['email']);\n array_push($arr1, $person);\n $app_list = array(\"status\" => \"200\") + array(\"results\" => $arr1);\n \n return $app_list;\n } else {\n $passwordOK = \"Incorrect password. \";\n }\n } else {\n $usernameOK = \"Username does not exist. \";\n }\n }\n \n if((strlen($usernameOK) > 0) || (strlen($passwordOK) > 0))\n $app_list = array(\"status\" => \"400\") + array(\"results\" => $usernameOK . $passwordOK);\n else\n $app_list = array(\"status\" => \"400\") + array(\"results\" => \"Incorrect login.\"); \n \n } else {\n //echo \"Something went wrong...\";\n \t $app_list = $stmt->errorInfo();\n $app_list = array(\"status\" => \"400\") + array(\"results\" => $app_list);\n }\n \n \n return $app_list;\n }", "title": "" }, { "docid": "c11ac507dd977f5e4d6bd405d233d707", "score": "0.551949", "text": "function findUserByUsername( string $username ) : array {\n\t$sql\t\t= \n\t\"SELECT * FROM login_pass WHERE username = :user LIMIT 1;\";\n\t$data\t= getResults( $sql, [ ':user' => $username ], \\MEMBER_DATA );\n\tif ( empty( $data ) ) {\n\t\treturn [];\n\t}\n\treturn $data[0];\n}", "title": "" }, { "docid": "cd94f1e7d436a2968e08d5554543aa91", "score": "0.5509753", "text": "public function getCustomerHeaderAuthentication(\n string $username = 'github@gmail.com',\n string $password = \\Magento\\TestFramework\\Bootstrap::ADMIN_PASSWORD\n ): array {\n $customerToken = $this->customerTokenService->createCustomerAccessToken($username, $password);\n\n return ['Authorization' => 'Bearer ' . $customerToken];\n }", "title": "" }, { "docid": "c33eb4e1e8fd8ffb455c8ae67ac92e57", "score": "0.54973525", "text": "public function getUserInfoByRegistrationData(string $login, string $password):array {\n $connection = $this->connectToDB();\n $columns = [\n \"count\" => \"COUNT(`user_id`)\",\n \"user_id\"\n ];\n\n $salt = $this->getSaltByUserEmail($email);\n $hashedPassword = md5($salt . $password);\n\n $query = (new SelectQueryBuilder($this->getTableName()))\n ->what($columns)\n ->whereAnd(\"`user_email` = '$email'\")\n ->whereAnd(\"`user_password` = '$hashedPassword'\")\n ->build();\n\n $result = $connection->query($query->getQueryString());\n $userInfo = $result->fetch_assoc();\n\n\t\t\treturn $userInfo;\n }", "title": "" }, { "docid": "68efe0c55f934d29ded45f522a6e3335", "score": "0.54959863", "text": "public function check_login_employer(){\n\t\treturn $this->db\n\t\t->where(\"com_email\",$this->input->post(\"email\"))\n\t\t->where(\"com_password\",md5($this->input->post(\"password\")))\n\t\t->get(\"tbl_company\");\t\n\t}", "title": "" }, { "docid": "2ca0cd855c6de0a15229fb07e6ac6393", "score": "0.5495537", "text": "function getAccountInfos($email){\n $conn=connection();\n $info= array();\n\n $salGetAccountInfo=\"SELECT * FROM account where email='\".$email.\"'\";\n $results=$conn->query($salGetAccountInfo) or die($conn->error);\n if($results->num_rows==1){\n while($record=$results->fetch_array()){\n $info[\"id\"]=$record[\"emp_id\"];\n $info[\"fname\"]=$record[\"first_name\"];\n $info[\"lname\"]=$record[\"last_name\"];\n $info[\"phone_number\"]=$record[\"phone_number\"];\n $info[\"address\"]=$record[\"address\"];\n $info[\"zip\"]=$record[\"zip\"];\n\n\n }\n }\n\n\n return $info;\n}", "title": "" }, { "docid": "995d12f4ec55e0e86ff0e10aa2a309b9", "score": "0.549478", "text": "protected function credentials (Request $request)\n {\n $credentials = array('email' => $request->input('email'),\n 'password' => $request->input('password'),\n 'del_flg' => UserConst::DELETED,\n 'status' => UserConst::active);\n return $credentials;\n }", "title": "" }, { "docid": "edc74c6dd242644a8956a60e282741b0", "score": "0.54903066", "text": "public function get_applicant_credentials($employee_info_id) \n\t{\n\t\t$this->db->select(\"a.company_id, b.applicant_id, b.myhris, c.company_name\");\n\t\t$this->db->join(\"applicant_account b\", \"b.employee_info_id = a.id\", \"inner\");\n\t\t$this->db->join(\"company c\", \"c.company_id = a.company_id\", \"inner\");\n\t\t$this->db->where(\"a.id\", $employee_info_id);\n\t\t$query = $this->db->get(\"employee_info a\");\n\t\treturn $query->row();\n\t}", "title": "" }, { "docid": "7df9ece01459fb67ca3666782271afe3", "score": "0.548837", "text": "function getUserCredentials ($userType, $userName, $password) {\n global $pdo;\n switch($userType) {\n case 'supervisor':\n $credentials = $pdo->prepare('SELECT * from supervisor WHERE email = ? AND password = ?');\n $credentials->execute([$userName, $password]);\n $result = $credentials->fetch();\n $result['user-type'] = 'supervisor';\n return $result;\n case 'therapist':\n $credentials = $pdo->prepare('SELECT * from therapist WHERE email = ? AND password = ?');\n $credentials->execute([$userName, $password]);\n $result = $credentials->fetch();\n $result['user-type'] = 'therapist';\n return $result;\n case 'client':\n $credentials = $pdo->prepare('SELECT * from client WHERE email = ? AND password = ?');\n $credentials->execute([$userName, $password]);\n $result = $credentials->fetch();\n $result['user-type'] = 'client';\n return $result;\n }\n\n}", "title": "" }, { "docid": "e465c1e3d994927af28c298b63319912", "score": "0.5485479", "text": "function encPsw()\n {\n global $con;\n $query = \"SELECT username, password FROM Accounts\";\n $result = $con->query($query);\n \n while ($row = $result->fetch_assoc()) {\n if ($_SESSION[\"uname\"] == $row[\"username\"]) {\n $encPsw = $row[\"password\"];\n break;\n }\n }\n return $encPsw;\n }", "title": "" } ]
edf94db24796e3ed4c643bfeb67726ed
Appends to the html string
[ { "docid": "7b06b4aa0bc31a331ec19182f10f363b", "score": "0.6532244", "text": "function addHtml($sMoreHtml) {\n $this->sHtml = $this->sHtml . $sMoreHtml;\n }", "title": "" } ]
[ { "docid": "f459384865786669730bbe51ae8e38c2", "score": "0.7028402", "text": "public function addHTML($html)\n\t{\n\t\t$this->innerHTML .= $html;\n\t}", "title": "" }, { "docid": "9d1cf3010f966ce3d24d0d82f5febb81", "score": "0.66869354", "text": "public function addHTML($html)\n {\n if($this->noAdding)\n {\n return;\n }\n \n $this->items[] = $html;\n }", "title": "" }, { "docid": "bc9e5918dc94bb101f62c3d2ec0b5905", "score": "0.63251776", "text": "abstract public function buildHTML();", "title": "" }, { "docid": "38db2a3e3c324d3f29198475e2c224cb", "score": "0.6262554", "text": "abstract public function append($content);", "title": "" }, { "docid": "493d8e0e1e792adbdfddc0d9f54736aa", "score": "0.62018836", "text": "function render ($html) {\n\t$toInsert = \\Sleepy\\Hook::addFilter('head_inserter', \"\\n\");\n\t$pos = strrpos($html, '</head>');\n\t$html = ($pos !== false)\n\t\t\t? substr_replace($html, $toInsert, $pos, 0)\n\t\t\t: $html;\n\n\treturn $html;\n}", "title": "" }, { "docid": "99d3f2a82680468d5d011f74236ea925", "score": "0.609447", "text": "public function appendContent($content);", "title": "" }, { "docid": "01eae301c8be161657135ed03fc9686d", "score": "0.60706353", "text": "function addContent($content) \n { \n $this->page .= $content; \n }", "title": "" }, { "docid": "d52483e64e09772266de88cb4129ac69", "score": "0.60194707", "text": "public function add($html) {\n $this->addDebug(DEBUG_FUNCTION_TRACE, '$html=' . $html);\n $this->appendBody($html . $this->newLine);\n return $html;\n }", "title": "" }, { "docid": "b3f84d48ddd9e426d07f589071ab02cc", "score": "0.6011361", "text": "function AppendAfterHeaders($html) \n {\n $this->AfterHeaders .= $html;\n }", "title": "" }, { "docid": "2af517d2413ed3203632d693d4d934a3", "score": "0.5986454", "text": "public function createHtmlEnd()\r\n {\r\n settype($lv_result, string);\r\n $lv_result = '</div><!--class=container0 --></body></html>' . $this->CrLf;\r\n return $lv_result;\r\n }", "title": "" }, { "docid": "a76b10d75f6f5223cfb8500db0b993bc", "score": "0.5958313", "text": "public function appendHead($html) {\n $this->addDebug(DEBUG_FUNCTION_TRACE, '$html=' . $html);\n $this->head[] = $html;\n }", "title": "" }, { "docid": "b7c94b195a0f02c18367edbe75457953", "score": "0.59555495", "text": "public function add_content($html, $container)\n {\n $this->template_contents[$container] .= $html . \"\\n\";\n }", "title": "" }, { "docid": "6d0057a462a6cd814b99c6d469b2ce22", "score": "0.59500223", "text": "public function htmlAppend($selector, $html) {\n\t\treturn $this->_html($selector, $html, 'append');\n\t}", "title": "" }, { "docid": "18319d64a9f98778e44e1b1e5e5f3f0b", "score": "0.5949092", "text": "private function generateHtml() {\n $this->html = $this->firstHtml;\n $this->html .= \"<center>\";\n $this->html .= $this->blank->getHTML();\n $this->html .= \"</center>\";\n }", "title": "" }, { "docid": "18319d64a9f98778e44e1b1e5e5f3f0b", "score": "0.5949092", "text": "private function generateHtml() {\n $this->html = $this->firstHtml;\n $this->html .= \"<center>\";\n $this->html .= $this->blank->getHTML();\n $this->html .= \"</center>\";\n }", "title": "" }, { "docid": "7f75bd21fbd2dac11dd853731ba17e17", "score": "0.59008735", "text": "protected function buildHtml(){\n $out = '';\n // your code here to populate $out\n return $out;\n }", "title": "" }, { "docid": "58c5cb30046cdc69678fee7aaf175d80", "score": "0.5891421", "text": "public function addBody($html) {\r\n\r\n\t\t// Replace some code for the IGB.\r\n\t\tif ($this->isIGB) {\r\n\t\t\t$html = str_replace(\"align=\\\"center\\\"\", \"\", $html);\r\n\t\t\t$html = str_replace(\"%%WIDTH%%\", \"width=\\\"99%\\\"\", $html);\r\n\t\t} else {\r\n\t\t\t$html = str_replace(\"%%WIDTH%%\", \"width=\\\"100%\\\"\", $html);\r\n\t\t}\r\n\r\n\t\t// Add the html nugget to the body.\r\n\t\t$this->body .= $html;\r\n\t}", "title": "" }, { "docid": "75f2b8ef83026d24637912c94f6fd5bc", "score": "0.587141", "text": "public function setHtmlAfter($string);", "title": "" }, { "docid": "1e996826404f4287fd86d567636fd6b4", "score": "0.58597034", "text": "public function appendFooter($html) {\n $this->addDebug(DEBUG_FUNCTION_TRACE, '$html=' . $html);\n $this->footer[] = $html;\n }", "title": "" }, { "docid": "93e7f6a6028f5f21fffa7dbbc4810a7c", "score": "0.58444476", "text": "public function & add( $html )\n {\n $this->raw[ ++$this->count ] = $html;\n return $this;\n }", "title": "" }, { "docid": "63dc00530e0c8a52cd22a47f52ea8630", "score": "0.5819384", "text": "private function build() \n {\n $this->html = implode('', array(\n '<!DOCTYPE html>',\n '<html lang=\"'.$this->lang.'\">',\n '<head>',\n '<title>&nbsp;</title>',\n '</head>',\n '<body>',\n '</body>',\n '</html>'\n ));\n }", "title": "" }, { "docid": "139159e5b5ead6649f2296c341b34739", "score": "0.58046824", "text": "public function appendHeader($html) {\n $this->addDebug(DEBUG_FUNCTION_TRACE, '$html=' . $html);\n $this->header[] = $html;\n }", "title": "" }, { "docid": "289cb90d5a7327fd8a415ecc5f1c9f27", "score": "0.5794767", "text": "public function addToBody() {\n Page::addElementToBody($this->elm);\n }", "title": "" }, { "docid": "8b53e095f12249f15f717f4e0ae10f95", "score": "0.5765177", "text": "public function addBody($html){\n\t\t$this->body.=$html;\n\t\treturn $this->body;\n\t}", "title": "" }, { "docid": "99a77ded86787f9759e9afddfbcc1a5b", "score": "0.57164526", "text": "function append($el, $text)\n {\n }", "title": "" }, { "docid": "f72b3f6509ac10fe7debdeb8468ca83d", "score": "0.5704351", "text": "public function append($element);", "title": "" }, { "docid": "241f69d72a6284ed8d9a13ed3c7b354a", "score": "0.5690764", "text": "public function renderHtml();", "title": "" }, { "docid": "70acba5105418b04a9f5a20385d64c15", "score": "0.5683174", "text": "public static function append_markup($html, $url, $attr) {\n if(!is_feed()) {\n $html = '<figure class=\"figure figure--embed\">' . $html . '</figure>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "12cdb90934b0f2a7bbf78eb8472fcc28", "score": "0.5669544", "text": "public function addHtml($response, $html)\n {\n $this->initPdf();\n $this->pdfEngine->AddPage();\n $this->pdfEngine->writeHTML($html, true, false, true, false, '');\n }", "title": "" }, { "docid": "d7b3f1360c35a1cfb29b79c468948919", "score": "0.56687367", "text": "protected function _afterToHtml($html)\n {\n $htmlId = $this->getHtmlId();\n\n return \"<div id=\\\"{$htmlId}\\\">{$html}</div>\";\n }", "title": "" }, { "docid": "d49571102ece8f763aa8ac901f7f35ae", "score": "0.5665055", "text": "abstract public function html();", "title": "" }, { "docid": "82e2021b1c7c2d55ae8756fbb06fa14f", "score": "0.56628555", "text": "function end_html()\n{\n\t$out = '</body>';\n\t$out .= '</html>';\n\n\treturn $out;\n}", "title": "" }, { "docid": "3a7c2d356454b46a6e07806af1576d4c", "score": "0.5659257", "text": "public function append($str, $serious = TRUE) {\n if($serious && Request::getInstance()->isAjax()) {\n return $this;\n }\n $this->output .= $str;\n return $this;\n }", "title": "" }, { "docid": "4befd30c9d566473a594fe81cdc5e824", "score": "0.56387967", "text": "public function getEndHtml()\n {\n }", "title": "" }, { "docid": "d0364082bb430400c4c7adf0d6c5c1db", "score": "0.5634431", "text": "protected abstract function createHtml( );", "title": "" }, { "docid": "a554777de67f64e4b433691bd3a2b917", "score": "0.5613857", "text": "public function append($string)\r\n\t{\r\n\t\t$this->out .= $string;\r\n\t}", "title": "" }, { "docid": "8ea494931cd550654cd19ad02ba4eceb", "score": "0.557066", "text": "abstract function html();", "title": "" }, { "docid": "0d79bafb7806e6e4494234b7e571eddc", "score": "0.5565312", "text": "public function html()\n {\n $this->_process(true);\n }", "title": "" }, { "docid": "a2a081b042233e09443500c2b7db67d6", "score": "0.5550112", "text": "protected function inject($html)\n\t{\n\t\t$this->javascript_header();\n\t\t$this->response->body($this->document_write($html));\n\t}", "title": "" }, { "docid": "abea61383a26bd6b65ddc56011d51b4a", "score": "0.5532215", "text": "function append($tag,$value,$encode=true){\n if($value instanceof URL)$value=$value->__toString();\n // Temporary here until we finish testing\n if($encode && $value!=$this->api->encodeHtmlChars($value,ENT_NOQUOTES) && $this->api->getConfig('html_injection_debug',false)) {\n throw $this->exception('Attempted to supply html string through append()')\n ->addMoreInfo('val',var_export($value,true))\n ->addMoreInfo('enc',var_export($this->api->encodeHtmlChars($value,ENT_NOQUOTES),true))\n //->addAction('ignore','Ignore tag'.$tag)\n ;\n }\n if($encode)$value=$this->api->encodeHtmlChars($value,ENT_NOQUOTES);\n if($this->isTopTag($tag)){\n $this->template[]=$value;\n return $this;\n }\n if(!isset($this->tags[$tag]) || !is_array($this->tags[$tag])){\n throw $this->exception(\"Cannot append to tag $tag\")\n ->addMoreInfo('by',$this->owner);\n }\n foreach($this->tags[$tag] as $key=>$_){\n\n if(!is_array($this->tags[$tag][$key])){\n //throw new BaseException(\"Problem appending '\".$this->api->encodeHtmlChars($value).\"' to '$tag': key=$key\");\n $this->tags[$tag][$key]=array($this->tags[$tag][$key]);\n }\n $this->tags[$tag][$key][]=$value;\n }\n return $this;\n }", "title": "" }, { "docid": "cac1c5a0f03593de9bdc6ab110c47081", "score": "0.5529327", "text": "private function surround($html){\n return \"<{$this->surround}>$html</{$this->surround}>\";\n }", "title": "" }, { "docid": "6134da4da03d3828a932cf824b41376c", "score": "0.5521165", "text": "public function AddHtml($text)\r\n\t{\r\n\t\t//call constructor of Element class\r\n\t\tparent::Element($text);\r\n\t\t$this->text = $text;\t\r\n\t}", "title": "" }, { "docid": "ca59a9c7423627330c3629a443757c5b", "score": "0.55121714", "text": "public function output_html()\n {\n }", "title": "" }, { "docid": "35ab623a1e2a4643f68a6b065ebd3637", "score": "0.5510028", "text": "public abstract function html($data);", "title": "" }, { "docid": "d5b8bd403c05847563496a9829a6225c", "score": "0.5508222", "text": "public function appendBody($str)\n {\n $this->_body .= (string) $str;\n }", "title": "" }, { "docid": "6cef7770edee9ab2b4f98a2bf087f32b", "score": "0.5506226", "text": "public function createHTML() {\r\n\t}", "title": "" }, { "docid": "777e5e4221537166d85daacc9806be07", "score": "0.550263", "text": "function append_in_tag($string, $append)\n {\n $string = preg_replace('/(?<=>)[\\n\\r\\s]+(?=<)/', '', $string);\n // Find the last tag\n preg_match('/(<\\/\\w+>)+$/', $string, $match, PREG_OFFSET_CAPTURE);\n if (!empty($match[0][1])) {\n $start = substr($string, 0, $match[0][1]);\n $end = substr($string, $match[0][1]);\n $string = $start . $append . $end;\n }\n\n return $string;\n }", "title": "" }, { "docid": "b0b5ed4aceb68a9c86bedb674869b580", "score": "0.54669684", "text": "function setInnerHTML($element, $html){\r\n\t\r\n $fragment = $element->ownerDocument->createDocumentFragment();\r\n $fragment->appendXML($html);\r\n while ($element->hasChildNodes())\r\n $element->removeChild($element->firstChild);\r\n $element->appendChild($fragment);\r\n\t}", "title": "" }, { "docid": "547afde98887aad4c21a467fe3f86cca", "score": "0.543824", "text": "public function rr($html) {\n\t\treturn \"\n\t\t\t<div class='tframe'>\n\t\t\t\t$html\n\t\t\t</div>\n\t\t\";\n\t}", "title": "" }, { "docid": "d3204adbf0668a129f9644e75e5ae0e6", "score": "0.5436969", "text": "abstract public function makeHtml();", "title": "" }, { "docid": "08539020d4afea8ace51530621978765", "score": "0.5392854", "text": "abstract protected function _toHtml();", "title": "" }, { "docid": "607810d211382fc1a081b725b1afc9d9", "score": "0.5388205", "text": "public function HTMLRender(){}", "title": "" }, { "docid": "b4efa0de9842b99a4821811c654fe039", "score": "0.5384676", "text": "protected function addListElementHtml($html)\n\t{\n\t\techo \"<li>$html</li>\\n\";\n\t}", "title": "" }, { "docid": "dc22969897329961a5aae763e14539b2", "score": "0.5374777", "text": "abstract public function setBodyHtml($html);", "title": "" }, { "docid": "876ef6bbe0ea6fab3c276315a3aceb4f", "score": "0.53745437", "text": "function build () {\r\n $this->html.=\" <tr>\\n\";\r\n $this->html.=\" <td><b>\".$this->article->title().\"</b> by \".\r\n $this->article->author().\" \".$this->article->published().\"</td>\";\r\n $this->html.=\" </tr>\\n\";\r\n $this->html.=\" <tr>\\n\";\r\n $this->html.=\" <td>\".$this->article->body().\"</td>\";\r\n $this->html.=\" </tr>\\n\";\r\n }", "title": "" }, { "docid": "8ffacac5ecd767ef8a70e22c94787a1f", "score": "0.5367019", "text": "public function appendContent(string $content)\n {\n return $this->setContent($this->content . $content);\n }", "title": "" }, { "docid": "049eb87cfff8d51c56b1bf971bc369f1", "score": "0.5359514", "text": "public static function append($str){\n\t\tstatic::$items[] = $str;\n\t}", "title": "" }, { "docid": "386a6a06edb3efb9a5d46cfd88e719ec", "score": "0.53487927", "text": "private function _appendText($text) {\n $this->_line += substr_count($text, \"\\n\");\n if($this->_filter) {\n if(strpos($text, \"<?\") === false) {\n $this->_body .= $text;\n } else {\n $fragments = explode(\"<?\", $text);\n foreach($fragments as &$fragment) {\n if($fragment) {\n foreach($this->_filter as $filter) {\n $fragment = call_user_func($filter, $fragment);\n }\n }\n }\n $this->_body .= implode('<?php echo \"<?\"; ?>', $fragments);\n }\n } else {\n $this->_body .= str_replace(\"<?\", '<?php echo \"<?\"; ?>'.PHP_EOL, $text);\n }\n }", "title": "" }, { "docid": "70cbd354bb0418810b3f98a3a5fd27a7", "score": "0.5344809", "text": "public function html();", "title": "" }, { "docid": "cacf5207d153407f0cd7e1adc1acf816", "score": "0.5339517", "text": "static function end_html( $html, $meta, $field )\r\n\t\t{\r\n\t\t\t$html = '';\r\n\r\n\t\t\treturn $html;\r\n\t\t}", "title": "" }, { "docid": "fe9bc7051b196f24e196e8aa42448680", "score": "0.5317497", "text": "private function setHtmlContent($html)\n\t{\n\t\tif ($html === NULL) return;\n\n\t\t$dom = new \\DOMDocument;\n\t\t$html_fragment = $dom->createDocumentFragment();\n\t\t$html_fragment->appendXML($html);\n\n\t\t$this->node->appendChild($this->root->importNode($html_fragment, TRUE));\n\t}", "title": "" }, { "docid": "7e2c8eb41020c79323dc09a599b6763b", "score": "0.5314772", "text": "public function addHtmlContent($content) {\n $this->_bodyContent = $content;\n }", "title": "" }, { "docid": "47004e02ef49c1fbde28d1320e5614c6", "score": "0.5303074", "text": "function appendData ($data)\n\t{\n\t\t$this->data .= $data;\n\t}", "title": "" }, { "docid": "e6a7e1f81b240911b9ce18a427045daa", "score": "0.52964854", "text": "function laborator_append_content_to_footer_parse_content() {\n\tglobal $lab_footer_html;\n\techo implode( PHP_EOL, $lab_footer_html );\n}", "title": "" }, { "docid": "98bade48f446ebfca594d8e22d841585", "score": "0.52757853", "text": "function generate_html() {\n\n\t\t$html_format = '<div class=\"piwaka-gallery basic\">%s</div>';\n\t\t$content = '';\n\n\t\tforeach ($this->posts as $piwaka_post) { \n\n\t\t\t$thumb_html = $this->get_thumbnail_html($piwaka_post);\n\t\t\t$content .= $thumb_html;\n\n\t\t}\n\n\t\t$this->html = sprintf($html_format, $content);\n\t}", "title": "" }, { "docid": "ac13f03b7b4964dbc1d25b7c5205a609", "score": "0.5269272", "text": "function render(string $html): void\n {\n (new HtmlRenderer)->render($html);\n }", "title": "" }, { "docid": "3f0a983709fb4a53d460bf50b2328622", "score": "0.5264025", "text": "public function append($append): void\n {\n $this->append = $append;\n }", "title": "" }, { "docid": "d13e0cdfa5b2bc1e562734f1a30158fd", "score": "0.5260922", "text": "public function getAddLinkHtml() {\n $link_html = '';\n\n if($this->allow_add_record) {\n $link_html = '<div class=\"add_link\">';\n \n if(empty($this->primary_dropdown_name) || (!empty($this->current_selected_filters[$this->primary_dropdown_name]))) {\n $link_html .= $this->getAddLink();\n }\n \n $link_html .= '</div>';\n }\n \n return $link_html;\n }", "title": "" }, { "docid": "256ac066a58615c181cbb29548b22dce", "score": "0.5259537", "text": "static function begin_html( $html, $meta, $field )\r\n\t\t{\r\n\t\t\t$html = '';\r\n\r\n\t\t\treturn $html;\r\n\t\t}", "title": "" }, { "docid": "089d339a7252681d3f513d9ed7f13fed", "score": "0.52549183", "text": "public function setNewHTML(string $html): void\n {\n $html = $this->extractBase64ImagesFromHtml($html);\n $this->page->html = $this->formatHtml($html);\n $this->page->text = $this->toPlainText();\n $this->page->markdown = '';\n }", "title": "" }, { "docid": "3fc76cd22f06fcd1df392c841def4cef", "score": "0.5254561", "text": "function render() {\r\n $this->html.=\"</table>\\n\";\r\n return $this->html;\r\n }", "title": "" }, { "docid": "ecfc5d2bf2ed40fc74d75ec260e3fe45", "score": "0.52528", "text": "public function build()\n {\n\n $html = '';\n \n $html .= $this->render();\n \n return $html;\n \n }", "title": "" }, { "docid": "a8d2323b506a9db10266afaec890e6c3", "score": "0.52525884", "text": "protected function appendAllHtmlOptions()\n\t{\n\t\tif (isset($this->htmlOptions[\"class\"]))\n\t\t\t$this->htmlOptions[\"class\"].=\" nav\";\n\t\telse\n\t\t\t$this->htmlOptions[\"class\"] = \"nav\";\n\t\t$this->htmlOptions['class'].=\" $this->type\";\n\t\tif (isset($this->submenuHtmlOptions['class']))\n\t\t\t$this->submenuHtmlOptions['class'].=\" dropdown-menu\";\n\t\telse\n\t\t\t$this->submenuHtmlOptions['class'] = \"dropdown-menu\";\n\t\tif ($this->stackable)\n\t\t\t$this->htmlOptions['class'].=' nav-stacked';\n\t}", "title": "" }, { "docid": "185c614567ef0680d075ecd534019898", "score": "0.523792", "text": "public function addHTML($html, $pos = -1) {\n return $this->addElement(new HTMLElement($html), $pos);\n }", "title": "" }, { "docid": "2c8338ba49c2c710b2dba499d8a7805f", "score": "0.5232849", "text": "public function setHtml();", "title": "" }, { "docid": "2957ac88962153984b0d7a68301fb153", "score": "0.5204356", "text": "static function end() {\r\n return '</div>'.\"\\n\\n\";\r\n}", "title": "" }, { "docid": "d5badd297a3e07ddb2d4752def5d9b3c", "score": "0.51891094", "text": "public function appendBody($string) {\n\t\t$string = (string)$string;\n\t\t$body = $this->getBody();\n\t\t$this->setBody($body . $string);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "54ba89f60bbddc7ed71230428b3a386b", "score": "0.51787317", "text": "public function startHTML() {\n ob_start();\n }", "title": "" }, { "docid": "c43c5c768833ae3a615c22b6f1fbedf2", "score": "0.5167682", "text": "public function render(): void\n {\n echo $this->html;\n }", "title": "" }, { "docid": "010b1ba6dd3cf99d88a1f484353539ce", "score": "0.51651585", "text": "public function render() {\n\t\t$this->html = ob_get_contents();\n\n\t\techo $this->html;\n\t}", "title": "" }, { "docid": "9ba6ba6ca7fd6f88dc138bfd4d1322ed", "score": "0.51562333", "text": "public function __toString(){\r\n $html = $this->getHead();\r\n \r\n $html .= '<body>' . PHP_EOL;\r\n $html .= $this->body . PHP_EOL;\r\n $html .= '</body>' . PHP_EOL;\r\n $html .= '</html>' . PHP_EOL;\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "a8e7342f5222bd710517266232f37642", "score": "0.51517713", "text": "public function append() {\n if (!$this->_cached) {\n $this->_content .= (string) $this->trigger(func_get_args());\n }\n \n return $this;\n }", "title": "" }, { "docid": "fd9999abbf2d2573abad8ebf0804c3dd", "score": "0.5143485", "text": "function write_html_form ($html) {\n write_js(\"parent.parent.document.getElementById('ecu_preview')\"\n . \".innerHTML = \\\"$html\\\"\"\n . \"+ parent.parent.document.getElementById('ecu_preview')\"\n . \".innerHTML\");\n }", "title": "" }, { "docid": "343e91f82354cbf29317105ed75cd218", "score": "0.5129596", "text": "protected static function addHtmlEntities(&$html)\n {\n $html = '&'.$html.';';\n }", "title": "" }, { "docid": "dd637023dbae09f5a9a92929b8c2592d", "score": "0.5118057", "text": "Public function renduHtml()\n {\n\n $rendu = \"<div \".$this->idHtml.\" \".$this->classHtml.\" \".$this->title.\">\";\n $rendu .= $this->calculerFils();\n $rendu .= \"</div>\";\n return $rendu;\n }", "title": "" }, { "docid": "2835cf02cdf532191a022668789334c3", "score": "0.5117386", "text": "private function addHtmlElementIfMissing(): bool\n {\n if ($this->getElementsByTagName('html')->length === 0) {\n if (!isset(self::$newObjectsCache['htmlelement'])) {\n self::$newObjectsCache['htmlelement'] = new \\DOMElement('html');\n }\n $this->appendChild(clone (self::$newObjectsCache['htmlelement']));\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1d49dc4c173ca24fdb0b76aab69a73ef", "score": "0.5116018", "text": "public function append ($data) {\n $this->data[] = $data;\n }", "title": "" }, { "docid": "e93f371699b91c4eb46173feeaf957ac", "score": "0.51051664", "text": "public function appendContents(string $contents) : void {\n\t\t\t$this->contents->append($contents);\n\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "1bd44ee82c24d5db33533f98e733ad78", "score": "0.5102317", "text": "public function append($item);", "title": "" }, { "docid": "bede3c8f0a5bd92fb225aba51203d46f", "score": "0.50968397", "text": "protected function html() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "bede3c8f0a5bd92fb225aba51203d46f", "score": "0.50968397", "text": "protected function html() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "bede3c8f0a5bd92fb225aba51203d46f", "score": "0.50968397", "text": "protected function html() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "d6a412c5493d64badd6677805f231fc0", "score": "0.50949955", "text": "function appendHTML($dom, $id, $textToAdd, $tag = \"div\", $array_of_attributes=NULL) {\r\n // If the function is called without attributes array parameter\r\n if ($array_of_attributes == NULL){\r\n // Make the $invalid_field_array_of_attributes variable global\r\n global $invalid_field_array_of_attributes;\r\n // Set the default attributes array (for invalid fields - ex: login/register page)\r\n $array_of_attributes = $invalid_field_array_of_attributes;\r\n }\r\n // Get the element you want to append to\r\n $descBox = $dom->getElementById($id);\r\n //if($descBox == NULL) return;\r\n // Create the element to append to #element1\r\n $appended = createElement($dom, $tag, $textToAdd, $array_of_attributes);\r\n // Append the element\r\n $descBox->appendChild($appended);\r\n}", "title": "" }, { "docid": "46303cabba52b5817eba170da00eda13", "score": "0.50850886", "text": "public function addFooter($html)\n {\n $this->_headerFooterValues['footers'] .= \n empty($this->_headerFooterValues['footers']) ?\n $html :\n \"\\n\" . $html;\n }", "title": "" }, { "docid": "6bf3021a6b8e7f4b6f2adbc101451ce2", "score": "0.50849336", "text": "public function render_html_all()\n {\n $output = '';\n $output .= $this->start_as_html;\n\n foreach($this->schema->fields as $name => $field_data)\n {\n $output .= $this->widgets->$name->as_html . \"\\n\";\n }\n\n $output .= $this->toolbar_as_html;\n $output .= $this->end_as_html;\n \n return $output;\n }", "title": "" }, { "docid": "e4e1a1ab61351b854b21265f1e9fa8c0", "score": "0.5084526", "text": "public function __toString()\n {\n $this->html = $this->prefix . $this->html;\n $this->html .= $this->suffix;\n\n return $this->html;\n }", "title": "" }, { "docid": "2bcece3dbd40f5a3249ffe5a4c3500cf", "score": "0.50811774", "text": "private function buildContent()\n {\n $this->addCss();\n $this->content .= \"<h1 style='margin-bottom:5px'>\" . stripslashes($this->data['title']) . \"</h1>\n Date : \" . Tools::formatDate($this->data['date']) . \"<br />\n Tags : <em>\". $this->tags . \"</em><br />\n Made by : \" . $this->author . \"\n <hr>\" . stripslashes($this->body);\n\n $this->addLinkedItems();\n $this->addAttachedFiles();\n $this->addComments();\n $this->addElabid();\n $this->addLockinfo();\n $this->addUrl();\n $this->content .= \"<footer>PDF generated with <a href='http://www.elabftw.net'>elabftw</a>, a free and open source lab notebook</footer>\";\n }", "title": "" }, { "docid": "056011ef1da33c411ff28ae14131019d", "score": "0.5079221", "text": "private function setHtml() {\n $html = '<img src=\"' . $this->url . '\" alt=\"' . $this->alt . '\" title=\"' . $this->title . '\" width=\"' . $this->width . '\" height=\"' . $this->height . '\">';\n\n $this->html = $html;\n }", "title": "" }, { "docid": "cdf71c17b78faa6e921c5e162849c383", "score": "0.50534153", "text": "public function render()\n\t{\n\t\t$str = $this->renderStart()\n\t\t\t . $this->renderContent()\n\t\t\t . $this->renderEnd();\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "eb69488a97da45783b59231d375f8927", "score": "0.5051861", "text": "abstract public function render($html = TRUE);", "title": "" } ]
6557b04f28706ec28dabb75635da74e7
if text has x
[ { "docid": "bfb97e9a96bd65aed3c86671d158ba8c", "score": "0.70518416", "text": "private static function textHas($text,$has){\n if (strpos($text, $has) !== false)\n return true;\n return false;\n }", "title": "" } ]
[ { "docid": "bcbec246f059eb6f0ace36443fa12030", "score": "0.70128465", "text": "public function hasText(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "1f8acc436b7b9f7f30354b4baf63e3de", "score": "0.61780703", "text": "public function isTextPresent($text) {\r\n\t\treturn (strpos($this->getSession()->source(), $text) !== false);\r\n\t}", "title": "" }, { "docid": "cd058ae3f69b0af087c6a14607f93fea", "score": "0.6152325", "text": "function ewr_ContainsText($haystack, $needle, $offset = 0) {\n\treturn stripos($haystack, $needle, $offset) !== FALSE;\n}", "title": "" }, { "docid": "7b484c6eefe9670816bbebbbaa6c18e1", "score": "0.6061976", "text": "public function hasHeaderText(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "9d20d5af166387d7c3f1d9b23226c66e", "score": "0.5998047", "text": "public function isText () {}", "title": "" }, { "docid": "afd384cc981943579a7530b9a3044ca9", "score": "0.5890232", "text": "function ewr_StartsText($needle, $haystack) {\n\treturn stripos($haystack, $needle) === 0;\n}", "title": "" }, { "docid": "21b8d64b60ee772c564f55e4e57658fd", "score": "0.5740032", "text": "function hasTextContent() {\n\t\t\treturn trim($this->getText()) !== \"\";\n\t\t}", "title": "" }, { "docid": "b2ea79bcca9ea5c4d8b7a52abdbbf822", "score": "0.57019085", "text": "public function check($word);", "title": "" }, { "docid": "7dc180808e225bd629195adad57192d9", "score": "0.56783104", "text": "public function checkContent($content, $text) {\n // Convert all whitespace to spaces.\n $content = preg_replace('/\\s+/u', ' ', $content);\n // Strip all whitespace between tags.\n $content = preg_replace('@>\\\\s+<@', '><', $content);\n $regex = '/' . preg_quote($text, '/') . '/ui';\n $message = sprintf('The text \"%s\" was found in the text of the current page.', $text);\n $this->assert((bool) preg_match($regex, $content), $message);\n }", "title": "" }, { "docid": "7907b0f1581651f797f4286b4c9e79bb", "score": "0.56133914", "text": "public function assertSearchContainsText($text)\n {\n //$this->assertSession()->pageTextContains($this->fixStepArgument($text));\n // insert code that checks whether search box contains text\n return true;\n }", "title": "" }, { "docid": "c17ec3044493fe088f61ffac84b59bd0", "score": "0.5598027", "text": "public static function startsWith ($text, $value)\n\t{\n\t\treturn Text::substring($text, 0, Text::length($value)) == $value;\n\t}", "title": "" }, { "docid": "e27be34f93e1996af57bf666d60765cb", "score": "0.5593142", "text": "private function verifyText(string $text): bool {\n if (preg_match('/^\\w{1,}$/', $text)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "24c633a5386e599d9527c99c60f4285f", "score": "0.5574394", "text": "function WordTextFound($str = \"\")\n\t{\tif (strstr($str, 'MsoNormal'))\n\t\t{\treturn true;\n\t\t}\n\t\tif (strstr($str, 'MsoListParagraph'))\n\t\t{\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "11ed922122cc31985fbfffca15b6c36f", "score": "0.55599433", "text": "function needle_in_cached_page($needle, $articletext)\n{\n\tif(stristr(strtolower($articletext), strtolower($needle)))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "d1b820150722d1ed073ce89129db4043", "score": "0.5536665", "text": "public function test($text = '', $offset = 0)\n\t{\n\n\t\t// Run the regular expression\n\t\treturn preg_match($this->re, $text, $matches, PREG_OFFSET_CAPTURE, $offset) === 1; \n\n\t}", "title": "" }, { "docid": "075a91035c50392cbaf7336d1bc51eb8", "score": "0.55341613", "text": "public function isTextPart() : bool\n {\n return false;\n }", "title": "" }, { "docid": "d123fc13357a65e5a5ea754de514b62b", "score": "0.55170983", "text": "function validText($text)\r\n{\r\n return (!empty($text));\r\n}", "title": "" }, { "docid": "7336adc5728023c086aae6a0b2264f6b", "score": "0.5510036", "text": "public function checkH1($text){\n\t\treturn $this->check($this->h1->innertext,'<h1>')->equals($text);\n\t}", "title": "" }, { "docid": "6117d95750a9f2b004c7d3b059331e70", "score": "0.5475441", "text": "public function contains(Stringable|string $text): bool {\n\t\treturn str_contains($this->getString(), (string) $text);\n\t}", "title": "" }, { "docid": "7bdcae0672f6a8602221cbc2bf2cb7a7", "score": "0.54269946", "text": "public function hasTitle(){\n return $this->_has(13);\n }", "title": "" }, { "docid": "7bdcae0672f6a8602221cbc2bf2cb7a7", "score": "0.54269946", "text": "public function hasTitle(){\n return $this->_has(13);\n }", "title": "" }, { "docid": "b202ea88fb687f278766a4d6d73a6536", "score": "0.5415246", "text": "public function isText()\n {\n return ($this->microType() === 'text');\n }", "title": "" }, { "docid": "2ef5885dff62794896065bdfbcde1aa0", "score": "0.5405277", "text": "function cNick($text)\r\n{\r\n $numCaracteres=mb_strlen($text);\r\n if (preg_match(\"/^[A-Za-zÑñ ]{1,15}+$/\", sinTildes($text)) && $numCaracteres<=20)\r\n return 1;\r\n else\r\n return 0;\r\n}", "title": "" }, { "docid": "f406905557e97dacd58fa584a76a1b05", "score": "0.5400683", "text": "function checkIsTextGroup($field, $index, $msg = \"\") {\n $pattern = \"/^([^\\x-\\x1F]|[\\r\\n])+$/\";\n if ($this->_prepareInput($this->requestMethod[$field][$index]) === false) {\n $this->_setErrorMessage($field, $this->requestMethod[$field][$index], 100);\n if (!empty($msg)) {\n $this->errorsUserdefined[] = $msg;\n }\n return false;\n }\n /* is text */\n if (preg_match($pattern, $this->requestMethod[$field][$index])) {\n return true;\n }\n $this->_setErrorMessage($field, $this->requestMethod[$field][$index], 106);\n if (!empty($msg)) {\n $this->errorsUserdefined[] = $msg;\n }\n return false;\n }", "title": "" }, { "docid": "a401ff8badd6171269247909de778bc4", "score": "0.53892565", "text": "public function text($text) {\n\t\treturn strlen($text) < 0x10000; // mx 64MiB\n\t}", "title": "" }, { "docid": "58b51d64f0882bf8d2c01aa3fd8de74e", "score": "0.53867483", "text": "public function canParseText($text);", "title": "" }, { "docid": "5bea179d1b650eda53f52e38979bb3ab", "score": "0.53755844", "text": "function isText($file_path) {\n $ext = get_file_extension($file_path);\n if($ext == \"docx\") {\n return 1;\n }\n else if($ext == \"xml\" || $ext == \"txt\") {\n return 2;\n }\n else {\n return 0;\n }\n}", "title": "" }, { "docid": "301d8a0248ac92ab873523d9cbce5b24", "score": "0.5370758", "text": "public static function isValidText($text) {\n return !preg_match(\"/^$|^[ ]+$/\", $text)? true : false;\n }", "title": "" }, { "docid": "8cfce262c08d90359bafbe5431a4dc7b", "score": "0.5364906", "text": "function textNotValid() {\n\t\t// comma not allowed because it causes broken webEdition navigation\n\t\treturn eregi(',',$this->Text);\n\t}", "title": "" }, { "docid": "06596640ca2fe9ad4e2be0e481ed4b73", "score": "0.5343013", "text": "public function theOutputShouldContain(PyStringNode $text)\n {\n PHPUnit_Framework_Assert::assertContains($this->getExpectedOutput($text), $this->getOutput());\n }", "title": "" }, { "docid": "46309779a2f110b9032f768bee68621d", "score": "0.53199625", "text": "function hasEntitat($str){\n\treturn hasQ(\"SELECT * FROM `entitats` WHERE `nom` like '\".s_str($str).\"'\");\n}", "title": "" }, { "docid": "be637f4ed29a37d1089586c99f4d8a10", "score": "0.531582", "text": "function check_for_credit_info($val) {\n $words = explode(' ', $val);\n $returnboolean = 0;\n foreach ($words as $word) {\n if (check_for_ccn($word)) {\n $returnboolean = 1;\n }\n }\n return $returnboolean;\n}", "title": "" }, { "docid": "6c31e6b57cd89950393fd29681ff32f7", "score": "0.5284747", "text": "function test_graph_shortcode_single_field_filter_by_text_contains() {\n\t\tself::clear_frm_vars();\n\n\t\t$graph_atts = array( 'id' => 'text-field', 'text-field_contains' => 'St' );\n\n\t\t$graph_html = FrmProGraphsController::graph_shortcode( $graph_atts );\n\n\t\t$expected_data = self::get_graph_defaults( $graph_atts, 'Single Line Text' );\n\t\t$expected_data['data'] = array(\n\t\t\tarray( 'Single Line Text', 'Submissions' ),\n\t\t\tarray( 'Steph', 1 ),\n\t\t\tarray( 'Steve', 1 ),\n\t\t);\n\n\t\tself::run_graph_tests( $graph_html, $expected_data );\n\t}", "title": "" }, { "docid": "dc31c1921a75dbdbfed3c5d582c41e6e", "score": "0.5284146", "text": "public function assertElementContainsText($element, $text)\n {\n $this->assertSession()->elementTextContains('css', $element, $this->fixStepArgument($text));\n }", "title": "" }, { "docid": "c2eb98661f1d49e4405956e92caabc5d", "score": "0.52745944", "text": "public function seeResponseContains($text)\n {\n $this->assertContains($text, $this->getModule('Yii2')->_getResponseContent(), \"response contains\");\n }", "title": "" }, { "docid": "2b7838ecef227ea1df98d90ce69b7f02", "score": "0.52598214", "text": "private function fileContains($filePath, $text) {\n\t\t$fileData = file_get_contents($filePath);\n\t\tif (strpos($fileData, $text) === false ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "69eab03594a873e0b52ba0a9e5a0b1df", "score": "0.5258288", "text": "private function contentContainsString($needle): bool\n {\n return strpos($this->getResponse()->getContent(), $needle) !== false;\n }", "title": "" }, { "docid": "b0eaa4757fd22709bd59b5c06de78d3a", "score": "0.5251789", "text": "public function hasDescriptionText(){\n return $this->_has(11);\n }", "title": "" }, { "docid": "77c7b56907c4d6ea515471a179665b06", "score": "0.5249315", "text": "public function hasDigit()\n {\n return (1 === preg_match('/\\d/', $this->text));\n }", "title": "" }, { "docid": "5e427611a40f69d58fbcc05a1591bbd7", "score": "0.5246191", "text": "function polyglot_filter_with_message($text){\nglobal $polyglot_settings;\n\t$text = trim(polyglot_filter($text));\n\tif($text == ''){\n\t\t$text = polyglot_filter($polyglot_settings['text_is_missing_message']);\n\t}\n\treturn $text;\n}", "title": "" }, { "docid": "7bdaa3a8255115df9c6ad1c209d3ad7f", "score": "0.5238897", "text": "function osc_is_watermark_text() {\n $text = getPreference('watermark_text');\n if($text != ''){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7db2733aa1c75155c1886dbe31aae52d", "score": "0.5227288", "text": "public function getRelevantText();", "title": "" }, { "docid": "63867c7f7781597fcb1fc9649c3b7879", "score": "0.5223974", "text": "function contains($input, $substring)\n{\n return mb_strpos($input, $substring) !== false;\n}", "title": "" }, { "docid": "c4316dba01955896a52711be48b249f6", "score": "0.5221817", "text": "function ewr_EndsText($needle, $haystack) {\n\treturn strripos($haystack, $needle) === strlen($haystack) - strlen($needle);\n}", "title": "" }, { "docid": "28d91d7d59c6d27b1287d2ea77aba187", "score": "0.52157676", "text": "function ExOh($str) { \n $x_count = 0;\n $o_count = 0;\n \n for($count = 0;$count <= strlen($str)-1;$count++) {\n $character = substr($str,$count,1);\n if($character == 'x') {\n $x_count++;\n }\n else {\n $o_count++;\n }\n }\n \n if($x_count == $o_count) {\n return 'true';\n }\n else {\n return 'false';\n }\n \n}", "title": "" }, { "docid": "cb095e8de7756e0ff1bd6f16664ef970", "score": "0.5204938", "text": "function player_tag_exists( $content ) {\r\n\t\t\tif ( stristr( $content, '[mediaplayer') )\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}", "title": "" }, { "docid": "929b7b2edd8ca701fa8a1537f859b84e", "score": "0.5202554", "text": "public function isSpam($text)\n {\n return strlen($text) < 50;\n }", "title": "" }, { "docid": "40291d83c8a60fd981c469d95c937ff1", "score": "0.5195196", "text": "public function hasSpeech(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "e991484eeb7e6488231c5da9588bb017", "score": "0.51931024", "text": "private function verificaText() {\n if ( $this->validaObrigatorio == 'sim' || $this->valor != '' ) {\n if ( $this->valor == '' ) {\n $this->setErro();\n } else {\n if ( !(preg_match( $this->erESPECIAIS, $this->validaCampoEspecial )) ) {\n $this->setDados();\n } else {\n if ( $this->{'verifica' . ucfirst( $this->validaCampoEspecial )}() ) {\n $this->setDados();\n } else {\n $this->setErro();\n }\n }\n }\n } else {\n $this->setDados();\n }\n }", "title": "" }, { "docid": "dcac02d7d7ee21831474b2ea94051cc4", "score": "0.5184658", "text": "function strposX($haystack, $needle, $number){\n if (strpos($haystack, $needle) != false){\n if($number == '1'){\n return strpos($haystack, $needle);\n }elseif($number > '1'){\n return strpos($haystack, $needle, strposX($haystack, $needle, $number - 1) + strlen($needle));\n }elseif (strposX($haystack, $needle, $number - 1) + strlen($needle) < $number){\n echo 'Find the letter yourself!';\n }\n }else{\n echo 'Find the letter yourself!';\n }\n\n}", "title": "" }, { "docid": "dcf892e652fb76f57d1709c85f1d3e0e", "score": "0.5182942", "text": "public function isText(): bool\n {\n return Str::startsWith($this->file->mimeType(), 'text/');\n }", "title": "" }, { "docid": "a0f31a1522bf8fc6602958e415c49677", "score": "0.5179836", "text": "function check_obscene_word($string_to_check)\n{\n\t$string_to_check = remove_special_characters($string_to_check,\"alphabets\");\n\t$sql = \"SELECT SQL_CACHE WORD FROM newjs.OBSCENE_WORDS\";\n\t$res = mysql_query_decide($sql) or logError(\"Due to a temporary problem your request could not be processed. Please try after a couple of minutes\",$sql,\"ShowErrTemplate\");\n\n\t$string_to_check_array = explode(\" \",$string_to_check); \n\n\twhile($row = mysql_fetch_array($res))\n\t{\n\t\t// var_dump($row['WORD']);\n\t\tif(in_array($row['WORD'],$string_to_check_array))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f4eeafadee12bb5194e797b437ea796a", "score": "0.51494753", "text": "function isWord() {\n if (!strlen(trim($this->value))) {\n return false;\n }\n if (preg_match('/^\\&[a-z0-9]+;$/i',trim($this->value))) {\n return false;\n }\n return preg_match('/[a-z]/i',$this->value);\n }", "title": "" }, { "docid": "9a7ed3664a7d349ea6909ac1644f3fdb", "score": "0.51490736", "text": "function expectText ();", "title": "" }, { "docid": "b4c1a67829e4a96b94151162937eac82", "score": "0.51435983", "text": "public function hasLetter()\n {\n $stringWithoutAccent = new SimpleString($this->text);\n $stringWithoutAccent->deleteAccents();\n\n return (1 === preg_match('/[a-zA-Z]/', $stringWithoutAccent->getText()));\n }", "title": "" }, { "docid": "4e3ec40164f63b7789f1591352f2eeab", "score": "0.5138003", "text": "public function validateText($value){\n $value = preg_replace(\"/\\s/\", \"\", $value);\n if( preg_match(\"/^[A-Za-z0-9,._-]+$/\", $value) ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "cf4311c9027acf4836d26751b9d76514", "score": "0.51371235", "text": "function verificateur_texte(string $texte){\r\n if (preg_match('#^[a-z].+[.?!]$#i', $texte)) {\r\n return true;\r\n }else {\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "76106085c523842dafe6a714b779e560", "score": "0.51301044", "text": "function cannot_contain($str, $field){\n $this->CI->form_validation->set_message('cannot_contain', \"%s cannot contain the text \\\"\" . $field . \"\\\".\");\n if(stristr($field, $str) === FALSE) {\n return FALSE;\n }\n return TRUE;\n }", "title": "" }, { "docid": "b82ad5c9eb9b1f654b920128986b74e8", "score": "0.5127864", "text": "function has($at)\n {\n return isset($this->lines[$at]);\n }", "title": "" }, { "docid": "98bc5dc6807281de18840e9daec8da5e", "score": "0.5126855", "text": "public function validateText( $data )\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "aab407c23a021c4ac1abf88b16155765", "score": "0.51201546", "text": "function Search($search, $string)\n{\n $position = strpos($string, $search, 5);\n if ($position == true) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "0a36eb462943bd9754f1b1dcafb037b1", "score": "0.51174986", "text": "public static function handleTextHas($text,$function,$sendIfNotAnswered=true){\n if (BaleUpdate::updateType()=='Message' && BaleUpdate::messageType()=='Text'){\n $text = (is_array($text))?$text:[$text];\n foreach ($text as $t) {\n if (self::textHas(strtolower(BaleUpdate::message()->text), strtolower($t))) {\n if ($sendIfNotAnswered === true) {\n if (self::$answered === false) {\n self::$answered = true;\n return $function(self::$bot);\n }\n } else {\n self::$answered = true;\n return $function(self::$bot);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "0b17ce1877fb08c82aaeee905ac8bbdc", "score": "0.5103533", "text": "public function hasTitle(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "11e742e5e11bcbea435002151af17836", "score": "0.50972563", "text": "function Checkbot()\n {\n $strText = \"^\".$this -> strBotname;\n if (eregi($strText, $this -> strPlayertext))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "35350f44b52cdd43f1cf93254d0efc69", "score": "0.5094212", "text": "public static function endsWith ($text, $value)\n\t{\n\t\treturn Text::substring($text, -Text::length($value)) == $value;\n\t}", "title": "" }, { "docid": "cf3bdd1ed2d202eef3d0451fde33a607", "score": "0.5088169", "text": "public function __isset($key)\n {\n \n if (!isset($this->texts[$key])) {\n $this->loadText($key);\n }\n \n return isset($this->texts[$key])?true:false;\n \n }", "title": "" }, { "docid": "bf81bed56ab4b1565b8be30adb92a6c9", "score": "0.5084266", "text": "function polyglot_lang_exists($lang, $content){\n return ( !(strpos($content, \"<lang_$lang>\") === false) || !(strpos($content, \"[lang_$lang]\") === false) );\n}", "title": "" }, { "docid": "ad467f3ff8a45664433492b654c4ee11", "score": "0.50811577", "text": "abstract public function alternativeText();", "title": "" }, { "docid": "95a39f560624f86132699647dabfeac1", "score": "0.5079211", "text": "function responsive_bu_banner_has_text( $has_text, $banner_info ) {\n\t\t/**\n\t\t * Bails immediately if the following conditions are met:\n\t\t * - this is an admin page (avoids messing with save_post hook).\n\t\t * - this is not a text layout.\n\t\t */\n\t\tif ( is_admin() || ! bu_banners_layout_supports_text( $banner_info['layout'] ) ) {\n\t\t\treturn $has_text;\n\t\t}\n\n\t\t// If this text layout has an empty title, return true. We'll fill it in later.\n\t\tif ( empty( $banner_info['title'] ) ) {\n\t\t\t$has_text = true;\n\t\t}\n\n\t\treturn $has_text;\n\t}", "title": "" }, { "docid": "8d7c08d5a7c31bb276871e44b7a9bcb8", "score": "0.50694567", "text": "private function varCheck($var){\n $var = trim($var);\n $splitVar = preg_split('/@/', $var, 2);\n if (count($splitVar) == 2){\n if ($splitVar[0] == \"GF\" || $splitVar[0] == \"LF\"||\n $splitVar[0] == \"TF\"){\n // na nazov premennej sa vztahuju rovnake pravidla ako na label\n return $this->labelCheck($splitVar[1]);\n }\n }\n return false;\n }", "title": "" }, { "docid": "56cfdb9300e3d9e9ddbcabb0c6fde920", "score": "0.5067939", "text": "function checkword_small($text, $Bword) {\n\t//this is the typed statement\n\t$text = strtolower($text);\n\n\t//this helps to avoid some common workarounds\n\t$expressions = array (\n\t\t'@',\n\t\t'$',\n\t\t'3',\n\t\t'1',\n\t\t'7'\n\t);\n\t$replacements = array (\n\t\t'a',\n\t\t's',\n\t\t'e',\n\t\t'l',\n\t\t't'\n\t); //make sure these are lowercase\n\t$text = str_replace($expressions, $replacements, $text);\n\t//this gets the typed statement with spaces and punctuation removed\n\t$textcut = preg_replace('/[^a-z]/', '', $text);\n\n\tif (strpos($textcut, $Bword) === false) {\n\t\t//the word wasn't there at all\n\t\treturn false;\n\t} else {\n\t\t//get an array of all the words typed\n\t\t$textarr = preg_split('/ +/', $text);\n\t\t//this regex will check for a repeated last letter (eg assss)\n\t\t$regex = '/' . $Bword . '+/';\n\t\tforeach ($textarr as $word) {\n\t\t\t//we delete the entire matching phrase and see if that's the whole word\n\t\t\tif ($word == $Bword || preg_replace('/[^a-z]/', '', $word) == $Bword || preg_replace($regex, '', $text) == \"\") {\n\t\t\t\t//echo \"first<br>\";\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\t\t//NOTE: this is probably the most processor-intensive part\n\t\t//it's not a word by itself, has it been split? (eg \"a s s\")\n\t\t//NOTE: this approach will NOT pick up \"a ss\"\n\t\t$index = 0;\n\t\t$regex = \"/\";\n\t\t$length = strlen($Bword) - 1; //we skip the last character\n\t\twhile ($index < $length) {\n\t\t\t$regex .= $Bword[$index] . ' +';\n\t\t\t$index++;\n\t\t}\n\t\t$regex .= $Bword[$length] . '/'; //no regex after the last element\n\t\t//so at this point we should have something that looks like\n\t\t// '/a +s +s/'\n\t\tif (preg_match($regex, $text)) {\n\t\t\t//echo \"third<br>\";\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "d943ef850dcdb4e0384601c7d01093a2", "score": "0.5056333", "text": "function filter($text)\n\t{\n\t}", "title": "" }, { "docid": "1544c3c28d2dfae3ce1fc89e97116c0a", "score": "0.50497794", "text": "function ewr_ContainsStr($haystack, $needle, $offset = 0) {\n\treturn strpos($haystack, $needle, $offset) !== FALSE;\n}", "title": "" }, { "docid": "043f2f789ddeac48bde61f60368a294d", "score": "0.50441", "text": "public function hasSearchText()\n {\n return $this->search_text !== null;\n }", "title": "" }, { "docid": "8efde0521431b2b912e2d31eb166c7f2", "score": "0.50296277", "text": "public function found_in_question_text($thirdparam, $controlno) {\n if ($this->foundinquestiontext && !$this->can_be_more_than_one_of_same_instance()) {\n $getstringhash = $this->get_string_hash();\n return get_string('err_thisqtypecannothavemorethanonecontrol', 'qtype_combined', $getstringhash);\n }\n $this->foundinquestiontext = true;\n $this->store_control_no($controlno);\n return $this->process_third_param($thirdparam);\n }", "title": "" }, { "docid": "e984d6b53e0bd9e224cdcc24da2a17f8", "score": "0.50278646", "text": "public function validate($text);", "title": "" }, { "docid": "e81a9bef9db0b5d72650f099094d5c15", "score": "0.50262296", "text": "public function hasTitleIssue() {\n return (preg_match(\"/^[0-9A-Z ]+$/\",$this->getTitle()));\n }", "title": "" }, { "docid": "e138e3f0eb375552bbd4227ed64bf5a4", "score": "0.50221264", "text": "function search($word) {\n $node = $this->searchPrefix($word);\n return $node && $node->is_end;\n }", "title": "" }, { "docid": "cd8a2ac3283cb1966e87411049377219", "score": "0.50172406", "text": "public function isTitleMatch()\n {\n return $this->titles()->count() > 0;\n }", "title": "" }, { "docid": "8b6fbfbd9bc3182e0dedc2e20ff64691", "score": "0.5007082", "text": "public function is_text_record_index($index)\n\t{\n\t\t$start_index = 1;\n\t\t$end_index = $start_index + $this->palmdoc_header->record_count;\n\n\t\treturn (($start_index > 0) && ($end_index > $start_index) && \n\t\t ($index >= $start_index) && ($index < $end_index));\n\t}", "title": "" }, { "docid": "72663fa5f102a4b87acce098a384f488", "score": "0.50020367", "text": "function checktext2($strin)\n{\n // js | php file ops| shell_exec | write | read\n\t$gjret =preg_match('/script|file|hell|write|read/', $strin,$strmatched);\n\tif($gjret) {\n return false; //not safe\n\t} else {\n return true; // yippe\n }\n}", "title": "" }, { "docid": "fc5bc87cd8d75b06fd7c15993ca1cdfc", "score": "0.49979037", "text": "function isText()\r\n {\r\n if($this->_filetype == 'text') return true;\r\n else return false;\r\n }", "title": "" }, { "docid": "5ac6c6f3f8a1903a8cfe038e571a15c2", "score": "0.49902844", "text": "function string_starts_with($string, $test)\n{\n $length = strlen($test);\n return (substr($string, 0, $length) === $test);\n}", "title": "" }, { "docid": "e083d14527c7d8f75edd9a82f226d3ba", "score": "0.4989935", "text": "protected function hasRawText($text)\n {\n $r = trim(preg_replace('@<(p|blockquote|div|form|table|ul|ol|dl|pre|h\\d)[^>]*?'.chr(62).'.*</\\1>@s', '', trim($text)));\n $r = trim(preg_replace('@<(hr|br)[^>]*?/>@', '', $r));\n return '' != $r;\n }", "title": "" }, { "docid": "45093e4bf40c1a06baa6290d4c89fb16", "score": "0.49897626", "text": "function unknownlib_translation_is_found($type,$text,$lang='')\n{\n\tif($lang=='')\n\t\t$lang=$GLOBALS['unknownlib']['site']['current_language'];\n\tif(isset($GLOBALS['unknownlib']['translation']['content'][$lang][$type][$text]) || $lang=='english')\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "0c80e02c5671bc261b56aec6a8fa1543", "score": "0.4983224", "text": "public function hasDescription(string $text): bool {\n return (false !== strpos(strtolower($this->descriptionText()), strtolower($text)));\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.4973931", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.4973931", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.4973931", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.4973931", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.4973931", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.4973931", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "a292bb478e7f8cae294fb84f966eec41", "score": "0.4973928", "text": "function startWith($str, $needle) {\n\n return strpos($str, $needle) === 0;\n\n}", "title": "" }, { "docid": "af6c842f3590d5a117d1b5f086f40bf0", "score": "0.49710968", "text": "function validText($name) {\n\tif (!preg_match(\"/^[a-zA-Z '!,.-]*$/\",$name) || strlen($name)<1) {\n \t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "e25b43f87a38277df20bacaffcf10bb5", "score": "0.49700317", "text": "public function is_searchable()\n {\n // to search by.\n $st = !empty($this->content) ? $this->content : '';\n $clean = APIUtil::piplapi_alnum_chars($st);\n $func = function_exists(\"mb_strlen\") ? \"mb_strlen\" : \"strlen\";\n return ($func($clean) >= 3);\n }", "title": "" }, { "docid": "2960ba5231b1134840ae3e4b6a5fed45", "score": "0.49668473", "text": "public function is($text) {\n\t\t$original = (!is_null($this->formattedText)) ? $this->formattedText : $this->getOriginal();\n\n\t\tif ($text == $original) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$isCaseInsensitive = $this->hasFlag('i');\n\t\t$isIgnoringWhitespace = $this->hasFlag('x');\n\n\t\tif ($isCaseInsensitive) {\n\t\t\t$original = strtolower($original);\n\t\t\t$text = strtolower($text);\n\n\t\t\tif ($original == $text) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif ($isIgnoringWhitespace) {\n\t\t\t$text = preg_replace('/\\s+/', ' ', trim($text));\n\t\t\t$original = preg_replace('/\\s+/', ' ', trim($original));\n\n\t\t\tif ($original == $text) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e76b951a1cb7961c65a8bc71c595a6dc", "score": "0.4965331", "text": "function prob_a_url($text) {\n\t\t$urlPrefixes = array(\n\t\t\t'http://',\n\t\t\t'www.',\n\t\t\t'https://',\n\t\t);\n\t\tforeach ($urlPrefixes as $key => $value) {\n\t\t\tif (substr($text,0,strlen($value))==$value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b3c1573abfa28870072efe9d065bfd7c", "score": "0.49599564", "text": "abstract public function text();", "title": "" }, { "docid": "420b7d2f9810accb87fc02913db93d14", "score": "0.4959792", "text": "function beginWith($line, $check) {\n \n $length = strlen($check);\n return substr($line, 0, $length) === $check; \n}", "title": "" }, { "docid": "554fe27db077205913696f370c8c5b13", "score": "0.4958218", "text": "static function validaTexto($texto)\n\t{\n\t\t$aceptados = \"/^([a-zA-Z0-9\\s._-])*$/\";\n\t\tif(isset($texto) && (preg_match($aceptados, $texto)))\n\t\t{\n\t\t\treturn $texto; \n\t\t}\n\t\telse if(isset($texto))\n\t\t{\n\t\t\tprint 'Error: La cadena que introduces no es texto';\n\t\t\tprint '<br/>';\n\t\t}\n\t\telse\n\t\t{\n\t\t}\n\t}", "title": "" } ]